diff --git a/.swagger-codegen/VERSION b/.swagger-codegen/VERSION index ab6d278..26f8b8b 100644 --- a/.swagger-codegen/VERSION +++ b/.swagger-codegen/VERSION @@ -1 +1 @@ -2.4.4 \ No newline at end of file +2.4.5 \ No newline at end of file diff --git a/.swagger-codegen/config.json b/.swagger-codegen/config.json index 5de2c54..cb56f8a 100644 --- a/.swagger-codegen/config.json +++ b/.swagger-codegen/config.json @@ -3,5 +3,5 @@ "gitUserId": "wavefrontHQ", "packageName": "wavefront_api_client", "packageUrl": "https://github.com/wavefrontHQ/python-client", - "packageVersion": "2.30.15" + "packageVersion": "2.32.19" } diff --git a/.swagger-codegen/config.jsone b/.swagger-codegen/config.jsone new file mode 100644 index 0000000..5de2c54 --- /dev/null +++ b/.swagger-codegen/config.jsone @@ -0,0 +1,7 @@ +{ + "gitRepoId": "python-client", + "gitUserId": "wavefrontHQ", + "packageName": "wavefront_api_client", + "packageUrl": "https://github.com/wavefrontHQ/python-client", + "packageVersion": "2.30.15" +} diff --git a/README.md b/README.md index bb09680..f826ef9 100644 --- a/README.md +++ b/README.md @@ -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.30.15 +- Package version: 2.32.19 - Build package: io.swagger.codegen.languages.PythonClientCodegen ## Requirements. @@ -59,15 +59,13 @@ configuration.api_key['X-AUTH-TOKEN'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = wavefront_api_client.AlertApi(wavefront_api_client.ApiClient(configuration)) -id = 'id_example' # str | -tag_value = 'tag_value_example' # str | +body = [wavefront_api_client.AccessControlListWriteDTO()] # list[AccessControlListWriteDTO] | (optional) try: - # Add a tag to a specific alert - api_response = api_instance.add_alert_tag(id, tag_value) - pprint(api_response) + # Adds the specified ids to the given alerts' ACL + api_instance.add_access(body=body) except ApiException as e: - print("Exception when calling AlertApi->add_alert_tag: %s\n" % e) + print("Exception when calling AlertApi->add_access: %s\n" % e) ``` @@ -77,9 +75,13 @@ All URIs are relative to *https://localhost* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*AlertApi* | [**add_access**](docs/AlertApi.md#add_access) | **POST** /api/v2/alert/acl/add | Adds the specified ids to the given alerts' ACL *AlertApi* | [**add_alert_tag**](docs/AlertApi.md#add_alert_tag) | **PUT** /api/v2/alert/{id}/tag/{tagValue} | Add a tag to a specific alert +*AlertApi* | [**can_user_modify**](docs/AlertApi.md#can_user_modify) | **GET** /api/v2/alert/{id}/canUserModify | +*AlertApi* | [**clone_alert**](docs/AlertApi.md#clone_alert) | **POST** /api/v2/alert/{id}/clone | Clones the specified alert *AlertApi* | [**create_alert**](docs/AlertApi.md#create_alert) | **POST** /api/v2/alert | Create a specific alert *AlertApi* | [**delete_alert**](docs/AlertApi.md#delete_alert) | **DELETE** /api/v2/alert/{id} | Delete a specific alert +*AlertApi* | [**get_access_control_list**](docs/AlertApi.md#get_access_control_list) | **GET** /api/v2/alert/acl | Get Access Control Lists' union for the specified alerts *AlertApi* | [**get_alert**](docs/AlertApi.md#get_alert) | **GET** /api/v2/alert/{id} | Get a specific alert *AlertApi* | [**get_alert_history**](docs/AlertApi.md#get_alert_history) | **GET** /api/v2/alert/{id}/history | Get the version history of a specific alert *AlertApi* | [**get_alert_tags**](docs/AlertApi.md#get_alert_tags) | **GET** /api/v2/alert/{id}/tag | Get all tags associated with a specific alert @@ -87,13 +89,19 @@ Class | Method | HTTP request | Description *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_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* | [**remove_access**](docs/AlertApi.md#remove_access) | **POST** /api/v2/alert/acl/remove | Removes the specified ids from the given alerts' ACL *AlertApi* | [**remove_alert_tag**](docs/AlertApi.md#remove_alert_tag) | **DELETE** /api/v2/alert/{id}/tag/{tagValue} | Remove a tag from a specific alert +*AlertApi* | [**set_acl**](docs/AlertApi.md#set_acl) | **PUT** /api/v2/alert/acl/set | Set ACL for the specified alerts *AlertApi* | [**set_alert_tags**](docs/AlertApi.md#set_alert_tags) | **POST** /api/v2/alert/{id}/tag | Set all tags associated with a specific alert *AlertApi* | [**snooze_alert**](docs/AlertApi.md#snooze_alert) | **POST** /api/v2/alert/{id}/snooze | Snooze a specific alert for some number of seconds *AlertApi* | [**undelete_alert**](docs/AlertApi.md#undelete_alert) | **POST** /api/v2/alert/{id}/undelete | Undelete a specific alert *AlertApi* | [**unhide_alert**](docs/AlertApi.md#unhide_alert) | **POST** /api/v2/alert/{id}/install | Unhide a specific integration alert *AlertApi* | [**unsnooze_alert**](docs/AlertApi.md#unsnooze_alert) | **POST** /api/v2/alert/{id}/unsnooze | Unsnooze a specific alert *AlertApi* | [**update_alert**](docs/AlertApi.md#update_alert) | **PUT** /api/v2/alert/{id} | Update a specific alert +*ApiTokenApi* | [**create_token**](docs/ApiTokenApi.md#create_token) | **POST** /api/v2/apitoken | Create new api token +*ApiTokenApi* | [**delete_token**](docs/ApiTokenApi.md#delete_token) | **DELETE** /api/v2/apitoken/{id} | Delete the specified api token +*ApiTokenApi* | [**get_all_tokens**](docs/ApiTokenApi.md#get_all_tokens) | **GET** /api/v2/apitoken | Get all api tokens for a user +*ApiTokenApi* | [**update_token_name**](docs/ApiTokenApi.md#update_token_name) | **PUT** /api/v2/apitoken/{id} | Update the name of the specified api token *CloudIntegrationApi* | [**create_cloud_integration**](docs/CloudIntegrationApi.md#create_cloud_integration) | **POST** /api/v2/cloudintegration | Create a cloud integration *CloudIntegrationApi* | [**delete_cloud_integration**](docs/CloudIntegrationApi.md#delete_cloud_integration) | **DELETE** /api/v2/cloudintegration/{id} | Delete a specific cloud integration *CloudIntegrationApi* | [**disable_cloud_integration**](docs/CloudIntegrationApi.md#disable_cloud_integration) | **POST** /api/v2/cloudintegration/{id}/disable | Disable a specific cloud integration @@ -259,8 +267,8 @@ Class | Method | HTTP request | Description *UserApi* | [**create_or_update_user**](docs/UserApi.md#create_or_update_user) | **POST** /api/v2/user | Creates or updates a user *UserApi* | [**delete_multiple_users**](docs/UserApi.md#delete_multiple_users) | **POST** /api/v2/user/deleteUsers | Deletes multiple users *UserApi* | [**delete_user**](docs/UserApi.md#delete_user) | **DELETE** /api/v2/user/{id} | Deletes a user identified by id -*UserApi* | [**get_all_user**](docs/UserApi.md#get_all_user) | **GET** /api/v2/user | Get all users -*UserApi* | [**get_user**](docs/UserApi.md#get_user) | **GET** /api/v2/user/{id} | Retrieves a user by identifier (email addr) +*UserApi* | [**get_all_users**](docs/UserApi.md#get_all_users) | **GET** /api/v2/user | Get all users +*UserApi* | [**get_user**](docs/UserApi.md#get_user) | **GET** /api/v2/user/{id} | Retrieves a user by identifier (email address) *UserApi* | [**grant_permission_to_users**](docs/UserApi.md#grant_permission_to_users) | **POST** /api/v2/user/grant/{permission} | Grants a specific user permission to multiple users *UserApi* | [**grant_user_permission**](docs/UserApi.md#grant_user_permission) | **POST** /api/v2/user/{id}/grant | Grants a specific user permission *UserApi* | [**invite_users**](docs/UserApi.md#invite_users) | **POST** /api/v2/user/invite | Invite users with given user groups and permissions. @@ -287,10 +295,11 @@ Class | Method | HTTP request | Description ## Documentation For Models - - [ACL](docs/ACL.md) - [AWSBaseCredentials](docs/AWSBaseCredentials.md) - [AccessControlElement](docs/AccessControlElement.md) + - [AccessControlListReadDTO](docs/AccessControlListReadDTO.md) - [AccessControlListSimple](docs/AccessControlListSimple.md) + - [AccessControlListWriteDTO](docs/AccessControlListWriteDTO.md) - [Alert](docs/Alert.md) - [AvroBackedStandardizedDTO](docs/AvroBackedStandardizedDTO.md) - [AzureActivityLogConfiguration](docs/AzureActivityLogConfiguration.md) @@ -362,7 +371,7 @@ Class | Method | HTTP request | Description - [PagedProxy](docs/PagedProxy.md) - [PagedSavedSearch](docs/PagedSavedSearch.md) - [PagedSource](docs/PagedSource.md) - - [PagedUserGroup](docs/PagedUserGroup.md) + - [PagedUserGroupModel](docs/PagedUserGroupModel.md) - [Point](docs/Point.md) - [Proxy](docs/Proxy.md) - [QueryEvent](docs/QueryEvent.md) @@ -380,11 +389,12 @@ Class | Method | HTTP request | Description - [ResponseContainerHistoryResponse](docs/ResponseContainerHistoryResponse.md) - [ResponseContainerIntegration](docs/ResponseContainerIntegration.md) - [ResponseContainerIntegrationStatus](docs/ResponseContainerIntegrationStatus.md) - - [ResponseContainerListACL](docs/ResponseContainerListACL.md) + - [ResponseContainerListAccessControlListReadDTO](docs/ResponseContainerListAccessControlListReadDTO.md) - [ResponseContainerListIntegration](docs/ResponseContainerListIntegration.md) - [ResponseContainerListIntegrationManifestGroup](docs/ResponseContainerListIntegrationManifestGroup.md) - [ResponseContainerListString](docs/ResponseContainerListString.md) - - [ResponseContainerListUserGroup](docs/ResponseContainerListUserGroup.md) + - [ResponseContainerListUserApiToken](docs/ResponseContainerListUserApiToken.md) + - [ResponseContainerListUserGroupModel](docs/ResponseContainerListUserGroupModel.md) - [ResponseContainerMaintenanceWindow](docs/ResponseContainerMaintenanceWindow.md) - [ResponseContainerMapStringInteger](docs/ResponseContainerMapStringInteger.md) - [ResponseContainerMapStringIntegrationStatus](docs/ResponseContainerMapStringIntegrationStatus.md) @@ -406,12 +416,13 @@ Class | Method | HTTP request | Description - [ResponseContainerPagedProxy](docs/ResponseContainerPagedProxy.md) - [ResponseContainerPagedSavedSearch](docs/ResponseContainerPagedSavedSearch.md) - [ResponseContainerPagedSource](docs/ResponseContainerPagedSource.md) - - [ResponseContainerPagedUserGroup](docs/ResponseContainerPagedUserGroup.md) + - [ResponseContainerPagedUserGroupModel](docs/ResponseContainerPagedUserGroupModel.md) - [ResponseContainerProxy](docs/ResponseContainerProxy.md) - [ResponseContainerSavedSearch](docs/ResponseContainerSavedSearch.md) - [ResponseContainerSource](docs/ResponseContainerSource.md) - [ResponseContainerTagsResponse](docs/ResponseContainerTagsResponse.md) - - [ResponseContainerUserGroup](docs/ResponseContainerUserGroup.md) + - [ResponseContainerUserApiToken](docs/ResponseContainerUserApiToken.md) + - [ResponseContainerUserGroupModel](docs/ResponseContainerUserGroupModel.md) - [ResponseContainerValidatedUsersDTO](docs/ResponseContainerValidatedUsersDTO.md) - [ResponseStatus](docs/ResponseStatus.md) - [SavedSearch](docs/SavedSearch.md) @@ -427,8 +438,10 @@ Class | Method | HTTP request | Description - [TeslaConfiguration](docs/TeslaConfiguration.md) - [Timeseries](docs/Timeseries.md) - [User](docs/User.md) + - [UserApiToken](docs/UserApiToken.md) - [UserDTO](docs/UserDTO.md) - [UserGroup](docs/UserGroup.md) + - [UserGroupModel](docs/UserGroupModel.md) - [UserGroupPropertiesDTO](docs/UserGroupPropertiesDTO.md) - [UserGroupWrite](docs/UserGroupWrite.md) - [UserModel](docs/UserModel.md) diff --git a/docs/AccessControlElement.md b/docs/AccessControlElement.md index ea8b673..c4d4940 100644 --- a/docs/AccessControlElement.md +++ b/docs/AccessControlElement.md @@ -3,6 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**description** | **str** | | [optional] **id** | **str** | | [optional] **name** | **str** | | [optional] diff --git a/docs/AccessControlListReadDTO.md b/docs/AccessControlListReadDTO.md new file mode 100644 index 0000000..88dfe06 --- /dev/null +++ b/docs/AccessControlListReadDTO.md @@ -0,0 +1,12 @@ +# AccessControlListReadDTO + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**entity_id** | **str** | The entity Id | [optional] +**modify_acl** | [**list[AccessControlElement]**](AccessControlElement.md) | List of users and user groups ids that have modify permission | [optional] +**view_acl** | [**list[AccessControlElement]**](AccessControlElement.md) | List of users and user group ids that have view permission | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AccessControlListWriteDTO.md b/docs/AccessControlListWriteDTO.md new file mode 100644 index 0000000..1f79e0d --- /dev/null +++ b/docs/AccessControlListWriteDTO.md @@ -0,0 +1,12 @@ +# AccessControlListWriteDTO + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**entity_id** | **str** | The entity Id | [optional] +**modify_acl** | **list[str]** | List of users and user groups ids that have modify permission | [optional] +**view_acl** | **list[str]** | List of users and user group ids that have view permission | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Alert.md b/docs/Alert.md index 1603379..dbf7086 100644 --- a/docs/Alert.md +++ b/docs/Alert.md @@ -3,12 +3,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**acl** | [**AccessControlListSimple**](AccessControlListSimple.md) | | [optional] **active_maintenance_windows** | **list[str]** | The names of the active maintenance windows that are affecting this alert | [optional] **additional_information** | **str** | User-supplied additional explanatory information for this alert. Useful for linking runbooks, mitigations,, etc | [optional] **alert_type** | **str** | Alert type. | [optional] **alerts_last_day** | **int** | | [optional] **alerts_last_month** | **int** | | [optional] **alerts_last_week** | **int** | | [optional] +**can_user_modify** | **bool** | Whether the user can modify the alert. | [optional] **condition** | **str** | A Wavefront query that is evaluated at regular intervals (default 1m). The alert fires and notifications are triggered when a data series matching this query evaluates to a non-zero value for a set number of consecutive minutes | **condition_qb_enabled** | **bool** | Whether the condition query was created using the Query Builder. Default false | [optional] **condition_qb_serialization** | **str** | The special serialization of the Query Builder that corresponds to the condition query. Applicable only when conditionQBEnabled is true | [optional] @@ -42,6 +44,7 @@ Name | Type | Description | Notes **notificants** | **list[str]** | A derived field listing the webhook ids used by this alert | [optional] **notification_resend_frequency_minutes** | **int** | How often to re-trigger a continually failing alert. If absent or <= 0, no retriggering occurs | [optional] **num_points_in_failure_frame** | **int** | Number of points scanned in alert query time frame. | [optional] +**orphan** | **bool** | | [optional] **points_scanned_at_last_query** | **int** | A derived field recording the number of data points scanned when the system last computed this alert's condition | [optional] **prefiring_host_label_pairs** | [**list[SourceLabelPair]**](SourceLabelPair.md) | Lists the series that are starting to fail, defined as failing for greater than 50% of the checks in the window determined by the \"minutes\" parameter | [optional] **process_rate_minutes** | **int** | The interval between checks for this alert, in minutes. Defaults to 1 minute | [optional] diff --git a/docs/AlertApi.md b/docs/AlertApi.md index eccd37b..d3c836f 100644 --- a/docs/AlertApi.md +++ b/docs/AlertApi.md @@ -4,9 +4,13 @@ All URIs are relative to *https://YOUR_INSTANCE.wavefront.com* Method | HTTP request | Description ------------- | ------------- | ------------- +[**add_access**](AlertApi.md#add_access) | **POST** /api/v2/alert/acl/add | Adds the specified ids to the given alerts' ACL [**add_alert_tag**](AlertApi.md#add_alert_tag) | **PUT** /api/v2/alert/{id}/tag/{tagValue} | Add a tag to a specific alert +[**can_user_modify**](AlertApi.md#can_user_modify) | **GET** /api/v2/alert/{id}/canUserModify | +[**clone_alert**](AlertApi.md#clone_alert) | **POST** /api/v2/alert/{id}/clone | Clones the specified alert [**create_alert**](AlertApi.md#create_alert) | **POST** /api/v2/alert | Create a specific alert [**delete_alert**](AlertApi.md#delete_alert) | **DELETE** /api/v2/alert/{id} | Delete a specific alert +[**get_access_control_list**](AlertApi.md#get_access_control_list) | **GET** /api/v2/alert/acl | Get Access Control Lists' union for the specified alerts [**get_alert**](AlertApi.md#get_alert) | **GET** /api/v2/alert/{id} | Get a specific alert [**get_alert_history**](AlertApi.md#get_alert_history) | **GET** /api/v2/alert/{id}/history | Get the version history of a specific alert [**get_alert_tags**](AlertApi.md#get_alert_tags) | **GET** /api/v2/alert/{id}/tag | Get all tags associated with a specific alert @@ -14,7 +18,9 @@ Method | HTTP request | Description [**get_alerts_summary**](AlertApi.md#get_alerts_summary) | **GET** /api/v2/alert/summary | Count alerts of various statuses for a customer [**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 +[**remove_access**](AlertApi.md#remove_access) | **POST** /api/v2/alert/acl/remove | Removes the specified ids from the given alerts' ACL [**remove_alert_tag**](AlertApi.md#remove_alert_tag) | **DELETE** /api/v2/alert/{id}/tag/{tagValue} | Remove a tag from a specific alert +[**set_acl**](AlertApi.md#set_acl) | **PUT** /api/v2/alert/acl/set | Set ACL for the specified alerts [**set_alert_tags**](AlertApi.md#set_alert_tags) | **POST** /api/v2/alert/{id}/tag | Set all tags associated with a specific alert [**snooze_alert**](AlertApi.md#snooze_alert) | **POST** /api/v2/alert/{id}/snooze | Snooze a specific alert for some number of seconds [**undelete_alert**](AlertApi.md#undelete_alert) | **POST** /api/v2/alert/{id}/undelete | Undelete a specific alert @@ -23,6 +29,59 @@ Method | HTTP request | Description [**update_alert**](AlertApi.md#update_alert) | **PUT** /api/v2/alert/{id} | Update a specific alert +# **add_access** +> add_access(body=body) + +Adds the specified ids to the given alerts' ACL + + + +### 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)) +body = [wavefront_api_client.AccessControlListWriteDTO()] # list[AccessControlListWriteDTO] | (optional) + +try: + # Adds the specified ids to the given alerts' ACL + api_instance.add_access(body=body) +except ApiException as e: + print("Exception when calling AlertApi->add_access: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**list[AccessControlListWriteDTO]**](AccessControlListWriteDTO.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: application/json + - **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) + # **add_alert_tag** > ResponseContainer add_alert_tag(id, tag_value) @@ -79,6 +138,116 @@ Name | Type | Description | Notes [[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) +# **can_user_modify** +> can_user_modify(id, body=body) + + + +### 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)) +id = 'id_example' # str | +body = wavefront_api_client.User() # User | (optional) + +try: + api_instance.can_user_modify(id, body=body) +except ApiException as e: + print("Exception when calling AlertApi->can_user_modify: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **body** | [**User**](User.md)| | [optional] + +### Return type + +void (empty response body) + +### 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) + +# **clone_alert** +> ResponseContainerAlert clone_alert(id, name=name, v=v) + +Clones the specified alert + + + +### 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)) +id = 'id_example' # str | +name = 'name_example' # str | (optional) +v = 789 # int | (optional) + +try: + # Clones the specified alert + api_response = api_instance.clone_alert(id, name=name, v=v) + pprint(api_response) +except ApiException as e: + print("Exception when calling AlertApi->clone_alert: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **name** | **str**| | [optional] + **v** | **int**| | [optional] + +### Return type + +[**ResponseContainerAlert**](ResponseContainerAlert.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: application/json + - **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) + # **create_alert** > ResponseContainerAlert create_alert(body=body) @@ -187,6 +356,60 @@ Name | Type | Description | Notes [[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_access_control_list** +> ResponseContainerListAccessControlListReadDTO get_access_control_list(id=id) + +Get Access Control Lists' union for the specified alerts + + + +### 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)) +id = ['id_example'] # list[str] | (optional) + +try: + # Get Access Control Lists' union for the specified alerts + api_response = api_instance.get_access_control_list(id=id) + pprint(api_response) +except ApiException as e: + print("Exception when calling AlertApi->get_access_control_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | [**list[str]**](str.md)| | [optional] + +### Return type + +[**ResponseContainerListAccessControlListReadDTO**](ResponseContainerListAccessControlListReadDTO.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_alert** > ResponseContainerAlert get_alert(id) @@ -569,6 +792,59 @@ Name | Type | Description | Notes [[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) +# **remove_access** +> remove_access(body=body) + +Removes the specified ids from the given alerts' ACL + + + +### 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)) +body = [wavefront_api_client.AccessControlListWriteDTO()] # list[AccessControlListWriteDTO] | (optional) + +try: + # Removes the specified ids from the given alerts' ACL + api_instance.remove_access(body=body) +except ApiException as e: + print("Exception when calling AlertApi->remove_access: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**list[AccessControlListWriteDTO]**](AccessControlListWriteDTO.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: application/json + - **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) + # **remove_alert_tag** > ResponseContainer remove_alert_tag(id, tag_value) @@ -625,6 +901,59 @@ Name | Type | Description | Notes [[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) +# **set_acl** +> set_acl(body=body) + +Set ACL for the specified alerts + + + +### 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)) +body = [wavefront_api_client.AccessControlListWriteDTO()] # list[AccessControlListWriteDTO] | (optional) + +try: + # Set ACL for the specified alerts + api_instance.set_acl(body=body) +except ApiException as e: + print("Exception when calling AlertApi->set_acl: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**list[AccessControlListWriteDTO]**](AccessControlListWriteDTO.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: application/json + - **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) + # **set_alert_tags** > ResponseContainer set_alert_tags(id, body=body) diff --git a/docs/ApiTokenApi.md b/docs/ApiTokenApi.md new file mode 100644 index 0000000..e5dcf9c --- /dev/null +++ b/docs/ApiTokenApi.md @@ -0,0 +1,222 @@ +# wavefront_api_client.ApiTokenApi + +All URIs are relative to *https://YOUR_INSTANCE.wavefront.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_token**](ApiTokenApi.md#create_token) | **POST** /api/v2/apitoken | Create new api token +[**delete_token**](ApiTokenApi.md#delete_token) | **DELETE** /api/v2/apitoken/{id} | Delete the specified api token +[**get_all_tokens**](ApiTokenApi.md#get_all_tokens) | **GET** /api/v2/apitoken | Get all api tokens for a user +[**update_token_name**](ApiTokenApi.md#update_token_name) | **PUT** /api/v2/apitoken/{id} | Update the name of the specified api token + + +# **create_token** +> ResponseContainerListUserApiToken create_token() + +Create new api token + +Returns the list of all api tokens for a user. The newly created api token is the last element of returned list. + +### 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.ApiTokenApi(wavefront_api_client.ApiClient(configuration)) + +try: + # Create new api token + api_response = api_instance.create_token() + pprint(api_response) +except ApiException as e: + print("Exception when calling ApiTokenApi->create_token: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ResponseContainerListUserApiToken**](ResponseContainerListUserApiToken.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) + +# **delete_token** +> ResponseContainerListUserApiToken delete_token(id) + +Delete the specified api token + + + +### 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.ApiTokenApi(wavefront_api_client.ApiClient(configuration)) +id = 'id_example' # str | + +try: + # Delete the specified api token + api_response = api_instance.delete_token(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling ApiTokenApi->delete_token: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**ResponseContainerListUserApiToken**](ResponseContainerListUserApiToken.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_tokens** +> ResponseContainerListUserApiToken get_all_tokens() + +Get all api tokens for a user + + + +### 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.ApiTokenApi(wavefront_api_client.ApiClient(configuration)) + +try: + # Get all api tokens for a user + api_response = api_instance.get_all_tokens() + pprint(api_response) +except ApiException as e: + print("Exception when calling ApiTokenApi->get_all_tokens: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ResponseContainerListUserApiToken**](ResponseContainerListUserApiToken.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) + +# **update_token_name** +> ResponseContainerUserApiToken update_token_name(id, body=body) + +Update the name of the specified api token + + + +### 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.ApiTokenApi(wavefront_api_client.ApiClient(configuration)) +id = 'id_example' # str | +body = wavefront_api_client.UserApiToken() # UserApiToken | Example Body:
{   \"tokenID\": \"Token identifier\",   \"tokenName\": \"Token name\" }
(optional) + +try: + # Update the name of the specified api token + api_response = api_instance.update_token_name(id, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling ApiTokenApi->update_token_name: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **body** | [**UserApiToken**](UserApiToken.md)| Example Body: <pre>{ \"tokenID\": \"Token identifier\", \"tokenName\": \"Token name\" }</pre> | [optional] + +### Return type + +[**ResponseContainerUserApiToken**](ResponseContainerUserApiToken.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: application/json + - **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) + diff --git a/docs/CustomerPreferences.md b/docs/CustomerPreferences.md index bcdff8c..6e29533 100644 --- a/docs/CustomerPreferences.md +++ b/docs/CustomerPreferences.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **created_epoch_millis** | **int** | | [optional] **creator_id** | **str** | | [optional] **customer_id** | **str** | The id of the customer preferences are attached to | -**default_user_groups** | [**list[UserGroup]**](UserGroup.md) | List of default user groups of the customer | [optional] +**default_user_groups** | [**list[UserGroupModel]**](UserGroupModel.md) | List of default user groups of the customer | [optional] **deleted** | **bool** | | [optional] **grant_modify_access_to_everyone** | **bool** | Whether modify access of new entites is granted to Everyone or to the Creator | **hidden_metric_prefixes** | **dict(str, int)** | Metric prefixes which should be hidden from user | [optional] diff --git a/docs/Dashboard.md b/docs/Dashboard.md index 4d37f70..aa77d07 100644 --- a/docs/Dashboard.md +++ b/docs/Dashboard.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **acl** | [**AccessControlListSimple**](AccessControlListSimple.md) | | [optional] -**can_user_modify** | **bool** | | [optional] +**can_user_modify** | **bool** | Whether the user can modify the dashboard. | [optional] **chart_title_bg_color** | **str** | Background color of the chart title text area, in rgba(rvalue,gvalue,bvalue,avalue) | [optional] **chart_title_color** | **str** | Text color of the chart title text are, in rgba(rvalue,gvalue,bvalue,avalue) | [optional] **chart_title_scalar** | **int** | Scale (normally 100) of chart title text size | [optional] diff --git a/docs/DashboardApi.md b/docs/DashboardApi.md index 1745c88..018c9cd 100644 --- a/docs/DashboardApi.md +++ b/docs/DashboardApi.md @@ -47,7 +47,7 @@ configuration.api_key['X-AUTH-TOKEN'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = wavefront_api_client.DashboardApi(wavefront_api_client.ApiClient(configuration)) -body = [wavefront_api_client.ACL()] # list[ACL] | (optional) +body = [wavefront_api_client.AccessControlListWriteDTO()] # list[AccessControlListWriteDTO] | (optional) try: # Adds the specified ids to the given dashboards' ACL @@ -60,7 +60,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**list[ACL]**](ACL.md)| | [optional] + **body** | [**list[AccessControlListWriteDTO]**](AccessControlListWriteDTO.md)| | [optional] ### Return type @@ -296,7 +296,7 @@ Name | Type | Description | Notes [[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_access_control_list** -> ResponseContainerListACL get_access_control_list(id=id) +> ResponseContainerListAccessControlListReadDTO get_access_control_list(id=id) Get list of Access Control Lists for the specified dashboards @@ -336,7 +336,7 @@ Name | Type | Description | Notes ### Return type -[**ResponseContainerListACL**](ResponseContainerListACL.md) +[**ResponseContainerListAccessControlListReadDTO**](ResponseContainerListAccessControlListReadDTO.md) ### Authorization @@ -650,7 +650,7 @@ configuration.api_key['X-AUTH-TOKEN'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = wavefront_api_client.DashboardApi(wavefront_api_client.ApiClient(configuration)) -body = [wavefront_api_client.ACL()] # list[ACL] | (optional) +body = [wavefront_api_client.AccessControlListWriteDTO()] # list[AccessControlListWriteDTO] | (optional) try: # Removes the specified ids from the given dashboards' ACL @@ -663,7 +663,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**list[ACL]**](ACL.md)| | [optional] + **body** | [**list[AccessControlListWriteDTO]**](AccessControlListWriteDTO.md)| | [optional] ### Return type @@ -759,7 +759,7 @@ configuration.api_key['X-AUTH-TOKEN'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = wavefront_api_client.DashboardApi(wavefront_api_client.ApiClient(configuration)) -body = [wavefront_api_client.ACL()] # list[ACL] | (optional) +body = [wavefront_api_client.AccessControlListWriteDTO()] # list[AccessControlListWriteDTO] | (optional) try: # Set ACL for the specified dashboards @@ -772,7 +772,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**list[ACL]**](ACL.md)| | [optional] + **body** | [**list[AccessControlListWriteDTO]**](AccessControlListWriteDTO.md)| | [optional] ### Return type diff --git a/docs/PagedUserGroupModel.md b/docs/PagedUserGroupModel.md new file mode 100644 index 0000000..89a99a4 --- /dev/null +++ b/docs/PagedUserGroupModel.md @@ -0,0 +1,16 @@ +# PagedUserGroupModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cursor** | **str** | The id at which the current (limited) search can be continued to obtain more matching items | [optional] +**items** | [**list[UserGroupModel]**](UserGroupModel.md) | List of requested items | [optional] +**limit** | **int** | | [optional] +**more_items** | **bool** | Whether more items are available for return by increment offset or cursor | [optional] +**offset** | **int** | | [optional] +**sort** | [**Sorting**](Sorting.md) | | [optional] +**total_items** | **int** | An estimate (lower-bound) of the total number of items available for return. May not be a tight estimate for facet queries | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResponseContainerListAccessControlListReadDTO.md b/docs/ResponseContainerListAccessControlListReadDTO.md new file mode 100644 index 0000000..435283c --- /dev/null +++ b/docs/ResponseContainerListAccessControlListReadDTO.md @@ -0,0 +1,11 @@ +# ResponseContainerListAccessControlListReadDTO + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**response** | [**list[AccessControlListReadDTO]**](AccessControlListReadDTO.md) | | [optional] +**status** | [**ResponseStatus**](ResponseStatus.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResponseContainerListUserApiToken.md b/docs/ResponseContainerListUserApiToken.md new file mode 100644 index 0000000..2a7df32 --- /dev/null +++ b/docs/ResponseContainerListUserApiToken.md @@ -0,0 +1,11 @@ +# ResponseContainerListUserApiToken + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**response** | [**list[UserApiToken]**](UserApiToken.md) | | [optional] +**status** | [**ResponseStatus**](ResponseStatus.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResponseContainerListUserGroupModel.md b/docs/ResponseContainerListUserGroupModel.md new file mode 100644 index 0000000..49fdbe3 --- /dev/null +++ b/docs/ResponseContainerListUserGroupModel.md @@ -0,0 +1,11 @@ +# ResponseContainerListUserGroupModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**response** | [**list[UserGroupModel]**](UserGroupModel.md) | | [optional] +**status** | [**ResponseStatus**](ResponseStatus.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResponseContainerPagedUserGroupModel.md b/docs/ResponseContainerPagedUserGroupModel.md new file mode 100644 index 0000000..abe6c27 --- /dev/null +++ b/docs/ResponseContainerPagedUserGroupModel.md @@ -0,0 +1,11 @@ +# ResponseContainerPagedUserGroupModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**response** | [**PagedUserGroupModel**](PagedUserGroupModel.md) | | [optional] +**status** | [**ResponseStatus**](ResponseStatus.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResponseContainerUserApiToken.md b/docs/ResponseContainerUserApiToken.md new file mode 100644 index 0000000..cb1523e --- /dev/null +++ b/docs/ResponseContainerUserApiToken.md @@ -0,0 +1,11 @@ +# ResponseContainerUserApiToken + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**response** | [**UserApiToken**](UserApiToken.md) | | [optional] +**status** | [**ResponseStatus**](ResponseStatus.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResponseContainerUserGroupModel.md b/docs/ResponseContainerUserGroupModel.md new file mode 100644 index 0000000..4ca832b --- /dev/null +++ b/docs/ResponseContainerUserGroupModel.md @@ -0,0 +1,11 @@ +# ResponseContainerUserGroupModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**response** | [**UserGroupModel**](UserGroupModel.md) | | [optional] +**status** | [**ResponseStatus**](ResponseStatus.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SearchApi.md b/docs/SearchApi.md index b65d3d7..d9ab65d 100644 --- a/docs/SearchApi.md +++ b/docs/SearchApi.md @@ -2685,7 +2685,7 @@ Name | Type | Description | Notes [[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) # **search_user_group_entities** -> ResponseContainerPagedUserGroup search_user_group_entities(body=body) +> ResponseContainerPagedUserGroupModel search_user_group_entities(body=body) Search over a customer's user groups @@ -2725,7 +2725,7 @@ Name | Type | Description | Notes ### Return type -[**ResponseContainerPagedUserGroup**](ResponseContainerPagedUserGroup.md) +[**ResponseContainerPagedUserGroupModel**](ResponseContainerPagedUserGroupModel.md) ### Authorization diff --git a/docs/SearchQuery.md b/docs/SearchQuery.md index e7883de..a6c7596 100644 --- a/docs/SearchQuery.md +++ b/docs/SearchQuery.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **key** | **str** | The entity facet (key) by which to search. Valid keys are any property keys returned by the JSON representation of the entity. Examples are 'creatorId', 'name', etc. The following special key keywords are also valid: 'tags' performs a search on entity tags, 'tagpath' performs a hierarchical search on tags, with periods (.) as path level separators. 'freetext' performs a free text search across many fields of the entity | **matching_method** | **str** | The method by which search matching is performed. Default: CONTAINS | [optional] +**negated** | **bool** | The flag to create a NOT operation. Default: false | [optional] **value** | **str** | The entity facet value for which to search | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SettingsApi.md b/docs/SettingsApi.md index cb4cc9d..07f0001 100644 --- a/docs/SettingsApi.md +++ b/docs/SettingsApi.md @@ -111,7 +111,7 @@ 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_default_user_groups** -> ResponseContainerListUserGroup get_default_user_groups(body=body) +> ResponseContainerListUserGroupModel get_default_user_groups(body=body) Get default user groups customer preferences @@ -151,7 +151,7 @@ Name | Type | Description | Notes ### Return type -[**ResponseContainerListUserGroup**](ResponseContainerListUserGroup.md) +[**ResponseContainerListUserGroupModel**](ResponseContainerListUserGroupModel.md) ### Authorization diff --git a/docs/User.md b/docs/User.md index 30db5f5..9840b57 100644 --- a/docs/User.md +++ b/docs/User.md @@ -7,11 +7,13 @@ Name | Type | Description | Notes **api_token2** | **str** | | [optional] **credential** | **str** | | [optional] **customer** | **str** | | [optional] +**extra_api_tokens** | **list[str]** | | [optional] **groups** | **list[str]** | | [optional] **identifier** | **str** | | [optional] **invalid_password_attempts** | **int** | | [optional] **last_logout** | **int** | | [optional] **last_successful_login** | **int** | | [optional] +**old_passwords** | **list[str]** | | [optional] **onboarding_state** | **str** | | [optional] **provider** | **str** | | [optional] **reset_token** | **str** | | [optional] diff --git a/docs/UserApi.md b/docs/UserApi.md index 503de7d..8de4e07 100644 --- a/docs/UserApi.md +++ b/docs/UserApi.md @@ -8,8 +8,8 @@ Method | HTTP request | Description [**create_or_update_user**](UserApi.md#create_or_update_user) | **POST** /api/v2/user | Creates or updates a user [**delete_multiple_users**](UserApi.md#delete_multiple_users) | **POST** /api/v2/user/deleteUsers | Deletes multiple users [**delete_user**](UserApi.md#delete_user) | **DELETE** /api/v2/user/{id} | Deletes a user identified by id -[**get_all_user**](UserApi.md#get_all_user) | **GET** /api/v2/user | Get all users -[**get_user**](UserApi.md#get_user) | **GET** /api/v2/user/{id} | Retrieves a user by identifier (email addr) +[**get_all_users**](UserApi.md#get_all_users) | **GET** /api/v2/user | Get all users +[**get_user**](UserApi.md#get_user) | **GET** /api/v2/user/{id} | Retrieves a user by identifier (email address) [**grant_permission_to_users**](UserApi.md#grant_permission_to_users) | **POST** /api/v2/user/grant/{permission} | Grants a specific user permission to multiple users [**grant_user_permission**](UserApi.md#grant_user_permission) | **POST** /api/v2/user/{id}/grant | Grants a specific user permission [**invite_users**](UserApi.md#invite_users) | **POST** /api/v2/user/invite | Invite users with given user groups and permissions. @@ -239,8 +239,8 @@ void (empty response body) [[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_user** -> list[UserModel] get_all_user() +# **get_all_users** +> list[UserModel] get_all_users() Get all users @@ -265,10 +265,10 @@ api_instance = wavefront_api_client.UserApi(wavefront_api_client.ApiClient(confi try: # Get all users - api_response = api_instance.get_all_user() + api_response = api_instance.get_all_users() pprint(api_response) except ApiException as e: - print("Exception when calling UserApi->get_all_user: %s\n" % e) + print("Exception when calling UserApi->get_all_users: %s\n" % e) ``` ### Parameters @@ -292,7 +292,7 @@ This endpoint does not need any parameter. # **get_user** > UserModel get_user(id) -Retrieves a user by identifier (email addr) +Retrieves a user by identifier (email address) @@ -315,7 +315,7 @@ api_instance = wavefront_api_client.UserApi(wavefront_api_client.ApiClient(confi id = 'id_example' # str | try: - # Retrieves a user by identifier (email addr) + # Retrieves a user by identifier (email address) api_response = api_instance.get_user(id) pprint(api_response) except ApiException as e: @@ -367,7 +367,7 @@ configuration.api_key['X-AUTH-TOKEN'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = wavefront_api_client.UserApi(wavefront_api_client.ApiClient(configuration)) permission = 'permission_example' # str | Permission to grant to the users. Please note that 'host_tag_management' is the equivalent of the 'Source Tag Management' permission -body = [wavefront_api_client.list[str]()] # list[str] | list of users which should be revoked by specified permission (optional) +body = [wavefront_api_client.list[str]()] # list[str] | List of users which should be granted by specified permission (optional) try: # Grants a specific user permission to multiple users @@ -382,7 +382,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **permission** | **str**| Permission to grant to the users. Please note that 'host_tag_management' is the equivalent of the 'Source Tag Management' permission | - **body** | **list[str]**| list of users which should be revoked by specified permission | [optional] + **body** | **list[str]**| List of users which should be granted by specified permission | [optional] ### Return type @@ -589,7 +589,7 @@ configuration.api_key['X-AUTH-TOKEN'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = wavefront_api_client.UserApi(wavefront_api_client.ApiClient(configuration)) permission = 'permission_example' # str | Permission to grant to the users. Please note that 'host_tag_management' is the equivalent of the 'Source Tag Management' permission -body = [wavefront_api_client.list[str]()] # list[str] | list of users which should be revoked by specified permission (optional) +body = [wavefront_api_client.list[str]()] # list[str] | List of users which should be revoked by specified permission (optional) try: # Revokes a specific user permission from multiple users @@ -604,7 +604,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **permission** | **str**| Permission to grant to the users. Please note that 'host_tag_management' is the equivalent of the 'Source Tag Management' permission | - **body** | **list[str]**| list of users which should be revoked by specified permission | [optional] + **body** | **list[str]**| List of users which should be revoked by specified permission | [optional] ### Return type diff --git a/docs/UserApiToken.md b/docs/UserApiToken.md new file mode 100644 index 0000000..c0fa9b3 --- /dev/null +++ b/docs/UserApiToken.md @@ -0,0 +1,11 @@ +# UserApiToken + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token_id** | **str** | The identifier of the user API token | +**token_name** | **str** | The name of the user API token | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserGroup.md b/docs/UserGroup.md index 949a237..44eb5f7 100644 --- a/docs/UserGroup.md +++ b/docs/UserGroup.md @@ -3,14 +3,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**created_epoch_millis** | **int** | | [optional] -**customer** | **str** | The id of the customer to which the user group belongs | [optional] -**id** | **str** | The unique identifier of the user group | [optional] -**name** | **str** | The name of the user group | -**permissions** | **list[str]** | List of permissions the user group has been granted access to | +**customer** | **str** | ID of the customer to which the user group belongs | [optional] +**description** | **str** | The description of the user group | [optional] +**id** | **str** | Unique ID for the user group | [optional] +**name** | **str** | Name of the user group | [optional] +**permissions** | **list[str]** | Permission assigned to the user group | [optional] **properties** | [**UserGroupPropertiesDTO**](UserGroupPropertiesDTO.md) | The properties of the user group(name editable, users editable, etc.) | [optional] **user_count** | **int** | Total number of users that are members of the user group | [optional] -**users** | **list[str]** | List(may be incomplete) of users that are members of the user group. | [optional] +**users** | **list[str]** | List of Users that are members of the user group. Maybe incomplete. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserGroupApi.md b/docs/UserGroupApi.md index 580d8e6..9f2bd2c 100644 --- a/docs/UserGroupApi.md +++ b/docs/UserGroupApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description # **add_users_to_user_group** -> ResponseContainerUserGroup add_users_to_user_group(id, body=body) +> ResponseContainerUserGroupModel add_users_to_user_group(id, body=body) Add multiple users to a specific user group @@ -58,7 +58,7 @@ Name | Type | Description | Notes ### Return type -[**ResponseContainerUserGroup**](ResponseContainerUserGroup.md) +[**ResponseContainerUserGroupModel**](ResponseContainerUserGroupModel.md) ### Authorization @@ -72,7 +72,7 @@ Name | Type | Description | Notes [[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) # **create_user_group** -> ResponseContainerUserGroup create_user_group(body=body) +> ResponseContainerUserGroupModel create_user_group(body=body) Create a specific user group @@ -94,7 +94,7 @@ configuration.api_key['X-AUTH-TOKEN'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = wavefront_api_client.UserGroupApi(wavefront_api_client.ApiClient(configuration)) -body = wavefront_api_client.UserGroupWrite() # UserGroupWrite | Example Body:
{   \"name\": \"UserGroup name\",   \"permissions\": [   \"permission1\",   \"permission2\",   \"permission3\"   ] }
(optional) +body = wavefront_api_client.UserGroupWrite() # UserGroupWrite | Example Body:
{   \"name\": \"UserGroup name\",   \"permissions\": [   \"permission1\",   \"permission2\",   \"permission3\"   ],   \"description\": \"UserGroup description\" }
(optional) try: # Create a specific user group @@ -108,11 +108,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**UserGroupWrite**](UserGroupWrite.md)| Example Body: <pre>{ \"name\": \"UserGroup name\", \"permissions\": [ \"permission1\", \"permission2\", \"permission3\" ] }</pre> | [optional] + **body** | [**UserGroupWrite**](UserGroupWrite.md)| Example Body: <pre>{ \"name\": \"UserGroup name\", \"permissions\": [ \"permission1\", \"permission2\", \"permission3\" ], \"description\": \"UserGroup description\" }</pre> | [optional] ### Return type -[**ResponseContainerUserGroup**](ResponseContainerUserGroup.md) +[**ResponseContainerUserGroupModel**](ResponseContainerUserGroupModel.md) ### Authorization @@ -126,7 +126,7 @@ Name | Type | Description | Notes [[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) # **delete_user_group** -> ResponseContainerUserGroup delete_user_group(id) +> ResponseContainerUserGroupModel delete_user_group(id) Delete a specific user group @@ -166,7 +166,7 @@ Name | Type | Description | Notes ### Return type -[**ResponseContainerUserGroup**](ResponseContainerUserGroup.md) +[**ResponseContainerUserGroupModel**](ResponseContainerUserGroupModel.md) ### Authorization @@ -180,7 +180,7 @@ Name | Type | Description | Notes [[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_user_groups** -> ResponseContainerPagedUserGroup get_all_user_groups(offset=offset, limit=limit) +> ResponseContainerPagedUserGroupModel get_all_user_groups(offset=offset, limit=limit) Get all user groups for a customer @@ -222,7 +222,7 @@ Name | Type | Description | Notes ### Return type -[**ResponseContainerPagedUserGroup**](ResponseContainerPagedUserGroup.md) +[**ResponseContainerPagedUserGroupModel**](ResponseContainerPagedUserGroupModel.md) ### Authorization @@ -236,7 +236,7 @@ Name | Type | Description | Notes [[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_user_group** -> ResponseContainerUserGroup get_user_group(id) +> ResponseContainerUserGroupModel get_user_group(id) Get a specific user group @@ -276,7 +276,7 @@ Name | Type | Description | Notes ### Return type -[**ResponseContainerUserGroup**](ResponseContainerUserGroup.md) +[**ResponseContainerUserGroupModel**](ResponseContainerUserGroupModel.md) ### Authorization @@ -290,7 +290,7 @@ Name | Type | Description | Notes [[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) # **grant_permission_to_user_groups** -> ResponseContainerUserGroup grant_permission_to_user_groups(permission, body=body) +> ResponseContainerUserGroupModel grant_permission_to_user_groups(permission, body=body) Grants a single permission to user group(s) @@ -332,7 +332,7 @@ Name | Type | Description | Notes ### Return type -[**ResponseContainerUserGroup**](ResponseContainerUserGroup.md) +[**ResponseContainerUserGroupModel**](ResponseContainerUserGroupModel.md) ### Authorization @@ -346,7 +346,7 @@ Name | Type | Description | Notes [[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) # **remove_users_from_user_group** -> ResponseContainerUserGroup remove_users_from_user_group(id, body=body) +> ResponseContainerUserGroupModel remove_users_from_user_group(id, body=body) Remove multiple users from a specific user group @@ -388,7 +388,7 @@ Name | Type | Description | Notes ### Return type -[**ResponseContainerUserGroup**](ResponseContainerUserGroup.md) +[**ResponseContainerUserGroupModel**](ResponseContainerUserGroupModel.md) ### Authorization @@ -402,7 +402,7 @@ Name | Type | Description | Notes [[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) # **revoke_permission_from_user_groups** -> ResponseContainerUserGroup revoke_permission_from_user_groups(permission, body=body) +> ResponseContainerUserGroupModel revoke_permission_from_user_groups(permission, body=body) Revokes a single permission from user group(s) @@ -444,7 +444,7 @@ Name | Type | Description | Notes ### Return type -[**ResponseContainerUserGroup**](ResponseContainerUserGroup.md) +[**ResponseContainerUserGroupModel**](ResponseContainerUserGroupModel.md) ### Authorization @@ -458,7 +458,7 @@ Name | Type | Description | Notes [[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) # **update_user_group** -> ResponseContainerUserGroup update_user_group(id, body=body) +> ResponseContainerUserGroupModel update_user_group(id, body=body) Update a specific user group @@ -481,7 +481,7 @@ configuration.api_key['X-AUTH-TOKEN'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = wavefront_api_client.UserGroupApi(wavefront_api_client.ApiClient(configuration)) id = 'id_example' # str | -body = wavefront_api_client.UserGroupWrite() # UserGroupWrite | Example Body:
{   \"id\": \"UserGroup identifier\",   \"name\": \"UserGroup name\",   \"permissions\": [   \"permission1\",   \"permission2\",   \"permission3\"   ] }
(optional) +body = wavefront_api_client.UserGroupWrite() # UserGroupWrite | Example Body:
{   \"id\": \"UserGroup identifier\",   \"name\": \"UserGroup name\",   \"permissions\": [   \"permission1\",   \"permission2\",   \"permission3\"   ],   \"description\": \"UserGroup description\" }
(optional) try: # Update a specific user group @@ -496,11 +496,11 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| | - **body** | [**UserGroupWrite**](UserGroupWrite.md)| Example Body: <pre>{ \"id\": \"UserGroup identifier\", \"name\": \"UserGroup name\", \"permissions\": [ \"permission1\", \"permission2\", \"permission3\" ] }</pre> | [optional] + **body** | [**UserGroupWrite**](UserGroupWrite.md)| Example Body: <pre>{ \"id\": \"UserGroup identifier\", \"name\": \"UserGroup name\", \"permissions\": [ \"permission1\", \"permission2\", \"permission3\" ], \"description\": \"UserGroup description\" }</pre> | [optional] ### Return type -[**ResponseContainerUserGroup**](ResponseContainerUserGroup.md) +[**ResponseContainerUserGroupModel**](ResponseContainerUserGroupModel.md) ### Authorization diff --git a/docs/UserGroupModel.md b/docs/UserGroupModel.md new file mode 100644 index 0000000..79f0291 --- /dev/null +++ b/docs/UserGroupModel.md @@ -0,0 +1,18 @@ +# UserGroupModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_epoch_millis** | **int** | | [optional] +**customer** | **str** | The id of the customer to which the user group belongs | [optional] +**description** | **str** | The description of the user group | [optional] +**id** | **str** | The unique identifier of the user group | [optional] +**name** | **str** | The name of the user group | +**permissions** | **list[str]** | List of permissions the user group has been granted access to | +**properties** | [**UserGroupPropertiesDTO**](UserGroupPropertiesDTO.md) | The properties of the user group(name editable, users editable, etc.) | [optional] +**user_count** | **int** | Total number of users that are members of the user group | [optional] +**users** | **list[str]** | List(may be incomplete) of users that are members of the user group. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserGroupWrite.md b/docs/UserGroupWrite.md index 8b4d5e4..a037da9 100644 --- a/docs/UserGroupWrite.md +++ b/docs/UserGroupWrite.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **created_epoch_millis** | **int** | | [optional] **customer** | **str** | The id of the customer to which the user group belongs | [optional] +**description** | **str** | The description of the user group | [optional] **id** | **str** | The unique identifier of the user group | [optional] **name** | **str** | The name of the user group | **permissions** | **list[str]** | List of permissions the user group has been granted access to | diff --git a/docs/UserSettings.md b/docs/UserSettings.md index 73d7534..f5b62bf 100644 --- a/docs/UserSettings.md +++ b/docs/UserSettings.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **always_hide_querybuilder** | **bool** | | [optional] **chart_title_scalar** | **int** | | [optional] +**favorite_qb_functions** | **list[str]** | | [optional] **hide_ts_when_querybuilder_shown** | **bool** | | [optional] **landing_dashboard_slug** | **str** | | [optional] **preferred_time_zone** | **str** | | [optional] diff --git a/setup.py b/setup.py index 4d93a1f..bdc2963 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "wavefront-api-client" -VERSION = "2.30.15" +VERSION = "2.32.19" # To install the library, run the following # # python setup.py install diff --git a/test/test_access_control_list_read_dto.py b/test/test_access_control_list_read_dto.py new file mode 100644 index 0000000..b52b0ef --- /dev/null +++ b/test/test_access_control_list_read_dto.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Wavefront REST API + +

The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.

When you make REST API calls outside the Wavefront REST API documentation you must add the header \"Authorization: Bearer <<API-TOKEN>>\" to your HTTP requests.

# noqa: E501 + + OpenAPI spec version: v2 + Contact: chitimba@wavefront.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import wavefront_api_client +from wavefront_api_client.models.access_control_list_read_dto import AccessControlListReadDTO # noqa: E501 +from wavefront_api_client.rest import ApiException + + +class TestAccessControlListReadDTO(unittest.TestCase): + """AccessControlListReadDTO unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAccessControlListReadDTO(self): + """Test AccessControlListReadDTO""" + # FIXME: construct object with mandatory attributes with example values + # model = wavefront_api_client.models.access_control_list_read_dto.AccessControlListReadDTO() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_access_control_list_write_dto.py b/test/test_access_control_list_write_dto.py new file mode 100644 index 0000000..d5ea6aa --- /dev/null +++ b/test/test_access_control_list_write_dto.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Wavefront REST API + +

The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.

When you make REST API calls outside the Wavefront REST API documentation you must add the header \"Authorization: Bearer <<API-TOKEN>>\" to your HTTP requests.

# noqa: E501 + + OpenAPI spec version: v2 + Contact: chitimba@wavefront.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import wavefront_api_client +from wavefront_api_client.models.access_control_list_write_dto import AccessControlListWriteDTO # noqa: E501 +from wavefront_api_client.rest import ApiException + + +class TestAccessControlListWriteDTO(unittest.TestCase): + """AccessControlListWriteDTO unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAccessControlListWriteDTO(self): + """Test AccessControlListWriteDTO""" + # FIXME: construct object with mandatory attributes with example values + # model = wavefront_api_client.models.access_control_list_write_dto.AccessControlListWriteDTO() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_api_token_api.py b/test/test_api_token_api.py new file mode 100644 index 0000000..e4b5ab1 --- /dev/null +++ b/test/test_api_token_api.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Wavefront REST API + +

The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.

When you make REST API calls outside the Wavefront REST API documentation you must add the header \"Authorization: Bearer <<API-TOKEN>>\" to your HTTP requests.

# noqa: E501 + + OpenAPI spec version: v2 + Contact: chitimba@wavefront.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import wavefront_api_client +from wavefront_api_client.api.api_token_api import ApiTokenApi # noqa: E501 +from wavefront_api_client.rest import ApiException + + +class TestApiTokenApi(unittest.TestCase): + """ApiTokenApi unit test stubs""" + + def setUp(self): + self.api = wavefront_api_client.api.api_token_api.ApiTokenApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_token(self): + """Test case for create_token + + Create new api token # noqa: E501 + """ + pass + + def test_delete_token(self): + """Test case for delete_token + + Delete the specified api token # noqa: E501 + """ + pass + + def test_get_all_tokens(self): + """Test case for get_all_tokens + + Get all api tokens for a user # noqa: E501 + """ + pass + + def test_update_token_name(self): + """Test case for update_token_name + + Update the name of the specified api token # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paged_user_group_model.py b/test/test_paged_user_group_model.py new file mode 100644 index 0000000..0bcfdd9 --- /dev/null +++ b/test/test_paged_user_group_model.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Wavefront REST API + +

The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.

When you make REST API calls outside the Wavefront REST API documentation you must add the header \"Authorization: Bearer <<API-TOKEN>>\" to your HTTP requests.

# noqa: E501 + + OpenAPI spec version: v2 + Contact: chitimba@wavefront.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import wavefront_api_client +from wavefront_api_client.models.paged_user_group_model import PagedUserGroupModel # noqa: E501 +from wavefront_api_client.rest import ApiException + + +class TestPagedUserGroupModel(unittest.TestCase): + """PagedUserGroupModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPagedUserGroupModel(self): + """Test PagedUserGroupModel""" + # FIXME: construct object with mandatory attributes with example values + # model = wavefront_api_client.models.paged_user_group_model.PagedUserGroupModel() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_response_container_list_access_control_list_read_dto.py b/test/test_response_container_list_access_control_list_read_dto.py new file mode 100644 index 0000000..3475dbb --- /dev/null +++ b/test/test_response_container_list_access_control_list_read_dto.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Wavefront REST API + +

The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.

When you make REST API calls outside the Wavefront REST API documentation you must add the header \"Authorization: Bearer <<API-TOKEN>>\" to your HTTP requests.

# noqa: E501 + + OpenAPI spec version: v2 + Contact: chitimba@wavefront.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import wavefront_api_client +from wavefront_api_client.models.response_container_list_access_control_list_read_dto import ResponseContainerListAccessControlListReadDTO # noqa: E501 +from wavefront_api_client.rest import ApiException + + +class TestResponseContainerListAccessControlListReadDTO(unittest.TestCase): + """ResponseContainerListAccessControlListReadDTO unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testResponseContainerListAccessControlListReadDTO(self): + """Test ResponseContainerListAccessControlListReadDTO""" + # FIXME: construct object with mandatory attributes with example values + # model = wavefront_api_client.models.response_container_list_access_control_list_read_dto.ResponseContainerListAccessControlListReadDTO() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_response_container_list_user_api_token.py b/test/test_response_container_list_user_api_token.py new file mode 100644 index 0000000..5507d1f --- /dev/null +++ b/test/test_response_container_list_user_api_token.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Wavefront REST API + +

The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.

When you make REST API calls outside the Wavefront REST API documentation you must add the header \"Authorization: Bearer <<API-TOKEN>>\" to your HTTP requests.

# noqa: E501 + + OpenAPI spec version: v2 + Contact: chitimba@wavefront.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import wavefront_api_client +from wavefront_api_client.models.response_container_list_user_api_token import ResponseContainerListUserApiToken # noqa: E501 +from wavefront_api_client.rest import ApiException + + +class TestResponseContainerListUserApiToken(unittest.TestCase): + """ResponseContainerListUserApiToken unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testResponseContainerListUserApiToken(self): + """Test ResponseContainerListUserApiToken""" + # FIXME: construct object with mandatory attributes with example values + # model = wavefront_api_client.models.response_container_list_user_api_token.ResponseContainerListUserApiToken() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_response_container_list_user_group_model.py b/test/test_response_container_list_user_group_model.py new file mode 100644 index 0000000..c98c25a --- /dev/null +++ b/test/test_response_container_list_user_group_model.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Wavefront REST API + +

The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.

When you make REST API calls outside the Wavefront REST API documentation you must add the header \"Authorization: Bearer <<API-TOKEN>>\" to your HTTP requests.

# noqa: E501 + + OpenAPI spec version: v2 + Contact: chitimba@wavefront.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import wavefront_api_client +from wavefront_api_client.models.response_container_list_user_group_model import ResponseContainerListUserGroupModel # noqa: E501 +from wavefront_api_client.rest import ApiException + + +class TestResponseContainerListUserGroupModel(unittest.TestCase): + """ResponseContainerListUserGroupModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testResponseContainerListUserGroupModel(self): + """Test ResponseContainerListUserGroupModel""" + # FIXME: construct object with mandatory attributes with example values + # model = wavefront_api_client.models.response_container_list_user_group_model.ResponseContainerListUserGroupModel() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_response_container_paged_user_group_model.py b/test/test_response_container_paged_user_group_model.py new file mode 100644 index 0000000..c1d30d4 --- /dev/null +++ b/test/test_response_container_paged_user_group_model.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Wavefront REST API + +

The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.

When you make REST API calls outside the Wavefront REST API documentation you must add the header \"Authorization: Bearer <<API-TOKEN>>\" to your HTTP requests.

# noqa: E501 + + OpenAPI spec version: v2 + Contact: chitimba@wavefront.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import wavefront_api_client +from wavefront_api_client.models.response_container_paged_user_group_model import ResponseContainerPagedUserGroupModel # noqa: E501 +from wavefront_api_client.rest import ApiException + + +class TestResponseContainerPagedUserGroupModel(unittest.TestCase): + """ResponseContainerPagedUserGroupModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testResponseContainerPagedUserGroupModel(self): + """Test ResponseContainerPagedUserGroupModel""" + # FIXME: construct object with mandatory attributes with example values + # model = wavefront_api_client.models.response_container_paged_user_group_model.ResponseContainerPagedUserGroupModel() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_response_container_user_api_token.py b/test/test_response_container_user_api_token.py new file mode 100644 index 0000000..9bd8d13 --- /dev/null +++ b/test/test_response_container_user_api_token.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Wavefront REST API + +

The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.

When you make REST API calls outside the Wavefront REST API documentation you must add the header \"Authorization: Bearer <<API-TOKEN>>\" to your HTTP requests.

# noqa: E501 + + OpenAPI spec version: v2 + Contact: chitimba@wavefront.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import wavefront_api_client +from wavefront_api_client.models.response_container_user_api_token import ResponseContainerUserApiToken # noqa: E501 +from wavefront_api_client.rest import ApiException + + +class TestResponseContainerUserApiToken(unittest.TestCase): + """ResponseContainerUserApiToken unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testResponseContainerUserApiToken(self): + """Test ResponseContainerUserApiToken""" + # FIXME: construct object with mandatory attributes with example values + # model = wavefront_api_client.models.response_container_user_api_token.ResponseContainerUserApiToken() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_response_container_user_group_model.py b/test/test_response_container_user_group_model.py new file mode 100644 index 0000000..543e56e --- /dev/null +++ b/test/test_response_container_user_group_model.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Wavefront REST API + +

The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.

When you make REST API calls outside the Wavefront REST API documentation you must add the header \"Authorization: Bearer <<API-TOKEN>>\" to your HTTP requests.

# noqa: E501 + + OpenAPI spec version: v2 + Contact: chitimba@wavefront.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import wavefront_api_client +from wavefront_api_client.models.response_container_user_group_model import ResponseContainerUserGroupModel # noqa: E501 +from wavefront_api_client.rest import ApiException + + +class TestResponseContainerUserGroupModel(unittest.TestCase): + """ResponseContainerUserGroupModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testResponseContainerUserGroupModel(self): + """Test ResponseContainerUserGroupModel""" + # FIXME: construct object with mandatory attributes with example values + # model = wavefront_api_client.models.response_container_user_group_model.ResponseContainerUserGroupModel() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_api_token.py b/test/test_user_api_token.py new file mode 100644 index 0000000..13dd86b --- /dev/null +++ b/test/test_user_api_token.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Wavefront REST API + +

The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.

When you make REST API calls outside the Wavefront REST API documentation you must add the header \"Authorization: Bearer <<API-TOKEN>>\" to your HTTP requests.

# noqa: E501 + + OpenAPI spec version: v2 + Contact: chitimba@wavefront.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import wavefront_api_client +from wavefront_api_client.models.user_api_token import UserApiToken # noqa: E501 +from wavefront_api_client.rest import ApiException + + +class TestUserApiToken(unittest.TestCase): + """UserApiToken unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUserApiToken(self): + """Test UserApiToken""" + # FIXME: construct object with mandatory attributes with example values + # model = wavefront_api_client.models.user_api_token.UserApiToken() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_group_model.py b/test/test_user_group_model.py new file mode 100644 index 0000000..c5bf731 --- /dev/null +++ b/test/test_user_group_model.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Wavefront REST API + +

The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.

When you make REST API calls outside the Wavefront REST API documentation you must add the header \"Authorization: Bearer <<API-TOKEN>>\" to your HTTP requests.

# noqa: E501 + + OpenAPI spec version: v2 + Contact: chitimba@wavefront.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import wavefront_api_client +from wavefront_api_client.models.user_group_model import UserGroupModel # noqa: E501 +from wavefront_api_client.rest import ApiException + + +class TestUserGroupModel(unittest.TestCase): + """UserGroupModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testUserGroupModel(self): + """Test UserGroupModel""" + # FIXME: construct object with mandatory attributes with example values + # model = wavefront_api_client.models.user_group_model.UserGroupModel() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/wavefront_api_client/__init__.py b/wavefront_api_client/__init__.py index 9122e8e..cc52389 100644 --- a/wavefront_api_client/__init__.py +++ b/wavefront_api_client/__init__.py @@ -17,6 +17,7 @@ # import apis into sdk package from wavefront_api_client.api.alert_api import AlertApi +from wavefront_api_client.api.api_token_api import ApiTokenApi from wavefront_api_client.api.cloud_integration_api import CloudIntegrationApi from wavefront_api_client.api.dashboard_api import DashboardApi from wavefront_api_client.api.derived_metric_api import DerivedMetricApi @@ -42,10 +43,11 @@ from wavefront_api_client.api_client import ApiClient from wavefront_api_client.configuration import Configuration # import models into sdk package -from wavefront_api_client.models.acl import ACL from wavefront_api_client.models.aws_base_credentials import AWSBaseCredentials from wavefront_api_client.models.access_control_element import AccessControlElement +from wavefront_api_client.models.access_control_list_read_dto import AccessControlListReadDTO from wavefront_api_client.models.access_control_list_simple import AccessControlListSimple +from wavefront_api_client.models.access_control_list_write_dto import AccessControlListWriteDTO from wavefront_api_client.models.alert import Alert from wavefront_api_client.models.avro_backed_standardized_dto import AvroBackedStandardizedDTO from wavefront_api_client.models.azure_activity_log_configuration import AzureActivityLogConfiguration @@ -117,7 +119,7 @@ from wavefront_api_client.models.paged_proxy import PagedProxy from wavefront_api_client.models.paged_saved_search import PagedSavedSearch from wavefront_api_client.models.paged_source import PagedSource -from wavefront_api_client.models.paged_user_group import PagedUserGroup +from wavefront_api_client.models.paged_user_group_model import PagedUserGroupModel from wavefront_api_client.models.point import Point from wavefront_api_client.models.proxy import Proxy from wavefront_api_client.models.query_event import QueryEvent @@ -135,11 +137,12 @@ from wavefront_api_client.models.response_container_history_response import ResponseContainerHistoryResponse from wavefront_api_client.models.response_container_integration import ResponseContainerIntegration from wavefront_api_client.models.response_container_integration_status import ResponseContainerIntegrationStatus -from wavefront_api_client.models.response_container_list_acl import ResponseContainerListACL +from wavefront_api_client.models.response_container_list_access_control_list_read_dto import ResponseContainerListAccessControlListReadDTO from wavefront_api_client.models.response_container_list_integration import ResponseContainerListIntegration from wavefront_api_client.models.response_container_list_integration_manifest_group import ResponseContainerListIntegrationManifestGroup from wavefront_api_client.models.response_container_list_string import ResponseContainerListString -from wavefront_api_client.models.response_container_list_user_group import ResponseContainerListUserGroup +from wavefront_api_client.models.response_container_list_user_api_token import ResponseContainerListUserApiToken +from wavefront_api_client.models.response_container_list_user_group_model import ResponseContainerListUserGroupModel from wavefront_api_client.models.response_container_maintenance_window import ResponseContainerMaintenanceWindow from wavefront_api_client.models.response_container_map_string_integer import ResponseContainerMapStringInteger from wavefront_api_client.models.response_container_map_string_integration_status import ResponseContainerMapStringIntegrationStatus @@ -161,12 +164,13 @@ from wavefront_api_client.models.response_container_paged_proxy import ResponseContainerPagedProxy from wavefront_api_client.models.response_container_paged_saved_search import ResponseContainerPagedSavedSearch from wavefront_api_client.models.response_container_paged_source import ResponseContainerPagedSource -from wavefront_api_client.models.response_container_paged_user_group import ResponseContainerPagedUserGroup +from wavefront_api_client.models.response_container_paged_user_group_model import ResponseContainerPagedUserGroupModel from wavefront_api_client.models.response_container_proxy import ResponseContainerProxy from wavefront_api_client.models.response_container_saved_search import ResponseContainerSavedSearch from wavefront_api_client.models.response_container_source import ResponseContainerSource from wavefront_api_client.models.response_container_tags_response import ResponseContainerTagsResponse -from wavefront_api_client.models.response_container_user_group import ResponseContainerUserGroup +from wavefront_api_client.models.response_container_user_api_token import ResponseContainerUserApiToken +from wavefront_api_client.models.response_container_user_group_model import ResponseContainerUserGroupModel from wavefront_api_client.models.response_container_validated_users_dto import ResponseContainerValidatedUsersDTO from wavefront_api_client.models.response_status import ResponseStatus from wavefront_api_client.models.saved_search import SavedSearch @@ -182,8 +186,10 @@ from wavefront_api_client.models.tesla_configuration import TeslaConfiguration from wavefront_api_client.models.timeseries import Timeseries from wavefront_api_client.models.user import User +from wavefront_api_client.models.user_api_token import UserApiToken from wavefront_api_client.models.user_dto import UserDTO from wavefront_api_client.models.user_group import UserGroup +from wavefront_api_client.models.user_group_model import UserGroupModel from wavefront_api_client.models.user_group_properties_dto import UserGroupPropertiesDTO from wavefront_api_client.models.user_group_write import UserGroupWrite from wavefront_api_client.models.user_model import UserModel diff --git a/wavefront_api_client/api/__init__.py b/wavefront_api_client/api/__init__.py index 7bcb6c4..fdeab62 100644 --- a/wavefront_api_client/api/__init__.py +++ b/wavefront_api_client/api/__init__.py @@ -4,6 +4,7 @@ # import apis into api package from wavefront_api_client.api.alert_api import AlertApi +from wavefront_api_client.api.api_token_api import ApiTokenApi from wavefront_api_client.api.cloud_integration_api import CloudIntegrationApi from wavefront_api_client.api.dashboard_api import DashboardApi from wavefront_api_client.api.derived_metric_api import DerivedMetricApi diff --git a/wavefront_api_client/api/alert_api.py b/wavefront_api_client/api/alert_api.py index fa0f220..7772ea6 100644 --- a/wavefront_api_client/api/alert_api.py +++ b/wavefront_api_client/api/alert_api.py @@ -33,6 +33,101 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client + def add_access(self, **kwargs): # noqa: E501 + """Adds the specified ids to the given alerts' ACL # 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.add_access(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param list[AccessControlListWriteDTO] body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.add_access_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.add_access_with_http_info(**kwargs) # noqa: E501 + return data + + def add_access_with_http_info(self, **kwargs): # noqa: E501 + """Adds the specified ids to the given alerts' ACL # 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.add_access_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param list[AccessControlListWriteDTO] body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # 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 add_access" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/alert/acl/add', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 add_alert_tag(self, id, tag_value, **kwargs): # noqa: E501 """Add a tag to a specific alert # noqa: E501 @@ -140,6 +235,210 @@ def add_alert_tag_with_http_info(self, id, tag_value, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def can_user_modify(self, id, **kwargs): # noqa: E501 + """can_user_modify # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.can_user_modify(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :param User body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.can_user_modify_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.can_user_modify_with_http_info(id, **kwargs) # noqa: E501 + return data + + def can_user_modify_with_http_info(self, id, **kwargs): # noqa: E501 + """can_user_modify # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.can_user_modify_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :param User body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'body'] # 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 can_user_modify" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `can_user_modify`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # 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/{id}/canUserModify', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 clone_alert(self, id, **kwargs): # noqa: E501 + """Clones the specified alert # 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.clone_alert(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :param str name: + :param int v: + :return: ResponseContainerAlert + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.clone_alert_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.clone_alert_with_http_info(id, **kwargs) # noqa: E501 + return data + + def clone_alert_with_http_info(self, id, **kwargs): # noqa: E501 + """Clones the specified alert # 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.clone_alert_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :param str name: + :param int v: + :return: ResponseContainerAlert + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'name', 'v'] # 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 clone_alert" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `clone_alert`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'name' in params: + query_params.append(('name', params['name'])) # noqa: E501 + if 'v' in params: + query_params.append(('v', params['v'])) # 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 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/alert/{id}/clone', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ResponseContainerAlert', # 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 create_alert(self, **kwargs): # noqa: E501 """Create a specific alert # noqa: E501 @@ -330,6 +629,98 @@ def delete_alert_with_http_info(self, id, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def get_access_control_list(self, **kwargs): # noqa: E501 + """Get Access Control Lists' union for the specified alerts # 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_access_control_list(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param list[str] id: + :return: ResponseContainerListAccessControlListReadDTO + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_access_control_list_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_access_control_list_with_http_info(**kwargs) # noqa: E501 + return data + + def get_access_control_list_with_http_info(self, **kwargs): # noqa: E501 + """Get Access Control Lists' union for the specified alerts # 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_access_control_list_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param list[str] id: + :return: ResponseContainerListAccessControlListReadDTO + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # 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_access_control_list" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'id' in params: + query_params.append(('id', params['id'])) # noqa: E501 + collection_formats['id'] = 'multi' # 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/acl', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ResponseContainerListAccessControlListReadDTO', # 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_alert(self, id, **kwargs): # noqa: E501 """Get a specific alert # noqa: E501 @@ -1003,6 +1394,101 @@ def hide_alert_with_http_info(self, id, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def remove_access(self, **kwargs): # noqa: E501 + """Removes the specified ids from the given alerts' ACL # 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.remove_access(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param list[AccessControlListWriteDTO] body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.remove_access_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.remove_access_with_http_info(**kwargs) # noqa: E501 + return data + + def remove_access_with_http_info(self, **kwargs): # noqa: E501 + """Removes the specified ids from the given alerts' ACL # 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.remove_access_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param list[AccessControlListWriteDTO] body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # 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 remove_access" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/alert/acl/remove', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 remove_alert_tag(self, id, tag_value, **kwargs): # noqa: E501 """Remove a tag from a specific alert # noqa: E501 @@ -1106,6 +1592,101 @@ def remove_alert_tag_with_http_info(self, id, tag_value, **kwargs): # noqa: E50 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def set_acl(self, **kwargs): # noqa: E501 + """Set ACL for the specified alerts # 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.set_acl(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param list[AccessControlListWriteDTO] body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.set_acl_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.set_acl_with_http_info(**kwargs) # noqa: E501 + return data + + def set_acl_with_http_info(self, **kwargs): # noqa: E501 + """Set ACL for the specified alerts # 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.set_acl_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param list[AccessControlListWriteDTO] body: + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # 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 set_acl" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/alert/acl/set', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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 set_alert_tags(self, id, **kwargs): # noqa: E501 """Set all tags associated with a specific alert # noqa: E501 diff --git a/wavefront_api_client/api/api_token_api.py b/wavefront_api_client/api/api_token_api.py new file mode 100644 index 0000000..e679254 --- /dev/null +++ b/wavefront_api_client/api/api_token_api.py @@ -0,0 +1,406 @@ +# coding: utf-8 + +""" + Wavefront REST API + +

The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.

When you make REST API calls outside the Wavefront REST API documentation you must add the header \"Authorization: Bearer <<API-TOKEN>>\" to your HTTP requests.

# noqa: E501 + + OpenAPI spec version: v2 + Contact: chitimba@wavefront.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from wavefront_api_client.api_client import ApiClient + + +class ApiTokenApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_token(self, **kwargs): # noqa: E501 + """Create new api token # noqa: E501 + + Returns the list of all api tokens for a user. The newly created api token is the last element of returned list. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_token(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: ResponseContainerListUserApiToken + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_token_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.create_token_with_http_info(**kwargs) # noqa: E501 + return data + + def create_token_with_http_info(self, **kwargs): # noqa: E501 + """Create new api token # noqa: E501 + + Returns the list of all api tokens for a user. The newly created api token is the last element of returned list. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_token_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: ResponseContainerListUserApiToken + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # 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 create_token" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + 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/apitoken', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ResponseContainerListUserApiToken', # 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 delete_token(self, id, **kwargs): # noqa: E501 + """Delete the specified api token # 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.delete_token(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :return: ResponseContainerListUserApiToken + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_token_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.delete_token_with_http_info(id, **kwargs) # noqa: E501 + return data + + def delete_token_with_http_info(self, id, **kwargs): # noqa: E501 + """Delete the specified api token # 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.delete_token_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :return: ResponseContainerListUserApiToken + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # 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 delete_token" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `delete_token`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + 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/apitoken/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ResponseContainerListUserApiToken', # 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_tokens(self, **kwargs): # noqa: E501 + """Get all api tokens for a user # 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_all_tokens(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: ResponseContainerListUserApiToken + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_all_tokens_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_all_tokens_with_http_info(**kwargs) # noqa: E501 + return data + + def get_all_tokens_with_http_info(self, **kwargs): # noqa: E501 + """Get all api tokens for a user # 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_all_tokens_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: ResponseContainerListUserApiToken + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # 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_all_tokens" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + 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/apitoken', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ResponseContainerListUserApiToken', # 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 update_token_name(self, id, **kwargs): # noqa: E501 + """Update the name of the specified api token # 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.update_token_name(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :param UserApiToken body: Example Body:
{   \"tokenID\": \"Token identifier\",   \"tokenName\": \"Token name\" }
+ :return: ResponseContainerUserApiToken + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.update_token_name_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.update_token_name_with_http_info(id, **kwargs) # noqa: E501 + return data + + def update_token_name_with_http_info(self, id, **kwargs): # noqa: E501 + """Update the name of the specified api token # 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.update_token_name_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :param UserApiToken body: Example Body:
{   \"tokenID\": \"Token identifier\",   \"tokenName\": \"Token name\" }
+ :return: ResponseContainerUserApiToken + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'body'] # 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 update_token_name" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `update_token_name`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['api_key'] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/apitoken/{id}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ResponseContainerUserApiToken', # 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) diff --git a/wavefront_api_client/api/dashboard_api.py b/wavefront_api_client/api/dashboard_api.py index 4c30b70..fa98e62 100644 --- a/wavefront_api_client/api/dashboard_api.py +++ b/wavefront_api_client/api/dashboard_api.py @@ -43,7 +43,7 @@ def add_access(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param list[ACL] body: + :param list[AccessControlListWriteDTO] body: :return: None If the method is called asynchronously, returns the request thread. @@ -65,7 +65,7 @@ def add_access_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param list[ACL] body: + :param list[AccessControlListWriteDTO] body: :return: None If the method is called asynchronously, returns the request thread. @@ -531,7 +531,7 @@ def get_access_control_list(self, **kwargs): # noqa: E501 :param async_req bool :param list[str] id: - :return: ResponseContainerListACL + :return: ResponseContainerListAccessControlListReadDTO If the method is called asynchronously, returns the request thread. """ @@ -553,7 +553,7 @@ def get_access_control_list_with_http_info(self, **kwargs): # noqa: E501 :param async_req bool :param list[str] id: - :return: ResponseContainerListACL + :return: ResponseContainerListAccessControlListReadDTO If the method is called asynchronously, returns the request thread. """ @@ -604,7 +604,7 @@ def get_access_control_list_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='ResponseContainerListACL', # noqa: E501 + response_type='ResponseContainerListAccessControlListReadDTO', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1113,7 +1113,7 @@ def remove_access(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param list[ACL] body: + :param list[AccessControlListWriteDTO] body: :return: None If the method is called asynchronously, returns the request thread. @@ -1135,7 +1135,7 @@ def remove_access_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param list[ACL] body: + :param list[AccessControlListWriteDTO] body: :return: None If the method is called asynchronously, returns the request thread. @@ -1311,7 +1311,7 @@ def set_acl(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param list[ACL] body: + :param list[AccessControlListWriteDTO] body: :return: None If the method is called asynchronously, returns the request thread. @@ -1333,7 +1333,7 @@ def set_acl_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param list[ACL] body: + :param list[AccessControlListWriteDTO] body: :return: None If the method is called asynchronously, returns the request thread. diff --git a/wavefront_api_client/api/search_api.py b/wavefront_api_client/api/search_api.py index 58b19b9..b18adfe 100644 --- a/wavefront_api_client/api/search_api.py +++ b/wavefront_api_client/api/search_api.py @@ -4732,7 +4732,7 @@ def search_user_group_entities(self, **kwargs): # noqa: E501 :param async_req bool :param SortableSearchRequest body: - :return: ResponseContainerPagedUserGroup + :return: ResponseContainerPagedUserGroupModel If the method is called asynchronously, returns the request thread. """ @@ -4754,7 +4754,7 @@ def search_user_group_entities_with_http_info(self, **kwargs): # noqa: E501 :param async_req bool :param SortableSearchRequest body: - :return: ResponseContainerPagedUserGroup + :return: ResponseContainerPagedUserGroupModel If the method is called asynchronously, returns the request thread. """ @@ -4808,7 +4808,7 @@ def search_user_group_entities_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='ResponseContainerPagedUserGroup', # noqa: E501 + response_type='ResponseContainerPagedUserGroupModel', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/wavefront_api_client/api/settings_api.py b/wavefront_api_client/api/settings_api.py index e5af965..1bf89d8 100644 --- a/wavefront_api_client/api/settings_api.py +++ b/wavefront_api_client/api/settings_api.py @@ -218,7 +218,7 @@ def get_default_user_groups(self, **kwargs): # noqa: E501 :param async_req bool :param User body: - :return: ResponseContainerListUserGroup + :return: ResponseContainerListUserGroupModel If the method is called asynchronously, returns the request thread. """ @@ -240,7 +240,7 @@ def get_default_user_groups_with_http_info(self, **kwargs): # noqa: E501 :param async_req bool :param User body: - :return: ResponseContainerListUserGroup + :return: ResponseContainerListUserGroupModel If the method is called asynchronously, returns the request thread. """ @@ -290,7 +290,7 @@ def get_default_user_groups_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='ResponseContainerListUserGroup', # noqa: E501 + response_type='ResponseContainerListUserGroupModel', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/wavefront_api_client/api/user_api.py b/wavefront_api_client/api/user_api.py index 5058d6b..dfcdc80 100644 --- a/wavefront_api_client/api/user_api.py +++ b/wavefront_api_client/api/user_api.py @@ -425,13 +425,13 @@ def delete_user_with_http_info(self, id, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_all_user(self, **kwargs): # noqa: E501 + def get_all_users(self, **kwargs): # noqa: E501 """Get all users # noqa: E501 Returns all users # 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_all_user(async_req=True) + >>> thread = api.get_all_users(async_req=True) >>> result = thread.get() :param async_req bool @@ -441,18 +441,18 @@ def get_all_user(self, **kwargs): # noqa: E501 """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_all_user_with_http_info(**kwargs) # noqa: E501 + return self.get_all_users_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.get_all_user_with_http_info(**kwargs) # noqa: E501 + (data) = self.get_all_users_with_http_info(**kwargs) # noqa: E501 return data - def get_all_user_with_http_info(self, **kwargs): # noqa: E501 + def get_all_users_with_http_info(self, **kwargs): # noqa: E501 """Get all users # noqa: E501 Returns all users # 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_all_user_with_http_info(async_req=True) + >>> thread = api.get_all_users_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool @@ -472,7 +472,7 @@ def get_all_user_with_http_info(self, **kwargs): # noqa: E501 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_all_user" % key + " to method get_all_users" % key ) params[key] = val del params['kwargs'] @@ -513,7 +513,7 @@ def get_all_user_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_user(self, id, **kwargs): # noqa: E501 - """Retrieves a user by identifier (email addr) # noqa: E501 + """Retrieves a user by identifier (email address) # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -535,7 +535,7 @@ def get_user(self, id, **kwargs): # noqa: E501 return data def get_user_with_http_info(self, id, **kwargs): # noqa: E501 - """Retrieves a user by identifier (email addr) # noqa: E501 + """Retrieves a user by identifier (email address) # noqa: E501 # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -618,7 +618,7 @@ def grant_permission_to_users(self, permission, **kwargs): # noqa: E501 :param async_req bool :param str permission: Permission to grant to the users. Please note that 'host_tag_management' is the equivalent of the 'Source Tag Management' permission (required) - :param list[str] body: list of users which should be revoked by specified permission + :param list[str] body: List of users which should be granted by specified permission :return: UserModel If the method is called asynchronously, returns the request thread. @@ -641,7 +641,7 @@ def grant_permission_to_users_with_http_info(self, permission, **kwargs): # noq :param async_req bool :param str permission: Permission to grant to the users. Please note that 'host_tag_management' is the equivalent of the 'Source Tag Management' permission (required) - :param list[str] body: list of users which should be revoked by specified permission + :param list[str] body: List of users which should be granted by specified permission :return: UserModel If the method is called asynchronously, returns the request thread. @@ -1022,7 +1022,7 @@ def revoke_permission_from_users(self, permission, **kwargs): # noqa: E501 :param async_req bool :param str permission: Permission to grant to the users. Please note that 'host_tag_management' is the equivalent of the 'Source Tag Management' permission (required) - :param list[str] body: list of users which should be revoked by specified permission + :param list[str] body: List of users which should be revoked by specified permission :return: UserModel If the method is called asynchronously, returns the request thread. @@ -1045,7 +1045,7 @@ def revoke_permission_from_users_with_http_info(self, permission, **kwargs): # :param async_req bool :param str permission: Permission to grant to the users. Please note that 'host_tag_management' is the equivalent of the 'Source Tag Management' permission (required) - :param list[str] body: list of users which should be revoked by specified permission + :param list[str] body: List of users which should be revoked by specified permission :return: UserModel If the method is called asynchronously, returns the request thread. diff --git a/wavefront_api_client/api/user_group_api.py b/wavefront_api_client/api/user_group_api.py index c385cdc..b8bd85d 100644 --- a/wavefront_api_client/api/user_group_api.py +++ b/wavefront_api_client/api/user_group_api.py @@ -45,7 +45,7 @@ def add_users_to_user_group(self, id, **kwargs): # noqa: E501 :param async_req bool :param str id: (required) :param list[str] body: List of users that should be added to user group - :return: ResponseContainerUserGroup + :return: ResponseContainerUserGroupModel If the method is called asynchronously, returns the request thread. """ @@ -68,7 +68,7 @@ def add_users_to_user_group_with_http_info(self, id, **kwargs): # noqa: E501 :param async_req bool :param str id: (required) :param list[str] body: List of users that should be added to user group - :return: ResponseContainerUserGroup + :return: ResponseContainerUserGroupModel If the method is called asynchronously, returns the request thread. """ @@ -128,7 +128,7 @@ def add_users_to_user_group_with_http_info(self, id, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='ResponseContainerUserGroup', # noqa: E501 + response_type='ResponseContainerUserGroupModel', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -146,8 +146,8 @@ def create_user_group(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param UserGroupWrite body: Example Body:
{   \"name\": \"UserGroup name\",   \"permissions\": [   \"permission1\",   \"permission2\",   \"permission3\"   ] }
- :return: ResponseContainerUserGroup + :param UserGroupWrite body: Example Body:
{   \"name\": \"UserGroup name\",   \"permissions\": [   \"permission1\",   \"permission2\",   \"permission3\"   ],   \"description\": \"UserGroup description\" }
+ :return: ResponseContainerUserGroupModel If the method is called asynchronously, returns the request thread. """ @@ -168,8 +168,8 @@ def create_user_group_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param UserGroupWrite body: Example Body:
{   \"name\": \"UserGroup name\",   \"permissions\": [   \"permission1\",   \"permission2\",   \"permission3\"   ] }
- :return: ResponseContainerUserGroup + :param UserGroupWrite body: Example Body:
{   \"name\": \"UserGroup name\",   \"permissions\": [   \"permission1\",   \"permission2\",   \"permission3\"   ],   \"description\": \"UserGroup description\" }
+ :return: ResponseContainerUserGroupModel If the method is called asynchronously, returns the request thread. """ @@ -223,7 +223,7 @@ def create_user_group_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='ResponseContainerUserGroup', # noqa: E501 + response_type='ResponseContainerUserGroupModel', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -242,7 +242,7 @@ def delete_user_group(self, id, **kwargs): # noqa: E501 :param async_req bool :param str id: (required) - :return: ResponseContainerUserGroup + :return: ResponseContainerUserGroupModel If the method is called asynchronously, returns the request thread. """ @@ -264,7 +264,7 @@ def delete_user_group_with_http_info(self, id, **kwargs): # noqa: E501 :param async_req bool :param str id: (required) - :return: ResponseContainerUserGroup + :return: ResponseContainerUserGroupModel If the method is called asynchronously, returns the request thread. """ @@ -318,7 +318,7 @@ def delete_user_group_with_http_info(self, id, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='ResponseContainerUserGroup', # noqa: E501 + response_type='ResponseContainerUserGroupModel', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -338,7 +338,7 @@ def get_all_user_groups(self, **kwargs): # noqa: E501 :param async_req bool :param int offset: :param int limit: - :return: ResponseContainerPagedUserGroup + :return: ResponseContainerPagedUserGroupModel If the method is called asynchronously, returns the request thread. """ @@ -361,7 +361,7 @@ def get_all_user_groups_with_http_info(self, **kwargs): # noqa: E501 :param async_req bool :param int offset: :param int limit: - :return: ResponseContainerPagedUserGroup + :return: ResponseContainerPagedUserGroupModel If the method is called asynchronously, returns the request thread. """ @@ -413,7 +413,7 @@ def get_all_user_groups_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='ResponseContainerPagedUserGroup', # noqa: E501 + response_type='ResponseContainerPagedUserGroupModel', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -432,7 +432,7 @@ def get_user_group(self, id, **kwargs): # noqa: E501 :param async_req bool :param str id: (required) - :return: ResponseContainerUserGroup + :return: ResponseContainerUserGroupModel If the method is called asynchronously, returns the request thread. """ @@ -454,7 +454,7 @@ def get_user_group_with_http_info(self, id, **kwargs): # noqa: E501 :param async_req bool :param str id: (required) - :return: ResponseContainerUserGroup + :return: ResponseContainerUserGroupModel If the method is called asynchronously, returns the request thread. """ @@ -508,7 +508,7 @@ def get_user_group_with_http_info(self, id, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='ResponseContainerUserGroup', # noqa: E501 + response_type='ResponseContainerUserGroupModel', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -528,7 +528,7 @@ def grant_permission_to_user_groups(self, permission, **kwargs): # noqa: E501 :param async_req bool :param str permission: Permission to grant to user group(s). (required) :param list[str] body: List of user groups. - :return: ResponseContainerUserGroup + :return: ResponseContainerUserGroupModel If the method is called asynchronously, returns the request thread. """ @@ -551,7 +551,7 @@ def grant_permission_to_user_groups_with_http_info(self, permission, **kwargs): :param async_req bool :param str permission: Permission to grant to user group(s). (required) :param list[str] body: List of user groups. - :return: ResponseContainerUserGroup + :return: ResponseContainerUserGroupModel If the method is called asynchronously, returns the request thread. """ @@ -611,7 +611,7 @@ def grant_permission_to_user_groups_with_http_info(self, permission, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='ResponseContainerUserGroup', # noqa: E501 + response_type='ResponseContainerUserGroupModel', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -631,7 +631,7 @@ def remove_users_from_user_group(self, id, **kwargs): # noqa: E501 :param async_req bool :param str id: (required) :param list[str] body: List of users that should be removed from user group - :return: ResponseContainerUserGroup + :return: ResponseContainerUserGroupModel If the method is called asynchronously, returns the request thread. """ @@ -654,7 +654,7 @@ def remove_users_from_user_group_with_http_info(self, id, **kwargs): # noqa: E5 :param async_req bool :param str id: (required) :param list[str] body: List of users that should be removed from user group - :return: ResponseContainerUserGroup + :return: ResponseContainerUserGroupModel If the method is called asynchronously, returns the request thread. """ @@ -714,7 +714,7 @@ def remove_users_from_user_group_with_http_info(self, id, **kwargs): # noqa: E5 body=body_params, post_params=form_params, files=local_var_files, - response_type='ResponseContainerUserGroup', # noqa: E501 + response_type='ResponseContainerUserGroupModel', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -734,7 +734,7 @@ def revoke_permission_from_user_groups(self, permission, **kwargs): # noqa: E50 :param async_req bool :param str permission: Permission to revoke from user group(s). (required) :param list[str] body: List of user groups. - :return: ResponseContainerUserGroup + :return: ResponseContainerUserGroupModel If the method is called asynchronously, returns the request thread. """ @@ -757,7 +757,7 @@ def revoke_permission_from_user_groups_with_http_info(self, permission, **kwargs :param async_req bool :param str permission: Permission to revoke from user group(s). (required) :param list[str] body: List of user groups. - :return: ResponseContainerUserGroup + :return: ResponseContainerUserGroupModel If the method is called asynchronously, returns the request thread. """ @@ -817,7 +817,7 @@ def revoke_permission_from_user_groups_with_http_info(self, permission, **kwargs body=body_params, post_params=form_params, files=local_var_files, - response_type='ResponseContainerUserGroup', # noqa: E501 + response_type='ResponseContainerUserGroupModel', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -836,8 +836,8 @@ def update_user_group(self, id, **kwargs): # noqa: E501 :param async_req bool :param str id: (required) - :param UserGroupWrite body: Example Body:
{   \"id\": \"UserGroup identifier\",   \"name\": \"UserGroup name\",   \"permissions\": [   \"permission1\",   \"permission2\",   \"permission3\"   ] }
- :return: ResponseContainerUserGroup + :param UserGroupWrite body: Example Body:
{   \"id\": \"UserGroup identifier\",   \"name\": \"UserGroup name\",   \"permissions\": [   \"permission1\",   \"permission2\",   \"permission3\"   ],   \"description\": \"UserGroup description\" }
+ :return: ResponseContainerUserGroupModel If the method is called asynchronously, returns the request thread. """ @@ -859,8 +859,8 @@ def update_user_group_with_http_info(self, id, **kwargs): # noqa: E501 :param async_req bool :param str id: (required) - :param UserGroupWrite body: Example Body:
{   \"id\": \"UserGroup identifier\",   \"name\": \"UserGroup name\",   \"permissions\": [   \"permission1\",   \"permission2\",   \"permission3\"   ] }
- :return: ResponseContainerUserGroup + :param UserGroupWrite body: Example Body:
{   \"id\": \"UserGroup identifier\",   \"name\": \"UserGroup name\",   \"permissions\": [   \"permission1\",   \"permission2\",   \"permission3\"   ],   \"description\": \"UserGroup description\" }
+ :return: ResponseContainerUserGroupModel If the method is called asynchronously, returns the request thread. """ @@ -920,7 +920,7 @@ def update_user_group_with_http_info(self, id, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='ResponseContainerUserGroup', # noqa: E501 + response_type='ResponseContainerUserGroupModel', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/wavefront_api_client/api_client.py b/wavefront_api_client/api_client.py index eea9c2f..dfcef46 100644 --- a/wavefront_api_client/api_client.py +++ b/wavefront_api_client/api_client.py @@ -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.30.15/python' + self.user_agent = 'Swagger-Codegen/2.32.19/python' def __del__(self): if self._pool is not None: diff --git a/wavefront_api_client/configuration.py b/wavefront_api_client/configuration.py index bfc235e..96ae320 100644 --- a/wavefront_api_client/configuration.py +++ b/wavefront_api_client/configuration.py @@ -240,5 +240,5 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: v2\n"\ - "SDK Package Version: 2.30.15".\ + "SDK Package Version: 2.32.19".\ format(env=sys.platform, pyversion=sys.version) diff --git a/wavefront_api_client/models/__init__.py b/wavefront_api_client/models/__init__.py index 60f843c..f36036d 100644 --- a/wavefront_api_client/models/__init__.py +++ b/wavefront_api_client/models/__init__.py @@ -15,10 +15,11 @@ from __future__ import absolute_import # import models into model package -from wavefront_api_client.models.acl import ACL from wavefront_api_client.models.aws_base_credentials import AWSBaseCredentials from wavefront_api_client.models.access_control_element import AccessControlElement +from wavefront_api_client.models.access_control_list_read_dto import AccessControlListReadDTO from wavefront_api_client.models.access_control_list_simple import AccessControlListSimple +from wavefront_api_client.models.access_control_list_write_dto import AccessControlListWriteDTO from wavefront_api_client.models.alert import Alert from wavefront_api_client.models.avro_backed_standardized_dto import AvroBackedStandardizedDTO from wavefront_api_client.models.azure_activity_log_configuration import AzureActivityLogConfiguration @@ -90,7 +91,7 @@ from wavefront_api_client.models.paged_proxy import PagedProxy from wavefront_api_client.models.paged_saved_search import PagedSavedSearch from wavefront_api_client.models.paged_source import PagedSource -from wavefront_api_client.models.paged_user_group import PagedUserGroup +from wavefront_api_client.models.paged_user_group_model import PagedUserGroupModel from wavefront_api_client.models.point import Point from wavefront_api_client.models.proxy import Proxy from wavefront_api_client.models.query_event import QueryEvent @@ -108,11 +109,12 @@ from wavefront_api_client.models.response_container_history_response import ResponseContainerHistoryResponse from wavefront_api_client.models.response_container_integration import ResponseContainerIntegration from wavefront_api_client.models.response_container_integration_status import ResponseContainerIntegrationStatus -from wavefront_api_client.models.response_container_list_acl import ResponseContainerListACL +from wavefront_api_client.models.response_container_list_access_control_list_read_dto import ResponseContainerListAccessControlListReadDTO from wavefront_api_client.models.response_container_list_integration import ResponseContainerListIntegration from wavefront_api_client.models.response_container_list_integration_manifest_group import ResponseContainerListIntegrationManifestGroup from wavefront_api_client.models.response_container_list_string import ResponseContainerListString -from wavefront_api_client.models.response_container_list_user_group import ResponseContainerListUserGroup +from wavefront_api_client.models.response_container_list_user_api_token import ResponseContainerListUserApiToken +from wavefront_api_client.models.response_container_list_user_group_model import ResponseContainerListUserGroupModel from wavefront_api_client.models.response_container_maintenance_window import ResponseContainerMaintenanceWindow from wavefront_api_client.models.response_container_map_string_integer import ResponseContainerMapStringInteger from wavefront_api_client.models.response_container_map_string_integration_status import ResponseContainerMapStringIntegrationStatus @@ -134,12 +136,13 @@ from wavefront_api_client.models.response_container_paged_proxy import ResponseContainerPagedProxy from wavefront_api_client.models.response_container_paged_saved_search import ResponseContainerPagedSavedSearch from wavefront_api_client.models.response_container_paged_source import ResponseContainerPagedSource -from wavefront_api_client.models.response_container_paged_user_group import ResponseContainerPagedUserGroup +from wavefront_api_client.models.response_container_paged_user_group_model import ResponseContainerPagedUserGroupModel from wavefront_api_client.models.response_container_proxy import ResponseContainerProxy from wavefront_api_client.models.response_container_saved_search import ResponseContainerSavedSearch from wavefront_api_client.models.response_container_source import ResponseContainerSource from wavefront_api_client.models.response_container_tags_response import ResponseContainerTagsResponse -from wavefront_api_client.models.response_container_user_group import ResponseContainerUserGroup +from wavefront_api_client.models.response_container_user_api_token import ResponseContainerUserApiToken +from wavefront_api_client.models.response_container_user_group_model import ResponseContainerUserGroupModel from wavefront_api_client.models.response_container_validated_users_dto import ResponseContainerValidatedUsersDTO from wavefront_api_client.models.response_status import ResponseStatus from wavefront_api_client.models.saved_search import SavedSearch @@ -155,8 +158,10 @@ from wavefront_api_client.models.tesla_configuration import TeslaConfiguration from wavefront_api_client.models.timeseries import Timeseries from wavefront_api_client.models.user import User +from wavefront_api_client.models.user_api_token import UserApiToken from wavefront_api_client.models.user_dto import UserDTO from wavefront_api_client.models.user_group import UserGroup +from wavefront_api_client.models.user_group_model import UserGroupModel from wavefront_api_client.models.user_group_properties_dto import UserGroupPropertiesDTO from wavefront_api_client.models.user_group_write import UserGroupWrite from wavefront_api_client.models.user_model import UserModel diff --git a/wavefront_api_client/models/access_control_element.py b/wavefront_api_client/models/access_control_element.py index cfd01b9..aca9c9d 100644 --- a/wavefront_api_client/models/access_control_element.py +++ b/wavefront_api_client/models/access_control_element.py @@ -31,27 +31,53 @@ class AccessControlElement(object): and the value is json key in definition. """ swagger_types = { + 'description': 'str', 'id': 'str', 'name': 'str' } attribute_map = { + 'description': 'description', 'id': 'id', 'name': 'name' } - def __init__(self, id=None, name=None): # noqa: E501 + def __init__(self, description=None, id=None, name=None): # noqa: E501 """AccessControlElement - a model defined in Swagger""" # noqa: E501 + self._description = None self._id = None self._name = None self.discriminator = None + if description is not None: + self.description = description if id is not None: self.id = id if name is not None: self.name = name + @property + def description(self): + """Gets the description of this AccessControlElement. # noqa: E501 + + + :return: The description of this AccessControlElement. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this AccessControlElement. + + + :param description: The description of this AccessControlElement. # noqa: E501 + :type: str + """ + + self._description = description + @property def id(self): """Gets the id of this AccessControlElement. # noqa: E501 diff --git a/wavefront_api_client/models/access_control_list_read_dto.py b/wavefront_api_client/models/access_control_list_read_dto.py new file mode 100644 index 0000000..90f0fc0 --- /dev/null +++ b/wavefront_api_client/models/access_control_list_read_dto.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Wavefront REST API + +

The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.

When you make REST API calls outside the Wavefront REST API documentation you must add the header \"Authorization: Bearer <<API-TOKEN>>\" to your HTTP requests.

# noqa: E501 + + OpenAPI spec version: v2 + Contact: chitimba@wavefront.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from wavefront_api_client.models.access_control_element import AccessControlElement # noqa: F401,E501 + + +class AccessControlListReadDTO(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'entity_id': 'str', + 'modify_acl': 'list[AccessControlElement]', + 'view_acl': 'list[AccessControlElement]' + } + + attribute_map = { + 'entity_id': 'entityId', + 'modify_acl': 'modifyAcl', + 'view_acl': 'viewAcl' + } + + def __init__(self, entity_id=None, modify_acl=None, view_acl=None): # noqa: E501 + """AccessControlListReadDTO - a model defined in Swagger""" # noqa: E501 + + self._entity_id = None + self._modify_acl = None + self._view_acl = None + self.discriminator = None + + if entity_id is not None: + self.entity_id = entity_id + if modify_acl is not None: + self.modify_acl = modify_acl + if view_acl is not None: + self.view_acl = view_acl + + @property + def entity_id(self): + """Gets the entity_id of this AccessControlListReadDTO. # noqa: E501 + + The entity Id # noqa: E501 + + :return: The entity_id of this AccessControlListReadDTO. # noqa: E501 + :rtype: str + """ + return self._entity_id + + @entity_id.setter + def entity_id(self, entity_id): + """Sets the entity_id of this AccessControlListReadDTO. + + The entity Id # noqa: E501 + + :param entity_id: The entity_id of this AccessControlListReadDTO. # noqa: E501 + :type: str + """ + + self._entity_id = entity_id + + @property + def modify_acl(self): + """Gets the modify_acl of this AccessControlListReadDTO. # noqa: E501 + + List of users and user groups ids that have modify permission # noqa: E501 + + :return: The modify_acl of this AccessControlListReadDTO. # noqa: E501 + :rtype: list[AccessControlElement] + """ + return self._modify_acl + + @modify_acl.setter + def modify_acl(self, modify_acl): + """Sets the modify_acl of this AccessControlListReadDTO. + + List of users and user groups ids that have modify permission # noqa: E501 + + :param modify_acl: The modify_acl of this AccessControlListReadDTO. # noqa: E501 + :type: list[AccessControlElement] + """ + + self._modify_acl = modify_acl + + @property + def view_acl(self): + """Gets the view_acl of this AccessControlListReadDTO. # noqa: E501 + + List of users and user group ids that have view permission # noqa: E501 + + :return: The view_acl of this AccessControlListReadDTO. # noqa: E501 + :rtype: list[AccessControlElement] + """ + return self._view_acl + + @view_acl.setter + def view_acl(self, view_acl): + """Sets the view_acl of this AccessControlListReadDTO. + + List of users and user group ids that have view permission # noqa: E501 + + :param view_acl: The view_acl of this AccessControlListReadDTO. # noqa: E501 + :type: list[AccessControlElement] + """ + + self._view_acl = view_acl + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AccessControlListReadDTO, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AccessControlListReadDTO): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/wavefront_api_client/models/access_control_list_write_dto.py b/wavefront_api_client/models/access_control_list_write_dto.py new file mode 100644 index 0000000..0350d2c --- /dev/null +++ b/wavefront_api_client/models/access_control_list_write_dto.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" + Wavefront REST API + +

The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.

When you make REST API calls outside the Wavefront REST API documentation you must add the header \"Authorization: Bearer <<API-TOKEN>>\" to your HTTP requests.

# noqa: E501 + + OpenAPI spec version: v2 + Contact: chitimba@wavefront.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class AccessControlListWriteDTO(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'entity_id': 'str', + 'modify_acl': 'list[str]', + 'view_acl': 'list[str]' + } + + attribute_map = { + 'entity_id': 'entityId', + 'modify_acl': 'modifyAcl', + 'view_acl': 'viewAcl' + } + + def __init__(self, entity_id=None, modify_acl=None, view_acl=None): # noqa: E501 + """AccessControlListWriteDTO - a model defined in Swagger""" # noqa: E501 + + self._entity_id = None + self._modify_acl = None + self._view_acl = None + self.discriminator = None + + if entity_id is not None: + self.entity_id = entity_id + if modify_acl is not None: + self.modify_acl = modify_acl + if view_acl is not None: + self.view_acl = view_acl + + @property + def entity_id(self): + """Gets the entity_id of this AccessControlListWriteDTO. # noqa: E501 + + The entity Id # noqa: E501 + + :return: The entity_id of this AccessControlListWriteDTO. # noqa: E501 + :rtype: str + """ + return self._entity_id + + @entity_id.setter + def entity_id(self, entity_id): + """Sets the entity_id of this AccessControlListWriteDTO. + + The entity Id # noqa: E501 + + :param entity_id: The entity_id of this AccessControlListWriteDTO. # noqa: E501 + :type: str + """ + + self._entity_id = entity_id + + @property + def modify_acl(self): + """Gets the modify_acl of this AccessControlListWriteDTO. # noqa: E501 + + List of users and user groups ids that have modify permission # noqa: E501 + + :return: The modify_acl of this AccessControlListWriteDTO. # noqa: E501 + :rtype: list[str] + """ + return self._modify_acl + + @modify_acl.setter + def modify_acl(self, modify_acl): + """Sets the modify_acl of this AccessControlListWriteDTO. + + List of users and user groups ids that have modify permission # noqa: E501 + + :param modify_acl: The modify_acl of this AccessControlListWriteDTO. # noqa: E501 + :type: list[str] + """ + + self._modify_acl = modify_acl + + @property + def view_acl(self): + """Gets the view_acl of this AccessControlListWriteDTO. # noqa: E501 + + List of users and user group ids that have view permission # noqa: E501 + + :return: The view_acl of this AccessControlListWriteDTO. # noqa: E501 + :rtype: list[str] + """ + return self._view_acl + + @view_acl.setter + def view_acl(self, view_acl): + """Sets the view_acl of this AccessControlListWriteDTO. + + List of users and user group ids that have view permission # noqa: E501 + + :param view_acl: The view_acl of this AccessControlListWriteDTO. # noqa: E501 + :type: list[str] + """ + + self._view_acl = view_acl + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AccessControlListWriteDTO, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AccessControlListWriteDTO): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/wavefront_api_client/models/alert.py b/wavefront_api_client/models/alert.py index f46d7e5..33b22f3 100644 --- a/wavefront_api_client/models/alert.py +++ b/wavefront_api_client/models/alert.py @@ -16,6 +16,7 @@ import six +from wavefront_api_client.models.access_control_list_simple import AccessControlListSimple # noqa: F401,E501 from wavefront_api_client.models.event import Event # noqa: F401,E501 from wavefront_api_client.models.source_label_pair import SourceLabelPair # noqa: F401,E501 from wavefront_api_client.models.target_info import TargetInfo # noqa: F401,E501 @@ -36,12 +37,14 @@ class Alert(object): and the value is json key in definition. """ swagger_types = { + 'acl': 'AccessControlListSimple', 'active_maintenance_windows': 'list[str]', 'additional_information': 'str', 'alert_type': 'str', 'alerts_last_day': 'int', 'alerts_last_month': 'int', 'alerts_last_week': 'int', + 'can_user_modify': 'bool', 'condition': 'str', 'condition_qb_enabled': 'bool', 'condition_qb_serialization': 'str', @@ -75,6 +78,7 @@ class Alert(object): 'notificants': 'list[str]', 'notification_resend_frequency_minutes': 'int', 'num_points_in_failure_frame': 'int', + 'orphan': 'bool', 'points_scanned_at_last_query': 'int', 'prefiring_host_label_pairs': 'list[SourceLabelPair]', 'process_rate_minutes': 'int', @@ -97,12 +101,14 @@ class Alert(object): } attribute_map = { + 'acl': 'acl', 'active_maintenance_windows': 'activeMaintenanceWindows', 'additional_information': 'additionalInformation', 'alert_type': 'alertType', 'alerts_last_day': 'alertsLastDay', 'alerts_last_month': 'alertsLastMonth', 'alerts_last_week': 'alertsLastWeek', + 'can_user_modify': 'canUserModify', 'condition': 'condition', 'condition_qb_enabled': 'conditionQBEnabled', 'condition_qb_serialization': 'conditionQBSerialization', @@ -136,6 +142,7 @@ class Alert(object): 'notificants': 'notificants', 'notification_resend_frequency_minutes': 'notificationResendFrequencyMinutes', 'num_points_in_failure_frame': 'numPointsInFailureFrame', + 'orphan': 'orphan', 'points_scanned_at_last_query': 'pointsScannedAtLastQuery', 'prefiring_host_label_pairs': 'prefiringHostLabelPairs', 'process_rate_minutes': 'processRateMinutes', @@ -157,15 +164,17 @@ class Alert(object): 'updater_id': 'updaterId' } - def __init__(self, active_maintenance_windows=None, additional_information=None, alert_type=None, alerts_last_day=None, alerts_last_month=None, alerts_last_week=None, condition=None, condition_qb_enabled=None, condition_qb_serialization=None, conditions=None, create_user_id=None, created=None, created_epoch_millis=None, creator_id=None, deleted=None, display_expression=None, display_expression_qb_enabled=None, display_expression_qb_serialization=None, event=None, failing_host_label_pairs=None, hidden=None, hosts_used=None, id=None, in_maintenance_host_label_pairs=None, in_trash=None, include_obsolete_metrics=None, last_error_message=None, last_event_time=None, last_failed_time=None, last_notification_millis=None, last_processed_millis=None, last_query_time=None, metrics_used=None, minutes=None, name=None, no_data_event=None, notificants=None, notification_resend_frequency_minutes=None, num_points_in_failure_frame=None, points_scanned_at_last_query=None, prefiring_host_label_pairs=None, process_rate_minutes=None, query_failing=None, resolve_after_minutes=None, severity=None, severity_list=None, snoozed=None, sort_attr=None, status=None, system_owned=None, tags=None, target=None, target_info=None, targets=None, update_user_id=None, updated=None, updated_epoch_millis=None, updater_id=None): # noqa: E501 + def __init__(self, acl=None, active_maintenance_windows=None, additional_information=None, alert_type=None, alerts_last_day=None, alerts_last_month=None, alerts_last_week=None, can_user_modify=None, condition=None, condition_qb_enabled=None, condition_qb_serialization=None, conditions=None, create_user_id=None, created=None, created_epoch_millis=None, creator_id=None, deleted=None, display_expression=None, display_expression_qb_enabled=None, display_expression_qb_serialization=None, event=None, failing_host_label_pairs=None, hidden=None, hosts_used=None, id=None, in_maintenance_host_label_pairs=None, in_trash=None, include_obsolete_metrics=None, last_error_message=None, last_event_time=None, last_failed_time=None, last_notification_millis=None, last_processed_millis=None, last_query_time=None, metrics_used=None, minutes=None, name=None, no_data_event=None, notificants=None, notification_resend_frequency_minutes=None, num_points_in_failure_frame=None, orphan=None, points_scanned_at_last_query=None, prefiring_host_label_pairs=None, process_rate_minutes=None, query_failing=None, resolve_after_minutes=None, severity=None, severity_list=None, snoozed=None, sort_attr=None, status=None, system_owned=None, tags=None, target=None, target_info=None, targets=None, update_user_id=None, updated=None, updated_epoch_millis=None, updater_id=None): # noqa: E501 """Alert - a model defined in Swagger""" # noqa: E501 + self._acl = None self._active_maintenance_windows = None self._additional_information = None self._alert_type = None self._alerts_last_day = None self._alerts_last_month = None self._alerts_last_week = None + self._can_user_modify = None self._condition = None self._condition_qb_enabled = None self._condition_qb_serialization = None @@ -199,6 +208,7 @@ def __init__(self, active_maintenance_windows=None, additional_information=None, self._notificants = None self._notification_resend_frequency_minutes = None self._num_points_in_failure_frame = None + self._orphan = None self._points_scanned_at_last_query = None self._prefiring_host_label_pairs = None self._process_rate_minutes = None @@ -220,6 +230,8 @@ def __init__(self, active_maintenance_windows=None, additional_information=None, self._updater_id = None self.discriminator = None + if acl is not None: + self.acl = acl if active_maintenance_windows is not None: self.active_maintenance_windows = active_maintenance_windows if additional_information is not None: @@ -232,6 +244,8 @@ def __init__(self, active_maintenance_windows=None, additional_information=None, self.alerts_last_month = alerts_last_month if alerts_last_week is not None: self.alerts_last_week = alerts_last_week + if can_user_modify is not None: + self.can_user_modify = can_user_modify self.condition = condition if condition_qb_enabled is not None: self.condition_qb_enabled = condition_qb_enabled @@ -295,6 +309,8 @@ def __init__(self, active_maintenance_windows=None, additional_information=None, self.notification_resend_frequency_minutes = notification_resend_frequency_minutes if num_points_in_failure_frame is not None: self.num_points_in_failure_frame = num_points_in_failure_frame + if orphan is not None: + self.orphan = orphan if points_scanned_at_last_query is not None: self.points_scanned_at_last_query = points_scanned_at_last_query if prefiring_host_label_pairs is not None: @@ -334,6 +350,27 @@ def __init__(self, active_maintenance_windows=None, additional_information=None, if updater_id is not None: self.updater_id = updater_id + @property + def acl(self): + """Gets the acl of this Alert. # noqa: E501 + + + :return: The acl of this Alert. # noqa: E501 + :rtype: AccessControlListSimple + """ + return self._acl + + @acl.setter + def acl(self, acl): + """Sets the acl of this Alert. + + + :param acl: The acl of this Alert. # noqa: E501 + :type: AccessControlListSimple + """ + + self._acl = acl + @property def active_maintenance_windows(self): """Gets the active_maintenance_windows of this Alert. # noqa: E501 @@ -472,6 +509,29 @@ def alerts_last_week(self, alerts_last_week): self._alerts_last_week = alerts_last_week + @property + def can_user_modify(self): + """Gets the can_user_modify of this Alert. # noqa: E501 + + Whether the user can modify the alert. # noqa: E501 + + :return: The can_user_modify of this Alert. # noqa: E501 + :rtype: bool + """ + return self._can_user_modify + + @can_user_modify.setter + def can_user_modify(self, can_user_modify): + """Sets the can_user_modify of this Alert. + + Whether the user can modify the alert. # noqa: E501 + + :param can_user_modify: The can_user_modify of this Alert. # noqa: E501 + :type: bool + """ + + self._can_user_modify = can_user_modify + @property def condition(self): """Gets the condition of this Alert. # noqa: E501 @@ -1219,6 +1279,27 @@ def num_points_in_failure_frame(self, num_points_in_failure_frame): self._num_points_in_failure_frame = num_points_in_failure_frame + @property + def orphan(self): + """Gets the orphan of this Alert. # noqa: E501 + + + :return: The orphan of this Alert. # noqa: E501 + :rtype: bool + """ + return self._orphan + + @orphan.setter + def orphan(self, orphan): + """Sets the orphan of this Alert. + + + :param orphan: The orphan of this Alert. # noqa: E501 + :type: bool + """ + + self._orphan = orphan + @property def points_scanned_at_last_query(self): """Gets the points_scanned_at_last_query of this Alert. # noqa: E501 diff --git a/wavefront_api_client/models/customer_preferences.py b/wavefront_api_client/models/customer_preferences.py index 145b732..4e4cde1 100644 --- a/wavefront_api_client/models/customer_preferences.py +++ b/wavefront_api_client/models/customer_preferences.py @@ -16,7 +16,7 @@ import six -from wavefront_api_client.models.user_group import UserGroup # noqa: F401,E501 +from wavefront_api_client.models.user_group_model import UserGroupModel # noqa: F401,E501 class CustomerPreferences(object): @@ -37,7 +37,7 @@ class CustomerPreferences(object): 'created_epoch_millis': 'int', 'creator_id': 'str', 'customer_id': 'str', - 'default_user_groups': 'list[UserGroup]', + 'default_user_groups': 'list[UserGroupModel]', 'deleted': 'bool', 'grant_modify_access_to_everyone': 'bool', 'hidden_metric_prefixes': 'dict(str, int)', @@ -216,7 +216,7 @@ def default_user_groups(self): List of default user groups of the customer # noqa: E501 :return: The default_user_groups of this CustomerPreferences. # noqa: E501 - :rtype: list[UserGroup] + :rtype: list[UserGroupModel] """ return self._default_user_groups @@ -227,7 +227,7 @@ def default_user_groups(self, default_user_groups): List of default user groups of the customer # noqa: E501 :param default_user_groups: The default_user_groups of this CustomerPreferences. # noqa: E501 - :type: list[UserGroup] + :type: list[UserGroupModel] """ self._default_user_groups = default_user_groups diff --git a/wavefront_api_client/models/dashboard.py b/wavefront_api_client/models/dashboard.py index e6f68bd..75c0ded 100644 --- a/wavefront_api_client/models/dashboard.py +++ b/wavefront_api_client/models/dashboard.py @@ -248,6 +248,7 @@ def acl(self, acl): def can_user_modify(self): """Gets the can_user_modify of this Dashboard. # noqa: E501 + Whether the user can modify the dashboard. # noqa: E501 :return: The can_user_modify of this Dashboard. # noqa: E501 :rtype: bool @@ -258,6 +259,7 @@ def can_user_modify(self): def can_user_modify(self, can_user_modify): """Sets the can_user_modify of this Dashboard. + Whether the user can modify the dashboard. # noqa: E501 :param can_user_modify: The can_user_modify of this Dashboard. # noqa: E501 :type: bool diff --git a/wavefront_api_client/models/paged_user_group_model.py b/wavefront_api_client/models/paged_user_group_model.py new file mode 100644 index 0000000..9f1db48 --- /dev/null +++ b/wavefront_api_client/models/paged_user_group_model.py @@ -0,0 +1,282 @@ +# coding: utf-8 + +""" + Wavefront REST API + +

The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.

When you make REST API calls outside the Wavefront REST API documentation you must add the header \"Authorization: Bearer <<API-TOKEN>>\" to your HTTP requests.

# noqa: E501 + + OpenAPI spec version: v2 + Contact: chitimba@wavefront.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from wavefront_api_client.models.sorting import Sorting # noqa: F401,E501 +from wavefront_api_client.models.user_group_model import UserGroupModel # noqa: F401,E501 + + +class PagedUserGroupModel(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'cursor': 'str', + 'items': 'list[UserGroupModel]', + 'limit': 'int', + 'more_items': 'bool', + 'offset': 'int', + 'sort': 'Sorting', + 'total_items': 'int' + } + + attribute_map = { + 'cursor': 'cursor', + 'items': 'items', + 'limit': 'limit', + 'more_items': 'moreItems', + 'offset': 'offset', + 'sort': 'sort', + 'total_items': 'totalItems' + } + + def __init__(self, cursor=None, items=None, limit=None, more_items=None, offset=None, sort=None, total_items=None): # noqa: E501 + """PagedUserGroupModel - a model defined in Swagger""" # noqa: E501 + + self._cursor = None + self._items = None + self._limit = None + self._more_items = None + self._offset = None + self._sort = None + self._total_items = None + self.discriminator = None + + if cursor is not None: + self.cursor = cursor + if items is not None: + self.items = items + if limit is not None: + self.limit = limit + if more_items is not None: + self.more_items = more_items + if offset is not None: + self.offset = offset + if sort is not None: + self.sort = sort + if total_items is not None: + self.total_items = total_items + + @property + def cursor(self): + """Gets the cursor of this PagedUserGroupModel. # noqa: E501 + + The id at which the current (limited) search can be continued to obtain more matching items # noqa: E501 + + :return: The cursor of this PagedUserGroupModel. # noqa: E501 + :rtype: str + """ + return self._cursor + + @cursor.setter + def cursor(self, cursor): + """Sets the cursor of this PagedUserGroupModel. + + The id at which the current (limited) search can be continued to obtain more matching items # noqa: E501 + + :param cursor: The cursor of this PagedUserGroupModel. # noqa: E501 + :type: str + """ + + self._cursor = cursor + + @property + def items(self): + """Gets the items of this PagedUserGroupModel. # noqa: E501 + + List of requested items # noqa: E501 + + :return: The items of this PagedUserGroupModel. # noqa: E501 + :rtype: list[UserGroupModel] + """ + return self._items + + @items.setter + def items(self, items): + """Sets the items of this PagedUserGroupModel. + + List of requested items # noqa: E501 + + :param items: The items of this PagedUserGroupModel. # noqa: E501 + :type: list[UserGroupModel] + """ + + self._items = items + + @property + def limit(self): + """Gets the limit of this PagedUserGroupModel. # noqa: E501 + + + :return: The limit of this PagedUserGroupModel. # noqa: E501 + :rtype: int + """ + return self._limit + + @limit.setter + def limit(self, limit): + """Sets the limit of this PagedUserGroupModel. + + + :param limit: The limit of this PagedUserGroupModel. # noqa: E501 + :type: int + """ + + self._limit = limit + + @property + def more_items(self): + """Gets the more_items of this PagedUserGroupModel. # noqa: E501 + + Whether more items are available for return by increment offset or cursor # noqa: E501 + + :return: The more_items of this PagedUserGroupModel. # noqa: E501 + :rtype: bool + """ + return self._more_items + + @more_items.setter + def more_items(self, more_items): + """Sets the more_items of this PagedUserGroupModel. + + Whether more items are available for return by increment offset or cursor # noqa: E501 + + :param more_items: The more_items of this PagedUserGroupModel. # noqa: E501 + :type: bool + """ + + self._more_items = more_items + + @property + def offset(self): + """Gets the offset of this PagedUserGroupModel. # noqa: E501 + + + :return: The offset of this PagedUserGroupModel. # noqa: E501 + :rtype: int + """ + return self._offset + + @offset.setter + def offset(self, offset): + """Sets the offset of this PagedUserGroupModel. + + + :param offset: The offset of this PagedUserGroupModel. # noqa: E501 + :type: int + """ + + self._offset = offset + + @property + def sort(self): + """Gets the sort of this PagedUserGroupModel. # noqa: E501 + + + :return: The sort of this PagedUserGroupModel. # noqa: E501 + :rtype: Sorting + """ + return self._sort + + @sort.setter + def sort(self, sort): + """Sets the sort of this PagedUserGroupModel. + + + :param sort: The sort of this PagedUserGroupModel. # noqa: E501 + :type: Sorting + """ + + self._sort = sort + + @property + def total_items(self): + """Gets the total_items of this PagedUserGroupModel. # noqa: E501 + + An estimate (lower-bound) of the total number of items available for return. May not be a tight estimate for facet queries # noqa: E501 + + :return: The total_items of this PagedUserGroupModel. # noqa: E501 + :rtype: int + """ + return self._total_items + + @total_items.setter + def total_items(self, total_items): + """Sets the total_items of this PagedUserGroupModel. + + An estimate (lower-bound) of the total number of items available for return. May not be a tight estimate for facet queries # noqa: E501 + + :param total_items: The total_items of this PagedUserGroupModel. # noqa: E501 + :type: int + """ + + self._total_items = total_items + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PagedUserGroupModel, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PagedUserGroupModel): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/wavefront_api_client/models/response_container_list_access_control_list_read_dto.py b/wavefront_api_client/models/response_container_list_access_control_list_read_dto.py new file mode 100644 index 0000000..69fbd33 --- /dev/null +++ b/wavefront_api_client/models/response_container_list_access_control_list_read_dto.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + Wavefront REST API + +

The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.

When you make REST API calls outside the Wavefront REST API documentation you must add the header \"Authorization: Bearer <<API-TOKEN>>\" to your HTTP requests.

# noqa: E501 + + OpenAPI spec version: v2 + Contact: chitimba@wavefront.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from wavefront_api_client.models.access_control_list_read_dto import AccessControlListReadDTO # noqa: F401,E501 +from wavefront_api_client.models.response_status import ResponseStatus # noqa: F401,E501 + + +class ResponseContainerListAccessControlListReadDTO(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'response': 'list[AccessControlListReadDTO]', + 'status': 'ResponseStatus' + } + + attribute_map = { + 'response': 'response', + 'status': 'status' + } + + def __init__(self, response=None, status=None): # noqa: E501 + """ResponseContainerListAccessControlListReadDTO - a model defined in Swagger""" # noqa: E501 + + self._response = None + self._status = None + self.discriminator = None + + if response is not None: + self.response = response + self.status = status + + @property + def response(self): + """Gets the response of this ResponseContainerListAccessControlListReadDTO. # noqa: E501 + + + :return: The response of this ResponseContainerListAccessControlListReadDTO. # noqa: E501 + :rtype: list[AccessControlListReadDTO] + """ + return self._response + + @response.setter + def response(self, response): + """Sets the response of this ResponseContainerListAccessControlListReadDTO. + + + :param response: The response of this ResponseContainerListAccessControlListReadDTO. # noqa: E501 + :type: list[AccessControlListReadDTO] + """ + + self._response = response + + @property + def status(self): + """Gets the status of this ResponseContainerListAccessControlListReadDTO. # noqa: E501 + + + :return: The status of this ResponseContainerListAccessControlListReadDTO. # noqa: E501 + :rtype: ResponseStatus + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ResponseContainerListAccessControlListReadDTO. + + + :param status: The status of this ResponseContainerListAccessControlListReadDTO. # noqa: E501 + :type: ResponseStatus + """ + if status is None: + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + + self._status = status + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ResponseContainerListAccessControlListReadDTO, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResponseContainerListAccessControlListReadDTO): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/wavefront_api_client/models/response_container_list_user_api_token.py b/wavefront_api_client/models/response_container_list_user_api_token.py new file mode 100644 index 0000000..3e33ad0 --- /dev/null +++ b/wavefront_api_client/models/response_container_list_user_api_token.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + Wavefront REST API + +

The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.

When you make REST API calls outside the Wavefront REST API documentation you must add the header \"Authorization: Bearer <<API-TOKEN>>\" to your HTTP requests.

# noqa: E501 + + OpenAPI spec version: v2 + Contact: chitimba@wavefront.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from wavefront_api_client.models.response_status import ResponseStatus # noqa: F401,E501 +from wavefront_api_client.models.user_api_token import UserApiToken # noqa: F401,E501 + + +class ResponseContainerListUserApiToken(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'response': 'list[UserApiToken]', + 'status': 'ResponseStatus' + } + + attribute_map = { + 'response': 'response', + 'status': 'status' + } + + def __init__(self, response=None, status=None): # noqa: E501 + """ResponseContainerListUserApiToken - a model defined in Swagger""" # noqa: E501 + + self._response = None + self._status = None + self.discriminator = None + + if response is not None: + self.response = response + self.status = status + + @property + def response(self): + """Gets the response of this ResponseContainerListUserApiToken. # noqa: E501 + + + :return: The response of this ResponseContainerListUserApiToken. # noqa: E501 + :rtype: list[UserApiToken] + """ + return self._response + + @response.setter + def response(self, response): + """Sets the response of this ResponseContainerListUserApiToken. + + + :param response: The response of this ResponseContainerListUserApiToken. # noqa: E501 + :type: list[UserApiToken] + """ + + self._response = response + + @property + def status(self): + """Gets the status of this ResponseContainerListUserApiToken. # noqa: E501 + + + :return: The status of this ResponseContainerListUserApiToken. # noqa: E501 + :rtype: ResponseStatus + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ResponseContainerListUserApiToken. + + + :param status: The status of this ResponseContainerListUserApiToken. # noqa: E501 + :type: ResponseStatus + """ + if status is None: + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + + self._status = status + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ResponseContainerListUserApiToken, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResponseContainerListUserApiToken): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/wavefront_api_client/models/response_container_list_user_group_model.py b/wavefront_api_client/models/response_container_list_user_group_model.py new file mode 100644 index 0000000..7b0ad7b --- /dev/null +++ b/wavefront_api_client/models/response_container_list_user_group_model.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + Wavefront REST API + +

The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.

When you make REST API calls outside the Wavefront REST API documentation you must add the header \"Authorization: Bearer <<API-TOKEN>>\" to your HTTP requests.

# noqa: E501 + + OpenAPI spec version: v2 + Contact: chitimba@wavefront.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from wavefront_api_client.models.response_status import ResponseStatus # noqa: F401,E501 +from wavefront_api_client.models.user_group_model import UserGroupModel # noqa: F401,E501 + + +class ResponseContainerListUserGroupModel(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'response': 'list[UserGroupModel]', + 'status': 'ResponseStatus' + } + + attribute_map = { + 'response': 'response', + 'status': 'status' + } + + def __init__(self, response=None, status=None): # noqa: E501 + """ResponseContainerListUserGroupModel - a model defined in Swagger""" # noqa: E501 + + self._response = None + self._status = None + self.discriminator = None + + if response is not None: + self.response = response + self.status = status + + @property + def response(self): + """Gets the response of this ResponseContainerListUserGroupModel. # noqa: E501 + + + :return: The response of this ResponseContainerListUserGroupModel. # noqa: E501 + :rtype: list[UserGroupModel] + """ + return self._response + + @response.setter + def response(self, response): + """Sets the response of this ResponseContainerListUserGroupModel. + + + :param response: The response of this ResponseContainerListUserGroupModel. # noqa: E501 + :type: list[UserGroupModel] + """ + + self._response = response + + @property + def status(self): + """Gets the status of this ResponseContainerListUserGroupModel. # noqa: E501 + + + :return: The status of this ResponseContainerListUserGroupModel. # noqa: E501 + :rtype: ResponseStatus + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ResponseContainerListUserGroupModel. + + + :param status: The status of this ResponseContainerListUserGroupModel. # noqa: E501 + :type: ResponseStatus + """ + if status is None: + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + + self._status = status + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ResponseContainerListUserGroupModel, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResponseContainerListUserGroupModel): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/wavefront_api_client/models/response_container_paged_user_group_model.py b/wavefront_api_client/models/response_container_paged_user_group_model.py new file mode 100644 index 0000000..57c32af --- /dev/null +++ b/wavefront_api_client/models/response_container_paged_user_group_model.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + Wavefront REST API + +

The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.

When you make REST API calls outside the Wavefront REST API documentation you must add the header \"Authorization: Bearer <<API-TOKEN>>\" to your HTTP requests.

# noqa: E501 + + OpenAPI spec version: v2 + Contact: chitimba@wavefront.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from wavefront_api_client.models.paged_user_group_model import PagedUserGroupModel # noqa: F401,E501 +from wavefront_api_client.models.response_status import ResponseStatus # noqa: F401,E501 + + +class ResponseContainerPagedUserGroupModel(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'response': 'PagedUserGroupModel', + 'status': 'ResponseStatus' + } + + attribute_map = { + 'response': 'response', + 'status': 'status' + } + + def __init__(self, response=None, status=None): # noqa: E501 + """ResponseContainerPagedUserGroupModel - a model defined in Swagger""" # noqa: E501 + + self._response = None + self._status = None + self.discriminator = None + + if response is not None: + self.response = response + self.status = status + + @property + def response(self): + """Gets the response of this ResponseContainerPagedUserGroupModel. # noqa: E501 + + + :return: The response of this ResponseContainerPagedUserGroupModel. # noqa: E501 + :rtype: PagedUserGroupModel + """ + return self._response + + @response.setter + def response(self, response): + """Sets the response of this ResponseContainerPagedUserGroupModel. + + + :param response: The response of this ResponseContainerPagedUserGroupModel. # noqa: E501 + :type: PagedUserGroupModel + """ + + self._response = response + + @property + def status(self): + """Gets the status of this ResponseContainerPagedUserGroupModel. # noqa: E501 + + + :return: The status of this ResponseContainerPagedUserGroupModel. # noqa: E501 + :rtype: ResponseStatus + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ResponseContainerPagedUserGroupModel. + + + :param status: The status of this ResponseContainerPagedUserGroupModel. # noqa: E501 + :type: ResponseStatus + """ + if status is None: + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + + self._status = status + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ResponseContainerPagedUserGroupModel, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResponseContainerPagedUserGroupModel): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/wavefront_api_client/models/response_container_user_api_token.py b/wavefront_api_client/models/response_container_user_api_token.py new file mode 100644 index 0000000..4712811 --- /dev/null +++ b/wavefront_api_client/models/response_container_user_api_token.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + Wavefront REST API + +

The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.

When you make REST API calls outside the Wavefront REST API documentation you must add the header \"Authorization: Bearer <<API-TOKEN>>\" to your HTTP requests.

# noqa: E501 + + OpenAPI spec version: v2 + Contact: chitimba@wavefront.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from wavefront_api_client.models.response_status import ResponseStatus # noqa: F401,E501 +from wavefront_api_client.models.user_api_token import UserApiToken # noqa: F401,E501 + + +class ResponseContainerUserApiToken(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'response': 'UserApiToken', + 'status': 'ResponseStatus' + } + + attribute_map = { + 'response': 'response', + 'status': 'status' + } + + def __init__(self, response=None, status=None): # noqa: E501 + """ResponseContainerUserApiToken - a model defined in Swagger""" # noqa: E501 + + self._response = None + self._status = None + self.discriminator = None + + if response is not None: + self.response = response + self.status = status + + @property + def response(self): + """Gets the response of this ResponseContainerUserApiToken. # noqa: E501 + + + :return: The response of this ResponseContainerUserApiToken. # noqa: E501 + :rtype: UserApiToken + """ + return self._response + + @response.setter + def response(self, response): + """Sets the response of this ResponseContainerUserApiToken. + + + :param response: The response of this ResponseContainerUserApiToken. # noqa: E501 + :type: UserApiToken + """ + + self._response = response + + @property + def status(self): + """Gets the status of this ResponseContainerUserApiToken. # noqa: E501 + + + :return: The status of this ResponseContainerUserApiToken. # noqa: E501 + :rtype: ResponseStatus + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ResponseContainerUserApiToken. + + + :param status: The status of this ResponseContainerUserApiToken. # noqa: E501 + :type: ResponseStatus + """ + if status is None: + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + + self._status = status + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ResponseContainerUserApiToken, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResponseContainerUserApiToken): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/wavefront_api_client/models/response_container_user_group_model.py b/wavefront_api_client/models/response_container_user_group_model.py new file mode 100644 index 0000000..7b0e2c4 --- /dev/null +++ b/wavefront_api_client/models/response_container_user_group_model.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + Wavefront REST API + +

The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.

When you make REST API calls outside the Wavefront REST API documentation you must add the header \"Authorization: Bearer <<API-TOKEN>>\" to your HTTP requests.

# noqa: E501 + + OpenAPI spec version: v2 + Contact: chitimba@wavefront.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from wavefront_api_client.models.response_status import ResponseStatus # noqa: F401,E501 +from wavefront_api_client.models.user_group_model import UserGroupModel # noqa: F401,E501 + + +class ResponseContainerUserGroupModel(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'response': 'UserGroupModel', + 'status': 'ResponseStatus' + } + + attribute_map = { + 'response': 'response', + 'status': 'status' + } + + def __init__(self, response=None, status=None): # noqa: E501 + """ResponseContainerUserGroupModel - a model defined in Swagger""" # noqa: E501 + + self._response = None + self._status = None + self.discriminator = None + + if response is not None: + self.response = response + self.status = status + + @property + def response(self): + """Gets the response of this ResponseContainerUserGroupModel. # noqa: E501 + + + :return: The response of this ResponseContainerUserGroupModel. # noqa: E501 + :rtype: UserGroupModel + """ + return self._response + + @response.setter + def response(self, response): + """Sets the response of this ResponseContainerUserGroupModel. + + + :param response: The response of this ResponseContainerUserGroupModel. # noqa: E501 + :type: UserGroupModel + """ + + self._response = response + + @property + def status(self): + """Gets the status of this ResponseContainerUserGroupModel. # noqa: E501 + + + :return: The status of this ResponseContainerUserGroupModel. # noqa: E501 + :rtype: ResponseStatus + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ResponseContainerUserGroupModel. + + + :param status: The status of this ResponseContainerUserGroupModel. # noqa: E501 + :type: ResponseStatus + """ + if status is None: + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + + self._status = status + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ResponseContainerUserGroupModel, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResponseContainerUserGroupModel): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/wavefront_api_client/models/search_query.py b/wavefront_api_client/models/search_query.py index 5f0d998..2cb066e 100644 --- a/wavefront_api_client/models/search_query.py +++ b/wavefront_api_client/models/search_query.py @@ -33,26 +33,31 @@ class SearchQuery(object): swagger_types = { 'key': 'str', 'matching_method': 'str', + 'negated': 'bool', 'value': 'str' } attribute_map = { 'key': 'key', 'matching_method': 'matchingMethod', + 'negated': 'negated', 'value': 'value' } - def __init__(self, key=None, matching_method=None, value=None): # noqa: E501 + def __init__(self, key=None, matching_method=None, negated=None, value=None): # noqa: E501 """SearchQuery - a model defined in Swagger""" # noqa: E501 self._key = None self._matching_method = None + self._negated = None self._value = None self.discriminator = None self.key = key if matching_method is not None: self.matching_method = matching_method + if negated is not None: + self.negated = negated self.value = value @property @@ -109,6 +114,29 @@ def matching_method(self, matching_method): self._matching_method = matching_method + @property + def negated(self): + """Gets the negated of this SearchQuery. # noqa: E501 + + The flag to create a NOT operation. Default: false # noqa: E501 + + :return: The negated of this SearchQuery. # noqa: E501 + :rtype: bool + """ + return self._negated + + @negated.setter + def negated(self, negated): + """Sets the negated of this SearchQuery. + + The flag to create a NOT operation. Default: false # noqa: E501 + + :param negated: The negated of this SearchQuery. # noqa: E501 + :type: bool + """ + + self._negated = negated + @property def value(self): """Gets the value of this SearchQuery. # noqa: E501 diff --git a/wavefront_api_client/models/user.py b/wavefront_api_client/models/user.py index 0649abd..0ed70c3 100644 --- a/wavefront_api_client/models/user.py +++ b/wavefront_api_client/models/user.py @@ -37,11 +37,13 @@ class User(object): 'api_token2': 'str', 'credential': 'str', 'customer': 'str', + 'extra_api_tokens': 'list[str]', 'groups': 'list[str]', 'identifier': 'str', 'invalid_password_attempts': 'int', 'last_logout': 'int', 'last_successful_login': 'int', + 'old_passwords': 'list[str]', 'onboarding_state': 'str', 'provider': 'str', 'reset_token': 'str', @@ -57,11 +59,13 @@ class User(object): 'api_token2': 'apiToken2', 'credential': 'credential', 'customer': 'customer', + 'extra_api_tokens': 'extraApiTokens', 'groups': 'groups', 'identifier': 'identifier', 'invalid_password_attempts': 'invalidPasswordAttempts', 'last_logout': 'lastLogout', 'last_successful_login': 'lastSuccessfulLogin', + 'old_passwords': 'oldPasswords', 'onboarding_state': 'onboardingState', 'provider': 'provider', 'reset_token': 'resetToken', @@ -72,18 +76,20 @@ class User(object): 'user_groups': 'userGroups' } - def __init__(self, api_token=None, api_token2=None, credential=None, customer=None, groups=None, identifier=None, invalid_password_attempts=None, last_logout=None, last_successful_login=None, onboarding_state=None, provider=None, reset_token=None, reset_token_creation_millis=None, settings=None, sso_id=None, super_admin=None, user_groups=None): # noqa: E501 + def __init__(self, api_token=None, api_token2=None, credential=None, customer=None, extra_api_tokens=None, groups=None, identifier=None, invalid_password_attempts=None, last_logout=None, last_successful_login=None, old_passwords=None, onboarding_state=None, provider=None, reset_token=None, reset_token_creation_millis=None, settings=None, sso_id=None, super_admin=None, user_groups=None): # noqa: E501 """User - a model defined in Swagger""" # noqa: E501 self._api_token = None self._api_token2 = None self._credential = None self._customer = None + self._extra_api_tokens = None self._groups = None self._identifier = None self._invalid_password_attempts = None self._last_logout = None self._last_successful_login = None + self._old_passwords = None self._onboarding_state = None self._provider = None self._reset_token = None @@ -102,6 +108,8 @@ def __init__(self, api_token=None, api_token2=None, credential=None, customer=No self.credential = credential if customer is not None: self.customer = customer + if extra_api_tokens is not None: + self.extra_api_tokens = extra_api_tokens if groups is not None: self.groups = groups if identifier is not None: @@ -112,6 +120,8 @@ def __init__(self, api_token=None, api_token2=None, credential=None, customer=No self.last_logout = last_logout if last_successful_login is not None: self.last_successful_login = last_successful_login + if old_passwords is not None: + self.old_passwords = old_passwords if onboarding_state is not None: self.onboarding_state = onboarding_state if provider is not None: @@ -213,6 +223,27 @@ def customer(self, customer): self._customer = customer + @property + def extra_api_tokens(self): + """Gets the extra_api_tokens of this User. # noqa: E501 + + + :return: The extra_api_tokens of this User. # noqa: E501 + :rtype: list[str] + """ + return self._extra_api_tokens + + @extra_api_tokens.setter + def extra_api_tokens(self, extra_api_tokens): + """Sets the extra_api_tokens of this User. + + + :param extra_api_tokens: The extra_api_tokens of this User. # noqa: E501 + :type: list[str] + """ + + self._extra_api_tokens = extra_api_tokens + @property def groups(self): """Gets the groups of this User. # noqa: E501 @@ -318,6 +349,27 @@ def last_successful_login(self, last_successful_login): self._last_successful_login = last_successful_login + @property + def old_passwords(self): + """Gets the old_passwords of this User. # noqa: E501 + + + :return: The old_passwords of this User. # noqa: E501 + :rtype: list[str] + """ + return self._old_passwords + + @old_passwords.setter + def old_passwords(self, old_passwords): + """Sets the old_passwords of this User. + + + :param old_passwords: The old_passwords of this User. # noqa: E501 + :type: list[str] + """ + + self._old_passwords = old_passwords + @property def onboarding_state(self): """Gets the onboarding_state of this User. # noqa: E501 diff --git a/wavefront_api_client/models/user_api_token.py b/wavefront_api_client/models/user_api_token.py new file mode 100644 index 0000000..c8dc7aa --- /dev/null +++ b/wavefront_api_client/models/user_api_token.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + Wavefront REST API + +

The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.

When you make REST API calls outside the Wavefront REST API documentation you must add the header \"Authorization: Bearer <<API-TOKEN>>\" to your HTTP requests.

# noqa: E501 + + OpenAPI spec version: v2 + Contact: chitimba@wavefront.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class UserApiToken(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'token_id': 'str', + 'token_name': 'str' + } + + attribute_map = { + 'token_id': 'tokenID', + 'token_name': 'tokenName' + } + + def __init__(self, token_id=None, token_name=None): # noqa: E501 + """UserApiToken - a model defined in Swagger""" # noqa: E501 + + self._token_id = None + self._token_name = None + self.discriminator = None + + self.token_id = token_id + if token_name is not None: + self.token_name = token_name + + @property + def token_id(self): + """Gets the token_id of this UserApiToken. # noqa: E501 + + The identifier of the user API token # noqa: E501 + + :return: The token_id of this UserApiToken. # noqa: E501 + :rtype: str + """ + return self._token_id + + @token_id.setter + def token_id(self, token_id): + """Sets the token_id of this UserApiToken. + + The identifier of the user API token # noqa: E501 + + :param token_id: The token_id of this UserApiToken. # noqa: E501 + :type: str + """ + if token_id is None: + raise ValueError("Invalid value for `token_id`, must not be `None`") # noqa: E501 + + self._token_id = token_id + + @property + def token_name(self): + """Gets the token_name of this UserApiToken. # noqa: E501 + + The name of the user API token # noqa: E501 + + :return: The token_name of this UserApiToken. # noqa: E501 + :rtype: str + """ + return self._token_name + + @token_name.setter + def token_name(self, token_name): + """Sets the token_name of this UserApiToken. + + The name of the user API token # noqa: E501 + + :param token_name: The token_name of this UserApiToken. # noqa: E501 + :type: str + """ + + self._token_name = token_name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UserApiToken, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserApiToken): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/wavefront_api_client/models/user_group.py b/wavefront_api_client/models/user_group.py index b975a03..a770cdd 100644 --- a/wavefront_api_client/models/user_group.py +++ b/wavefront_api_client/models/user_group.py @@ -33,8 +33,8 @@ class UserGroup(object): and the value is json key in definition. """ swagger_types = { - 'created_epoch_millis': 'int', 'customer': 'str', + 'description': 'str', 'id': 'str', 'name': 'str', 'permissions': 'list[str]', @@ -44,8 +44,8 @@ class UserGroup(object): } attribute_map = { - 'created_epoch_millis': 'createdEpochMillis', 'customer': 'customer', + 'description': 'description', 'id': 'id', 'name': 'name', 'permissions': 'permissions', @@ -54,11 +54,11 @@ class UserGroup(object): 'users': 'users' } - def __init__(self, created_epoch_millis=None, customer=None, id=None, name=None, permissions=None, properties=None, user_count=None, users=None): # noqa: E501 + def __init__(self, customer=None, description=None, id=None, name=None, permissions=None, properties=None, user_count=None, users=None): # noqa: E501 """UserGroup - a model defined in Swagger""" # noqa: E501 - self._created_epoch_millis = None self._customer = None + self._description = None self._id = None self._name = None self._permissions = None @@ -67,14 +67,16 @@ def __init__(self, created_epoch_millis=None, customer=None, id=None, name=None, self._users = None self.discriminator = None - if created_epoch_millis is not None: - self.created_epoch_millis = created_epoch_millis if customer is not None: self.customer = customer + if description is not None: + self.description = description if id is not None: self.id = id - self.name = name - self.permissions = permissions + if name is not None: + self.name = name + if permissions is not None: + self.permissions = permissions if properties is not None: self.properties = properties if user_count is not None: @@ -83,54 +85,56 @@ def __init__(self, created_epoch_millis=None, customer=None, id=None, name=None, self.users = users @property - def created_epoch_millis(self): - """Gets the created_epoch_millis of this UserGroup. # noqa: E501 + def customer(self): + """Gets the customer of this UserGroup. # noqa: E501 + ID of the customer to which the user group belongs # noqa: E501 - :return: The created_epoch_millis of this UserGroup. # noqa: E501 - :rtype: int + :return: The customer of this UserGroup. # noqa: E501 + :rtype: str """ - return self._created_epoch_millis + return self._customer - @created_epoch_millis.setter - def created_epoch_millis(self, created_epoch_millis): - """Sets the created_epoch_millis of this UserGroup. + @customer.setter + def customer(self, customer): + """Sets the customer of this UserGroup. + ID of the customer to which the user group belongs # noqa: E501 - :param created_epoch_millis: The created_epoch_millis of this UserGroup. # noqa: E501 - :type: int + :param customer: The customer of this UserGroup. # noqa: E501 + :type: str """ - self._created_epoch_millis = created_epoch_millis + self._customer = customer @property - def customer(self): - """Gets the customer of this UserGroup. # noqa: E501 + def description(self): + """Gets the description of this UserGroup. # noqa: E501 - The id of the customer to which the user group belongs # noqa: E501 + The description of the user group # noqa: E501 - :return: The customer of this UserGroup. # noqa: E501 + :return: The description of this UserGroup. # noqa: E501 :rtype: str """ - return self._customer + return self._description - @customer.setter - def customer(self, customer): - """Sets the customer of this UserGroup. + @description.setter + def description(self, description): + """Sets the description of this UserGroup. - The id of the customer to which the user group belongs # noqa: E501 + The description of the user group # noqa: E501 - :param customer: The customer of this UserGroup. # noqa: E501 + :param description: The description of this UserGroup. # noqa: E501 :type: str """ - self._customer = customer + self._description = description @property def id(self): """Gets the id of this UserGroup. # noqa: E501 - The unique identifier of the user group # noqa: E501 + Unique ID for the user group # noqa: E501 :return: The id of this UserGroup. # noqa: E501 :rtype: str @@ -141,7 +145,7 @@ def id(self): def id(self, id): """Sets the id of this UserGroup. - The unique identifier of the user group # noqa: E501 + Unique ID for the user group # noqa: E501 :param id: The id of this UserGroup. # noqa: E501 :type: str @@ -153,7 +157,7 @@ def id(self, id): def name(self): """Gets the name of this UserGroup. # noqa: E501 - The name of the user group # noqa: E501 + Name of the user group # noqa: E501 :return: The name of this UserGroup. # noqa: E501 :rtype: str @@ -164,13 +168,11 @@ def name(self): def name(self, name): """Sets the name of this UserGroup. - The name of the user group # noqa: E501 + Name of the user group # noqa: E501 :param name: The name of this UserGroup. # noqa: E501 :type: str """ - if name is None: - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -178,7 +180,7 @@ def name(self, name): def permissions(self): """Gets the permissions of this UserGroup. # noqa: E501 - List of permissions the user group has been granted access to # noqa: E501 + Permission assigned to the user group # noqa: E501 :return: The permissions of this UserGroup. # noqa: E501 :rtype: list[str] @@ -189,13 +191,11 @@ def permissions(self): def permissions(self, permissions): """Sets the permissions of this UserGroup. - List of permissions the user group has been granted access to # noqa: E501 + Permission assigned to the user group # noqa: E501 :param permissions: The permissions of this UserGroup. # noqa: E501 :type: list[str] """ - if permissions is None: - raise ValueError("Invalid value for `permissions`, must not be `None`") # noqa: E501 self._permissions = permissions @@ -249,7 +249,7 @@ def user_count(self, user_count): def users(self): """Gets the users of this UserGroup. # noqa: E501 - List(may be incomplete) of users that are members of the user group. # noqa: E501 + List of Users that are members of the user group. Maybe incomplete. # noqa: E501 :return: The users of this UserGroup. # noqa: E501 :rtype: list[str] @@ -260,7 +260,7 @@ def users(self): def users(self, users): """Sets the users of this UserGroup. - List(may be incomplete) of users that are members of the user group. # noqa: E501 + List of Users that are members of the user group. Maybe incomplete. # noqa: E501 :param users: The users of this UserGroup. # noqa: E501 :type: list[str] diff --git a/wavefront_api_client/models/user_group_model.py b/wavefront_api_client/models/user_group_model.py new file mode 100644 index 0000000..696624d --- /dev/null +++ b/wavefront_api_client/models/user_group_model.py @@ -0,0 +1,343 @@ +# coding: utf-8 + +""" + Wavefront REST API + +

The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.

When you make REST API calls outside the Wavefront REST API documentation you must add the header \"Authorization: Bearer <<API-TOKEN>>\" to your HTTP requests.

# noqa: E501 + + OpenAPI spec version: v2 + Contact: chitimba@wavefront.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from wavefront_api_client.models.user_group_properties_dto import UserGroupPropertiesDTO # noqa: F401,E501 + + +class UserGroupModel(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'created_epoch_millis': 'int', + 'customer': 'str', + 'description': 'str', + 'id': 'str', + 'name': 'str', + 'permissions': 'list[str]', + 'properties': 'UserGroupPropertiesDTO', + 'user_count': 'int', + 'users': 'list[str]' + } + + attribute_map = { + 'created_epoch_millis': 'createdEpochMillis', + 'customer': 'customer', + 'description': 'description', + 'id': 'id', + 'name': 'name', + 'permissions': 'permissions', + 'properties': 'properties', + 'user_count': 'userCount', + 'users': 'users' + } + + def __init__(self, created_epoch_millis=None, customer=None, description=None, id=None, name=None, permissions=None, properties=None, user_count=None, users=None): # noqa: E501 + """UserGroupModel - a model defined in Swagger""" # noqa: E501 + + self._created_epoch_millis = None + self._customer = None + self._description = None + self._id = None + self._name = None + self._permissions = None + self._properties = None + self._user_count = None + self._users = None + self.discriminator = None + + if created_epoch_millis is not None: + self.created_epoch_millis = created_epoch_millis + if customer is not None: + self.customer = customer + if description is not None: + self.description = description + if id is not None: + self.id = id + self.name = name + self.permissions = permissions + if properties is not None: + self.properties = properties + if user_count is not None: + self.user_count = user_count + if users is not None: + self.users = users + + @property + def created_epoch_millis(self): + """Gets the created_epoch_millis of this UserGroupModel. # noqa: E501 + + + :return: The created_epoch_millis of this UserGroupModel. # noqa: E501 + :rtype: int + """ + return self._created_epoch_millis + + @created_epoch_millis.setter + def created_epoch_millis(self, created_epoch_millis): + """Sets the created_epoch_millis of this UserGroupModel. + + + :param created_epoch_millis: The created_epoch_millis of this UserGroupModel. # noqa: E501 + :type: int + """ + + self._created_epoch_millis = created_epoch_millis + + @property + def customer(self): + """Gets the customer of this UserGroupModel. # noqa: E501 + + The id of the customer to which the user group belongs # noqa: E501 + + :return: The customer of this UserGroupModel. # noqa: E501 + :rtype: str + """ + return self._customer + + @customer.setter + def customer(self, customer): + """Sets the customer of this UserGroupModel. + + The id of the customer to which the user group belongs # noqa: E501 + + :param customer: The customer of this UserGroupModel. # noqa: E501 + :type: str + """ + + self._customer = customer + + @property + def description(self): + """Gets the description of this UserGroupModel. # noqa: E501 + + The description of the user group # noqa: E501 + + :return: The description of this UserGroupModel. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this UserGroupModel. + + The description of the user group # noqa: E501 + + :param description: The description of this UserGroupModel. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def id(self): + """Gets the id of this UserGroupModel. # noqa: E501 + + The unique identifier of the user group # noqa: E501 + + :return: The id of this UserGroupModel. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this UserGroupModel. + + The unique identifier of the user group # noqa: E501 + + :param id: The id of this UserGroupModel. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def name(self): + """Gets the name of this UserGroupModel. # noqa: E501 + + The name of the user group # noqa: E501 + + :return: The name of this UserGroupModel. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this UserGroupModel. + + The name of the user group # noqa: E501 + + :param name: The name of this UserGroupModel. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def permissions(self): + """Gets the permissions of this UserGroupModel. # noqa: E501 + + List of permissions the user group has been granted access to # noqa: E501 + + :return: The permissions of this UserGroupModel. # noqa: E501 + :rtype: list[str] + """ + return self._permissions + + @permissions.setter + def permissions(self, permissions): + """Sets the permissions of this UserGroupModel. + + List of permissions the user group has been granted access to # noqa: E501 + + :param permissions: The permissions of this UserGroupModel. # noqa: E501 + :type: list[str] + """ + if permissions is None: + raise ValueError("Invalid value for `permissions`, must not be `None`") # noqa: E501 + + self._permissions = permissions + + @property + def properties(self): + """Gets the properties of this UserGroupModel. # noqa: E501 + + The properties of the user group(name editable, users editable, etc.) # noqa: E501 + + :return: The properties of this UserGroupModel. # noqa: E501 + :rtype: UserGroupPropertiesDTO + """ + return self._properties + + @properties.setter + def properties(self, properties): + """Sets the properties of this UserGroupModel. + + The properties of the user group(name editable, users editable, etc.) # noqa: E501 + + :param properties: The properties of this UserGroupModel. # noqa: E501 + :type: UserGroupPropertiesDTO + """ + + self._properties = properties + + @property + def user_count(self): + """Gets the user_count of this UserGroupModel. # noqa: E501 + + Total number of users that are members of the user group # noqa: E501 + + :return: The user_count of this UserGroupModel. # noqa: E501 + :rtype: int + """ + return self._user_count + + @user_count.setter + def user_count(self, user_count): + """Sets the user_count of this UserGroupModel. + + Total number of users that are members of the user group # noqa: E501 + + :param user_count: The user_count of this UserGroupModel. # noqa: E501 + :type: int + """ + + self._user_count = user_count + + @property + def users(self): + """Gets the users of this UserGroupModel. # noqa: E501 + + List(may be incomplete) of users that are members of the user group. # noqa: E501 + + :return: The users of this UserGroupModel. # noqa: E501 + :rtype: list[str] + """ + return self._users + + @users.setter + def users(self, users): + """Sets the users of this UserGroupModel. + + List(may be incomplete) of users that are members of the user group. # noqa: E501 + + :param users: The users of this UserGroupModel. # noqa: E501 + :type: list[str] + """ + + self._users = users + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UserGroupModel, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserGroupModel): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/wavefront_api_client/models/user_group_write.py b/wavefront_api_client/models/user_group_write.py index 480f5b1..cbdb344 100644 --- a/wavefront_api_client/models/user_group_write.py +++ b/wavefront_api_client/models/user_group_write.py @@ -33,6 +33,7 @@ class UserGroupWrite(object): swagger_types = { 'created_epoch_millis': 'int', 'customer': 'str', + 'description': 'str', 'id': 'str', 'name': 'str', 'permissions': 'list[str]' @@ -41,16 +42,18 @@ class UserGroupWrite(object): attribute_map = { 'created_epoch_millis': 'createdEpochMillis', 'customer': 'customer', + 'description': 'description', 'id': 'id', 'name': 'name', 'permissions': 'permissions' } - def __init__(self, created_epoch_millis=None, customer=None, id=None, name=None, permissions=None): # noqa: E501 + def __init__(self, created_epoch_millis=None, customer=None, description=None, id=None, name=None, permissions=None): # noqa: E501 """UserGroupWrite - a model defined in Swagger""" # noqa: E501 self._created_epoch_millis = None self._customer = None + self._description = None self._id = None self._name = None self._permissions = None @@ -60,6 +63,8 @@ def __init__(self, created_epoch_millis=None, customer=None, id=None, name=None, self.created_epoch_millis = created_epoch_millis if customer is not None: self.customer = customer + if description is not None: + self.description = description if id is not None: self.id = id self.name = name @@ -109,6 +114,29 @@ def customer(self, customer): self._customer = customer + @property + def description(self): + """Gets the description of this UserGroupWrite. # noqa: E501 + + The description of the user group # noqa: E501 + + :return: The description of this UserGroupWrite. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this UserGroupWrite. + + The description of the user group # noqa: E501 + + :param description: The description of this UserGroupWrite. # noqa: E501 + :type: str + """ + + self._description = description + @property def id(self): """Gets the id of this UserGroupWrite. # noqa: E501 diff --git a/wavefront_api_client/models/user_settings.py b/wavefront_api_client/models/user_settings.py index 681916a..79c3f67 100644 --- a/wavefront_api_client/models/user_settings.py +++ b/wavefront_api_client/models/user_settings.py @@ -33,6 +33,7 @@ class UserSettings(object): swagger_types = { 'always_hide_querybuilder': 'bool', 'chart_title_scalar': 'int', + 'favorite_qb_functions': 'list[str]', 'hide_ts_when_querybuilder_shown': 'bool', 'landing_dashboard_slug': 'str', 'preferred_time_zone': 'str', @@ -45,6 +46,7 @@ class UserSettings(object): attribute_map = { 'always_hide_querybuilder': 'alwaysHideQuerybuilder', 'chart_title_scalar': 'chartTitleScalar', + 'favorite_qb_functions': 'favoriteQBFunctions', 'hide_ts_when_querybuilder_shown': 'hideTSWhenQuerybuilderShown', 'landing_dashboard_slug': 'landingDashboardSlug', 'preferred_time_zone': 'preferredTimeZone', @@ -54,11 +56,12 @@ class UserSettings(object): 'use_dark_theme': 'useDarkTheme' } - def __init__(self, always_hide_querybuilder=None, chart_title_scalar=None, hide_ts_when_querybuilder_shown=None, landing_dashboard_slug=None, preferred_time_zone=None, show_onboarding=None, show_querybuilder_by_default=None, use24_hour_time=None, use_dark_theme=None): # noqa: E501 + def __init__(self, always_hide_querybuilder=None, chart_title_scalar=None, favorite_qb_functions=None, hide_ts_when_querybuilder_shown=None, landing_dashboard_slug=None, preferred_time_zone=None, show_onboarding=None, show_querybuilder_by_default=None, use24_hour_time=None, use_dark_theme=None): # noqa: E501 """UserSettings - a model defined in Swagger""" # noqa: E501 self._always_hide_querybuilder = None self._chart_title_scalar = None + self._favorite_qb_functions = None self._hide_ts_when_querybuilder_shown = None self._landing_dashboard_slug = None self._preferred_time_zone = None @@ -72,6 +75,8 @@ def __init__(self, always_hide_querybuilder=None, chart_title_scalar=None, hide_ self.always_hide_querybuilder = always_hide_querybuilder if chart_title_scalar is not None: self.chart_title_scalar = chart_title_scalar + if favorite_qb_functions is not None: + self.favorite_qb_functions = favorite_qb_functions if hide_ts_when_querybuilder_shown is not None: self.hide_ts_when_querybuilder_shown = hide_ts_when_querybuilder_shown if landing_dashboard_slug is not None: @@ -129,6 +134,27 @@ def chart_title_scalar(self, chart_title_scalar): self._chart_title_scalar = chart_title_scalar + @property + def favorite_qb_functions(self): + """Gets the favorite_qb_functions of this UserSettings. # noqa: E501 + + + :return: The favorite_qb_functions of this UserSettings. # noqa: E501 + :rtype: list[str] + """ + return self._favorite_qb_functions + + @favorite_qb_functions.setter + def favorite_qb_functions(self, favorite_qb_functions): + """Sets the favorite_qb_functions of this UserSettings. + + + :param favorite_qb_functions: The favorite_qb_functions of this UserSettings. # noqa: E501 + :type: list[str] + """ + + self._favorite_qb_functions = favorite_qb_functions + @property def hide_ts_when_querybuilder_shown(self): """Gets the hide_ts_when_querybuilder_shown of this UserSettings. # noqa: E501