diff --git a/README.md b/README.md index 1e38319..8f29f93 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,7 @@ Class | Method | HTTP request *ApplicationApi* | [**get_app_version**](docs/ApplicationApi.md#get_app_version) | **GET** /enterprise/{enterprise_id}/application/{application_id}/version/{version_id}/ *ApplicationApi* | [**get_app_versions**](docs/ApplicationApi.md#get_app_versions) | **GET** /enterprise/{enterprise_id}/application/{application_id}/version/ *ApplicationApi* | [**get_application**](docs/ApplicationApi.md#get_application) | **GET** /enterprise/{enterprise_id}/application/{application_id}/ +*ApplicationApi* | [**get_install_devices**](docs/ApplicationApi.md#get_install_devices) | **GET** /enterprise/{enterprise_id}/application/{application_id}/version/{version_id}/installdevices *ApplicationApi* | [**upload**](docs/ApplicationApi.md#upload) | **POST** /enterprise/{enterprise_id}/application/upload/ *CommandsApi* | [**get_command**](docs/CommandsApi.md#get_command) | **GET** /enterprise/{enterprise_id}/device/{device_id}/command/{command_id}/ *CommandsApi* | [**run_command**](docs/CommandsApi.md#run_command) | **POST** /enterprise/{enterprise_id}/device/{device_id}/command/ @@ -163,6 +164,7 @@ Class | Method | HTTP request - [InlineResponse200](docs/InlineResponse200.md) - [InlineResponse2001](docs/InlineResponse2001.md) - [InlineResponse20010](docs/InlineResponse20010.md) + - [InlineResponse20011](docs/InlineResponse20011.md) - [InlineResponse2002](docs/InlineResponse2002.md) - [InlineResponse2003](docs/InlineResponse2003.md) - [InlineResponse2004](docs/InlineResponse2004.md) @@ -172,6 +174,7 @@ Class | Method | HTTP request - [InlineResponse2008](docs/InlineResponse2008.md) - [InlineResponse2009](docs/InlineResponse2009.md) - [InlineResponse201](docs/InlineResponse201.md) + - [InstallDevices](docs/InstallDevices.md) - [TokenInfoV1](docs/TokenInfoV1.md) - [TokenRenewV0](docs/TokenRenewV0.md) - [V0CommandArgs](docs/V0CommandArgs.md) diff --git a/docs/ApplicationApi.md b/docs/ApplicationApi.md index 5a9694e..6ed8bd2 100644 --- a/docs/ApplicationApi.md +++ b/docs/ApplicationApi.md @@ -10,7 +10,8 @@ Method | HTTP request | Description [**get_app_version**](ApplicationApi.md#get_app_version) | **GET** /enterprise/{enterprise_id}/application/{application_id}/version/{version_id}/ | Get app version information [**get_app_versions**](ApplicationApi.md#get_app_versions) | **GET** /enterprise/{enterprise_id}/application/{application_id}/version/ | List App versions [**get_application**](ApplicationApi.md#get_application) | **GET** /enterprise/{enterprise_id}/application/{application_id}/ | Get application information -[**upload**](ApplicationApi.md#upload) | **POST** /enterprise/{enterprise_id}/application/upload/ | upload an application to enterprise +[**get_install_devices**](ApplicationApi.md#get_install_devices) | **GET** /enterprise/{enterprise_id}/application/{application_id}/version/{version_id}/installdevices | List install devices +[**upload**](ApplicationApi.md#upload) | **POST** /enterprise/{enterprise_id}/application/upload/ | Upload an application to enterprise # **delete_app_version** @@ -349,10 +350,71 @@ 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_install_devices** +> InlineResponse2002 get_install_devices(version_id, application_id, enterprise_id, search=search, limit=limit, offset=offset) + +List install devices + +Returns list of devices with the specified app version installed + +### Example +```python +import esperclient +from esperclient.rest import ApiException + +# Configure API key authorization: apiKey +configuration = esperclient.Configuration() +configuration.host = 'SERVER_URL' +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +configuration.api_key_prefix['Authorization'] = 'Bearer' + +# create an instance of the API class +api_instance = esperclient.ApplicationApi(esperclient.ApiClient(configuration)) +version_id = 'version_id_example' # str | A UUID string identifying this app version. +application_id = 'application_id_example' # str | A UUID string identifying this application. +enterprise_id = 'enterprise_id_example' # str | A UUID string identifying enterprise. +search = 'search_example' # str | A search term (optional) +limit = 56 # int | Number of results to return per page (optional) +offset = 56 # int | The initial index from which to return the results (optional) + +try: + # List install devices + api_response = api_instance.get_install_devices(version_id, application_id, enterprise_id, search=search, limit=limit, offset=offset) + print(api_response) +except ApiException as e: + print("Exception when calling ApplicationApi->get_install_devices: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **version_id** | [**str**](.md)| A UUID string identifying this app version. | + **application_id** | [**str**](.md)| A UUID string identifying this application. | + **enterprise_id** | **str**| A UUID string identifying enterprise. | + **search** | **str**| A search term | [optional] + **limit** | **int**| Number of results to return per page | [optional] + **offset** | **int**| The initial index from which to return the results | [optional] + +### Return type + +[**InlineResponse2002**](InlineResponse2002.md) + +### Authorization + +[apiKey](../README.md#apiKey) + +### 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) + # **upload** > InlineResponse201 upload(enterprise_id, app_file) -upload an application to enterprise +Upload an application to enterprise Returns application @@ -370,10 +432,10 @@ configuration.api_key_prefix['Authorization'] = 'Bearer' # create an instance of the API class api_instance = esperclient.ApplicationApi(esperclient.ApiClient(configuration)) enterprise_id = 'enterprise_id_example' # str | A UUID string identifying this enterprise. -app_file = '/path/to/file.txt' # file | valid APK file +app_file = '/path/to/file.txt' # file | Valid APK file try: - # upload an application to enterprise + # Upload an application to enterprise api_response = api_instance.upload(enterprise_id, app_file) print(api_response) except ApiException as e: @@ -385,7 +447,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **enterprise_id** | **str**| A UUID string identifying this enterprise. | - **app_file** | **file**| valid APK file | + **app_file** | **file**| Valid APK file | ### Return type diff --git a/docs/CommandsV2Api.md b/docs/CommandsV2Api.md index 240f3ab..35ff532 100644 --- a/docs/CommandsV2Api.md +++ b/docs/CommandsV2Api.md @@ -65,7 +65,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_command_request_status** -> InlineResponse2009 get_command_request_status(enterprise_id, request_id, device=device, state=state) +> InlineResponse20010 get_command_request_status(enterprise_id, request_id, device=device, state=state) get status list for command request @@ -108,7 +108,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2009**](InlineResponse2009.md) +[**InlineResponse20010**](InlineResponse20010.md) ### Authorization @@ -122,7 +122,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_device_command_history** -> InlineResponse2009 get_device_command_history(enterprise_id, device_id, state=state) +> InlineResponse20010 get_device_command_history(enterprise_id, device_id, state=state) get command history for device @@ -163,7 +163,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2009**](InlineResponse2009.md) +[**InlineResponse20010**](InlineResponse20010.md) ### Authorization @@ -177,7 +177,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) # **list_command_request** -> InlineResponse2008 list_command_request(enterprise_id, command_type=command_type, devices=devices, device_type=device_type, command=command, issued_by=issued_by) +> InlineResponse2009 list_command_request(enterprise_id, command_type=command_type, devices=devices, device_type=device_type, command=command, issued_by=issued_by) List command requests @@ -224,7 +224,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2008**](InlineResponse2008.md) +[**InlineResponse2009**](InlineResponse2009.md) ### Authorization diff --git a/docs/DeviceApi.md b/docs/DeviceApi.md index cd91f54..9fa435f 100644 --- a/docs/DeviceApi.md +++ b/docs/DeviceApi.md @@ -13,7 +13,7 @@ Method | HTTP request | Description # **get_all_devices** -> InlineResponse2002 get_all_devices(enterprise_id, name=name, group=group, imei=imei, serial=serial, state=state, brand=brand, is_gms=is_gms, search=search, tags=tags, limit=limit, offset=offset) +> InlineResponse2003 get_all_devices(enterprise_id, name=name, group=group, imei=imei, serial=serial, state=state, brand=brand, is_gms=is_gms, search=search, tags=tags, limit=limit, offset=offset) Fetch all devices in an enterprise @@ -72,7 +72,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2002**](InlineResponse2002.md) +[**InlineResponse2003**](InlineResponse2003.md) ### Authorization @@ -86,7 +86,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_app_installs** -> InlineResponse2004 get_app_installs(enterprise_id, device_id, device=device, package_name=package_name, application_name=application_name, install_state=install_state, limit=limit, offset=offset) +> InlineResponse2005 get_app_installs(enterprise_id, device_id, device=device, package_name=package_name, application_name=application_name, install_state=install_state, limit=limit, offset=offset) List installed apps @@ -137,7 +137,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2004**](InlineResponse2004.md) +[**InlineResponse2005**](InlineResponse2005.md) ### Authorization @@ -206,7 +206,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_device_apps** -> InlineResponse2003 get_device_apps(enterprise_id, device_id, package_name=package_name, whitelisted=whitelisted, search=search, limit=limit, offset=offset) +> InlineResponse2004 get_device_apps(enterprise_id, device_id, package_name=package_name, whitelisted=whitelisted, search=search, limit=limit, offset=offset) List all device apps @@ -255,7 +255,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2003**](InlineResponse2003.md) +[**InlineResponse2004**](InlineResponse2004.md) ### Authorization @@ -322,7 +322,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_device_event** -> InlineResponse2005 get_device_event(enterprise_id, device_id, latest_event) +> InlineResponse2006 get_device_event(enterprise_id, device_id, latest_event) Get latest device event @@ -363,7 +363,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2005**](InlineResponse2005.md) +[**InlineResponse2006**](InlineResponse2006.md) ### Authorization diff --git a/docs/DeviceGroupApi.md b/docs/DeviceGroupApi.md index de4cdc7..a499a6f 100644 --- a/docs/DeviceGroupApi.md +++ b/docs/DeviceGroupApi.md @@ -118,7 +118,7 @@ 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_groups** -> InlineResponse2006 get_all_groups(enterprise_id, name=name, limit=limit, offset=offset) +> InlineResponse2007 get_all_groups(enterprise_id, name=name, limit=limit, offset=offset) List device groups @@ -161,7 +161,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2006**](InlineResponse2006.md) +[**InlineResponse2007**](InlineResponse2007.md) ### Authorization diff --git a/docs/EnterprisePolicyApi.md b/docs/EnterprisePolicyApi.md index 14aaae6..8dd0fba 100644 --- a/docs/EnterprisePolicyApi.md +++ b/docs/EnterprisePolicyApi.md @@ -171,7 +171,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) # **list_policies** -> InlineResponse2007 list_policies(enterprise_id, name=name, is_active=is_active, limit=limit, offset=offset) +> InlineResponse2008 list_policies(enterprise_id, name=name, is_active=is_active, limit=limit, offset=offset) List all policies in enterprise @@ -216,7 +216,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2007**](InlineResponse2007.md) +[**InlineResponse2008**](InlineResponse2008.md) ### Authorization diff --git a/docs/GeofenceApi.md b/docs/GeofenceApi.md index 06c717a..0668137 100644 --- a/docs/GeofenceApi.md +++ b/docs/GeofenceApi.md @@ -118,7 +118,7 @@ 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_geofences** -> InlineResponse20010 get_all_geofences(enterprise_id, search=search, limit=limit, offset=offset) +> InlineResponse20011 get_all_geofences(enterprise_id, search=search, limit=limit, offset=offset) List Geofences in Enterprise @@ -161,7 +161,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20010**](InlineResponse20010.md) +[**InlineResponse20011**](InlineResponse20011.md) ### Authorization diff --git a/docs/InlineResponse20010.md b/docs/InlineResponse20010.md index af78a4e..974c012 100644 --- a/docs/InlineResponse20010.md +++ b/docs/InlineResponse20010.md @@ -6,10 +6,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**count** | **int** | | +**count** | **int** | | [optional] **next** | **str** | | [optional] **previous** | **str** | | [optional] -**results** | [**list[Geofence]**](Geofence.md) | | +**results** | [**list[V0CommandStatus]**](V0CommandStatus.md) | | [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/InlineResponse20011.md b/docs/InlineResponse20011.md new file mode 100644 index 0000000..1449e31 --- /dev/null +++ b/docs/InlineResponse20011.md @@ -0,0 +1,16 @@ +# InlineResponse20011 +> esperclient.models.inline_response20011 + +### Description + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **int** | | +**next** | **str** | | [optional] +**previous** | **str** | | [optional] +**results** | [**list[Geofence]**](Geofence.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/InlineResponse2002.md b/docs/InlineResponse2002.md index c749e10..2aa2f3d 100644 --- a/docs/InlineResponse2002.md +++ b/docs/InlineResponse2002.md @@ -6,10 +6,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**count** | **int** | | [optional] +**count** | **int** | | **next** | **str** | | [optional] **previous** | **str** | | [optional] -**results** | [**list[Device]**](Device.md) | | [optional] +**results** | [**list[InstallDevices]**](InstallDevices.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/InlineResponse2003.md b/docs/InlineResponse2003.md index 729589e..db81f3c 100644 --- a/docs/InlineResponse2003.md +++ b/docs/InlineResponse2003.md @@ -6,10 +6,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**count** | **int** | | +**count** | **int** | | [optional] **next** | **str** | | [optional] **previous** | **str** | | [optional] -**results** | [**list[DeviceApp]**](DeviceApp.md) | | +**results** | [**list[Device]**](Device.md) | | [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/InlineResponse2004.md b/docs/InlineResponse2004.md index adf2219..f0a76e2 100644 --- a/docs/InlineResponse2004.md +++ b/docs/InlineResponse2004.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **count** | **int** | | **next** | **str** | | [optional] **previous** | **str** | | [optional] -**results** | [**list[AppInstall]**](AppInstall.md) | | +**results** | [**list[DeviceApp]**](DeviceApp.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/InlineResponse2005.md b/docs/InlineResponse2005.md index a896a64..977c07a 100644 --- a/docs/InlineResponse2005.md +++ b/docs/InlineResponse2005.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **count** | **int** | | **next** | **str** | | [optional] **previous** | **str** | | [optional] -**results** | [**list[DeviceStatus]**](DeviceStatus.md) | | +**results** | [**list[AppInstall]**](AppInstall.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/InlineResponse2006.md b/docs/InlineResponse2006.md index 5fbb539..8067a44 100644 --- a/docs/InlineResponse2006.md +++ b/docs/InlineResponse2006.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **count** | **int** | | **next** | **str** | | [optional] **previous** | **str** | | [optional] -**results** | [**list[DeviceGroup]**](DeviceGroup.md) | | +**results** | [**list[DeviceStatus]**](DeviceStatus.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/InlineResponse2007.md b/docs/InlineResponse2007.md index ee01625..d538476 100644 --- a/docs/InlineResponse2007.md +++ b/docs/InlineResponse2007.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **count** | **int** | | **next** | **str** | | [optional] **previous** | **str** | | [optional] -**results** | [**list[EnterprisePolicy]**](EnterprisePolicy.md) | | +**results** | [**list[DeviceGroup]**](DeviceGroup.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/InlineResponse2008.md b/docs/InlineResponse2008.md index 701d2d3..58b24d8 100644 --- a/docs/InlineResponse2008.md +++ b/docs/InlineResponse2008.md @@ -6,10 +6,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**count** | **int** | | [optional] +**count** | **int** | | **next** | **str** | | [optional] **previous** | **str** | | [optional] -**results** | [**list[V0CommandRequest]**](V0CommandRequest.md) | | [optional] +**results** | [**list[EnterprisePolicy]**](EnterprisePolicy.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/InlineResponse2009.md b/docs/InlineResponse2009.md index f0c0d94..467316c 100644 --- a/docs/InlineResponse2009.md +++ b/docs/InlineResponse2009.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **count** | **int** | | [optional] **next** | **str** | | [optional] **previous** | **str** | | [optional] -**results** | [**list[V0CommandStatus]**](V0CommandStatus.md) | | [optional] +**results** | [**list[V0CommandRequest]**](V0CommandRequest.md) | | [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/InstallDevices.md b/docs/InstallDevices.md new file mode 100644 index 0000000..d66a5c1 --- /dev/null +++ b/docs/InstallDevices.md @@ -0,0 +1,16 @@ +# InstallDevices +> esperclient.models.install_devices + +### Description + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**device_name** | **str** | | [optional] +**alias_name** | **str** | | [optional] +**group_name** | **str** | | [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/TokenRenewV0.md b/docs/TokenRenewV0.md index e55bcc5..65d17a2 100644 --- a/docs/TokenRenewV0.md +++ b/docs/TokenRenewV0.md @@ -6,11 +6,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**id** | **str** | Id of the token | [optional] **user** | **str** | Id of the user resource | [optional] **enterprise** | **str** | Id of the enterprise resource | [optional] **token** | **str** | API token for accessing esper APIs | [optional] **expires_at** | **datetime** | Date and time of when your API token will get expired | [optional] **developerapp** | **str** | Id of the developer app resource that you created using the esper dev console | [optional] +**scope** | **str** | This defines what access scopes your API token has | [optional] +**created_on** | **datetime** | Date and time of when this resource was created | [optional] +**updated_on** | **datetime** | Date and time of when this resource was updated | [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/esperclient/__init__.py b/esperclient/__init__.py index 6b84adf..38f8a6c 100644 --- a/esperclient/__init__.py +++ b/esperclient/__init__.py @@ -80,6 +80,7 @@ from esperclient.models.inline_response200 import InlineResponse200 from esperclient.models.inline_response2001 import InlineResponse2001 from esperclient.models.inline_response20010 import InlineResponse20010 +from esperclient.models.inline_response20011 import InlineResponse20011 from esperclient.models.inline_response2002 import InlineResponse2002 from esperclient.models.inline_response2003 import InlineResponse2003 from esperclient.models.inline_response2004 import InlineResponse2004 @@ -89,6 +90,7 @@ from esperclient.models.inline_response2008 import InlineResponse2008 from esperclient.models.inline_response2009 import InlineResponse2009 from esperclient.models.inline_response201 import InlineResponse201 +from esperclient.models.install_devices import InstallDevices from esperclient.models.settings_gps_state_enum import SettingsGPSStateEnum from esperclient.models.settings_rotate_state_enum import SettingsRotateStateEnum from esperclient.models.settings_volume_stream_enum import SettingsVolumeStreamEnum diff --git a/esperclient/api/application_api.py b/esperclient/api/application_api.py index 5a0cf89..7c49b20 100644 --- a/esperclient/api/application_api.py +++ b/esperclient/api/application_api.py @@ -707,8 +707,131 @@ def get_application_with_http_info(self, application_id, enterprise_id, **kwargs _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def get_install_devices(self, version_id, application_id, enterprise_id, **kwargs): + """List install devices + + Returns list of devices with the specified app version installed + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_install_devices(version_id, application_id, enterprise_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str version_id: A UUID string identifying this app version. (required) + :param str application_id: A UUID string identifying this application. (required) + :param str enterprise_id: A UUID string identifying enterprise. (required) + :param str search: A search term + :param int limit: Number of results to return per page + :param int offset: The initial index from which to return the results + :return: InlineResponse2002 + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_install_devices_with_http_info(version_id, application_id, enterprise_id, **kwargs) + else: + (data) = self.get_install_devices_with_http_info(version_id, application_id, enterprise_id, **kwargs) + return data + + def get_install_devices_with_http_info(self, version_id, application_id, enterprise_id, **kwargs): + """List install devices + + Returns list of devices with the specified app version installed + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_install_devices_with_http_info(version_id, application_id, enterprise_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str version_id: A UUID string identifying this app version. (required) + :param str application_id: A UUID string identifying this application. (required) + :param str enterprise_id: A UUID string identifying enterprise. (required) + :param str search: A search term + :param int limit: Number of results to return per page + :param int offset: The initial index from which to return the results + :return: InlineResponse2002 + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['version_id', 'application_id', 'enterprise_id', 'search', 'limit', 'offset'] + 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_install_devices" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'version_id' is set + if ('version_id' not in params or + params['version_id'] is None): + raise ValueError("Missing the required parameter `version_id` when calling `get_install_devices`") + # verify the required parameter 'application_id' is set + if ('application_id' not in params or + params['application_id'] is None): + raise ValueError("Missing the required parameter `application_id` when calling `get_install_devices`") + # verify the required parameter 'enterprise_id' is set + if ('enterprise_id' not in params or + params['enterprise_id'] is None): + raise ValueError("Missing the required parameter `enterprise_id` when calling `get_install_devices`") + + collection_formats = {} + + path_params = {} + if 'version_id' in params: + path_params['version_id'] = params['version_id'] + if 'application_id' in params: + path_params['application_id'] = params['application_id'] + if 'enterprise_id' in params: + path_params['enterprise_id'] = params['enterprise_id'] + + query_params = [] + if 'search' in params: + query_params.append(('search', params['search'])) + if 'limit' in params: + query_params.append(('limit', params['limit'])) + if 'offset' in params: + query_params.append(('offset', params['offset'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) + + # Authentication setting + auth_settings = ['apiKey'] + + return self.api_client.call_api( + '/enterprise/{enterprise_id}/application/{application_id}/version/{version_id}/installdevices', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InlineResponse2002', + 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 upload(self, enterprise_id, app_file, **kwargs): - """upload an application to enterprise + """Upload an application to enterprise Returns application This method makes a synchronous HTTP request by default. To make an @@ -718,7 +841,7 @@ def upload(self, enterprise_id, app_file, **kwargs): :param async_req bool :param str enterprise_id: A UUID string identifying this enterprise. (required) - :param file app_file: valid APK file (required) + :param file app_file: Valid APK file (required) :return: InlineResponse201 If the method is called asynchronously, returns the request thread. @@ -731,7 +854,7 @@ def upload(self, enterprise_id, app_file, **kwargs): return data def upload_with_http_info(self, enterprise_id, app_file, **kwargs): - """upload an application to enterprise + """Upload an application to enterprise Returns application This method makes a synchronous HTTP request by default. To make an @@ -741,7 +864,7 @@ def upload_with_http_info(self, enterprise_id, app_file, **kwargs): :param async_req bool :param str enterprise_id: A UUID string identifying this enterprise. (required) - :param file app_file: valid APK file (required) + :param file app_file: Valid APK file (required) :return: InlineResponse201 If the method is called asynchronously, returns the request thread. diff --git a/esperclient/api/commands_v2_api.py b/esperclient/api/commands_v2_api.py index 19bf9d3..c9944c9 100644 --- a/esperclient/api/commands_v2_api.py +++ b/esperclient/api/commands_v2_api.py @@ -162,7 +162,7 @@ def get_command_request_status(self, enterprise_id, request_id, **kwargs): :param str request_id: ID for the command request (required) :param str device: Filter status result by device id. :param str state: Filter by command state - :return: InlineResponse2009 + :return: InlineResponse20010 If the method is called asynchronously, returns the request thread. """ @@ -187,7 +187,7 @@ def get_command_request_status_with_http_info(self, enterprise_id, request_id, * :param str request_id: ID for the command request (required) :param str device: Filter status result by device id. :param str state: Filter by command state - :return: InlineResponse2009 + :return: InlineResponse20010 If the method is called asynchronously, returns the request thread. """ @@ -251,7 +251,7 @@ def get_command_request_status_with_http_info(self, enterprise_id, request_id, * body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2009', + response_type='InlineResponse20010', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -272,7 +272,7 @@ def get_device_command_history(self, enterprise_id, device_id, **kwargs): :param str enterprise_id: Id of the enterprise (required) :param str device_id: Id for the command request (required) :param str state: Filter by command state - :return: InlineResponse2009 + :return: InlineResponse20010 If the method is called asynchronously, returns the request thread. """ @@ -296,7 +296,7 @@ def get_device_command_history_with_http_info(self, enterprise_id, device_id, ** :param str enterprise_id: Id of the enterprise (required) :param str device_id: Id for the command request (required) :param str state: Filter by command state - :return: InlineResponse2009 + :return: InlineResponse20010 If the method is called asynchronously, returns the request thread. """ @@ -358,7 +358,7 @@ def get_device_command_history_with_http_info(self, enterprise_id, device_id, ** body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2009', + response_type='InlineResponse20010', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -382,7 +382,7 @@ def list_command_request(self, enterprise_id, **kwargs): :param str device_type: Filter by device type i.e active, inactive etc :param str command: Filter by command name :param str issued_by: Filter by user. Accepts user id. - :return: InlineResponse2008 + :return: InlineResponse2009 If the method is called asynchronously, returns the request thread. """ @@ -409,7 +409,7 @@ def list_command_request_with_http_info(self, enterprise_id, **kwargs): :param str device_type: Filter by device type i.e active, inactive etc :param str command: Filter by command name :param str issued_by: Filter by user. Accepts user id. - :return: InlineResponse2008 + :return: InlineResponse2009 If the method is called asynchronously, returns the request thread. """ @@ -473,7 +473,7 @@ def list_command_request_with_http_info(self, enterprise_id, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2008', + response_type='InlineResponse2009', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/esperclient/api/device_api.py b/esperclient/api/device_api.py index 18bab25..19d624a 100644 --- a/esperclient/api/device_api.py +++ b/esperclient/api/device_api.py @@ -67,7 +67,7 @@ def get_all_devices(self, enterprise_id, **kwargs): :param str tags: A partial text search for device tags :param int limit: Number of results to return per page. :param int offset: The initial index from which to return the results. - :return: InlineResponse2002 + :return: InlineResponse2003 If the method is called asynchronously, returns the request thread. """ @@ -100,7 +100,7 @@ def get_all_devices_with_http_info(self, enterprise_id, **kwargs): :param str tags: A partial text search for device tags :param int limit: Number of results to return per page. :param int offset: The initial index from which to return the results. - :return: InlineResponse2002 + :return: InlineResponse2003 If the method is called asynchronously, returns the request thread. """ @@ -176,7 +176,7 @@ def get_all_devices_with_http_info(self, enterprise_id, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2002', + response_type='InlineResponse2003', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -202,7 +202,7 @@ def get_app_installs(self, enterprise_id, device_id, **kwargs): :param str install_state: filter by install state :param int limit: Number of results to return per page. :param int offset: The initial index from which to return the results. - :return: InlineResponse2004 + :return: InlineResponse2005 If the method is called asynchronously, returns the request thread. """ @@ -231,7 +231,7 @@ def get_app_installs_with_http_info(self, enterprise_id, device_id, **kwargs): :param str install_state: filter by install state :param int limit: Number of results to return per page. :param int offset: The initial index from which to return the results. - :return: InlineResponse2004 + :return: InlineResponse2005 If the method is called asynchronously, returns the request thread. """ @@ -303,7 +303,7 @@ def get_app_installs_with_http_info(self, enterprise_id, device_id, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2004', + response_type='InlineResponse2005', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -439,7 +439,7 @@ def get_device_apps(self, enterprise_id, device_id, **kwargs): :param str search: A search term. Search by app_name. :param int limit: Number of results to return per page. :param int offset: The initial index from which to return the results. - :return: InlineResponse2003 + :return: InlineResponse2004 If the method is called asynchronously, returns the request thread. """ @@ -467,7 +467,7 @@ def get_device_apps_with_http_info(self, enterprise_id, device_id, **kwargs): :param str search: A search term. Search by app_name. :param int limit: Number of results to return per page. :param int offset: The initial index from which to return the results. - :return: InlineResponse2003 + :return: InlineResponse2004 If the method is called asynchronously, returns the request thread. """ @@ -537,7 +537,7 @@ def get_device_apps_with_http_info(self, enterprise_id, device_id, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2003', + response_type='InlineResponse2004', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -661,7 +661,7 @@ def get_device_event(self, enterprise_id, device_id, latest_event, **kwargs): :param str enterprise_id: A UUID string identifying this enterprise. (required) :param str device_id: A UUID string identifying device. (required) :param int latest_event: Flag to get latest event (required) - :return: InlineResponse2005 + :return: InlineResponse2006 If the method is called asynchronously, returns the request thread. """ @@ -685,7 +685,7 @@ def get_device_event_with_http_info(self, enterprise_id, device_id, latest_event :param str enterprise_id: A UUID string identifying this enterprise. (required) :param str device_id: A UUID string identifying device. (required) :param int latest_event: Flag to get latest event (required) - :return: InlineResponse2005 + :return: InlineResponse2006 If the method is called asynchronously, returns the request thread. """ @@ -751,7 +751,7 @@ def get_device_event_with_http_info(self, enterprise_id, device_id, latest_event body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2005', + response_type='InlineResponse2006', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/esperclient/api/device_group_api.py b/esperclient/api/device_group_api.py index 400e7d6..48c1339 100644 --- a/esperclient/api/device_group_api.py +++ b/esperclient/api/device_group_api.py @@ -265,7 +265,7 @@ def get_all_groups(self, enterprise_id, **kwargs): :param str name: filter by group name :param int limit: Number of results to return per page. :param int offset: The initial index from which to return the results. - :return: InlineResponse2006 + :return: InlineResponse2007 If the method is called asynchronously, returns the request thread. """ @@ -290,7 +290,7 @@ def get_all_groups_with_http_info(self, enterprise_id, **kwargs): :param str name: filter by group name :param int limit: Number of results to return per page. :param int offset: The initial index from which to return the results. - :return: InlineResponse2006 + :return: InlineResponse2007 If the method is called asynchronously, returns the request thread. """ @@ -350,7 +350,7 @@ def get_all_groups_with_http_info(self, enterprise_id, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2006', + response_type='InlineResponse2007', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/esperclient/api/enterprise_policy_api.py b/esperclient/api/enterprise_policy_api.py index e37f505..6e841c3 100644 --- a/esperclient/api/enterprise_policy_api.py +++ b/esperclient/api/enterprise_policy_api.py @@ -369,7 +369,7 @@ def list_policies(self, enterprise_id, **kwargs): :param bool is_active: filter by Active policies :param int limit: Number of results to return per page. :param int offset: The initial index from which to return the results. - :return: InlineResponse2007 + :return: InlineResponse2008 If the method is called asynchronously, returns the request thread. """ @@ -395,7 +395,7 @@ def list_policies_with_http_info(self, enterprise_id, **kwargs): :param bool is_active: filter by Active policies :param int limit: Number of results to return per page. :param int offset: The initial index from which to return the results. - :return: InlineResponse2007 + :return: InlineResponse2008 If the method is called asynchronously, returns the request thread. """ @@ -457,7 +457,7 @@ def list_policies_with_http_info(self, enterprise_id, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2007', + response_type='InlineResponse2008', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/esperclient/api/geofence_api.py b/esperclient/api/geofence_api.py index 1521c75..951d0d5 100644 --- a/esperclient/api/geofence_api.py +++ b/esperclient/api/geofence_api.py @@ -265,7 +265,7 @@ def get_all_geofences(self, enterprise_id, **kwargs): :param str search: A search term. :param int limit: Number of results to return per page. :param int offset: The initial index from which to return the results. - :return: InlineResponse20010 + :return: InlineResponse20011 If the method is called asynchronously, returns the request thread. """ @@ -290,7 +290,7 @@ def get_all_geofences_with_http_info(self, enterprise_id, **kwargs): :param str search: A search term. :param int limit: Number of results to return per page. :param int offset: The initial index from which to return the results. - :return: InlineResponse20010 + :return: InlineResponse20011 If the method is called asynchronously, returns the request thread. """ @@ -350,7 +350,7 @@ def get_all_geofences_with_http_info(self, enterprise_id, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse20010', + response_type='InlineResponse20011', auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/esperclient/models/__init__.py b/esperclient/models/__init__.py index 32026d6..917b5d5 100644 --- a/esperclient/models/__init__.py +++ b/esperclient/models/__init__.py @@ -65,6 +65,7 @@ from esperclient.models.inline_response200 import InlineResponse200 from esperclient.models.inline_response2001 import InlineResponse2001 from esperclient.models.inline_response20010 import InlineResponse20010 +from esperclient.models.inline_response20011 import InlineResponse20011 from esperclient.models.inline_response2002 import InlineResponse2002 from esperclient.models.inline_response2003 import InlineResponse2003 from esperclient.models.inline_response2004 import InlineResponse2004 @@ -74,6 +75,7 @@ from esperclient.models.inline_response2008 import InlineResponse2008 from esperclient.models.inline_response2009 import InlineResponse2009 from esperclient.models.inline_response201 import InlineResponse201 +from esperclient.models.install_devices import InstallDevices from esperclient.models.settings_gps_state_enum import SettingsGPSStateEnum from esperclient.models.settings_rotate_state_enum import SettingsRotateStateEnum from esperclient.models.settings_volume_stream_enum import SettingsVolumeStreamEnum diff --git a/esperclient/models/inline_response20010.py b/esperclient/models/inline_response20010.py index 1917f6b..8985999 100644 --- a/esperclient/models/inline_response20010.py +++ b/esperclient/models/inline_response20010.py @@ -29,7 +29,7 @@ import six -from esperclient.models.geofence import Geofence +from esperclient.models.v0_command_status import V0CommandStatus class InlineResponse20010(object): @@ -49,7 +49,7 @@ class InlineResponse20010(object): 'count': 'int', 'next': 'str', 'previous': 'str', - 'results': 'list[Geofence]' + 'results': 'list[V0CommandStatus]' } attribute_map = { @@ -68,12 +68,14 @@ def __init__(self, count=None, next=None, previous=None, results=None): self._results = None self.discriminator = None - self.count = count + if count is not None: + self.count = count if next is not None: self.next = next if previous is not None: self.previous = previous - self.results = results + if results is not None: + self.results = results @property def count(self): @@ -93,8 +95,6 @@ def count(self, count): :param count: The count of this InlineResponse20010. :type: int """ - if count is None: - raise ValueError("Invalid value for `count`, must not be `None`") self._count = count @@ -146,7 +146,7 @@ def results(self): :return: The results of this InlineResponse20010. - :rtype: list[Geofence] + :rtype: list[V0CommandStatus] """ return self._results @@ -156,10 +156,8 @@ def results(self, results): :param results: The results of this InlineResponse20010. - :type: list[Geofence] + :type: list[V0CommandStatus] """ - if results is None: - raise ValueError("Invalid value for `results`, must not be `None`") self._results = results diff --git a/esperclient/models/inline_response20011.py b/esperclient/models/inline_response20011.py new file mode 100644 index 0000000..501acb5 --- /dev/null +++ b/esperclient/models/inline_response20011.py @@ -0,0 +1,210 @@ +# coding: utf-8 + +""" +ESPER API REFERENCE + +OpenAPI spec version: 1.0.0 +Contact: developer@esper.io +--------------------------------------------------------- + +Copyright 2019 Shoonya Enterprises Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" + + + +import pprint +import re + +import six + +from esperclient.models.geofence import Geofence + + +class InlineResponse20011(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 = { + 'count': 'int', + 'next': 'str', + 'previous': 'str', + 'results': 'list[Geofence]' + } + + attribute_map = { + 'count': 'count', + 'next': 'next', + 'previous': 'previous', + 'results': 'results' + } + + def __init__(self, count=None, next=None, previous=None, results=None): + """InlineResponse20011 - a model defined in Swagger""" + + self._count = None + self._next = None + self._previous = None + self._results = None + self.discriminator = None + + self.count = count + if next is not None: + self.next = next + if previous is not None: + self.previous = previous + self.results = results + + @property + def count(self): + """Gets the count of this InlineResponse20011. + + + :return: The count of this InlineResponse20011. + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """Sets the count of this InlineResponse20011. + + + :param count: The count of this InlineResponse20011. + :type: int + """ + if count is None: + raise ValueError("Invalid value for `count`, must not be `None`") + + self._count = count + + @property + def next(self): + """Gets the next of this InlineResponse20011. + + + :return: The next of this InlineResponse20011. + :rtype: str + """ + return self._next + + @next.setter + def next(self, next): + """Sets the next of this InlineResponse20011. + + + :param next: The next of this InlineResponse20011. + :type: str + """ + + self._next = next + + @property + def previous(self): + """Gets the previous of this InlineResponse20011. + + + :return: The previous of this InlineResponse20011. + :rtype: str + """ + return self._previous + + @previous.setter + def previous(self, previous): + """Sets the previous of this InlineResponse20011. + + + :param previous: The previous of this InlineResponse20011. + :type: str + """ + + self._previous = previous + + @property + def results(self): + """Gets the results of this InlineResponse20011. + + + :return: The results of this InlineResponse20011. + :rtype: list[Geofence] + """ + return self._results + + @results.setter + def results(self, results): + """Sets the results of this InlineResponse20011. + + + :param results: The results of this InlineResponse20011. + :type: list[Geofence] + """ + if results is None: + raise ValueError("Invalid value for `results`, must not be `None`") + + self._results = results + + 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(InlineResponse20011, 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, InlineResponse20011): + 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/esperclient/models/inline_response2002.py b/esperclient/models/inline_response2002.py index 8f58110..97b8654 100644 --- a/esperclient/models/inline_response2002.py +++ b/esperclient/models/inline_response2002.py @@ -29,7 +29,7 @@ import six -from esperclient.models.device import Device +from esperclient.models.install_devices import InstallDevices class InlineResponse2002(object): @@ -49,7 +49,7 @@ class InlineResponse2002(object): 'count': 'int', 'next': 'str', 'previous': 'str', - 'results': 'list[Device]' + 'results': 'list[InstallDevices]' } attribute_map = { @@ -68,14 +68,12 @@ def __init__(self, count=None, next=None, previous=None, results=None): self._results = None self.discriminator = None - if count is not None: - self.count = count + self.count = count if next is not None: self.next = next if previous is not None: self.previous = previous - if results is not None: - self.results = results + self.results = results @property def count(self): @@ -95,6 +93,8 @@ def count(self, count): :param count: The count of this InlineResponse2002. :type: int """ + if count is None: + raise ValueError("Invalid value for `count`, must not be `None`") self._count = count @@ -146,7 +146,7 @@ def results(self): :return: The results of this InlineResponse2002. - :rtype: list[Device] + :rtype: list[InstallDevices] """ return self._results @@ -156,8 +156,10 @@ def results(self, results): :param results: The results of this InlineResponse2002. - :type: list[Device] + :type: list[InstallDevices] """ + if results is None: + raise ValueError("Invalid value for `results`, must not be `None`") self._results = results diff --git a/esperclient/models/inline_response2003.py b/esperclient/models/inline_response2003.py index 431d1fb..395cb76 100644 --- a/esperclient/models/inline_response2003.py +++ b/esperclient/models/inline_response2003.py @@ -29,7 +29,7 @@ import six -from esperclient.models.device_app import DeviceApp +from esperclient.models.device import Device class InlineResponse2003(object): @@ -49,7 +49,7 @@ class InlineResponse2003(object): 'count': 'int', 'next': 'str', 'previous': 'str', - 'results': 'list[DeviceApp]' + 'results': 'list[Device]' } attribute_map = { @@ -68,12 +68,14 @@ def __init__(self, count=None, next=None, previous=None, results=None): self._results = None self.discriminator = None - self.count = count + if count is not None: + self.count = count if next is not None: self.next = next if previous is not None: self.previous = previous - self.results = results + if results is not None: + self.results = results @property def count(self): @@ -93,8 +95,6 @@ def count(self, count): :param count: The count of this InlineResponse2003. :type: int """ - if count is None: - raise ValueError("Invalid value for `count`, must not be `None`") self._count = count @@ -146,7 +146,7 @@ def results(self): :return: The results of this InlineResponse2003. - :rtype: list[DeviceApp] + :rtype: list[Device] """ return self._results @@ -156,10 +156,8 @@ def results(self, results): :param results: The results of this InlineResponse2003. - :type: list[DeviceApp] + :type: list[Device] """ - if results is None: - raise ValueError("Invalid value for `results`, must not be `None`") self._results = results diff --git a/esperclient/models/inline_response2004.py b/esperclient/models/inline_response2004.py index 62700d4..ddd6cad 100644 --- a/esperclient/models/inline_response2004.py +++ b/esperclient/models/inline_response2004.py @@ -29,7 +29,7 @@ import six -from esperclient.models.app_install import AppInstall +from esperclient.models.device_app import DeviceApp class InlineResponse2004(object): @@ -49,7 +49,7 @@ class InlineResponse2004(object): 'count': 'int', 'next': 'str', 'previous': 'str', - 'results': 'list[AppInstall]' + 'results': 'list[DeviceApp]' } attribute_map = { @@ -146,7 +146,7 @@ def results(self): :return: The results of this InlineResponse2004. - :rtype: list[AppInstall] + :rtype: list[DeviceApp] """ return self._results @@ -156,7 +156,7 @@ def results(self, results): :param results: The results of this InlineResponse2004. - :type: list[AppInstall] + :type: list[DeviceApp] """ if results is None: raise ValueError("Invalid value for `results`, must not be `None`") diff --git a/esperclient/models/inline_response2005.py b/esperclient/models/inline_response2005.py index 7e92dad..f70660a 100644 --- a/esperclient/models/inline_response2005.py +++ b/esperclient/models/inline_response2005.py @@ -29,7 +29,7 @@ import six -from esperclient.models.device_status import DeviceStatus +from esperclient.models.app_install import AppInstall class InlineResponse2005(object): @@ -49,7 +49,7 @@ class InlineResponse2005(object): 'count': 'int', 'next': 'str', 'previous': 'str', - 'results': 'list[DeviceStatus]' + 'results': 'list[AppInstall]' } attribute_map = { @@ -146,7 +146,7 @@ def results(self): :return: The results of this InlineResponse2005. - :rtype: list[DeviceStatus] + :rtype: list[AppInstall] """ return self._results @@ -156,7 +156,7 @@ def results(self, results): :param results: The results of this InlineResponse2005. - :type: list[DeviceStatus] + :type: list[AppInstall] """ if results is None: raise ValueError("Invalid value for `results`, must not be `None`") diff --git a/esperclient/models/inline_response2006.py b/esperclient/models/inline_response2006.py index fdda479..4b016e8 100644 --- a/esperclient/models/inline_response2006.py +++ b/esperclient/models/inline_response2006.py @@ -29,7 +29,7 @@ import six -from esperclient.models.device_group import DeviceGroup +from esperclient.models.device_status import DeviceStatus class InlineResponse2006(object): @@ -49,7 +49,7 @@ class InlineResponse2006(object): 'count': 'int', 'next': 'str', 'previous': 'str', - 'results': 'list[DeviceGroup]' + 'results': 'list[DeviceStatus]' } attribute_map = { @@ -146,7 +146,7 @@ def results(self): :return: The results of this InlineResponse2006. - :rtype: list[DeviceGroup] + :rtype: list[DeviceStatus] """ return self._results @@ -156,7 +156,7 @@ def results(self, results): :param results: The results of this InlineResponse2006. - :type: list[DeviceGroup] + :type: list[DeviceStatus] """ if results is None: raise ValueError("Invalid value for `results`, must not be `None`") diff --git a/esperclient/models/inline_response2007.py b/esperclient/models/inline_response2007.py index 4fbc7b4..ba85880 100644 --- a/esperclient/models/inline_response2007.py +++ b/esperclient/models/inline_response2007.py @@ -29,7 +29,7 @@ import six -from esperclient.models.enterprise_policy import EnterprisePolicy +from esperclient.models.device_group import DeviceGroup class InlineResponse2007(object): @@ -49,7 +49,7 @@ class InlineResponse2007(object): 'count': 'int', 'next': 'str', 'previous': 'str', - 'results': 'list[EnterprisePolicy]' + 'results': 'list[DeviceGroup]' } attribute_map = { @@ -146,7 +146,7 @@ def results(self): :return: The results of this InlineResponse2007. - :rtype: list[EnterprisePolicy] + :rtype: list[DeviceGroup] """ return self._results @@ -156,7 +156,7 @@ def results(self, results): :param results: The results of this InlineResponse2007. - :type: list[EnterprisePolicy] + :type: list[DeviceGroup] """ if results is None: raise ValueError("Invalid value for `results`, must not be `None`") diff --git a/esperclient/models/inline_response2008.py b/esperclient/models/inline_response2008.py index fd5e02f..5a1ca22 100644 --- a/esperclient/models/inline_response2008.py +++ b/esperclient/models/inline_response2008.py @@ -29,7 +29,7 @@ import six -from esperclient.models.v0_command_request import V0CommandRequest +from esperclient.models.enterprise_policy import EnterprisePolicy class InlineResponse2008(object): @@ -49,7 +49,7 @@ class InlineResponse2008(object): 'count': 'int', 'next': 'str', 'previous': 'str', - 'results': 'list[V0CommandRequest]' + 'results': 'list[EnterprisePolicy]' } attribute_map = { @@ -68,14 +68,12 @@ def __init__(self, count=None, next=None, previous=None, results=None): self._results = None self.discriminator = None - if count is not None: - self.count = count + self.count = count if next is not None: self.next = next if previous is not None: self.previous = previous - if results is not None: - self.results = results + self.results = results @property def count(self): @@ -95,6 +93,8 @@ def count(self, count): :param count: The count of this InlineResponse2008. :type: int """ + if count is None: + raise ValueError("Invalid value for `count`, must not be `None`") self._count = count @@ -146,7 +146,7 @@ def results(self): :return: The results of this InlineResponse2008. - :rtype: list[V0CommandRequest] + :rtype: list[EnterprisePolicy] """ return self._results @@ -156,8 +156,10 @@ def results(self, results): :param results: The results of this InlineResponse2008. - :type: list[V0CommandRequest] + :type: list[EnterprisePolicy] """ + if results is None: + raise ValueError("Invalid value for `results`, must not be `None`") self._results = results diff --git a/esperclient/models/inline_response2009.py b/esperclient/models/inline_response2009.py index 034099d..4829f9c 100644 --- a/esperclient/models/inline_response2009.py +++ b/esperclient/models/inline_response2009.py @@ -29,7 +29,7 @@ import six -from esperclient.models.v0_command_status import V0CommandStatus +from esperclient.models.v0_command_request import V0CommandRequest class InlineResponse2009(object): @@ -49,7 +49,7 @@ class InlineResponse2009(object): 'count': 'int', 'next': 'str', 'previous': 'str', - 'results': 'list[V0CommandStatus]' + 'results': 'list[V0CommandRequest]' } attribute_map = { @@ -146,7 +146,7 @@ def results(self): :return: The results of this InlineResponse2009. - :rtype: list[V0CommandStatus] + :rtype: list[V0CommandRequest] """ return self._results @@ -156,7 +156,7 @@ def results(self, results): :param results: The results of this InlineResponse2009. - :type: list[V0CommandStatus] + :type: list[V0CommandRequest] """ self._results = results diff --git a/esperclient/models/install_devices.py b/esperclient/models/install_devices.py new file mode 100644 index 0000000..ea5a57a --- /dev/null +++ b/esperclient/models/install_devices.py @@ -0,0 +1,211 @@ +# coding: utf-8 + +""" +ESPER API REFERENCE + +OpenAPI spec version: 1.0.0 +Contact: developer@esper.io +--------------------------------------------------------- + +Copyright 2019 Shoonya Enterprises Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" + + + +import pprint +import re + +import six + + +class InstallDevices(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 = { + 'id': 'str', + 'device_name': 'str', + 'alias_name': 'str', + 'group_name': 'str' + } + + attribute_map = { + 'id': 'id', + 'device_name': 'device_name', + 'alias_name': 'alias_name', + 'group_name': 'group_name' + } + + def __init__(self, id=None, device_name=None, alias_name=None, group_name=None): + """InstallDevices - a model defined in Swagger""" + + self._id = None + self._device_name = None + self._alias_name = None + self._group_name = None + self.discriminator = None + + self.id = id + if device_name is not None: + self.device_name = device_name + if alias_name is not None: + self.alias_name = alias_name + if group_name is not None: + self.group_name = group_name + + @property + def id(self): + """Gets the id of this InstallDevices. + + + :return: The id of this InstallDevices. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this InstallDevices. + + + :param id: The id of this InstallDevices. + :type: str + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") + + self._id = id + + @property + def device_name(self): + """Gets the device_name of this InstallDevices. + + + :return: The device_name of this InstallDevices. + :rtype: str + """ + return self._device_name + + @device_name.setter + def device_name(self, device_name): + """Sets the device_name of this InstallDevices. + + + :param device_name: The device_name of this InstallDevices. + :type: str + """ + + self._device_name = device_name + + @property + def alias_name(self): + """Gets the alias_name of this InstallDevices. + + + :return: The alias_name of this InstallDevices. + :rtype: str + """ + return self._alias_name + + @alias_name.setter + def alias_name(self, alias_name): + """Sets the alias_name of this InstallDevices. + + + :param alias_name: The alias_name of this InstallDevices. + :type: str + """ + + self._alias_name = alias_name + + @property + def group_name(self): + """Gets the group_name of this InstallDevices. + + + :return: The group_name of this InstallDevices. + :rtype: str + """ + return self._group_name + + @group_name.setter + def group_name(self, group_name): + """Sets the group_name of this InstallDevices. + + + :param group_name: The group_name of this InstallDevices. + :type: str + """ + if group_name is not None and len(group_name) > 255: + raise ValueError("Invalid value for `group_name`, length must be less than or equal to `255`") + if group_name is not None and len(group_name) < 1: + raise ValueError("Invalid value for `group_name`, length must be greater than or equal to `1`") + + self._group_name = group_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(InstallDevices, 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, InstallDevices): + 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/esperclient/models/token_renew_v0.py b/esperclient/models/token_renew_v0.py index 793838a..622dc37 100644 --- a/esperclient/models/token_renew_v0.py +++ b/esperclient/models/token_renew_v0.py @@ -44,31 +44,45 @@ class TokenRenewV0(object): and the value is json key in definition. """ swagger_types = { + 'id': 'str', 'user': 'str', 'enterprise': 'str', 'token': 'str', 'expires_at': 'datetime', - 'developerapp': 'str' + 'developerapp': 'str', + 'scope': 'str', + 'created_on': 'datetime', + 'updated_on': 'datetime' } attribute_map = { + 'id': 'id', 'user': 'user', 'enterprise': 'enterprise', 'token': 'token', 'expires_at': 'expires_at', - 'developerapp': 'developerapp' + 'developerapp': 'developerapp', + 'scope': 'scope', + 'created_on': 'created_on', + 'updated_on': 'updated_on' } - def __init__(self, user=None, enterprise=None, token=None, expires_at=None, developerapp=None): + def __init__(self, id=None, user=None, enterprise=None, token=None, expires_at=None, developerapp=None, scope=None, created_on=None, updated_on=None): """TokenRenewV0 - a model defined in Swagger""" + self._id = None self._user = None self._enterprise = None self._token = None self._expires_at = None self._developerapp = None + self._scope = None + self._created_on = None + self._updated_on = None self.discriminator = None + if id is not None: + self.id = id if user is not None: self.user = user if enterprise is not None: @@ -79,6 +93,35 @@ def __init__(self, user=None, enterprise=None, token=None, expires_at=None, deve self.expires_at = expires_at if developerapp is not None: self.developerapp = developerapp + if scope is not None: + self.scope = scope + if created_on is not None: + self.created_on = created_on + if updated_on is not None: + self.updated_on = updated_on + + @property + def id(self): + """Gets the id of this TokenRenewV0. + + Id of the token + + :return: The id of this TokenRenewV0. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this TokenRenewV0. + + Id of the token + + :param id: The id of this TokenRenewV0. + :type: str + """ + + self._id = id @property def user(self): @@ -195,6 +238,75 @@ def developerapp(self, developerapp): self._developerapp = developerapp + @property + def scope(self): + """Gets the scope of this TokenRenewV0. + + This defines what access scopes your API token has + + :return: The scope of this TokenRenewV0. + :rtype: str + """ + return self._scope + + @scope.setter + def scope(self, scope): + """Sets the scope of this TokenRenewV0. + + This defines what access scopes your API token has + + :param scope: The scope of this TokenRenewV0. + :type: str + """ + + self._scope = scope + + @property + def created_on(self): + """Gets the created_on of this TokenRenewV0. + + Date and time of when this resource was created + + :return: The created_on of this TokenRenewV0. + :rtype: datetime + """ + return self._created_on + + @created_on.setter + def created_on(self, created_on): + """Sets the created_on of this TokenRenewV0. + + Date and time of when this resource was created + + :param created_on: The created_on of this TokenRenewV0. + :type: datetime + """ + + self._created_on = created_on + + @property + def updated_on(self): + """Gets the updated_on of this TokenRenewV0. + + Date and time of when this resource was updated + + :return: The updated_on of this TokenRenewV0. + :rtype: datetime + """ + return self._updated_on + + @updated_on.setter + def updated_on(self, updated_on): + """Sets the updated_on of this TokenRenewV0. + + Date and time of when this resource was updated + + :param updated_on: The updated_on of this TokenRenewV0. + :type: datetime + """ + + self._updated_on = updated_on + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/test/test_inline_response20011.py b/test/test_inline_response20011.py new file mode 100644 index 0000000..3d58008 --- /dev/null +++ b/test/test_inline_response20011.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" +ESPER API REFERENCE + +OpenAPI spec version: 1.0.0 +Contact: developer@esper.io +--------------------------------------------------------- + +Copyright 2019 Shoonya Enterprises Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" + + + +from __future__ import absolute_import + +import unittest + +import esperclient +from esperclient.models.inline_response20011 import InlineResponse20011 +from esperclient.rest import ApiException + + +class TestInlineResponse20011(unittest.TestCase): + """InlineResponse20011 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse20011(self): + """Test InlineResponse20011""" + model = esperclient.models.inline_response20011.InlineResponse20011() + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_install_devices.py b/test/test_install_devices.py new file mode 100644 index 0000000..1c0aec6 --- /dev/null +++ b/test/test_install_devices.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" +ESPER API REFERENCE + +OpenAPI spec version: 1.0.0 +Contact: developer@esper.io +--------------------------------------------------------- + +Copyright 2019 Shoonya Enterprises Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" + + + +from __future__ import absolute_import + +import unittest + +import esperclient +from esperclient.models.install_devices import InstallDevices +from esperclient.rest import ApiException + + +class TestInstallDevices(unittest.TestCase): + """InstallDevices unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInstallDevices(self): + """Test InstallDevices""" + model = esperclient.models.install_devices.InstallDevices() + pass + + +if __name__ == '__main__': + unittest.main()