Skip to content

Commit

Permalink
Autogenerated Update v2.222.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
wf-jenkins committed May 8, 2024
1 parent 7ee3328 commit e64efcf
Show file tree
Hide file tree
Showing 8 changed files with 159 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .swagger-codegen/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"gitUserId": "wavefrontHQ",
"packageName": "wavefront_api_client",
"packageUrl": "https://github.com/wavefrontHQ/python-client",
"packageVersion": "2.220.3"
"packageVersion": "2.222.2"
}
2 changes: 1 addition & 1 deletion .swagger-codegen/config.jsone
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"gitUserId": "wavefrontHQ",
"packageName": "wavefront_api_client",
"packageUrl": "https://github.com/wavefrontHQ/python-client",
"packageVersion": "2.219.6"
"packageVersion": "2.220.3"
}
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: v2
- Package version: 2.220.3
- Package version: 2.222.2
- Build package: io.swagger.codegen.languages.PythonClientCodegen

## Requirements.
Expand Down Expand Up @@ -116,6 +116,7 @@ Class | Method | HTTP request | Description
*AlertApi* | [**get_alert_tags**](docs/AlertApi.md#get_alert_tags) | **GET** /api/v2/alert/{id}/tag | Get all tags associated with a specific alert
*AlertApi* | [**get_alert_version**](docs/AlertApi.md#get_alert_version) | **GET** /api/v2/alert/{id}/history/{version} | Get a specific historical version of a specific alert
*AlertApi* | [**get_alerts_summary**](docs/AlertApi.md#get_alerts_summary) | **GET** /api/v2/alert/summary | Count alerts of various statuses for a customer
*AlertApi* | [**get_alerts_with_pagination**](docs/AlertApi.md#get_alerts_with_pagination) | **GET** /api/v2/alert/paginated | Get all alerts for a customer with pagination
*AlertApi* | [**get_all_alert**](docs/AlertApi.md#get_all_alert) | **GET** /api/v2/alert | Get all alerts for a customer
*AlertApi* | [**hide_alert**](docs/AlertApi.md#hide_alert) | **POST** /api/v2/alert/{id}/uninstall | Hide a specific integration alert
*AlertApi* | [**preview_alert_notification**](docs/AlertApi.md#preview_alert_notification) | **POST** /api/v2/alert/preview | Get all the notification preview for a specific alert
Expand Down
57 changes: 57 additions & 0 deletions docs/AlertApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Method | HTTP request | Description
[**get_alert_tags**](AlertApi.md#get_alert_tags) | **GET** /api/v2/alert/{id}/tag | Get all tags associated with a specific alert
[**get_alert_version**](AlertApi.md#get_alert_version) | **GET** /api/v2/alert/{id}/history/{version} | Get a specific historical version of a specific alert
[**get_alerts_summary**](AlertApi.md#get_alerts_summary) | **GET** /api/v2/alert/summary | Count alerts of various statuses for a customer
[**get_alerts_with_pagination**](AlertApi.md#get_alerts_with_pagination) | **GET** /api/v2/alert/paginated | Get all alerts for a customer with pagination
[**get_all_alert**](AlertApi.md#get_all_alert) | **GET** /api/v2/alert | Get all alerts for a customer
[**hide_alert**](AlertApi.md#hide_alert) | **POST** /api/v2/alert/{id}/uninstall | Hide a specific integration alert
[**preview_alert_notification**](AlertApi.md#preview_alert_notification) | **POST** /api/v2/alert/preview | Get all the notification preview for a specific alert
Expand Down Expand Up @@ -689,6 +690,62 @@ This endpoint does not need any parameter.

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **get_alerts_with_pagination**
> ResponseContainerPagedAlert get_alerts_with_pagination(cursor=cursor, limit=limit)
Get all alerts for a customer with pagination



### Example
```python
from __future__ import print_function
import time
import wavefront_api_client
from wavefront_api_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
configuration = wavefront_api_client.Configuration()
configuration.api_key['X-AUTH-TOKEN'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-AUTH-TOKEN'] = 'Bearer'

# create an instance of the API class
api_instance = wavefront_api_client.AlertApi(wavefront_api_client.ApiClient(configuration))
cursor = 789 # int | (optional)
limit = 100 # int | (optional) (default to 100)

try:
# Get all alerts for a customer with pagination
api_response = api_instance.get_alerts_with_pagination(cursor=cursor, limit=limit)
pprint(api_response)
except ApiException as e:
print("Exception when calling AlertApi->get_alerts_with_pagination: %s\n" % e)
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**cursor** | **int**| | [optional]
**limit** | **int**| | [optional] [default to 100]

### Return type

[**ResponseContainerPagedAlert**](ResponseContainerPagedAlert.md)

### Authorization

[api_key](../README.md#api_key)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **get_all_alert**
> ResponseContainerPagedAlert get_all_alert(offset=offset, limit=limit)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from setuptools import setup, find_packages # noqa: H301

NAME = "wavefront-api-client"
VERSION = "2.220.3"
VERSION = "2.222.2"
# To install the library, run the following
#
# python setup.py install
Expand Down
95 changes: 95 additions & 0 deletions wavefront_api_client/api/alert_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1210,6 +1210,101 @@ def get_alerts_summary_with_http_info(self, **kwargs): # noqa: E501
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)

def get_alerts_with_pagination(self, **kwargs): # noqa: E501
"""Get all alerts for a customer with pagination # noqa: E501
# noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_alerts_with_pagination(async_req=True)
>>> result = thread.get()
:param async_req bool
:param int cursor:
:param int limit:
:return: ResponseContainerPagedAlert
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_alerts_with_pagination_with_http_info(**kwargs) # noqa: E501
else:
(data) = self.get_alerts_with_pagination_with_http_info(**kwargs) # noqa: E501
return data

def get_alerts_with_pagination_with_http_info(self, **kwargs): # noqa: E501
"""Get all alerts for a customer with pagination # noqa: E501
# noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_alerts_with_pagination_with_http_info(async_req=True)
>>> result = thread.get()
:param async_req bool
:param int cursor:
:param int limit:
:return: ResponseContainerPagedAlert
If the method is called asynchronously,
returns the request thread.
"""

all_params = ['cursor', 'limit'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')

params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_alerts_with_pagination" % key
)
params[key] = val
del params['kwargs']

collection_formats = {}

path_params = {}

query_params = []
if 'cursor' in params:
query_params.append(('cursor', params['cursor'])) # noqa: E501
if 'limit' in params:
query_params.append(('limit', params['limit'])) # noqa: E501

header_params = {}

form_params = []
local_var_files = {}

body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501

# Authentication setting
auth_settings = ['api_key'] # noqa: E501

return self.api_client.call_api(
'/api/v2/alert/paginated', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='ResponseContainerPagedAlert', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)

def get_all_alert(self, **kwargs): # noqa: E501
"""Get all alerts for a customer # noqa: E501
Expand Down
2 changes: 1 addition & 1 deletion wavefront_api_client/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'Swagger-Codegen/2.220.3/python'
self.user_agent = 'Swagger-Codegen/2.222.2/python'
self.client_side_validation = configuration.client_side_validation

def __del__(self):
Expand Down
2 changes: 1 addition & 1 deletion wavefront_api_client/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,5 +251,5 @@ def to_debug_report(self):
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: v2\n"\
"SDK Package Version: 2.220.3".\
"SDK Package Version: 2.222.2".\
format(env=sys.platform, pyversion=sys.version)

0 comments on commit e64efcf

Please sign in to comment.