From bf2f215971753b948c337f8ea48431bfa21bcbd5 Mon Sep 17 00:00:00 2001 From: Maxim Molchanov Date: Fri, 21 Feb 2025 17:38:02 +0200 Subject: [PATCH] Added FilterPath param Signed-off-by: Maxim Molchanov --- CHANGELOG.md | 2 ++ opensearchapi/api_aliases-params.go | 10 ++++++++- opensearchapi/api_bulk-params.go | 5 +++++ opensearchapi/api_cat-aliases-params.go | 5 +++++ opensearchapi/api_cat-allocation-params.go | 5 +++++ .../api_cat-cluster_manager-params.go | 5 +++++ opensearchapi/api_cat-count-params.go | 5 +++++ opensearchapi/api_cat-fielddata-params.go | 5 +++++ opensearchapi/api_cat-health-params.go | 5 +++++ opensearchapi/api_cat-indices-params.go | 5 +++++ opensearchapi/api_cat-master-params.go | 5 +++++ opensearchapi/api_cat-nodeattrs-params.go | 5 +++++ opensearchapi/api_cat-nodes-params.go | 5 +++++ opensearchapi/api_cat-pending_tasks-params.go | 5 +++++ opensearchapi/api_cat-plugins-params.go | 5 +++++ opensearchapi/api_cat-recovery-params.go | 5 +++++ opensearchapi/api_cat-repositories-params.go | 5 +++++ opensearchapi/api_cat-segments-params.go | 5 +++++ opensearchapi/api_cat-shards-params.go | 5 +++++ opensearchapi/api_cat-snapshots-params.go | 5 +++++ opensearchapi/api_cat-tasks-params.go | 5 +++++ opensearchapi/api_cat-templates-params.go | 5 +++++ opensearchapi/api_cat-thread_pool-params.go | 5 +++++ .../api_cluster-allocation_explain-params.go | 6 ++++++ .../api_cluster-decommission-params.go | 17 +++++++++++++++ opensearchapi/api_cluster-health-params.go | 6 ++++++ .../api_cluster-pending_tasks-params.go | 6 ++++++ .../api_cluster-remote_info-params.go | 7 +++++++ opensearchapi/api_cluster-reroute-params.go | 5 +++++ opensearchapi/api_cluster-settings-params.go | 11 ++++++++++ opensearchapi/api_cluster-state-params.go | 6 ++++++ opensearchapi/api_cluster-stats-params.go | 6 ++++++ ...cluster-voting_config_exclusions-params.go | 11 ++++++++++ .../api_component_template-create-params.go | 6 ++++++ .../api_component_template-delete-params.go | 6 ++++++ .../api_component_template-exists-params.go | 6 ++++++ .../api_component_template-get-params.go | 6 ++++++ opensearchapi/api_dangling-delete-params.go | 6 ++++++ opensearchapi/api_dangling-get-params.go | 7 +++++++ opensearchapi/api_dangling-import-params.go | 6 ++++++ opensearchapi/api_datastream-create-params.go | 7 +++++++ opensearchapi/api_datastream-delete-params.go | 10 ++++++++- opensearchapi/api_datastream-get-params.go | 10 ++++++++- opensearchapi/api_datastream-stats-params.go | 10 ++++++++- opensearchapi/api_document-create-params.go | 6 ++++++ opensearchapi/api_document-delete-params.go | 6 ++++++ .../api_document-delete_by_query-params.go | 5 +++++ ...ument-delete_by_query_rethrottle-params.go | 6 ++++++ opensearchapi/api_document-exists-params.go | 5 +++++ .../api_document-exists_source-params.go | 5 +++++ opensearchapi/api_document-explain-params.go | 5 +++++ opensearchapi/api_document-get-params.go | 5 +++++ opensearchapi/api_document-source-params.go | 5 +++++ opensearchapi/api_index-params.go | 6 ++++++ .../api_index_template-create-params.go | 6 ++++++ .../api_index_template-delete-params.go | 6 ++++++ .../api_index_template-exists-params.go | 6 ++++++ .../api_index_template-get-params.go | 6 ++++++ .../api_index_template-simulate-params.go | 6 ++++++ ...pi_index_template-simulate_index-params.go | 6 ++++++ opensearchapi/api_indices-alias-params.go | 21 +++++++++++++++++++ opensearchapi/api_indices-analyze-params.go | 7 +++++++ opensearchapi/api_indices-block-params.go | 6 ++++++ opensearchapi/api_indices-cache-params.go | 5 +++++ opensearchapi/api_indices-clone-params.go | 6 ++++++ opensearchapi/api_indices-close-params.go | 6 ++++++ opensearchapi/api_indices-count-params.go | 5 +++++ opensearchapi/api_indices-create-params.go | 6 ++++++ opensearchapi/api_indices-delete-params.go | 6 ++++++ opensearchapi/api_indices-exists-params.go | 10 ++++++++- .../api_indices-field_caps-params.go | 5 +++++ opensearchapi/api_indices-flush-params.go | 6 ++++++ .../api_indices-forcemerge-params.go | 6 ++++++ opensearchapi/api_indices-get-params.go | 6 ++++++ opensearchapi/api_indices-mapping-params.go | 11 ++++++++++ opensearchapi/api_indices-open-params.go | 6 ++++++ opensearchapi/api_indices-recovery-params.go | 6 ++++++ opensearchapi/api_indices-refresh-params.go | 6 ++++++ opensearchapi/api_indices-resolve-params.go | 7 +++++++ opensearchapi/api_indices-rollover-params.go | 6 ++++++ opensearchapi/api_indices-segments-params.go | 6 ++++++ opensearchapi/api_indices-settings-params.go | 11 ++++++++++ .../api_indices-shardstores-params.go | 5 +++++ opensearchapi/api_indices-shrink-params.go | 6 ++++++ opensearchapi/api_indices-split-params.go | 6 ++++++ opensearchapi/api_indices-stats-params.go | 6 ++++++ opensearchapi/api_indices-validate-params.go | 6 ++++++ opensearchapi/api_info-params.go | 7 +++++++ opensearchapi/api_ingest-create-params.go | 10 ++++++++- opensearchapi/api_ingest-delete-params.go | 10 ++++++++- opensearchapi/api_ingest-get-params.go | 6 ++++++ opensearchapi/api_ingest-grok-params.go | 7 +++++++ opensearchapi/api_ingest-simulate-params.go | 10 ++++++++- opensearchapi/api_mget-params.go | 5 +++++ opensearchapi/api_msearch-params.go | 6 ++++++ opensearchapi/api_msearch-template-params.go | 6 ++++++ opensearchapi/api_mtermvectors-params.go | 5 +++++ opensearchapi/api_nodes-hot_threads-params.go | 6 ++++++ opensearchapi/api_nodes-info-params.go | 6 ++++++ .../api_nodes-reload_security-params.go | 6 ++++++ opensearchapi/api_nodes-stats-params.go | 5 +++++ opensearchapi/api_nodes-usage-params.go | 6 ++++++ opensearchapi/api_ping-params.go | 7 +++++++ .../api_point_in_time-create-params.go | 6 ++++++ .../api_point_in_time-delete-params.go | 7 +++++++ opensearchapi/api_point_in_time-get-params.go | 7 +++++++ opensearchapi/api_rank_eval-params.go | 6 ++++++ opensearchapi/api_reindex-params.go | 6 ++++++ .../api_reindex_rethrottle-params.go | 6 ++++++ .../api_render_search_template-params.go | 7 +++++++ opensearchapi/api_script-context-params.go | 7 +++++++ opensearchapi/api_script-delete-params.go | 6 ++++++ opensearchapi/api_script-get-params.go | 6 ++++++ opensearchapi/api_script-language-params.go | 7 +++++++ .../api_script-painless_execute-params.go | 7 +++++++ opensearchapi/api_script-put-params.go | 6 ++++++ opensearchapi/api_scroll-delete-params.go | 7 +++++++ opensearchapi/api_scroll-get-params.go | 6 ++++++ opensearchapi/api_search-params.go | 5 +++++ opensearchapi/api_search-params_test.go | 4 ++++ opensearchapi/api_search-template-params.go | 5 +++++ opensearchapi/api_search_shards-params.go | 6 ++++++ opensearchapi/api_snapshot-clone-params.go | 6 ++++++ opensearchapi/api_snapshot-create-params.go | 6 ++++++ opensearchapi/api_snapshot-delete-params.go | 6 ++++++ opensearchapi/api_snapshot-get-params.go | 6 ++++++ opensearchapi/api_snapshot-restore-params.go | 6 ++++++ opensearchapi/api_snapshot-status-params.go | 6 ++++++ .../api_snapshot_repository-cleanup-params.go | 6 ++++++ .../api_snapshot_repository-create-params.go | 6 ++++++ .../api_snapshot_repository-delete-params.go | 6 ++++++ .../api_snapshot_repository-get-params.go | 6 ++++++ .../api_snapshot_repository-verify-params.go | 6 ++++++ opensearchapi/api_tasks-cancel-params.go | 5 +++++ opensearchapi/api_tasks-get-params.go | 6 ++++++ opensearchapi/api_tasks-list-params.go | 5 +++++ opensearchapi/api_template-create-params.go | 6 ++++++ opensearchapi/api_template-delete-params.go | 6 ++++++ opensearchapi/api_template-exists-params.go | 6 ++++++ opensearchapi/api_template-get-params.go | 6 ++++++ opensearchapi/api_termvectors-params.go | 5 +++++ opensearchapi/api_update-params.go | 5 +++++ opensearchapi/api_update_by_query-params.go | 5 +++++ .../api_update_by_query_rethrottle-params.go | 6 ++++++ 144 files changed, 901 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e3b01c81..888092bdc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## [Unreleased] ### Dependencies ### Added +- Adds `FilterPath` param ([#673](https://github.com/opensearch-project/opensearch-go/pull/673)) + ### Changed ### Deprecated ### Removed diff --git a/opensearchapi/api_aliases-params.go b/opensearchapi/api_aliases-params.go index 4381a3f53..8705d7e68 100644 --- a/opensearchapi/api_aliases-params.go +++ b/opensearchapi/api_aliases-params.go @@ -26,7 +26,10 @@ package opensearchapi -import "time" +import ( + "strings" + "time" +) // AliasesParams represents possible parameters for the AliasesReq type AliasesParams struct { @@ -37,6 +40,7 @@ type AliasesParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r AliasesParams) get() map[string]string { @@ -66,5 +70,9 @@ func (r AliasesParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_bulk-params.go b/opensearchapi/api_bulk-params.go index 580aa137c..c5af7d84a 100644 --- a/opensearchapi/api_bulk-params.go +++ b/opensearchapi/api_bulk-params.go @@ -47,6 +47,7 @@ type BulkParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r BulkParams) get() map[string]string { @@ -109,5 +110,9 @@ func (r BulkParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_cat-aliases-params.go b/opensearchapi/api_cat-aliases-params.go index c3bf97ac6..ddb965880 100644 --- a/opensearchapi/api_cat-aliases-params.go +++ b/opensearchapi/api_cat-aliases-params.go @@ -42,6 +42,7 @@ type CatAliasesParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r CatAliasesParams) get() map[string]string { @@ -79,6 +80,10 @@ func (r CatAliasesParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + params["format"] = "json" return params diff --git a/opensearchapi/api_cat-allocation-params.go b/opensearchapi/api_cat-allocation-params.go index 6ddc428b2..b3e0d09e0 100644 --- a/opensearchapi/api_cat-allocation-params.go +++ b/opensearchapi/api_cat-allocation-params.go @@ -46,6 +46,7 @@ type CatAllocationParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r CatAllocationParams) get() map[string]string { @@ -95,6 +96,10 @@ func (r CatAllocationParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + params["format"] = "json" return params diff --git a/opensearchapi/api_cat-cluster_manager-params.go b/opensearchapi/api_cat-cluster_manager-params.go index 5324f5e01..9f84c9d2b 100644 --- a/opensearchapi/api_cat-cluster_manager-params.go +++ b/opensearchapi/api_cat-cluster_manager-params.go @@ -44,6 +44,7 @@ type CatClusterManagerParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r CatClusterManagerParams) get() map[string]string { @@ -85,6 +86,10 @@ func (r CatClusterManagerParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + params["format"] = "json" return params diff --git a/opensearchapi/api_cat-count-params.go b/opensearchapi/api_cat-count-params.go index d734ec1ce..97223bdc6 100644 --- a/opensearchapi/api_cat-count-params.go +++ b/opensearchapi/api_cat-count-params.go @@ -40,6 +40,7 @@ type CatCountParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r CatCountParams) get() map[string]string { @@ -69,6 +70,10 @@ func (r CatCountParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + params["format"] = "json" return params diff --git a/opensearchapi/api_cat-fielddata-params.go b/opensearchapi/api_cat-fielddata-params.go index 4777669c5..9a7fdde91 100644 --- a/opensearchapi/api_cat-fielddata-params.go +++ b/opensearchapi/api_cat-fielddata-params.go @@ -41,6 +41,7 @@ type CatFieldDataParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r CatFieldDataParams) get() map[string]string { @@ -74,6 +75,10 @@ func (r CatFieldDataParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + params["format"] = "json" return params diff --git a/opensearchapi/api_cat-health-params.go b/opensearchapi/api_cat-health-params.go index 3c4233365..b30a9dc98 100644 --- a/opensearchapi/api_cat-health-params.go +++ b/opensearchapi/api_cat-health-params.go @@ -42,6 +42,7 @@ type CatHealthParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r CatHealthParams) get() map[string]string { @@ -79,6 +80,10 @@ func (r CatHealthParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + params["format"] = "json" return params diff --git a/opensearchapi/api_cat-indices-params.go b/opensearchapi/api_cat-indices-params.go index cca17ccdb..ddbaab3e7 100644 --- a/opensearchapi/api_cat-indices-params.go +++ b/opensearchapi/api_cat-indices-params.go @@ -50,6 +50,7 @@ type CatIndicesParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r CatIndicesParams) get() map[string]string { @@ -115,6 +116,10 @@ func (r CatIndicesParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + params["format"] = "json" return params diff --git a/opensearchapi/api_cat-master-params.go b/opensearchapi/api_cat-master-params.go index 1f9eefd2c..cbfec3685 100644 --- a/opensearchapi/api_cat-master-params.go +++ b/opensearchapi/api_cat-master-params.go @@ -44,6 +44,7 @@ type CatMasterParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r CatMasterParams) get() map[string]string { @@ -85,6 +86,10 @@ func (r CatMasterParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + params["format"] = "json" return params diff --git a/opensearchapi/api_cat-nodeattrs-params.go b/opensearchapi/api_cat-nodeattrs-params.go index 49e418a92..a53669ee6 100644 --- a/opensearchapi/api_cat-nodeattrs-params.go +++ b/opensearchapi/api_cat-nodeattrs-params.go @@ -44,6 +44,7 @@ type CatNodeAttrsParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r CatNodeAttrsParams) get() map[string]string { @@ -85,6 +86,10 @@ func (r CatNodeAttrsParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + params["format"] = "json" return params diff --git a/opensearchapi/api_cat-nodes-params.go b/opensearchapi/api_cat-nodes-params.go index e986d33ba..3d13502be 100644 --- a/opensearchapi/api_cat-nodes-params.go +++ b/opensearchapi/api_cat-nodes-params.go @@ -48,6 +48,7 @@ type CatNodesParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r CatNodesParams) get() map[string]string { @@ -105,6 +106,10 @@ func (r CatNodesParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + params["format"] = "json" return params diff --git a/opensearchapi/api_cat-pending_tasks-params.go b/opensearchapi/api_cat-pending_tasks-params.go index c9b07a64e..db2aa45b9 100644 --- a/opensearchapi/api_cat-pending_tasks-params.go +++ b/opensearchapi/api_cat-pending_tasks-params.go @@ -45,6 +45,7 @@ type CatPendingTasksParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r CatPendingTasksParams) get() map[string]string { @@ -90,6 +91,10 @@ func (r CatPendingTasksParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + params["format"] = "json" return params diff --git a/opensearchapi/api_cat-plugins-params.go b/opensearchapi/api_cat-plugins-params.go index 03670a052..c7e06c0b5 100644 --- a/opensearchapi/api_cat-plugins-params.go +++ b/opensearchapi/api_cat-plugins-params.go @@ -44,6 +44,7 @@ type CatPluginsParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r CatPluginsParams) get() map[string]string { @@ -85,6 +86,10 @@ func (r CatPluginsParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + params["format"] = "json" return params diff --git a/opensearchapi/api_cat-recovery-params.go b/opensearchapi/api_cat-recovery-params.go index c343c010a..6cdacbd7f 100644 --- a/opensearchapi/api_cat-recovery-params.go +++ b/opensearchapi/api_cat-recovery-params.go @@ -44,6 +44,7 @@ type CatRecoveryParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r CatRecoveryParams) get() map[string]string { @@ -89,6 +90,10 @@ func (r CatRecoveryParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + params["format"] = "json" return params diff --git a/opensearchapi/api_cat-repositories-params.go b/opensearchapi/api_cat-repositories-params.go index ab193d935..75aeb0c05 100644 --- a/opensearchapi/api_cat-repositories-params.go +++ b/opensearchapi/api_cat-repositories-params.go @@ -44,6 +44,7 @@ type CatRepositoriesParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r CatRepositoriesParams) get() map[string]string { @@ -85,6 +86,10 @@ func (r CatRepositoriesParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + params["format"] = "json" return params diff --git a/opensearchapi/api_cat-segments-params.go b/opensearchapi/api_cat-segments-params.go index daf2df8a2..4880a1341 100644 --- a/opensearchapi/api_cat-segments-params.go +++ b/opensearchapi/api_cat-segments-params.go @@ -45,6 +45,7 @@ type CatSegmentsParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r CatSegmentsParams) get() map[string]string { @@ -90,6 +91,10 @@ func (r CatSegmentsParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + params["format"] = "json" return params diff --git a/opensearchapi/api_cat-shards-params.go b/opensearchapi/api_cat-shards-params.go index ea29be4d1..7abd13fdb 100644 --- a/opensearchapi/api_cat-shards-params.go +++ b/opensearchapi/api_cat-shards-params.go @@ -46,6 +46,7 @@ type CatShardsParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r CatShardsParams) get() map[string]string { @@ -95,6 +96,10 @@ func (r CatShardsParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + params["format"] = "json" return params diff --git a/opensearchapi/api_cat-snapshots-params.go b/opensearchapi/api_cat-snapshots-params.go index 16cec68ae..b7351262b 100644 --- a/opensearchapi/api_cat-snapshots-params.go +++ b/opensearchapi/api_cat-snapshots-params.go @@ -45,6 +45,7 @@ type CatSnapshotsParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r CatSnapshotsParams) get() map[string]string { @@ -90,6 +91,10 @@ func (r CatSnapshotsParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + params["format"] = "json" return params diff --git a/opensearchapi/api_cat-tasks-params.go b/opensearchapi/api_cat-tasks-params.go index c120d18a6..a209dd292 100644 --- a/opensearchapi/api_cat-tasks-params.go +++ b/opensearchapi/api_cat-tasks-params.go @@ -46,6 +46,7 @@ type CatTasksParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r CatTasksParams) get() map[string]string { @@ -99,6 +100,10 @@ func (r CatTasksParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + params["format"] = "json" return params diff --git a/opensearchapi/api_cat-templates-params.go b/opensearchapi/api_cat-templates-params.go index 71a028742..573c203a1 100644 --- a/opensearchapi/api_cat-templates-params.go +++ b/opensearchapi/api_cat-templates-params.go @@ -44,6 +44,7 @@ type CatTemplatesParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r CatTemplatesParams) get() map[string]string { @@ -85,6 +86,10 @@ func (r CatTemplatesParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + params["format"] = "json" return params diff --git a/opensearchapi/api_cat-thread_pool-params.go b/opensearchapi/api_cat-thread_pool-params.go index b84c961f7..3dcb9bf2e 100644 --- a/opensearchapi/api_cat-thread_pool-params.go +++ b/opensearchapi/api_cat-thread_pool-params.go @@ -44,6 +44,7 @@ type CatThreadPoolParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r CatThreadPoolParams) get() map[string]string { @@ -85,6 +86,10 @@ func (r CatThreadPoolParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + params["format"] = "json" return params diff --git a/opensearchapi/api_cluster-allocation_explain-params.go b/opensearchapi/api_cluster-allocation_explain-params.go index bd31edfdb..b0ac3e2f7 100644 --- a/opensearchapi/api_cluster-allocation_explain-params.go +++ b/opensearchapi/api_cluster-allocation_explain-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" ) // ClusterAllocationExplainParams represents possible parameters for the ClusterAllocationExplainReq @@ -38,6 +39,7 @@ type ClusterAllocationExplainParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r ClusterAllocationExplainParams) get() map[string]string { @@ -63,5 +65,9 @@ func (r ClusterAllocationExplainParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_cluster-decommission-params.go b/opensearchapi/api_cluster-decommission-params.go index b09080c1a..b88f30fca 100644 --- a/opensearchapi/api_cluster-decommission-params.go +++ b/opensearchapi/api_cluster-decommission-params.go @@ -26,11 +26,14 @@ package opensearchapi +import "strings" + // ClusterPutDecommissionParams represents possible parameters for the ClusterPutDecommissionReq type ClusterPutDecommissionParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r ClusterPutDecommissionParams) get() map[string]string { @@ -48,6 +51,10 @@ func (r ClusterPutDecommissionParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } @@ -56,6 +63,7 @@ type ClusterGetDecommissionParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r ClusterGetDecommissionParams) get() map[string]string { @@ -73,6 +81,10 @@ func (r ClusterGetDecommissionParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } @@ -81,6 +93,7 @@ type ClusterDeleteDecommissionParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r ClusterDeleteDecommissionParams) get() map[string]string { @@ -98,5 +111,9 @@ func (r ClusterDeleteDecommissionParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_cluster-health-params.go b/opensearchapi/api_cluster-health-params.go index ad2add7f7..144733573 100644 --- a/opensearchapi/api_cluster-health-params.go +++ b/opensearchapi/api_cluster-health-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -49,6 +50,7 @@ type ClusterHealthParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r ClusterHealthParams) get() map[string]string { @@ -114,5 +116,9 @@ func (r ClusterHealthParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_cluster-pending_tasks-params.go b/opensearchapi/api_cluster-pending_tasks-params.go index e3a7b64a2..7deda2a1d 100644 --- a/opensearchapi/api_cluster-pending_tasks-params.go +++ b/opensearchapi/api_cluster-pending_tasks-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -39,6 +40,7 @@ type ClusterPendingTasksParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r ClusterPendingTasksParams) get() map[string]string { @@ -68,5 +70,9 @@ func (r ClusterPendingTasksParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_cluster-remote_info-params.go b/opensearchapi/api_cluster-remote_info-params.go index 6c99b9d97..52118acf4 100644 --- a/opensearchapi/api_cluster-remote_info-params.go +++ b/opensearchapi/api_cluster-remote_info-params.go @@ -26,11 +26,14 @@ package opensearchapi +import "strings" + // ClusterRemoteInfoParams represents possible parameters for the ClusterRemoteInfoReq type ClusterRemoteInfoParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r ClusterRemoteInfoParams) get() map[string]string { @@ -48,5 +51,9 @@ func (r ClusterRemoteInfoParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_cluster-reroute-params.go b/opensearchapi/api_cluster-reroute-params.go index f2caf5f3a..340f659fc 100644 --- a/opensearchapi/api_cluster-reroute-params.go +++ b/opensearchapi/api_cluster-reroute-params.go @@ -45,6 +45,7 @@ type ClusterRerouteParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r ClusterRerouteParams) get() map[string]string { @@ -90,5 +91,9 @@ func (r ClusterRerouteParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_cluster-settings-params.go b/opensearchapi/api_cluster-settings-params.go index 7cd53f814..5241561db 100644 --- a/opensearchapi/api_cluster-settings-params.go +++ b/opensearchapi/api_cluster-settings-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -42,6 +43,7 @@ type ClusterGetSettingsParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r ClusterGetSettingsParams) get() map[string]string { @@ -79,6 +81,10 @@ func (r ClusterGetSettingsParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } @@ -92,6 +98,7 @@ type ClusterPutSettingsParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r ClusterPutSettingsParams) get() map[string]string { @@ -125,5 +132,9 @@ func (r ClusterPutSettingsParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_cluster-state-params.go b/opensearchapi/api_cluster-state-params.go index 0ec797439..12e63cc52 100644 --- a/opensearchapi/api_cluster-state-params.go +++ b/opensearchapi/api_cluster-state-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -46,6 +47,7 @@ type ClusterStateParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r ClusterStateParams) get() map[string]string { @@ -99,5 +101,9 @@ func (r ClusterStateParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_cluster-stats-params.go b/opensearchapi/api_cluster-stats-params.go index 630278753..ca5df51ab 100644 --- a/opensearchapi/api_cluster-stats-params.go +++ b/opensearchapi/api_cluster-stats-params.go @@ -27,6 +27,7 @@ package opensearchapi import ( + "strings" "time" ) @@ -37,6 +38,7 @@ type ClusterStatsParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r ClusterStatsParams) get() map[string]string { @@ -58,5 +60,9 @@ func (r ClusterStatsParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_cluster-voting_config_exclusions-params.go b/opensearchapi/api_cluster-voting_config_exclusions-params.go index ac178337a..66dd56cc2 100644 --- a/opensearchapi/api_cluster-voting_config_exclusions-params.go +++ b/opensearchapi/api_cluster-voting_config_exclusions-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -40,6 +41,7 @@ type ClusterPostVotingConfigExclusionsParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r ClusterPostVotingConfigExclusionsParams) get() map[string]string { @@ -69,6 +71,10 @@ func (r ClusterPostVotingConfigExclusionsParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } @@ -79,6 +85,7 @@ type ClusterDeleteVotingConfigExclusionsParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r ClusterDeleteVotingConfigExclusionsParams) get() map[string]string { @@ -100,5 +107,9 @@ func (r ClusterDeleteVotingConfigExclusionsParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_component_template-create-params.go b/opensearchapi/api_component_template-create-params.go index 8fa51ed9a..2d6aa0d73 100644 --- a/opensearchapi/api_component_template-create-params.go +++ b/opensearchapi/api_component_template-create-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -41,6 +42,7 @@ type ComponentTemplateCreateParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r ComponentTemplateCreateParams) get() map[string]string { @@ -74,5 +76,9 @@ func (r ComponentTemplateCreateParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_component_template-delete-params.go b/opensearchapi/api_component_template-delete-params.go index e150f64b9..b63318c06 100644 --- a/opensearchapi/api_component_template-delete-params.go +++ b/opensearchapi/api_component_template-delete-params.go @@ -27,6 +27,7 @@ package opensearchapi import ( + "strings" "time" ) @@ -39,6 +40,7 @@ type ComponentTemplateDeleteParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r ComponentTemplateDeleteParams) get() map[string]string { @@ -68,5 +70,9 @@ func (r ComponentTemplateDeleteParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_component_template-exists-params.go b/opensearchapi/api_component_template-exists-params.go index effeed6f3..4e77792af 100644 --- a/opensearchapi/api_component_template-exists-params.go +++ b/opensearchapi/api_component_template-exists-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -40,6 +41,7 @@ type ComponentTemplateExistsParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r ComponentTemplateExistsParams) get() map[string]string { @@ -69,5 +71,9 @@ func (r ComponentTemplateExistsParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_component_template-get-params.go b/opensearchapi/api_component_template-get-params.go index cb73cf36c..c9b207c09 100644 --- a/opensearchapi/api_component_template-get-params.go +++ b/opensearchapi/api_component_template-get-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -40,6 +41,7 @@ type ComponentTemplateGetParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r ComponentTemplateGetParams) get() map[string]string { @@ -69,5 +71,9 @@ func (r ComponentTemplateGetParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_dangling-delete-params.go b/opensearchapi/api_dangling-delete-params.go index 4d785bc66..d8413773f 100644 --- a/opensearchapi/api_dangling-delete-params.go +++ b/opensearchapi/api_dangling-delete-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -41,6 +42,7 @@ type DanglingDeleteParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r DanglingDeleteParams) get() map[string]string { @@ -74,5 +76,9 @@ func (r DanglingDeleteParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_dangling-get-params.go b/opensearchapi/api_dangling-get-params.go index b76f38292..8a47236bb 100644 --- a/opensearchapi/api_dangling-get-params.go +++ b/opensearchapi/api_dangling-get-params.go @@ -26,11 +26,14 @@ package opensearchapi +import "strings" + // DanglingGetParams represents possible parameters for the DanglingGetReq type DanglingGetParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r DanglingGetParams) get() map[string]string { @@ -48,5 +51,9 @@ func (r DanglingGetParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_dangling-import-params.go b/opensearchapi/api_dangling-import-params.go index fb4858b71..cd5302d50 100644 --- a/opensearchapi/api_dangling-import-params.go +++ b/opensearchapi/api_dangling-import-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -41,6 +42,7 @@ type DanglingImportParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r DanglingImportParams) get() map[string]string { @@ -74,5 +76,9 @@ func (r DanglingImportParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_datastream-create-params.go b/opensearchapi/api_datastream-create-params.go index 8e13bf85f..00aa97ad6 100644 --- a/opensearchapi/api_datastream-create-params.go +++ b/opensearchapi/api_datastream-create-params.go @@ -26,11 +26,14 @@ package opensearchapi +import "strings" + // DataStreamCreateParams represents possible parameters for the DataStreamCreateReq type DataStreamCreateParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r DataStreamCreateParams) get() map[string]string { @@ -48,5 +51,9 @@ func (r DataStreamCreateParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_datastream-delete-params.go b/opensearchapi/api_datastream-delete-params.go index d666a15cb..6aea4c00c 100644 --- a/opensearchapi/api_datastream-delete-params.go +++ b/opensearchapi/api_datastream-delete-params.go @@ -26,7 +26,10 @@ package opensearchapi -import "time" +import ( + "strings" + "time" +) // DataStreamDeleteParams represents possible parameters for the DataStreamDeleteReq type DataStreamDeleteParams struct { @@ -36,6 +39,7 @@ type DataStreamDeleteParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r DataStreamDeleteParams) get() map[string]string { @@ -61,5 +65,9 @@ func (r DataStreamDeleteParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_datastream-get-params.go b/opensearchapi/api_datastream-get-params.go index 3e4787869..8f1aaffe9 100644 --- a/opensearchapi/api_datastream-get-params.go +++ b/opensearchapi/api_datastream-get-params.go @@ -26,7 +26,10 @@ package opensearchapi -import "time" +import ( + "strings" + "time" +) // DataStreamGetParams represents possible parameters for the DataStreamGetReq type DataStreamGetParams struct { @@ -35,6 +38,7 @@ type DataStreamGetParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r DataStreamGetParams) get() map[string]string { @@ -56,5 +60,9 @@ func (r DataStreamGetParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_datastream-stats-params.go b/opensearchapi/api_datastream-stats-params.go index 55dc54033..fb43a0caa 100644 --- a/opensearchapi/api_datastream-stats-params.go +++ b/opensearchapi/api_datastream-stats-params.go @@ -26,7 +26,10 @@ package opensearchapi -import "time" +import ( + "strings" + "time" +) // DataStreamStatsParams represents possible parameters for the DataStreamCreateReq type DataStreamStatsParams struct { @@ -35,6 +38,7 @@ type DataStreamStatsParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r DataStreamStatsParams) get() map[string]string { @@ -56,5 +60,9 @@ func (r DataStreamStatsParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_document-create-params.go b/opensearchapi/api_document-create-params.go index 9c87e7354..a3370d8e9 100644 --- a/opensearchapi/api_document-create-params.go +++ b/opensearchapi/api_document-create-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -44,6 +45,7 @@ type DocumentCreateParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r DocumentCreateParams) get() map[string]string { @@ -89,5 +91,9 @@ func (r DocumentCreateParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_document-delete-params.go b/opensearchapi/api_document-delete-params.go index 69308d913..c1db1031c 100644 --- a/opensearchapi/api_document-delete-params.go +++ b/opensearchapi/api_document-delete-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -45,6 +46,7 @@ type DocumentDeleteParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r DocumentDeleteParams) get() map[string]string { @@ -94,5 +96,9 @@ func (r DocumentDeleteParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_document-delete_by_query-params.go b/opensearchapi/api_document-delete_by_query-params.go index b6b1a4f48..74c5a23f1 100644 --- a/opensearchapi/api_document-delete_by_query-params.go +++ b/opensearchapi/api_document-delete_by_query-params.go @@ -72,6 +72,7 @@ type DocumentDeleteByQueryParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r DocumentDeleteByQueryParams) get() map[string]string { @@ -230,5 +231,9 @@ func (r DocumentDeleteByQueryParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_document-delete_by_query_rethrottle-params.go b/opensearchapi/api_document-delete_by_query_rethrottle-params.go index af978ec58..13fb6bc2a 100644 --- a/opensearchapi/api_document-delete_by_query_rethrottle-params.go +++ b/opensearchapi/api_document-delete_by_query_rethrottle-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" ) // DocumentDeleteByQueryRethrottleParams represents possible parameters for the DocumentDeleteByQueryRethrottleReq @@ -37,6 +38,7 @@ type DocumentDeleteByQueryRethrottleParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r DocumentDeleteByQueryRethrottleParams) get() map[string]string { @@ -58,5 +60,9 @@ func (r DocumentDeleteByQueryRethrottleParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_document-exists-params.go b/opensearchapi/api_document-exists-params.go index 0ff9011c2..b6ce6b091 100644 --- a/opensearchapi/api_document-exists-params.go +++ b/opensearchapi/api_document-exists-params.go @@ -47,6 +47,7 @@ type DocumentExistsParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r DocumentExistsParams) get() map[string]string { @@ -113,5 +114,9 @@ func (r DocumentExistsParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_document-exists_source-params.go b/opensearchapi/api_document-exists_source-params.go index 965c200f5..342450765 100644 --- a/opensearchapi/api_document-exists_source-params.go +++ b/opensearchapi/api_document-exists_source-params.go @@ -46,6 +46,7 @@ type DocumentExistsSourceParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r DocumentExistsSourceParams) get() map[string]string { @@ -108,5 +109,9 @@ func (r DocumentExistsSourceParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_document-explain-params.go b/opensearchapi/api_document-explain-params.go index 0dafc9c47..2578b4c61 100644 --- a/opensearchapi/api_document-explain-params.go +++ b/opensearchapi/api_document-explain-params.go @@ -49,6 +49,7 @@ type DocumentExplainParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r DocumentExplainParams) get() map[string]string { @@ -123,5 +124,9 @@ func (r DocumentExplainParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_document-get-params.go b/opensearchapi/api_document-get-params.go index 7406c5bc8..5366a6b85 100644 --- a/opensearchapi/api_document-get-params.go +++ b/opensearchapi/api_document-get-params.go @@ -47,6 +47,7 @@ type DocumentGetParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r DocumentGetParams) get() map[string]string { @@ -113,5 +114,9 @@ func (r DocumentGetParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_document-source-params.go b/opensearchapi/api_document-source-params.go index 566d5b098..ef1258c78 100644 --- a/opensearchapi/api_document-source-params.go +++ b/opensearchapi/api_document-source-params.go @@ -47,6 +47,7 @@ type DocumentSourceParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r DocumentSourceParams) get() map[string]string { @@ -109,5 +110,9 @@ func (r DocumentSourceParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_index-params.go b/opensearchapi/api_index-params.go index 97fb6313d..39ad2032a 100644 --- a/opensearchapi/api_index-params.go +++ b/opensearchapi/api_index-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -48,6 +49,7 @@ type IndexParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IndexParams) get() map[string]string { @@ -109,5 +111,9 @@ func (r IndexParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_index_template-create-params.go b/opensearchapi/api_index_template-create-params.go index 9eb9f4c99..0253cc746 100644 --- a/opensearchapi/api_index_template-create-params.go +++ b/opensearchapi/api_index_template-create-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -41,6 +42,7 @@ type IndexTemplateCreateParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IndexTemplateCreateParams) get() map[string]string { @@ -74,5 +76,9 @@ func (r IndexTemplateCreateParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_index_template-delete-params.go b/opensearchapi/api_index_template-delete-params.go index d337ed6fa..3a86b8e26 100644 --- a/opensearchapi/api_index_template-delete-params.go +++ b/opensearchapi/api_index_template-delete-params.go @@ -27,6 +27,7 @@ package opensearchapi import ( + "strings" "time" ) @@ -39,6 +40,7 @@ type IndexTemplateDeleteParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IndexTemplateDeleteParams) get() map[string]string { @@ -68,5 +70,9 @@ func (r IndexTemplateDeleteParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_index_template-exists-params.go b/opensearchapi/api_index_template-exists-params.go index 95a3c7179..2d995950f 100644 --- a/opensearchapi/api_index_template-exists-params.go +++ b/opensearchapi/api_index_template-exists-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -41,6 +42,7 @@ type IndexTemplateExistsParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IndexTemplateExistsParams) get() map[string]string { @@ -74,5 +76,9 @@ func (r IndexTemplateExistsParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_index_template-get-params.go b/opensearchapi/api_index_template-get-params.go index bea907b77..39fae1766 100644 --- a/opensearchapi/api_index_template-get-params.go +++ b/opensearchapi/api_index_template-get-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -41,6 +42,7 @@ type IndexTemplateGetParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IndexTemplateGetParams) get() map[string]string { @@ -74,5 +76,9 @@ func (r IndexTemplateGetParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_index_template-simulate-params.go b/opensearchapi/api_index_template-simulate-params.go index 488c78ccb..7a5fa3030 100644 --- a/opensearchapi/api_index_template-simulate-params.go +++ b/opensearchapi/api_index_template-simulate-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -41,6 +42,7 @@ type IndexTemplateSimulateParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IndexTemplateSimulateParams) get() map[string]string { @@ -74,5 +76,9 @@ func (r IndexTemplateSimulateParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_index_template-simulate_index-params.go b/opensearchapi/api_index_template-simulate_index-params.go index c437a908e..8395d2458 100644 --- a/opensearchapi/api_index_template-simulate_index-params.go +++ b/opensearchapi/api_index_template-simulate_index-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -41,6 +42,7 @@ type IndexTemplateSimulateIndexParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IndexTemplateSimulateIndexParams) get() map[string]string { @@ -74,5 +76,9 @@ func (r IndexTemplateSimulateIndexParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_indices-alias-params.go b/opensearchapi/api_indices-alias-params.go index eafa53938..33c96adb0 100644 --- a/opensearchapi/api_indices-alias-params.go +++ b/opensearchapi/api_indices-alias-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -40,6 +41,7 @@ type AliasDeleteParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r AliasDeleteParams) get() map[string]string { @@ -69,6 +71,10 @@ func (r AliasDeleteParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } @@ -82,6 +88,7 @@ type AliasGetParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r AliasGetParams) get() map[string]string { @@ -115,6 +122,10 @@ func (r AliasGetParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } @@ -127,6 +138,7 @@ type AliasPutParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r AliasPutParams) get() map[string]string { @@ -156,6 +168,10 @@ func (r AliasPutParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } @@ -169,6 +185,7 @@ type AliasExistsParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r AliasExistsParams) get() map[string]string { @@ -202,5 +219,9 @@ func (r AliasExistsParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_indices-analyze-params.go b/opensearchapi/api_indices-analyze-params.go index f1052ba01..2d32a23ff 100644 --- a/opensearchapi/api_indices-analyze-params.go +++ b/opensearchapi/api_indices-analyze-params.go @@ -26,11 +26,14 @@ package opensearchapi +import "strings" + // IndicesAnalyzeParams represents possible parameters for the IndicesAnalyzeReq type IndicesAnalyzeParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IndicesAnalyzeParams) get() map[string]string { @@ -48,5 +51,9 @@ func (r IndicesAnalyzeParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_indices-block-params.go b/opensearchapi/api_indices-block-params.go index c1577e887..f951b8367 100644 --- a/opensearchapi/api_indices-block-params.go +++ b/opensearchapi/api_indices-block-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -43,6 +44,7 @@ type IndicesBlockParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IndicesBlockParams) get() map[string]string { @@ -84,5 +86,9 @@ func (r IndicesBlockParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_indices-cache-params.go b/opensearchapi/api_indices-cache-params.go index 5a9821148..f054bad67 100644 --- a/opensearchapi/api_indices-cache-params.go +++ b/opensearchapi/api_indices-cache-params.go @@ -44,6 +44,7 @@ type IndicesClearCacheParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IndicesClearCacheParams) get() map[string]string { @@ -89,5 +90,9 @@ func (r IndicesClearCacheParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_indices-clone-params.go b/opensearchapi/api_indices-clone-params.go index 414ca22c0..d9d9fe377 100644 --- a/opensearchapi/api_indices-clone-params.go +++ b/opensearchapi/api_indices-clone-params.go @@ -27,6 +27,7 @@ package opensearchapi import ( + "strings" "time" ) @@ -40,6 +41,7 @@ type IndicesCloneParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IndicesCloneParams) get() map[string]string { @@ -69,5 +71,9 @@ func (r IndicesCloneParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_indices-close-params.go b/opensearchapi/api_indices-close-params.go index 2eb19e7d6..cf4ce4268 100644 --- a/opensearchapi/api_indices-close-params.go +++ b/opensearchapi/api_indices-close-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -44,6 +45,7 @@ type IndicesCloseParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IndicesCloseParams) get() map[string]string { @@ -89,5 +91,9 @@ func (r IndicesCloseParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_indices-count-params.go b/opensearchapi/api_indices-count-params.go index 204c16eeb..22945c61a 100644 --- a/opensearchapi/api_indices-count-params.go +++ b/opensearchapi/api_indices-count-params.go @@ -51,6 +51,7 @@ type IndicesCountParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IndicesCountParams) get() map[string]string { @@ -124,5 +125,9 @@ func (r IndicesCountParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_indices-create-params.go b/opensearchapi/api_indices-create-params.go index c21781a5d..52abd6af6 100644 --- a/opensearchapi/api_indices-create-params.go +++ b/opensearchapi/api_indices-create-params.go @@ -27,6 +27,7 @@ package opensearchapi import ( + "strings" "time" ) @@ -40,6 +41,7 @@ type IndicesCreateParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IndicesCreateParams) get() map[string]string { @@ -72,5 +74,9 @@ func (r IndicesCreateParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_indices-delete-params.go b/opensearchapi/api_indices-delete-params.go index d862ba791..a63fdfd5c 100644 --- a/opensearchapi/api_indices-delete-params.go +++ b/opensearchapi/api_indices-delete-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -43,6 +44,7 @@ type IndicesDeleteParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IndicesDeleteParams) get() map[string]string { @@ -83,5 +85,9 @@ func (r IndicesDeleteParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_indices-exists-params.go b/opensearchapi/api_indices-exists-params.go index 9a56e5017..424d5f41a 100644 --- a/opensearchapi/api_indices-exists-params.go +++ b/opensearchapi/api_indices-exists-params.go @@ -26,7 +26,10 @@ package opensearchapi -import "strconv" +import ( + "strconv" + "strings" +) // IndicesExistsParams represents possible parameters for the IndicesExistsReq type IndicesExistsParams struct { @@ -40,6 +43,7 @@ type IndicesExistsParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IndicesExistsParams) get() map[string]string { @@ -81,5 +85,9 @@ func (r IndicesExistsParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_indices-field_caps-params.go b/opensearchapi/api_indices-field_caps-params.go index cb0d5e26b..46bd291c7 100644 --- a/opensearchapi/api_indices-field_caps-params.go +++ b/opensearchapi/api_indices-field_caps-params.go @@ -42,6 +42,7 @@ type IndicesFieldCapsParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IndicesFieldCapsParams) get() map[string]string { @@ -79,5 +80,9 @@ func (r IndicesFieldCapsParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_indices-flush-params.go b/opensearchapi/api_indices-flush-params.go index 7e70370d2..ab660d50a 100644 --- a/opensearchapi/api_indices-flush-params.go +++ b/opensearchapi/api_indices-flush-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" ) // IndicesFlushParams represents possible parameters for the IndicesFlushReq @@ -41,6 +42,7 @@ type IndicesFlushParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IndicesFlushParams) get() map[string]string { @@ -78,5 +80,9 @@ func (r IndicesFlushParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_indices-forcemerge-params.go b/opensearchapi/api_indices-forcemerge-params.go index 4602fed6b..9870bf804 100644 --- a/opensearchapi/api_indices-forcemerge-params.go +++ b/opensearchapi/api_indices-forcemerge-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" ) // IndicesForcemergeParams represents possible parameters for the IndicesForcemergeReq @@ -42,6 +43,7 @@ type IndicesForcemergeParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IndicesForcemergeParams) get() map[string]string { @@ -83,5 +85,9 @@ func (r IndicesForcemergeParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_indices-get-params.go b/opensearchapi/api_indices-get-params.go index 0046c6a33..7be10ee1d 100644 --- a/opensearchapi/api_indices-get-params.go +++ b/opensearchapi/api_indices-get-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -45,6 +46,7 @@ type IndicesGetParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IndicesGetParams) get() map[string]string { @@ -94,5 +96,9 @@ func (r IndicesGetParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_indices-mapping-params.go b/opensearchapi/api_indices-mapping-params.go index 87467dc6a..1aaa66b6d 100644 --- a/opensearchapi/api_indices-mapping-params.go +++ b/opensearchapi/api_indices-mapping-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -43,6 +44,7 @@ type MappingGetParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r MappingGetParams) get() map[string]string { @@ -84,6 +86,10 @@ func (r MappingGetParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } @@ -100,6 +106,7 @@ type MappingPutParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r MappingPutParams) get() map[string]string { @@ -145,5 +152,9 @@ func (r MappingPutParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_indices-open-params.go b/opensearchapi/api_indices-open-params.go index 4f5105755..9e43944fd 100644 --- a/opensearchapi/api_indices-open-params.go +++ b/opensearchapi/api_indices-open-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -44,6 +45,7 @@ type IndicesOpenParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IndicesOpenParams) get() map[string]string { @@ -89,5 +91,9 @@ func (r IndicesOpenParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_indices-recovery-params.go b/opensearchapi/api_indices-recovery-params.go index d7e4b7f78..83426b1cd 100644 --- a/opensearchapi/api_indices-recovery-params.go +++ b/opensearchapi/api_indices-recovery-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" ) // IndicesRecoveryParams represents possible parameters for the IndicesShrinkReq @@ -38,6 +39,7 @@ type IndicesRecoveryParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IndicesRecoveryParams) get() map[string]string { @@ -63,5 +65,9 @@ func (r IndicesRecoveryParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_indices-refresh-params.go b/opensearchapi/api_indices-refresh-params.go index 7cc9604f5..3b72da93b 100644 --- a/opensearchapi/api_indices-refresh-params.go +++ b/opensearchapi/api_indices-refresh-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" ) // IndicesRefreshParams represents possible parameters for the IndicesRefreshReq @@ -39,6 +40,7 @@ type IndicesRefreshParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IndicesRefreshParams) get() map[string]string { @@ -68,5 +70,9 @@ func (r IndicesRefreshParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_indices-resolve-params.go b/opensearchapi/api_indices-resolve-params.go index 2b19b2b25..4e4b46e65 100644 --- a/opensearchapi/api_indices-resolve-params.go +++ b/opensearchapi/api_indices-resolve-params.go @@ -26,6 +26,8 @@ package opensearchapi +import "strings" + // IndicesResolveParams represents possible parameters for the IndicesResolveReq type IndicesResolveParams struct { ExpandWildcards string @@ -33,6 +35,7 @@ type IndicesResolveParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IndicesResolveParams) get() map[string]string { @@ -54,5 +57,9 @@ func (r IndicesResolveParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_indices-rollover-params.go b/opensearchapi/api_indices-rollover-params.go index a3fef775b..10476f0d6 100644 --- a/opensearchapi/api_indices-rollover-params.go +++ b/opensearchapi/api_indices-rollover-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -42,6 +43,7 @@ type IndicesRolloverParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IndicesRolloverParams) get() map[string]string { @@ -79,5 +81,9 @@ func (r IndicesRolloverParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_indices-segments-params.go b/opensearchapi/api_indices-segments-params.go index d726ec524..dda0a7222 100644 --- a/opensearchapi/api_indices-segments-params.go +++ b/opensearchapi/api_indices-segments-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" ) // IndicesSegmentsParams represents possible parameters for the IndicesSegmentsReq @@ -40,6 +41,7 @@ type IndicesSegmentsParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IndicesSegmentsParams) get() map[string]string { @@ -73,5 +75,9 @@ func (r IndicesSegmentsParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_indices-settings-params.go b/opensearchapi/api_indices-settings-params.go index e7537ab81..f22fc67bd 100644 --- a/opensearchapi/api_indices-settings-params.go +++ b/opensearchapi/api_indices-settings-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -45,6 +46,7 @@ type SettingsGetParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r SettingsGetParams) get() map[string]string { @@ -94,6 +96,10 @@ func (r SettingsGetParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } @@ -111,6 +117,7 @@ type SettingsPutParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r SettingsPutParams) get() map[string]string { @@ -160,5 +167,9 @@ func (r SettingsPutParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_indices-shardstores-params.go b/opensearchapi/api_indices-shardstores-params.go index 24085c4b6..b9c4c7c1d 100644 --- a/opensearchapi/api_indices-shardstores-params.go +++ b/opensearchapi/api_indices-shardstores-params.go @@ -41,6 +41,7 @@ type IndicesShardStoresParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IndicesShardStoresParams) get() map[string]string { @@ -74,5 +75,9 @@ func (r IndicesShardStoresParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_indices-shrink-params.go b/opensearchapi/api_indices-shrink-params.go index 3d889eb34..08579b5b5 100644 --- a/opensearchapi/api_indices-shrink-params.go +++ b/opensearchapi/api_indices-shrink-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -42,6 +43,7 @@ type IndicesShrinkParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IndicesShrinkParams) get() map[string]string { @@ -79,5 +81,9 @@ func (r IndicesShrinkParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_indices-split-params.go b/opensearchapi/api_indices-split-params.go index 579d582d4..b0a8bd008 100644 --- a/opensearchapi/api_indices-split-params.go +++ b/opensearchapi/api_indices-split-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -42,6 +43,7 @@ type IndicesSplitParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IndicesSplitParams) get() map[string]string { @@ -79,5 +81,9 @@ func (r IndicesSplitParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_indices-stats-params.go b/opensearchapi/api_indices-stats-params.go index e48f37ed3..a883622f2 100644 --- a/opensearchapi/api_indices-stats-params.go +++ b/opensearchapi/api_indices-stats-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -42,6 +43,7 @@ type IndicesStatsParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IndicesStatsParams) get() map[string]string { @@ -79,5 +81,9 @@ func (r IndicesStatsParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_indices-validate-params.go b/opensearchapi/api_indices-validate-params.go index 45115867a..837db3247 100644 --- a/opensearchapi/api_indices-validate-params.go +++ b/opensearchapi/api_indices-validate-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" ) // IndicesValidateQueryParams represents possible parameters for the IndicesValidateQueryReq @@ -48,6 +49,7 @@ type IndicesValidateQueryParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IndicesValidateQueryParams) get() map[string]string { @@ -113,5 +115,9 @@ func (r IndicesValidateQueryParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_info-params.go b/opensearchapi/api_info-params.go index 33f4efb50..d9e4c2483 100644 --- a/opensearchapi/api_info-params.go +++ b/opensearchapi/api_info-params.go @@ -26,11 +26,14 @@ package opensearchapi +import "strings" + // InfoParams represents possible parameters for the InfoReq type InfoParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r InfoParams) get() map[string]string { @@ -48,5 +51,9 @@ func (r InfoParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_ingest-create-params.go b/opensearchapi/api_ingest-create-params.go index 88ebc03ed..98cd30803 100644 --- a/opensearchapi/api_ingest-create-params.go +++ b/opensearchapi/api_ingest-create-params.go @@ -26,7 +26,10 @@ package opensearchapi -import "time" +import ( + "strings" + "time" +) // IngestCreateParams represents possible parameters for the IngestCreateReq type IngestCreateParams struct { @@ -37,6 +40,7 @@ type IngestCreateParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IngestCreateParams) get() map[string]string { @@ -66,5 +70,9 @@ func (r IngestCreateParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_ingest-delete-params.go b/opensearchapi/api_ingest-delete-params.go index d9144629e..777c6ae08 100644 --- a/opensearchapi/api_ingest-delete-params.go +++ b/opensearchapi/api_ingest-delete-params.go @@ -26,7 +26,10 @@ package opensearchapi -import "time" +import ( + "strings" + "time" +) // IngestDeleteParams represents possible parameters for the IngestDeleteReq type IngestDeleteParams struct { @@ -37,6 +40,7 @@ type IngestDeleteParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IngestDeleteParams) get() map[string]string { @@ -66,5 +70,9 @@ func (r IngestDeleteParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_ingest-get-params.go b/opensearchapi/api_ingest-get-params.go index afe8f1c86..b61345bf0 100644 --- a/opensearchapi/api_ingest-get-params.go +++ b/opensearchapi/api_ingest-get-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -40,6 +41,7 @@ type IngestGetParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IngestGetParams) get() map[string]string { @@ -69,5 +71,9 @@ func (r IngestGetParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_ingest-grok-params.go b/opensearchapi/api_ingest-grok-params.go index b75987c77..d67d9239e 100644 --- a/opensearchapi/api_ingest-grok-params.go +++ b/opensearchapi/api_ingest-grok-params.go @@ -26,11 +26,14 @@ package opensearchapi +import "strings" + // IngestGrokParams represents possible parameters for the IngestGrokReq type IngestGrokParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IngestGrokParams) get() map[string]string { @@ -48,5 +51,9 @@ func (r IngestGrokParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_ingest-simulate-params.go b/opensearchapi/api_ingest-simulate-params.go index 47e36e324..906762d0a 100644 --- a/opensearchapi/api_ingest-simulate-params.go +++ b/opensearchapi/api_ingest-simulate-params.go @@ -26,7 +26,10 @@ package opensearchapi -import "strconv" +import ( + "strconv" + "strings" +) // IngestSimulateParams represents possible parameters for the IngestSimulateReq type IngestSimulateParams struct { @@ -35,6 +38,7 @@ type IngestSimulateParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r IngestSimulateParams) get() map[string]string { @@ -56,5 +60,9 @@ func (r IngestSimulateParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_mget-params.go b/opensearchapi/api_mget-params.go index f047e18f9..eeda2e865 100644 --- a/opensearchapi/api_mget-params.go +++ b/opensearchapi/api_mget-params.go @@ -45,6 +45,7 @@ type MGetParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r MGetParams) get() map[string]string { @@ -103,5 +104,9 @@ func (r MGetParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_msearch-params.go b/opensearchapi/api_msearch-params.go index 46741e1c2..5e7efc83a 100644 --- a/opensearchapi/api_msearch-params.go +++ b/opensearchapi/api_msearch-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" ) // MSearchParams represents possible parameters for the MSearchReq @@ -43,6 +44,7 @@ type MSearchParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r MSearchParams) get() map[string]string { @@ -88,5 +90,9 @@ func (r MSearchParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_msearch-template-params.go b/opensearchapi/api_msearch-template-params.go index 845db9d2f..ac6739f57 100644 --- a/opensearchapi/api_msearch-template-params.go +++ b/opensearchapi/api_msearch-template-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" ) // MSearchTemplateParams represents possible parameters for the MSearchTemplateReq @@ -41,6 +42,7 @@ type MSearchTemplateParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r MSearchTemplateParams) get() map[string]string { @@ -78,5 +80,9 @@ func (r MSearchTemplateParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_mtermvectors-params.go b/opensearchapi/api_mtermvectors-params.go index cfa2644aa..706e28e46 100644 --- a/opensearchapi/api_mtermvectors-params.go +++ b/opensearchapi/api_mtermvectors-params.go @@ -49,6 +49,7 @@ type MTermvectorsParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r MTermvectorsParams) get() map[string]string { @@ -114,5 +115,9 @@ func (r MTermvectorsParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_nodes-hot_threads-params.go b/opensearchapi/api_nodes-hot_threads-params.go index 8e2ae4cc9..665518274 100644 --- a/opensearchapi/api_nodes-hot_threads-params.go +++ b/opensearchapi/api_nodes-hot_threads-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -42,6 +43,7 @@ type NodesHotThreadsParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r NodesHotThreadsParams) get() map[string]string { @@ -79,5 +81,9 @@ func (r NodesHotThreadsParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_nodes-info-params.go b/opensearchapi/api_nodes-info-params.go index 73feb40a1..1ec212988 100644 --- a/opensearchapi/api_nodes-info-params.go +++ b/opensearchapi/api_nodes-info-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -39,6 +40,7 @@ type NodesInfoParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r NodesInfoParams) get() map[string]string { @@ -64,5 +66,9 @@ func (r NodesInfoParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_nodes-reload_security-params.go b/opensearchapi/api_nodes-reload_security-params.go index b1fb04051..ed42e317b 100644 --- a/opensearchapi/api_nodes-reload_security-params.go +++ b/opensearchapi/api_nodes-reload_security-params.go @@ -27,6 +27,7 @@ package opensearchapi import ( + "strings" "time" ) @@ -37,6 +38,7 @@ type NodesReloadSecurityParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r NodesReloadSecurityParams) get() map[string]string { @@ -58,5 +60,9 @@ func (r NodesReloadSecurityParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_nodes-stats-params.go b/opensearchapi/api_nodes-stats-params.go index b9f592bfb..775ad5ede 100644 --- a/opensearchapi/api_nodes-stats-params.go +++ b/opensearchapi/api_nodes-stats-params.go @@ -47,6 +47,7 @@ type NodesStatsParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r NodesStatsParams) get() map[string]string { @@ -100,5 +101,9 @@ func (r NodesStatsParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_nodes-usage-params.go b/opensearchapi/api_nodes-usage-params.go index a1e2fd4f1..956477f04 100644 --- a/opensearchapi/api_nodes-usage-params.go +++ b/opensearchapi/api_nodes-usage-params.go @@ -27,6 +27,7 @@ package opensearchapi import ( + "strings" "time" ) @@ -37,6 +38,7 @@ type NodesUsageParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r NodesUsageParams) get() map[string]string { @@ -58,5 +60,9 @@ func (r NodesUsageParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_ping-params.go b/opensearchapi/api_ping-params.go index fd0e44f45..aac23a980 100644 --- a/opensearchapi/api_ping-params.go +++ b/opensearchapi/api_ping-params.go @@ -26,11 +26,14 @@ package opensearchapi +import "strings" + // PingParams represents possible parameters for the PingReq type PingParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r PingParams) get() map[string]string { @@ -48,5 +51,9 @@ func (r PingParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_point_in_time-create-params.go b/opensearchapi/api_point_in_time-create-params.go index 2fc653fcd..58d85d131 100644 --- a/opensearchapi/api_point_in_time-create-params.go +++ b/opensearchapi/api_point_in_time-create-params.go @@ -7,6 +7,7 @@ package opensearchapi import ( + "strings" "time" ) @@ -21,6 +22,7 @@ type PointInTimeCreateParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r PointInTimeCreateParams) get() map[string]string { @@ -58,5 +60,9 @@ func (r PointInTimeCreateParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_point_in_time-delete-params.go b/opensearchapi/api_point_in_time-delete-params.go index 2e7680a0c..d8a589235 100644 --- a/opensearchapi/api_point_in_time-delete-params.go +++ b/opensearchapi/api_point_in_time-delete-params.go @@ -6,11 +6,14 @@ package opensearchapi +import "strings" + // PointInTimeDeleteParams represents possible parameters for the PointInTimeDeleteReq type PointInTimeDeleteParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r PointInTimeDeleteParams) get() map[string]string { @@ -28,5 +31,9 @@ func (r PointInTimeDeleteParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_point_in_time-get-params.go b/opensearchapi/api_point_in_time-get-params.go index 4b4bfa3f8..c7cba9edd 100644 --- a/opensearchapi/api_point_in_time-get-params.go +++ b/opensearchapi/api_point_in_time-get-params.go @@ -6,11 +6,14 @@ package opensearchapi +import "strings" + // PointInTimeGetParams represents possible parameters for the PointInTimeGetReq type PointInTimeGetParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r PointInTimeGetParams) get() map[string]string { @@ -28,5 +31,9 @@ func (r PointInTimeGetParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_rank_eval-params.go b/opensearchapi/api_rank_eval-params.go index 5741b01f5..06fb978aa 100644 --- a/opensearchapi/api_rank_eval-params.go +++ b/opensearchapi/api_rank_eval-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" ) // RankEvalParams represents possible parameters for the RankEvalReq @@ -40,6 +41,7 @@ type RankEvalParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r RankEvalParams) get() map[string]string { @@ -73,5 +75,9 @@ func (r RankEvalParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_reindex-params.go b/opensearchapi/api_reindex-params.go index 177392d36..9a1c61972 100644 --- a/opensearchapi/api_reindex-params.go +++ b/opensearchapi/api_reindex-params.go @@ -29,6 +29,7 @@ package opensearchapi import ( "fmt" "strconv" + "strings" "time" ) @@ -46,6 +47,7 @@ type ReindexParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r ReindexParams) get() map[string]string { @@ -95,5 +97,9 @@ func (r ReindexParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_reindex_rethrottle-params.go b/opensearchapi/api_reindex_rethrottle-params.go index 9f85e171c..a77dc2b1c 100644 --- a/opensearchapi/api_reindex_rethrottle-params.go +++ b/opensearchapi/api_reindex_rethrottle-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" ) // ReindexRethrottleParams represents possible parameters for the ReindexRethrottleReq @@ -37,6 +38,7 @@ type ReindexRethrottleParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r ReindexRethrottleParams) get() map[string]string { @@ -58,5 +60,9 @@ func (r ReindexRethrottleParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_render_search_template-params.go b/opensearchapi/api_render_search_template-params.go index b979ba5d1..96ec116d6 100644 --- a/opensearchapi/api_render_search_template-params.go +++ b/opensearchapi/api_render_search_template-params.go @@ -26,11 +26,14 @@ package opensearchapi +import "strings" + // RenderSearchTemplateParams represents possible parameters for the RenderSearchTemplateReq type RenderSearchTemplateParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r RenderSearchTemplateParams) get() map[string]string { @@ -48,5 +51,9 @@ func (r RenderSearchTemplateParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_script-context-params.go b/opensearchapi/api_script-context-params.go index acaf417be..63f795664 100644 --- a/opensearchapi/api_script-context-params.go +++ b/opensearchapi/api_script-context-params.go @@ -26,11 +26,14 @@ package opensearchapi +import "strings" + // ScriptContextParams represents possible parameters for the ScriptContextReq type ScriptContextParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r ScriptContextParams) get() map[string]string { @@ -48,5 +51,9 @@ func (r ScriptContextParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_script-delete-params.go b/opensearchapi/api_script-delete-params.go index b456780fb..5e1e15e44 100644 --- a/opensearchapi/api_script-delete-params.go +++ b/opensearchapi/api_script-delete-params.go @@ -27,6 +27,7 @@ package opensearchapi import ( + "strings" "time" ) @@ -39,6 +40,7 @@ type ScriptDeleteParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r ScriptDeleteParams) get() map[string]string { @@ -68,5 +70,9 @@ func (r ScriptDeleteParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_script-get-params.go b/opensearchapi/api_script-get-params.go index 1ec6ac2d0..996041f8d 100644 --- a/opensearchapi/api_script-get-params.go +++ b/opensearchapi/api_script-get-params.go @@ -27,6 +27,7 @@ package opensearchapi import ( + "strings" "time" ) @@ -38,6 +39,7 @@ type ScriptGetParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r ScriptGetParams) get() map[string]string { @@ -63,5 +65,9 @@ func (r ScriptGetParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_script-language-params.go b/opensearchapi/api_script-language-params.go index 544a78fe6..6a5a729b0 100644 --- a/opensearchapi/api_script-language-params.go +++ b/opensearchapi/api_script-language-params.go @@ -26,11 +26,14 @@ package opensearchapi +import "strings" + // ScriptLanguageParams represents possible parameters for the ScriptLanguageReq type ScriptLanguageParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r ScriptLanguageParams) get() map[string]string { @@ -48,5 +51,9 @@ func (r ScriptLanguageParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_script-painless_execute-params.go b/opensearchapi/api_script-painless_execute-params.go index 44c2c7b51..f5bd64740 100644 --- a/opensearchapi/api_script-painless_execute-params.go +++ b/opensearchapi/api_script-painless_execute-params.go @@ -26,11 +26,14 @@ package opensearchapi +import "strings" + // ScriptPainlessExecuteParams represents possible parameters for the ScriptPainlessExecuteReq type ScriptPainlessExecuteParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r ScriptPainlessExecuteParams) get() map[string]string { @@ -48,5 +51,9 @@ func (r ScriptPainlessExecuteParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_script-put-params.go b/opensearchapi/api_script-put-params.go index abebbaefc..ad196f000 100644 --- a/opensearchapi/api_script-put-params.go +++ b/opensearchapi/api_script-put-params.go @@ -27,6 +27,7 @@ package opensearchapi import ( + "strings" "time" ) @@ -39,6 +40,7 @@ type ScriptPutParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r ScriptPutParams) get() map[string]string { @@ -68,5 +70,9 @@ func (r ScriptPutParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_scroll-delete-params.go b/opensearchapi/api_scroll-delete-params.go index 573d39d95..fc02c456c 100644 --- a/opensearchapi/api_scroll-delete-params.go +++ b/opensearchapi/api_scroll-delete-params.go @@ -26,11 +26,14 @@ package opensearchapi +import "strings" + // ScrollDeleteParams represents possible parameters for the ScrollDeleteReq type ScrollDeleteParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r ScrollDeleteParams) get() map[string]string { @@ -48,5 +51,9 @@ func (r ScrollDeleteParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_scroll-get-params.go b/opensearchapi/api_scroll-get-params.go index 003b44922..345dfb4bb 100644 --- a/opensearchapi/api_scroll-get-params.go +++ b/opensearchapi/api_scroll-get-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -40,6 +41,7 @@ type ScrollGetParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r ScrollGetParams) get() map[string]string { @@ -69,5 +71,9 @@ func (r ScrollGetParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_search-params.go b/opensearchapi/api_search-params.go index b1e2b6339..a87434ec2 100644 --- a/opensearchapi/api_search-params.go +++ b/opensearchapi/api_search-params.go @@ -83,6 +83,7 @@ type SearchParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r SearchParams) get() map[string]string { @@ -285,5 +286,9 @@ func (r SearchParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_search-params_test.go b/opensearchapi/api_search-params_test.go index 33b616de0..e5452fbe5 100644 --- a/opensearchapi/api_search-params_test.go +++ b/opensearchapi/api_search-params_test.go @@ -68,6 +68,7 @@ func TestSearchParams_get(t *testing.T) { Pretty bool Human bool ErrorTrace bool + FilterPath []string } tests := []struct { name string @@ -94,6 +95,7 @@ func TestSearchParams_get(t *testing.T) { ErrorTrace: false, ExpandWildcards: "open,hidden", Explain: ToPointer(true), + FilterPath: []string{"field1", "field2"}, From: ToPointer(30), Human: false, IgnoreThrottled: ToPointer(true), @@ -145,6 +147,7 @@ func TestSearchParams_get(t *testing.T) { "docvalue_fields": "title,date", "expand_wildcards": "open,hidden", "explain": "true", + "filter_path": "field1,field2", "from": "30", "ignore_throttled": "true", "ignore_unavailable": "true", @@ -192,6 +195,7 @@ func TestSearchParams_get(t *testing.T) { DocvalueFields: tt.fields.DocvalueFields, ExpandWildcards: tt.fields.ExpandWildcards, Explain: tt.fields.Explain, + FilterPath: tt.fields.FilterPath, From: tt.fields.From, IgnoreThrottled: tt.fields.IgnoreThrottled, IgnoreUnavailable: tt.fields.IgnoreUnavailable, diff --git a/opensearchapi/api_search-template-params.go b/opensearchapi/api_search-template-params.go index 6e28be0c8..f53cd23f6 100644 --- a/opensearchapi/api_search-template-params.go +++ b/opensearchapi/api_search-template-params.go @@ -51,6 +51,7 @@ type SearchTemplateParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r SearchTemplateParams) get() map[string]string { @@ -120,5 +121,9 @@ func (r SearchTemplateParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_search_shards-params.go b/opensearchapi/api_search_shards-params.go index c63ecadac..3935c7758 100644 --- a/opensearchapi/api_search_shards-params.go +++ b/opensearchapi/api_search_shards-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" ) // SearchShardsParams represents possible parameters for the SearchShardsReq @@ -42,6 +43,7 @@ type SearchShardsParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r SearchShardsParams) get() map[string]string { @@ -83,5 +85,9 @@ func (r SearchShardsParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_snapshot-clone-params.go b/opensearchapi/api_snapshot-clone-params.go index 3e67f9bb2..adf885026 100644 --- a/opensearchapi/api_snapshot-clone-params.go +++ b/opensearchapi/api_snapshot-clone-params.go @@ -27,6 +27,7 @@ package opensearchapi import ( + "strings" "time" ) @@ -38,6 +39,7 @@ type SnapshotCloneParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r SnapshotCloneParams) get() map[string]string { @@ -62,5 +64,9 @@ func (r SnapshotCloneParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_snapshot-create-params.go b/opensearchapi/api_snapshot-create-params.go index 9ae6386c0..d42f6decd 100644 --- a/opensearchapi/api_snapshot-create-params.go +++ b/opensearchapi/api_snapshot-create-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -40,6 +41,7 @@ type SnapshotCreateParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r SnapshotCreateParams) get() map[string]string { @@ -68,5 +70,9 @@ func (r SnapshotCreateParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_snapshot-delete-params.go b/opensearchapi/api_snapshot-delete-params.go index 93fdecebb..e27c64bd3 100644 --- a/opensearchapi/api_snapshot-delete-params.go +++ b/opensearchapi/api_snapshot-delete-params.go @@ -27,6 +27,7 @@ package opensearchapi import ( + "strings" "time" ) @@ -38,6 +39,7 @@ type SnapshotDeleteParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r SnapshotDeleteParams) get() map[string]string { @@ -63,5 +65,9 @@ func (r SnapshotDeleteParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_snapshot-get-params.go b/opensearchapi/api_snapshot-get-params.go index 9a2205dbc..ed6c8a791 100644 --- a/opensearchapi/api_snapshot-get-params.go +++ b/opensearchapi/api_snapshot-get-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -43,6 +44,7 @@ type SnapshotGetParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r SnapshotGetParams) get() map[string]string { @@ -83,5 +85,9 @@ func (r SnapshotGetParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_snapshot-restore-params.go b/opensearchapi/api_snapshot-restore-params.go index b03ae1a16..8db2537f5 100644 --- a/opensearchapi/api_snapshot-restore-params.go +++ b/opensearchapi/api_snapshot-restore-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -40,6 +41,7 @@ type SnapshotRestoreParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r SnapshotRestoreParams) get() map[string]string { @@ -68,5 +70,9 @@ func (r SnapshotRestoreParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_snapshot-status-params.go b/opensearchapi/api_snapshot-status-params.go index bf5457c52..c3aecb213 100644 --- a/opensearchapi/api_snapshot-status-params.go +++ b/opensearchapi/api_snapshot-status-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -40,6 +41,7 @@ type SnapshotStatusParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r SnapshotStatusParams) get() map[string]string { @@ -68,5 +70,9 @@ func (r SnapshotStatusParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_snapshot_repository-cleanup-params.go b/opensearchapi/api_snapshot_repository-cleanup-params.go index 9b3b8ea7f..e9c89aa00 100644 --- a/opensearchapi/api_snapshot_repository-cleanup-params.go +++ b/opensearchapi/api_snapshot_repository-cleanup-params.go @@ -27,6 +27,7 @@ package opensearchapi import ( + "strings" "time" ) @@ -39,6 +40,7 @@ type SnapshotRepositoryCleanupParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r SnapshotRepositoryCleanupParams) get() map[string]string { @@ -68,5 +70,9 @@ func (r SnapshotRepositoryCleanupParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_snapshot_repository-create-params.go b/opensearchapi/api_snapshot_repository-create-params.go index b9945f4c9..862187991 100644 --- a/opensearchapi/api_snapshot_repository-create-params.go +++ b/opensearchapi/api_snapshot_repository-create-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -41,6 +42,7 @@ type SnapshotRepositoryCreateParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r SnapshotRepositoryCreateParams) get() map[string]string { @@ -73,5 +75,9 @@ func (r SnapshotRepositoryCreateParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_snapshot_repository-delete-params.go b/opensearchapi/api_snapshot_repository-delete-params.go index ed821942a..d10ee46b0 100644 --- a/opensearchapi/api_snapshot_repository-delete-params.go +++ b/opensearchapi/api_snapshot_repository-delete-params.go @@ -27,6 +27,7 @@ package opensearchapi import ( + "strings" "time" ) @@ -39,6 +40,7 @@ type SnapshotRepositoryDeleteParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r SnapshotRepositoryDeleteParams) get() map[string]string { @@ -67,5 +69,9 @@ func (r SnapshotRepositoryDeleteParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_snapshot_repository-get-params.go b/opensearchapi/api_snapshot_repository-get-params.go index a1865e39f..388c512e2 100644 --- a/opensearchapi/api_snapshot_repository-get-params.go +++ b/opensearchapi/api_snapshot_repository-get-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -40,6 +41,7 @@ type SnapshotRepositoryGetParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r SnapshotRepositoryGetParams) get() map[string]string { @@ -69,5 +71,9 @@ func (r SnapshotRepositoryGetParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_snapshot_repository-verify-params.go b/opensearchapi/api_snapshot_repository-verify-params.go index e6a9d1956..768183c5e 100644 --- a/opensearchapi/api_snapshot_repository-verify-params.go +++ b/opensearchapi/api_snapshot_repository-verify-params.go @@ -27,6 +27,7 @@ package opensearchapi import ( + "strings" "time" ) @@ -39,6 +40,7 @@ type SnapshotRepositoryVerifyParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r SnapshotRepositoryVerifyParams) get() map[string]string { @@ -68,5 +70,9 @@ func (r SnapshotRepositoryVerifyParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_tasks-cancel-params.go b/opensearchapi/api_tasks-cancel-params.go index c113649ab..faf1bf0a8 100644 --- a/opensearchapi/api_tasks-cancel-params.go +++ b/opensearchapi/api_tasks-cancel-params.go @@ -41,6 +41,7 @@ type TasksCancelParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r TasksCancelParams) get() map[string]string { @@ -74,5 +75,9 @@ func (r TasksCancelParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_tasks-get-params.go b/opensearchapi/api_tasks-get-params.go index d420928d1..72f75a530 100644 --- a/opensearchapi/api_tasks-get-params.go +++ b/opensearchapi/api_tasks-get-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -39,6 +40,7 @@ type TasksGetParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r TasksGetParams) get() map[string]string { @@ -64,5 +66,9 @@ func (r TasksGetParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_tasks-list-params.go b/opensearchapi/api_tasks-list-params.go index f0dfd6c03..f691b8d1d 100644 --- a/opensearchapi/api_tasks-list-params.go +++ b/opensearchapi/api_tasks-list-params.go @@ -45,6 +45,7 @@ type TasksListParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r TasksListParams) get() map[string]string { @@ -90,5 +91,9 @@ func (r TasksListParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_template-create-params.go b/opensearchapi/api_template-create-params.go index c9f063838..51a1c89bc 100644 --- a/opensearchapi/api_template-create-params.go +++ b/opensearchapi/api_template-create-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -41,6 +42,7 @@ type TemplateCreateParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r TemplateCreateParams) get() map[string]string { @@ -74,5 +76,9 @@ func (r TemplateCreateParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_template-delete-params.go b/opensearchapi/api_template-delete-params.go index 72a899e27..401b76432 100644 --- a/opensearchapi/api_template-delete-params.go +++ b/opensearchapi/api_template-delete-params.go @@ -27,6 +27,7 @@ package opensearchapi import ( + "strings" "time" ) @@ -39,6 +40,7 @@ type TemplateDeleteParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r TemplateDeleteParams) get() map[string]string { @@ -68,5 +70,9 @@ func (r TemplateDeleteParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_template-exists-params.go b/opensearchapi/api_template-exists-params.go index 00d566b21..b6bc8d065 100644 --- a/opensearchapi/api_template-exists-params.go +++ b/opensearchapi/api_template-exists-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -41,6 +42,7 @@ type TemplateExistsParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r TemplateExistsParams) get() map[string]string { @@ -74,5 +76,9 @@ func (r TemplateExistsParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_template-get-params.go b/opensearchapi/api_template-get-params.go index ec30a245f..55aec6c44 100644 --- a/opensearchapi/api_template-get-params.go +++ b/opensearchapi/api_template-get-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" "time" ) @@ -41,6 +42,7 @@ type TemplateGetParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r TemplateGetParams) get() map[string]string { @@ -74,5 +76,9 @@ func (r TemplateGetParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_termvectors-params.go b/opensearchapi/api_termvectors-params.go index 2a253b64e..3127454a7 100644 --- a/opensearchapi/api_termvectors-params.go +++ b/opensearchapi/api_termvectors-params.go @@ -48,6 +48,7 @@ type TermvectorsParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r TermvectorsParams) get() map[string]string { @@ -109,5 +110,9 @@ func (r TermvectorsParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_update-params.go b/opensearchapi/api_update-params.go index 069e93198..c2e0e7cd2 100644 --- a/opensearchapi/api_update-params.go +++ b/opensearchapi/api_update-params.go @@ -50,6 +50,7 @@ type UpdateParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r UpdateParams) get() map[string]string { @@ -119,5 +120,9 @@ func (r UpdateParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_update_by_query-params.go b/opensearchapi/api_update_by_query-params.go index 365bc4bd2..dca60556d 100644 --- a/opensearchapi/api_update_by_query-params.go +++ b/opensearchapi/api_update_by_query-params.go @@ -74,6 +74,7 @@ type UpdateByQueryParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r UpdateByQueryParams) get() map[string]string { @@ -235,5 +236,9 @@ func (r UpdateByQueryParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params } diff --git a/opensearchapi/api_update_by_query_rethrottle-params.go b/opensearchapi/api_update_by_query_rethrottle-params.go index f7fe047c5..2a270cc0d 100644 --- a/opensearchapi/api_update_by_query_rethrottle-params.go +++ b/opensearchapi/api_update_by_query_rethrottle-params.go @@ -28,6 +28,7 @@ package opensearchapi import ( "strconv" + "strings" ) // UpdateByQueryRethrottleParams represents possible parameters for the UpdateByQueryRethrottleReq @@ -37,6 +38,7 @@ type UpdateByQueryRethrottleParams struct { Pretty bool Human bool ErrorTrace bool + FilterPath []string } func (r UpdateByQueryRethrottleParams) get() map[string]string { @@ -58,5 +60,9 @@ func (r UpdateByQueryRethrottleParams) get() map[string]string { params["error_trace"] = "true" } + if len(r.FilterPath) > 0 { + params["filter_path"] = strings.Join(r.FilterPath, ",") + } + return params }