From 77842e8876c8c3e462c82b671b15ecfce92ae343 Mon Sep 17 00:00:00 2001 From: saimedhi Date: Wed, 17 Apr 2024 15:30:40 -0700 Subject: [PATCH] Code generated using native OpenAPI specification Signed-off-by: saimedhi --- opensearchpy/_async/client/__init__.py | 12 +++---- opensearchpy/_async/client/indices.py | 45 +++++++++----------------- opensearchpy/client/__init__.py | 12 +++---- opensearchpy/client/indices.py | 45 +++++++++----------------- utils/templates/base | 2 +- 5 files changed, 39 insertions(+), 77 deletions(-) diff --git a/opensearchpy/_async/client/__init__.py b/opensearchpy/_async/client/__init__.py index 1121b32d..71a4b8c1 100644 --- a/opensearchpy/_async/client/__init__.py +++ b/opensearchpy/_async/client/__init__.py @@ -843,8 +843,7 @@ async def delete_by_query( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`. Valid values are: `all`, - `open`, `closed`, `hidden`, `none`. Valid choices are all, open, closed, - hidden, none. + `open`, `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg from_: Starting offset (default: 0) @@ -2394,8 +2393,7 @@ async def search_shards( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg human: Whether to return human readable values for @@ -2465,8 +2463,7 @@ async def search_template( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg explain: If `true`, the response includes additional details about score computation as part of a hit. :arg filter_path: Comma-separated list of filters used to reduce @@ -2753,8 +2750,7 @@ async def update_by_query( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg from_: Starting offset (default: 0) diff --git a/opensearchpy/_async/client/indices.py b/opensearchpy/_async/client/indices.py index 6d259bc1..6ee29c1d 100644 --- a/opensearchpy/_async/client/indices.py +++ b/opensearchpy/_async/client/indices.py @@ -108,8 +108,7 @@ async def refresh( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg human: Whether to return human readable values for @@ -160,8 +159,7 @@ async def flush( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg force: If `true`, the request forces a flush even if there @@ -423,8 +421,7 @@ async def open( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg human: Whether to return human readable values for @@ -496,8 +493,7 @@ async def close( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg human: Whether to return human readable values for @@ -566,8 +562,7 @@ async def delete( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg human: Whether to return human readable values for @@ -628,8 +623,7 @@ async def exists( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg flat_settings: If `true`, returns settings in flat format. @@ -693,8 +687,7 @@ async def put_mapping( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg human: Whether to return human readable values for @@ -767,8 +760,7 @@ async def get_mapping( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg human: Whether to return human readable values for @@ -828,8 +820,7 @@ async def get_field_mapping( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg human: Whether to return human readable values for @@ -953,8 +944,7 @@ async def exists_alias( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg human: Whether to return human readable values for @@ -1014,8 +1004,7 @@ async def get_alias( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg human: Whether to return human readable values for @@ -1590,8 +1579,7 @@ async def segments( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg human: Whether to return human readable values for @@ -1664,8 +1652,7 @@ async def validate_query( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg explain: If `true`, the response returns detailed information if an error has occurred. :arg filter_path: Comma-separated list of filters used to reduce @@ -1728,8 +1715,7 @@ async def clear_cache( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg fielddata: If `true`, clears the fields cache.Use the `fields` parameter to clear the cache of specific fields only. :arg fields: Comma-separated list of field names used to limit @@ -2658,8 +2644,7 @@ async def resolve_index( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg human: Whether to return human readable values for diff --git a/opensearchpy/client/__init__.py b/opensearchpy/client/__init__.py index 7949976a..f480daf5 100644 --- a/opensearchpy/client/__init__.py +++ b/opensearchpy/client/__init__.py @@ -843,8 +843,7 @@ def delete_by_query( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`. Valid values are: `all`, - `open`, `closed`, `hidden`, `none`. Valid choices are all, open, closed, - hidden, none. + `open`, `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg from_: Starting offset (default: 0) @@ -2394,8 +2393,7 @@ def search_shards( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg human: Whether to return human readable values for @@ -2465,8 +2463,7 @@ def search_template( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg explain: If `true`, the response includes additional details about score computation as part of a hit. :arg filter_path: Comma-separated list of filters used to reduce @@ -2753,8 +2750,7 @@ def update_by_query( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg from_: Starting offset (default: 0) diff --git a/opensearchpy/client/indices.py b/opensearchpy/client/indices.py index d582f6e8..2dec6548 100644 --- a/opensearchpy/client/indices.py +++ b/opensearchpy/client/indices.py @@ -108,8 +108,7 @@ def refresh( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg human: Whether to return human readable values for @@ -160,8 +159,7 @@ def flush( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg force: If `true`, the request forces a flush even if there @@ -423,8 +421,7 @@ def open( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg human: Whether to return human readable values for @@ -496,8 +493,7 @@ def close( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg human: Whether to return human readable values for @@ -566,8 +562,7 @@ def delete( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg human: Whether to return human readable values for @@ -628,8 +623,7 @@ def exists( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg flat_settings: If `true`, returns settings in flat format. @@ -693,8 +687,7 @@ def put_mapping( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg human: Whether to return human readable values for @@ -767,8 +760,7 @@ def get_mapping( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg human: Whether to return human readable values for @@ -828,8 +820,7 @@ def get_field_mapping( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg human: Whether to return human readable values for @@ -953,8 +944,7 @@ def exists_alias( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg human: Whether to return human readable values for @@ -1014,8 +1004,7 @@ def get_alias( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg human: Whether to return human readable values for @@ -1590,8 +1579,7 @@ def segments( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg human: Whether to return human readable values for @@ -1664,8 +1652,7 @@ def validate_query( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg explain: If `true`, the response returns detailed information if an error has occurred. :arg filter_path: Comma-separated list of filters used to reduce @@ -1728,8 +1715,7 @@ def clear_cache( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg fielddata: If `true`, clears the fields cache.Use the `fields` parameter to clear the cache of specific fields only. :arg fields: Comma-separated list of field names used to limit @@ -2658,8 +2644,7 @@ def resolve_index( match.If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.Supports comma- separated values, such as `open,hidden`.Valid values are: `all`, `open`, - `closed`, `hidden`, `none`. Valid choices are all, open, closed, hidden, - none. + `closed`, `hidden`, `none`. :arg filter_path: Comma-separated list of filters used to reduce the response. :arg human: Whether to return human readable values for diff --git a/utils/templates/base b/utils/templates/base index d70f8d94..fa0ba213 100644 --- a/utils/templates/base +++ b/utils/templates/base @@ -22,7 +22,7 @@ {% for p, info in api.params %} {% if info.description %} {% filter wordwrap(72, wrapstring="\n ") %} - :arg {{ p }}{% if info.deprecated and info.deprecation_message is defined %} (Deprecated: {{ info['deprecation_message'][:-1] }}.){% endif %}: {{ info.description }} {% if info.options and "Valid values: " not in info.description %}Valid choices are {{ info.options|join(", ") }}.{% endif %} + :arg {{ p }}{% if info.deprecated and info.deprecation_message is defined %} (Deprecated: {{ info['deprecation_message'][:-1] }}.){% endif %}: {{ info.description }} {% if info.options and "Valid values" not in info.description %}Valid choices are {{ info.options|join(", ") }}.{% endif %} {% if info.default is defined %}{% if info.default is not none %}{% if info.default is sameas(false) %}Default is false.{% else %}Default is {{ info.default }}.{% endif %}{% endif %}{% endif %} {% endfilter %}