mirror of
https://github.com/thousandeyes/thousandeyes-sdk-python.git
synced 2026-09-18 07:53:55 +00:00
[GitHub Bot] Generated python SDK (#188)
Some checks failed
Python CI / build (push) Has been cancelled
Some checks failed
Python CI / build (push) Has been cancelled
Co-authored-by: API Team <api-team@thousandeyes.com>
This commit is contained in:
parent
c6ae90df0d
commit
f9d21e46b5
@ -12,7 +12,7 @@ This API provides the following operations to manage your organization:
|
||||
|
||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 7.0.99
|
||||
- API version: 7.0.103
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ Manage Cloud and Enterprise Agents available to your account in ThousandEyes.
|
||||
|
||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 7.0.99
|
||||
- API version: 7.0.103
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ For more information about the alerts, see [Alerts](https://docs.thousandeyes.co
|
||||
|
||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 7.0.99
|
||||
- API version: 7.0.103
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ For more information about monitors, see [Inside-Out BGP Visibility](https://doc
|
||||
|
||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 7.0.99
|
||||
- API version: 7.0.103
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ Manage connectors and operations.
|
||||
|
||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 7.0.99
|
||||
- API version: 7.0.103
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ For more information about credentials, see [Working With Secure Credentials](ht
|
||||
|
||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 7.0.99
|
||||
- API version: 7.0.103
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -69,6 +69,8 @@ docs/AppAndSelfLinks.md
|
||||
docs/AswRepeat.md
|
||||
docs/AswRepeatUnit.md
|
||||
docs/BoxAndWhiskersDatasource.md
|
||||
docs/CloneDashboardRefreshRate.md
|
||||
docs/CloneDashboardRequest.md
|
||||
docs/ColorGridDatasource.md
|
||||
docs/Dashboard.md
|
||||
docs/DashboardGlobalFilterId.md
|
||||
@ -79,6 +81,28 @@ docs/DashboardLinks.md
|
||||
docs/DashboardMetric.md
|
||||
docs/DashboardMetricDirection.md
|
||||
docs/DashboardOrder.md
|
||||
docs/DashboardSchedule.md
|
||||
docs/DashboardScheduleAfterEndCondition.md
|
||||
docs/DashboardScheduleCronSpec.md
|
||||
docs/DashboardScheduleCronSpecBase.md
|
||||
docs/DashboardScheduleCronSpecBaseNot.md
|
||||
docs/DashboardScheduleCustomCronSpec.md
|
||||
docs/DashboardScheduleCustomRepeat.md
|
||||
docs/DashboardScheduleCustomRepeatNot.md
|
||||
docs/DashboardScheduleCustomRepeatType.md
|
||||
docs/DashboardScheduleCustomRepeatUnit.md
|
||||
docs/DashboardScheduleDataSource.md
|
||||
docs/DashboardScheduleDateEndCondition.md
|
||||
docs/DashboardScheduleEndCondition.md
|
||||
docs/DashboardScheduleNeverEndCondition.md
|
||||
docs/DashboardScheduleNonCustomCronSpec.md
|
||||
docs/DashboardScheduleNonCustomRepeat.md
|
||||
docs/DashboardScheduleNonWeeklyCustomRepeatUnit.md
|
||||
docs/DashboardScheduleOneTimeRepeatType.md
|
||||
docs/DashboardScheduleRepeat.md
|
||||
docs/DashboardScheduleRequest.md
|
||||
docs/DashboardScheduleTimespan.md
|
||||
docs/DashboardScheduleTimespanPeriod.md
|
||||
docs/DashboardSnapshotResponse.md
|
||||
docs/DashboardSnapshotsApi.md
|
||||
docs/DashboardSnapshotsPage.md
|
||||
@ -201,6 +225,8 @@ src/thousandeyes_sdk/dashboards/models/app_and_self_links.py
|
||||
src/thousandeyes_sdk/dashboards/models/asw_repeat.py
|
||||
src/thousandeyes_sdk/dashboards/models/asw_repeat_unit.py
|
||||
src/thousandeyes_sdk/dashboards/models/box_and_whiskers_datasource.py
|
||||
src/thousandeyes_sdk/dashboards/models/clone_dashboard_refresh_rate.py
|
||||
src/thousandeyes_sdk/dashboards/models/clone_dashboard_request.py
|
||||
src/thousandeyes_sdk/dashboards/models/color_grid_datasource.py
|
||||
src/thousandeyes_sdk/dashboards/models/dashboard.py
|
||||
src/thousandeyes_sdk/dashboards/models/dashboard_global_filter_id.py
|
||||
@ -211,6 +237,28 @@ src/thousandeyes_sdk/dashboards/models/dashboard_links.py
|
||||
src/thousandeyes_sdk/dashboards/models/dashboard_metric.py
|
||||
src/thousandeyes_sdk/dashboards/models/dashboard_metric_direction.py
|
||||
src/thousandeyes_sdk/dashboards/models/dashboard_order.py
|
||||
src/thousandeyes_sdk/dashboards/models/dashboard_schedule.py
|
||||
src/thousandeyes_sdk/dashboards/models/dashboard_schedule_after_end_condition.py
|
||||
src/thousandeyes_sdk/dashboards/models/dashboard_schedule_cron_spec.py
|
||||
src/thousandeyes_sdk/dashboards/models/dashboard_schedule_cron_spec_base.py
|
||||
src/thousandeyes_sdk/dashboards/models/dashboard_schedule_cron_spec_base_not.py
|
||||
src/thousandeyes_sdk/dashboards/models/dashboard_schedule_custom_cron_spec.py
|
||||
src/thousandeyes_sdk/dashboards/models/dashboard_schedule_custom_repeat.py
|
||||
src/thousandeyes_sdk/dashboards/models/dashboard_schedule_custom_repeat_not.py
|
||||
src/thousandeyes_sdk/dashboards/models/dashboard_schedule_custom_repeat_type.py
|
||||
src/thousandeyes_sdk/dashboards/models/dashboard_schedule_custom_repeat_unit.py
|
||||
src/thousandeyes_sdk/dashboards/models/dashboard_schedule_data_source.py
|
||||
src/thousandeyes_sdk/dashboards/models/dashboard_schedule_date_end_condition.py
|
||||
src/thousandeyes_sdk/dashboards/models/dashboard_schedule_end_condition.py
|
||||
src/thousandeyes_sdk/dashboards/models/dashboard_schedule_never_end_condition.py
|
||||
src/thousandeyes_sdk/dashboards/models/dashboard_schedule_non_custom_cron_spec.py
|
||||
src/thousandeyes_sdk/dashboards/models/dashboard_schedule_non_custom_repeat.py
|
||||
src/thousandeyes_sdk/dashboards/models/dashboard_schedule_non_weekly_custom_repeat_unit.py
|
||||
src/thousandeyes_sdk/dashboards/models/dashboard_schedule_one_time_repeat_type.py
|
||||
src/thousandeyes_sdk/dashboards/models/dashboard_schedule_repeat.py
|
||||
src/thousandeyes_sdk/dashboards/models/dashboard_schedule_request.py
|
||||
src/thousandeyes_sdk/dashboards/models/dashboard_schedule_timespan.py
|
||||
src/thousandeyes_sdk/dashboards/models/dashboard_schedule_timespan_period.py
|
||||
src/thousandeyes_sdk/dashboards/models/dashboard_snapshot_response.py
|
||||
src/thousandeyes_sdk/dashboards/models/dashboard_snapshots_page.py
|
||||
src/thousandeyes_sdk/dashboards/models/default_timespan.py
|
||||
|
||||
@ -3,7 +3,7 @@ Manage ThousandEyes Dashboards.
|
||||
|
||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 7.0.99
|
||||
- API version: 7.0.103
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
@ -101,14 +101,17 @@ Class | Method | HTTP request | Description
|
||||
*DashboardSnapshotsApi* | [**get_dashboard_snapshot_widget_data**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardSnapshotsApi.md#get_dashboard_snapshot_widget_data) | **GET** /dashboard-snapshots/{snapshotId}/widgets/{widgetId} | Retrieve dashboard snapshot data
|
||||
*DashboardSnapshotsApi* | [**get_dashboard_snapshots**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardSnapshotsApi.md#get_dashboard_snapshots) | **GET** /dashboard-snapshots | List dashboard snapshots
|
||||
*DashboardSnapshotsApi* | [**update_dashboard_snapshot_expiration_date**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardSnapshotsApi.md#update_dashboard_snapshot_expiration_date) | **PATCH** /dashboard-snapshots/{snapshotId} | Update snapshot expiration
|
||||
*DashboardsApi* | [**clone_dashboard**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsApi.md#clone_dashboard) | **POST** /dashboards/{dashboardId}/clone | Clone dashboard
|
||||
*DashboardsApi* | [**create_dashboard**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsApi.md#create_dashboard) | **POST** /dashboards | Create dashboard
|
||||
*DashboardsApi* | [**delete_dashboard**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsApi.md#delete_dashboard) | **DELETE** /dashboards/{dashboardId} | Delete dashboard
|
||||
*DashboardsApi* | [**delete_dashboard_schedule**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsApi.md#delete_dashboard_schedule) | **DELETE** /dashboards/{dashboardId}/actions/schedule | Delete dashboard snapshot schedule
|
||||
*DashboardsApi* | [**get_dashboard**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsApi.md#get_dashboard) | **GET** /dashboards/{dashboardId} | Retrieve dashboard
|
||||
*DashboardsApi* | [**get_dashboard_widget_data**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsApi.md#get_dashboard_widget_data) | **GET** /dashboards/{dashboardId}/widgets/{widgetId} | Retrieve dashboard widget data
|
||||
*DashboardsApi* | [**get_dashboards**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsApi.md#get_dashboards) | **GET** /dashboards | List dashboards
|
||||
*DashboardsApi* | [**get_individual_card_data**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsApi.md#get_individual_card_data) | **GET** /dashboards/{dashboardId}/widgets/{widgetId}/cards/{cardId} | Retrieve individual card data from numbers widget
|
||||
*DashboardsApi* | [**get_individual_column_data**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsApi.md#get_individual_column_data) | **GET** /dashboards/{dashboardId}/widgets/{widgetId}/columns/{columnId} | Retrieve individual column data from multi-metric table widget
|
||||
*DashboardsApi* | [**update_dashboard**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsApi.md#update_dashboard) | **PUT** /dashboards/{dashboardId} | Update dashboard
|
||||
*DashboardsApi* | [**update_dashboard_schedule**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsApi.md#update_dashboard_schedule) | **PUT** /dashboards/{dashboardId}/actions/schedule | Create or update dashboard snapshot schedule
|
||||
*DashboardsFiltersApi* | [**create_dashboard_filter**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsFiltersApi.md#create_dashboard_filter) | **POST** /dashboards/filters | Create dashboard filter
|
||||
*DashboardsFiltersApi* | [**delete_dashboard_filter**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsFiltersApi.md#delete_dashboard_filter) | **DELETE** /dashboards/filters/{id} | Delete dashboard filter
|
||||
*DashboardsFiltersApi* | [**get_dashboard_filter**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsFiltersApi.md#get_dashboard_filter) | **GET** /dashboards/filters/{id} | Get dashboard filter
|
||||
@ -186,6 +189,8 @@ Class | Method | HTTP request | Description
|
||||
- [AswRepeat](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/AswRepeat.md)
|
||||
- [AswRepeatUnit](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/AswRepeatUnit.md)
|
||||
- [BoxAndWhiskersDatasource](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/BoxAndWhiskersDatasource.md)
|
||||
- [CloneDashboardRefreshRate](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/CloneDashboardRefreshRate.md)
|
||||
- [CloneDashboardRequest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/CloneDashboardRequest.md)
|
||||
- [ColorGridDatasource](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/ColorGridDatasource.md)
|
||||
- [Dashboard](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/Dashboard.md)
|
||||
- [DashboardGlobalFilterId](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardGlobalFilterId.md)
|
||||
@ -196,6 +201,28 @@ Class | Method | HTTP request | Description
|
||||
- [DashboardMetric](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardMetric.md)
|
||||
- [DashboardMetricDirection](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardMetricDirection.md)
|
||||
- [DashboardOrder](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardOrder.md)
|
||||
- [DashboardSchedule](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardSchedule.md)
|
||||
- [DashboardScheduleAfterEndCondition](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleAfterEndCondition.md)
|
||||
- [DashboardScheduleCronSpec](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleCronSpec.md)
|
||||
- [DashboardScheduleCronSpecBase](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleCronSpecBase.md)
|
||||
- [DashboardScheduleCronSpecBaseNot](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleCronSpecBaseNot.md)
|
||||
- [DashboardScheduleCustomCronSpec](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleCustomCronSpec.md)
|
||||
- [DashboardScheduleCustomRepeat](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleCustomRepeat.md)
|
||||
- [DashboardScheduleCustomRepeatNot](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleCustomRepeatNot.md)
|
||||
- [DashboardScheduleCustomRepeatType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleCustomRepeatType.md)
|
||||
- [DashboardScheduleCustomRepeatUnit](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleCustomRepeatUnit.md)
|
||||
- [DashboardScheduleDataSource](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleDataSource.md)
|
||||
- [DashboardScheduleDateEndCondition](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleDateEndCondition.md)
|
||||
- [DashboardScheduleEndCondition](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleEndCondition.md)
|
||||
- [DashboardScheduleNeverEndCondition](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleNeverEndCondition.md)
|
||||
- [DashboardScheduleNonCustomCronSpec](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleNonCustomCronSpec.md)
|
||||
- [DashboardScheduleNonCustomRepeat](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleNonCustomRepeat.md)
|
||||
- [DashboardScheduleNonWeeklyCustomRepeatUnit](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleNonWeeklyCustomRepeatUnit.md)
|
||||
- [DashboardScheduleOneTimeRepeatType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleOneTimeRepeatType.md)
|
||||
- [DashboardScheduleRepeat](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleRepeat.md)
|
||||
- [DashboardScheduleRequest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleRequest.md)
|
||||
- [DashboardScheduleTimespan](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleTimespan.md)
|
||||
- [DashboardScheduleTimespanPeriod](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleTimespanPeriod.md)
|
||||
- [DashboardSnapshotResponse](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardSnapshotResponse.md)
|
||||
- [DashboardSnapshotsPage](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardSnapshotsPage.md)
|
||||
- [DefaultTimespan](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DefaultTimespan.md)
|
||||
|
||||
@ -30,6 +30,7 @@ Name | Type | Description | Notes
|
||||
**is_global_override** | **bool** | When set to `true`, the defaultTimespan is used and overrides the widget's timespan. If set to `false`, the the widget's timespan is used. | [optional]
|
||||
**is_migrated_report** | **bool** | True if this dashboard was previously a report. | [optional] [readonly]
|
||||
**layout** | [**DashboardLayout**](DashboardLayout.md) | | [optional]
|
||||
**schedule** | [**DashboardSchedule**](DashboardSchedule.md) | | [optional] [readonly]
|
||||
**refresh_rate** | [**RefreshRate**](RefreshRate.md) | | [optional]
|
||||
**links** | [**DashboardLinks**](DashboardLinks.md) | | [optional]
|
||||
|
||||
|
||||
@ -0,0 +1,12 @@
|
||||
# CloneDashboardRefreshRate
|
||||
|
||||
Auto-refresh interval for the cloned dashboard. If omitted, the clone inherits the source dashboard's refresh rate.
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
42
thousandeyes-sdk-dashboards/docs/CloneDashboardRequest.md
Normal file
42
thousandeyes-sdk-dashboards/docs/CloneDashboardRequest.md
Normal file
@ -0,0 +1,42 @@
|
||||
# CloneDashboardRequest
|
||||
|
||||
Optional values that override settings inherited from the source dashboard. Omit the request body or send an empty object (`{}`) to clone the dashboard without overrides.
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**title** | **str** | Title of the cloned dashboard. If omitted, the API generates a unique title. | [optional]
|
||||
**tag_ids** | **List[str]** | Dashboard tag identifiers. An empty array clears tags from the clone; omission preserves the source dashboard's tags. | [optional]
|
||||
**description** | **str** | Description for the cloned dashboard. | [optional]
|
||||
**layout** | [**DashboardLayout**](DashboardLayout.md) | | [optional]
|
||||
**default_timespan** | [**DefaultTimespan**](DefaultTimespan.md) | | [optional]
|
||||
**is_global_override** | **bool** | If `true`, the dashboard time range overrides local widget time settings. | [optional]
|
||||
**refresh_rate** | [**CloneDashboardRefreshRate**](CloneDashboardRefreshRate.md) | | [optional]
|
||||
**global_filter_id** | **str** | Global filter applied to the cloned dashboard. If omitted, the source dashboard's filter is preserved when cloning within the same account group. When cloning across account groups, the filter is cleared. | [optional]
|
||||
**shared_account_ids** | **List[str]** | Account group IDs with which to share the cloned dashboard. An empty array limits sharing to current account group. Omission does not share with other account groups. The `isPrivate` setting controls visibility within the current account group. Cannot be used together with `isSharedWithAllAccountGroups=true` | [optional]
|
||||
**is_shared_with_all_account_groups** | **bool** | When `true`, shares the cloned dashboard with all account groups available to the user. Cannot be used together with `sharedAccountIds`. | [optional]
|
||||
**is_private** | **bool** | When `true`, only the creator can view the cloned dashboard. Combining this property with `sharedAccountIds` or `isSharedWithAllAccountGroups=true` returns `400 Bad Request`. Defaults to `false`. | [optional] [default to False]
|
||||
**is_default_for_user** | **bool** | When `true`, sets the cloned dashboard as the current user's default dashboard. | [optional]
|
||||
**is_default_for_account** | **bool** | When `true`, sets the cloned dashboard as the current account group's default dashboard. | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.dashboards.models.clone_dashboard_request import CloneDashboardRequest
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of CloneDashboardRequest from a JSON string
|
||||
clone_dashboard_request_instance = CloneDashboardRequest.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(CloneDashboardRequest.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
clone_dashboard_request_dict = clone_dashboard_request_instance.to_dict()
|
||||
# create an instance of CloneDashboardRequest from a dict
|
||||
clone_dashboard_request_from_dict = CloneDashboardRequest.from_dict(clone_dashboard_request_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@ -23,6 +23,7 @@ Name | Type | Description | Notes
|
||||
**is_global_override** | **bool** | When set to `true`, the defaultTimespan is used and overrides the widget's timespan. If set to `false`, the the widget's timespan is used. | [optional]
|
||||
**is_migrated_report** | **bool** | True if this dashboard was previously a report. | [optional] [readonly]
|
||||
**layout** | [**DashboardLayout**](DashboardLayout.md) | | [optional]
|
||||
**schedule** | [**DashboardSchedule**](DashboardSchedule.md) | | [optional] [readonly]
|
||||
**refresh_rate** | [**RefreshRate**](RefreshRate.md) | | [optional]
|
||||
**links** | [**DashboardLinks**](DashboardLinks.md) | | [optional]
|
||||
|
||||
|
||||
40
thousandeyes-sdk-dashboards/docs/DashboardSchedule.md
Normal file
40
thousandeyes-sdk-dashboards/docs/DashboardSchedule.md
Normal file
@ -0,0 +1,40 @@
|
||||
# DashboardSchedule
|
||||
|
||||
Snapshot schedule for a dashboard. A `repeat` value of `NONE` represents a one-time schedule.
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**cron_spec** | [**DashboardScheduleCronSpec**](DashboardScheduleCronSpec.md) | |
|
||||
**data_source** | [**DashboardScheduleDataSource**](DashboardScheduleDataSource.md) | |
|
||||
**data_timespan** | [**DashboardScheduleTimespan**](DashboardScheduleTimespan.md) | |
|
||||
**flag_enabled** | **bool** | When `true`, the schedule is active and snapshots are generated according to `cronSpec`. |
|
||||
**flag_locked** | **bool** | When `true`, the schedule configuration is locked and cannot be edited through the web application. | [optional]
|
||||
**flag_auto_share** | **bool** | When `true`, generated snapshots are automatically shared with schedule recipients. | [optional]
|
||||
**flag_is_include_pii_user_data** | **bool** | When `true`, generated snapshots include personally identifiable user data when permitted by account policy. | [optional]
|
||||
**flag_attach_pdf_to_email** | **bool** | When `true`, a PDF attachment is included in snapshot notification emails. | [optional]
|
||||
**recipients** | **List[str]** | Email addresses of active dashboard account users who receive snapshot notifications. | [optional]
|
||||
**expires_after** | **int** | Snapshot retention period in seconds. Allowed range is 24 hours to 5 years. | [optional]
|
||||
**next_date** | **datetime** | UTC date of the next scheduled snapshot run. Computed by the server. | [optional] [readonly]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule import DashboardSchedule
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of DashboardSchedule from a JSON string
|
||||
dashboard_schedule_instance = DashboardSchedule.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(DashboardSchedule.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
dashboard_schedule_dict = dashboard_schedule_instance.to_dict()
|
||||
# create an instance of DashboardSchedule from a dict
|
||||
dashboard_schedule_from_dict = DashboardSchedule.from_dict(dashboard_schedule_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@ -0,0 +1,30 @@
|
||||
# DashboardScheduleAfterEndCondition
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**end_condition_type** | **str** | Identifies a schedule that ends after a number of occurrences. |
|
||||
**value** | **int** | Number of schedule occurrences after which the recurrence ends. |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_after_end_condition import DashboardScheduleAfterEndCondition
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of DashboardScheduleAfterEndCondition from a JSON string
|
||||
dashboard_schedule_after_end_condition_instance = DashboardScheduleAfterEndCondition.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(DashboardScheduleAfterEndCondition.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
dashboard_schedule_after_end_condition_dict = dashboard_schedule_after_end_condition_instance.to_dict()
|
||||
# create an instance of DashboardScheduleAfterEndCondition from a dict
|
||||
dashboard_schedule_after_end_condition_from_dict = DashboardScheduleAfterEndCondition.from_dict(dashboard_schedule_after_end_condition_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@ -0,0 +1,34 @@
|
||||
# DashboardScheduleCronSpec
|
||||
|
||||
Cron-style recurrence specification for a dashboard snapshot schedule.
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**start_time** | **int** | Schedule start time as a Unix timestamp in seconds. |
|
||||
**zone_code** | **str** | An IANA time zone identifier used to interpret `startTime` and recurrence. For example, `America/Los_Angeles`. |
|
||||
**repeat** | [**DashboardScheduleCustomRepeatType**](DashboardScheduleCustomRepeatType.md) | |
|
||||
**end_repeat** | [**DashboardScheduleEndCondition**](DashboardScheduleEndCondition.md) | | [optional]
|
||||
**custom_repeat** | [**DashboardScheduleCustomRepeat**](DashboardScheduleCustomRepeat.md) | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_cron_spec import DashboardScheduleCronSpec
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of DashboardScheduleCronSpec from a JSON string
|
||||
dashboard_schedule_cron_spec_instance = DashboardScheduleCronSpec.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(DashboardScheduleCronSpec.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
dashboard_schedule_cron_spec_dict = dashboard_schedule_cron_spec_instance.to_dict()
|
||||
# create an instance of DashboardScheduleCronSpec from a dict
|
||||
dashboard_schedule_cron_spec_from_dict = DashboardScheduleCronSpec.from_dict(dashboard_schedule_cron_spec_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@ -0,0 +1,33 @@
|
||||
# DashboardScheduleCronSpecBase
|
||||
|
||||
Common properties for a dashboard snapshot schedule recurrence.
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**start_time** | **int** | Schedule start time as a Unix timestamp in seconds. |
|
||||
**zone_code** | **str** | An IANA time zone identifier used to interpret `startTime` and recurrence. For example, `America/Los_Angeles`. |
|
||||
**repeat** | [**DashboardScheduleRepeat**](DashboardScheduleRepeat.md) | |
|
||||
**end_repeat** | [**DashboardScheduleEndCondition**](DashboardScheduleEndCondition.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_cron_spec_base import DashboardScheduleCronSpecBase
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of DashboardScheduleCronSpecBase from a JSON string
|
||||
dashboard_schedule_cron_spec_base_instance = DashboardScheduleCronSpecBase.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(DashboardScheduleCronSpecBase.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
dashboard_schedule_cron_spec_base_dict = dashboard_schedule_cron_spec_base_instance.to_dict()
|
||||
# create an instance of DashboardScheduleCronSpecBase from a dict
|
||||
dashboard_schedule_cron_spec_base_from_dict = DashboardScheduleCronSpecBase.from_dict(dashboard_schedule_cron_spec_base_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@ -0,0 +1,29 @@
|
||||
# DashboardScheduleCronSpecBaseNot
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**repeat** | [**DashboardScheduleOneTimeRepeatType**](DashboardScheduleOneTimeRepeatType.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_cron_spec_base_not import DashboardScheduleCronSpecBaseNot
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of DashboardScheduleCronSpecBaseNot from a JSON string
|
||||
dashboard_schedule_cron_spec_base_not_instance = DashboardScheduleCronSpecBaseNot.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(DashboardScheduleCronSpecBaseNot.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
dashboard_schedule_cron_spec_base_not_dict = dashboard_schedule_cron_spec_base_not_instance.to_dict()
|
||||
# create an instance of DashboardScheduleCronSpecBaseNot from a dict
|
||||
dashboard_schedule_cron_spec_base_not_from_dict = DashboardScheduleCronSpecBaseNot.from_dict(dashboard_schedule_cron_spec_base_not_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@ -0,0 +1,33 @@
|
||||
# DashboardScheduleCustomCronSpec
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**start_time** | **int** | Schedule start time as a Unix timestamp in seconds. |
|
||||
**zone_code** | **str** | An IANA time zone identifier used to interpret `startTime` and recurrence. For example, `America/Los_Angeles`. |
|
||||
**repeat** | [**DashboardScheduleCustomRepeatType**](DashboardScheduleCustomRepeatType.md) | |
|
||||
**end_repeat** | [**DashboardScheduleEndCondition**](DashboardScheduleEndCondition.md) | | [optional]
|
||||
**custom_repeat** | [**DashboardScheduleCustomRepeat**](DashboardScheduleCustomRepeat.md) | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_cron_spec import DashboardScheduleCustomCronSpec
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of DashboardScheduleCustomCronSpec from a JSON string
|
||||
dashboard_schedule_custom_cron_spec_instance = DashboardScheduleCustomCronSpec.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(DashboardScheduleCustomCronSpec.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
dashboard_schedule_custom_cron_spec_dict = dashboard_schedule_custom_cron_spec_instance.to_dict()
|
||||
# create an instance of DashboardScheduleCustomCronSpec from a dict
|
||||
dashboard_schedule_custom_cron_spec_from_dict = DashboardScheduleCustomCronSpec.from_dict(dashboard_schedule_custom_cron_spec_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@ -0,0 +1,31 @@
|
||||
# DashboardScheduleCustomRepeat
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**repeat_every** | **int** | Interval count for custom recurrence. |
|
||||
**days_of_week** | **List[int]** | Days of the week for custom weekly recurrence (`1` = Monday through `7` = Sunday). | [optional]
|
||||
**repeat_unit** | [**DashboardScheduleCustomRepeatUnit**](DashboardScheduleCustomRepeatUnit.md) | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_repeat import DashboardScheduleCustomRepeat
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of DashboardScheduleCustomRepeat from a JSON string
|
||||
dashboard_schedule_custom_repeat_instance = DashboardScheduleCustomRepeat.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(DashboardScheduleCustomRepeat.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
dashboard_schedule_custom_repeat_dict = dashboard_schedule_custom_repeat_instance.to_dict()
|
||||
# create an instance of DashboardScheduleCustomRepeat from a dict
|
||||
dashboard_schedule_custom_repeat_from_dict = DashboardScheduleCustomRepeat.from_dict(dashboard_schedule_custom_repeat_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@ -0,0 +1,29 @@
|
||||
# DashboardScheduleCustomRepeatNot
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**repeat_unit** | [**DashboardScheduleNonWeeklyCustomRepeatUnit**](DashboardScheduleNonWeeklyCustomRepeatUnit.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_repeat_not import DashboardScheduleCustomRepeatNot
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of DashboardScheduleCustomRepeatNot from a JSON string
|
||||
dashboard_schedule_custom_repeat_not_instance = DashboardScheduleCustomRepeatNot.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(DashboardScheduleCustomRepeatNot.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
dashboard_schedule_custom_repeat_not_dict = dashboard_schedule_custom_repeat_not_instance.to_dict()
|
||||
# create an instance of DashboardScheduleCustomRepeatNot from a dict
|
||||
dashboard_schedule_custom_repeat_not_from_dict = DashboardScheduleCustomRepeatNot.from_dict(dashboard_schedule_custom_repeat_not_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@ -0,0 +1,11 @@
|
||||
# DashboardScheduleCustomRepeatType
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@ -0,0 +1,11 @@
|
||||
# DashboardScheduleCustomRepeatUnit
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@ -0,0 +1,30 @@
|
||||
# DashboardScheduleDataSource
|
||||
|
||||
Naming configuration for snapshots generated by the schedule. The required `dataTimespan` property on the schedule controls the snapshot data range.
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **str** | Name assigned to snapshots generated by the schedule. |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_data_source import DashboardScheduleDataSource
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of DashboardScheduleDataSource from a JSON string
|
||||
dashboard_schedule_data_source_instance = DashboardScheduleDataSource.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(DashboardScheduleDataSource.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
dashboard_schedule_data_source_dict = dashboard_schedule_data_source_instance.to_dict()
|
||||
# create an instance of DashboardScheduleDataSource from a dict
|
||||
dashboard_schedule_data_source_from_dict = DashboardScheduleDataSource.from_dict(dashboard_schedule_data_source_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@ -0,0 +1,30 @@
|
||||
# DashboardScheduleDateEndCondition
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**end_condition_type** | **str** | Identifies a schedule that ends on a specified date. |
|
||||
**value** | **int** | Unix timestamp in seconds when the recurrence ends. |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_date_end_condition import DashboardScheduleDateEndCondition
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of DashboardScheduleDateEndCondition from a JSON string
|
||||
dashboard_schedule_date_end_condition_instance = DashboardScheduleDateEndCondition.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(DashboardScheduleDateEndCondition.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
dashboard_schedule_date_end_condition_dict = dashboard_schedule_date_end_condition_instance.to_dict()
|
||||
# create an instance of DashboardScheduleDateEndCondition from a dict
|
||||
dashboard_schedule_date_end_condition_from_dict = DashboardScheduleDateEndCondition.from_dict(dashboard_schedule_date_end_condition_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@ -0,0 +1,31 @@
|
||||
# DashboardScheduleEndCondition
|
||||
|
||||
Condition that determines when the recurring schedule ends.
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**end_condition_type** | **str** | Identifies a schedule that ends on a specified date. |
|
||||
**value** | **int** | Unix timestamp in seconds when the recurrence ends. |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_end_condition import DashboardScheduleEndCondition
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of DashboardScheduleEndCondition from a JSON string
|
||||
dashboard_schedule_end_condition_instance = DashboardScheduleEndCondition.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(DashboardScheduleEndCondition.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
dashboard_schedule_end_condition_dict = dashboard_schedule_end_condition_instance.to_dict()
|
||||
# create an instance of DashboardScheduleEndCondition from a dict
|
||||
dashboard_schedule_end_condition_from_dict = DashboardScheduleEndCondition.from_dict(dashboard_schedule_end_condition_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@ -0,0 +1,29 @@
|
||||
# DashboardScheduleNeverEndCondition
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**end_condition_type** | **str** | Identifies a schedule that never ends. |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_never_end_condition import DashboardScheduleNeverEndCondition
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of DashboardScheduleNeverEndCondition from a JSON string
|
||||
dashboard_schedule_never_end_condition_instance = DashboardScheduleNeverEndCondition.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(DashboardScheduleNeverEndCondition.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
dashboard_schedule_never_end_condition_dict = dashboard_schedule_never_end_condition_instance.to_dict()
|
||||
# create an instance of DashboardScheduleNeverEndCondition from a dict
|
||||
dashboard_schedule_never_end_condition_from_dict = DashboardScheduleNeverEndCondition.from_dict(dashboard_schedule_never_end_condition_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@ -0,0 +1,32 @@
|
||||
# DashboardScheduleNonCustomCronSpec
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**start_time** | **int** | Schedule start time as a Unix timestamp in seconds. |
|
||||
**zone_code** | **str** | An IANA time zone identifier used to interpret `startTime` and recurrence. For example, `America/Los_Angeles`. |
|
||||
**repeat** | [**DashboardScheduleNonCustomRepeat**](DashboardScheduleNonCustomRepeat.md) | |
|
||||
**end_repeat** | [**DashboardScheduleEndCondition**](DashboardScheduleEndCondition.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_non_custom_cron_spec import DashboardScheduleNonCustomCronSpec
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of DashboardScheduleNonCustomCronSpec from a JSON string
|
||||
dashboard_schedule_non_custom_cron_spec_instance = DashboardScheduleNonCustomCronSpec.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(DashboardScheduleNonCustomCronSpec.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
dashboard_schedule_non_custom_cron_spec_dict = dashboard_schedule_non_custom_cron_spec_instance.to_dict()
|
||||
# create an instance of DashboardScheduleNonCustomCronSpec from a dict
|
||||
dashboard_schedule_non_custom_cron_spec_from_dict = DashboardScheduleNonCustomCronSpec.from_dict(dashboard_schedule_non_custom_cron_spec_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@ -0,0 +1,11 @@
|
||||
# DashboardScheduleNonCustomRepeat
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@ -0,0 +1,11 @@
|
||||
# DashboardScheduleNonWeeklyCustomRepeatUnit
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@ -0,0 +1,11 @@
|
||||
# DashboardScheduleOneTimeRepeatType
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
12
thousandeyes-sdk-dashboards/docs/DashboardScheduleRepeat.md
Normal file
12
thousandeyes-sdk-dashboards/docs/DashboardScheduleRepeat.md
Normal file
@ -0,0 +1,12 @@
|
||||
# DashboardScheduleRepeat
|
||||
|
||||
Schedule repetition pattern. Use `NONE` to generate one snapshot at `startTime`.
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
39
thousandeyes-sdk-dashboards/docs/DashboardScheduleRequest.md
Normal file
39
thousandeyes-sdk-dashboards/docs/DashboardScheduleRequest.md
Normal file
@ -0,0 +1,39 @@
|
||||
# DashboardScheduleRequest
|
||||
|
||||
Snapshot schedule configuration for create or update requests.
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**cron_spec** | [**DashboardScheduleCronSpec**](DashboardScheduleCronSpec.md) | |
|
||||
**data_source** | [**DashboardScheduleDataSource**](DashboardScheduleDataSource.md) | |
|
||||
**data_timespan** | [**DashboardScheduleTimespan**](DashboardScheduleTimespan.md) | |
|
||||
**flag_enabled** | **bool** | When `true`, the schedule is active and snapshots are generated according to `cronSpec`. |
|
||||
**flag_locked** | **bool** | When `true`, the schedule configuration is locked and cannot be edited through the web application. | [optional]
|
||||
**flag_auto_share** | **bool** | When `true`, generated snapshots are automatically shared with schedule recipients. | [optional]
|
||||
**flag_is_include_pii_user_data** | **bool** | When `true`, generated snapshots include personally identifiable user data when permitted by account policy. | [optional]
|
||||
**flag_attach_pdf_to_email** | **bool** | When `true`, a PDF attachment is included in snapshot notification emails. | [optional]
|
||||
**recipients** | **List[str]** | Email addresses of active dashboard account users who receive snapshot notifications. Unknown or duplicate addresses are rejected. | [optional]
|
||||
**expires_after** | **int** | Snapshot retention period in seconds. Allowed range is 24 hours to 5 years. Defaults to 5 years when omitted. | [optional] [default to 157680000]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_request import DashboardScheduleRequest
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of DashboardScheduleRequest from a JSON string
|
||||
dashboard_schedule_request_instance = DashboardScheduleRequest.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(DashboardScheduleRequest.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
dashboard_schedule_request_dict = dashboard_schedule_request_instance.to_dict()
|
||||
# create an instance of DashboardScheduleRequest from a dict
|
||||
dashboard_schedule_request_from_dict = DashboardScheduleRequest.from_dict(dashboard_schedule_request_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@ -0,0 +1,31 @@
|
||||
# DashboardScheduleTimespan
|
||||
|
||||
Amount of historical data to include in each scheduled snapshot.
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**n** | **int** | Number of time units in the snapshot data range. |
|
||||
**period** | [**DashboardScheduleTimespanPeriod**](DashboardScheduleTimespanPeriod.md) | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_timespan import DashboardScheduleTimespan
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of DashboardScheduleTimespan from a JSON string
|
||||
dashboard_schedule_timespan_instance = DashboardScheduleTimespan.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(DashboardScheduleTimespan.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
dashboard_schedule_timespan_dict = dashboard_schedule_timespan_instance.to_dict()
|
||||
# create an instance of DashboardScheduleTimespan from a dict
|
||||
dashboard_schedule_timespan_from_dict = DashboardScheduleTimespan.from_dict(dashboard_schedule_timespan_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@ -0,0 +1,11 @@
|
||||
# DashboardScheduleTimespanPeriod
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@ -4,16 +4,108 @@ All URIs are relative to *https://api.thousandeyes.com/v7*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**clone_dashboard**](DashboardsApi.md#clone_dashboard) | **POST** /dashboards/{dashboardId}/clone | Clone dashboard
|
||||
[**create_dashboard**](DashboardsApi.md#create_dashboard) | **POST** /dashboards | Create dashboard
|
||||
[**delete_dashboard**](DashboardsApi.md#delete_dashboard) | **DELETE** /dashboards/{dashboardId} | Delete dashboard
|
||||
[**delete_dashboard_schedule**](DashboardsApi.md#delete_dashboard_schedule) | **DELETE** /dashboards/{dashboardId}/actions/schedule | Delete dashboard snapshot schedule
|
||||
[**get_dashboard**](DashboardsApi.md#get_dashboard) | **GET** /dashboards/{dashboardId} | Retrieve dashboard
|
||||
[**get_dashboard_widget_data**](DashboardsApi.md#get_dashboard_widget_data) | **GET** /dashboards/{dashboardId}/widgets/{widgetId} | Retrieve dashboard widget data
|
||||
[**get_dashboards**](DashboardsApi.md#get_dashboards) | **GET** /dashboards | List dashboards
|
||||
[**get_individual_card_data**](DashboardsApi.md#get_individual_card_data) | **GET** /dashboards/{dashboardId}/widgets/{widgetId}/cards/{cardId} | Retrieve individual card data from numbers widget
|
||||
[**get_individual_column_data**](DashboardsApi.md#get_individual_column_data) | **GET** /dashboards/{dashboardId}/widgets/{widgetId}/columns/{columnId} | Retrieve individual column data from multi-metric table widget
|
||||
[**update_dashboard**](DashboardsApi.md#update_dashboard) | **PUT** /dashboards/{dashboardId} | Update dashboard
|
||||
[**update_dashboard_schedule**](DashboardsApi.md#update_dashboard_schedule) | **PUT** /dashboards/{dashboardId}/actions/schedule | Create or update dashboard snapshot schedule
|
||||
|
||||
|
||||
# **clone_dashboard**
|
||||
> Dashboard clone_dashboard(dashboard_id, aid=aid, clone_dashboard_request=clone_dashboard_request)
|
||||
|
||||
Clone dashboard
|
||||
|
||||
Creates a dashboard by cloning an existing dashboard. By default, the clone inherits the source dashboard's widgets, layout, default timespan, tags, and other supported settings. Values provided in the request override the corresponding source dashboard settings. Sharing settings are not inherited. If `title` is omitted, the API generates a unique title for the clone. **Note**: * Users with the `Edit dashboard templates for all users in account group` permission (Account Admin) can clone any dashboard they can view. * Users with the `Edit own dashboard templates` permission (Regular User) can clone dashboards they can view. The current user owns the cloned dashboard.
|
||||
|
||||
### Example
|
||||
|
||||
* Bearer Authentication (BearerAuth):
|
||||
|
||||
```python
|
||||
import thousandeyes_sdk.dashboards
|
||||
from thousandeyes_sdk.dashboards.models.clone_dashboard_request import CloneDashboardRequest
|
||||
from thousandeyes_sdk.dashboards.models.dashboard import Dashboard
|
||||
from thousandeyes_sdk.dashboards.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to https://api.thousandeyes.com/v7
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = thousandeyes_sdk.core.Configuration(
|
||||
host = "https://api.thousandeyes.com/v7"
|
||||
)
|
||||
|
||||
# The client must configure the authentication and authorization parameters
|
||||
# in accordance with the API server security policy.
|
||||
# Examples for each auth method are provided below, use the example that
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure Bearer authorization: BearerAuth
|
||||
configuration = thousandeyes_sdk.core.Configuration(
|
||||
access_token = os.environ["BEARER_TOKEN"]
|
||||
)
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = thousandeyes_sdk.dashboards.DashboardsApi(api_client)
|
||||
dashboard_id = '646f4d2ce3c99b0536c3821e' # str | A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.
|
||||
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
|
||||
clone_dashboard_request = thousandeyes_sdk.dashboards.CloneDashboardRequest() # CloneDashboardRequest | Optional overrides for the cloned dashboard. (optional)
|
||||
|
||||
try:
|
||||
# Clone dashboard
|
||||
api_response = api_instance.clone_dashboard(dashboard_id, aid=aid, clone_dashboard_request=clone_dashboard_request)
|
||||
print("The response of DashboardsApi->clone_dashboard:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling DashboardsApi->clone_dashboard: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**dashboard_id** | **str**| A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. |
|
||||
**aid** | **str**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
|
||||
**clone_dashboard_request** | [**CloneDashboardRequest**](CloneDashboardRequest.md)| Optional overrides for the cloned dashboard. | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**Dashboard**](Dashboard.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[BearerAuth](../README.md#BearerAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**201** | Dashboard cloned successfully. | * Location - <br> |
|
||||
**400** | Bad Request | - |
|
||||
**401** | Unauthorized | - |
|
||||
**403** | Insufficient permissions to query endpoint | - |
|
||||
**404** | Not found | - |
|
||||
**429** | Exhausted rate limit for the organization | - |
|
||||
**500** | Internal server error | - |
|
||||
|
||||
[[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_dashboard**
|
||||
> Dashboard create_dashboard(dashboard, aid=aid)
|
||||
|
||||
@ -183,6 +275,90 @@ 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)
|
||||
|
||||
# **delete_dashboard_schedule**
|
||||
> delete_dashboard_schedule(dashboard_id, aid=aid)
|
||||
|
||||
Delete dashboard snapshot schedule
|
||||
|
||||
Removes the snapshot schedule from a dashboard. Existing snapshots are not deleted.
|
||||
|
||||
### Example
|
||||
|
||||
* Bearer Authentication (BearerAuth):
|
||||
|
||||
```python
|
||||
import thousandeyes_sdk.dashboards
|
||||
from thousandeyes_sdk.dashboards.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to https://api.thousandeyes.com/v7
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = thousandeyes_sdk.core.Configuration(
|
||||
host = "https://api.thousandeyes.com/v7"
|
||||
)
|
||||
|
||||
# The client must configure the authentication and authorization parameters
|
||||
# in accordance with the API server security policy.
|
||||
# Examples for each auth method are provided below, use the example that
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure Bearer authorization: BearerAuth
|
||||
configuration = thousandeyes_sdk.core.Configuration(
|
||||
access_token = os.environ["BEARER_TOKEN"]
|
||||
)
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = thousandeyes_sdk.dashboards.DashboardsApi(api_client)
|
||||
dashboard_id = '646f4d2ce3c99b0536c3821e' # str | A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.
|
||||
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
|
||||
|
||||
try:
|
||||
# Delete dashboard snapshot schedule
|
||||
api_instance.delete_dashboard_schedule(dashboard_id, aid=aid)
|
||||
except Exception as e:
|
||||
print("Exception when calling DashboardsApi->delete_dashboard_schedule: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**dashboard_id** | **str**| A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. |
|
||||
**aid** | **str**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[BearerAuth](../README.md#BearerAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**204** | No content | - |
|
||||
**400** | Bad Request | - |
|
||||
**401** | Unauthorized | - |
|
||||
**403** | Insufficient permissions to query endpoint | - |
|
||||
**404** | Not found | - |
|
||||
**409** | The dashboard changed while the schedule operation was being applied. | - |
|
||||
**429** | Exhausted rate limit for the organization | - |
|
||||
**500** | Internal server error | - |
|
||||
|
||||
[[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_dashboard**
|
||||
> ApiDashboard get_dashboard(dashboard_id, aid=aid)
|
||||
|
||||
@ -736,3 +912,93 @@ 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_dashboard_schedule**
|
||||
> ApiDashboard update_dashboard_schedule(dashboard_id, dashboard_schedule_request, aid=aid)
|
||||
|
||||
Create or update dashboard snapshot schedule
|
||||
|
||||
Creates or replaces the snapshot schedule for a dashboard. Set `repeat` to `NONE` to generate one snapshot at `startTime`. Other `repeat` values create recurring snapshots. Schedule settings control when snapshots are generated, the data time range included in each snapshot, and email delivery options.
|
||||
|
||||
### Example
|
||||
|
||||
* Bearer Authentication (BearerAuth):
|
||||
|
||||
```python
|
||||
import thousandeyes_sdk.dashboards
|
||||
from thousandeyes_sdk.dashboards.models.api_dashboard import ApiDashboard
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_request import DashboardScheduleRequest
|
||||
from thousandeyes_sdk.dashboards.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Defining the host is optional and defaults to https://api.thousandeyes.com/v7
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = thousandeyes_sdk.core.Configuration(
|
||||
host = "https://api.thousandeyes.com/v7"
|
||||
)
|
||||
|
||||
# The client must configure the authentication and authorization parameters
|
||||
# in accordance with the API server security policy.
|
||||
# Examples for each auth method are provided below, use the example that
|
||||
# satisfies your auth use case.
|
||||
|
||||
# Configure Bearer authorization: BearerAuth
|
||||
configuration = thousandeyes_sdk.core.Configuration(
|
||||
access_token = os.environ["BEARER_TOKEN"]
|
||||
)
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = thousandeyes_sdk.dashboards.DashboardsApi(api_client)
|
||||
dashboard_id = '646f4d2ce3c99b0536c3821e' # str | A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.
|
||||
dashboard_schedule_request = thousandeyes_sdk.dashboards.DashboardScheduleRequest() # DashboardScheduleRequest | Snapshot schedule configuration.
|
||||
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
|
||||
|
||||
try:
|
||||
# Create or update dashboard snapshot schedule
|
||||
api_response = api_instance.update_dashboard_schedule(dashboard_id, dashboard_schedule_request, aid=aid)
|
||||
print("The response of DashboardsApi->update_dashboard_schedule:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling DashboardsApi->update_dashboard_schedule: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**dashboard_id** | **str**| A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. |
|
||||
**dashboard_schedule_request** | [**DashboardScheduleRequest**](DashboardScheduleRequest.md)| Snapshot schedule configuration. |
|
||||
**aid** | **str**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**ApiDashboard**](ApiDashboard.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[BearerAuth](../README.md#BearerAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | OK | - |
|
||||
**400** | Bad Request | - |
|
||||
**401** | Unauthorized | - |
|
||||
**403** | Insufficient permissions to query endpoint | - |
|
||||
**404** | Not found | - |
|
||||
**409** | The dashboard changed while the schedule operation was being applied. | - |
|
||||
**429** | Exhausted rate limit for the organization | - |
|
||||
**500** | Internal server error | - |
|
||||
|
||||
[[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)
|
||||
|
||||
|
||||
@ -88,6 +88,8 @@ from thousandeyes_sdk.dashboards.models.app_and_self_links import AppAndSelfLink
|
||||
from thousandeyes_sdk.dashboards.models.asw_repeat import AswRepeat
|
||||
from thousandeyes_sdk.dashboards.models.asw_repeat_unit import AswRepeatUnit
|
||||
from thousandeyes_sdk.dashboards.models.box_and_whiskers_datasource import BoxAndWhiskersDatasource
|
||||
from thousandeyes_sdk.dashboards.models.clone_dashboard_refresh_rate import CloneDashboardRefreshRate
|
||||
from thousandeyes_sdk.dashboards.models.clone_dashboard_request import CloneDashboardRequest
|
||||
from thousandeyes_sdk.dashboards.models.color_grid_datasource import ColorGridDatasource
|
||||
from thousandeyes_sdk.dashboards.models.dashboard import Dashboard
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_global_filter_id import DashboardGlobalFilterId
|
||||
@ -98,6 +100,28 @@ from thousandeyes_sdk.dashboards.models.dashboard_links import DashboardLinks
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_metric import DashboardMetric
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_metric_direction import DashboardMetricDirection
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_order import DashboardOrder
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule import DashboardSchedule
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_after_end_condition import DashboardScheduleAfterEndCondition
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_cron_spec import DashboardScheduleCronSpec
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_cron_spec_base import DashboardScheduleCronSpecBase
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_cron_spec_base_not import DashboardScheduleCronSpecBaseNot
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_cron_spec import DashboardScheduleCustomCronSpec
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_repeat import DashboardScheduleCustomRepeat
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_repeat_not import DashboardScheduleCustomRepeatNot
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_repeat_type import DashboardScheduleCustomRepeatType
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_repeat_unit import DashboardScheduleCustomRepeatUnit
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_data_source import DashboardScheduleDataSource
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_date_end_condition import DashboardScheduleDateEndCondition
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_end_condition import DashboardScheduleEndCondition
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_never_end_condition import DashboardScheduleNeverEndCondition
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_non_custom_cron_spec import DashboardScheduleNonCustomCronSpec
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_non_custom_repeat import DashboardScheduleNonCustomRepeat
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_non_weekly_custom_repeat_unit import DashboardScheduleNonWeeklyCustomRepeatUnit
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_one_time_repeat_type import DashboardScheduleOneTimeRepeatType
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_repeat import DashboardScheduleRepeat
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_request import DashboardScheduleRequest
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_timespan import DashboardScheduleTimespan
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_timespan_period import DashboardScheduleTimespanPeriod
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_snapshot_response import DashboardSnapshotResponse
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_snapshots_page import DashboardSnapshotsPage
|
||||
from thousandeyes_sdk.dashboards.models.default_timespan import DefaultTimespan
|
||||
|
||||
@ -26,8 +26,10 @@ from thousandeyes_sdk.dashboards.models.api_dashboard import ApiDashboard
|
||||
from thousandeyes_sdk.dashboards.models.api_multi_metric_column_data import ApiMultiMetricColumnData
|
||||
from thousandeyes_sdk.dashboards.models.api_numbers_card_data import ApiNumbersCardData
|
||||
from thousandeyes_sdk.dashboards.models.api_widget_data_response import ApiWidgetDataResponse
|
||||
from thousandeyes_sdk.dashboards.models.clone_dashboard_request import CloneDashboardRequest
|
||||
from thousandeyes_sdk.dashboards.models.dashboard import Dashboard
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_order import DashboardOrder
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_request import DashboardScheduleRequest
|
||||
|
||||
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
|
||||
from thousandeyes_sdk.core.api_response import ApiResponse
|
||||
@ -49,6 +51,331 @@ class DashboardsApi:
|
||||
self.api_client = api_client
|
||||
|
||||
|
||||
@validate_call
|
||||
def clone_dashboard(
|
||||
self,
|
||||
dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")],
|
||||
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
|
||||
clone_dashboard_request: Annotated[Optional[CloneDashboardRequest], Field(description="Optional overrides for the cloned dashboard.")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Tuple[
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Annotated[StrictFloat, Field(gt=0)]
|
||||
]
|
||||
] = None,
|
||||
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> Dashboard:
|
||||
"""Clone dashboard
|
||||
|
||||
Creates a dashboard by cloning an existing dashboard. By default, the clone inherits the source dashboard's widgets, layout, default timespan, tags, and other supported settings. Values provided in the request override the corresponding source dashboard settings. Sharing settings are not inherited. If `title` is omitted, the API generates a unique title for the clone. **Note**: * Users with the `Edit dashboard templates for all users in account group` permission (Account Admin) can clone any dashboard they can view. * Users with the `Edit own dashboard templates` permission (Regular User) can clone dashboards they can view. The current user owns the cloned dashboard.
|
||||
|
||||
:param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required)
|
||||
:type dashboard_id: str
|
||||
:param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.
|
||||
:type aid: str
|
||||
:param clone_dashboard_request: Optional overrides for the cloned dashboard.
|
||||
:type clone_dashboard_request: CloneDashboardRequest
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
timeout. It can also be a pair (tuple) of
|
||||
(connection, read) timeouts.
|
||||
:type _request_timeout: int, tuple(int, int), optional
|
||||
:param _request_auth: set to override the auth_settings for an a single
|
||||
request; this effectively ignores the
|
||||
authentication in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:param _content_type: force content-type for the request.
|
||||
:type _content_type: str, Optional
|
||||
:param _headers: set to override the headers for a single
|
||||
request; this effectively ignores the headers
|
||||
in the spec for a single request.
|
||||
:type _headers: dict, optional
|
||||
:param _host_index: set to override the host_index for a single
|
||||
request; this effectively ignores the host_index
|
||||
in the spec for a single request.
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._clone_dashboard_serialize(
|
||||
dashboard_id=dashboard_id,
|
||||
aid=aid,
|
||||
clone_dashboard_request=clone_dashboard_request,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'201': "Dashboard",
|
||||
'400': "ValidationError",
|
||||
'401': "UnauthorizedError",
|
||||
'403': "Error",
|
||||
'404': "Error",
|
||||
'429': "Error",
|
||||
'500': "Error",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
response_data.read()
|
||||
return self.api_client.response_deserialize(
|
||||
response_data=response_data,
|
||||
response_types_map=_response_types_map,
|
||||
models=thousandeyes_sdk.dashboards.models,
|
||||
).data
|
||||
|
||||
|
||||
@validate_call
|
||||
def clone_dashboard_with_http_info(
|
||||
self,
|
||||
dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")],
|
||||
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
|
||||
clone_dashboard_request: Annotated[Optional[CloneDashboardRequest], Field(description="Optional overrides for the cloned dashboard.")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Tuple[
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Annotated[StrictFloat, Field(gt=0)]
|
||||
]
|
||||
] = None,
|
||||
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[Dashboard]:
|
||||
"""Clone dashboard
|
||||
|
||||
Creates a dashboard by cloning an existing dashboard. By default, the clone inherits the source dashboard's widgets, layout, default timespan, tags, and other supported settings. Values provided in the request override the corresponding source dashboard settings. Sharing settings are not inherited. If `title` is omitted, the API generates a unique title for the clone. **Note**: * Users with the `Edit dashboard templates for all users in account group` permission (Account Admin) can clone any dashboard they can view. * Users with the `Edit own dashboard templates` permission (Regular User) can clone dashboards they can view. The current user owns the cloned dashboard.
|
||||
|
||||
:param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required)
|
||||
:type dashboard_id: str
|
||||
:param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.
|
||||
:type aid: str
|
||||
:param clone_dashboard_request: Optional overrides for the cloned dashboard.
|
||||
:type clone_dashboard_request: CloneDashboardRequest
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
timeout. It can also be a pair (tuple) of
|
||||
(connection, read) timeouts.
|
||||
:type _request_timeout: int, tuple(int, int), optional
|
||||
:param _request_auth: set to override the auth_settings for an a single
|
||||
request; this effectively ignores the
|
||||
authentication in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:param _content_type: force content-type for the request.
|
||||
:type _content_type: str, Optional
|
||||
:param _headers: set to override the headers for a single
|
||||
request; this effectively ignores the headers
|
||||
in the spec for a single request.
|
||||
:type _headers: dict, optional
|
||||
:param _host_index: set to override the host_index for a single
|
||||
request; this effectively ignores the host_index
|
||||
in the spec for a single request.
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._clone_dashboard_serialize(
|
||||
dashboard_id=dashboard_id,
|
||||
aid=aid,
|
||||
clone_dashboard_request=clone_dashboard_request,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'201': "Dashboard",
|
||||
'400': "ValidationError",
|
||||
'401': "UnauthorizedError",
|
||||
'403': "Error",
|
||||
'404': "Error",
|
||||
'429': "Error",
|
||||
'500': "Error",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
response_data.read()
|
||||
return self.api_client.response_deserialize(
|
||||
response_data=response_data,
|
||||
response_types_map=_response_types_map,
|
||||
models=thousandeyes_sdk.dashboards.models,
|
||||
)
|
||||
|
||||
|
||||
@validate_call
|
||||
def clone_dashboard_without_preload_content(
|
||||
self,
|
||||
dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")],
|
||||
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
|
||||
clone_dashboard_request: Annotated[Optional[CloneDashboardRequest], Field(description="Optional overrides for the cloned dashboard.")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Tuple[
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Annotated[StrictFloat, Field(gt=0)]
|
||||
]
|
||||
] = None,
|
||||
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""Clone dashboard
|
||||
|
||||
Creates a dashboard by cloning an existing dashboard. By default, the clone inherits the source dashboard's widgets, layout, default timespan, tags, and other supported settings. Values provided in the request override the corresponding source dashboard settings. Sharing settings are not inherited. If `title` is omitted, the API generates a unique title for the clone. **Note**: * Users with the `Edit dashboard templates for all users in account group` permission (Account Admin) can clone any dashboard they can view. * Users with the `Edit own dashboard templates` permission (Regular User) can clone dashboards they can view. The current user owns the cloned dashboard.
|
||||
|
||||
:param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required)
|
||||
:type dashboard_id: str
|
||||
:param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.
|
||||
:type aid: str
|
||||
:param clone_dashboard_request: Optional overrides for the cloned dashboard.
|
||||
:type clone_dashboard_request: CloneDashboardRequest
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
timeout. It can also be a pair (tuple) of
|
||||
(connection, read) timeouts.
|
||||
:type _request_timeout: int, tuple(int, int), optional
|
||||
:param _request_auth: set to override the auth_settings for an a single
|
||||
request; this effectively ignores the
|
||||
authentication in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:param _content_type: force content-type for the request.
|
||||
:type _content_type: str, Optional
|
||||
:param _headers: set to override the headers for a single
|
||||
request; this effectively ignores the headers
|
||||
in the spec for a single request.
|
||||
:type _headers: dict, optional
|
||||
:param _host_index: set to override the host_index for a single
|
||||
request; this effectively ignores the host_index
|
||||
in the spec for a single request.
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._clone_dashboard_serialize(
|
||||
dashboard_id=dashboard_id,
|
||||
aid=aid,
|
||||
clone_dashboard_request=clone_dashboard_request,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'201': "Dashboard",
|
||||
'400': "ValidationError",
|
||||
'401': "UnauthorizedError",
|
||||
'403': "Error",
|
||||
'404': "Error",
|
||||
'429': "Error",
|
||||
'500': "Error",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
return response_data.response
|
||||
|
||||
|
||||
def _clone_dashboard_serialize(
|
||||
self,
|
||||
dashboard_id,
|
||||
aid,
|
||||
clone_dashboard_request,
|
||||
_request_auth,
|
||||
_content_type,
|
||||
_headers,
|
||||
_host_index,
|
||||
) -> RequestSerialized:
|
||||
|
||||
_host = None
|
||||
|
||||
_collection_formats: Dict[str, str] = {
|
||||
}
|
||||
|
||||
_path_params: Dict[str, str] = {}
|
||||
_query_params: List[Tuple[str, str]] = []
|
||||
_header_params: Dict[str, Optional[str]] = _headers or {}
|
||||
_form_params: List[Tuple[str, str]] = []
|
||||
_files: Dict[str, Union[str, bytes]] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
if dashboard_id is not None:
|
||||
_path_params['dashboardId'] = dashboard_id
|
||||
# process the query parameters
|
||||
if aid is not None:
|
||||
|
||||
_query_params.append(('aid', aid))
|
||||
|
||||
# process the header parameters
|
||||
# process the form parameters
|
||||
# process the body parameter
|
||||
if clone_dashboard_request is not None:
|
||||
_body_params = clone_dashboard_request
|
||||
|
||||
|
||||
# set the HTTP header `Accept`
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/hal+json',
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
|
||||
# set the HTTP header `Content-Type`
|
||||
if _content_type:
|
||||
_header_params['Content-Type'] = _content_type
|
||||
else:
|
||||
_default_content_type = (
|
||||
self.api_client.select_header_content_type(
|
||||
[
|
||||
'application/json'
|
||||
]
|
||||
)
|
||||
)
|
||||
if _default_content_type is not None:
|
||||
_header_params['Content-Type'] = _default_content_type
|
||||
|
||||
# authentication setting
|
||||
_auth_settings: List[str] = [
|
||||
'BearerAuth'
|
||||
]
|
||||
|
||||
return self.api_client.param_serialize(
|
||||
method='POST',
|
||||
resource_path='/dashboards/{dashboardId}/clone',
|
||||
path_params=_path_params,
|
||||
query_params=_query_params,
|
||||
header_params=_header_params,
|
||||
body=_body_params,
|
||||
post_params=_form_params,
|
||||
files=_files,
|
||||
auth_settings=_auth_settings,
|
||||
collection_formats=_collection_formats,
|
||||
_host=_host,
|
||||
_request_auth=_request_auth
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@validate_call
|
||||
def create_dashboard(
|
||||
self,
|
||||
@ -655,6 +982,305 @@ class DashboardsApi:
|
||||
|
||||
|
||||
|
||||
@validate_call
|
||||
def delete_dashboard_schedule(
|
||||
self,
|
||||
dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")],
|
||||
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Tuple[
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Annotated[StrictFloat, Field(gt=0)]
|
||||
]
|
||||
] = None,
|
||||
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> None:
|
||||
"""Delete dashboard snapshot schedule
|
||||
|
||||
Removes the snapshot schedule from a dashboard. Existing snapshots are not deleted.
|
||||
|
||||
:param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required)
|
||||
:type dashboard_id: str
|
||||
:param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.
|
||||
:type aid: str
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
timeout. It can also be a pair (tuple) of
|
||||
(connection, read) timeouts.
|
||||
:type _request_timeout: int, tuple(int, int), optional
|
||||
:param _request_auth: set to override the auth_settings for an a single
|
||||
request; this effectively ignores the
|
||||
authentication in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:param _content_type: force content-type for the request.
|
||||
:type _content_type: str, Optional
|
||||
:param _headers: set to override the headers for a single
|
||||
request; this effectively ignores the headers
|
||||
in the spec for a single request.
|
||||
:type _headers: dict, optional
|
||||
:param _host_index: set to override the host_index for a single
|
||||
request; this effectively ignores the host_index
|
||||
in the spec for a single request.
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._delete_dashboard_schedule_serialize(
|
||||
dashboard_id=dashboard_id,
|
||||
aid=aid,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'204': None,
|
||||
'400': "ValidationError",
|
||||
'401': "UnauthorizedError",
|
||||
'403': "Error",
|
||||
'404': "Error",
|
||||
'409': "Error",
|
||||
'429': "Error",
|
||||
'500': "Error",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
response_data.read()
|
||||
return self.api_client.response_deserialize(
|
||||
response_data=response_data,
|
||||
response_types_map=_response_types_map,
|
||||
models=thousandeyes_sdk.dashboards.models,
|
||||
).data
|
||||
|
||||
|
||||
@validate_call
|
||||
def delete_dashboard_schedule_with_http_info(
|
||||
self,
|
||||
dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")],
|
||||
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Tuple[
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Annotated[StrictFloat, Field(gt=0)]
|
||||
]
|
||||
] = None,
|
||||
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[None]:
|
||||
"""Delete dashboard snapshot schedule
|
||||
|
||||
Removes the snapshot schedule from a dashboard. Existing snapshots are not deleted.
|
||||
|
||||
:param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required)
|
||||
:type dashboard_id: str
|
||||
:param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.
|
||||
:type aid: str
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
timeout. It can also be a pair (tuple) of
|
||||
(connection, read) timeouts.
|
||||
:type _request_timeout: int, tuple(int, int), optional
|
||||
:param _request_auth: set to override the auth_settings for an a single
|
||||
request; this effectively ignores the
|
||||
authentication in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:param _content_type: force content-type for the request.
|
||||
:type _content_type: str, Optional
|
||||
:param _headers: set to override the headers for a single
|
||||
request; this effectively ignores the headers
|
||||
in the spec for a single request.
|
||||
:type _headers: dict, optional
|
||||
:param _host_index: set to override the host_index for a single
|
||||
request; this effectively ignores the host_index
|
||||
in the spec for a single request.
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._delete_dashboard_schedule_serialize(
|
||||
dashboard_id=dashboard_id,
|
||||
aid=aid,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'204': None,
|
||||
'400': "ValidationError",
|
||||
'401': "UnauthorizedError",
|
||||
'403': "Error",
|
||||
'404': "Error",
|
||||
'409': "Error",
|
||||
'429': "Error",
|
||||
'500': "Error",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
response_data.read()
|
||||
return self.api_client.response_deserialize(
|
||||
response_data=response_data,
|
||||
response_types_map=_response_types_map,
|
||||
models=thousandeyes_sdk.dashboards.models,
|
||||
)
|
||||
|
||||
|
||||
@validate_call
|
||||
def delete_dashboard_schedule_without_preload_content(
|
||||
self,
|
||||
dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")],
|
||||
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Tuple[
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Annotated[StrictFloat, Field(gt=0)]
|
||||
]
|
||||
] = None,
|
||||
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""Delete dashboard snapshot schedule
|
||||
|
||||
Removes the snapshot schedule from a dashboard. Existing snapshots are not deleted.
|
||||
|
||||
:param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required)
|
||||
:type dashboard_id: str
|
||||
:param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.
|
||||
:type aid: str
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
timeout. It can also be a pair (tuple) of
|
||||
(connection, read) timeouts.
|
||||
:type _request_timeout: int, tuple(int, int), optional
|
||||
:param _request_auth: set to override the auth_settings for an a single
|
||||
request; this effectively ignores the
|
||||
authentication in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:param _content_type: force content-type for the request.
|
||||
:type _content_type: str, Optional
|
||||
:param _headers: set to override the headers for a single
|
||||
request; this effectively ignores the headers
|
||||
in the spec for a single request.
|
||||
:type _headers: dict, optional
|
||||
:param _host_index: set to override the host_index for a single
|
||||
request; this effectively ignores the host_index
|
||||
in the spec for a single request.
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._delete_dashboard_schedule_serialize(
|
||||
dashboard_id=dashboard_id,
|
||||
aid=aid,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'204': None,
|
||||
'400': "ValidationError",
|
||||
'401': "UnauthorizedError",
|
||||
'403': "Error",
|
||||
'404': "Error",
|
||||
'409': "Error",
|
||||
'429': "Error",
|
||||
'500': "Error",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
return response_data.response
|
||||
|
||||
|
||||
def _delete_dashboard_schedule_serialize(
|
||||
self,
|
||||
dashboard_id,
|
||||
aid,
|
||||
_request_auth,
|
||||
_content_type,
|
||||
_headers,
|
||||
_host_index,
|
||||
) -> RequestSerialized:
|
||||
|
||||
_host = None
|
||||
|
||||
_collection_formats: Dict[str, str] = {
|
||||
}
|
||||
|
||||
_path_params: Dict[str, str] = {}
|
||||
_query_params: List[Tuple[str, str]] = []
|
||||
_header_params: Dict[str, Optional[str]] = _headers or {}
|
||||
_form_params: List[Tuple[str, str]] = []
|
||||
_files: Dict[str, Union[str, bytes]] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
if dashboard_id is not None:
|
||||
_path_params['dashboardId'] = dashboard_id
|
||||
# process the query parameters
|
||||
if aid is not None:
|
||||
|
||||
_query_params.append(('aid', aid))
|
||||
|
||||
# process the header parameters
|
||||
# process the form parameters
|
||||
# process the body parameter
|
||||
|
||||
|
||||
# set the HTTP header `Accept`
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
# authentication setting
|
||||
_auth_settings: List[str] = [
|
||||
'BearerAuth'
|
||||
]
|
||||
|
||||
return self.api_client.param_serialize(
|
||||
method='DELETE',
|
||||
resource_path='/dashboards/{dashboardId}/actions/schedule',
|
||||
path_params=_path_params,
|
||||
query_params=_query_params,
|
||||
header_params=_header_params,
|
||||
body=_body_params,
|
||||
post_params=_form_params,
|
||||
files=_files,
|
||||
auth_settings=_auth_settings,
|
||||
collection_formats=_collection_formats,
|
||||
_host=_host,
|
||||
_request_auth=_request_auth
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@validate_call
|
||||
def get_dashboard(
|
||||
self,
|
||||
@ -2798,3 +3424,331 @@ class DashboardsApi:
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@validate_call
|
||||
def update_dashboard_schedule(
|
||||
self,
|
||||
dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")],
|
||||
dashboard_schedule_request: Annotated[DashboardScheduleRequest, Field(description="Snapshot schedule configuration.")],
|
||||
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Tuple[
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Annotated[StrictFloat, Field(gt=0)]
|
||||
]
|
||||
] = None,
|
||||
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiDashboard:
|
||||
"""Create or update dashboard snapshot schedule
|
||||
|
||||
Creates or replaces the snapshot schedule for a dashboard. Set `repeat` to `NONE` to generate one snapshot at `startTime`. Other `repeat` values create recurring snapshots. Schedule settings control when snapshots are generated, the data time range included in each snapshot, and email delivery options.
|
||||
|
||||
:param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required)
|
||||
:type dashboard_id: str
|
||||
:param dashboard_schedule_request: Snapshot schedule configuration. (required)
|
||||
:type dashboard_schedule_request: DashboardScheduleRequest
|
||||
:param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.
|
||||
:type aid: str
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
timeout. It can also be a pair (tuple) of
|
||||
(connection, read) timeouts.
|
||||
:type _request_timeout: int, tuple(int, int), optional
|
||||
:param _request_auth: set to override the auth_settings for an a single
|
||||
request; this effectively ignores the
|
||||
authentication in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:param _content_type: force content-type for the request.
|
||||
:type _content_type: str, Optional
|
||||
:param _headers: set to override the headers for a single
|
||||
request; this effectively ignores the headers
|
||||
in the spec for a single request.
|
||||
:type _headers: dict, optional
|
||||
:param _host_index: set to override the host_index for a single
|
||||
request; this effectively ignores the host_index
|
||||
in the spec for a single request.
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._update_dashboard_schedule_serialize(
|
||||
dashboard_id=dashboard_id,
|
||||
dashboard_schedule_request=dashboard_schedule_request,
|
||||
aid=aid,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "ApiDashboard",
|
||||
'400': "ValidationError",
|
||||
'401': "UnauthorizedError",
|
||||
'403': "Error",
|
||||
'404': "Error",
|
||||
'409': "Error",
|
||||
'429': "Error",
|
||||
'500': "Error",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
response_data.read()
|
||||
return self.api_client.response_deserialize(
|
||||
response_data=response_data,
|
||||
response_types_map=_response_types_map,
|
||||
models=thousandeyes_sdk.dashboards.models,
|
||||
).data
|
||||
|
||||
|
||||
@validate_call
|
||||
def update_dashboard_schedule_with_http_info(
|
||||
self,
|
||||
dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")],
|
||||
dashboard_schedule_request: Annotated[DashboardScheduleRequest, Field(description="Snapshot schedule configuration.")],
|
||||
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Tuple[
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Annotated[StrictFloat, Field(gt=0)]
|
||||
]
|
||||
] = None,
|
||||
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[ApiDashboard]:
|
||||
"""Create or update dashboard snapshot schedule
|
||||
|
||||
Creates or replaces the snapshot schedule for a dashboard. Set `repeat` to `NONE` to generate one snapshot at `startTime`. Other `repeat` values create recurring snapshots. Schedule settings control when snapshots are generated, the data time range included in each snapshot, and email delivery options.
|
||||
|
||||
:param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required)
|
||||
:type dashboard_id: str
|
||||
:param dashboard_schedule_request: Snapshot schedule configuration. (required)
|
||||
:type dashboard_schedule_request: DashboardScheduleRequest
|
||||
:param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.
|
||||
:type aid: str
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
timeout. It can also be a pair (tuple) of
|
||||
(connection, read) timeouts.
|
||||
:type _request_timeout: int, tuple(int, int), optional
|
||||
:param _request_auth: set to override the auth_settings for an a single
|
||||
request; this effectively ignores the
|
||||
authentication in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:param _content_type: force content-type for the request.
|
||||
:type _content_type: str, Optional
|
||||
:param _headers: set to override the headers for a single
|
||||
request; this effectively ignores the headers
|
||||
in the spec for a single request.
|
||||
:type _headers: dict, optional
|
||||
:param _host_index: set to override the host_index for a single
|
||||
request; this effectively ignores the host_index
|
||||
in the spec for a single request.
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._update_dashboard_schedule_serialize(
|
||||
dashboard_id=dashboard_id,
|
||||
dashboard_schedule_request=dashboard_schedule_request,
|
||||
aid=aid,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "ApiDashboard",
|
||||
'400': "ValidationError",
|
||||
'401': "UnauthorizedError",
|
||||
'403': "Error",
|
||||
'404': "Error",
|
||||
'409': "Error",
|
||||
'429': "Error",
|
||||
'500': "Error",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
response_data.read()
|
||||
return self.api_client.response_deserialize(
|
||||
response_data=response_data,
|
||||
response_types_map=_response_types_map,
|
||||
models=thousandeyes_sdk.dashboards.models,
|
||||
)
|
||||
|
||||
|
||||
@validate_call
|
||||
def update_dashboard_schedule_without_preload_content(
|
||||
self,
|
||||
dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")],
|
||||
dashboard_schedule_request: Annotated[DashboardScheduleRequest, Field(description="Snapshot schedule configuration.")],
|
||||
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Tuple[
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Annotated[StrictFloat, Field(gt=0)]
|
||||
]
|
||||
] = None,
|
||||
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""Create or update dashboard snapshot schedule
|
||||
|
||||
Creates or replaces the snapshot schedule for a dashboard. Set `repeat` to `NONE` to generate one snapshot at `startTime`. Other `repeat` values create recurring snapshots. Schedule settings control when snapshots are generated, the data time range included in each snapshot, and email delivery options.
|
||||
|
||||
:param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required)
|
||||
:type dashboard_id: str
|
||||
:param dashboard_schedule_request: Snapshot schedule configuration. (required)
|
||||
:type dashboard_schedule_request: DashboardScheduleRequest
|
||||
:param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.
|
||||
:type aid: str
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
timeout. It can also be a pair (tuple) of
|
||||
(connection, read) timeouts.
|
||||
:type _request_timeout: int, tuple(int, int), optional
|
||||
:param _request_auth: set to override the auth_settings for an a single
|
||||
request; this effectively ignores the
|
||||
authentication in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:param _content_type: force content-type for the request.
|
||||
:type _content_type: str, Optional
|
||||
:param _headers: set to override the headers for a single
|
||||
request; this effectively ignores the headers
|
||||
in the spec for a single request.
|
||||
:type _headers: dict, optional
|
||||
:param _host_index: set to override the host_index for a single
|
||||
request; this effectively ignores the host_index
|
||||
in the spec for a single request.
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._update_dashboard_schedule_serialize(
|
||||
dashboard_id=dashboard_id,
|
||||
dashboard_schedule_request=dashboard_schedule_request,
|
||||
aid=aid,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "ApiDashboard",
|
||||
'400': "ValidationError",
|
||||
'401': "UnauthorizedError",
|
||||
'403': "Error",
|
||||
'404': "Error",
|
||||
'409': "Error",
|
||||
'429': "Error",
|
||||
'500': "Error",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
return response_data.response
|
||||
|
||||
|
||||
def _update_dashboard_schedule_serialize(
|
||||
self,
|
||||
dashboard_id,
|
||||
dashboard_schedule_request,
|
||||
aid,
|
||||
_request_auth,
|
||||
_content_type,
|
||||
_headers,
|
||||
_host_index,
|
||||
) -> RequestSerialized:
|
||||
|
||||
_host = None
|
||||
|
||||
_collection_formats: Dict[str, str] = {
|
||||
}
|
||||
|
||||
_path_params: Dict[str, str] = {}
|
||||
_query_params: List[Tuple[str, str]] = []
|
||||
_header_params: Dict[str, Optional[str]] = _headers or {}
|
||||
_form_params: List[Tuple[str, str]] = []
|
||||
_files: Dict[str, Union[str, bytes]] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
if dashboard_id is not None:
|
||||
_path_params['dashboardId'] = dashboard_id
|
||||
# process the query parameters
|
||||
if aid is not None:
|
||||
|
||||
_query_params.append(('aid', aid))
|
||||
|
||||
# process the header parameters
|
||||
# process the form parameters
|
||||
# process the body parameter
|
||||
if dashboard_schedule_request is not None:
|
||||
_body_params = dashboard_schedule_request
|
||||
|
||||
|
||||
# set the HTTP header `Accept`
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/hal+json',
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
|
||||
# set the HTTP header `Content-Type`
|
||||
if _content_type:
|
||||
_header_params['Content-Type'] = _content_type
|
||||
else:
|
||||
_default_content_type = (
|
||||
self.api_client.select_header_content_type(
|
||||
[
|
||||
'application/json'
|
||||
]
|
||||
)
|
||||
)
|
||||
if _default_content_type is not None:
|
||||
_header_params['Content-Type'] = _default_content_type
|
||||
|
||||
# authentication setting
|
||||
_auth_settings: List[str] = [
|
||||
'BearerAuth'
|
||||
]
|
||||
|
||||
return self.api_client.param_serialize(
|
||||
method='PUT',
|
||||
resource_path='/dashboards/{dashboardId}/actions/schedule',
|
||||
path_params=_path_params,
|
||||
query_params=_query_params,
|
||||
header_params=_header_params,
|
||||
body=_body_params,
|
||||
post_params=_form_params,
|
||||
files=_files,
|
||||
auth_settings=_auth_settings,
|
||||
collection_formats=_collection_formats,
|
||||
_host=_host,
|
||||
_request_auth=_request_auth
|
||||
)
|
||||
|
||||
|
||||
|
||||
@ -81,6 +81,8 @@ from thousandeyes_sdk.dashboards.models.app_and_self_links import AppAndSelfLink
|
||||
from thousandeyes_sdk.dashboards.models.asw_repeat import AswRepeat
|
||||
from thousandeyes_sdk.dashboards.models.asw_repeat_unit import AswRepeatUnit
|
||||
from thousandeyes_sdk.dashboards.models.box_and_whiskers_datasource import BoxAndWhiskersDatasource
|
||||
from thousandeyes_sdk.dashboards.models.clone_dashboard_refresh_rate import CloneDashboardRefreshRate
|
||||
from thousandeyes_sdk.dashboards.models.clone_dashboard_request import CloneDashboardRequest
|
||||
from thousandeyes_sdk.dashboards.models.color_grid_datasource import ColorGridDatasource
|
||||
from thousandeyes_sdk.dashboards.models.dashboard import Dashboard
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_global_filter_id import DashboardGlobalFilterId
|
||||
@ -91,6 +93,28 @@ from thousandeyes_sdk.dashboards.models.dashboard_links import DashboardLinks
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_metric import DashboardMetric
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_metric_direction import DashboardMetricDirection
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_order import DashboardOrder
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule import DashboardSchedule
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_after_end_condition import DashboardScheduleAfterEndCondition
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_cron_spec import DashboardScheduleCronSpec
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_cron_spec_base import DashboardScheduleCronSpecBase
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_cron_spec_base_not import DashboardScheduleCronSpecBaseNot
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_cron_spec import DashboardScheduleCustomCronSpec
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_repeat import DashboardScheduleCustomRepeat
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_repeat_not import DashboardScheduleCustomRepeatNot
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_repeat_type import DashboardScheduleCustomRepeatType
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_repeat_unit import DashboardScheduleCustomRepeatUnit
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_data_source import DashboardScheduleDataSource
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_date_end_condition import DashboardScheduleDateEndCondition
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_end_condition import DashboardScheduleEndCondition
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_never_end_condition import DashboardScheduleNeverEndCondition
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_non_custom_cron_spec import DashboardScheduleNonCustomCronSpec
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_non_custom_repeat import DashboardScheduleNonCustomRepeat
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_non_weekly_custom_repeat_unit import DashboardScheduleNonWeeklyCustomRepeatUnit
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_one_time_repeat_type import DashboardScheduleOneTimeRepeatType
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_repeat import DashboardScheduleRepeat
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_request import DashboardScheduleRequest
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_timespan import DashboardScheduleTimespan
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_timespan_period import DashboardScheduleTimespanPeriod
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_snapshot_response import DashboardSnapshotResponse
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_snapshots_page import DashboardSnapshotsPage
|
||||
from thousandeyes_sdk.dashboards.models.default_timespan import DefaultTimespan
|
||||
|
||||
@ -22,6 +22,7 @@ from typing import Any, ClassVar, Dict, List, Optional
|
||||
from thousandeyes_sdk.dashboards.models.api_widget import ApiWidget
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_layout import DashboardLayout
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_links import DashboardLinks
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule import DashboardSchedule
|
||||
from thousandeyes_sdk.dashboards.models.default_timespan import DefaultTimespan
|
||||
from thousandeyes_sdk.dashboards.models.refresh_rate import RefreshRate
|
||||
from typing import Optional, Set
|
||||
@ -55,9 +56,10 @@ class ApiDashboard(BaseModel):
|
||||
is_global_override: Optional[StrictBool] = Field(default=None, description="When set to `true`, the defaultTimespan is used and overrides the widget's timespan. If set to `false`, the the widget's timespan is used.", alias="isGlobalOverride")
|
||||
is_migrated_report: Optional[StrictBool] = Field(default=None, description="True if this dashboard was previously a report.", alias="isMigratedReport")
|
||||
layout: Optional[DashboardLayout] = None
|
||||
schedule: Optional[DashboardSchedule] = None
|
||||
refresh_rate: Optional[RefreshRate] = Field(default=None, alias="refreshRate")
|
||||
links: Optional[DashboardLinks] = Field(default=None, alias="_links")
|
||||
__properties: ClassVar[List[str]] = ["globalFilterId", "accountId", "createdBy", "modifiedBy", "modifiedDate", "globalOverride", "migratedReport", "apiLink", "dashboardId", "title", "isBuiltIn", "aid", "dashboardCreatedBy", "dashboardModifiedBy", "dashboardModifiedDate", "isPrivate", "isDefaultForUser", "isDefaultForAccount", "widgets", "description", "defaultTimespan", "isGlobalOverride", "isMigratedReport", "layout", "refreshRate", "_links"]
|
||||
__properties: ClassVar[List[str]] = ["globalFilterId", "accountId", "createdBy", "modifiedBy", "modifiedDate", "globalOverride", "migratedReport", "apiLink", "dashboardId", "title", "isBuiltIn", "aid", "dashboardCreatedBy", "dashboardModifiedBy", "dashboardModifiedDate", "isPrivate", "isDefaultForUser", "isDefaultForAccount", "widgets", "description", "defaultTimespan", "isGlobalOverride", "isMigratedReport", "layout", "schedule", "refreshRate", "_links"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
@ -104,6 +106,7 @@ class ApiDashboard(BaseModel):
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
"account_id",
|
||||
@ -120,6 +123,7 @@ class ApiDashboard(BaseModel):
|
||||
"is_default_for_user",
|
||||
"is_default_for_account",
|
||||
"is_migrated_report",
|
||||
"schedule",
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
@ -140,6 +144,9 @@ class ApiDashboard(BaseModel):
|
||||
# override the default output from pydantic by calling `to_dict()` of layout
|
||||
if self.layout:
|
||||
_dict['layout'] = self.layout.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of schedule
|
||||
if self.schedule:
|
||||
_dict['schedule'] = self.schedule.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of links
|
||||
if self.links:
|
||||
_dict['_links'] = self.links.to_dict()
|
||||
@ -179,6 +186,7 @@ class ApiDashboard(BaseModel):
|
||||
"isGlobalOverride": obj.get("isGlobalOverride"),
|
||||
"isMigratedReport": obj.get("isMigratedReport"),
|
||||
"layout": DashboardLayout.from_dict(obj["layout"]) if obj.get("layout") is not None else None,
|
||||
"schedule": DashboardSchedule.from_dict(obj["schedule"]) if obj.get("schedule") is not None else None,
|
||||
"refreshRate": obj.get("refreshRate"),
|
||||
"_links": DashboardLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None
|
||||
})
|
||||
|
||||
@ -0,0 +1,46 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Dashboards API
|
||||
|
||||
Manage ThousandEyes Dashboards.
|
||||
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import json
|
||||
from enum import Enum
|
||||
from typing_extensions import Self
|
||||
|
||||
|
||||
class CloneDashboardRefreshRate(str, Enum):
|
||||
"""
|
||||
Auto-refresh interval for the cloned dashboard. If omitted, the clone inherits the source dashboard's refresh rate.
|
||||
"""
|
||||
|
||||
"""
|
||||
allowed enum values
|
||||
"""
|
||||
OFF = 'off'
|
||||
ENUM_2M = '2m'
|
||||
ENUM_5M = '5m'
|
||||
ENUM_10M = '10m'
|
||||
ENUM_15M = '15m'
|
||||
ENUM_30M = '30m'
|
||||
ENUM_60M = '60m'
|
||||
UNKNOWN = 'unknown'
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Self:
|
||||
"""Create an instance of CloneDashboardRefreshRate from a JSON string"""
|
||||
return cls(json.loads(json_str))
|
||||
|
||||
@classmethod
|
||||
def _missing_(cls, value):
|
||||
"""Handle unknown values"""
|
||||
return cls.UNKNOWN
|
||||
|
||||
@ -0,0 +1,121 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Dashboards API
|
||||
|
||||
Manage ThousandEyes Dashboards.
|
||||
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing_extensions import Annotated
|
||||
from thousandeyes_sdk.dashboards.models.clone_dashboard_refresh_rate import CloneDashboardRefreshRate
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_layout import DashboardLayout
|
||||
from thousandeyes_sdk.dashboards.models.default_timespan import DefaultTimespan
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class CloneDashboardRequest(BaseModel):
|
||||
"""
|
||||
Optional values that override settings inherited from the source dashboard. Omit the request body or send an empty object (`{}`) to clone the dashboard without overrides.
|
||||
""" # noqa: E501
|
||||
title: Optional[StrictStr] = Field(default=None, description="Title of the cloned dashboard. If omitted, the API generates a unique title.")
|
||||
tag_ids: Optional[List[StrictStr]] = Field(default=None, description="Dashboard tag identifiers. An empty array clears tags from the clone; omission preserves the source dashboard's tags.", alias="tagIds")
|
||||
description: Optional[Annotated[str, Field(strict=True, max_length=1000)]] = Field(default=None, description="Description for the cloned dashboard.")
|
||||
layout: Optional[DashboardLayout] = None
|
||||
default_timespan: Optional[DefaultTimespan] = Field(default=None, alias="defaultTimespan")
|
||||
is_global_override: Optional[StrictBool] = Field(default=None, description="If `true`, the dashboard time range overrides local widget time settings.", alias="isGlobalOverride")
|
||||
refresh_rate: Optional[CloneDashboardRefreshRate] = Field(default=None, alias="refreshRate")
|
||||
global_filter_id: Optional[StrictStr] = Field(default=None, description="Global filter applied to the cloned dashboard. If omitted, the source dashboard's filter is preserved when cloning within the same account group. When cloning across account groups, the filter is cleared.", alias="globalFilterId")
|
||||
shared_account_ids: Optional[List[StrictStr]] = Field(default=None, description="Account group IDs with which to share the cloned dashboard. An empty array limits sharing to current account group. Omission does not share with other account groups. The `isPrivate` setting controls visibility within the current account group. Cannot be used together with `isSharedWithAllAccountGroups=true`", alias="sharedAccountIds")
|
||||
is_shared_with_all_account_groups: Optional[StrictBool] = Field(default=None, description="When `true`, shares the cloned dashboard with all account groups available to the user. Cannot be used together with `sharedAccountIds`.", alias="isSharedWithAllAccountGroups")
|
||||
is_private: Optional[StrictBool] = Field(default=False, description="When `true`, only the creator can view the cloned dashboard. Combining this property with `sharedAccountIds` or `isSharedWithAllAccountGroups=true` returns `400 Bad Request`. Defaults to `false`.", alias="isPrivate")
|
||||
is_default_for_user: Optional[StrictBool] = Field(default=None, description="When `true`, sets the cloned dashboard as the current user's default dashboard.", alias="isDefaultForUser")
|
||||
is_default_for_account: Optional[StrictBool] = Field(default=None, description="When `true`, sets the cloned dashboard as the current account group's default dashboard.", alias="isDefaultForAccount")
|
||||
__properties: ClassVar[List[str]] = ["title", "tagIds", "description", "layout", "defaultTimespan", "isGlobalOverride", "refreshRate", "globalFilterId", "sharedAccountIds", "isSharedWithAllAccountGroups", "isPrivate", "isDefaultForUser", "isDefaultForAccount"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of CloneDashboardRequest from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of layout
|
||||
if self.layout:
|
||||
_dict['layout'] = self.layout.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of default_timespan
|
||||
if self.default_timespan:
|
||||
_dict['defaultTimespan'] = self.default_timespan.to_dict()
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of CloneDashboardRequest from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"title": obj.get("title"),
|
||||
"tagIds": obj.get("tagIds"),
|
||||
"description": obj.get("description"),
|
||||
"layout": DashboardLayout.from_dict(obj["layout"]) if obj.get("layout") is not None else None,
|
||||
"defaultTimespan": DefaultTimespan.from_dict(obj["defaultTimespan"]) if obj.get("defaultTimespan") is not None else None,
|
||||
"isGlobalOverride": obj.get("isGlobalOverride"),
|
||||
"refreshRate": obj.get("refreshRate"),
|
||||
"globalFilterId": obj.get("globalFilterId"),
|
||||
"sharedAccountIds": obj.get("sharedAccountIds"),
|
||||
"isSharedWithAllAccountGroups": obj.get("isSharedWithAllAccountGroups"),
|
||||
"isPrivate": obj.get("isPrivate") if obj.get("isPrivate") is not None else False,
|
||||
"isDefaultForUser": obj.get("isDefaultForUser"),
|
||||
"isDefaultForAccount": obj.get("isDefaultForAccount")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -22,6 +22,7 @@ from typing import Any, ClassVar, Dict, List, Optional
|
||||
from thousandeyes_sdk.dashboards.models.api_widget import ApiWidget
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_layout import DashboardLayout
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_links import DashboardLinks
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule import DashboardSchedule
|
||||
from thousandeyes_sdk.dashboards.models.default_timespan import DefaultTimespan
|
||||
from thousandeyes_sdk.dashboards.models.refresh_rate import RefreshRate
|
||||
from typing import Optional, Set
|
||||
@ -48,9 +49,10 @@ class Dashboard(BaseModel):
|
||||
is_global_override: Optional[StrictBool] = Field(default=None, description="When set to `true`, the defaultTimespan is used and overrides the widget's timespan. If set to `false`, the the widget's timespan is used.", alias="isGlobalOverride")
|
||||
is_migrated_report: Optional[StrictBool] = Field(default=None, description="True if this dashboard was previously a report.", alias="isMigratedReport")
|
||||
layout: Optional[DashboardLayout] = None
|
||||
schedule: Optional[DashboardSchedule] = None
|
||||
refresh_rate: Optional[RefreshRate] = Field(default=None, alias="refreshRate")
|
||||
links: Optional[DashboardLinks] = Field(default=None, alias="_links")
|
||||
__properties: ClassVar[List[str]] = ["globalFilterId", "dashboardId", "title", "isBuiltIn", "aid", "createdBy", "modifiedBy", "modifiedDate", "isPrivate", "isDefaultForUser", "isDefaultForAccount", "widgets", "description", "defaultTimespan", "isGlobalOverride", "isMigratedReport", "layout", "refreshRate", "_links"]
|
||||
__properties: ClassVar[List[str]] = ["globalFilterId", "dashboardId", "title", "isBuiltIn", "aid", "createdBy", "modifiedBy", "modifiedDate", "isPrivate", "isDefaultForUser", "isDefaultForAccount", "widgets", "description", "defaultTimespan", "isGlobalOverride", "isMigratedReport", "layout", "schedule", "refreshRate", "_links"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
@ -92,6 +94,7 @@ class Dashboard(BaseModel):
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
"dashboard_id",
|
||||
@ -103,6 +106,7 @@ class Dashboard(BaseModel):
|
||||
"is_default_for_user",
|
||||
"is_default_for_account",
|
||||
"is_migrated_report",
|
||||
"schedule",
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
@ -123,6 +127,9 @@ class Dashboard(BaseModel):
|
||||
# override the default output from pydantic by calling `to_dict()` of layout
|
||||
if self.layout:
|
||||
_dict['layout'] = self.layout.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of schedule
|
||||
if self.schedule:
|
||||
_dict['schedule'] = self.schedule.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of links
|
||||
if self.links:
|
||||
_dict['_links'] = self.links.to_dict()
|
||||
@ -155,6 +162,7 @@ class Dashboard(BaseModel):
|
||||
"isGlobalOverride": obj.get("isGlobalOverride"),
|
||||
"isMigratedReport": obj.get("isMigratedReport"),
|
||||
"layout": DashboardLayout.from_dict(obj["layout"]) if obj.get("layout") is not None else None,
|
||||
"schedule": DashboardSchedule.from_dict(obj["schedule"]) if obj.get("schedule") is not None else None,
|
||||
"refreshRate": obj.get("refreshRate"),
|
||||
"_links": DashboardLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None
|
||||
})
|
||||
|
||||
@ -0,0 +1,123 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Dashboards API
|
||||
|
||||
Manage ThousandEyes Dashboards.
|
||||
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from datetime import datetime
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing_extensions import Annotated
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_cron_spec import DashboardScheduleCronSpec
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_data_source import DashboardScheduleDataSource
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_timespan import DashboardScheduleTimespan
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class DashboardSchedule(BaseModel):
|
||||
"""
|
||||
Snapshot schedule for a dashboard. A `repeat` value of `NONE` represents a one-time schedule.
|
||||
""" # noqa: E501
|
||||
cron_spec: DashboardScheduleCronSpec = Field(alias="cronSpec")
|
||||
data_source: DashboardScheduleDataSource = Field(alias="dataSource")
|
||||
data_timespan: DashboardScheduleTimespan = Field(alias="dataTimespan")
|
||||
flag_enabled: StrictBool = Field(description="When `true`, the schedule is active and snapshots are generated according to `cronSpec`.", alias="flagEnabled")
|
||||
flag_locked: Optional[StrictBool] = Field(default=None, description="When `true`, the schedule configuration is locked and cannot be edited through the web application.", alias="flagLocked")
|
||||
flag_auto_share: Optional[StrictBool] = Field(default=None, description="When `true`, generated snapshots are automatically shared with schedule recipients.", alias="flagAutoShare")
|
||||
flag_is_include_pii_user_data: Optional[StrictBool] = Field(default=None, description="When `true`, generated snapshots include personally identifiable user data when permitted by account policy.", alias="flagIsIncludePiiUserData")
|
||||
flag_attach_pdf_to_email: Optional[StrictBool] = Field(default=None, description="When `true`, a PDF attachment is included in snapshot notification emails.", alias="flagAttachPdfToEmail")
|
||||
recipients: Optional[List[StrictStr]] = Field(default=None, description="Email addresses of active dashboard account users who receive snapshot notifications.")
|
||||
expires_after: Optional[Annotated[int, Field(le=157680000, strict=True, ge=86400)]] = Field(default=None, description="Snapshot retention period in seconds. Allowed range is 24 hours to 5 years.", alias="expiresAfter")
|
||||
next_date: Optional[datetime] = Field(default=None, description="UTC date of the next scheduled snapshot run. Computed by the server.", alias="nextDate")
|
||||
__properties: ClassVar[List[str]] = ["cronSpec", "dataSource", "dataTimespan", "flagEnabled", "flagLocked", "flagAutoShare", "flagIsIncludePiiUserData", "flagAttachPdfToEmail", "recipients", "expiresAfter", "nextDate"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of DashboardSchedule from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
"next_date",
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of cron_spec
|
||||
if self.cron_spec:
|
||||
_dict['cronSpec'] = self.cron_spec.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of data_source
|
||||
if self.data_source:
|
||||
_dict['dataSource'] = self.data_source.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of data_timespan
|
||||
if self.data_timespan:
|
||||
_dict['dataTimespan'] = self.data_timespan.to_dict()
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of DashboardSchedule from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"cronSpec": DashboardScheduleCronSpec.from_dict(obj["cronSpec"]) if obj.get("cronSpec") is not None else None,
|
||||
"dataSource": DashboardScheduleDataSource.from_dict(obj["dataSource"]) if obj.get("dataSource") is not None else None,
|
||||
"dataTimespan": DashboardScheduleTimespan.from_dict(obj["dataTimespan"]) if obj.get("dataTimespan") is not None else None,
|
||||
"flagEnabled": obj.get("flagEnabled"),
|
||||
"flagLocked": obj.get("flagLocked"),
|
||||
"flagAutoShare": obj.get("flagAutoShare"),
|
||||
"flagIsIncludePiiUserData": obj.get("flagIsIncludePiiUserData"),
|
||||
"flagAttachPdfToEmail": obj.get("flagAttachPdfToEmail"),
|
||||
"recipients": obj.get("recipients"),
|
||||
"expiresAfter": obj.get("expiresAfter"),
|
||||
"nextDate": obj.get("nextDate")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,97 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Dashboards API
|
||||
|
||||
Manage ThousandEyes Dashboards.
|
||||
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, field_validator
|
||||
from typing import Any, ClassVar, Dict, List
|
||||
from typing_extensions import Annotated
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class DashboardScheduleAfterEndCondition(BaseModel):
|
||||
"""
|
||||
DashboardScheduleAfterEndCondition
|
||||
""" # noqa: E501
|
||||
end_condition_type: Annotated[str, Field(strict=True)] = Field(description="Identifies a schedule that ends after a number of occurrences.", alias="endConditionType")
|
||||
value: Annotated[int, Field(strict=True, ge=1)] = Field(description="Number of schedule occurrences after which the recurrence ends.")
|
||||
__properties: ClassVar[List[str]] = ["endConditionType", "value"]
|
||||
|
||||
@field_validator('end_condition_type')
|
||||
def end_condition_type_validate_regular_expression(cls, value):
|
||||
"""Validates the regular expression"""
|
||||
if not re.match(r"^AFTER$", value):
|
||||
raise ValueError(r"must validate the regular expression /^AFTER$/")
|
||||
return value
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of DashboardScheduleAfterEndCondition from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of DashboardScheduleAfterEndCondition from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"endConditionType": obj.get("endConditionType"),
|
||||
"value": obj.get("value")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,143 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Dashboards API
|
||||
|
||||
Manage ThousandEyes Dashboards.
|
||||
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import json
|
||||
import pprint
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
|
||||
from typing import Any, List, Optional
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_cron_spec import DashboardScheduleCustomCronSpec
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_non_custom_cron_spec import DashboardScheduleNonCustomCronSpec
|
||||
from pydantic import StrictStr, Field, model_serializer
|
||||
from typing import Union, List, Set, Optional, Dict
|
||||
from typing_extensions import Literal, Self
|
||||
|
||||
DASHBOARDSCHEDULECRONSPEC_ONE_OF_SCHEMAS = ["DashboardScheduleCustomCronSpec", "DashboardScheduleNonCustomCronSpec"]
|
||||
|
||||
class DashboardScheduleCronSpec(BaseModel):
|
||||
"""
|
||||
Cron-style recurrence specification for a dashboard snapshot schedule.
|
||||
"""
|
||||
# data type: DashboardScheduleNonCustomCronSpec
|
||||
oneof_schema_1_validator: Optional[DashboardScheduleNonCustomCronSpec] = None
|
||||
# data type: DashboardScheduleCustomCronSpec
|
||||
oneof_schema_2_validator: Optional[DashboardScheduleCustomCronSpec] = None
|
||||
actual_instance: Optional[Union[DashboardScheduleCustomCronSpec, DashboardScheduleNonCustomCronSpec]] = None
|
||||
one_of_schemas: Set[str] = { "DashboardScheduleCustomCronSpec", "DashboardScheduleNonCustomCronSpec" }
|
||||
|
||||
model_config = ConfigDict(
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
discriminator_value_class_map: Dict[str, str] = {
|
||||
}
|
||||
|
||||
def __init__(self, *args, **kwargs) -> None:
|
||||
if args:
|
||||
if len(args) > 1:
|
||||
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
||||
if kwargs:
|
||||
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
||||
super().__init__(actual_instance=args[0])
|
||||
else:
|
||||
super().__init__(**kwargs)
|
||||
|
||||
@field_validator('actual_instance')
|
||||
def actual_instance_must_validate_oneof(cls, v):
|
||||
instance = DashboardScheduleCronSpec.model_construct()
|
||||
error_messages = []
|
||||
match = 0
|
||||
# validate data type: DashboardScheduleNonCustomCronSpec
|
||||
if not isinstance(v, DashboardScheduleNonCustomCronSpec):
|
||||
error_messages.append(f"Error! Input type `{type(v)}` is not `DashboardScheduleNonCustomCronSpec`")
|
||||
else:
|
||||
match += 1
|
||||
# validate data type: DashboardScheduleCustomCronSpec
|
||||
if not isinstance(v, DashboardScheduleCustomCronSpec):
|
||||
error_messages.append(f"Error! Input type `{type(v)}` is not `DashboardScheduleCustomCronSpec`")
|
||||
else:
|
||||
match += 1
|
||||
if match > 1:
|
||||
# more than 1 match
|
||||
raise ValueError("Multiple matches found when setting `actual_instance` in DashboardScheduleCronSpec with oneOf schemas: DashboardScheduleCustomCronSpec, DashboardScheduleNonCustomCronSpec. Details: " + ", ".join(error_messages))
|
||||
elif match == 0:
|
||||
# no match
|
||||
raise ValueError("No match found when setting `actual_instance` in DashboardScheduleCronSpec with oneOf schemas: DashboardScheduleCustomCronSpec, DashboardScheduleNonCustomCronSpec. Details: " + ", ".join(error_messages))
|
||||
else:
|
||||
return v
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
||||
return cls.from_json(json.dumps(obj))
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Self:
|
||||
"""Returns the object represented by the json string"""
|
||||
instance = cls.model_construct()
|
||||
error_messages = []
|
||||
match = 0
|
||||
|
||||
# deserialize data into DashboardScheduleNonCustomCronSpec
|
||||
try:
|
||||
instance.actual_instance = DashboardScheduleNonCustomCronSpec.from_json(json_str)
|
||||
match += 1
|
||||
except (ValidationError, ValueError) as e:
|
||||
error_messages.append(str(e))
|
||||
# deserialize data into DashboardScheduleCustomCronSpec
|
||||
try:
|
||||
instance.actual_instance = DashboardScheduleCustomCronSpec.from_json(json_str)
|
||||
match += 1
|
||||
except (ValidationError, ValueError) as e:
|
||||
error_messages.append(str(e))
|
||||
|
||||
if match > 1:
|
||||
# more than 1 match
|
||||
raise ValueError("Multiple matches found when deserializing the JSON string into DashboardScheduleCronSpec with oneOf schemas: DashboardScheduleCustomCronSpec, DashboardScheduleNonCustomCronSpec. Details: " + ", ".join(error_messages))
|
||||
elif match == 0:
|
||||
# no match
|
||||
raise ValueError("No match found when deserializing the JSON string into DashboardScheduleCronSpec with oneOf schemas: DashboardScheduleCustomCronSpec, DashboardScheduleNonCustomCronSpec. Details: " + ", ".join(error_messages))
|
||||
else:
|
||||
return instance
|
||||
|
||||
@model_serializer(when_used="json")
|
||||
def serialize_model(self):
|
||||
return json.loads(self.to_json())
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the actual instance"""
|
||||
if self.actual_instance is None:
|
||||
return "null"
|
||||
|
||||
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
||||
return self.actual_instance.to_json()
|
||||
else:
|
||||
return json.dumps(self.actual_instance)
|
||||
|
||||
def to_dict(self) -> Optional[Union[Dict[str, Any], DashboardScheduleCustomCronSpec, DashboardScheduleNonCustomCronSpec]]:
|
||||
"""Returns the dict representation of the actual instance"""
|
||||
if self.actual_instance is None:
|
||||
return None
|
||||
|
||||
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
||||
return self.actual_instance.to_dict()
|
||||
else:
|
||||
# primitive type
|
||||
return self.actual_instance
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the actual instance"""
|
||||
return pprint.pformat(self.model_dump())
|
||||
|
||||
|
||||
@ -0,0 +1,99 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Dashboards API
|
||||
|
||||
Manage ThousandEyes Dashboards.
|
||||
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing_extensions import Annotated
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_end_condition import DashboardScheduleEndCondition
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_repeat import DashboardScheduleRepeat
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class DashboardScheduleCronSpecBase(BaseModel):
|
||||
"""
|
||||
Common properties for a dashboard snapshot schedule recurrence.
|
||||
""" # noqa: E501
|
||||
start_time: Annotated[int, Field(strict=True, ge=0)] = Field(description="Schedule start time as a Unix timestamp in seconds.", alias="startTime")
|
||||
zone_code: StrictStr = Field(description="An IANA time zone identifier used to interpret `startTime` and recurrence. For example, `America/Los_Angeles`.", alias="zoneCode")
|
||||
repeat: DashboardScheduleRepeat
|
||||
end_repeat: Optional[DashboardScheduleEndCondition] = Field(default=None, alias="endRepeat")
|
||||
__properties: ClassVar[List[str]] = ["startTime", "zoneCode", "repeat", "endRepeat"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of DashboardScheduleCronSpecBase from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of end_repeat
|
||||
if self.end_repeat:
|
||||
_dict['endRepeat'] = self.end_repeat.to_dict()
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of DashboardScheduleCronSpecBase from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"startTime": obj.get("startTime"),
|
||||
"zoneCode": obj.get("zoneCode"),
|
||||
"repeat": obj.get("repeat"),
|
||||
"endRepeat": DashboardScheduleEndCondition.from_dict(obj["endRepeat"]) if obj.get("endRepeat") is not None else None
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,88 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Dashboards API
|
||||
|
||||
Manage ThousandEyes Dashboards.
|
||||
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_one_time_repeat_type import DashboardScheduleOneTimeRepeatType
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class DashboardScheduleCronSpecBaseNot(BaseModel):
|
||||
"""
|
||||
DashboardScheduleCronSpecBaseNot
|
||||
""" # noqa: E501
|
||||
repeat: Optional[DashboardScheduleOneTimeRepeatType] = None
|
||||
__properties: ClassVar[List[str]] = ["repeat"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of DashboardScheduleCronSpecBaseNot from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of DashboardScheduleCronSpecBaseNot from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"repeat": obj.get("repeat")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,105 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Dashboards API
|
||||
|
||||
Manage ThousandEyes Dashboards.
|
||||
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing_extensions import Annotated
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_repeat import DashboardScheduleCustomRepeat
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_repeat_type import DashboardScheduleCustomRepeatType
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_end_condition import DashboardScheduleEndCondition
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class DashboardScheduleCustomCronSpec(BaseModel):
|
||||
"""
|
||||
DashboardScheduleCustomCronSpec
|
||||
""" # noqa: E501
|
||||
start_time: Annotated[int, Field(strict=True, ge=0)] = Field(description="Schedule start time as a Unix timestamp in seconds.", alias="startTime")
|
||||
zone_code: StrictStr = Field(description="An IANA time zone identifier used to interpret `startTime` and recurrence. For example, `America/Los_Angeles`.", alias="zoneCode")
|
||||
repeat: DashboardScheduleCustomRepeatType
|
||||
end_repeat: Optional[DashboardScheduleEndCondition] = Field(default=None, alias="endRepeat")
|
||||
custom_repeat: DashboardScheduleCustomRepeat = Field(alias="customRepeat")
|
||||
__properties: ClassVar[List[str]] = ["startTime", "zoneCode", "repeat", "endRepeat", "customRepeat"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of DashboardScheduleCustomCronSpec from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of end_repeat
|
||||
if self.end_repeat:
|
||||
_dict['endRepeat'] = self.end_repeat.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of custom_repeat
|
||||
if self.custom_repeat:
|
||||
_dict['customRepeat'] = self.custom_repeat.to_dict()
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of DashboardScheduleCustomCronSpec from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"startTime": obj.get("startTime"),
|
||||
"zoneCode": obj.get("zoneCode"),
|
||||
"repeat": obj.get("repeat"),
|
||||
"endRepeat": DashboardScheduleEndCondition.from_dict(obj["endRepeat"]) if obj.get("endRepeat") is not None else None,
|
||||
"customRepeat": DashboardScheduleCustomRepeat.from_dict(obj["customRepeat"]) if obj.get("customRepeat") is not None else None
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,93 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Dashboards API
|
||||
|
||||
Manage ThousandEyes Dashboards.
|
||||
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing_extensions import Annotated
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_repeat_unit import DashboardScheduleCustomRepeatUnit
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class DashboardScheduleCustomRepeat(BaseModel):
|
||||
"""
|
||||
DashboardScheduleCustomRepeat
|
||||
""" # noqa: E501
|
||||
repeat_every: Annotated[int, Field(le=99, strict=True, ge=1)] = Field(description="Interval count for custom recurrence.", alias="repeatEvery")
|
||||
days_of_week: Optional[List[Annotated[int, Field(le=7, strict=True, ge=1)]]] = Field(default=None, description="Days of the week for custom weekly recurrence (`1` = Monday through `7` = Sunday).", alias="daysOfWeek")
|
||||
repeat_unit: DashboardScheduleCustomRepeatUnit = Field(alias="repeatUnit")
|
||||
__properties: ClassVar[List[str]] = ["repeatEvery", "daysOfWeek", "repeatUnit"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of DashboardScheduleCustomRepeat from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of DashboardScheduleCustomRepeat from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"repeatEvery": obj.get("repeatEvery"),
|
||||
"daysOfWeek": obj.get("daysOfWeek"),
|
||||
"repeatUnit": obj.get("repeatUnit")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,88 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Dashboards API
|
||||
|
||||
Manage ThousandEyes Dashboards.
|
||||
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_non_weekly_custom_repeat_unit import DashboardScheduleNonWeeklyCustomRepeatUnit
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class DashboardScheduleCustomRepeatNot(BaseModel):
|
||||
"""
|
||||
DashboardScheduleCustomRepeatNot
|
||||
""" # noqa: E501
|
||||
repeat_unit: Optional[DashboardScheduleNonWeeklyCustomRepeatUnit] = Field(default=None, alias="repeatUnit")
|
||||
__properties: ClassVar[List[str]] = ["repeatUnit"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of DashboardScheduleCustomRepeatNot from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of DashboardScheduleCustomRepeatNot from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"repeatUnit": obj.get("repeatUnit")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,40 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Dashboards API
|
||||
|
||||
Manage ThousandEyes Dashboards.
|
||||
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import json
|
||||
from enum import Enum
|
||||
from typing_extensions import Self
|
||||
|
||||
|
||||
class DashboardScheduleCustomRepeatType(str, Enum):
|
||||
"""
|
||||
DashboardScheduleCustomRepeatType
|
||||
"""
|
||||
|
||||
"""
|
||||
allowed enum values
|
||||
"""
|
||||
CUSTOM = 'CUSTOM'
|
||||
UNKNOWN = 'unknown'
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Self:
|
||||
"""Create an instance of DashboardScheduleCustomRepeatType from a JSON string"""
|
||||
return cls(json.loads(json_str))
|
||||
|
||||
@classmethod
|
||||
def _missing_(cls, value):
|
||||
"""Handle unknown values"""
|
||||
return cls.UNKNOWN
|
||||
|
||||
@ -0,0 +1,42 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Dashboards API
|
||||
|
||||
Manage ThousandEyes Dashboards.
|
||||
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import json
|
||||
from enum import Enum
|
||||
from typing_extensions import Self
|
||||
|
||||
|
||||
class DashboardScheduleCustomRepeatUnit(str, Enum):
|
||||
"""
|
||||
DashboardScheduleCustomRepeatUnit
|
||||
"""
|
||||
|
||||
"""
|
||||
allowed enum values
|
||||
"""
|
||||
DAY = 'DAY'
|
||||
WEEK = 'WEEK'
|
||||
MONTH = 'MONTH'
|
||||
UNKNOWN = 'unknown'
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Self:
|
||||
"""Create an instance of DashboardScheduleCustomRepeatUnit from a JSON string"""
|
||||
return cls(json.loads(json_str))
|
||||
|
||||
@classmethod
|
||||
def _missing_(cls, value):
|
||||
"""Handle unknown values"""
|
||||
return cls.UNKNOWN
|
||||
|
||||
@ -0,0 +1,88 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Dashboards API
|
||||
|
||||
Manage ThousandEyes Dashboards.
|
||||
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
from typing import Any, ClassVar, Dict, List
|
||||
from typing_extensions import Annotated
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class DashboardScheduleDataSource(BaseModel):
|
||||
"""
|
||||
Naming configuration for snapshots generated by the schedule. The required `dataTimespan` property on the schedule controls the snapshot data range.
|
||||
""" # noqa: E501
|
||||
name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Name assigned to snapshots generated by the schedule.")
|
||||
__properties: ClassVar[List[str]] = ["name"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of DashboardScheduleDataSource from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of DashboardScheduleDataSource from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"name": obj.get("name")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,97 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Dashboards API
|
||||
|
||||
Manage ThousandEyes Dashboards.
|
||||
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, field_validator
|
||||
from typing import Any, ClassVar, Dict, List
|
||||
from typing_extensions import Annotated
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class DashboardScheduleDateEndCondition(BaseModel):
|
||||
"""
|
||||
DashboardScheduleDateEndCondition
|
||||
""" # noqa: E501
|
||||
end_condition_type: Annotated[str, Field(strict=True)] = Field(description="Identifies a schedule that ends on a specified date.", alias="endConditionType")
|
||||
value: Annotated[int, Field(strict=True, ge=0)] = Field(description="Unix timestamp in seconds when the recurrence ends.")
|
||||
__properties: ClassVar[List[str]] = ["endConditionType", "value"]
|
||||
|
||||
@field_validator('end_condition_type')
|
||||
def end_condition_type_validate_regular_expression(cls, value):
|
||||
"""Validates the regular expression"""
|
||||
if not re.match(r"^DATE$", value):
|
||||
raise ValueError(r"must validate the regular expression /^DATE$/")
|
||||
return value
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of DashboardScheduleDateEndCondition from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of DashboardScheduleDateEndCondition from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"endConditionType": obj.get("endConditionType"),
|
||||
"value": obj.get("value")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,157 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Dashboards API
|
||||
|
||||
Manage ThousandEyes Dashboards.
|
||||
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import json
|
||||
import pprint
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
|
||||
from typing import Any, List, Optional
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_after_end_condition import DashboardScheduleAfterEndCondition
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_date_end_condition import DashboardScheduleDateEndCondition
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_never_end_condition import DashboardScheduleNeverEndCondition
|
||||
from pydantic import StrictStr, Field, model_serializer
|
||||
from typing import Union, List, Set, Optional, Dict
|
||||
from typing_extensions import Literal, Self
|
||||
|
||||
DASHBOARDSCHEDULEENDCONDITION_ONE_OF_SCHEMAS = ["DashboardScheduleAfterEndCondition", "DashboardScheduleDateEndCondition", "DashboardScheduleNeverEndCondition"]
|
||||
|
||||
class DashboardScheduleEndCondition(BaseModel):
|
||||
"""
|
||||
Condition that determines when the recurring schedule ends.
|
||||
"""
|
||||
# data type: DashboardScheduleNeverEndCondition
|
||||
oneof_schema_1_validator: Optional[DashboardScheduleNeverEndCondition] = None
|
||||
# data type: DashboardScheduleAfterEndCondition
|
||||
oneof_schema_2_validator: Optional[DashboardScheduleAfterEndCondition] = None
|
||||
# data type: DashboardScheduleDateEndCondition
|
||||
oneof_schema_3_validator: Optional[DashboardScheduleDateEndCondition] = None
|
||||
actual_instance: Optional[Union[DashboardScheduleAfterEndCondition, DashboardScheduleDateEndCondition, DashboardScheduleNeverEndCondition]] = None
|
||||
one_of_schemas: Set[str] = { "DashboardScheduleAfterEndCondition", "DashboardScheduleDateEndCondition", "DashboardScheduleNeverEndCondition" }
|
||||
|
||||
model_config = ConfigDict(
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
discriminator_value_class_map: Dict[str, str] = {
|
||||
}
|
||||
|
||||
def __init__(self, *args, **kwargs) -> None:
|
||||
if args:
|
||||
if len(args) > 1:
|
||||
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
||||
if kwargs:
|
||||
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
||||
super().__init__(actual_instance=args[0])
|
||||
else:
|
||||
super().__init__(**kwargs)
|
||||
|
||||
@field_validator('actual_instance')
|
||||
def actual_instance_must_validate_oneof(cls, v):
|
||||
instance = DashboardScheduleEndCondition.model_construct()
|
||||
error_messages = []
|
||||
match = 0
|
||||
# validate data type: DashboardScheduleNeverEndCondition
|
||||
if not isinstance(v, DashboardScheduleNeverEndCondition):
|
||||
error_messages.append(f"Error! Input type `{type(v)}` is not `DashboardScheduleNeverEndCondition`")
|
||||
else:
|
||||
match += 1
|
||||
# validate data type: DashboardScheduleAfterEndCondition
|
||||
if not isinstance(v, DashboardScheduleAfterEndCondition):
|
||||
error_messages.append(f"Error! Input type `{type(v)}` is not `DashboardScheduleAfterEndCondition`")
|
||||
else:
|
||||
match += 1
|
||||
# validate data type: DashboardScheduleDateEndCondition
|
||||
if not isinstance(v, DashboardScheduleDateEndCondition):
|
||||
error_messages.append(f"Error! Input type `{type(v)}` is not `DashboardScheduleDateEndCondition`")
|
||||
else:
|
||||
match += 1
|
||||
if match > 1:
|
||||
# more than 1 match
|
||||
raise ValueError("Multiple matches found when setting `actual_instance` in DashboardScheduleEndCondition with oneOf schemas: DashboardScheduleAfterEndCondition, DashboardScheduleDateEndCondition, DashboardScheduleNeverEndCondition. Details: " + ", ".join(error_messages))
|
||||
elif match == 0:
|
||||
# no match
|
||||
raise ValueError("No match found when setting `actual_instance` in DashboardScheduleEndCondition with oneOf schemas: DashboardScheduleAfterEndCondition, DashboardScheduleDateEndCondition, DashboardScheduleNeverEndCondition. Details: " + ", ".join(error_messages))
|
||||
else:
|
||||
return v
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
||||
return cls.from_json(json.dumps(obj))
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Self:
|
||||
"""Returns the object represented by the json string"""
|
||||
instance = cls.model_construct()
|
||||
error_messages = []
|
||||
match = 0
|
||||
|
||||
# deserialize data into DashboardScheduleNeverEndCondition
|
||||
try:
|
||||
instance.actual_instance = DashboardScheduleNeverEndCondition.from_json(json_str)
|
||||
match += 1
|
||||
except (ValidationError, ValueError) as e:
|
||||
error_messages.append(str(e))
|
||||
# deserialize data into DashboardScheduleAfterEndCondition
|
||||
try:
|
||||
instance.actual_instance = DashboardScheduleAfterEndCondition.from_json(json_str)
|
||||
match += 1
|
||||
except (ValidationError, ValueError) as e:
|
||||
error_messages.append(str(e))
|
||||
# deserialize data into DashboardScheduleDateEndCondition
|
||||
try:
|
||||
instance.actual_instance = DashboardScheduleDateEndCondition.from_json(json_str)
|
||||
match += 1
|
||||
except (ValidationError, ValueError) as e:
|
||||
error_messages.append(str(e))
|
||||
|
||||
if match > 1:
|
||||
# more than 1 match
|
||||
raise ValueError("Multiple matches found when deserializing the JSON string into DashboardScheduleEndCondition with oneOf schemas: DashboardScheduleAfterEndCondition, DashboardScheduleDateEndCondition, DashboardScheduleNeverEndCondition. Details: " + ", ".join(error_messages))
|
||||
elif match == 0:
|
||||
# no match
|
||||
raise ValueError("No match found when deserializing the JSON string into DashboardScheduleEndCondition with oneOf schemas: DashboardScheduleAfterEndCondition, DashboardScheduleDateEndCondition, DashboardScheduleNeverEndCondition. Details: " + ", ".join(error_messages))
|
||||
else:
|
||||
return instance
|
||||
|
||||
@model_serializer(when_used="json")
|
||||
def serialize_model(self):
|
||||
return json.loads(self.to_json())
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the actual instance"""
|
||||
if self.actual_instance is None:
|
||||
return "null"
|
||||
|
||||
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
||||
return self.actual_instance.to_json()
|
||||
else:
|
||||
return json.dumps(self.actual_instance)
|
||||
|
||||
def to_dict(self) -> Optional[Union[Dict[str, Any], DashboardScheduleAfterEndCondition, DashboardScheduleDateEndCondition, DashboardScheduleNeverEndCondition]]:
|
||||
"""Returns the dict representation of the actual instance"""
|
||||
if self.actual_instance is None:
|
||||
return None
|
||||
|
||||
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
||||
return self.actual_instance.to_dict()
|
||||
else:
|
||||
# primitive type
|
||||
return self.actual_instance
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the actual instance"""
|
||||
return pprint.pformat(self.model_dump())
|
||||
|
||||
|
||||
@ -0,0 +1,95 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Dashboards API
|
||||
|
||||
Manage ThousandEyes Dashboards.
|
||||
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, field_validator
|
||||
from typing import Any, ClassVar, Dict, List
|
||||
from typing_extensions import Annotated
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class DashboardScheduleNeverEndCondition(BaseModel):
|
||||
"""
|
||||
DashboardScheduleNeverEndCondition
|
||||
""" # noqa: E501
|
||||
end_condition_type: Annotated[str, Field(strict=True)] = Field(description="Identifies a schedule that never ends.", alias="endConditionType")
|
||||
__properties: ClassVar[List[str]] = ["endConditionType"]
|
||||
|
||||
@field_validator('end_condition_type')
|
||||
def end_condition_type_validate_regular_expression(cls, value):
|
||||
"""Validates the regular expression"""
|
||||
if not re.match(r"^NEVER$", value):
|
||||
raise ValueError(r"must validate the regular expression /^NEVER$/")
|
||||
return value
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of DashboardScheduleNeverEndCondition from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of DashboardScheduleNeverEndCondition from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"endConditionType": obj.get("endConditionType")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,99 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Dashboards API
|
||||
|
||||
Manage ThousandEyes Dashboards.
|
||||
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing_extensions import Annotated
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_end_condition import DashboardScheduleEndCondition
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_non_custom_repeat import DashboardScheduleNonCustomRepeat
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class DashboardScheduleNonCustomCronSpec(BaseModel):
|
||||
"""
|
||||
DashboardScheduleNonCustomCronSpec
|
||||
""" # noqa: E501
|
||||
start_time: Annotated[int, Field(strict=True, ge=0)] = Field(description="Schedule start time as a Unix timestamp in seconds.", alias="startTime")
|
||||
zone_code: StrictStr = Field(description="An IANA time zone identifier used to interpret `startTime` and recurrence. For example, `America/Los_Angeles`.", alias="zoneCode")
|
||||
repeat: DashboardScheduleNonCustomRepeat
|
||||
end_repeat: Optional[DashboardScheduleEndCondition] = Field(default=None, alias="endRepeat")
|
||||
__properties: ClassVar[List[str]] = ["startTime", "zoneCode", "repeat", "endRepeat"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of DashboardScheduleNonCustomCronSpec from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of end_repeat
|
||||
if self.end_repeat:
|
||||
_dict['endRepeat'] = self.end_repeat.to_dict()
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of DashboardScheduleNonCustomCronSpec from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"startTime": obj.get("startTime"),
|
||||
"zoneCode": obj.get("zoneCode"),
|
||||
"repeat": obj.get("repeat"),
|
||||
"endRepeat": DashboardScheduleEndCondition.from_dict(obj["endRepeat"]) if obj.get("endRepeat") is not None else None
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,46 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Dashboards API
|
||||
|
||||
Manage ThousandEyes Dashboards.
|
||||
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import json
|
||||
from enum import Enum
|
||||
from typing_extensions import Self
|
||||
|
||||
|
||||
class DashboardScheduleNonCustomRepeat(str, Enum):
|
||||
"""
|
||||
DashboardScheduleNonCustomRepeat
|
||||
"""
|
||||
|
||||
"""
|
||||
allowed enum values
|
||||
"""
|
||||
NONE = 'NONE'
|
||||
EVERY_DAY = 'EVERY_DAY'
|
||||
ALT_EVERY_DAY = 'ALT_EVERY_DAY'
|
||||
EVERY_WEEK = 'EVERY_WEEK'
|
||||
EVERY_MONTH = 'EVERY_MONTH'
|
||||
EVERY_TWO_WEEKS = 'EVERY_TWO_WEEKS'
|
||||
EVERY_THREE_MONTHS = 'EVERY_THREE_MONTHS'
|
||||
UNKNOWN = 'unknown'
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Self:
|
||||
"""Create an instance of DashboardScheduleNonCustomRepeat from a JSON string"""
|
||||
return cls(json.loads(json_str))
|
||||
|
||||
@classmethod
|
||||
def _missing_(cls, value):
|
||||
"""Handle unknown values"""
|
||||
return cls.UNKNOWN
|
||||
|
||||
@ -0,0 +1,41 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Dashboards API
|
||||
|
||||
Manage ThousandEyes Dashboards.
|
||||
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import json
|
||||
from enum import Enum
|
||||
from typing_extensions import Self
|
||||
|
||||
|
||||
class DashboardScheduleNonWeeklyCustomRepeatUnit(str, Enum):
|
||||
"""
|
||||
DashboardScheduleNonWeeklyCustomRepeatUnit
|
||||
"""
|
||||
|
||||
"""
|
||||
allowed enum values
|
||||
"""
|
||||
DAY = 'DAY'
|
||||
MONTH = 'MONTH'
|
||||
UNKNOWN = 'unknown'
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Self:
|
||||
"""Create an instance of DashboardScheduleNonWeeklyCustomRepeatUnit from a JSON string"""
|
||||
return cls(json.loads(json_str))
|
||||
|
||||
@classmethod
|
||||
def _missing_(cls, value):
|
||||
"""Handle unknown values"""
|
||||
return cls.UNKNOWN
|
||||
|
||||
@ -0,0 +1,40 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Dashboards API
|
||||
|
||||
Manage ThousandEyes Dashboards.
|
||||
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import json
|
||||
from enum import Enum
|
||||
from typing_extensions import Self
|
||||
|
||||
|
||||
class DashboardScheduleOneTimeRepeatType(str, Enum):
|
||||
"""
|
||||
DashboardScheduleOneTimeRepeatType
|
||||
"""
|
||||
|
||||
"""
|
||||
allowed enum values
|
||||
"""
|
||||
NONE = 'NONE'
|
||||
UNKNOWN = 'unknown'
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Self:
|
||||
"""Create an instance of DashboardScheduleOneTimeRepeatType from a JSON string"""
|
||||
return cls(json.loads(json_str))
|
||||
|
||||
@classmethod
|
||||
def _missing_(cls, value):
|
||||
"""Handle unknown values"""
|
||||
return cls.UNKNOWN
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Dashboards API
|
||||
|
||||
Manage ThousandEyes Dashboards.
|
||||
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import json
|
||||
from enum import Enum
|
||||
from typing_extensions import Self
|
||||
|
||||
|
||||
class DashboardScheduleRepeat(str, Enum):
|
||||
"""
|
||||
Schedule repetition pattern. Use `NONE` to generate one snapshot at `startTime`.
|
||||
"""
|
||||
|
||||
"""
|
||||
allowed enum values
|
||||
"""
|
||||
NONE = 'NONE'
|
||||
EVERY_DAY = 'EVERY_DAY'
|
||||
ALT_EVERY_DAY = 'ALT_EVERY_DAY'
|
||||
EVERY_WEEK = 'EVERY_WEEK'
|
||||
EVERY_MONTH = 'EVERY_MONTH'
|
||||
EVERY_TWO_WEEKS = 'EVERY_TWO_WEEKS'
|
||||
EVERY_THREE_MONTHS = 'EVERY_THREE_MONTHS'
|
||||
CUSTOM = 'CUSTOM'
|
||||
UNKNOWN = 'unknown'
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Self:
|
||||
"""Create an instance of DashboardScheduleRepeat from a JSON string"""
|
||||
return cls(json.loads(json_str))
|
||||
|
||||
@classmethod
|
||||
def _missing_(cls, value):
|
||||
"""Handle unknown values"""
|
||||
return cls.UNKNOWN
|
||||
|
||||
@ -0,0 +1,118 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Dashboards API
|
||||
|
||||
Manage ThousandEyes Dashboards.
|
||||
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing_extensions import Annotated
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_cron_spec import DashboardScheduleCronSpec
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_data_source import DashboardScheduleDataSource
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_timespan import DashboardScheduleTimespan
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class DashboardScheduleRequest(BaseModel):
|
||||
"""
|
||||
Snapshot schedule configuration for create or update requests.
|
||||
""" # noqa: E501
|
||||
cron_spec: DashboardScheduleCronSpec = Field(alias="cronSpec")
|
||||
data_source: DashboardScheduleDataSource = Field(alias="dataSource")
|
||||
data_timespan: DashboardScheduleTimespan = Field(alias="dataTimespan")
|
||||
flag_enabled: StrictBool = Field(description="When `true`, the schedule is active and snapshots are generated according to `cronSpec`.", alias="flagEnabled")
|
||||
flag_locked: Optional[StrictBool] = Field(default=None, description="When `true`, the schedule configuration is locked and cannot be edited through the web application.", alias="flagLocked")
|
||||
flag_auto_share: Optional[StrictBool] = Field(default=None, description="When `true`, generated snapshots are automatically shared with schedule recipients.", alias="flagAutoShare")
|
||||
flag_is_include_pii_user_data: Optional[StrictBool] = Field(default=None, description="When `true`, generated snapshots include personally identifiable user data when permitted by account policy.", alias="flagIsIncludePiiUserData")
|
||||
flag_attach_pdf_to_email: Optional[StrictBool] = Field(default=None, description="When `true`, a PDF attachment is included in snapshot notification emails.", alias="flagAttachPdfToEmail")
|
||||
recipients: Optional[List[StrictStr]] = Field(default=None, description="Email addresses of active dashboard account users who receive snapshot notifications. Unknown or duplicate addresses are rejected.")
|
||||
expires_after: Optional[Annotated[int, Field(le=157680000, strict=True, ge=86400)]] = Field(default=157680000, description="Snapshot retention period in seconds. Allowed range is 24 hours to 5 years. Defaults to 5 years when omitted.", alias="expiresAfter")
|
||||
__properties: ClassVar[List[str]] = ["cronSpec", "dataSource", "dataTimespan", "flagEnabled", "flagLocked", "flagAutoShare", "flagIsIncludePiiUserData", "flagAttachPdfToEmail", "recipients", "expiresAfter"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of DashboardScheduleRequest from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of cron_spec
|
||||
if self.cron_spec:
|
||||
_dict['cronSpec'] = self.cron_spec.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of data_source
|
||||
if self.data_source:
|
||||
_dict['dataSource'] = self.data_source.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of data_timespan
|
||||
if self.data_timespan:
|
||||
_dict['dataTimespan'] = self.data_timespan.to_dict()
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of DashboardScheduleRequest from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"cronSpec": DashboardScheduleCronSpec.from_dict(obj["cronSpec"]) if obj.get("cronSpec") is not None else None,
|
||||
"dataSource": DashboardScheduleDataSource.from_dict(obj["dataSource"]) if obj.get("dataSource") is not None else None,
|
||||
"dataTimespan": DashboardScheduleTimespan.from_dict(obj["dataTimespan"]) if obj.get("dataTimespan") is not None else None,
|
||||
"flagEnabled": obj.get("flagEnabled"),
|
||||
"flagLocked": obj.get("flagLocked"),
|
||||
"flagAutoShare": obj.get("flagAutoShare"),
|
||||
"flagIsIncludePiiUserData": obj.get("flagIsIncludePiiUserData"),
|
||||
"flagAttachPdfToEmail": obj.get("flagAttachPdfToEmail"),
|
||||
"recipients": obj.get("recipients"),
|
||||
"expiresAfter": obj.get("expiresAfter") if obj.get("expiresAfter") is not None else 157680000
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,91 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Dashboards API
|
||||
|
||||
Manage ThousandEyes Dashboards.
|
||||
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
from typing import Any, ClassVar, Dict, List
|
||||
from typing_extensions import Annotated
|
||||
from thousandeyes_sdk.dashboards.models.dashboard_schedule_timespan_period import DashboardScheduleTimespanPeriod
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class DashboardScheduleTimespan(BaseModel):
|
||||
"""
|
||||
Amount of historical data to include in each scheduled snapshot.
|
||||
""" # noqa: E501
|
||||
n: Annotated[int, Field(strict=True, ge=1)] = Field(description="Number of time units in the snapshot data range.")
|
||||
period: DashboardScheduleTimespanPeriod
|
||||
__properties: ClassVar[List[str]] = ["n", "period"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of DashboardScheduleTimespan from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of DashboardScheduleTimespan from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"n": obj.get("n"),
|
||||
"period": obj.get("period")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,42 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Dashboards API
|
||||
|
||||
Manage ThousandEyes Dashboards.
|
||||
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import json
|
||||
from enum import Enum
|
||||
from typing_extensions import Self
|
||||
|
||||
|
||||
class DashboardScheduleTimespanPeriod(str, Enum):
|
||||
"""
|
||||
DashboardScheduleTimespanPeriod
|
||||
"""
|
||||
|
||||
"""
|
||||
allowed enum values
|
||||
"""
|
||||
DAY = 'DAY'
|
||||
WEEK = 'WEEK'
|
||||
MONTH = 'MONTH'
|
||||
UNKNOWN = 'unknown'
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Self:
|
||||
"""Create an instance of DashboardScheduleTimespanPeriod from a JSON string"""
|
||||
return cls(json.loads(json_str))
|
||||
|
||||
@classmethod
|
||||
def _missing_(cls, value):
|
||||
"""Handle unknown values"""
|
||||
return cls.UNKNOWN
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -325,6 +325,31 @@ class TestDashboardSnapshotsApi(unittest.TestCase):
|
||||
} ]
|
||||
}
|
||||
},
|
||||
"schedule" : {
|
||||
"expiresAfter" : 157680000,
|
||||
"cronSpec" : {
|
||||
"repeat" : "EVERY_WEEK",
|
||||
"endRepeat" : {
|
||||
"endConditionType" : "NEVER"
|
||||
},
|
||||
"startTime" : 1753200000,
|
||||
"zoneCode" : "America/Los_Angeles"
|
||||
},
|
||||
"flagLocked" : false,
|
||||
"recipients" : [ "alice@example.com", "bob@example.com" ],
|
||||
"flagAutoShare" : false,
|
||||
"dataTimespan" : {
|
||||
"period" : "WEEK",
|
||||
"n" : 1
|
||||
},
|
||||
"flagAttachPdfToEmail" : true,
|
||||
"dataSource" : {
|
||||
"name" : "Weekly network report"
|
||||
},
|
||||
"flagIsIncludePiiUserData" : false,
|
||||
"nextDate" : "2026-10-01T07:00:00Z",
|
||||
"flagEnabled" : true
|
||||
},
|
||||
"accountId" : 1234,
|
||||
"apiLink" : [ {
|
||||
"key" : ""
|
||||
@ -1076,6 +1101,31 @@ class TestDashboardSnapshotsApi(unittest.TestCase):
|
||||
} ]
|
||||
}
|
||||
},
|
||||
"schedule" : {
|
||||
"expiresAfter" : 157680000,
|
||||
"cronSpec" : {
|
||||
"repeat" : "EVERY_WEEK",
|
||||
"endRepeat" : {
|
||||
"endConditionType" : "NEVER"
|
||||
},
|
||||
"startTime" : 1753200000,
|
||||
"zoneCode" : "America/Los_Angeles"
|
||||
},
|
||||
"flagLocked" : false,
|
||||
"recipients" : [ "alice@example.com", "bob@example.com" ],
|
||||
"flagAutoShare" : false,
|
||||
"dataTimespan" : {
|
||||
"period" : "WEEK",
|
||||
"n" : 1
|
||||
},
|
||||
"flagAttachPdfToEmail" : true,
|
||||
"dataSource" : {
|
||||
"name" : "Weekly network report"
|
||||
},
|
||||
"flagIsIncludePiiUserData" : false,
|
||||
"nextDate" : "2026-10-01T07:00:00Z",
|
||||
"flagEnabled" : true
|
||||
},
|
||||
"accountId" : 1234,
|
||||
"apiLink" : [ {
|
||||
"key" : ""
|
||||
@ -1341,6 +1391,31 @@ class TestDashboardSnapshotsApi(unittest.TestCase):
|
||||
} ]
|
||||
}
|
||||
},
|
||||
"schedule" : {
|
||||
"expiresAfter" : 157680000,
|
||||
"cronSpec" : {
|
||||
"repeat" : "EVERY_WEEK",
|
||||
"endRepeat" : {
|
||||
"endConditionType" : "NEVER"
|
||||
},
|
||||
"startTime" : 1753200000,
|
||||
"zoneCode" : "America/Los_Angeles"
|
||||
},
|
||||
"flagLocked" : false,
|
||||
"recipients" : [ "alice@example.com", "bob@example.com" ],
|
||||
"flagAutoShare" : false,
|
||||
"dataTimespan" : {
|
||||
"period" : "WEEK",
|
||||
"n" : 1
|
||||
},
|
||||
"flagAttachPdfToEmail" : true,
|
||||
"dataSource" : {
|
||||
"name" : "Weekly network report"
|
||||
},
|
||||
"flagIsIncludePiiUserData" : false,
|
||||
"nextDate" : "2026-10-01T07:00:00Z",
|
||||
"flagEnabled" : true
|
||||
},
|
||||
"accountId" : 1234,
|
||||
"apiLink" : [ {
|
||||
"key" : ""
|
||||
|
||||
@ -735,6 +735,31 @@ class TestDashboardSnapshotsApiIntegration(IntegrationTestBase):
|
||||
} ]
|
||||
}
|
||||
},
|
||||
"schedule" : {
|
||||
"expiresAfter" : 157680000,
|
||||
"cronSpec" : {
|
||||
"repeat" : "EVERY_WEEK",
|
||||
"endRepeat" : {
|
||||
"endConditionType" : "NEVER"
|
||||
},
|
||||
"startTime" : 1753200000,
|
||||
"zoneCode" : "America/Los_Angeles"
|
||||
},
|
||||
"flagLocked" : false,
|
||||
"recipients" : [ "alice@example.com", "bob@example.com" ],
|
||||
"flagAutoShare" : false,
|
||||
"dataTimespan" : {
|
||||
"period" : "WEEK",
|
||||
"n" : 1
|
||||
},
|
||||
"flagAttachPdfToEmail" : true,
|
||||
"dataSource" : {
|
||||
"name" : "Weekly network report"
|
||||
},
|
||||
"flagIsIncludePiiUserData" : false,
|
||||
"nextDate" : "2026-10-01T07:00:00Z",
|
||||
"flagEnabled" : true
|
||||
},
|
||||
"accountId" : 1234,
|
||||
"apiLink" : [ {
|
||||
"key" : ""
|
||||
@ -1878,6 +1903,31 @@ class TestDashboardSnapshotsApiIntegration(IntegrationTestBase):
|
||||
} ]
|
||||
}
|
||||
},
|
||||
"schedule" : {
|
||||
"expiresAfter" : 157680000,
|
||||
"cronSpec" : {
|
||||
"repeat" : "EVERY_WEEK",
|
||||
"endRepeat" : {
|
||||
"endConditionType" : "NEVER"
|
||||
},
|
||||
"startTime" : 1753200000,
|
||||
"zoneCode" : "America/Los_Angeles"
|
||||
},
|
||||
"flagLocked" : false,
|
||||
"recipients" : [ "alice@example.com", "bob@example.com" ],
|
||||
"flagAutoShare" : false,
|
||||
"dataTimespan" : {
|
||||
"period" : "WEEK",
|
||||
"n" : 1
|
||||
},
|
||||
"flagAttachPdfToEmail" : true,
|
||||
"dataSource" : {
|
||||
"name" : "Weekly network report"
|
||||
},
|
||||
"flagIsIncludePiiUserData" : false,
|
||||
"nextDate" : "2026-10-01T07:00:00Z",
|
||||
"flagEnabled" : true
|
||||
},
|
||||
"accountId" : 1234,
|
||||
"apiLink" : [ {
|
||||
"key" : ""
|
||||
@ -2143,6 +2193,31 @@ class TestDashboardSnapshotsApiIntegration(IntegrationTestBase):
|
||||
} ]
|
||||
}
|
||||
},
|
||||
"schedule" : {
|
||||
"expiresAfter" : 157680000,
|
||||
"cronSpec" : {
|
||||
"repeat" : "EVERY_WEEK",
|
||||
"endRepeat" : {
|
||||
"endConditionType" : "NEVER"
|
||||
},
|
||||
"startTime" : 1753200000,
|
||||
"zoneCode" : "America/Los_Angeles"
|
||||
},
|
||||
"flagLocked" : false,
|
||||
"recipients" : [ "alice@example.com", "bob@example.com" ],
|
||||
"flagAutoShare" : false,
|
||||
"dataTimespan" : {
|
||||
"period" : "WEEK",
|
||||
"n" : 1
|
||||
},
|
||||
"flagAttachPdfToEmail" : true,
|
||||
"dataSource" : {
|
||||
"name" : "Weekly network report"
|
||||
},
|
||||
"flagIsIncludePiiUserData" : false,
|
||||
"nextDate" : "2026-10-01T07:00:00Z",
|
||||
"flagEnabled" : true
|
||||
},
|
||||
"accountId" : 1234,
|
||||
"apiLink" : [ {
|
||||
"key" : ""
|
||||
|
||||
@ -28,6 +28,215 @@ class TestDashboardsApi(unittest.TestCase):
|
||||
def tearDown(self) -> None:
|
||||
pass
|
||||
|
||||
def test_clone_dashboard_models_validation(self) -> None:
|
||||
"""Test case for clone_dashboard request and response models"""
|
||||
request_body_json = """
|
||||
{
|
||||
"isSharedWithAllAccountGroups" : false,
|
||||
"tagIds" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "5aeab5d5-0d34-4d44-a7ac-fb440185295c" ],
|
||||
"isDefaultForAccount" : false,
|
||||
"description" : "Copy of the HTTP Server Widgets dashboard",
|
||||
"isDefaultForUser" : false,
|
||||
"isPrivate" : true,
|
||||
"title" : "HTTP Server Widgets Copy",
|
||||
"defaultTimespan" : {
|
||||
"duration" : 7200,
|
||||
"timespanDuration" : 7200,
|
||||
"start" : "2023-05-16T10:14:28Z",
|
||||
"end" : "2023-05-16T11:14:28Z",
|
||||
"timespanStart" : "2023-05-16 10:14:28",
|
||||
"timespanEnd" : "2023-05-16 11:14:28"
|
||||
},
|
||||
"layout" : {
|
||||
"layoutId" : "grid-layout-1",
|
||||
"type" : "grid",
|
||||
"details" : {
|
||||
"widgetPositioning" : [ {
|
||||
"x" : 0,
|
||||
"y" : 0,
|
||||
"w" : 9,
|
||||
"h" : 5,
|
||||
"id" : "widgetId-71lbb"
|
||||
} ]
|
||||
}
|
||||
},
|
||||
"globalFilterId" : "65babd9bb90bf55b17c96c8d",
|
||||
"refreshRate" : "5m",
|
||||
"sharedAccountIds" : [ "1234", "5678" ],
|
||||
"isGlobalOverride" : false
|
||||
}
|
||||
"""
|
||||
|
||||
request_loaded_json = json.loads(request_body_json)
|
||||
request_from_json = thousandeyes_sdk.dashboards.models.CloneDashboardRequest.from_json(request_body_json)
|
||||
assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)
|
||||
|
||||
response_body_json = """
|
||||
{
|
||||
"isMigratedReport" : false,
|
||||
"_links" : {
|
||||
"snapshots" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
},
|
||||
"self" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
}
|
||||
},
|
||||
"isDefaultForAccount" : false,
|
||||
"isDefaultForUser" : true,
|
||||
"description" : "HTTP Server Widgets",
|
||||
"isPrivate" : true,
|
||||
"title" : "HTTP Server Widgets",
|
||||
"isBuiltIn" : true,
|
||||
"widgets" : [ {
|
||||
"embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f",
|
||||
"shouldExcludeAlertSuppressionWindows" : true,
|
||||
"_links" : {
|
||||
"self" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
}
|
||||
},
|
||||
"visualMode" : "Full",
|
||||
"filters" : {
|
||||
"TEST" : [ 5187, 5227 ],
|
||||
"ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ]
|
||||
},
|
||||
"title" : "Widget Title",
|
||||
"type" : "Agent Status",
|
||||
"metricGroup" : "BGP",
|
||||
"measure" : {
|
||||
"percentileValue" : 95,
|
||||
"type" : "MEAN"
|
||||
},
|
||||
"apiLink" : "apiLink",
|
||||
"metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT",
|
||||
"isEmbedded" : true,
|
||||
"id" : "1234",
|
||||
"fixedTimespan" : {
|
||||
"unit" : "Days",
|
||||
"value" : 10
|
||||
},
|
||||
"dataSource" : "ENDPOINT_AGENTS",
|
||||
"direction" : "FROM_TARGET"
|
||||
}, {
|
||||
"embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f",
|
||||
"shouldExcludeAlertSuppressionWindows" : true,
|
||||
"_links" : {
|
||||
"self" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
}
|
||||
},
|
||||
"visualMode" : "Full",
|
||||
"filters" : {
|
||||
"TEST" : [ 5187, 5227 ],
|
||||
"ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ]
|
||||
},
|
||||
"title" : "Widget Title",
|
||||
"type" : "Agent Status",
|
||||
"metricGroup" : "BGP",
|
||||
"measure" : {
|
||||
"percentileValue" : 95,
|
||||
"type" : "MEAN"
|
||||
},
|
||||
"apiLink" : "apiLink",
|
||||
"metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT",
|
||||
"isEmbedded" : true,
|
||||
"id" : "1234",
|
||||
"fixedTimespan" : {
|
||||
"unit" : "Days",
|
||||
"value" : 10
|
||||
},
|
||||
"dataSource" : "ENDPOINT_AGENTS",
|
||||
"direction" : "FROM_TARGET"
|
||||
} ],
|
||||
"defaultTimespan" : {
|
||||
"duration" : 7200,
|
||||
"timespanDuration" : 7200,
|
||||
"start" : "2023-05-16T10:14:28Z",
|
||||
"end" : "2023-05-16T11:14:28Z",
|
||||
"timespanStart" : "2023-05-16 10:14:28",
|
||||
"timespanEnd" : "2023-05-16 11:14:28"
|
||||
},
|
||||
"layout" : {
|
||||
"layoutId" : "grid-layout-1",
|
||||
"type" : "grid",
|
||||
"details" : {
|
||||
"widgetPositioning" : [ {
|
||||
"x" : 0,
|
||||
"y" : 0,
|
||||
"w" : 9,
|
||||
"h" : 5,
|
||||
"id" : "widgetId-71lbb"
|
||||
} ]
|
||||
}
|
||||
},
|
||||
"globalFilterId" : "65babd9bb90bf55b17c96c8d",
|
||||
"schedule" : {
|
||||
"expiresAfter" : 157680000,
|
||||
"cronSpec" : {
|
||||
"repeat" : "EVERY_WEEK",
|
||||
"endRepeat" : {
|
||||
"endConditionType" : "NEVER"
|
||||
},
|
||||
"startTime" : 1753200000,
|
||||
"zoneCode" : "America/Los_Angeles"
|
||||
},
|
||||
"flagLocked" : false,
|
||||
"recipients" : [ "alice@example.com", "bob@example.com" ],
|
||||
"flagAutoShare" : false,
|
||||
"dataTimespan" : {
|
||||
"period" : "WEEK",
|
||||
"n" : 1
|
||||
},
|
||||
"flagAttachPdfToEmail" : true,
|
||||
"dataSource" : {
|
||||
"name" : "Weekly network report"
|
||||
},
|
||||
"flagIsIncludePiiUserData" : false,
|
||||
"nextDate" : "2026-10-01T07:00:00Z",
|
||||
"flagEnabled" : true
|
||||
},
|
||||
"dashboardId" : "5e1f7a99143ae6004fdc3bb4",
|
||||
"createdBy" : "1",
|
||||
"refreshRate" : "off",
|
||||
"modifiedDate" : "2023-05-16T10:14:28Z",
|
||||
"modifiedBy" : "1",
|
||||
"isGlobalOverride" : true,
|
||||
"aid" : "1234"
|
||||
}"""
|
||||
|
||||
response_loaded_json = json.loads(response_body_json)
|
||||
response_from_json = thousandeyes_sdk.dashboards.models.Dashboard.from_json(response_body_json)
|
||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
||||
|
||||
def test_create_dashboard_models_validation(self) -> None:
|
||||
"""Test case for create_dashboard request and response models"""
|
||||
request_body_json = """
|
||||
@ -158,6 +367,31 @@ class TestDashboardsApi(unittest.TestCase):
|
||||
}
|
||||
},
|
||||
"globalFilterId" : "65babd9bb90bf55b17c96c8d",
|
||||
"schedule" : {
|
||||
"expiresAfter" : 157680000,
|
||||
"cronSpec" : {
|
||||
"repeat" : "EVERY_WEEK",
|
||||
"endRepeat" : {
|
||||
"endConditionType" : "NEVER"
|
||||
},
|
||||
"startTime" : 1753200000,
|
||||
"zoneCode" : "America/Los_Angeles"
|
||||
},
|
||||
"flagLocked" : false,
|
||||
"recipients" : [ "alice@example.com", "bob@example.com" ],
|
||||
"flagAutoShare" : false,
|
||||
"dataTimespan" : {
|
||||
"period" : "WEEK",
|
||||
"n" : 1
|
||||
},
|
||||
"flagAttachPdfToEmail" : true,
|
||||
"dataSource" : {
|
||||
"name" : "Weekly network report"
|
||||
},
|
||||
"flagIsIncludePiiUserData" : false,
|
||||
"nextDate" : "2026-10-01T07:00:00Z",
|
||||
"flagEnabled" : true
|
||||
},
|
||||
"dashboardId" : "5e1f7a99143ae6004fdc3bb4",
|
||||
"createdBy" : "1",
|
||||
"refreshRate" : "off",
|
||||
@ -300,6 +534,31 @@ class TestDashboardsApi(unittest.TestCase):
|
||||
}
|
||||
},
|
||||
"globalFilterId" : "65babd9bb90bf55b17c96c8d",
|
||||
"schedule" : {
|
||||
"expiresAfter" : 157680000,
|
||||
"cronSpec" : {
|
||||
"repeat" : "EVERY_WEEK",
|
||||
"endRepeat" : {
|
||||
"endConditionType" : "NEVER"
|
||||
},
|
||||
"startTime" : 1753200000,
|
||||
"zoneCode" : "America/Los_Angeles"
|
||||
},
|
||||
"flagLocked" : false,
|
||||
"recipients" : [ "alice@example.com", "bob@example.com" ],
|
||||
"flagAutoShare" : false,
|
||||
"dataTimespan" : {
|
||||
"period" : "WEEK",
|
||||
"n" : 1
|
||||
},
|
||||
"flagAttachPdfToEmail" : true,
|
||||
"dataSource" : {
|
||||
"name" : "Weekly network report"
|
||||
},
|
||||
"flagIsIncludePiiUserData" : false,
|
||||
"nextDate" : "2026-10-01T07:00:00Z",
|
||||
"flagEnabled" : true
|
||||
},
|
||||
"dashboardId" : "5e1f7a99143ae6004fdc3bb4",
|
||||
"createdBy" : "1",
|
||||
"refreshRate" : "off",
|
||||
@ -317,6 +576,10 @@ class TestDashboardsApi(unittest.TestCase):
|
||||
"""Test case for delete_dashboard request and response models"""
|
||||
|
||||
|
||||
def test_delete_dashboard_schedule_models_validation(self) -> None:
|
||||
"""Test case for delete_dashboard_schedule request and response models"""
|
||||
|
||||
|
||||
def test_get_dashboard_models_validation(self) -> None:
|
||||
"""Test case for get_dashboard request and response models"""
|
||||
|
||||
@ -453,6 +716,31 @@ class TestDashboardsApi(unittest.TestCase):
|
||||
} ]
|
||||
}
|
||||
},
|
||||
"schedule" : {
|
||||
"expiresAfter" : 157680000,
|
||||
"cronSpec" : {
|
||||
"repeat" : "EVERY_WEEK",
|
||||
"endRepeat" : {
|
||||
"endConditionType" : "NEVER"
|
||||
},
|
||||
"startTime" : 1753200000,
|
||||
"zoneCode" : "America/Los_Angeles"
|
||||
},
|
||||
"flagLocked" : false,
|
||||
"recipients" : [ "alice@example.com", "bob@example.com" ],
|
||||
"flagAutoShare" : false,
|
||||
"dataTimespan" : {
|
||||
"period" : "WEEK",
|
||||
"n" : 1
|
||||
},
|
||||
"flagAttachPdfToEmail" : true,
|
||||
"dataSource" : {
|
||||
"name" : "Weekly network report"
|
||||
},
|
||||
"flagIsIncludePiiUserData" : false,
|
||||
"nextDate" : "2026-10-01T07:00:00Z",
|
||||
"flagEnabled" : true
|
||||
},
|
||||
"accountId" : 1234,
|
||||
"apiLink" : [ {
|
||||
"key" : ""
|
||||
@ -1068,6 +1356,31 @@ class TestDashboardsApi(unittest.TestCase):
|
||||
} ]
|
||||
}
|
||||
},
|
||||
"schedule" : {
|
||||
"expiresAfter" : 157680000,
|
||||
"cronSpec" : {
|
||||
"repeat" : "EVERY_WEEK",
|
||||
"endRepeat" : {
|
||||
"endConditionType" : "NEVER"
|
||||
},
|
||||
"startTime" : 1753200000,
|
||||
"zoneCode" : "America/Los_Angeles"
|
||||
},
|
||||
"flagLocked" : false,
|
||||
"recipients" : [ "alice@example.com", "bob@example.com" ],
|
||||
"flagAutoShare" : false,
|
||||
"dataTimespan" : {
|
||||
"period" : "WEEK",
|
||||
"n" : 1
|
||||
},
|
||||
"flagAttachPdfToEmail" : true,
|
||||
"dataSource" : {
|
||||
"name" : "Weekly network report"
|
||||
},
|
||||
"flagIsIncludePiiUserData" : false,
|
||||
"nextDate" : "2026-10-01T07:00:00Z",
|
||||
"flagEnabled" : true
|
||||
},
|
||||
"accountId" : 1234,
|
||||
"apiLink" : [ {
|
||||
"key" : ""
|
||||
@ -1213,6 +1526,31 @@ class TestDashboardsApi(unittest.TestCase):
|
||||
} ]
|
||||
}
|
||||
},
|
||||
"schedule" : {
|
||||
"expiresAfter" : 157680000,
|
||||
"cronSpec" : {
|
||||
"repeat" : "EVERY_WEEK",
|
||||
"endRepeat" : {
|
||||
"endConditionType" : "NEVER"
|
||||
},
|
||||
"startTime" : 1753200000,
|
||||
"zoneCode" : "America/Los_Angeles"
|
||||
},
|
||||
"flagLocked" : false,
|
||||
"recipients" : [ "alice@example.com", "bob@example.com" ],
|
||||
"flagAutoShare" : false,
|
||||
"dataTimespan" : {
|
||||
"period" : "WEEK",
|
||||
"n" : 1
|
||||
},
|
||||
"flagAttachPdfToEmail" : true,
|
||||
"dataSource" : {
|
||||
"name" : "Weekly network report"
|
||||
},
|
||||
"flagIsIncludePiiUserData" : false,
|
||||
"nextDate" : "2026-10-01T07:00:00Z",
|
||||
"flagEnabled" : true
|
||||
},
|
||||
"accountId" : 1234,
|
||||
"apiLink" : [ {
|
||||
"key" : ""
|
||||
@ -1485,6 +1823,31 @@ class TestDashboardsApi(unittest.TestCase):
|
||||
}
|
||||
},
|
||||
"globalFilterId" : "65babd9bb90bf55b17c96c8d",
|
||||
"schedule" : {
|
||||
"expiresAfter" : 157680000,
|
||||
"cronSpec" : {
|
||||
"repeat" : "EVERY_WEEK",
|
||||
"endRepeat" : {
|
||||
"endConditionType" : "NEVER"
|
||||
},
|
||||
"startTime" : 1753200000,
|
||||
"zoneCode" : "America/Los_Angeles"
|
||||
},
|
||||
"flagLocked" : false,
|
||||
"recipients" : [ "alice@example.com", "bob@example.com" ],
|
||||
"flagAutoShare" : false,
|
||||
"dataTimespan" : {
|
||||
"period" : "WEEK",
|
||||
"n" : 1
|
||||
},
|
||||
"flagAttachPdfToEmail" : true,
|
||||
"dataSource" : {
|
||||
"name" : "Weekly network report"
|
||||
},
|
||||
"flagIsIncludePiiUserData" : false,
|
||||
"nextDate" : "2026-10-01T07:00:00Z",
|
||||
"flagEnabled" : true
|
||||
},
|
||||
"dashboardId" : "5e1f7a99143ae6004fdc3bb4",
|
||||
"createdBy" : "1",
|
||||
"refreshRate" : "off",
|
||||
@ -1627,6 +1990,31 @@ class TestDashboardsApi(unittest.TestCase):
|
||||
}
|
||||
},
|
||||
"globalFilterId" : "65babd9bb90bf55b17c96c8d",
|
||||
"schedule" : {
|
||||
"expiresAfter" : 157680000,
|
||||
"cronSpec" : {
|
||||
"repeat" : "EVERY_WEEK",
|
||||
"endRepeat" : {
|
||||
"endConditionType" : "NEVER"
|
||||
},
|
||||
"startTime" : 1753200000,
|
||||
"zoneCode" : "America/Los_Angeles"
|
||||
},
|
||||
"flagLocked" : false,
|
||||
"recipients" : [ "alice@example.com", "bob@example.com" ],
|
||||
"flagAutoShare" : false,
|
||||
"dataTimespan" : {
|
||||
"period" : "WEEK",
|
||||
"n" : 1
|
||||
},
|
||||
"flagAttachPdfToEmail" : true,
|
||||
"dataSource" : {
|
||||
"name" : "Weekly network report"
|
||||
},
|
||||
"flagIsIncludePiiUserData" : false,
|
||||
"nextDate" : "2026-10-01T07:00:00Z",
|
||||
"flagEnabled" : true
|
||||
},
|
||||
"dashboardId" : "5e1f7a99143ae6004fdc3bb4",
|
||||
"createdBy" : "1",
|
||||
"refreshRate" : "off",
|
||||
@ -1640,6 +2028,216 @@ class TestDashboardsApi(unittest.TestCase):
|
||||
response_from_json = thousandeyes_sdk.dashboards.models.Dashboard.from_json(response_body_json)
|
||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
||||
|
||||
def test_update_dashboard_schedule_models_validation(self) -> None:
|
||||
"""Test case for update_dashboard_schedule request and response models"""
|
||||
request_body_json = """
|
||||
{
|
||||
"expiresAfter" : 157680000,
|
||||
"cronSpec" : {
|
||||
"repeat" : "EVERY_WEEK",
|
||||
"endRepeat" : {
|
||||
"endConditionType" : "NEVER"
|
||||
},
|
||||
"startTime" : 1753200000,
|
||||
"zoneCode" : "America/Los_Angeles"
|
||||
},
|
||||
"flagLocked" : false,
|
||||
"recipients" : [ "alice@example.com", "bob@example.com" ],
|
||||
"flagAutoShare" : false,
|
||||
"dataTimespan" : {
|
||||
"period" : "WEEK",
|
||||
"n" : 1
|
||||
},
|
||||
"flagAttachPdfToEmail" : true,
|
||||
"dataSource" : {
|
||||
"name" : "Weekly network report"
|
||||
},
|
||||
"flagIsIncludePiiUserData" : false,
|
||||
"flagEnabled" : true
|
||||
}
|
||||
"""
|
||||
|
||||
request_loaded_json = json.loads(request_body_json)
|
||||
request_from_json = thousandeyes_sdk.dashboards.models.DashboardScheduleRequest.from_json(request_body_json)
|
||||
assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)
|
||||
|
||||
response_body_json = """
|
||||
{
|
||||
"isMigratedReport" : false,
|
||||
"dashboardCreatedBy" : "1",
|
||||
"_links" : {
|
||||
"snapshots" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
},
|
||||
"self" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
}
|
||||
},
|
||||
"isDefaultForUser" : true,
|
||||
"description" : "HTTP Server Widgets",
|
||||
"isPrivate" : true,
|
||||
"title" : "HTTP Server Widgets",
|
||||
"isBuiltIn" : true,
|
||||
"widgets" : [ {
|
||||
"embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f",
|
||||
"shouldExcludeAlertSuppressionWindows" : true,
|
||||
"_links" : {
|
||||
"self" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
}
|
||||
},
|
||||
"visualMode" : "Full",
|
||||
"filters" : {
|
||||
"TEST" : [ 5187, 5227 ],
|
||||
"ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ]
|
||||
},
|
||||
"title" : "Widget Title",
|
||||
"type" : "Agent Status",
|
||||
"metricGroup" : "BGP",
|
||||
"measure" : {
|
||||
"percentileValue" : 95,
|
||||
"type" : "MEAN"
|
||||
},
|
||||
"apiLink" : "apiLink",
|
||||
"metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT",
|
||||
"isEmbedded" : true,
|
||||
"id" : "1234",
|
||||
"fixedTimespan" : {
|
||||
"unit" : "Days",
|
||||
"value" : 10
|
||||
},
|
||||
"dataSource" : "ENDPOINT_AGENTS",
|
||||
"direction" : "FROM_TARGET"
|
||||
}, {
|
||||
"embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f",
|
||||
"shouldExcludeAlertSuppressionWindows" : true,
|
||||
"_links" : {
|
||||
"self" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
}
|
||||
},
|
||||
"visualMode" : "Full",
|
||||
"filters" : {
|
||||
"TEST" : [ 5187, 5227 ],
|
||||
"ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ]
|
||||
},
|
||||
"title" : "Widget Title",
|
||||
"type" : "Agent Status",
|
||||
"metricGroup" : "BGP",
|
||||
"measure" : {
|
||||
"percentileValue" : 95,
|
||||
"type" : "MEAN"
|
||||
},
|
||||
"apiLink" : "apiLink",
|
||||
"metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT",
|
||||
"isEmbedded" : true,
|
||||
"id" : "1234",
|
||||
"fixedTimespan" : {
|
||||
"unit" : "Days",
|
||||
"value" : 10
|
||||
},
|
||||
"dataSource" : "ENDPOINT_AGENTS",
|
||||
"direction" : "FROM_TARGET"
|
||||
} ],
|
||||
"globalFilterId" : "65babd9bb90bf55b17c96c8d",
|
||||
"refreshRate" : "off",
|
||||
"modifiedBy" : 1,
|
||||
"dashboardModifiedBy" : "1",
|
||||
"migratedReport" : false,
|
||||
"isDefaultForAccount" : false,
|
||||
"defaultTimespan" : {
|
||||
"duration" : 7200,
|
||||
"timespanDuration" : 7200,
|
||||
"start" : "2023-05-16T10:14:28Z",
|
||||
"end" : "2023-05-16T11:14:28Z",
|
||||
"timespanStart" : "2023-05-16 10:14:28",
|
||||
"timespanEnd" : "2023-05-16 11:14:28"
|
||||
},
|
||||
"layout" : {
|
||||
"layoutId" : "grid-layout-1",
|
||||
"type" : "grid",
|
||||
"details" : {
|
||||
"widgetPositioning" : [ {
|
||||
"x" : 0,
|
||||
"y" : 0,
|
||||
"w" : 9,
|
||||
"h" : 5,
|
||||
"id" : "widgetId-71lbb"
|
||||
} ]
|
||||
}
|
||||
},
|
||||
"schedule" : {
|
||||
"expiresAfter" : 157680000,
|
||||
"cronSpec" : {
|
||||
"repeat" : "EVERY_WEEK",
|
||||
"endRepeat" : {
|
||||
"endConditionType" : "NEVER"
|
||||
},
|
||||
"startTime" : 1753200000,
|
||||
"zoneCode" : "America/Los_Angeles"
|
||||
},
|
||||
"flagLocked" : false,
|
||||
"recipients" : [ "alice@example.com", "bob@example.com" ],
|
||||
"flagAutoShare" : false,
|
||||
"dataTimespan" : {
|
||||
"period" : "WEEK",
|
||||
"n" : 1
|
||||
},
|
||||
"flagAttachPdfToEmail" : true,
|
||||
"dataSource" : {
|
||||
"name" : "Weekly network report"
|
||||
},
|
||||
"flagIsIncludePiiUserData" : false,
|
||||
"nextDate" : "2026-10-01T07:00:00Z",
|
||||
"flagEnabled" : true
|
||||
},
|
||||
"accountId" : 1234,
|
||||
"apiLink" : [ {
|
||||
"key" : ""
|
||||
}, {
|
||||
"key" : ""
|
||||
} ],
|
||||
"dashboardId" : "5e1f7a99143ae6004fdc3bb4",
|
||||
"createdBy" : 1,
|
||||
"globalOverride" : true,
|
||||
"modifiedDate" : "2023-05-16 10:14:28",
|
||||
"isGlobalOverride" : true,
|
||||
"aid" : "1234",
|
||||
"dashboardModifiedDate" : "2023-05-16T10:14:28Z"
|
||||
}"""
|
||||
|
||||
response_loaded_json = json.loads(response_body_json)
|
||||
response_from_json = thousandeyes_sdk.dashboards.models.ApiDashboard.from_json(response_body_json)
|
||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -11,7 +11,7 @@ To access Emulation API operations, the following permissions are required:
|
||||
|
||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 7.0.99
|
||||
- API version: 7.0.103
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ For more information about Endpoint Agents, see [Endpoint Agents](https://docs.t
|
||||
|
||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 7.0.99
|
||||
- API version: 7.0.103
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# EndpointAgentUpdate
|
||||
|
||||
The `EndpointAgentUpdate` object contains supported fields for updates.
|
||||
Properties that can be updated for an Endpoint Agent. The `embed-wireless-advantage` and `embed-wireless-essentials` license types cannot be assigned through this endpoint. Requests that specify either license type are rejected.
|
||||
|
||||
## Properties
|
||||
|
||||
|
||||
@ -28,6 +28,8 @@ class AgentLicenseType(str, Enum):
|
||||
ESSENTIALS = 'essentials'
|
||||
ADVANTAGE = 'advantage'
|
||||
EMBEDDED = 'embedded'
|
||||
EMBED_MINUS_WIRELESS_MINUS_ADVANTAGE = 'embed-wireless-advantage'
|
||||
EMBED_MINUS_WIRELESS_MINUS_ESSENTIALS = 'embed-wireless-essentials'
|
||||
UNKNOWN = 'unknown'
|
||||
|
||||
@classmethod
|
||||
|
||||
@ -24,7 +24,7 @@ from typing_extensions import Self
|
||||
|
||||
class EndpointAgentUpdate(BaseModel):
|
||||
"""
|
||||
The `EndpointAgentUpdate` object contains supported fields for updates.
|
||||
Properties that can be updated for an Endpoint Agent. The `embed-wireless-advantage` and `embed-wireless-essentials` license types cannot be assigned through this endpoint. Requests that specify either license type are rejected.
|
||||
""" # noqa: E501
|
||||
name: Optional[StrictStr] = Field(default=None, description="New agent name.")
|
||||
license_type: Optional[AgentLicenseType] = Field(default=None, alias="licenseType")
|
||||
|
||||
@ -12,7 +12,7 @@ The URLs for these API test data endpoints are provided within the test definiti
|
||||
|
||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 7.0.99
|
||||
- API version: 7.0.103
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ Manage labels applied to endpoint agents using this API.
|
||||
|
||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 7.0.99
|
||||
- API version: 7.0.103
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -166,6 +166,7 @@ docs/VpnNetworkPing.md
|
||||
docs/VpnProfile.md
|
||||
docs/VpnTraceroute.md
|
||||
docs/VpnType.md
|
||||
docs/WirelessOnboarding.md
|
||||
pyproject.toml
|
||||
setup.cfg
|
||||
src/thousandeyes_sdk/endpoint_test_results/__init__.py
|
||||
@ -336,6 +337,7 @@ src/thousandeyes_sdk/endpoint_test_results/models/vpn_network_ping.py
|
||||
src/thousandeyes_sdk/endpoint_test_results/models/vpn_profile.py
|
||||
src/thousandeyes_sdk/endpoint_test_results/models/vpn_traceroute.py
|
||||
src/thousandeyes_sdk/endpoint_test_results/models/vpn_type.py
|
||||
src/thousandeyes_sdk/endpoint_test_results/models/wireless_onboarding.py
|
||||
src/thousandeyes_sdk/endpoint_test_results/py.typed
|
||||
test/__init__.py
|
||||
test/conftest.py
|
||||
|
||||
@ -3,7 +3,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents.
|
||||
|
||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 7.0.99
|
||||
- API version: 7.0.103
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
@ -282,6 +282,7 @@ Class | Method | HTTP request | Description
|
||||
- [VpnProfile](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-test-results/docs/VpnProfile.md)
|
||||
- [VpnTraceroute](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-test-results/docs/VpnTraceroute.md)
|
||||
- [VpnType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-test-results/docs/VpnType.md)
|
||||
- [WirelessOnboarding](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-test-results/docs/WirelessOnboarding.md)
|
||||
|
||||
|
||||
<a id="documentation-for-authorization"></a>
|
||||
|
||||
@ -7,7 +7,7 @@ Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**results** | [**List[HttpEndpointTestResult]**](HttpEndpointTestResult.md) | | [optional]
|
||||
**total_hits** | **int** | Total number of measurements that match the search criteria. | [optional]
|
||||
**test** | [**EndpointHttpServerTest**](EndpointHttpServerTest.md) | | [optional]
|
||||
**test** | [**EndpointHttpServerTest**](EndpointHttpServerTest.md) | The scheduled test configuration. Omitted when the user lacks the `View endpoint experience tests` permission. | [optional]
|
||||
**start_date** | **datetime** | (Optional) When passing `window` or `startDate` parameter, the client will also receive the `startDate` field indicating the UTC start date of the data's time range being retrieved (ISO date-time format). | [optional] [readonly]
|
||||
**end_date** | **datetime** | (Optional) When passing `window` or `endDate` parameter, the client will also receive the `endDate` field indicating the UTC end date of the data's time range being retrieved (ISO date-time format). | [optional] [readonly]
|
||||
**links** | [**PaginationNextAndSelfLink**](PaginationNextAndSelfLink.md) | | [optional]
|
||||
|
||||
@ -22,6 +22,7 @@ Name | Type | Description | Notes
|
||||
**gateway_score** | [**EndpointProbeGatewayScore**](EndpointProbeGatewayScore.md) | | [optional]
|
||||
**proxy_score** | [**EndpointProbeProxyScore**](EndpointProbeProxyScore.md) | | [optional]
|
||||
**connection_score** | [**EndpointProbeConnectionScore**](EndpointProbeConnectionScore.md) | | [optional]
|
||||
**wireless_onboarding** | [**WirelessOnboarding**](WirelessOnboarding.md) | | [optional]
|
||||
**agent_score** | [**EndpointProbeAgentScore**](EndpointProbeAgentScore.md) | | [optional]
|
||||
**battery_metrics** | [**BatteryMetrics**](BatteryMetrics.md) | | [optional]
|
||||
**cellular_profile** | [**CellularProfile**](CellularProfile.md) | | [optional]
|
||||
|
||||
@ -22,6 +22,7 @@ Name | Type | Description | Notes
|
||||
**gateway_score** | [**EndpointProbeGatewayScore**](EndpointProbeGatewayScore.md) | | [optional]
|
||||
**proxy_score** | [**EndpointProbeProxyScore**](EndpointProbeProxyScore.md) | | [optional]
|
||||
**connection_score** | [**EndpointProbeConnectionScore**](EndpointProbeConnectionScore.md) | | [optional]
|
||||
**wireless_onboarding** | [**WirelessOnboarding**](WirelessOnboarding.md) | | [optional]
|
||||
**agent_score** | [**EndpointProbeAgentScore**](EndpointProbeAgentScore.md) | | [optional]
|
||||
**battery_metrics** | [**BatteryMetrics**](BatteryMetrics.md) | | [optional]
|
||||
**cellular_profile** | [**CellularProfile**](CellularProfile.md) | | [optional]
|
||||
|
||||
@ -7,7 +7,7 @@ Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**results** | [**List[NetworkEndpointTestResult]**](NetworkEndpointTestResult.md) | | [optional]
|
||||
**total_hits** | **int** | Total number of measurements that match the search criteria. | [optional]
|
||||
**test** | [**EndpointScheduledTest**](EndpointScheduledTest.md) | | [optional]
|
||||
**test** | [**EndpointScheduledTest**](EndpointScheduledTest.md) | The scheduled test configuration. Omitted when the user lacks the `View endpoint experience tests` permission. | [optional]
|
||||
**start_date** | **datetime** | (Optional) When passing `window` or `startDate` parameter, the client will also receive the `startDate` field indicating the UTC start date of the data's time range being retrieved (ISO date-time format). | [optional] [readonly]
|
||||
**end_date** | **datetime** | (Optional) When passing `window` or `endDate` parameter, the client will also receive the `endDate` field indicating the UTC end date of the data's time range being retrieved (ISO date-time format). | [optional] [readonly]
|
||||
**links** | [**PaginationNextLink**](PaginationNextLink.md) | | [optional]
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**results** | [**List[PathVisDetailEndpointTestResult]**](PathVisDetailEndpointTestResult.md) | | [optional]
|
||||
**test** | [**EndpointScheduledTest**](EndpointScheduledTest.md) | | [optional]
|
||||
**test** | [**EndpointScheduledTest**](EndpointScheduledTest.md) | The scheduled test configuration. Omitted when the user lacks the `View endpoint experience tests` permission. | [optional]
|
||||
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**results** | [**List[PathVisEndpointTestResult]**](PathVisEndpointTestResult.md) | | [optional]
|
||||
**test** | [**EndpointScheduledTest**](EndpointScheduledTest.md) | | [optional]
|
||||
**test** | [**EndpointScheduledTest**](EndpointScheduledTest.md) | The scheduled test configuration. Omitted when the user lacks the `View endpoint experience tests` permission. | [optional]
|
||||
**start_date** | **datetime** | (Optional) When passing `window` or `startDate` parameter, the client will also receive the `startDate` field indicating the UTC start date of the data's time range being retrieved (ISO date-time format). | [optional] [readonly]
|
||||
**end_date** | **datetime** | (Optional) When passing `window` or `endDate` parameter, the client will also receive the `endDate` field indicating the UTC end date of the data's time range being retrieved (ISO date-time format). | [optional] [readonly]
|
||||
**links** | [**PaginationNextAndSelfLink**](PaginationNextAndSelfLink.md) | | [optional]
|
||||
|
||||
@ -0,0 +1,33 @@
|
||||
# WirelessOnboarding
|
||||
|
||||
Wireless onboarding timing metrics for a Wi-Fi connection attempt.
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**dot11_auth_time_ms** | **int** | Time spent in the initial 802.11 authentication phase, in milliseconds. | [optional] [readonly]
|
||||
**dot11_assoc_time_ms** | **int** | Time spent in the 802.11 association phase, in milliseconds. | [optional] [readonly]
|
||||
**dot1x_auth_time_ms** | **int** | Time spent in the 802.1X authentication phase, in milliseconds. | [optional] [readonly]
|
||||
**eapol_key_time_ms** | **int** | Time spent in the four-way EAPOL key handshake, in milliseconds. | [optional] [readonly]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.endpoint_test_results.models.wireless_onboarding import WirelessOnboarding
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of WirelessOnboarding from a JSON string
|
||||
wireless_onboarding_instance = WirelessOnboarding.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(WirelessOnboarding.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
wireless_onboarding_dict = wireless_onboarding_instance.to_dict()
|
||||
# create an instance of WirelessOnboarding from a dict
|
||||
wireless_onboarding_from_dict = WirelessOnboarding.from_dict(wireless_onboarding_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@ -182,3 +182,4 @@ from thousandeyes_sdk.endpoint_test_results.models.vpn_network_ping import VpnNe
|
||||
from thousandeyes_sdk.endpoint_test_results.models.vpn_profile import VpnProfile
|
||||
from thousandeyes_sdk.endpoint_test_results.models.vpn_traceroute import VpnTraceroute
|
||||
from thousandeyes_sdk.endpoint_test_results.models.vpn_type import VpnType
|
||||
from thousandeyes_sdk.endpoint_test_results.models.wireless_onboarding import WirelessOnboarding
|
||||
|
||||
@ -173,3 +173,4 @@ from thousandeyes_sdk.endpoint_test_results.models.vpn_network_ping import VpnNe
|
||||
from thousandeyes_sdk.endpoint_test_results.models.vpn_profile import VpnProfile
|
||||
from thousandeyes_sdk.endpoint_test_results.models.vpn_traceroute import VpnTraceroute
|
||||
from thousandeyes_sdk.endpoint_test_results.models.vpn_type import VpnType
|
||||
from thousandeyes_sdk.endpoint_test_results.models.wireless_onboarding import WirelessOnboarding
|
||||
|
||||
@ -31,7 +31,7 @@ class HttpEndpointTestResults(BaseModel):
|
||||
""" # noqa: E501
|
||||
results: Optional[List[HttpEndpointTestResult]] = None
|
||||
total_hits: Optional[StrictInt] = Field(default=None, description="Total number of measurements that match the search criteria.", alias="totalHits")
|
||||
test: Optional[EndpointHttpServerTest] = None
|
||||
test: Optional[EndpointHttpServerTest] = Field(default=None, description="The scheduled test configuration. Omitted when the user lacks the `View endpoint experience tests` permission.")
|
||||
start_date: Optional[datetime] = Field(default=None, description="(Optional) When passing `window` or `startDate` parameter, the client will also receive the `startDate` field indicating the UTC start date of the data's time range being retrieved (ISO date-time format).", alias="startDate")
|
||||
end_date: Optional[datetime] = Field(default=None, description="(Optional) When passing `window` or `endDate` parameter, the client will also receive the `endDate` field indicating the UTC end date of the data's time range being retrieved (ISO date-time format).", alias="endDate")
|
||||
links: Optional[PaginationNextAndSelfLink] = Field(default=None, alias="_links")
|
||||
|
||||
@ -36,6 +36,7 @@ from thousandeyes_sdk.endpoint_test_results.models.system_metric_details import
|
||||
from thousandeyes_sdk.endpoint_test_results.models.system_metrics import SystemMetrics
|
||||
from thousandeyes_sdk.endpoint_test_results.models.tcp_connect import TcpConnect
|
||||
from thousandeyes_sdk.endpoint_test_results.models.traceroute import Traceroute
|
||||
from thousandeyes_sdk.endpoint_test_results.models.wireless_onboarding import WirelessOnboarding
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
@ -60,6 +61,7 @@ class LocalNetworkTopologyResult(BaseModel):
|
||||
gateway_score: Optional[EndpointProbeGatewayScore] = Field(default=None, alias="gatewayScore")
|
||||
proxy_score: Optional[EndpointProbeProxyScore] = Field(default=None, alias="proxyScore")
|
||||
connection_score: Optional[EndpointProbeConnectionScore] = Field(default=None, alias="connectionScore")
|
||||
wireless_onboarding: Optional[WirelessOnboarding] = Field(default=None, alias="wirelessOnboarding")
|
||||
agent_score: Optional[EndpointProbeAgentScore] = Field(default=None, alias="agentScore")
|
||||
battery_metrics: Optional[BatteryMetrics] = Field(default=None, alias="batteryMetrics")
|
||||
cellular_profile: Optional[CellularProfile] = Field(default=None, alias="cellularProfile")
|
||||
@ -68,7 +70,7 @@ class LocalNetworkTopologyResult(BaseModel):
|
||||
network_profile: Optional[NetworkProfile] = Field(default=None, alias="networkProfile")
|
||||
icmp_traceroute: Optional[Traceroute] = Field(default=None, alias="icmpTraceroute")
|
||||
icmp_traceroutes: Optional[List[Traceroute]] = Field(default=None, alias="icmpTraceroutes")
|
||||
__properties: ClassVar[List[str]] = ["agentId", "date", "networkTopologyId", "dnsServerTest", "roundId", "target", "targetPort", "type", "icmpPing", "isIcmpBlocked", "tcpConnect", "systemMetrics", "systemMetricDetails", "vpnScore", "gatewayScore", "proxyScore", "connectionScore", "agentScore", "batteryMetrics", "cellularProfile", "platform", "coordinates", "networkProfile", "icmpTraceroute", "icmpTraceroutes"]
|
||||
__properties: ClassVar[List[str]] = ["agentId", "date", "networkTopologyId", "dnsServerTest", "roundId", "target", "targetPort", "type", "icmpPing", "isIcmpBlocked", "tcpConnect", "systemMetrics", "systemMetricDetails", "vpnScore", "gatewayScore", "proxyScore", "connectionScore", "wirelessOnboarding", "agentScore", "batteryMetrics", "cellularProfile", "platform", "coordinates", "networkProfile", "icmpTraceroute", "icmpTraceroutes"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
@ -151,6 +153,9 @@ class LocalNetworkTopologyResult(BaseModel):
|
||||
# override the default output from pydantic by calling `to_dict()` of connection_score
|
||||
if self.connection_score:
|
||||
_dict['connectionScore'] = self.connection_score.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of wireless_onboarding
|
||||
if self.wireless_onboarding:
|
||||
_dict['wirelessOnboarding'] = self.wireless_onboarding.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of agent_score
|
||||
if self.agent_score:
|
||||
_dict['agentScore'] = self.agent_score.to_dict()
|
||||
@ -205,6 +210,7 @@ class LocalNetworkTopologyResult(BaseModel):
|
||||
"gatewayScore": EndpointProbeGatewayScore.from_dict(obj["gatewayScore"]) if obj.get("gatewayScore") is not None else None,
|
||||
"proxyScore": EndpointProbeProxyScore.from_dict(obj["proxyScore"]) if obj.get("proxyScore") is not None else None,
|
||||
"connectionScore": EndpointProbeConnectionScore.from_dict(obj["connectionScore"]) if obj.get("connectionScore") is not None else None,
|
||||
"wirelessOnboarding": WirelessOnboarding.from_dict(obj["wirelessOnboarding"]) if obj.get("wirelessOnboarding") is not None else None,
|
||||
"agentScore": EndpointProbeAgentScore.from_dict(obj["agentScore"]) if obj.get("agentScore") is not None else None,
|
||||
"batteryMetrics": BatteryMetrics.from_dict(obj["batteryMetrics"]) if obj.get("batteryMetrics") is not None else None,
|
||||
"cellularProfile": CellularProfile.from_dict(obj["cellularProfile"]) if obj.get("cellularProfile") is not None else None,
|
||||
|
||||
@ -33,6 +33,7 @@ from thousandeyes_sdk.endpoint_test_results.models.platform import Platform
|
||||
from thousandeyes_sdk.endpoint_test_results.models.system_metric_details import SystemMetricDetails
|
||||
from thousandeyes_sdk.endpoint_test_results.models.system_metrics import SystemMetrics
|
||||
from thousandeyes_sdk.endpoint_test_results.models.tcp_connect import TcpConnect
|
||||
from thousandeyes_sdk.endpoint_test_results.models.wireless_onboarding import WirelessOnboarding
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
@ -57,11 +58,12 @@ class LocalNetworkTopologyResultBase(BaseModel):
|
||||
gateway_score: Optional[EndpointProbeGatewayScore] = Field(default=None, alias="gatewayScore")
|
||||
proxy_score: Optional[EndpointProbeProxyScore] = Field(default=None, alias="proxyScore")
|
||||
connection_score: Optional[EndpointProbeConnectionScore] = Field(default=None, alias="connectionScore")
|
||||
wireless_onboarding: Optional[WirelessOnboarding] = Field(default=None, alias="wirelessOnboarding")
|
||||
agent_score: Optional[EndpointProbeAgentScore] = Field(default=None, alias="agentScore")
|
||||
battery_metrics: Optional[BatteryMetrics] = Field(default=None, alias="batteryMetrics")
|
||||
cellular_profile: Optional[CellularProfile] = Field(default=None, alias="cellularProfile")
|
||||
platform: Optional[Platform] = None
|
||||
__properties: ClassVar[List[str]] = ["agentId", "date", "networkTopologyId", "dnsServerTest", "roundId", "target", "targetPort", "type", "icmpPing", "isIcmpBlocked", "tcpConnect", "systemMetrics", "systemMetricDetails", "vpnScore", "gatewayScore", "proxyScore", "connectionScore", "agentScore", "batteryMetrics", "cellularProfile", "platform"]
|
||||
__properties: ClassVar[List[str]] = ["agentId", "date", "networkTopologyId", "dnsServerTest", "roundId", "target", "targetPort", "type", "icmpPing", "isIcmpBlocked", "tcpConnect", "systemMetrics", "systemMetricDetails", "vpnScore", "gatewayScore", "proxyScore", "connectionScore", "wirelessOnboarding", "agentScore", "batteryMetrics", "cellularProfile", "platform"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
@ -144,6 +146,9 @@ class LocalNetworkTopologyResultBase(BaseModel):
|
||||
# override the default output from pydantic by calling `to_dict()` of connection_score
|
||||
if self.connection_score:
|
||||
_dict['connectionScore'] = self.connection_score.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of wireless_onboarding
|
||||
if self.wireless_onboarding:
|
||||
_dict['wirelessOnboarding'] = self.wireless_onboarding.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of agent_score
|
||||
if self.agent_score:
|
||||
_dict['agentScore'] = self.agent_score.to_dict()
|
||||
@ -182,6 +187,7 @@ class LocalNetworkTopologyResultBase(BaseModel):
|
||||
"gatewayScore": EndpointProbeGatewayScore.from_dict(obj["gatewayScore"]) if obj.get("gatewayScore") is not None else None,
|
||||
"proxyScore": EndpointProbeProxyScore.from_dict(obj["proxyScore"]) if obj.get("proxyScore") is not None else None,
|
||||
"connectionScore": EndpointProbeConnectionScore.from_dict(obj["connectionScore"]) if obj.get("connectionScore") is not None else None,
|
||||
"wirelessOnboarding": WirelessOnboarding.from_dict(obj["wirelessOnboarding"]) if obj.get("wirelessOnboarding") is not None else None,
|
||||
"agentScore": EndpointProbeAgentScore.from_dict(obj["agentScore"]) if obj.get("agentScore") is not None else None,
|
||||
"batteryMetrics": BatteryMetrics.from_dict(obj["batteryMetrics"]) if obj.get("batteryMetrics") is not None else None,
|
||||
"cellularProfile": CellularProfile.from_dict(obj["cellularProfile"]) if obj.get("cellularProfile") is not None else None,
|
||||
|
||||
@ -31,7 +31,7 @@ class NetworkEndpointTestResults(BaseModel):
|
||||
""" # noqa: E501
|
||||
results: Optional[List[NetworkEndpointTestResult]] = None
|
||||
total_hits: Optional[StrictInt] = Field(default=None, description="Total number of measurements that match the search criteria.", alias="totalHits")
|
||||
test: Optional[EndpointScheduledTest] = None
|
||||
test: Optional[EndpointScheduledTest] = Field(default=None, description="The scheduled test configuration. Omitted when the user lacks the `View endpoint experience tests` permission.")
|
||||
start_date: Optional[datetime] = Field(default=None, description="(Optional) When passing `window` or `startDate` parameter, the client will also receive the `startDate` field indicating the UTC start date of the data's time range being retrieved (ISO date-time format).", alias="startDate")
|
||||
end_date: Optional[datetime] = Field(default=None, description="(Optional) When passing `window` or `endDate` parameter, the client will also receive the `endDate` field indicating the UTC end date of the data's time range being retrieved (ISO date-time format).", alias="endDate")
|
||||
links: Optional[PaginationNextLink] = Field(default=None, alias="_links")
|
||||
|
||||
@ -29,7 +29,7 @@ class PathVisDetailEndpointTestResults(BaseModel):
|
||||
PathVisDetailEndpointTestResults
|
||||
""" # noqa: E501
|
||||
results: Optional[List[PathVisDetailEndpointTestResult]] = None
|
||||
test: Optional[EndpointScheduledTest] = None
|
||||
test: Optional[EndpointScheduledTest] = Field(default=None, description="The scheduled test configuration. Omitted when the user lacks the `View endpoint experience tests` permission.")
|
||||
links: Optional[SelfLinks] = Field(default=None, alias="_links")
|
||||
__properties: ClassVar[List[str]] = ["results", "test", "_links"]
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ class PathVisEndpointTestResults(BaseModel):
|
||||
PathVisEndpointTestResults
|
||||
""" # noqa: E501
|
||||
results: Optional[List[PathVisEndpointTestResult]] = None
|
||||
test: Optional[EndpointScheduledTest] = None
|
||||
test: Optional[EndpointScheduledTest] = Field(default=None, description="The scheduled test configuration. Omitted when the user lacks the `View endpoint experience tests` permission.")
|
||||
start_date: Optional[datetime] = Field(default=None, description="(Optional) When passing `window` or `startDate` parameter, the client will also receive the `startDate` field indicating the UTC start date of the data's time range being retrieved (ISO date-time format).", alias="startDate")
|
||||
end_date: Optional[datetime] = Field(default=None, description="(Optional) When passing `window` or `endDate` parameter, the client will also receive the `endDate` field indicating the UTC end date of the data's time range being retrieved (ISO date-time format).", alias="endDate")
|
||||
links: Optional[PaginationNextAndSelfLink] = Field(default=None, alias="_links")
|
||||
|
||||
@ -0,0 +1,101 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Endpoint Test Results API
|
||||
|
||||
Retrieve results for scheduled and dynamic tests on endpoint agents.
|
||||
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class WirelessOnboarding(BaseModel):
|
||||
"""
|
||||
Wireless onboarding timing metrics for a Wi-Fi connection attempt.
|
||||
""" # noqa: E501
|
||||
dot11_auth_time_ms: Optional[StrictInt] = Field(default=None, description="Time spent in the initial 802.11 authentication phase, in milliseconds.", alias="dot11AuthTimeMs")
|
||||
dot11_assoc_time_ms: Optional[StrictInt] = Field(default=None, description="Time spent in the 802.11 association phase, in milliseconds.", alias="dot11AssocTimeMs")
|
||||
dot1x_auth_time_ms: Optional[StrictInt] = Field(default=None, description="Time spent in the 802.1X authentication phase, in milliseconds.", alias="dot1xAuthTimeMs")
|
||||
eapol_key_time_ms: Optional[StrictInt] = Field(default=None, description="Time spent in the four-way EAPOL key handshake, in milliseconds.", alias="eapolKeyTimeMs")
|
||||
__properties: ClassVar[List[str]] = ["dot11AuthTimeMs", "dot11AssocTimeMs", "dot1xAuthTimeMs", "eapolKeyTimeMs"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
extra="allow",
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of WirelessOnboarding from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
"dot11_auth_time_ms",
|
||||
"dot11_assoc_time_ms",
|
||||
"dot1x_auth_time_ms",
|
||||
"eapol_key_time_ms",
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of WirelessOnboarding from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"dot11AuthTimeMs": obj.get("dot11AuthTimeMs"),
|
||||
"dot11AssocTimeMs": obj.get("dot11AssocTimeMs"),
|
||||
"dot1xAuthTimeMs": obj.get("dot1xAuthTimeMs"),
|
||||
"eapolKeyTimeMs": obj.get("eapolKeyTimeMs")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -1509,6 +1509,12 @@ OPERATION_MANIFEST = {
|
||||
"infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ],
|
||||
"pktsSent" : 10
|
||||
},
|
||||
"wirelessOnboarding" : {
|
||||
"dot11AuthTimeMs" : 12,
|
||||
"dot11AssocTimeMs" : 18,
|
||||
"dot1xAuthTimeMs" : 240,
|
||||
"eapolKeyTimeMs" : 31
|
||||
},
|
||||
"networkTopologyId" : "00160:54c3a4b180c6:1490536500:c7a58c49",
|
||||
"roundId" : 1384309800,
|
||||
"agentScore" : {
|
||||
@ -1673,6 +1679,12 @@ OPERATION_MANIFEST = {
|
||||
"infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ],
|
||||
"pktsSent" : 10
|
||||
},
|
||||
"wirelessOnboarding" : {
|
||||
"dot11AuthTimeMs" : 12,
|
||||
"dot11AssocTimeMs" : 18,
|
||||
"dot1xAuthTimeMs" : 240,
|
||||
"eapolKeyTimeMs" : 31
|
||||
},
|
||||
"networkTopologyId" : "00160:54c3a4b180c6:1490536500:c7a58c49",
|
||||
"roundId" : 1384309800,
|
||||
"agentScore" : {
|
||||
@ -2248,6 +2260,12 @@ OPERATION_MANIFEST = {
|
||||
"infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ],
|
||||
"pktsSent" : 10
|
||||
},
|
||||
"wirelessOnboarding" : {
|
||||
"dot11AuthTimeMs" : 12,
|
||||
"dot11AssocTimeMs" : 18,
|
||||
"dot1xAuthTimeMs" : 240,
|
||||
"eapolKeyTimeMs" : 31
|
||||
},
|
||||
"networkTopologyId" : "00160:54c3a4b180c6:1490536500:c7a58c49"
|
||||
}, {
|
||||
"date" : "2022-07-17T22:00:54Z",
|
||||
@ -2532,6 +2550,12 @@ OPERATION_MANIFEST = {
|
||||
"infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ],
|
||||
"pktsSent" : 10
|
||||
},
|
||||
"wirelessOnboarding" : {
|
||||
"dot11AuthTimeMs" : 12,
|
||||
"dot11AssocTimeMs" : 18,
|
||||
"dot1xAuthTimeMs" : 240,
|
||||
"eapolKeyTimeMs" : 31
|
||||
},
|
||||
"networkTopologyId" : "00160:54c3a4b180c6:1490536500:c7a58c49"
|
||||
} ]
|
||||
}
|
||||
|
||||
@ -239,6 +239,12 @@ class TestLocalNetworkEndpointTestResultsApi(unittest.TestCase):
|
||||
"infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ],
|
||||
"pktsSent" : 10
|
||||
},
|
||||
"wirelessOnboarding" : {
|
||||
"dot11AuthTimeMs" : 12,
|
||||
"dot11AssocTimeMs" : 18,
|
||||
"dot1xAuthTimeMs" : 240,
|
||||
"eapolKeyTimeMs" : 31
|
||||
},
|
||||
"networkTopologyId" : "00160:54c3a4b180c6:1490536500:c7a58c49",
|
||||
"roundId" : 1384309800,
|
||||
"agentScore" : {
|
||||
@ -403,6 +409,12 @@ class TestLocalNetworkEndpointTestResultsApi(unittest.TestCase):
|
||||
"infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ],
|
||||
"pktsSent" : 10
|
||||
},
|
||||
"wirelessOnboarding" : {
|
||||
"dot11AuthTimeMs" : 12,
|
||||
"dot11AssocTimeMs" : 18,
|
||||
"dot1xAuthTimeMs" : 240,
|
||||
"eapolKeyTimeMs" : 31
|
||||
},
|
||||
"networkTopologyId" : "00160:54c3a4b180c6:1490536500:c7a58c49",
|
||||
"roundId" : 1384309800,
|
||||
"agentScore" : {
|
||||
@ -751,6 +763,12 @@ class TestLocalNetworkEndpointTestResultsApi(unittest.TestCase):
|
||||
"infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ],
|
||||
"pktsSent" : 10
|
||||
},
|
||||
"wirelessOnboarding" : {
|
||||
"dot11AuthTimeMs" : 12,
|
||||
"dot11AssocTimeMs" : 18,
|
||||
"dot1xAuthTimeMs" : 240,
|
||||
"eapolKeyTimeMs" : 31
|
||||
},
|
||||
"networkTopologyId" : "00160:54c3a4b180c6:1490536500:c7a58c49"
|
||||
}, {
|
||||
"date" : "2022-07-17T22:00:54Z",
|
||||
@ -1035,6 +1053,12 @@ class TestLocalNetworkEndpointTestResultsApi(unittest.TestCase):
|
||||
"infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ],
|
||||
"pktsSent" : 10
|
||||
},
|
||||
"wirelessOnboarding" : {
|
||||
"dot11AuthTimeMs" : 12,
|
||||
"dot11AssocTimeMs" : 18,
|
||||
"dot1xAuthTimeMs" : 240,
|
||||
"eapolKeyTimeMs" : 31
|
||||
},
|
||||
"networkTopologyId" : "00160:54c3a4b180c6:1490536500:c7a58c49"
|
||||
} ]
|
||||
}"""
|
||||
|
||||
@ -244,6 +244,12 @@ class TestLocalNetworkEndpointTestResultsApiIntegration(IntegrationTestBase):
|
||||
"infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ],
|
||||
"pktsSent" : 10
|
||||
},
|
||||
"wirelessOnboarding" : {
|
||||
"dot11AuthTimeMs" : 12,
|
||||
"dot11AssocTimeMs" : 18,
|
||||
"dot1xAuthTimeMs" : 240,
|
||||
"eapolKeyTimeMs" : 31
|
||||
},
|
||||
"networkTopologyId" : "00160:54c3a4b180c6:1490536500:c7a58c49",
|
||||
"roundId" : 1384309800,
|
||||
"agentScore" : {
|
||||
@ -408,6 +414,12 @@ class TestLocalNetworkEndpointTestResultsApiIntegration(IntegrationTestBase):
|
||||
"infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ],
|
||||
"pktsSent" : 10
|
||||
},
|
||||
"wirelessOnboarding" : {
|
||||
"dot11AuthTimeMs" : 12,
|
||||
"dot11AssocTimeMs" : 18,
|
||||
"dot1xAuthTimeMs" : 240,
|
||||
"eapolKeyTimeMs" : 31
|
||||
},
|
||||
"networkTopologyId" : "00160:54c3a4b180c6:1490536500:c7a58c49",
|
||||
"roundId" : 1384309800,
|
||||
"agentScore" : {
|
||||
@ -1471,6 +1483,12 @@ class TestLocalNetworkEndpointTestResultsApiIntegration(IntegrationTestBase):
|
||||
"infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ],
|
||||
"pktsSent" : 10
|
||||
},
|
||||
"wirelessOnboarding" : {
|
||||
"dot11AuthTimeMs" : 12,
|
||||
"dot11AssocTimeMs" : 18,
|
||||
"dot1xAuthTimeMs" : 240,
|
||||
"eapolKeyTimeMs" : 31
|
||||
},
|
||||
"networkTopologyId" : "00160:54c3a4b180c6:1490536500:c7a58c49"
|
||||
}, {
|
||||
"date" : "2022-07-17T22:00:54Z",
|
||||
@ -1755,6 +1773,12 @@ class TestLocalNetworkEndpointTestResultsApiIntegration(IntegrationTestBase):
|
||||
"infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ],
|
||||
"pktsSent" : 10
|
||||
},
|
||||
"wirelessOnboarding" : {
|
||||
"dot11AuthTimeMs" : 12,
|
||||
"dot11AssocTimeMs" : 18,
|
||||
"dot1xAuthTimeMs" : 240,
|
||||
"eapolKeyTimeMs" : 31
|
||||
},
|
||||
"networkTopologyId" : "00160:54c3a4b180c6:1490536500:c7a58c49"
|
||||
} ]
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API.
|
||||
|
||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 7.0.99
|
||||
- API version: 7.0.103
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ With the Events API, you can perform the following tasks on the ThousandEyes pla
|
||||
|
||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 7.0.99
|
||||
- API version: 7.0.103
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -88,6 +88,8 @@ docs/SipServerInstantTestResponse.md
|
||||
docs/SipServerProperties.md
|
||||
docs/SipTestProtocol.md
|
||||
docs/TestAgent.md
|
||||
docs/TestAgentResponse.md
|
||||
docs/TestAgentResponseProperties.md
|
||||
docs/TestAuthType.md
|
||||
docs/TestChromiumTrack.md
|
||||
docs/TestCustomHeaders.md
|
||||
@ -217,6 +219,8 @@ src/thousandeyes_sdk/instant_tests/models/sip_server_instant_test_response.py
|
||||
src/thousandeyes_sdk/instant_tests/models/sip_server_properties.py
|
||||
src/thousandeyes_sdk/instant_tests/models/sip_test_protocol.py
|
||||
src/thousandeyes_sdk/instant_tests/models/test_agent.py
|
||||
src/thousandeyes_sdk/instant_tests/models/test_agent_response.py
|
||||
src/thousandeyes_sdk/instant_tests/models/test_agent_response_properties.py
|
||||
src/thousandeyes_sdk/instant_tests/models/test_auth_type.py
|
||||
src/thousandeyes_sdk/instant_tests/models/test_chromium_track.py
|
||||
src/thousandeyes_sdk/instant_tests/models/test_custom_headers.py
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user