├── .editorconfig ├── .gitignore ├── .openapi-generator-ignore ├── .openapi-generator └── VERSION ├── .travis.yml ├── LICENSE.txt ├── README.md ├── docs ├── AccountApi.md ├── AccountInfo.md ├── AccountPlan.md ├── AcknowledgeAlertPayload.md ├── AddDetailsToAlertPayload.md ├── AddDetailsToAlertPayloadAllOf.md ├── AddNoteToAlertPayload.md ├── AddResponderToAlertPayload.md ├── AddResponderToAlertPayloadAllOf.md ├── AddTagsToAlertPayload.md ├── AddTagsToAlertPayloadAllOf.md ├── AddTeamToAlertPayload.md ├── AddTeamToAlertPayloadAllOf.md ├── Alert.md ├── AlertActionPayload.md ├── AlertAllOf.md ├── AlertApi.md ├── AlertAttachment.md ├── AlertAttachmentMeta.md ├── AlertIntegration.md ├── AlertLog.md ├── AlertNote.md ├── AlertPaging.md ├── AlertRecipient.md ├── AlertReport.md ├── AlertRequestStatus.md ├── AlertTeamMeta.md ├── AlertUserMeta.md ├── AllRecipient.md ├── AssignAlertPayload.md ├── AssignAlertPayloadAllOf.md ├── BaseAlert.md ├── BaseIncident.md ├── BaseResponse.md ├── BaseResponseWithExpandable.md ├── BaseResponseWithExpandableAllOf.md ├── CloseAlertPayload.md ├── CloseIncidentPayload.md ├── Condition.md ├── CreateAlertPayload.md ├── CreateAlertPayloadAllOf.md ├── CreateHeartbeatPayload.md ├── CreateHeartbeatPayloadAllOf.md ├── CreateHeartbeatPayloadAllOfOwnerTeam.md ├── CreateHeartbeatResponse.md ├── CreateHeartbeatResponseAllOf.md ├── CreateIncidentPayload.md ├── CreateIncidentPayloadAllOf.md ├── CreateSavedSearchPayload.md ├── CreateSavedSearchResponse.md ├── CreateSavedSearchResponseAllOf.md ├── DisableHeartbeatResponse.md ├── DisableHeartbeatResponseAllOf.md ├── Duration.md ├── EnableHeartbeatResponse.md ├── ErrorResponse.md ├── ErrorResponseAllOf.md ├── EscalateAlertToNextPayload.md ├── EscalateAlertToNextPayloadAllOf.md ├── EscalationRecipient.md ├── ExecuteCustomAlertActionPayload.md ├── Filter.md ├── GetAccountInfoResponse.md ├── GetAccountInfoResponseAllOf.md ├── GetAlertAttachmentResponse.md ├── GetAlertAttachmentResponseAllOf.md ├── GetAlertResponse.md ├── GetAlertResponseAllOf.md ├── GetCountAlertsResponse.md ├── GetCountAlertsResponseAllOf.md ├── GetCountAlertsResponseAllOfData.md ├── GetHeartbeatResponse.md ├── GetIncidentRequestStatusResponse.md ├── GetIncidentRequestStatusResponseAllOf.md ├── GetIncidentResponse.md ├── GetIncidentResponseAllOf.md ├── GetRequestStatusResponse.md ├── GetRequestStatusResponseAllOf.md ├── GetSavedSearchResponse.md ├── GetSavedSearchResponseAllOf.md ├── GroupRecipient.md ├── Heartbeat.md ├── HeartbeatApi.md ├── HeartbeatMeta.md ├── Incident.md ├── IncidentActionPayload.md ├── IncidentAllOf.md ├── IncidentApi.md ├── IncidentRequestStatus.md ├── ListAlertAttachmentsResponse.md ├── ListAlertAttachmentsResponseAllOf.md ├── ListAlertLogsResponse.md ├── ListAlertLogsResponseAllOf.md ├── ListAlertNotesResponse.md ├── ListAlertNotesResponseAllOf.md ├── ListAlertRecipientsResponse.md ├── ListAlertRecipientsResponseAllOf.md ├── ListAlertsResponse.md ├── ListAlertsResponseAllOf.md ├── ListHeartbeatResponse.md ├── ListHeartbeatResponseAllOf.md ├── ListHeartbeatResponseAllOfData.md ├── ListIncidentsResponse.md ├── ListIncidentsResponseAllOf.md ├── ListSavedSearchesResponse.md ├── ListSavedSearchesResponseAllOf.md ├── MatchAll.md ├── MatchAllConditions.md ├── MatchAnyCondition.md ├── MatchAnyConditionAllOf.md ├── NoRecipient.md ├── PageDetails.md ├── Recipient.md ├── Responder.md ├── SavedSearch.md ├── SavedSearchEntity.md ├── SavedSearchMeta.md ├── ScheduleRecipient.md ├── SnoozeAlertPayload.md ├── SnoozeAlertPayloadAllOf.md ├── StatusPageEntry.md ├── StatusPageEntryAllOf.md ├── SuccessData.md ├── SuccessResponse.md ├── SuccessResponseAllOf.md ├── TeamRecipient.md ├── TeamRecipientAllOf.md ├── TeamResponder.md ├── TimeOfDayRestriction.md ├── TimeOfDayRestrictionInterval.md ├── TimeOfDayRestrictionIntervalAllOf.md ├── TimeRestrictionInterval.md ├── UnAcknowledgeAlertPayload.md ├── UpdateAlertDescriptionPayload.md ├── UpdateAlertMessagePayload.md ├── UpdateAlertPriorityPayload.md ├── UpdateHeartbeatPayload.md ├── UpdateHeartbeatResponse.md ├── UpdateSavedSearchPayload.md ├── UserRecipient.md ├── UserRecipientAllOf.md ├── UserResponder.md ├── UserResponderAllOf.md ├── WeekdayTimeRestriction.md ├── WeekdayTimeRestrictionInterval.md └── WeekdayTimeRestrictionIntervalAllOf.md ├── opsgenie-oas.json ├── opsgenie-oas.yml ├── opsgenieCodegenModels.csv ├── opsgenie_sdk ├── __init__.py ├── api │ ├── __init__.py │ ├── account │ │ ├── __init__.py │ │ ├── account_info.py │ │ ├── account_plan.py │ │ ├── get_account_info_response.py │ │ └── get_account_info_response_all_of.py │ ├── alert │ │ ├── __init__.py │ │ ├── acknowledge_alert_payload.py │ │ ├── add_details_to_alert_payload.py │ │ ├── add_details_to_alert_payload_all_of.py │ │ ├── add_note_to_alert_payload.py │ │ ├── add_responder_to_alert_payload.py │ │ ├── add_responder_to_alert_payload_all_of.py │ │ ├── add_tags_to_alert_payload.py │ │ ├── add_tags_to_alert_payload_all_of.py │ │ ├── add_team_to_alert_payload.py │ │ ├── add_team_to_alert_payload_all_of.py │ │ ├── alert.py │ │ ├── alert_action_payload.py │ │ ├── alert_all_of.py │ │ ├── alert_attachment.py │ │ ├── alert_attachment_meta.py │ │ ├── alert_integration.py │ │ ├── alert_log.py │ │ ├── alert_note.py │ │ ├── alert_paging.py │ │ ├── alert_recipient.py │ │ ├── alert_report.py │ │ ├── alert_request_status.py │ │ ├── alert_team_meta.py │ │ ├── alert_user_meta.py │ │ ├── assign_alert_payload.py │ │ ├── assign_alert_payload_all_of.py │ │ ├── base_alert.py │ │ ├── close_alert_payload.py │ │ ├── create_alert_payload.py │ │ ├── create_alert_payload_all_of.py │ │ ├── create_saved_search_payload.py │ │ ├── create_saved_search_response.py │ │ ├── create_saved_search_response_all_of.py │ │ ├── escalate_alert_to_next_payload.py │ │ ├── escalate_alert_to_next_payload_all_of.py │ │ ├── execute_custom_alert_action_payload.py │ │ ├── get_alert_attachment_response.py │ │ ├── get_alert_attachment_response_all_of.py │ │ ├── get_alert_response.py │ │ ├── get_alert_response_all_of.py │ │ ├── get_count_alerts_response.py │ │ ├── get_count_alerts_response_all_of.py │ │ ├── get_count_alerts_response_all_of_data.py │ │ ├── get_request_status_response.py │ │ ├── get_request_status_response_all_of.py │ │ ├── get_saved_search_response.py │ │ ├── get_saved_search_response_all_of.py │ │ ├── list_alert_attachments_response.py │ │ ├── list_alert_attachments_response_all_of.py │ │ ├── list_alert_logs_response.py │ │ ├── list_alert_logs_response_all_of.py │ │ ├── list_alert_notes_response.py │ │ ├── list_alert_notes_response_all_of.py │ │ ├── list_alert_recipients_response.py │ │ ├── list_alert_recipients_response_all_of.py │ │ ├── list_alerts_response.py │ │ ├── list_alerts_response_all_of.py │ │ ├── list_saved_searches_response.py │ │ ├── list_saved_searches_response_all_of.py │ │ ├── saved_search.py │ │ ├── saved_search_entity.py │ │ ├── saved_search_meta.py │ │ ├── snooze_alert_payload.py │ │ ├── snooze_alert_payload_all_of.py │ │ ├── un_acknowledge_alert_payload.py │ │ ├── update_alert_description_payload.py │ │ ├── update_alert_message_payload.py │ │ ├── update_alert_priority_payload.py │ │ └── update_saved_search_payload.py │ ├── heartbeat │ │ ├── __init__.py │ │ ├── create_heartbeat_payload.py │ │ ├── create_heartbeat_payload_all_of.py │ │ ├── create_heartbeat_payload_all_of_owner_team.py │ │ ├── create_heartbeat_response.py │ │ ├── create_heartbeat_response_all_of.py │ │ ├── disable_heartbeat_response.py │ │ ├── disable_heartbeat_response_all_of.py │ │ ├── enable_heartbeat_response.py │ │ ├── get_heartbeat_response.py │ │ ├── heartbeat.py │ │ ├── heartbeat_meta.py │ │ ├── list_heartbeat_response.py │ │ ├── list_heartbeat_response_all_of.py │ │ ├── list_heartbeat_response_all_of_data.py │ │ ├── update_heartbeat_payload.py │ │ └── update_heartbeat_response.py │ └── incident │ │ ├── __init__.py │ │ ├── base_incident.py │ │ ├── close_incident_payload.py │ │ ├── create_incident_payload.py │ │ ├── create_incident_payload_all_of.py │ │ ├── get_incident_request_status_response.py │ │ ├── get_incident_request_status_response_all_of.py │ │ ├── get_incident_response.py │ │ ├── get_incident_response_all_of.py │ │ ├── incident.py │ │ ├── incident_action_payload.py │ │ ├── incident_all_of.py │ │ ├── incident_request_status.py │ │ ├── list_incidents_response.py │ │ ├── list_incidents_response_all_of.py │ │ ├── status_page_entry.py │ │ └── status_page_entry_all_of.py ├── api_client.py ├── configuration.py ├── errors.py ├── exceptions.py ├── metrics │ ├── __init__.py │ ├── api_metric.py │ ├── http_metric.py │ ├── observer.py │ ├── publisher.py │ └── sdk_metric.py ├── models │ ├── __init__.py │ ├── all_recipient.py │ ├── base_response.py │ ├── base_response_with_expandable.py │ ├── base_response_with_expandable_all_of.py │ ├── condition.py │ ├── duration.py │ ├── error_response.py │ ├── error_response_all_of.py │ ├── escalation_recipient.py │ ├── filter.py │ ├── group_recipient.py │ ├── match_all.py │ ├── match_all_conditions.py │ ├── match_any_condition.py │ ├── match_any_condition_all_of.py │ ├── no_recipient.py │ ├── page_details.py │ ├── recipient.py │ ├── responder.py │ ├── schedule_recipient.py │ ├── success_data.py │ ├── success_response.py │ ├── success_response_all_of.py │ ├── team_recipient.py │ ├── team_recipient_all_of.py │ ├── team_responder.py │ ├── time_of_day_restriction.py │ ├── time_of_day_restriction_interval.py │ ├── time_of_day_restriction_interval_all_of.py │ ├── time_restriction_interval.py │ ├── user_recipient.py │ ├── user_recipient_all_of.py │ ├── user_responder.py │ ├── user_responder_all_of.py │ ├── weekday_time_restriction.py │ ├── weekday_time_restriction_interval.py │ └── weekday_time_restriction_interval_all_of.py ├── proxy_configuration.py └── rest.py ├── requirements.txt ├── samples ├── __init__.py ├── account.py ├── alert.py ├── heartbeat.py └── incident.py ├── scripts ├── oas │ └── generate.sh └── sdk │ ├── config.json │ ├── generate.sh │ ├── openapi-generator-cli.jar │ ├── opsgenie-python-openapi-generator-1.0.0.jar │ └── refactor_project.py ├── setup.py ├── templates-original ├── README.mustache ├── README_onlypackage.mustache ├── __init__api.mustache ├── __init__model.mustache ├── __init__package.mustache ├── __init__test.mustache ├── api.mustache ├── api_client.mustache ├── api_doc.mustache ├── api_doc_example.mustache ├── api_test.mustache ├── asyncio │ └── rest.mustache ├── common_README.mustache ├── configuration.mustache ├── exceptions.mustache ├── git_push.sh.mustache ├── gitignore.mustache ├── model.mustache ├── model_doc.mustache ├── model_test.mustache ├── partial_header.mustache ├── python_doc_auth_partial.mustache ├── requirements.mustache ├── rest.mustache ├── setup.mustache ├── test-requirements.mustache ├── tornado │ └── rest.mustache ├── tox.mustache └── travis.mustache ├── templates ├── LICENSE.mustache ├── README.mustache ├── README_onlypackage.mustache ├── __init__api.mustache ├── __init__model.mustache ├── __init__package.mustache ├── __init__test.mustache ├── api.mustache ├── api_client.mustache ├── api_doc.mustache ├── api_doc_example.mustache ├── api_test.mustache ├── common_README.mustache ├── configuration.mustache ├── errors.mustache ├── exceptions.mustache ├── gitignore.mustache ├── metrics │ ├── __init__.mustache │ ├── api_metric.mustache │ ├── http_metric.mustache │ ├── observer.mustache │ ├── publisher.mustache │ └── sdk_metric.mustache ├── model.mustache ├── model_doc.mustache ├── model_test.mustache ├── opsgenieCodegenModels.mustache ├── partial_header.mustache ├── proxy_configuration.mustache ├── python_doc_auth_partial.mustache ├── requirements.mustache ├── rest.mustache ├── setup.mustache ├── test-requirements.mustache ├── tox.mustache └── travis.mustache ├── test-requirements.txt └── tox.ini /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Set defaults for all file types 7 | [*] 8 | end_of_line = lf 9 | insert_final_newline = true 10 | charset = utf-8 11 | 12 | # Python specific overrides 13 | [*.py] 14 | indent_style = space 15 | indent_size = 4 16 | -------------------------------------------------------------------------------- /.openapi-generator-ignore: -------------------------------------------------------------------------------- 1 | # OpenAPI Generator Ignore 2 | # Generated by openapi-generator https://github.com/openapitools/openapi-generator 3 | 4 | # Use this file to prevent files from being overwritten by the generator. 5 | # The patterns follow closely to .gitignore or .dockerignore. 6 | 7 | # As an example, the C# client generator defines ApiClient.cs. 8 | # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: 9 | #ApiClient.cs 10 | 11 | # You can match any string of characters against a directory, file or extension with a single asterisk (*): 12 | #foo/*/qux 13 | # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux 14 | 15 | # You can recursively match patterns against a directory, file or extension with a double asterisk (**): 16 | #foo/**/qux 17 | # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux 18 | 19 | # You can also negate patterns with an exclamation (!). 20 | # For example, you can ignore all files in a docs folder with the file extension .md: 21 | #docs/*.md 22 | # Then explicitly reverse the ignore rule for a single file: 23 | #!docs/README.md 24 | -------------------------------------------------------------------------------- /.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | 4.0.0 -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # ref: https://docs.travis-ci.com/user/languages/python 2 | language: python 3 | python: 4 | - "2.7" 5 | - "3.2" 6 | - "3.3" 7 | - "3.4" 8 | - "3.5" 9 | #- "3.5-dev" # 3.5 development branch 10 | #- "nightly" # points to the latest development branch e.g. 3.6-dev 11 | # command to install dependencies 12 | install: "pip install -r requirements.txt" 13 | # command to run tests 14 | script: nosetests 15 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2019 Opsgenie 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /docs/AccountApi.md: -------------------------------------------------------------------------------- 1 | # opsgenie_sdk.AccountApi 2 | 3 | All URIs are relative to *https://api.opsgenie.com* 4 | 5 | Method | HTTP request | Description 6 | ------------- | ------------- | ------------- 7 | [**get_info**](AccountApi.md#get_info) | **GET** /v2/account | Get Account Info 8 | 9 | 10 | # **get_info** 11 | > GetAccountInfoResponse get_info() 12 | 13 | Get Account Info 14 | 15 | Used to search and retrieve account information in OpsGenie 16 | 17 | ### Example 18 | 19 | * Api Key Authentication (GenieKey): 20 | ```python 21 | from __future__ import print_function 22 | import time 23 | import opsgenie_sdk 24 | from opsgenie_sdk.rest import ApiException 25 | from pprint import pprint 26 | configuration = opsgenie_sdk.Configuration() 27 | # Configure API key authorization: GenieKey 28 | configuration.api_key['Authorization'] = 'YOUR_API_KEY' 29 | 30 | # create an instance of the API class 31 | api_instance = opsgenie_sdk.AccountApi(opsgenie_sdk.ApiClient(configuration)) 32 | 33 | try: 34 | # Get Account Info 35 | api_response = api_instance.get_info() 36 | pprint(api_response) 37 | except ApiException as e: 38 | print("Exception when calling AccountApi->get_info: %s\n" % e) 39 | ``` 40 | 41 | ### Parameters 42 | This endpoint does not need any parameter. 43 | 44 | ### Return type 45 | 46 | [**GetAccountInfoResponse**](GetAccountInfoResponse.md) 47 | 48 | ### Authorization 49 | 50 | [GenieKey](../README.md#GenieKey) 51 | 52 | ### HTTP request headers 53 | 54 | - **Content-Type**: Not defined 55 | - **Accept**: application/json 56 | 57 | [[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) 58 | 59 | -------------------------------------------------------------------------------- /docs/AccountInfo.md: -------------------------------------------------------------------------------- 1 | # AccountInfo 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **name** | **str** | | [optional] 7 | **user_count** | **int** | | [optional] 8 | **plan** | [**AccountPlan**](AccountPlan.md) | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/AccountPlan.md: -------------------------------------------------------------------------------- 1 | # AccountPlan 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **max_user_count** | **int** | | [optional] 7 | **name** | **str** | | [optional] 8 | **is_yearly** | **bool** | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/AcknowledgeAlertPayload.md: -------------------------------------------------------------------------------- 1 | # AcknowledgeAlertPayload 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **user** | **str** | Display name of the request owner | [optional] 7 | **note** | **str** | Additional note that will be added while creating the alert | [optional] 8 | **source** | **str** | Source field of the alert. Default value is IP address of the incoming request | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/AddDetailsToAlertPayload.md: -------------------------------------------------------------------------------- 1 | # AddDetailsToAlertPayload 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **user** | **str** | Display name of the request owner | [optional] 7 | **note** | **str** | Additional note that will be added while creating the alert | [optional] 8 | **source** | **str** | Source field of the alert. Default value is IP address of the incoming request | [optional] 9 | **details** | **dict(str, str)** | Key-value pairs to add as custom property into alert. | 10 | 11 | [[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 | 13 | 14 | -------------------------------------------------------------------------------- /docs/AddDetailsToAlertPayloadAllOf.md: -------------------------------------------------------------------------------- 1 | # AddDetailsToAlertPayloadAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **details** | **dict(str, str)** | Key-value pairs to add as custom property into alert. | 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/AddNoteToAlertPayload.md: -------------------------------------------------------------------------------- 1 | # AddNoteToAlertPayload 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **user** | **str** | Display name of the request owner | [optional] 7 | **note** | **str** | Additional note that will be added while creating the alert | [optional] 8 | **source** | **str** | Source field of the alert. Default value is IP address of the incoming request | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/AddResponderToAlertPayload.md: -------------------------------------------------------------------------------- 1 | # AddResponderToAlertPayload 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **user** | **str** | Display name of the request owner | [optional] 7 | **note** | **str** | Additional note that will be added while creating the alert | [optional] 8 | **source** | **str** | Source field of the alert. Default value is IP address of the incoming request | [optional] 9 | **responder** | [**Recipient**](Recipient.md) | | 10 | 11 | [[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 | 13 | 14 | -------------------------------------------------------------------------------- /docs/AddResponderToAlertPayloadAllOf.md: -------------------------------------------------------------------------------- 1 | # AddResponderToAlertPayloadAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **responder** | [**Recipient**](Recipient.md) | | 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/AddTagsToAlertPayload.md: -------------------------------------------------------------------------------- 1 | # AddTagsToAlertPayload 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **user** | **str** | Display name of the request owner | [optional] 7 | **note** | **str** | Additional note that will be added while creating the alert | [optional] 8 | **source** | **str** | Source field of the alert. Default value is IP address of the incoming request | [optional] 9 | **tags** | **list[str]** | | 10 | 11 | [[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 | 13 | 14 | -------------------------------------------------------------------------------- /docs/AddTagsToAlertPayloadAllOf.md: -------------------------------------------------------------------------------- 1 | # AddTagsToAlertPayloadAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **tags** | **list[str]** | | 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/AddTeamToAlertPayload.md: -------------------------------------------------------------------------------- 1 | # AddTeamToAlertPayload 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **user** | **str** | Display name of the request owner | [optional] 7 | **note** | **str** | Additional note that will be added while creating the alert | [optional] 8 | **source** | **str** | Source field of the alert. Default value is IP address of the incoming request | [optional] 9 | **team** | [**TeamRecipient**](TeamRecipient.md) | | 10 | 11 | [[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 | 13 | 14 | -------------------------------------------------------------------------------- /docs/AddTeamToAlertPayloadAllOf.md: -------------------------------------------------------------------------------- 1 | # AddTeamToAlertPayloadAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **team** | [**TeamRecipient**](TeamRecipient.md) | | 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Alert.md: -------------------------------------------------------------------------------- 1 | # Alert 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **str** | | 7 | **tiny_id** | **str** | | [optional] 8 | **alias** | **str** | | [optional] 9 | **message** | **str** | | [optional] 10 | **status** | **str** | | [optional] 11 | **acknowledged** | **bool** | | [optional] 12 | **is_seen** | **bool** | | [optional] 13 | **tags** | **list[str]** | | [optional] 14 | **snoozed** | **bool** | | [optional] 15 | **snoozed_until** | **datetime** | | [optional] 16 | **count** | **int** | | [optional] 17 | **last_occurred_at** | **datetime** | | [optional] 18 | **created_at** | **datetime** | | [optional] 19 | **updated_at** | **datetime** | | [optional] 20 | **source** | **str** | | [optional] 21 | **owner** | **str** | | [optional] 22 | **priority** | **str** | | [optional] 23 | **responders** | [**list[Responder]**](Responder.md) | | [optional] 24 | **integration** | [**AlertIntegration**](AlertIntegration.md) | | [optional] 25 | **report** | [**AlertReport**](AlertReport.md) | | [optional] 26 | **actions** | **list[str]** | | [optional] 27 | **entity** | **str** | | [optional] 28 | **description** | **str** | | [optional] 29 | **details** | **dict(str, str)** | | [optional] 30 | 31 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 32 | 33 | 34 | -------------------------------------------------------------------------------- /docs/AlertActionPayload.md: -------------------------------------------------------------------------------- 1 | # AlertActionPayload 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **user** | **str** | Display name of the request owner | [optional] 7 | **note** | **str** | Additional note that will be added while creating the alert | [optional] 8 | **source** | **str** | Source field of the alert. Default value is IP address of the incoming request | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/AlertAllOf.md: -------------------------------------------------------------------------------- 1 | # AlertAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **actions** | **list[str]** | | [optional] 7 | **entity** | **str** | | [optional] 8 | **description** | **str** | | [optional] 9 | **details** | **dict(str, str)** | | [optional] 10 | 11 | [[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 | 13 | 14 | -------------------------------------------------------------------------------- /docs/AlertAttachment.md: -------------------------------------------------------------------------------- 1 | # AlertAttachment 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **name** | **str** | | [optional] 7 | **url** | **str** | | [optional] 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/AlertAttachmentMeta.md: -------------------------------------------------------------------------------- 1 | # AlertAttachmentMeta 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **name** | **str** | | [optional] 7 | **id** | **str** | | [optional] 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/AlertIntegration.md: -------------------------------------------------------------------------------- 1 | # AlertIntegration 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **str** | | [optional] 7 | **name** | **str** | | [optional] 8 | **type** | **str** | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/AlertLog.md: -------------------------------------------------------------------------------- 1 | # AlertLog 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **log** | **str** | | [optional] 7 | **type** | **str** | | [optional] 8 | **owner** | **str** | | [optional] 9 | **created_at** | **datetime** | | [optional] 10 | **offset** | **str** | | [optional] 11 | 12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/AlertNote.md: -------------------------------------------------------------------------------- 1 | # AlertNote 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **note** | **str** | | [optional] 7 | **owner** | **str** | | [optional] 8 | **created_at** | **datetime** | | [optional] 9 | **offset** | **str** | | [optional] 10 | 11 | [[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 | 13 | 14 | -------------------------------------------------------------------------------- /docs/AlertPaging.md: -------------------------------------------------------------------------------- 1 | # AlertPaging 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **first** | **str** | | [optional] 7 | **next** | **str** | | [optional] 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/AlertRecipient.md: -------------------------------------------------------------------------------- 1 | # AlertRecipient 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **user** | [**AlertUserMeta**](AlertUserMeta.md) | | [optional] 7 | **state** | **str** | | [optional] 8 | **method** | **str** | | [optional] 9 | **created_at** | **datetime** | | [optional] 10 | **updated_at** | **datetime** | | [optional] 11 | 12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/AlertReport.md: -------------------------------------------------------------------------------- 1 | # AlertReport 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **ack_time** | **int** | | [optional] 7 | **close_time** | **int** | | [optional] 8 | **acknowledged_by** | **str** | | [optional] 9 | **closed_by** | **str** | | [optional] 10 | 11 | [[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 | 13 | 14 | -------------------------------------------------------------------------------- /docs/AlertRequestStatus.md: -------------------------------------------------------------------------------- 1 | # AlertRequestStatus 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **action** | **str** | | [optional] 7 | **processed_at** | **datetime** | | [optional] 8 | **integration_id** | **str** | | [optional] 9 | **is_success** | **bool** | | [optional] 10 | **status** | **str** | | [optional] 11 | **alert_id** | **str** | | [optional] 12 | **alias** | **str** | | [optional] 13 | 14 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 15 | 16 | 17 | -------------------------------------------------------------------------------- /docs/AlertTeamMeta.md: -------------------------------------------------------------------------------- 1 | # AlertTeamMeta 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **str** | | 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/AlertUserMeta.md: -------------------------------------------------------------------------------- 1 | # AlertUserMeta 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **str** | | [optional] 7 | **username** | **str** | | [optional] 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/AllRecipient.md: -------------------------------------------------------------------------------- 1 | # AllRecipient 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | 7 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/AssignAlertPayload.md: -------------------------------------------------------------------------------- 1 | # AssignAlertPayload 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **user** | **str** | Display name of the request owner | [optional] 7 | **note** | **str** | Additional note that will be added while creating the alert | [optional] 8 | **source** | **str** | Source field of the alert. Default value is IP address of the incoming request | [optional] 9 | **owner** | [**UserRecipient**](UserRecipient.md) | | 10 | 11 | [[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 | 13 | 14 | -------------------------------------------------------------------------------- /docs/AssignAlertPayloadAllOf.md: -------------------------------------------------------------------------------- 1 | # AssignAlertPayloadAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **owner** | [**UserRecipient**](UserRecipient.md) | | 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/BaseAlert.md: -------------------------------------------------------------------------------- 1 | # BaseAlert 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **str** | | 7 | **tiny_id** | **str** | | [optional] 8 | **alias** | **str** | | [optional] 9 | **message** | **str** | | [optional] 10 | **status** | **str** | | [optional] 11 | **acknowledged** | **bool** | | [optional] 12 | **is_seen** | **bool** | | [optional] 13 | **tags** | **list[str]** | | [optional] 14 | **snoozed** | **bool** | | [optional] 15 | **snoozed_until** | **datetime** | | [optional] 16 | **count** | **int** | | [optional] 17 | **last_occurred_at** | **datetime** | | [optional] 18 | **created_at** | **datetime** | | [optional] 19 | **updated_at** | **datetime** | | [optional] 20 | **source** | **str** | | [optional] 21 | **owner** | **str** | | [optional] 22 | **priority** | **str** | | [optional] 23 | **responders** | [**list[Responder]**](Responder.md) | | [optional] 24 | **integration** | [**AlertIntegration**](AlertIntegration.md) | | [optional] 25 | **report** | [**AlertReport**](AlertReport.md) | | [optional] 26 | 27 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 28 | 29 | 30 | -------------------------------------------------------------------------------- /docs/BaseIncident.md: -------------------------------------------------------------------------------- 1 | # BaseIncident 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **str** | | 7 | **tiny_id** | **str** | | [optional] 8 | **message** | **str** | | [optional] 9 | **status** | **str** | | [optional] 10 | **is_seen** | **bool** | | [optional] 11 | **tags** | **list[str]** | | [optional] 12 | **created_at** | **datetime** | | [optional] 13 | **updated_at** | **datetime** | | [optional] 14 | **source** | **str** | | [optional] 15 | **owner** | **str** | | [optional] 16 | **priority** | **str** | | [optional] 17 | **responders** | [**list[Responder]**](Responder.md) | | [optional] 18 | **owner_team** | **str** | | [optional] 19 | **extra_properties** | **dict(str, str)** | Map of key-value pairs to use as custom properties of the incident | [optional] 20 | 21 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 22 | 23 | 24 | -------------------------------------------------------------------------------- /docs/BaseResponse.md: -------------------------------------------------------------------------------- 1 | # BaseResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **request_id** | **str** | | 7 | **took** | **float** | | [default to 0.0] 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/BaseResponseWithExpandable.md: -------------------------------------------------------------------------------- 1 | # BaseResponseWithExpandable 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **request_id** | **str** | | 7 | **took** | **float** | | [default to 0.0] 8 | **expandable** | **list[str]** | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/BaseResponseWithExpandableAllOf.md: -------------------------------------------------------------------------------- 1 | # BaseResponseWithExpandableAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **expandable** | **list[str]** | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/CloseAlertPayload.md: -------------------------------------------------------------------------------- 1 | # CloseAlertPayload 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **user** | **str** | Display name of the request owner | [optional] 7 | **note** | **str** | Additional note that will be added while creating the alert | [optional] 8 | **source** | **str** | Source field of the alert. Default value is IP address of the incoming request | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/CloseIncidentPayload.md: -------------------------------------------------------------------------------- 1 | # CloseIncidentPayload 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **note** | **str** | Additional note that will be included with the incident | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Condition.md: -------------------------------------------------------------------------------- 1 | # Condition 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **field** | **str** | Specifies which alert field will be used in condition. Possible values are message, alias, description, source, entity, tags, actions, extra-properties, recipients or teams | 7 | **key** | **str** | If field is set as extra-properties, key could be used for key-value pair | [optional] 8 | **_not** | **bool** | Indicates behaviour of the given operation. Default value is false | [optional] 9 | **operation** | **str** | It is the operation that will be executed for the given field and key. | 10 | **expected_value** | **str** | User defined value that will be compared with alert field according to the operation. Default value is empty string | [optional] 11 | **order** | **int** | Order of the condition in conditions list | [optional] 12 | 13 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/CreateAlertPayload.md: -------------------------------------------------------------------------------- 1 | # CreateAlertPayload 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **user** | **str** | Display name of the request owner | [optional] 7 | **note** | **str** | Additional note that will be added while creating the alert | [optional] 8 | **source** | **str** | Source field of the alert. Default value is IP address of the incoming request | [optional] 9 | **message** | **str** | Message of the alert | 10 | **alias** | **str** | Client-defined identifier of the alert, that is also the key element of alert deduplication. | [optional] 11 | **description** | **str** | Description field of the alert that is generally used to provide a detailed information about the alert. | [optional] 12 | **responders** | [**list[Recipient]**](Recipient.md) | Responders that the alert will be routed to send notifications | [optional] 13 | **visible_to** | [**list[Recipient]**](Recipient.md) | Teams and users that the alert will become visible to without sending any notification | [optional] 14 | **actions** | **list[str]** | Custom actions that will be available for the alert | [optional] 15 | **tags** | **list[str]** | Tags of the alert | [optional] 16 | **details** | **dict(str, str)** | Map of key-value pairs to use as custom properties of the alert | [optional] 17 | **entity** | **str** | Entity field of the alert that is generally used to specify which domain alert is related to | [optional] 18 | **priority** | **str** | Priority level of the alert | [optional] 19 | 20 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 21 | 22 | 23 | -------------------------------------------------------------------------------- /docs/CreateAlertPayloadAllOf.md: -------------------------------------------------------------------------------- 1 | # CreateAlertPayloadAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **message** | **str** | Message of the alert | 7 | **alias** | **str** | Client-defined identifier of the alert, that is also the key element of alert deduplication. | [optional] 8 | **description** | **str** | Description field of the alert that is generally used to provide a detailed information about the alert. | [optional] 9 | **responders** | [**list[Recipient]**](Recipient.md) | Responders that the alert will be routed to send notifications | [optional] 10 | **visible_to** | [**list[Recipient]**](Recipient.md) | Teams and users that the alert will become visible to without sending any notification | [optional] 11 | **actions** | **list[str]** | Custom actions that will be available for the alert | [optional] 12 | **tags** | **list[str]** | Tags of the alert | [optional] 13 | **details** | **dict(str, str)** | Map of key-value pairs to use as custom properties of the alert | [optional] 14 | **entity** | **str** | Entity field of the alert that is generally used to specify which domain alert is related to | [optional] 15 | **priority** | **str** | Priority level of the alert | [optional] 16 | 17 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/CreateHeartbeatPayload.md: -------------------------------------------------------------------------------- 1 | # CreateHeartbeatPayload 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **name** | **str** | Name of the heartbeat | 7 | **description** | **str** | An optional description of the heartbeat | [optional] 8 | **interval** | **int** | Specifies how often a heartbeat message should be expected | 9 | **interval_unit** | **str** | Interval specified as 'minutes', 'hours' or 'days' | 10 | **enabled** | **bool** | Enable/disable heartbeat monitoring | 11 | **owner_team** | [**CreateHeartbeatPayloadAllOfOwnerTeam**](CreateHeartbeatPayloadAllOfOwnerTeam.md) | | [optional] 12 | **alert_message** | **str** | Specifies the alert message for heartbeat expiration alert. If this is not provided, default alert message is 'HeartbeatName is expired' | [optional] 13 | **alert_tags** | **list[str]** | Specifies the alert tags for heartbeat expiration alert | [optional] 14 | **alert_priority** | **str** | Specifies the alert priority for heartbeat expiration alert. If this is not provided, default priority is P3 | [optional] 15 | 16 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/CreateHeartbeatPayloadAllOf.md: -------------------------------------------------------------------------------- 1 | # CreateHeartbeatPayloadAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **name** | **str** | Name of the heartbeat | 7 | **description** | **str** | An optional description of the heartbeat | [optional] 8 | **interval** | **int** | Specifies how often a heartbeat message should be expected | 9 | **interval_unit** | **str** | Interval specified as 'minutes', 'hours' or 'days' | 10 | **enabled** | **bool** | Enable/disable heartbeat monitoring | 11 | **owner_team** | [**CreateHeartbeatPayloadAllOfOwnerTeam**](CreateHeartbeatPayloadAllOfOwnerTeam.md) | | [optional] 12 | **alert_message** | **str** | Specifies the alert message for heartbeat expiration alert. If this is not provided, default alert message is 'HeartbeatName is expired' | [optional] 13 | **alert_tags** | **list[str]** | Specifies the alert tags for heartbeat expiration alert | [optional] 14 | **alert_priority** | **str** | Specifies the alert priority for heartbeat expiration alert. If this is not provided, default priority is P3 | [optional] 15 | 16 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/CreateHeartbeatPayloadAllOfOwnerTeam.md: -------------------------------------------------------------------------------- 1 | # CreateHeartbeatPayloadAllOfOwnerTeam 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **name** | **str** | | [optional] 7 | **id** | **str** | | [optional] 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/CreateHeartbeatResponse.md: -------------------------------------------------------------------------------- 1 | # CreateHeartbeatResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **request_id** | **str** | | 7 | **took** | **float** | | [default to 0.0] 8 | **data** | [**Heartbeat**](Heartbeat.md) | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/CreateHeartbeatResponseAllOf.md: -------------------------------------------------------------------------------- 1 | # CreateHeartbeatResponseAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**Heartbeat**](Heartbeat.md) | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/CreateIncidentPayload.md: -------------------------------------------------------------------------------- 1 | # CreateIncidentPayload 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **message** | **str** | Message of the incident | [optional] 7 | **description** | **str** | Description field of the incident that is generally used to provide a detailed information about the incident. | [optional] 8 | **responders** | [**list[Recipient]**](Recipient.md) | Responders that the incident will be routed to send notifications | [optional] 9 | **tags** | **list[str]** | Tags of the incident. | [optional] 10 | **details** | **dict(str, str)** | Map of key-value pairs to use as custom properties of the incident | [optional] 11 | **priority** | **str** | Priority level of the incident | [optional] 12 | **note** | **str** | Additional note that will be added while creating the incident | [optional] 13 | **service_id** | **str** | Service on which incident will be created. | [optional] 14 | **status_page_entry** | [**dict(str, StatusPageEntry)**](StatusPageEntry.md) | Status page entry fields. If this field is leaved blank, message and description of incident will be used for title and detail respectively. | [optional] 15 | **notify_stakeholders** | **bool** | Indicate whether stakeholders are notified or not. Default value is false. | [optional] 16 | 17 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/CreateIncidentPayloadAllOf.md: -------------------------------------------------------------------------------- 1 | # CreateIncidentPayloadAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **message** | **str** | Message of the incident | [optional] 7 | **description** | **str** | Description field of the incident that is generally used to provide a detailed information about the incident. | [optional] 8 | **responders** | [**list[Recipient]**](Recipient.md) | Responders that the incident will be routed to send notifications | [optional] 9 | **tags** | **list[str]** | Tags of the incident. | [optional] 10 | **details** | **dict(str, str)** | Map of key-value pairs to use as custom properties of the incident | [optional] 11 | **priority** | **str** | Priority level of the incident | [optional] 12 | **note** | **str** | Additional note that will be added while creating the incident | [optional] 13 | **service_id** | **str** | Service on which incident will be created. | [optional] 14 | **status_page_entry** | [**dict(str, StatusPageEntry)**](StatusPageEntry.md) | Status page entry fields. If this field is leaved blank, message and description of incident will be used for title and detail respectively. | [optional] 15 | **notify_stakeholders** | **bool** | Indicate whether stakeholders are notified or not. Default value is false. | [optional] 16 | 17 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/CreateSavedSearchPayload.md: -------------------------------------------------------------------------------- 1 | # CreateSavedSearchPayload 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **name** | **str** | | 7 | **description** | **str** | | [optional] 8 | **query** | **str** | | 9 | **owner** | [**UserRecipient**](UserRecipient.md) | | 10 | **teams** | [**list[TeamRecipient]**](TeamRecipient.md) | Teams that the alert will be routed to send notifications | [optional] 11 | 12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/CreateSavedSearchResponse.md: -------------------------------------------------------------------------------- 1 | # CreateSavedSearchResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **request_id** | **str** | | 7 | **took** | **float** | | [default to 0.0] 8 | **data** | [**SavedSearchMeta**](SavedSearchMeta.md) | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/CreateSavedSearchResponseAllOf.md: -------------------------------------------------------------------------------- 1 | # CreateSavedSearchResponseAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**SavedSearchMeta**](SavedSearchMeta.md) | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/DisableHeartbeatResponse.md: -------------------------------------------------------------------------------- 1 | # DisableHeartbeatResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **request_id** | **str** | | 7 | **took** | **float** | | [default to 0.0] 8 | **data** | [**HeartbeatMeta**](HeartbeatMeta.md) | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/DisableHeartbeatResponseAllOf.md: -------------------------------------------------------------------------------- 1 | # DisableHeartbeatResponseAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**HeartbeatMeta**](HeartbeatMeta.md) | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Duration.md: -------------------------------------------------------------------------------- 1 | # Duration 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **time_amount** | **int** | | 7 | **time_unit** | **str** | | [optional] [default to 'minutes'] 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/EnableHeartbeatResponse.md: -------------------------------------------------------------------------------- 1 | # EnableHeartbeatResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **request_id** | **str** | | 7 | **took** | **float** | | [default to 0.0] 8 | **data** | [**HeartbeatMeta**](HeartbeatMeta.md) | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/ErrorResponse.md: -------------------------------------------------------------------------------- 1 | # ErrorResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **request_id** | **str** | | 7 | **took** | **float** | | [default to 0.0] 8 | **message** | **str** | | [optional] 9 | **code** | **int** | | [optional] 10 | **response_headers** | **dict(str, list[str])** | | [optional] 11 | 12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/ErrorResponseAllOf.md: -------------------------------------------------------------------------------- 1 | # ErrorResponseAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **message** | **str** | | [optional] 7 | **code** | **int** | | [optional] 8 | **response_headers** | **dict(str, list[str])** | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/EscalateAlertToNextPayload.md: -------------------------------------------------------------------------------- 1 | # EscalateAlertToNextPayload 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **user** | **str** | Display name of the request owner | [optional] 7 | **note** | **str** | Additional note that will be added while creating the alert | [optional] 8 | **source** | **str** | Source field of the alert. Default value is IP address of the incoming request | [optional] 9 | **escalation** | [**EscalationRecipient**](EscalationRecipient.md) | | 10 | 11 | [[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 | 13 | 14 | -------------------------------------------------------------------------------- /docs/EscalateAlertToNextPayloadAllOf.md: -------------------------------------------------------------------------------- 1 | # EscalateAlertToNextPayloadAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **escalation** | [**EscalationRecipient**](EscalationRecipient.md) | | 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/EscalationRecipient.md: -------------------------------------------------------------------------------- 1 | # EscalationRecipient 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **name** | **str** | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/ExecuteCustomAlertActionPayload.md: -------------------------------------------------------------------------------- 1 | # ExecuteCustomAlertActionPayload 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **user** | **str** | Display name of the request owner | [optional] 7 | **note** | **str** | Additional note that will be added while creating the alert | [optional] 8 | **source** | **str** | Source field of the alert. Default value is IP address of the incoming request | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/Filter.md: -------------------------------------------------------------------------------- 1 | # Filter 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **type** | **str** | | 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/GetAccountInfoResponse.md: -------------------------------------------------------------------------------- 1 | # GetAccountInfoResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **request_id** | **str** | | 7 | **took** | **float** | | [default to 0.0] 8 | **data** | [**AccountInfo**](AccountInfo.md) | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/GetAccountInfoResponseAllOf.md: -------------------------------------------------------------------------------- 1 | # GetAccountInfoResponseAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**AccountInfo**](AccountInfo.md) | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/GetAlertAttachmentResponse.md: -------------------------------------------------------------------------------- 1 | # GetAlertAttachmentResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **request_id** | **str** | | 7 | **took** | **float** | | [default to 0.0] 8 | **data** | [**AlertAttachment**](AlertAttachment.md) | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/GetAlertAttachmentResponseAllOf.md: -------------------------------------------------------------------------------- 1 | # GetAlertAttachmentResponseAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**AlertAttachment**](AlertAttachment.md) | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/GetAlertResponse.md: -------------------------------------------------------------------------------- 1 | # GetAlertResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **request_id** | **str** | | 7 | **took** | **float** | | [default to 0.0] 8 | **data** | [**Alert**](Alert.md) | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/GetAlertResponseAllOf.md: -------------------------------------------------------------------------------- 1 | # GetAlertResponseAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**Alert**](Alert.md) | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/GetCountAlertsResponse.md: -------------------------------------------------------------------------------- 1 | # GetCountAlertsResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **request_id** | **str** | | 7 | **took** | **float** | | [default to 0.0] 8 | **data** | [**GetCountAlertsResponseAllOfData**](GetCountAlertsResponseAllOfData.md) | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/GetCountAlertsResponseAllOf.md: -------------------------------------------------------------------------------- 1 | # GetCountAlertsResponseAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**GetCountAlertsResponseAllOfData**](GetCountAlertsResponseAllOfData.md) | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/GetCountAlertsResponseAllOfData.md: -------------------------------------------------------------------------------- 1 | # GetCountAlertsResponseAllOfData 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **count** | **int** | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/GetHeartbeatResponse.md: -------------------------------------------------------------------------------- 1 | # GetHeartbeatResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **request_id** | **str** | | 7 | **took** | **float** | | [default to 0.0] 8 | **data** | [**Heartbeat**](Heartbeat.md) | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/GetIncidentRequestStatusResponse.md: -------------------------------------------------------------------------------- 1 | # GetIncidentRequestStatusResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **request_id** | **str** | | 7 | **took** | **float** | | [default to 0.0] 8 | **data** | [**IncidentRequestStatus**](IncidentRequestStatus.md) | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/GetIncidentRequestStatusResponseAllOf.md: -------------------------------------------------------------------------------- 1 | # GetIncidentRequestStatusResponseAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**IncidentRequestStatus**](IncidentRequestStatus.md) | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/GetIncidentResponse.md: -------------------------------------------------------------------------------- 1 | # GetIncidentResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **request_id** | **str** | | 7 | **took** | **float** | | [default to 0.0] 8 | **data** | [**Incident**](Incident.md) | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/GetIncidentResponseAllOf.md: -------------------------------------------------------------------------------- 1 | # GetIncidentResponseAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**Incident**](Incident.md) | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/GetRequestStatusResponse.md: -------------------------------------------------------------------------------- 1 | # GetRequestStatusResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **request_id** | **str** | | 7 | **took** | **float** | | [default to 0.0] 8 | **data** | [**AlertRequestStatus**](AlertRequestStatus.md) | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/GetRequestStatusResponseAllOf.md: -------------------------------------------------------------------------------- 1 | # GetRequestStatusResponseAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**AlertRequestStatus**](AlertRequestStatus.md) | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/GetSavedSearchResponse.md: -------------------------------------------------------------------------------- 1 | # GetSavedSearchResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **request_id** | **str** | | 7 | **took** | **float** | | [default to 0.0] 8 | **data** | [**SavedSearch**](SavedSearch.md) | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/GetSavedSearchResponseAllOf.md: -------------------------------------------------------------------------------- 1 | # GetSavedSearchResponseAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**SavedSearch**](SavedSearch.md) | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/GroupRecipient.md: -------------------------------------------------------------------------------- 1 | # GroupRecipient 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **name** | **str** | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Heartbeat.md: -------------------------------------------------------------------------------- 1 | # Heartbeat 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **name** | **str** | | [optional] 7 | **description** | **str** | | [optional] 8 | **interval** | **int** | | [optional] 9 | **enabled** | **bool** | | [optional] 10 | **interval_unit** | **str** | | [optional] 11 | **expired** | **bool** | | [optional] 12 | **last_ping_time** | **datetime** | | [optional] 13 | 14 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 15 | 16 | 17 | -------------------------------------------------------------------------------- /docs/HeartbeatMeta.md: -------------------------------------------------------------------------------- 1 | # HeartbeatMeta 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **name** | **str** | | [optional] 7 | **enabled** | **bool** | | [optional] 8 | **expired** | **bool** | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/Incident.md: -------------------------------------------------------------------------------- 1 | # Incident 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **str** | | 7 | **tiny_id** | **str** | | [optional] 8 | **message** | **str** | | [optional] 9 | **status** | **str** | | [optional] 10 | **is_seen** | **bool** | | [optional] 11 | **tags** | **list[str]** | | [optional] 12 | **created_at** | **datetime** | | [optional] 13 | **updated_at** | **datetime** | | [optional] 14 | **source** | **str** | | [optional] 15 | **owner** | **str** | | [optional] 16 | **priority** | **str** | | [optional] 17 | **responders** | [**list[Responder]**](Responder.md) | | [optional] 18 | **owner_team** | **str** | | [optional] 19 | **extra_properties** | **dict(str, str)** | Map of key-value pairs to use as custom properties of the incident | [optional] 20 | **request_id** | **str** | | [optional] 21 | 22 | [[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 | 24 | 25 | -------------------------------------------------------------------------------- /docs/IncidentActionPayload.md: -------------------------------------------------------------------------------- 1 | # IncidentActionPayload 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **note** | **str** | Additional note that will be included with the incident | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/IncidentAllOf.md: -------------------------------------------------------------------------------- 1 | # IncidentAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **request_id** | **str** | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/IncidentRequestStatus.md: -------------------------------------------------------------------------------- 1 | # IncidentRequestStatus 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **success** | **bool** | | [optional] 7 | **action** | **str** | | [optional] 8 | **processed_at** | **datetime** | | [optional] 9 | **integration_id** | **str** | | [optional] 10 | **is_success** | **bool** | | [optional] 11 | **status** | **str** | | [optional] 12 | **incident_id** | **str** | | [optional] 13 | 14 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 15 | 16 | 17 | -------------------------------------------------------------------------------- /docs/ListAlertAttachmentsResponse.md: -------------------------------------------------------------------------------- 1 | # ListAlertAttachmentsResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **request_id** | **str** | | 7 | **took** | **float** | | [default to 0.0] 8 | **data** | [**list[AlertAttachmentMeta]**](AlertAttachmentMeta.md) | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/ListAlertAttachmentsResponseAllOf.md: -------------------------------------------------------------------------------- 1 | # ListAlertAttachmentsResponseAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**list[AlertAttachmentMeta]**](AlertAttachmentMeta.md) | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/ListAlertLogsResponse.md: -------------------------------------------------------------------------------- 1 | # ListAlertLogsResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **request_id** | **str** | | 7 | **took** | **float** | | [default to 0.0] 8 | **data** | [**list[AlertLog]**](AlertLog.md) | | [optional] 9 | **paging** | [**AlertPaging**](AlertPaging.md) | | [optional] 10 | 11 | [[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 | 13 | 14 | -------------------------------------------------------------------------------- /docs/ListAlertLogsResponseAllOf.md: -------------------------------------------------------------------------------- 1 | # ListAlertLogsResponseAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**list[AlertLog]**](AlertLog.md) | | [optional] 7 | **paging** | [**AlertPaging**](AlertPaging.md) | | [optional] 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/ListAlertNotesResponse.md: -------------------------------------------------------------------------------- 1 | # ListAlertNotesResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **request_id** | **str** | | 7 | **took** | **float** | | [default to 0.0] 8 | **data** | [**list[AlertNote]**](AlertNote.md) | | [optional] 9 | **paging** | [**AlertPaging**](AlertPaging.md) | | [optional] 10 | 11 | [[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 | 13 | 14 | -------------------------------------------------------------------------------- /docs/ListAlertNotesResponseAllOf.md: -------------------------------------------------------------------------------- 1 | # ListAlertNotesResponseAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**list[AlertNote]**](AlertNote.md) | | [optional] 7 | **paging** | [**AlertPaging**](AlertPaging.md) | | [optional] 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/ListAlertRecipientsResponse.md: -------------------------------------------------------------------------------- 1 | # ListAlertRecipientsResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **request_id** | **str** | | 7 | **took** | **float** | | [default to 0.0] 8 | **data** | [**list[AlertRecipient]**](AlertRecipient.md) | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/ListAlertRecipientsResponseAllOf.md: -------------------------------------------------------------------------------- 1 | # ListAlertRecipientsResponseAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**list[AlertRecipient]**](AlertRecipient.md) | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/ListAlertsResponse.md: -------------------------------------------------------------------------------- 1 | # ListAlertsResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **request_id** | **str** | | 7 | **took** | **float** | | [default to 0.0] 8 | **data** | [**list[BaseAlert]**](BaseAlert.md) | | [optional] 9 | **paging** | [**PageDetails**](PageDetails.md) | | [optional] 10 | 11 | [[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 | 13 | 14 | -------------------------------------------------------------------------------- /docs/ListAlertsResponseAllOf.md: -------------------------------------------------------------------------------- 1 | # ListAlertsResponseAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**list[BaseAlert]**](BaseAlert.md) | | [optional] 7 | **paging** | [**PageDetails**](PageDetails.md) | | [optional] 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/ListHeartbeatResponse.md: -------------------------------------------------------------------------------- 1 | # ListHeartbeatResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **request_id** | **str** | | 7 | **took** | **float** | | [default to 0.0] 8 | **data** | [**ListHeartbeatResponseAllOfData**](ListHeartbeatResponseAllOfData.md) | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/ListHeartbeatResponseAllOf.md: -------------------------------------------------------------------------------- 1 | # ListHeartbeatResponseAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**ListHeartbeatResponseAllOfData**](ListHeartbeatResponseAllOfData.md) | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/ListHeartbeatResponseAllOfData.md: -------------------------------------------------------------------------------- 1 | # ListHeartbeatResponseAllOfData 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **heartbeats** | [**list[Heartbeat]**](Heartbeat.md) | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/ListIncidentsResponse.md: -------------------------------------------------------------------------------- 1 | # ListIncidentsResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **request_id** | **str** | | 7 | **took** | **float** | | [default to 0.0] 8 | **data** | [**list[BaseIncident]**](BaseIncident.md) | | [optional] 9 | **paging** | [**PageDetails**](PageDetails.md) | | [optional] 10 | 11 | [[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 | 13 | 14 | -------------------------------------------------------------------------------- /docs/ListIncidentsResponseAllOf.md: -------------------------------------------------------------------------------- 1 | # ListIncidentsResponseAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**list[BaseIncident]**](BaseIncident.md) | | [optional] 7 | **paging** | [**PageDetails**](PageDetails.md) | | [optional] 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/ListSavedSearchesResponse.md: -------------------------------------------------------------------------------- 1 | # ListSavedSearchesResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **request_id** | **str** | | 7 | **took** | **float** | | [default to 0.0] 8 | **data** | [**list[SavedSearchMeta]**](SavedSearchMeta.md) | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/ListSavedSearchesResponseAllOf.md: -------------------------------------------------------------------------------- 1 | # ListSavedSearchesResponseAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **data** | [**list[SavedSearchMeta]**](SavedSearchMeta.md) | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/MatchAll.md: -------------------------------------------------------------------------------- 1 | # MatchAll 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | 7 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/MatchAllConditions.md: -------------------------------------------------------------------------------- 1 | # MatchAllConditions 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **conditions** | [**list[Condition]**](Condition.md) | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/MatchAnyCondition.md: -------------------------------------------------------------------------------- 1 | # MatchAnyCondition 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **conditions** | [**list[Condition]**](Condition.md) | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/MatchAnyConditionAllOf.md: -------------------------------------------------------------------------------- 1 | # MatchAnyConditionAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **conditions** | [**list[Condition]**](Condition.md) | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/NoRecipient.md: -------------------------------------------------------------------------------- 1 | # NoRecipient 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | 7 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/PageDetails.md: -------------------------------------------------------------------------------- 1 | # PageDetails 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **prev** | **str** | | [optional] 7 | **next** | **str** | | [optional] 8 | **first** | **str** | | [optional] 9 | **last** | **str** | | [optional] 10 | 11 | [[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 | 13 | 14 | -------------------------------------------------------------------------------- /docs/Recipient.md: -------------------------------------------------------------------------------- 1 | # Recipient 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **type** | **str** | | 7 | **id** | **str** | | [optional] 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/Responder.md: -------------------------------------------------------------------------------- 1 | # Responder 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **type** | **str** | | 7 | **id** | **str** | | 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/SavedSearch.md: -------------------------------------------------------------------------------- 1 | # SavedSearch 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **str** | | [optional] 7 | **name** | **str** | | [optional] 8 | **created_at** | **datetime** | | [optional] 9 | **updated_at** | **datetime** | | [optional] 10 | **owner** | [**SavedSearchEntity**](SavedSearchEntity.md) | | [optional] 11 | **teams** | [**list[SavedSearchEntity]**](SavedSearchEntity.md) | | [optional] 12 | **description** | **str** | | [optional] 13 | **query** | **str** | | [optional] 14 | 15 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 16 | 17 | 18 | -------------------------------------------------------------------------------- /docs/SavedSearchEntity.md: -------------------------------------------------------------------------------- 1 | # SavedSearchEntity 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **str** | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/SavedSearchMeta.md: -------------------------------------------------------------------------------- 1 | # SavedSearchMeta 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **str** | | [optional] 7 | **name** | **str** | | [optional] 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/ScheduleRecipient.md: -------------------------------------------------------------------------------- 1 | # ScheduleRecipient 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **name** | **str** | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/SnoozeAlertPayload.md: -------------------------------------------------------------------------------- 1 | # SnoozeAlertPayload 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **user** | **str** | Display name of the request owner | [optional] 7 | **note** | **str** | Additional note that will be added while creating the alert | [optional] 8 | **source** | **str** | Source field of the alert. Default value is IP address of the incoming request | [optional] 9 | **end_time** | **datetime** | Date and time that snooze will lose effect | 10 | 11 | [[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 | 13 | 14 | -------------------------------------------------------------------------------- /docs/SnoozeAlertPayloadAllOf.md: -------------------------------------------------------------------------------- 1 | # SnoozeAlertPayloadAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **end_time** | **datetime** | Date and time that snooze will lose effect | 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/StatusPageEntry.md: -------------------------------------------------------------------------------- 1 | # StatusPageEntry 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **title** | **str** | The message to be added using status page into incident | [optional] 7 | **details** | **str** | Description of the message being added via stats page into incident | [optional] 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/StatusPageEntryAllOf.md: -------------------------------------------------------------------------------- 1 | # StatusPageEntryAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **title** | **str** | The message to be added using status page into incident | [optional] 7 | **details** | **str** | Description of the message being added via stats page into incident | [optional] 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/SuccessData.md: -------------------------------------------------------------------------------- 1 | # SuccessData 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **str** | | [optional] 7 | **name** | **str** | | [optional] 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/SuccessResponse.md: -------------------------------------------------------------------------------- 1 | # SuccessResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **request_id** | **str** | | 7 | **took** | **float** | | [default to 0.0] 8 | **result** | **str** | | [optional] 9 | **data** | [**SuccessData**](SuccessData.md) | | [optional] 10 | 11 | [[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 | 13 | 14 | -------------------------------------------------------------------------------- /docs/SuccessResponseAllOf.md: -------------------------------------------------------------------------------- 1 | # SuccessResponseAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **result** | **str** | | [optional] 7 | **data** | [**SuccessData**](SuccessData.md) | | [optional] 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/TeamRecipient.md: -------------------------------------------------------------------------------- 1 | # TeamRecipient 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **name** | **str** | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/TeamRecipientAllOf.md: -------------------------------------------------------------------------------- 1 | # TeamRecipientAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **name** | **str** | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/TeamResponder.md: -------------------------------------------------------------------------------- 1 | # TeamResponder 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **type** | **str** | | 7 | **id** | **str** | | 8 | **name** | **str** | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/TimeOfDayRestriction.md: -------------------------------------------------------------------------------- 1 | # TimeOfDayRestriction 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **start_hour** | **int** | | [optional] 7 | **start_min** | **int** | | [optional] 8 | **end_hour** | **int** | | [optional] 9 | **end_min** | **int** | | [optional] 10 | 11 | [[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 | 13 | 14 | -------------------------------------------------------------------------------- /docs/TimeOfDayRestrictionInterval.md: -------------------------------------------------------------------------------- 1 | # TimeOfDayRestrictionInterval 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **restriction** | [**TimeOfDayRestriction**](TimeOfDayRestriction.md) | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/TimeOfDayRestrictionIntervalAllOf.md: -------------------------------------------------------------------------------- 1 | # TimeOfDayRestrictionIntervalAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **restriction** | [**TimeOfDayRestriction**](TimeOfDayRestriction.md) | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/TimeRestrictionInterval.md: -------------------------------------------------------------------------------- 1 | # TimeRestrictionInterval 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **type** | **str** | | 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/UnAcknowledgeAlertPayload.md: -------------------------------------------------------------------------------- 1 | # UnAcknowledgeAlertPayload 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **user** | **str** | Display name of the request owner | [optional] 7 | **note** | **str** | Additional note that will be added while creating the alert | [optional] 8 | **source** | **str** | Source field of the alert. Default value is IP address of the incoming request | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/UpdateAlertDescriptionPayload.md: -------------------------------------------------------------------------------- 1 | # UpdateAlertDescriptionPayload 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **description** | **str** | Description of the alert | 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/UpdateAlertMessagePayload.md: -------------------------------------------------------------------------------- 1 | # UpdateAlertMessagePayload 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **message** | **str** | Message of the alert | 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/UpdateAlertPriorityPayload.md: -------------------------------------------------------------------------------- 1 | # UpdateAlertPriorityPayload 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **priority** | **str** | Priority level of the alert | 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/UpdateHeartbeatPayload.md: -------------------------------------------------------------------------------- 1 | # UpdateHeartbeatPayload 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **description** | **str** | An optional description of the heartbeat | [optional] 7 | **interval** | **int** | Specifies how often a heartbeat message should be expected | [optional] 8 | **interval_unit** | **str** | Interval specified as 'minutes', 'hours' or 'days' | [optional] 9 | **enabled** | **bool** | Enable/disable heartbeat monitoring | [optional] 10 | 11 | [[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 | 13 | 14 | -------------------------------------------------------------------------------- /docs/UpdateHeartbeatResponse.md: -------------------------------------------------------------------------------- 1 | # UpdateHeartbeatResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **request_id** | **str** | | 7 | **took** | **float** | | [default to 0.0] 8 | **data** | [**HeartbeatMeta**](HeartbeatMeta.md) | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/UpdateSavedSearchPayload.md: -------------------------------------------------------------------------------- 1 | # UpdateSavedSearchPayload 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **name** | **str** | | 7 | **description** | **str** | | [optional] 8 | **query** | **str** | | 9 | **owner** | [**UserRecipient**](UserRecipient.md) | | 10 | **teams** | [**list[TeamRecipient]**](TeamRecipient.md) | Teams that the alert will be routed to send notifications | [optional] 11 | 12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/UserRecipient.md: -------------------------------------------------------------------------------- 1 | # UserRecipient 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **username** | **str** | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/UserRecipientAllOf.md: -------------------------------------------------------------------------------- 1 | # UserRecipientAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **username** | **str** | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/UserResponder.md: -------------------------------------------------------------------------------- 1 | # UserResponder 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **type** | **str** | | 7 | **id** | **str** | | 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/UserResponderAllOf.md: -------------------------------------------------------------------------------- 1 | # UserResponderAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **str** | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/WeekdayTimeRestriction.md: -------------------------------------------------------------------------------- 1 | # WeekdayTimeRestriction 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **start_day** | **str** | | [optional] 7 | **start_hour** | **int** | | [optional] 8 | **start_min** | **int** | | [optional] 9 | **end_day** | **str** | | [optional] 10 | **end_hour** | **int** | | [optional] 11 | **end_min** | **int** | | [optional] 12 | 13 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/WeekdayTimeRestrictionInterval.md: -------------------------------------------------------------------------------- 1 | # WeekdayTimeRestrictionInterval 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **restrictions** | [**list[WeekdayTimeRestriction]**](WeekdayTimeRestriction.md) | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/WeekdayTimeRestrictionIntervalAllOf.md: -------------------------------------------------------------------------------- 1 | # WeekdayTimeRestrictionIntervalAllOf 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **restrictions** | [**list[WeekdayTimeRestriction]**](WeekdayTimeRestriction.md) | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /opsgenie_sdk/api/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | # flake8: noqa 4 | 5 | # import apis into api package 6 | from opsgenie_sdk.api.account import AccountApi 7 | from opsgenie_sdk.api.alert import AlertApi 8 | from opsgenie_sdk.api.heartbeat import HeartbeatApi 9 | from opsgenie_sdk.api.incident import IncidentApi 10 | -------------------------------------------------------------------------------- /opsgenie_sdk/api/alert/alert_team_meta.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Python SDK for Opsgenie REST API 5 | 6 | Python SDK for Opsgenie REST API # noqa: E501 7 | 8 | The version of the OpenAPI document: 2.0.0 9 | Contact: support@opsgenie.com 10 | Generated by: https://openapi-generator.tech 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class AlertTeamMeta(object): 21 | """NOTE: This class is auto generated by OpenAPI Generator. 22 | Ref: https://openapi-generator.tech 23 | 24 | Do not edit the class manually. 25 | """ 26 | 27 | """ 28 | Attributes: 29 | openapi_types (dict): The key is attribute name 30 | and the value is attribute type. 31 | attribute_map (dict): The key is attribute name 32 | and the value is json key in definition. 33 | """ 34 | openapi_types = { 35 | 'id': 'str' 36 | } 37 | 38 | attribute_map = { 39 | 'id': 'id' 40 | } 41 | 42 | def __init__(self, id=None): # noqa: E501 43 | """AlertTeamMeta - a model defined in OpenAPI""" # noqa: E501 44 | 45 | self._id = None 46 | self.discriminator = None 47 | 48 | self.id = id 49 | 50 | @property 51 | def id(self): 52 | """Gets the id of this AlertTeamMeta. # noqa: E501 53 | 54 | 55 | :return: The id of this AlertTeamMeta. # noqa: E501 56 | :rtype: str 57 | """ 58 | return self._id 59 | 60 | @id.setter 61 | def id(self, id): 62 | """Sets the id of this AlertTeamMeta. 63 | 64 | 65 | :param id: The id of this AlertTeamMeta. # noqa: E501 66 | :type: str 67 | """ 68 | if id is None: 69 | raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 70 | 71 | self._id = id 72 | 73 | def to_dict(self): 74 | """Returns the model properties as a dict""" 75 | result = {} 76 | 77 | for attr, _ in six.iteritems(self.openapi_types): 78 | value = getattr(self, attr) 79 | if isinstance(value, list): 80 | result[attr] = list(map( 81 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 82 | value 83 | )) 84 | elif hasattr(value, "to_dict"): 85 | result[attr] = value.to_dict() 86 | elif isinstance(value, dict): 87 | result[attr] = dict(map( 88 | lambda item: (item[0], item[1].to_dict()) 89 | if hasattr(item[1], "to_dict") else item, 90 | value.items() 91 | )) 92 | else: 93 | result[attr] = value 94 | 95 | return result 96 | 97 | def to_str(self): 98 | """Returns the string representation of the model""" 99 | return pprint.pformat(self.to_dict()) 100 | 101 | def __repr__(self): 102 | """For `print` and `pprint`""" 103 | return self.to_str() 104 | 105 | def __eq__(self, other): 106 | """Returns true if both objects are equal""" 107 | if not isinstance(other, AlertTeamMeta): 108 | return False 109 | 110 | return self.__dict__ == other.__dict__ 111 | 112 | def __ne__(self, other): 113 | """Returns true if both objects are not equal""" 114 | return not self == other 115 | -------------------------------------------------------------------------------- /opsgenie_sdk/api/alert/get_alert_response_all_of.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Python SDK for Opsgenie REST API 5 | 6 | Python SDK for Opsgenie REST API # noqa: E501 7 | 8 | The version of the OpenAPI document: 2.0.0 9 | Contact: support@opsgenie.com 10 | Generated by: https://openapi-generator.tech 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class GetAlertResponseAllOf(object): 21 | """NOTE: This class is auto generated by OpenAPI Generator. 22 | Ref: https://openapi-generator.tech 23 | 24 | Do not edit the class manually. 25 | """ 26 | 27 | """ 28 | Attributes: 29 | openapi_types (dict): The key is attribute name 30 | and the value is attribute type. 31 | attribute_map (dict): The key is attribute name 32 | and the value is json key in definition. 33 | """ 34 | openapi_types = { 35 | 'data': 'Alert' 36 | } 37 | 38 | attribute_map = { 39 | 'data': 'data' 40 | } 41 | 42 | def __init__(self, data=None): # noqa: E501 43 | """GetAlertResponseAllOf - a model defined in OpenAPI""" # noqa: E501 44 | 45 | self._data = None 46 | self.discriminator = None 47 | 48 | if data is not None: 49 | self.data = data 50 | 51 | @property 52 | def data(self): 53 | """Gets the data of this GetAlertResponseAllOf. # noqa: E501 54 | 55 | 56 | :return: The data of this GetAlertResponseAllOf. # noqa: E501 57 | :rtype: Alert 58 | """ 59 | return self._data 60 | 61 | @data.setter 62 | def data(self, data): 63 | """Sets the data of this GetAlertResponseAllOf. 64 | 65 | 66 | :param data: The data of this GetAlertResponseAllOf. # noqa: E501 67 | :type: Alert 68 | """ 69 | 70 | self._data = data 71 | 72 | def to_dict(self): 73 | """Returns the model properties as a dict""" 74 | result = {} 75 | 76 | for attr, _ in six.iteritems(self.openapi_types): 77 | value = getattr(self, attr) 78 | if isinstance(value, list): 79 | result[attr] = list(map( 80 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 81 | value 82 | )) 83 | elif hasattr(value, "to_dict"): 84 | result[attr] = value.to_dict() 85 | elif isinstance(value, dict): 86 | result[attr] = dict(map( 87 | lambda item: (item[0], item[1].to_dict()) 88 | if hasattr(item[1], "to_dict") else item, 89 | value.items() 90 | )) 91 | else: 92 | result[attr] = value 93 | 94 | return result 95 | 96 | def to_str(self): 97 | """Returns the string representation of the model""" 98 | return pprint.pformat(self.to_dict()) 99 | 100 | def __repr__(self): 101 | """For `print` and `pprint`""" 102 | return self.to_str() 103 | 104 | def __eq__(self, other): 105 | """Returns true if both objects are equal""" 106 | if not isinstance(other, GetAlertResponseAllOf): 107 | return False 108 | 109 | return self.__dict__ == other.__dict__ 110 | 111 | def __ne__(self, other): 112 | """Returns true if both objects are not equal""" 113 | return not self == other 114 | -------------------------------------------------------------------------------- /opsgenie_sdk/api/alert/saved_search_entity.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Python SDK for Opsgenie REST API 5 | 6 | Python SDK for Opsgenie REST API # noqa: E501 7 | 8 | The version of the OpenAPI document: 2.0.0 9 | Contact: support@opsgenie.com 10 | Generated by: https://openapi-generator.tech 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class SavedSearchEntity(object): 21 | """NOTE: This class is auto generated by OpenAPI Generator. 22 | Ref: https://openapi-generator.tech 23 | 24 | Do not edit the class manually. 25 | """ 26 | 27 | """ 28 | Attributes: 29 | openapi_types (dict): The key is attribute name 30 | and the value is attribute type. 31 | attribute_map (dict): The key is attribute name 32 | and the value is json key in definition. 33 | """ 34 | openapi_types = { 35 | 'id': 'str' 36 | } 37 | 38 | attribute_map = { 39 | 'id': 'id' 40 | } 41 | 42 | def __init__(self, id=None): # noqa: E501 43 | """SavedSearchEntity - a model defined in OpenAPI""" # noqa: E501 44 | 45 | self._id = None 46 | self.discriminator = None 47 | 48 | if id is not None: 49 | self.id = id 50 | 51 | @property 52 | def id(self): 53 | """Gets the id of this SavedSearchEntity. # noqa: E501 54 | 55 | 56 | :return: The id of this SavedSearchEntity. # noqa: E501 57 | :rtype: str 58 | """ 59 | return self._id 60 | 61 | @id.setter 62 | def id(self, id): 63 | """Sets the id of this SavedSearchEntity. 64 | 65 | 66 | :param id: The id of this SavedSearchEntity. # noqa: E501 67 | :type: str 68 | """ 69 | 70 | self._id = id 71 | 72 | def to_dict(self): 73 | """Returns the model properties as a dict""" 74 | result = {} 75 | 76 | for attr, _ in six.iteritems(self.openapi_types): 77 | value = getattr(self, attr) 78 | if isinstance(value, list): 79 | result[attr] = list(map( 80 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 81 | value 82 | )) 83 | elif hasattr(value, "to_dict"): 84 | result[attr] = value.to_dict() 85 | elif isinstance(value, dict): 86 | result[attr] = dict(map( 87 | lambda item: (item[0], item[1].to_dict()) 88 | if hasattr(item[1], "to_dict") else item, 89 | value.items() 90 | )) 91 | else: 92 | result[attr] = value 93 | 94 | return result 95 | 96 | def to_str(self): 97 | """Returns the string representation of the model""" 98 | return pprint.pformat(self.to_dict()) 99 | 100 | def __repr__(self): 101 | """For `print` and `pprint`""" 102 | return self.to_str() 103 | 104 | def __eq__(self, other): 105 | """Returns true if both objects are equal""" 106 | if not isinstance(other, SavedSearchEntity): 107 | return False 108 | 109 | return self.__dict__ == other.__dict__ 110 | 111 | def __ne__(self, other): 112 | """Returns true if both objects are not equal""" 113 | return not self == other 114 | -------------------------------------------------------------------------------- /opsgenie_sdk/errors.py: -------------------------------------------------------------------------------- 1 | import json 2 | 3 | 4 | class OpsGenieError(Exception): 5 | def __init__(self, message): 6 | super(Exception, self).__init__(message) 7 | 8 | 9 | class InvalidRequestError(OpsGenieError): 10 | pass 11 | 12 | 13 | class ApiKeyMissingError(OpsGenieError): 14 | def __init__(self): 15 | super(ApiKeyMissingError, self).__init__('Api Key is not configured!') 16 | 17 | 18 | class EndpointMissingError(OpsGenieError): 19 | def __init__(self): 20 | super(EndpointMissingError, self).__init__('OpsGenie end-point is not configured!') 21 | 22 | 23 | class InvalidConfigurationError(OpsGenieError): 24 | def __init__(self, message): 25 | super(InvalidConfigurationError, self).__init__(message) 26 | 27 | 28 | class ServerError(OpsGenieError): 29 | def __init__(self, json_str): 30 | try: 31 | self.json_obj = json.loads(json_str) 32 | self.message = self.json_obj.get('error', None) 33 | self.code = self.json_obj.get('code', None) 34 | except ValueError: 35 | self.message = json_str 36 | super(ServerError, self).__init__(self.message) 37 | self.code = -1 38 | 39 | 40 | class HTTPException(Exception): 41 | 42 | def __init__(self, status=None, reason=None, http_resp=None): 43 | if http_resp: 44 | self.status = http_resp.status 45 | self.reason = http_resp.reason 46 | self.body = http_resp.data 47 | self.headers = http_resp.getheaders() 48 | else: 49 | self.status = status 50 | self.reason = reason 51 | self.body = None 52 | self.headers = None 53 | 54 | def __str__(self): 55 | """Custom error messages for exception""" 56 | error_message = "({0})\n" \ 57 | "Reason: {1}\n".format(self.status, self.reason) 58 | if self.headers: 59 | error_message += "HTTP response headers: {0}\n".format( 60 | self.headers) 61 | 62 | if self.body: 63 | error_message += "HTTP response body: {0}\n".format(self.body) 64 | 65 | return error_message 66 | -------------------------------------------------------------------------------- /opsgenie_sdk/metrics/__init__.py: -------------------------------------------------------------------------------- 1 | from .api_metric import ApiMetric 2 | from .http_metric import HttpMetric 3 | from .publisher import Publisher 4 | from .sdk_metric import SdkMetric 5 | -------------------------------------------------------------------------------- /opsgenie_sdk/metrics/api_metric.py: -------------------------------------------------------------------------------- 1 | import logging 2 | from collections import namedtuple 3 | 4 | from .publisher import Publisher 5 | 6 | 7 | class ApiMetric(Publisher): 8 | def __init__(self, name): 9 | Publisher.__init__(self) 10 | self.name = name 11 | self.logger = logging.getLogger('opsgenie_sdk') 12 | self._data = None 13 | self._metric = namedtuple('ApiMetric', ['transactionId', 'duration', 'resourcePath', 'resultMetadata', 14 | 'httpResponse']) 15 | 16 | self._result_metadata = namedtuple('ResultMetadata', 17 | ['RequestId', 'ResponseTime', 'RateLimitState', 'RateLimitReason', 18 | 'RateLimitPeriod', 'RetryStatistics']) 19 | 20 | def __str__(self): 21 | return "{}: '{}' has data = {}".format(type(self).__name__, self.name, 22 | self._data) 23 | 24 | @property 25 | def data(self): 26 | return self._data 27 | 28 | def build_metric(self, transaction_id, duration, resource_path, response_data, http_response, retry_statistics): 29 | try: 30 | self._data = self._metric(transaction_id, duration, resource_path, 31 | self._get_result_metadata(response_data, retry_statistics), 32 | http_response) 33 | except ValueError as e: 34 | print('Error: {}'.format(e)) 35 | else: 36 | self.notify() 37 | self.logger.debug('API Metrics Published') 38 | 39 | def _get_result_metadata(self, response_data, retry_statistics): 40 | request_id = response_data.getheader(name='X-Request-ID') 41 | response_time = response_data.getheader(name='X-Response-Time') 42 | rate_limit_state = response_data.getheader(name='X-RateLimit-State') 43 | rate_limit_reason = response_data.getheader(name='X-RateLimit-Reason') 44 | rate_limit_period = response_data.getheader(name='X-RateLimit-Period-In-Sec') 45 | 46 | return self._result_metadata(RequestId=request_id, 47 | ResponseTime=response_time, 48 | RateLimitState=rate_limit_state, 49 | RateLimitReason=rate_limit_reason, 50 | RateLimitPeriod=rate_limit_period, 51 | RetryStatistics=retry_statistics) 52 | -------------------------------------------------------------------------------- /opsgenie_sdk/metrics/http_metric.py: -------------------------------------------------------------------------------- 1 | import logging 2 | from collections import namedtuple 3 | 4 | from .publisher import Publisher 5 | 6 | 7 | class HttpMetric(Publisher): 8 | def __init__(self, name): 9 | Publisher.__init__(self) 10 | self.name = name 11 | self.logger = logging.getLogger('opsgenie_sdk') 12 | self._data = None 13 | self.metric = namedtuple('HttpMetric', ['transactionId', 'duration', 'resourcePath', 'retryStatistics', 'error', 14 | 'status', 'statusCode', 'request']) 15 | 16 | def __str__(self): 17 | return "{}: '{}' has data = {}".format(type(self).__name__, self.name, 18 | self._data) 19 | 20 | @property 21 | def data(self): 22 | return self._data 23 | 24 | def build_metric(self, transaction_id, duration, resource_path, retry_statistics, error, status, 25 | status_code, request): 26 | try: 27 | self._data = self.metric(transaction_id, duration, resource_path, retry_statistics, error, status, status_code, 28 | request) 29 | except ValueError as e: 30 | print('Error: {}'.format(e)) 31 | else: 32 | self.notify() 33 | self.logger.debug('HTTP Metrics Published') 34 | -------------------------------------------------------------------------------- /opsgenie_sdk/metrics/observer.py: -------------------------------------------------------------------------------- 1 | import abc 2 | 3 | 4 | class Observer(abc.ABC): 5 | """ 6 | An updating interface for objects, to whom metrics should be published. 7 | The published metrics can be accessed in a named tuple at publisher.data in the notify function. 8 | """ 9 | 10 | @abc.abstractmethod 11 | def notify(self, publisher): 12 | pass 13 | -------------------------------------------------------------------------------- /opsgenie_sdk/metrics/publisher.py: -------------------------------------------------------------------------------- 1 | import logging 2 | 3 | 4 | class Publisher: 5 | """ 6 | A base Publisher class to contain the common functionality 7 | of adding, removing, and notifying observers 8 | """ 9 | 10 | def __init__(self): 11 | self.observers = [] 12 | self.logger = logging.getLogger('opsgenie_sdk') 13 | 14 | def subscribe(self, observer): 15 | if observer not in self.observers: 16 | self.observers.append(observer) 17 | self.logger.debug('Observer subscribed') 18 | else: 19 | print('Failed to subscribe: {}'.format(observer)) 20 | 21 | def unsubscribe(self, observer): 22 | try: 23 | self.observers.remove(observer) 24 | self.logger.debug('Observer unsubscribed') 25 | except ValueError: 26 | print('Failed to unsubscribe: {}'.format(observer)) 27 | 28 | def notify(self): 29 | [o.notify(self) for o in self.observers] 30 | -------------------------------------------------------------------------------- /opsgenie_sdk/metrics/sdk_metric.py: -------------------------------------------------------------------------------- 1 | import logging 2 | from collections import namedtuple 3 | 4 | from .publisher import Publisher 5 | 6 | 7 | class SdkMetric(Publisher): 8 | def __init__(self, name): 9 | Publisher.__init__(self) 10 | self.name = name 11 | self.logger = logging.getLogger('opsgenie_sdk') 12 | self._data = None 13 | self._metric = namedtuple('SdkMetric', 14 | ['transactionId', 'duration', 'resourcePath', 'errorType', 'errorMessage', 15 | 'sdkRequestDetails', 'sdkResultDetails']) 16 | 17 | def __str__(self): 18 | return "{}: '{}' has data = {}".format(type(self).__name__, self.name, 19 | self._data) 20 | 21 | @property 22 | def data(self): 23 | return self._data 24 | 25 | def build_metric(self, transaction_id, duration, resource_path, error_type, error_message, sdk_request_details, 26 | sdk_result_details): 27 | try: 28 | self._data = self._metric(transaction_id, duration, resource_path, error_type, error_message, 29 | sdk_request_details, 30 | sdk_result_details) 31 | except ValueError as e: 32 | print('Error: {}'.format(e)) 33 | else: 34 | self.notify() 35 | self.logger.debug('SDK Metrics Published') 36 | -------------------------------------------------------------------------------- /opsgenie_sdk/models/all_recipient.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Python SDK for Opsgenie REST API 5 | 6 | Python SDK for Opsgenie REST API # noqa: E501 7 | 8 | The version of the OpenAPI document: 2.0.0 9 | Contact: support@opsgenie.com 10 | Generated by: https://openapi-generator.tech 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class AllRecipient(object): 21 | """NOTE: This class is auto generated by OpenAPI Generator. 22 | Ref: https://openapi-generator.tech 23 | 24 | Do not edit the class manually. 25 | """ 26 | 27 | """ 28 | Attributes: 29 | openapi_types (dict): The key is attribute name 30 | and the value is attribute type. 31 | attribute_map (dict): The key is attribute name 32 | and the value is json key in definition. 33 | """ 34 | openapi_types = { 35 | } 36 | 37 | attribute_map = { 38 | } 39 | 40 | def __init__(self): # noqa: E501 41 | """AllRecipient - a model defined in OpenAPI""" # noqa: E501 42 | self.discriminator = None 43 | 44 | def to_dict(self): 45 | """Returns the model properties as a dict""" 46 | result = {} 47 | 48 | for attr, _ in six.iteritems(self.openapi_types): 49 | value = getattr(self, attr) 50 | if isinstance(value, list): 51 | result[attr] = list(map( 52 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 53 | value 54 | )) 55 | elif hasattr(value, "to_dict"): 56 | result[attr] = value.to_dict() 57 | elif isinstance(value, dict): 58 | result[attr] = dict(map( 59 | lambda item: (item[0], item[1].to_dict()) 60 | if hasattr(item[1], "to_dict") else item, 61 | value.items() 62 | )) 63 | else: 64 | result[attr] = value 65 | 66 | return result 67 | 68 | def to_str(self): 69 | """Returns the string representation of the model""" 70 | return pprint.pformat(self.to_dict()) 71 | 72 | def __repr__(self): 73 | """For `print` and `pprint`""" 74 | return self.to_str() 75 | 76 | def __eq__(self, other): 77 | """Returns true if both objects are equal""" 78 | if not isinstance(other, AllRecipient): 79 | return False 80 | 81 | return self.__dict__ == other.__dict__ 82 | 83 | def __ne__(self, other): 84 | """Returns true if both objects are not equal""" 85 | return not self == other 86 | -------------------------------------------------------------------------------- /opsgenie_sdk/models/escalation_recipient.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Python SDK for Opsgenie REST API 5 | 6 | Python SDK for Opsgenie REST API # noqa: E501 7 | 8 | The version of the OpenAPI document: 2.0.0 9 | Contact: support@opsgenie.com 10 | Generated by: https://openapi-generator.tech 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class EscalationRecipient(object): 21 | """NOTE: This class is auto generated by OpenAPI Generator. 22 | Ref: https://openapi-generator.tech 23 | 24 | Do not edit the class manually. 25 | """ 26 | 27 | """ 28 | Attributes: 29 | openapi_types (dict): The key is attribute name 30 | and the value is attribute type. 31 | attribute_map (dict): The key is attribute name 32 | and the value is json key in definition. 33 | """ 34 | openapi_types = { 35 | 'name': 'str' 36 | } 37 | 38 | attribute_map = { 39 | 'name': 'name' 40 | } 41 | 42 | def __init__(self, name=None): # noqa: E501 43 | """EscalationRecipient - a model defined in OpenAPI""" # noqa: E501 44 | 45 | self._name = None 46 | self.discriminator = None 47 | 48 | if name is not None: 49 | self.name = name 50 | 51 | @property 52 | def name(self): 53 | """Gets the name of this EscalationRecipient. # noqa: E501 54 | 55 | 56 | :return: The name of this EscalationRecipient. # noqa: E501 57 | :rtype: str 58 | """ 59 | return self._name 60 | 61 | @name.setter 62 | def name(self, name): 63 | """Sets the name of this EscalationRecipient. 64 | 65 | 66 | :param name: The name of this EscalationRecipient. # noqa: E501 67 | :type: str 68 | """ 69 | 70 | self._name = name 71 | 72 | def to_dict(self): 73 | """Returns the model properties as a dict""" 74 | result = {} 75 | 76 | for attr, _ in six.iteritems(self.openapi_types): 77 | value = getattr(self, attr) 78 | if isinstance(value, list): 79 | result[attr] = list(map( 80 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 81 | value 82 | )) 83 | elif hasattr(value, "to_dict"): 84 | result[attr] = value.to_dict() 85 | elif isinstance(value, dict): 86 | result[attr] = dict(map( 87 | lambda item: (item[0], item[1].to_dict()) 88 | if hasattr(item[1], "to_dict") else item, 89 | value.items() 90 | )) 91 | else: 92 | result[attr] = value 93 | 94 | return result 95 | 96 | def to_str(self): 97 | """Returns the string representation of the model""" 98 | return pprint.pformat(self.to_dict()) 99 | 100 | def __repr__(self): 101 | """For `print` and `pprint`""" 102 | return self.to_str() 103 | 104 | def __eq__(self, other): 105 | """Returns true if both objects are equal""" 106 | if not isinstance(other, EscalationRecipient): 107 | return False 108 | 109 | return self.__dict__ == other.__dict__ 110 | 111 | def __ne__(self, other): 112 | """Returns true if both objects are not equal""" 113 | return not self == other 114 | -------------------------------------------------------------------------------- /opsgenie_sdk/models/group_recipient.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Python SDK for Opsgenie REST API 5 | 6 | Python SDK for Opsgenie REST API # noqa: E501 7 | 8 | The version of the OpenAPI document: 2.0.0 9 | Contact: support@opsgenie.com 10 | Generated by: https://openapi-generator.tech 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class GroupRecipient(object): 21 | """NOTE: This class is auto generated by OpenAPI Generator. 22 | Ref: https://openapi-generator.tech 23 | 24 | Do not edit the class manually. 25 | """ 26 | 27 | """ 28 | Attributes: 29 | openapi_types (dict): The key is attribute name 30 | and the value is attribute type. 31 | attribute_map (dict): The key is attribute name 32 | and the value is json key in definition. 33 | """ 34 | openapi_types = { 35 | 'name': 'str' 36 | } 37 | 38 | attribute_map = { 39 | 'name': 'name' 40 | } 41 | 42 | def __init__(self, name=None): # noqa: E501 43 | """GroupRecipient - a model defined in OpenAPI""" # noqa: E501 44 | 45 | self._name = None 46 | self.discriminator = None 47 | 48 | if name is not None: 49 | self.name = name 50 | 51 | @property 52 | def name(self): 53 | """Gets the name of this GroupRecipient. # noqa: E501 54 | 55 | 56 | :return: The name of this GroupRecipient. # noqa: E501 57 | :rtype: str 58 | """ 59 | return self._name 60 | 61 | @name.setter 62 | def name(self, name): 63 | """Sets the name of this GroupRecipient. 64 | 65 | 66 | :param name: The name of this GroupRecipient. # noqa: E501 67 | :type: str 68 | """ 69 | 70 | self._name = name 71 | 72 | def to_dict(self): 73 | """Returns the model properties as a dict""" 74 | result = {} 75 | 76 | for attr, _ in six.iteritems(self.openapi_types): 77 | value = getattr(self, attr) 78 | if isinstance(value, list): 79 | result[attr] = list(map( 80 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 81 | value 82 | )) 83 | elif hasattr(value, "to_dict"): 84 | result[attr] = value.to_dict() 85 | elif isinstance(value, dict): 86 | result[attr] = dict(map( 87 | lambda item: (item[0], item[1].to_dict()) 88 | if hasattr(item[1], "to_dict") else item, 89 | value.items() 90 | )) 91 | else: 92 | result[attr] = value 93 | 94 | return result 95 | 96 | def to_str(self): 97 | """Returns the string representation of the model""" 98 | return pprint.pformat(self.to_dict()) 99 | 100 | def __repr__(self): 101 | """For `print` and `pprint`""" 102 | return self.to_str() 103 | 104 | def __eq__(self, other): 105 | """Returns true if both objects are equal""" 106 | if not isinstance(other, GroupRecipient): 107 | return False 108 | 109 | return self.__dict__ == other.__dict__ 110 | 111 | def __ne__(self, other): 112 | """Returns true if both objects are not equal""" 113 | return not self == other 114 | -------------------------------------------------------------------------------- /opsgenie_sdk/models/match_all.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Python SDK for Opsgenie REST API 5 | 6 | Python SDK for Opsgenie REST API # noqa: E501 7 | 8 | The version of the OpenAPI document: 2.0.0 9 | Contact: support@opsgenie.com 10 | Generated by: https://openapi-generator.tech 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class MatchAll(object): 21 | """NOTE: This class is auto generated by OpenAPI Generator. 22 | Ref: https://openapi-generator.tech 23 | 24 | Do not edit the class manually. 25 | """ 26 | 27 | """ 28 | Attributes: 29 | openapi_types (dict): The key is attribute name 30 | and the value is attribute type. 31 | attribute_map (dict): The key is attribute name 32 | and the value is json key in definition. 33 | """ 34 | openapi_types = { 35 | } 36 | 37 | attribute_map = { 38 | } 39 | 40 | def __init__(self): # noqa: E501 41 | """MatchAll - a model defined in OpenAPI""" # noqa: E501 42 | self.discriminator = None 43 | 44 | def to_dict(self): 45 | """Returns the model properties as a dict""" 46 | result = {} 47 | 48 | for attr, _ in six.iteritems(self.openapi_types): 49 | value = getattr(self, attr) 50 | if isinstance(value, list): 51 | result[attr] = list(map( 52 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 53 | value 54 | )) 55 | elif hasattr(value, "to_dict"): 56 | result[attr] = value.to_dict() 57 | elif isinstance(value, dict): 58 | result[attr] = dict(map( 59 | lambda item: (item[0], item[1].to_dict()) 60 | if hasattr(item[1], "to_dict") else item, 61 | value.items() 62 | )) 63 | else: 64 | result[attr] = value 65 | 66 | return result 67 | 68 | def to_str(self): 69 | """Returns the string representation of the model""" 70 | return pprint.pformat(self.to_dict()) 71 | 72 | def __repr__(self): 73 | """For `print` and `pprint`""" 74 | return self.to_str() 75 | 76 | def __eq__(self, other): 77 | """Returns true if both objects are equal""" 78 | if not isinstance(other, MatchAll): 79 | return False 80 | 81 | return self.__dict__ == other.__dict__ 82 | 83 | def __ne__(self, other): 84 | """Returns true if both objects are not equal""" 85 | return not self == other 86 | -------------------------------------------------------------------------------- /opsgenie_sdk/models/no_recipient.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Python SDK for Opsgenie REST API 5 | 6 | Python SDK for Opsgenie REST API # noqa: E501 7 | 8 | The version of the OpenAPI document: 2.0.0 9 | Contact: support@opsgenie.com 10 | Generated by: https://openapi-generator.tech 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class NoRecipient(object): 21 | """NOTE: This class is auto generated by OpenAPI Generator. 22 | Ref: https://openapi-generator.tech 23 | 24 | Do not edit the class manually. 25 | """ 26 | 27 | """ 28 | Attributes: 29 | openapi_types (dict): The key is attribute name 30 | and the value is attribute type. 31 | attribute_map (dict): The key is attribute name 32 | and the value is json key in definition. 33 | """ 34 | openapi_types = { 35 | } 36 | 37 | attribute_map = { 38 | } 39 | 40 | def __init__(self): # noqa: E501 41 | """NoRecipient - a model defined in OpenAPI""" # noqa: E501 42 | self.discriminator = None 43 | 44 | def to_dict(self): 45 | """Returns the model properties as a dict""" 46 | result = {} 47 | 48 | for attr, _ in six.iteritems(self.openapi_types): 49 | value = getattr(self, attr) 50 | if isinstance(value, list): 51 | result[attr] = list(map( 52 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 53 | value 54 | )) 55 | elif hasattr(value, "to_dict"): 56 | result[attr] = value.to_dict() 57 | elif isinstance(value, dict): 58 | result[attr] = dict(map( 59 | lambda item: (item[0], item[1].to_dict()) 60 | if hasattr(item[1], "to_dict") else item, 61 | value.items() 62 | )) 63 | else: 64 | result[attr] = value 65 | 66 | return result 67 | 68 | def to_str(self): 69 | """Returns the string representation of the model""" 70 | return pprint.pformat(self.to_dict()) 71 | 72 | def __repr__(self): 73 | """For `print` and `pprint`""" 74 | return self.to_str() 75 | 76 | def __eq__(self, other): 77 | """Returns true if both objects are equal""" 78 | if not isinstance(other, NoRecipient): 79 | return False 80 | 81 | return self.__dict__ == other.__dict__ 82 | 83 | def __ne__(self, other): 84 | """Returns true if both objects are not equal""" 85 | return not self == other 86 | -------------------------------------------------------------------------------- /opsgenie_sdk/models/schedule_recipient.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Python SDK for Opsgenie REST API 5 | 6 | Python SDK for Opsgenie REST API # noqa: E501 7 | 8 | The version of the OpenAPI document: 2.0.0 9 | Contact: support@opsgenie.com 10 | Generated by: https://openapi-generator.tech 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class ScheduleRecipient(object): 21 | """NOTE: This class is auto generated by OpenAPI Generator. 22 | Ref: https://openapi-generator.tech 23 | 24 | Do not edit the class manually. 25 | """ 26 | 27 | """ 28 | Attributes: 29 | openapi_types (dict): The key is attribute name 30 | and the value is attribute type. 31 | attribute_map (dict): The key is attribute name 32 | and the value is json key in definition. 33 | """ 34 | openapi_types = { 35 | 'name': 'str' 36 | } 37 | 38 | attribute_map = { 39 | 'name': 'name' 40 | } 41 | 42 | def __init__(self, name=None): # noqa: E501 43 | """ScheduleRecipient - a model defined in OpenAPI""" # noqa: E501 44 | 45 | self._name = None 46 | self.discriminator = None 47 | 48 | if name is not None: 49 | self.name = name 50 | 51 | @property 52 | def name(self): 53 | """Gets the name of this ScheduleRecipient. # noqa: E501 54 | 55 | 56 | :return: The name of this ScheduleRecipient. # noqa: E501 57 | :rtype: str 58 | """ 59 | return self._name 60 | 61 | @name.setter 62 | def name(self, name): 63 | """Sets the name of this ScheduleRecipient. 64 | 65 | 66 | :param name: The name of this ScheduleRecipient. # noqa: E501 67 | :type: str 68 | """ 69 | 70 | self._name = name 71 | 72 | def to_dict(self): 73 | """Returns the model properties as a dict""" 74 | result = {} 75 | 76 | for attr, _ in six.iteritems(self.openapi_types): 77 | value = getattr(self, attr) 78 | if isinstance(value, list): 79 | result[attr] = list(map( 80 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 81 | value 82 | )) 83 | elif hasattr(value, "to_dict"): 84 | result[attr] = value.to_dict() 85 | elif isinstance(value, dict): 86 | result[attr] = dict(map( 87 | lambda item: (item[0], item[1].to_dict()) 88 | if hasattr(item[1], "to_dict") else item, 89 | value.items() 90 | )) 91 | else: 92 | result[attr] = value 93 | 94 | return result 95 | 96 | def to_str(self): 97 | """Returns the string representation of the model""" 98 | return pprint.pformat(self.to_dict()) 99 | 100 | def __repr__(self): 101 | """For `print` and `pprint`""" 102 | return self.to_str() 103 | 104 | def __eq__(self, other): 105 | """Returns true if both objects are equal""" 106 | if not isinstance(other, ScheduleRecipient): 107 | return False 108 | 109 | return self.__dict__ == other.__dict__ 110 | 111 | def __ne__(self, other): 112 | """Returns true if both objects are not equal""" 113 | return not self == other 114 | -------------------------------------------------------------------------------- /opsgenie_sdk/models/team_recipient.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Python SDK for Opsgenie REST API 5 | 6 | Python SDK for Opsgenie REST API # noqa: E501 7 | 8 | The version of the OpenAPI document: 2.0.0 9 | Contact: support@opsgenie.com 10 | Generated by: https://openapi-generator.tech 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class TeamRecipient(object): 21 | """NOTE: This class is auto generated by OpenAPI Generator. 22 | Ref: https://openapi-generator.tech 23 | 24 | Do not edit the class manually. 25 | """ 26 | 27 | """ 28 | Attributes: 29 | openapi_types (dict): The key is attribute name 30 | and the value is attribute type. 31 | attribute_map (dict): The key is attribute name 32 | and the value is json key in definition. 33 | """ 34 | openapi_types = { 35 | 'name': 'str' 36 | } 37 | 38 | attribute_map = { 39 | 'name': 'name' 40 | } 41 | 42 | def __init__(self, name=None): # noqa: E501 43 | """TeamRecipient - a model defined in OpenAPI""" # noqa: E501 44 | 45 | self._name = None 46 | self.discriminator = None 47 | 48 | if name is not None: 49 | self.name = name 50 | 51 | @property 52 | def name(self): 53 | """Gets the name of this TeamRecipient. # noqa: E501 54 | 55 | 56 | :return: The name of this TeamRecipient. # noqa: E501 57 | :rtype: str 58 | """ 59 | return self._name 60 | 61 | @name.setter 62 | def name(self, name): 63 | """Sets the name of this TeamRecipient. 64 | 65 | 66 | :param name: The name of this TeamRecipient. # noqa: E501 67 | :type: str 68 | """ 69 | 70 | self._name = name 71 | 72 | def to_dict(self): 73 | """Returns the model properties as a dict""" 74 | result = {} 75 | 76 | for attr, _ in six.iteritems(self.openapi_types): 77 | value = getattr(self, attr) 78 | if isinstance(value, list): 79 | result[attr] = list(map( 80 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 81 | value 82 | )) 83 | elif hasattr(value, "to_dict"): 84 | result[attr] = value.to_dict() 85 | elif isinstance(value, dict): 86 | result[attr] = dict(map( 87 | lambda item: (item[0], item[1].to_dict()) 88 | if hasattr(item[1], "to_dict") else item, 89 | value.items() 90 | )) 91 | else: 92 | result[attr] = value 93 | 94 | return result 95 | 96 | def to_str(self): 97 | """Returns the string representation of the model""" 98 | return pprint.pformat(self.to_dict()) 99 | 100 | def __repr__(self): 101 | """For `print` and `pprint`""" 102 | return self.to_str() 103 | 104 | def __eq__(self, other): 105 | """Returns true if both objects are equal""" 106 | if not isinstance(other, TeamRecipient): 107 | return False 108 | 109 | return self.__dict__ == other.__dict__ 110 | 111 | def __ne__(self, other): 112 | """Returns true if both objects are not equal""" 113 | return not self == other 114 | -------------------------------------------------------------------------------- /opsgenie_sdk/models/team_recipient_all_of.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Python SDK for Opsgenie REST API 5 | 6 | Python SDK for Opsgenie REST API # noqa: E501 7 | 8 | The version of the OpenAPI document: 2.0.0 9 | Contact: support@opsgenie.com 10 | Generated by: https://openapi-generator.tech 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class TeamRecipientAllOf(object): 21 | """NOTE: This class is auto generated by OpenAPI Generator. 22 | Ref: https://openapi-generator.tech 23 | 24 | Do not edit the class manually. 25 | """ 26 | 27 | """ 28 | Attributes: 29 | openapi_types (dict): The key is attribute name 30 | and the value is attribute type. 31 | attribute_map (dict): The key is attribute name 32 | and the value is json key in definition. 33 | """ 34 | openapi_types = { 35 | 'name': 'str' 36 | } 37 | 38 | attribute_map = { 39 | 'name': 'name' 40 | } 41 | 42 | def __init__(self, name=None): # noqa: E501 43 | """TeamRecipientAllOf - a model defined in OpenAPI""" # noqa: E501 44 | 45 | self._name = None 46 | self.discriminator = None 47 | 48 | if name is not None: 49 | self.name = name 50 | 51 | @property 52 | def name(self): 53 | """Gets the name of this TeamRecipientAllOf. # noqa: E501 54 | 55 | 56 | :return: The name of this TeamRecipientAllOf. # noqa: E501 57 | :rtype: str 58 | """ 59 | return self._name 60 | 61 | @name.setter 62 | def name(self, name): 63 | """Sets the name of this TeamRecipientAllOf. 64 | 65 | 66 | :param name: The name of this TeamRecipientAllOf. # noqa: E501 67 | :type: str 68 | """ 69 | 70 | self._name = name 71 | 72 | def to_dict(self): 73 | """Returns the model properties as a dict""" 74 | result = {} 75 | 76 | for attr, _ in six.iteritems(self.openapi_types): 77 | value = getattr(self, attr) 78 | if isinstance(value, list): 79 | result[attr] = list(map( 80 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 81 | value 82 | )) 83 | elif hasattr(value, "to_dict"): 84 | result[attr] = value.to_dict() 85 | elif isinstance(value, dict): 86 | result[attr] = dict(map( 87 | lambda item: (item[0], item[1].to_dict()) 88 | if hasattr(item[1], "to_dict") else item, 89 | value.items() 90 | )) 91 | else: 92 | result[attr] = value 93 | 94 | return result 95 | 96 | def to_str(self): 97 | """Returns the string representation of the model""" 98 | return pprint.pformat(self.to_dict()) 99 | 100 | def __repr__(self): 101 | """For `print` and `pprint`""" 102 | return self.to_str() 103 | 104 | def __eq__(self, other): 105 | """Returns true if both objects are equal""" 106 | if not isinstance(other, TeamRecipientAllOf): 107 | return False 108 | 109 | return self.__dict__ == other.__dict__ 110 | 111 | def __ne__(self, other): 112 | """Returns true if both objects are not equal""" 113 | return not self == other 114 | -------------------------------------------------------------------------------- /opsgenie_sdk/models/user_recipient.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Python SDK for Opsgenie REST API 5 | 6 | Python SDK for Opsgenie REST API # noqa: E501 7 | 8 | The version of the OpenAPI document: 2.0.0 9 | Contact: support@opsgenie.com 10 | Generated by: https://openapi-generator.tech 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class UserRecipient(object): 21 | """NOTE: This class is auto generated by OpenAPI Generator. 22 | Ref: https://openapi-generator.tech 23 | 24 | Do not edit the class manually. 25 | """ 26 | 27 | """ 28 | Attributes: 29 | openapi_types (dict): The key is attribute name 30 | and the value is attribute type. 31 | attribute_map (dict): The key is attribute name 32 | and the value is json key in definition. 33 | """ 34 | openapi_types = { 35 | 'username': 'str' 36 | } 37 | 38 | attribute_map = { 39 | 'username': 'username' 40 | } 41 | 42 | def __init__(self, username=None): # noqa: E501 43 | """UserRecipient - a model defined in OpenAPI""" # noqa: E501 44 | 45 | self._username = None 46 | self.discriminator = None 47 | 48 | if username is not None: 49 | self.username = username 50 | 51 | @property 52 | def username(self): 53 | """Gets the username of this UserRecipient. # noqa: E501 54 | 55 | 56 | :return: The username of this UserRecipient. # noqa: E501 57 | :rtype: str 58 | """ 59 | return self._username 60 | 61 | @username.setter 62 | def username(self, username): 63 | """Sets the username of this UserRecipient. 64 | 65 | 66 | :param username: The username of this UserRecipient. # noqa: E501 67 | :type: str 68 | """ 69 | 70 | self._username = username 71 | 72 | def to_dict(self): 73 | """Returns the model properties as a dict""" 74 | result = {} 75 | 76 | for attr, _ in six.iteritems(self.openapi_types): 77 | value = getattr(self, attr) 78 | if isinstance(value, list): 79 | result[attr] = list(map( 80 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 81 | value 82 | )) 83 | elif hasattr(value, "to_dict"): 84 | result[attr] = value.to_dict() 85 | elif isinstance(value, dict): 86 | result[attr] = dict(map( 87 | lambda item: (item[0], item[1].to_dict()) 88 | if hasattr(item[1], "to_dict") else item, 89 | value.items() 90 | )) 91 | else: 92 | result[attr] = value 93 | 94 | return result 95 | 96 | def to_str(self): 97 | """Returns the string representation of the model""" 98 | return pprint.pformat(self.to_dict()) 99 | 100 | def __repr__(self): 101 | """For `print` and `pprint`""" 102 | return self.to_str() 103 | 104 | def __eq__(self, other): 105 | """Returns true if both objects are equal""" 106 | if not isinstance(other, UserRecipient): 107 | return False 108 | 109 | return self.__dict__ == other.__dict__ 110 | 111 | def __ne__(self, other): 112 | """Returns true if both objects are not equal""" 113 | return not self == other 114 | -------------------------------------------------------------------------------- /opsgenie_sdk/models/user_responder_all_of.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Python SDK for Opsgenie REST API 5 | 6 | Python SDK for Opsgenie REST API # noqa: E501 7 | 8 | The version of the OpenAPI document: 2.0.0 9 | Contact: support@opsgenie.com 10 | Generated by: https://openapi-generator.tech 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class UserResponderAllOf(object): 21 | """NOTE: This class is auto generated by OpenAPI Generator. 22 | Ref: https://openapi-generator.tech 23 | 24 | Do not edit the class manually. 25 | """ 26 | 27 | """ 28 | Attributes: 29 | openapi_types (dict): The key is attribute name 30 | and the value is attribute type. 31 | attribute_map (dict): The key is attribute name 32 | and the value is json key in definition. 33 | """ 34 | openapi_types = { 35 | 'id': 'str' 36 | } 37 | 38 | attribute_map = { 39 | 'id': 'id' 40 | } 41 | 42 | def __init__(self, id=None): # noqa: E501 43 | """UserResponderAllOf - a model defined in OpenAPI""" # noqa: E501 44 | 45 | self._id = None 46 | self.discriminator = None 47 | 48 | if id is not None: 49 | self.id = id 50 | 51 | @property 52 | def id(self): 53 | """Gets the id of this UserResponderAllOf. # noqa: E501 54 | 55 | 56 | :return: The id of this UserResponderAllOf. # noqa: E501 57 | :rtype: str 58 | """ 59 | return self._id 60 | 61 | @id.setter 62 | def id(self, id): 63 | """Sets the id of this UserResponderAllOf. 64 | 65 | 66 | :param id: The id of this UserResponderAllOf. # noqa: E501 67 | :type: str 68 | """ 69 | 70 | self._id = id 71 | 72 | def to_dict(self): 73 | """Returns the model properties as a dict""" 74 | result = {} 75 | 76 | for attr, _ in six.iteritems(self.openapi_types): 77 | value = getattr(self, attr) 78 | if isinstance(value, list): 79 | result[attr] = list(map( 80 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 81 | value 82 | )) 83 | elif hasattr(value, "to_dict"): 84 | result[attr] = value.to_dict() 85 | elif isinstance(value, dict): 86 | result[attr] = dict(map( 87 | lambda item: (item[0], item[1].to_dict()) 88 | if hasattr(item[1], "to_dict") else item, 89 | value.items() 90 | )) 91 | else: 92 | result[attr] = value 93 | 94 | return result 95 | 96 | def to_str(self): 97 | """Returns the string representation of the model""" 98 | return pprint.pformat(self.to_dict()) 99 | 100 | def __repr__(self): 101 | """For `print` and `pprint`""" 102 | return self.to_str() 103 | 104 | def __eq__(self, other): 105 | """Returns true if both objects are equal""" 106 | if not isinstance(other, UserResponderAllOf): 107 | return False 108 | 109 | return self.__dict__ == other.__dict__ 110 | 111 | def __ne__(self, other): 112 | """Returns true if both objects are not equal""" 113 | return not self == other 114 | -------------------------------------------------------------------------------- /opsgenie_sdk/proxy_configuration.py: -------------------------------------------------------------------------------- 1 | from opsgenie_sdk.errors import InvalidConfigurationError 2 | 3 | 4 | class ProxyConfiguration: 5 | def __init__(self, host=None, port=None, username=None, password=None, protocol=None): 6 | """ 7 | Proxy configuration to use with opsgenie_sdk 8 | ---------- 9 | Example Usage: 10 | conf = opsgenie_sdk.configuration.Configuration() 11 | proxy_url = opsgenie_sdk.proxy_configuration.ProxyConfiguration().get_proxy_url() 12 | conf.proxy = proxy_url 13 | ---------- 14 | Parameters: 15 | host : str 16 | IP or the domain name of the proxy server ("10.10.0.1") 17 | port : int 18 | Port number of the proxy server ( 5432 ) 19 | username : str, optional 20 | password : str, optional 21 | protocol : {'http', 'https'} 22 | """ 23 | self.host = host 24 | self.port = port 25 | self.username = username 26 | self.password = password 27 | self.protocol = protocol.lower() if protocol is not None else None 28 | 29 | def validate(self): 30 | if not self.host or not self.port: 31 | raise InvalidConfigurationError("Host and Port Should be given") 32 | if self.protocol is None or not (self.protocol == "http" or self.protocol == "https"): 33 | raise InvalidConfigurationError( 34 | "Proxy Protocol must be one of ['http', 'https']. Current: {}".format(self.protocol)) 35 | 36 | def get_proxy_url(self): 37 | self.validate() 38 | 39 | if self.username: 40 | return self.protocol + '://' + self.username + ':' + self.password + '@' + self.host + ':' + self.port 41 | else: 42 | return self.protocol + '://' + self.host + ':' + self.port 43 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | certifi >= 14.05.14 2 | six >= 1.10 3 | python_dateutil >= 2.5.3 4 | setuptools >= 21.0.0 5 | urllib3 >= 1.26.5 6 | tenacity >= 5.0.4 7 | -------------------------------------------------------------------------------- /samples/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opsgenie/opsgenie-python-sdk/0d20d2314522fc0fd8ca5f0faa16f7c96387e123/samples/__init__.py -------------------------------------------------------------------------------- /samples/account.py: -------------------------------------------------------------------------------- 1 | import getopt 2 | import sys 3 | 4 | import opsgenie_sdk 5 | from opsgenie_sdk.metrics.observer import Observer 6 | from opsgenie_sdk.rest import ApiException 7 | 8 | 9 | class MetricObserver(Observer): 10 | def notify(self, publisher): 11 | print("{}: '{}' has now metric data = {}".format(type(self).__name__, 12 | publisher.name, publisher.data)) 13 | 14 | 15 | class Account: 16 | def __init__(self, opsgenie_api_key): 17 | self.conf = self.conf = opsgenie_sdk.configuration.Configuration() 18 | self.conf.api_key['Authorization'] = opsgenie_api_key 19 | 20 | self.conf.debug = False 21 | 22 | self.conf.retry_count = 5 23 | self.conf.retry_http_response = ['4xx', '5xx'] 24 | self.conf.retry_delay = 2 25 | self.conf.retry_enabled = True 26 | 27 | self.api_client = opsgenie_sdk.api_client.ApiClient(configuration=self.conf) 28 | self.account_api = opsgenie_sdk.AccountApi(api_client=self.api_client) 29 | 30 | def get_info(self): 31 | try: 32 | info_response = self.account_api.get_info() 33 | print(info_response) 34 | return info_response 35 | except ApiException as err: 36 | print("Exception when calling AccountApi->get_info: %s\n" % err) 37 | 38 | 39 | def main(argv): 40 | opsgenie_api_key = '' 41 | try: 42 | opts, args = getopt.getopt(argv, "ha:s:") 43 | except getopt.GetoptError: 44 | print('account.py -a ') 45 | sys.exit(2) 46 | for opt, arg in opts: 47 | if opt == '-h': 48 | print('account.py -a ') 49 | sys.exit() 50 | elif opt == '-a': 51 | opsgenie_api_key = arg 52 | if not opsgenie_api_key: 53 | print('account.py -a ') 54 | sys.exit(2) 55 | 56 | account = Account(opsgenie_api_key) 57 | 58 | metric_observer = MetricObserver() 59 | 60 | api_metric_publisher = account.api_client.api_metric_publisher 61 | api_metric_publisher.subscribe(metric_observer) 62 | 63 | http_metric_publisher = account.api_client.http_metric_publisher 64 | http_metric_publisher.subscribe(metric_observer) 65 | 66 | sdk_metric_publisher = account.api_client.sdk_metric_publisher 67 | sdk_metric_publisher.subscribe(metric_observer) 68 | 69 | print() 70 | print('Get Account Info:') 71 | account.get_info() 72 | 73 | 74 | if __name__ == '__main__': 75 | main(sys.argv[1:]) 76 | -------------------------------------------------------------------------------- /scripts/oas/generate.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | while getopts o: option 4 | do 5 | case "${option}" 6 | in 7 | o) OPSGENIE_OAS=${OPTARG};; 8 | esac 9 | done 10 | 11 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 12 | 13 | cd "${OPSGENIE_OAS}" 14 | node "${OPSGENIE_OAS}/multi-file-swagger/index.js" "${OPSGENIE_OAS}/swagger.yaml" alert incident heartbeat account > "${DIR}/../../opsgenie-oas.json" 15 | cd "${DIR}" 16 | -------------------------------------------------------------------------------- /scripts/sdk/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "packageName": "opsgenie_sdk", 3 | "projectName": "opsgenie-sdk", 4 | "packageVersion": "2.1.5", 5 | "packageUrl": "https://github.com/opsgenie/opsgenie-python-sdk", 6 | "sortParamsByRequiredFlag": "true", 7 | "hideGenerationTimestamp": "true", 8 | "library": "urllib3" 9 | } 10 | -------------------------------------------------------------------------------- /scripts/sdk/generate.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | rm -rf ../../sdk_generated/ 4 | 5 | java -DapiTests=false -DmodelTests=false -cp openapi-generator-cli.jar:opsgenie-python-openapi-generator-1.0.0.jar org.openapitools.codegen.OpenAPIGenerator generate -g geniepy -i ../../opsgenie-oas.yml -c config.json -o ../../sdk_generated -t ../../templates 6 | 7 | python refactor_project.py 8 | 9 | rsync -avh ../../sdk_generated/ ../../ 10 | 11 | rm -rf ../../sdk_generated/ 12 | -------------------------------------------------------------------------------- /scripts/sdk/openapi-generator-cli.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opsgenie/opsgenie-python-sdk/0d20d2314522fc0fd8ca5f0faa16f7c96387e123/scripts/sdk/openapi-generator-cli.jar -------------------------------------------------------------------------------- /scripts/sdk/opsgenie-python-openapi-generator-1.0.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opsgenie/opsgenie-python-sdk/0d20d2314522fc0fd8ca5f0faa16f7c96387e123/scripts/sdk/opsgenie-python-openapi-generator-1.0.0.jar -------------------------------------------------------------------------------- /scripts/sdk/refactor_project.py: -------------------------------------------------------------------------------- 1 | import csv 2 | 3 | import rope.base.project 4 | from rope.base import libutils 5 | from rope.refactor.move import MoveModule 6 | from rope.refactor.rename import Rename 7 | from rope.refactor.topackage import ModuleToPackage 8 | 9 | sdk_generated_path = '../../sdk_generated/' 10 | sdk_path = 'opsgenie_sdk/' 11 | 12 | 13 | # move each domain api resource into separate package 14 | def move_all_api_modules_to_package(): 15 | print('API modules are moving their own packages.') 16 | for api_resource in api_resources.get_files(): 17 | if api_resource.name != '__init__.py': 18 | print('\tfileName: ' + api_resource.name) 19 | 20 | moduleToPackage = ModuleToPackage(project, api_resource) 21 | changes = moduleToPackage.get_changes() 22 | project.do(changes) 23 | 24 | 25 | # rename api module (drop redundant '_api' suffix) 26 | def rename_all_api_modules(): 27 | print('API modules are renaming (drop redundant "_api" suffix).') 28 | for api_resource in api_resources.get_folders(): 29 | if api_resource.name.endswith('_api'): 30 | rename = Rename(project, api_resource) 31 | new_name = rename.get_old_name().split('_api')[0] 32 | 33 | print('\told: ' + api_resource.name + ' new: ' + new_name) 34 | 35 | changes = rename.get_changes(new_name) 36 | project.do(changes) 37 | 38 | 39 | # move domain specific models from common model package to related api module 40 | def move_domain_models(): 41 | print('Domain specific models are moving to related api packages.') 42 | with open(sdk_generated_path + 'opsgenieCodegenModels.csv', mode='r') as csv_file: 43 | csv_reader = csv.DictReader(csv_file) 44 | 45 | for row in csv_reader: 46 | if row['opsgenieDomain'] != 'common': 47 | model_resource = libutils.path_to_resource(project, 48 | sdk_generated_path + sdk_path + 'models/' + row['classFilename'] + '.py', 49 | 'file') 50 | model_dest_resource = libutils.path_to_resource(project, 51 | sdk_generated_path + sdk_path + 'api/' + row['opsgenieDomain'], 52 | 'folder') 53 | 54 | if model_resource.exists() and model_dest_resource.exists(): 55 | print('\tclassname: ' + row["classname"] + ' classFilename: ' + row["classFilename"] + ' opsgenieDomain: ' + row["opsgenieDomain"]) 56 | 57 | moveModule = MoveModule(project, model_resource) 58 | changes = moveModule.get_changes(model_dest_resource) 59 | project.do(changes) 60 | 61 | 62 | project = rope.base.project.Project(sdk_generated_path) 63 | 64 | api_resources = libutils.path_to_resource(project, sdk_generated_path + sdk_path + 'api', 'folder') 65 | 66 | move_all_api_modules_to_package() 67 | rename_all_api_modules() 68 | move_domain_models() 69 | 70 | project.close() 71 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Python SDK for Opsgenie REST API 5 | 6 | Python SDK for Opsgenie REST API # noqa: E501 7 | 8 | The version of the OpenAPI document: 2.0.0 9 | Contact: support@opsgenie.com 10 | Generated by: https://openapi-generator.tech 11 | """ 12 | 13 | 14 | import os 15 | 16 | from setuptools import setup, find_packages # noqa: H301 17 | 18 | NAME = "opsgenie-sdk" 19 | VERSION = "2.1.5" 20 | # To install the library, run the following 21 | # 22 | # python setup.py install 23 | # 24 | # prerequisite: setuptools 25 | # http://pypi.python.org/pypi/setuptools 26 | 27 | REQUIRES = ["urllib3 >= 1.26.5", "six >= 1.10", "certifi", "python-dateutil", "setuptools >= 21.0.0", "tenacity >= 5.0.4"] 28 | 29 | with open("README.md", "r") as fh: 30 | long_description = fh.read() 31 | 32 | setup( 33 | name=NAME, 34 | version=VERSION, 35 | author="OpsGenie", 36 | author_email="support@opsgenie.com", 37 | description="Python SDK for Opsgenie REST API", 38 | long_description=long_description, 39 | long_description_content_type="text/markdown", 40 | url="https://github.com/opsgenie/opsgenie-python-sdk", 41 | packages=find_packages(exclude=['samples']), 42 | keywords=["OpenAPI", "OpenAPI-Generator", "Python SDK for Opsgenie REST API", "OpsGenie", "Opsgenie"], 43 | install_requires=REQUIRES, 44 | include_package_data=True, 45 | project_urls={ 46 | 'Documentation': 'https://docs.opsgenie.com/docs/opsgenie-python-api', 47 | 'Source': 'https://github.com/opsgenie/opsgenie-python-sdk', 48 | 'Tracker': 'https://github.com/opsgenie/opsgenie-python-sdk/issues', 49 | }, 50 | classifiers=[ 51 | 'Development Status :: 5 - Production/Stable', 52 | 'License :: OSI Approved :: Apache Software License', 53 | "Operating System :: OS Independent", 54 | ] 55 | ) 56 | -------------------------------------------------------------------------------- /templates-original/README.mustache: -------------------------------------------------------------------------------- 1 | # {{{projectName}}} 2 | {{#appDescription}} 3 | {{{appDescription}}} 4 | {{/appDescription}} 5 | 6 | This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: 7 | 8 | - API version: {{appVersion}} 9 | - Package version: {{packageVersion}} 10 | {{^hideGenerationTimestamp}} 11 | - Build date: {{generatedDate}} 12 | {{/hideGenerationTimestamp}} 13 | - Build package: {{generatorClass}} 14 | {{#infoUrl}} 15 | For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) 16 | {{/infoUrl}} 17 | 18 | ## Requirements. 19 | 20 | Python 2.7 and 3.4+ 21 | 22 | ## Installation & Usage 23 | ### pip install 24 | 25 | If the python package is hosted on Github, you can install directly from Github 26 | 27 | ```sh 28 | pip install git+https://github.com/{{{gitUserId}}}/{{{gitRepoId}}}.git 29 | ``` 30 | (you may need to run `pip` with root permission: `sudo pip install git+https://github.com/{{{gitUserId}}}/{{{gitRepoId}}}.git`) 31 | 32 | Then import the package: 33 | ```python 34 | import {{{packageName}}} 35 | ``` 36 | 37 | ### Setuptools 38 | 39 | Install via [Setuptools](http://pypi.python.org/pypi/setuptools). 40 | 41 | ```sh 42 | python setup.py install --user 43 | ``` 44 | (or `sudo python setup.py install` to install the package for all users) 45 | 46 | Then import the package: 47 | ```python 48 | import {{{packageName}}} 49 | ``` 50 | 51 | ## Getting Started 52 | 53 | Please follow the [installation procedure](#installation--usage) and then run the following: 54 | 55 | {{> common_README }} 56 | -------------------------------------------------------------------------------- /templates-original/README_onlypackage.mustache: -------------------------------------------------------------------------------- 1 | # {{{projectName}}} 2 | {{#appDescription}} 3 | {{{appDescription}}} 4 | {{/appDescription}} 5 | 6 | The `{{packageName}}` package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: 7 | 8 | - API version: {{appVersion}} 9 | - Package version: {{packageVersion}} 10 | {{^hideGenerationTimestamp}} 11 | - Build date: {{generatedDate}} 12 | {{/hideGenerationTimestamp}} 13 | - Build package: {{generatorClass}} 14 | {{#infoUrl}} 15 | For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) 16 | {{/infoUrl}} 17 | 18 | ## Requirements. 19 | 20 | Python 2.7 and 3.4+ 21 | 22 | ## Installation & Usage 23 | 24 | This python library package is generated without supporting files like setup.py or requirements files 25 | 26 | To be able to use it, you will need these dependencies in your own package that uses this library: 27 | 28 | * urllib3 >= 1.26.2 29 | * six >= 1.10 30 | * certifi 31 | * python-dateutil 32 | {{#asyncio}} 33 | * aiohttp 34 | {{/asyncio}} 35 | {{#tornado}} 36 | * tornado>=4.2,<5 37 | {{/tornado}} 38 | 39 | ## Getting Started 40 | 41 | In your own code, to use this library to connect and interact with {{{projectName}}}, 42 | you can run the following: 43 | 44 | {{> common_README }} 45 | -------------------------------------------------------------------------------- /templates-original/__init__api.mustache: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | # flake8: noqa 4 | 5 | # import apis into api package 6 | {{#apiInfo}}{{#apis}}from {{apiPackage}}.{{classVarName}} import {{classname}} 7 | {{/apis}}{{/apiInfo}} -------------------------------------------------------------------------------- /templates-original/__init__model.mustache: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | # flake8: noqa 4 | {{>partial_header}} 5 | 6 | from __future__ import absolute_import 7 | 8 | # import models into model package 9 | {{#models}}{{#model}}from {{modelPackage}}.{{classFilename}} import {{classname}}{{/model}} 10 | {{/models}} 11 | -------------------------------------------------------------------------------- /templates-original/__init__package.mustache: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | # flake8: noqa 4 | 5 | {{>partial_header}} 6 | 7 | from __future__ import absolute_import 8 | 9 | __version__ = "{{packageVersion}}" 10 | 11 | # import apis into sdk package 12 | {{#apiInfo}}{{#apis}}from {{apiPackage}}.{{classVarName}} import {{classname}} 13 | {{/apis}}{{/apiInfo}} 14 | # import ApiClient 15 | from {{packageName}}.api_client import ApiClient 16 | from {{packageName}}.configuration import Configuration 17 | from {{packageName}}.exceptions import OpenApiException 18 | from {{packageName}}.exceptions import ApiTypeError 19 | from {{packageName}}.exceptions import ApiValueError 20 | from {{packageName}}.exceptions import ApiKeyError 21 | from {{packageName}}.exceptions import ApiException 22 | # import models into sdk package 23 | {{#models}}{{#model}}from {{modelPackage}}.{{classFilename}} import {{classname}} 24 | {{/model}}{{/models}} 25 | -------------------------------------------------------------------------------- /templates-original/__init__test.mustache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opsgenie/opsgenie-python-sdk/0d20d2314522fc0fd8ca5f0faa16f7c96387e123/templates-original/__init__test.mustache -------------------------------------------------------------------------------- /templates-original/api_doc.mustache: -------------------------------------------------------------------------------- 1 | # {{packageName}}.{{classname}}{{#description}} 2 | {{description}}{{/description}} 3 | 4 | All URIs are relative to *{{basePath}}* 5 | 6 | Method | HTTP request | Description 7 | ------------- | ------------- | ------------- 8 | {{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} 9 | {{/operation}}{{/operations}} 10 | 11 | {{#operations}} 12 | {{#operation}} 13 | # **{{{operationId}}}** 14 | > {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}({{#allParams}}{{#required}}{{{paramName}}}{{/required}}{{^required}}{{{paramName}}}={{{paramName}}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) 15 | 16 | {{{summary}}}{{#notes}} 17 | 18 | {{{notes}}}{{/notes}} 19 | 20 | ### Example 21 | 22 | {{#hasAuthMethods}} 23 | {{#authMethods}} 24 | {{#isBasic}} 25 | {{^isBasicBearer}} 26 | * Basic Authentication ({{name}}): 27 | {{/isBasicBearer}} 28 | {{#isBasicBearer}} 29 | * Bearer{{#bearerFormat}} ({{{.}}}){{/bearerFormat}} Authentication ({{name}}): 30 | {{/isBasicBearer}} 31 | {{/isBasic}} 32 | {{#isApiKey}} 33 | * Api Key Authentication ({{name}}): 34 | {{/isApiKey }} 35 | {{#isOAuth}} 36 | * OAuth Authentication ({{name}}): 37 | {{/isOAuth }} 38 | {{> api_doc_example }} 39 | {{/authMethods}} 40 | {{/hasAuthMethods}} 41 | {{^hasAuthMethods}} 42 | {{> api_doc_example }} 43 | {{/hasAuthMethods}} 44 | ### Parameters 45 | {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} 46 | Name | Type | Description | Notes 47 | ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} 48 | {{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{baseType}}.md){{/isPrimitiveType}}{{/isFile}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} 49 | {{/allParams}} 50 | 51 | ### Return type 52 | 53 | {{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}} 54 | 55 | ### Authorization 56 | 57 | {{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{{name}}}](../README.md#{{{name}}}){{^-last}}, {{/-last}}{{/authMethods}} 58 | 59 | ### HTTP request headers 60 | 61 | - **Content-Type**: {{#consumes}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} 62 | - **Accept**: {{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}} 63 | 64 | [[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) 65 | 66 | {{/operation}} 67 | {{/operations}} 68 | -------------------------------------------------------------------------------- /templates-original/api_doc_example.mustache: -------------------------------------------------------------------------------- 1 | ```python 2 | from __future__ import print_function 3 | import time 4 | import {{{packageName}}} 5 | from {{{packageName}}}.rest import ApiException 6 | from pprint import pprint 7 | {{> python_doc_auth_partial}} 8 | {{#hasAuthMethods}} 9 | # create an instance of the API class 10 | api_instance = {{{packageName}}}.{{{classname}}}({{{packageName}}}.ApiClient(configuration)) 11 | {{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} 12 | {{/allParams}} 13 | {{/hasAuthMethods}} 14 | {{^hasAuthMethods}} 15 | # create an instance of the API class 16 | api_instance = {{{packageName}}}.{{{classname}}}() 17 | {{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} 18 | {{/allParams}} 19 | {{/hasAuthMethods}} 20 | 21 | try: 22 | {{#summary}} # {{{.}}} 23 | {{/summary}} {{#returnType}}api_response = {{/returnType}}api_instance.{{{operationId}}}({{#allParams}}{{#required}}{{paramName}}{{/required}}{{^required}}{{paramName}}={{paramName}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}){{#returnType}} 24 | pprint(api_response){{/returnType}} 25 | except ApiException as e: 26 | print("Exception when calling {{classname}}->{{operationId}}: %s\n" % e) 27 | ``` 28 | -------------------------------------------------------------------------------- /templates-original/api_test.mustache: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | {{>partial_header}} 4 | 5 | from __future__ import absolute_import 6 | 7 | import unittest 8 | 9 | import {{packageName}} 10 | from {{apiPackage}}.{{classVarName}} import {{classname}} # noqa: E501 11 | from {{packageName}}.rest import ApiException 12 | 13 | 14 | class {{#operations}}Test{{classname}}(unittest.TestCase): 15 | """{{classname}} unit test stubs""" 16 | 17 | def setUp(self): 18 | self.api = {{apiPackage}}.{{classVarName}}.{{classname}}() # noqa: E501 19 | 20 | def tearDown(self): 21 | pass 22 | 23 | {{#operation}} 24 | def test_{{operationId}}(self): 25 | """Test case for {{{operationId}}} 26 | 27 | {{#summary}} 28 | {{{summary}}} # noqa: E501 29 | {{/summary}} 30 | """ 31 | pass 32 | 33 | {{/operation}} 34 | {{/operations}} 35 | 36 | if __name__ == '__main__': 37 | unittest.main() 38 | -------------------------------------------------------------------------------- /templates-original/common_README.mustache: -------------------------------------------------------------------------------- 1 | ```python 2 | from __future__ import print_function 3 | import time 4 | import {{{packageName}}} 5 | from {{{packageName}}}.rest import ApiException 6 | from pprint import pprint 7 | {{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} 8 | {{> python_doc_auth_partial}} 9 | # create an instance of the API class 10 | api_instance = {{{packageName}}}.{{{classname}}}({{{packageName}}}.ApiClient(configuration)) 11 | {{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} 12 | {{/allParams}} 13 | 14 | try: 15 | {{#summary}} # {{{.}}} 16 | {{/summary}} {{#returnType}}api_response = {{/returnType}}api_instance.{{{operationId}}}({{#allParams}}{{#required}}{{paramName}}{{/required}}{{^required}}{{paramName}}={{paramName}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}){{#returnType}} 17 | pprint(api_response){{/returnType}} 18 | except ApiException as e: 19 | print("Exception when calling {{classname}}->{{operationId}}: %s\n" % e) 20 | {{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} 21 | ``` 22 | 23 | ## Documentation for API Endpoints 24 | 25 | All URIs are relative to *{{basePath}}* 26 | 27 | Class | Method | HTTP request | Description 28 | ------------ | ------------- | ------------- | ------------- 29 | {{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} 30 | {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} 31 | 32 | ## Documentation For Models 33 | 34 | {{#models}}{{#model}} - [{{{classname}}}]({{modelDocPath}}{{{classname}}}.md) 35 | {{/model}}{{/models}} 36 | 37 | ## Documentation For Authorization 38 | 39 | {{^authMethods}} 40 | All endpoints do not require authorization. 41 | {{/authMethods}} 42 | {{#authMethods}} 43 | {{#last}} Authentication schemes defined for the API:{{/last}} 44 | ## {{{name}}} 45 | 46 | {{#isApiKey}} 47 | - **Type**: API key 48 | - **API key parameter name**: {{{keyParamName}}} 49 | - **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} 50 | {{/isApiKey}} 51 | {{#isBasic}} 52 | {{^isBasicBearer}} 53 | - **Type**: HTTP basic authentication 54 | {{/isBasicBearer}} 55 | {{#isBasicBearer}} 56 | - **Type**: Bearer authentication{{#bearerFormat}} ({{{.}}}){{/bearerFormat}} 57 | {{/isBasicBearer}} 58 | {{/isBasic}} 59 | {{#isOAuth}} 60 | - **Type**: OAuth 61 | - **Flow**: {{{flow}}} 62 | - **Authorization URL**: {{{authorizationUrl}}} 63 | - **Scopes**: {{^scopes}}N/A{{/scopes}} 64 | {{#scopes}} - **{{{scope}}}**: {{{description}}} 65 | {{/scopes}} 66 | {{/isOAuth}} 67 | 68 | {{/authMethods}} 69 | 70 | ## Author 71 | 72 | {{#apiInfo}}{{#apis}}{{^hasMore}}{{infoEmail}} 73 | {{/hasMore}}{{/apis}}{{/apiInfo}} 74 | -------------------------------------------------------------------------------- /templates-original/git_push.sh.mustache: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ 3 | # 4 | # Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" 5 | 6 | git_user_id=$1 7 | git_repo_id=$2 8 | release_note=$3 9 | 10 | if [ "$git_user_id" = "" ]; then 11 | git_user_id="{{{gitUserId}}}" 12 | echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" 13 | fi 14 | 15 | if [ "$git_repo_id" = "" ]; then 16 | git_repo_id="{{{gitRepoId}}}" 17 | echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" 18 | fi 19 | 20 | if [ "$release_note" = "" ]; then 21 | release_note="{{{releaseNote}}}" 22 | echo "[INFO] No command line input provided. Set \$release_note to $release_note" 23 | fi 24 | 25 | # Initialize the local directory as a Git repository 26 | git init 27 | 28 | # Adds the files in the local repository and stages them for commit. 29 | git add . 30 | 31 | # Commits the tracked changes and prepares them to be pushed to a remote repository. 32 | git commit -m "$release_note" 33 | 34 | # Sets the new remote 35 | git_remote=`git remote` 36 | if [ "$git_remote" = "" ]; then # git remote not defined 37 | 38 | if [ "$GIT_TOKEN" = "" ]; then 39 | echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." 40 | git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git 41 | else 42 | git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git 43 | fi 44 | 45 | fi 46 | 47 | git pull origin master 48 | 49 | # Pushes (Forces) the changes in the local repository up to the remote repository 50 | echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" 51 | git push origin master 2>&1 | grep -v 'To https' 52 | 53 | -------------------------------------------------------------------------------- /templates-original/gitignore.mustache: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | env/ 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | 27 | # PyInstaller 28 | # Usually these files are written by a python script from a template 29 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 30 | *.manifest 31 | *.spec 32 | 33 | # Installer logs 34 | pip-log.txt 35 | pip-delete-this-directory.txt 36 | 37 | # Unit test / coverage reports 38 | htmlcov/ 39 | .tox/ 40 | .coverage 41 | .coverage.* 42 | .cache 43 | nosetests.xml 44 | coverage.xml 45 | *,cover 46 | .hypothesis/ 47 | venv/ 48 | .python-version 49 | 50 | # Translations 51 | *.mo 52 | *.pot 53 | 54 | # Django stuff: 55 | *.log 56 | 57 | # Sphinx documentation 58 | docs/_build/ 59 | 60 | # PyBuilder 61 | target/ 62 | 63 | #Ipython Notebook 64 | .ipynb_checkpoints 65 | -------------------------------------------------------------------------------- /templates-original/model_doc.mustache: -------------------------------------------------------------------------------- 1 | {{#models}}{{#model}}# {{classname}} 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | {{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} 7 | {{/vars}} 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | {{/model}}{{/models}} 12 | -------------------------------------------------------------------------------- /templates-original/model_test.mustache: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | {{>partial_header}} 4 | 5 | from __future__ import absolute_import 6 | 7 | import unittest 8 | 9 | {{#models}} 10 | {{#model}} 11 | import {{packageName}} 12 | from {{modelPackage}}.{{classFilename}} import {{classname}} # noqa: E501 13 | from {{packageName}}.rest import ApiException 14 | 15 | 16 | class Test{{classname}}(unittest.TestCase): 17 | """{{classname}} unit test stubs""" 18 | 19 | def setUp(self): 20 | pass 21 | 22 | def tearDown(self): 23 | pass 24 | 25 | def test{{classname}}(self): 26 | """Test {{classname}}""" 27 | # FIXME: construct object with mandatory attributes with example values 28 | # model = {{packageName}}.models.{{classFilename}}.{{classname}}() # noqa: E501 29 | pass 30 | 31 | {{/model}} 32 | {{/models}} 33 | 34 | if __name__ == '__main__': 35 | unittest.main() 36 | -------------------------------------------------------------------------------- /templates-original/partial_header.mustache: -------------------------------------------------------------------------------- 1 | """ 2 | {{#appName}} 3 | {{{appName}}} 4 | {{/appName}} 5 | 6 | {{#appDescription}} 7 | {{{appDescription}}} # noqa: E501 8 | {{/appDescription}} 9 | 10 | {{#version}} 11 | The version of the OpenAPI document: {{{version}}} 12 | {{/version}} 13 | {{#infoEmail}} 14 | Contact: {{{infoEmail}}} 15 | {{/infoEmail}} 16 | Generated by: https://openapi-generator.tech 17 | """ 18 | -------------------------------------------------------------------------------- /templates-original/python_doc_auth_partial.mustache: -------------------------------------------------------------------------------- 1 | {{#hasAuthMethods}} 2 | {{#authMethods}} 3 | configuration = {{{packageName}}}.Configuration() 4 | {{#isBasic}} 5 | {{^isBasicBearer}} 6 | # Configure HTTP basic authorization: {{{name}}} 7 | configuration.username = 'YOUR_USERNAME' 8 | configuration.password = 'YOUR_PASSWORD' 9 | {{/isBasicBearer}} 10 | {{#isBasicBearer}} 11 | # Configure Bearer authorization{{#bearerFormat}} ({{{.}}}){{/bearerFormat}}: {{{name}}} 12 | configuration.access_token = 'YOUR_BEARER_TOKEN' 13 | {{/isBasicBearer}} 14 | {{/isBasic}} 15 | {{#isApiKey}} 16 | # Configure API key authorization: {{{name}}} 17 | configuration.api_key['{{{keyParamName}}}'] = 'YOUR_API_KEY' 18 | # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed 19 | # configuration.api_key_prefix['{{{keyParamName}}}'] = 'Bearer' 20 | {{/isApiKey}} 21 | {{#isOAuth}} 22 | # Configure OAuth2 access token for authorization: {{{name}}} 23 | configuration.access_token = 'YOUR_ACCESS_TOKEN' 24 | {{/isOAuth}} 25 | {{/authMethods}} 26 | {{/hasAuthMethods}} 27 | -------------------------------------------------------------------------------- /templates-original/requirements.mustache: -------------------------------------------------------------------------------- 1 | certifi >= 14.05.14 2 | six >= 1.10 3 | python_dateutil >= 2.5.3 4 | setuptools >= 21.0.0 5 | urllib3 >= 1.26.2 6 | -------------------------------------------------------------------------------- /templates-original/setup.mustache: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | {{>partial_header}} 4 | 5 | from setuptools import setup, find_packages # noqa: H301 6 | 7 | NAME = "{{{projectName}}}" 8 | VERSION = "{{packageVersion}}" 9 | {{#apiInfo}} 10 | {{#apis}} 11 | {{^hasMore}} 12 | # To install the library, run the following 13 | # 14 | # python setup.py install 15 | # 16 | # prerequisite: setuptools 17 | # http://pypi.python.org/pypi/setuptools 18 | 19 | REQUIRES = ["urllib3 >= 1.26.2", "six >= 1.10", "certifi", "python-dateutil"] 20 | {{#asyncio}} 21 | REQUIRES.append("aiohttp >= 3.0.0") 22 | {{/asyncio}} 23 | {{#tornado}} 24 | REQUIRES.append("tornado>=4.2,<5") 25 | {{/tornado}} 26 | 27 | setup( 28 | name=NAME, 29 | version=VERSION, 30 | description="{{appName}}", 31 | author_email="{{infoEmail}}", 32 | url="{{packageUrl}}", 33 | keywords=["OpenAPI", "OpenAPI-Generator", "{{{appName}}}"], 34 | install_requires=REQUIRES, 35 | packages=find_packages(), 36 | include_package_data=True, 37 | long_description="""\ 38 | {{appDescription}} # noqa: E501 39 | """ 40 | ) 41 | {{/hasMore}} 42 | {{/apis}} 43 | {{/apiInfo}} 44 | -------------------------------------------------------------------------------- /templates-original/test-requirements.mustache: -------------------------------------------------------------------------------- 1 | {{^asyncio}} 2 | coverage>=4.0.3 3 | nose>=1.3.7 4 | {{/asyncio}} 5 | {{#asyncio}} 6 | pytest>=3.6.0 7 | pytest-cov>=2.6.1 8 | {{/asyncio}} 9 | pluggy>=0.3.1 10 | py>=1.4.31 11 | randomize>=0.13 12 | -------------------------------------------------------------------------------- /templates-original/tox.mustache: -------------------------------------------------------------------------------- 1 | [tox] 2 | {{^asyncio}} 3 | envlist = py27, py3 4 | {{/asyncio}} 5 | {{#asyncio}} 6 | envlist = py3 7 | {{/asyncio}} 8 | 9 | [testenv] 10 | deps=-r{toxinidir}/requirements.txt 11 | -r{toxinidir}/test-requirements.txt 12 | 13 | commands= 14 | {{^asyncio}} 15 | nosetests \ 16 | [] 17 | {{/asyncio}} 18 | {{#asyncio}} 19 | pytest -v --cov petstore_api 20 | {{/asyncio}} 21 | -------------------------------------------------------------------------------- /templates-original/travis.mustache: -------------------------------------------------------------------------------- 1 | # ref: https://docs.travis-ci.com/user/languages/python 2 | language: python 3 | python: 4 | - "2.7" 5 | - "3.2" 6 | - "3.3" 7 | - "3.4" 8 | - "3.5" 9 | #- "3.5-dev" # 3.5 development branch 10 | #- "nightly" # points to the latest development branch e.g. 3.6-dev 11 | # command to install dependencies 12 | install: "pip install -r requirements.txt" 13 | # command to run tests 14 | script: nosetests 15 | -------------------------------------------------------------------------------- /templates/LICENSE.mustache: -------------------------------------------------------------------------------- 1 | Copyright 2019 Opsgenie 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /templates/README.mustache: -------------------------------------------------------------------------------- 1 | # {{{appDescription}}} 2 | 3 | This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: 4 | 5 | - API version: {{appVersion}} 6 | - Package version: {{packageVersion}} 7 | {{^hideGenerationTimestamp}} 8 | - Build date: {{generatedDate}} 9 | {{/hideGenerationTimestamp}} 10 | - Build package: {{generatorClass}} 11 | {{#infoUrl}} 12 | 13 | For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) 14 | {{/infoUrl}} 15 | 16 | ## Requirements. 17 | 18 | Python 2.7 and 3.4+ 19 | 20 | ## Installation & Usage 21 | ### pip install 22 | 23 | If the python package is hosted on Github, you can install directly from Github 24 | 25 | ```sh 26 | pip install {{{projectName}}} 27 | ``` 28 | (you may need to run `pip` with root permission: `sudo pip install {{{projectName}}}`) 29 | 30 | Then import the package: 31 | ```python 32 | import {{{packageName}}} 33 | ``` 34 | 35 | ### Setuptools 36 | 37 | Install via [Setuptools](http://pypi.python.org/pypi/setuptools). 38 | 39 | ```sh 40 | python setup.py install --user 41 | ``` 42 | (or `sudo python setup.py install` to install the package for all users) 43 | 44 | Then import the package: 45 | ```python 46 | import {{{packageName}}} 47 | ``` 48 | 49 | ## Getting Started 50 | 51 | Please follow the [installation procedure](#installation--usage) and then run the following: 52 | 53 | {{> common_README }} 54 | -------------------------------------------------------------------------------- /templates/README_onlypackage.mustache: -------------------------------------------------------------------------------- 1 | # {{{projectName}}} 2 | {{#appDescription}} 3 | {{{appDescription}}} 4 | {{/appDescription}} 5 | 6 | The `{{packageName}}` package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: 7 | 8 | - API version: {{appVersion}} 9 | - Package version: {{packageVersion}} 10 | {{^hideGenerationTimestamp}} 11 | - Build date: {{generatedDate}} 12 | {{/hideGenerationTimestamp}} 13 | - Build package: {{generatorClass}} 14 | {{#infoUrl}} 15 | For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) 16 | {{/infoUrl}} 17 | 18 | ## Requirements. 19 | 20 | Python 2.7 and 3.4+ 21 | 22 | ## Installation & Usage 23 | 24 | This python library package is generated without supporting files like setup.py or requirements files 25 | 26 | To be able to use it, you will need these dependencies in your own package that uses this library: 27 | 28 | * urllib3 >= 1.26.5 29 | * six >= 1.10 30 | * certifi 31 | * python-dateutil 32 | * tenacity >= 5.0.4 33 | {{#asyncio}} 34 | * aiohttp 35 | {{/asyncio}} 36 | {{#tornado}} 37 | * tornado>=4.2,<5 38 | {{/tornado}} 39 | 40 | ## Getting Started 41 | 42 | In your own code, to use this library to connect and interact with {{{projectName}}}, 43 | you can run the following: 44 | 45 | {{> common_README }} 46 | -------------------------------------------------------------------------------- /templates/__init__api.mustache: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | # flake8: noqa 4 | 5 | # import apis into api package 6 | {{#apiInfo}}{{#apis}}from {{apiPackage}}.{{classVarName}} import {{classname}} 7 | {{/apis}}{{/apiInfo}} -------------------------------------------------------------------------------- /templates/__init__model.mustache: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | # flake8: noqa 4 | {{>partial_header}} 5 | 6 | from __future__ import absolute_import 7 | 8 | # import models into model package 9 | {{#models}}{{#model}}from {{modelPackage}}.{{classFilename}} import {{classname}}{{/model}} 10 | {{/models}} 11 | -------------------------------------------------------------------------------- /templates/__init__package.mustache: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | # flake8: noqa 4 | 5 | {{>partial_header}} 6 | 7 | from __future__ import absolute_import 8 | 9 | __version__ = "{{packageVersion}}" 10 | 11 | # import apis into sdk package 12 | {{#apiInfo}}{{#apis}}from {{apiPackage}}.{{classVarName}} import {{classname}} 13 | {{/apis}}{{/apiInfo}} 14 | # import ApiClient 15 | from {{packageName}}.api_client import ApiClient 16 | from {{packageName}}.configuration import Configuration 17 | from {{packageName}}.exceptions import OpenApiException 18 | from {{packageName}}.exceptions import ApiTypeError 19 | from {{packageName}}.exceptions import ApiValueError 20 | from {{packageName}}.exceptions import ApiKeyError 21 | from {{packageName}}.exceptions import ApiException 22 | # import models into sdk package 23 | {{#models}}{{#model}}from {{modelPackage}}.{{classFilename}} import {{classname}} 24 | {{/model}}{{/models}} 25 | -------------------------------------------------------------------------------- /templates/__init__test.mustache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opsgenie/opsgenie-python-sdk/0d20d2314522fc0fd8ca5f0faa16f7c96387e123/templates/__init__test.mustache -------------------------------------------------------------------------------- /templates/api_doc.mustache: -------------------------------------------------------------------------------- 1 | # {{packageName}}.{{classname}}{{#description}} 2 | {{description}}{{/description}} 3 | 4 | All URIs are relative to *{{basePath}}* 5 | 6 | Method | HTTP request | Description 7 | ------------- | ------------- | ------------- 8 | {{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} 9 | {{/operation}}{{/operations}} 10 | 11 | {{#operations}} 12 | {{#operation}} 13 | # **{{{operationId}}}** 14 | > {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}({{#allParams}}{{#required}}{{{paramName}}}{{/required}}{{^required}}{{{paramName}}}={{{paramName}}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) 15 | 16 | {{{summary}}}{{#notes}} 17 | 18 | {{{notes}}}{{/notes}} 19 | 20 | ### Example 21 | 22 | {{#hasAuthMethods}} 23 | {{#authMethods}} 24 | {{#isBasic}} 25 | {{^isBasicBearer}} 26 | * Basic Authentication ({{name}}): 27 | {{/isBasicBearer}} 28 | {{#isBasicBearer}} 29 | * Bearer{{#bearerFormat}} ({{{.}}}){{/bearerFormat}} Authentication ({{name}}): 30 | {{/isBasicBearer}} 31 | {{/isBasic}} 32 | {{#isApiKey}} 33 | * Api Key Authentication ({{name}}): 34 | {{/isApiKey }} 35 | {{#isOAuth}} 36 | * OAuth Authentication ({{name}}): 37 | {{/isOAuth }} 38 | {{> api_doc_example }} 39 | {{/authMethods}} 40 | {{/hasAuthMethods}} 41 | {{^hasAuthMethods}} 42 | {{> api_doc_example }} 43 | {{/hasAuthMethods}} 44 | ### Parameters 45 | {{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} 46 | Name | Type | Description | Notes 47 | ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} 48 | {{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{baseType}}.md){{/isPrimitiveType}}{{/isFile}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} 49 | {{/allParams}} 50 | 51 | ### Return type 52 | 53 | {{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}} 54 | 55 | ### Authorization 56 | 57 | {{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{{name}}}](../README.md#{{{name}}}){{^-last}}, {{/-last}}{{/authMethods}} 58 | 59 | ### HTTP request headers 60 | 61 | - **Content-Type**: {{#consumes}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} 62 | - **Accept**: {{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}} 63 | 64 | [[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) 65 | 66 | {{/operation}} 67 | {{/operations}} 68 | -------------------------------------------------------------------------------- /templates/api_doc_example.mustache: -------------------------------------------------------------------------------- 1 | ```python 2 | from __future__ import print_function 3 | import time 4 | import {{{packageName}}} 5 | from {{{packageName}}}.rest import ApiException 6 | from pprint import pprint 7 | {{> python_doc_auth_partial}} 8 | {{#hasAuthMethods}} 9 | # create an instance of the API class 10 | api_instance = {{{packageName}}}.{{{classname}}}({{{packageName}}}.ApiClient(configuration)) 11 | {{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} 12 | {{/allParams}} 13 | {{/hasAuthMethods}} 14 | {{^hasAuthMethods}} 15 | # create an instance of the API class 16 | api_instance = {{{packageName}}}.{{{classname}}}() 17 | {{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} 18 | {{/allParams}} 19 | {{/hasAuthMethods}} 20 | 21 | try: 22 | {{#summary}} # {{{.}}} 23 | {{/summary}} {{#returnType}}api_response = {{/returnType}}api_instance.{{{operationId}}}({{#allParams}}{{#required}}{{paramName}}{{/required}}{{^required}}{{paramName}}={{paramName}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}){{#returnType}} 24 | pprint(api_response){{/returnType}} 25 | except ApiException as e: 26 | print("Exception when calling {{classname}}->{{operationId}}: %s\n" % e) 27 | ``` 28 | -------------------------------------------------------------------------------- /templates/api_test.mustache: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | {{>partial_header}} 4 | 5 | from __future__ import absolute_import 6 | 7 | import unittest 8 | 9 | import {{packageName}} 10 | from {{apiPackage}}.{{classVarName}} import {{classname}} # noqa: E501 11 | from {{packageName}}.rest import ApiException 12 | 13 | 14 | class {{#operations}}Test{{classname}}(unittest.TestCase): 15 | """{{classname}} unit test stubs""" 16 | 17 | def setUp(self): 18 | self.api = {{apiPackage}}.{{classVarName}}.{{classname}}() # noqa: E501 19 | 20 | def tearDown(self): 21 | pass 22 | 23 | {{#operation}} 24 | def test_{{operationId}}(self): 25 | """Test case for {{{operationId}}} 26 | 27 | {{#summary}} 28 | {{{summary}}} # noqa: E501 29 | {{/summary}} 30 | """ 31 | pass 32 | 33 | {{/operation}} 34 | {{/operations}} 35 | 36 | if __name__ == '__main__': 37 | unittest.main() 38 | -------------------------------------------------------------------------------- /templates/common_README.mustache: -------------------------------------------------------------------------------- 1 | ```python 2 | from __future__ import print_function 3 | import time 4 | import {{{packageName}}} 5 | from {{{packageName}}}.rest import ApiException 6 | from pprint import pprint 7 | {{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} 8 | {{> python_doc_auth_partial}} 9 | # create an instance of the API class 10 | api_instance = {{{packageName}}}.{{{classname}}}({{{packageName}}}.ApiClient(configuration)) 11 | {{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} 12 | {{/allParams}} 13 | 14 | try: 15 | {{#summary}} # {{{.}}} 16 | {{/summary}} {{#returnType}}api_response = {{/returnType}}api_instance.{{{operationId}}}({{#allParams}}{{#required}}{{paramName}}{{/required}}{{^required}}{{paramName}}={{paramName}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}){{#returnType}} 17 | pprint(api_response){{/returnType}} 18 | except ApiException as e: 19 | print("Exception when calling {{classname}}->{{operationId}}: %s\n" % e) 20 | {{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} 21 | ``` 22 | Note: if you have an european account please set attribute 'host' 23 | 24 | ``` 25 | configuration.host = 'https://api.eu.opsgenie.com' 26 | ``` 27 | 28 | ## Documentation for API Endpoints 29 | 30 | All URIs are relative to *{{basePath}}* 31 | 32 | Class | Method | HTTP request | Description 33 | ------------ | ------------- | ------------- | ------------- 34 | {{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} 35 | {{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} 36 | 37 | ## Documentation For Models 38 | 39 | {{#models}}{{#model}} - [{{{classname}}}]({{modelDocPath}}{{{classname}}}.md) 40 | {{/model}}{{/models}} 41 | 42 | ## Documentation For Authorization 43 | 44 | {{^authMethods}} 45 | All endpoints do not require authorization. 46 | {{/authMethods}} 47 | {{#authMethods}} 48 | {{#last}} Authentication schemes defined for the API:{{/last}} 49 | ## {{{name}}} 50 | 51 | {{#isApiKey}} 52 | - **Type**: API key 53 | - **API key parameter name**: {{{keyParamName}}} 54 | - **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} 55 | {{/isApiKey}} 56 | {{#isBasic}} 57 | {{^isBasicBearer}} 58 | - **Type**: HTTP basic authentication 59 | {{/isBasicBearer}} 60 | {{#isBasicBearer}} 61 | - **Type**: Bearer authentication{{#bearerFormat}} ({{{.}}}){{/bearerFormat}} 62 | {{/isBasicBearer}} 63 | {{/isBasic}} 64 | {{#isOAuth}} 65 | - **Type**: OAuth 66 | - **Flow**: {{{flow}}} 67 | - **Authorization URL**: {{{authorizationUrl}}} 68 | - **Scopes**: {{^scopes}}N/A{{/scopes}} 69 | {{#scopes}} - **{{{scope}}}**: {{{description}}} 70 | {{/scopes}} 71 | {{/isOAuth}} 72 | 73 | {{/authMethods}} 74 | 75 | ## Author 76 | 77 | {{#apiInfo}}{{#apis}}{{^hasMore}}{{infoEmail}} 78 | {{/hasMore}}{{/apis}}{{/apiInfo}} 79 | -------------------------------------------------------------------------------- /templates/errors.mustache: -------------------------------------------------------------------------------- 1 | import json 2 | 3 | 4 | class OpsGenieError(Exception): 5 | def __init__(self, message): 6 | super(Exception, self).__init__(message) 7 | 8 | 9 | class InvalidRequestError(OpsGenieError): 10 | pass 11 | 12 | 13 | class ApiKeyMissingError(OpsGenieError): 14 | def __init__(self): 15 | super(ApiKeyMissingError, self).__init__('Api Key is not configured!') 16 | 17 | 18 | class EndpointMissingError(OpsGenieError): 19 | def __init__(self): 20 | super(EndpointMissingError, self).__init__('OpsGenie end-point is not configured!') 21 | 22 | 23 | class InvalidConfigurationError(OpsGenieError): 24 | def __init__(self, message): 25 | super(InvalidConfigurationError, self).__init__(message) 26 | 27 | 28 | class ServerError(OpsGenieError): 29 | def __init__(self, json_str): 30 | try: 31 | self.json_obj = json.loads(json_str) 32 | self.message = self.json_obj.get('error', None) 33 | self.code = self.json_obj.get('code', None) 34 | except ValueError: 35 | self.message = json_str 36 | super(ServerError, self).__init__(self.message) 37 | self.code = -1 38 | 39 | 40 | class HTTPException(Exception): 41 | 42 | def __init__(self, status=None, reason=None, http_resp=None): 43 | if http_resp: 44 | self.status = http_resp.status 45 | self.reason = http_resp.reason 46 | self.body = http_resp.data 47 | self.headers = http_resp.getheaders() 48 | else: 49 | self.status = status 50 | self.reason = reason 51 | self.body = None 52 | self.headers = None 53 | 54 | def __str__(self): 55 | """Custom error messages for exception""" 56 | error_message = "({0})\n" \ 57 | "Reason: {1}\n".format(self.status, self.reason) 58 | if self.headers: 59 | error_message += "HTTP response headers: {0}\n".format( 60 | self.headers) 61 | 62 | if self.body: 63 | error_message += "HTTP response body: {0}\n".format(self.body) 64 | 65 | return error_message 66 | -------------------------------------------------------------------------------- /templates/metrics/__init__.mustache: -------------------------------------------------------------------------------- 1 | from .api_metric import ApiMetric 2 | from .http_metric import HttpMetric 3 | from .publisher import Publisher 4 | from .sdk_metric import SdkMetric 5 | -------------------------------------------------------------------------------- /templates/metrics/api_metric.mustache: -------------------------------------------------------------------------------- 1 | import logging 2 | from collections import namedtuple 3 | 4 | from .publisher import Publisher 5 | 6 | 7 | class ApiMetric(Publisher): 8 | def __init__(self, name): 9 | Publisher.__init__(self) 10 | self.name = name 11 | self.logger = logging.getLogger('{{{packageName}}}') 12 | self._data = None 13 | self._metric = namedtuple('ApiMetric', ['transactionId', 'duration', 'resourcePath', 'resultMetadata', 14 | 'httpResponse']) 15 | 16 | self._result_metadata = namedtuple('ResultMetadata', 17 | ['RequestId', 'ResponseTime', 'RateLimitState', 'RateLimitReason', 18 | 'RateLimitPeriod', 'RetryStatistics']) 19 | 20 | def __str__(self): 21 | return "{}: '{}' has data = {}".format(type(self).__name__, self.name, 22 | self._data) 23 | 24 | @property 25 | def data(self): 26 | return self._data 27 | 28 | def build_metric(self, transaction_id, duration, resource_path, response_data, http_response, retry_statistics): 29 | try: 30 | self._data = self._metric(transaction_id, duration, resource_path, 31 | self._get_result_metadata(response_data, retry_statistics), 32 | http_response) 33 | except ValueError as e: 34 | print('Error: {}'.format(e)) 35 | else: 36 | self.notify() 37 | self.logger.debug('API Metrics Published') 38 | 39 | def _get_result_metadata(self, response_data, retry_statistics): 40 | request_id = response_data.getheader(name='X-Request-ID') 41 | response_time = response_data.getheader(name='X-Response-Time') 42 | rate_limit_state = response_data.getheader(name='X-RateLimit-State') 43 | rate_limit_reason = response_data.getheader(name='X-RateLimit-Reason') 44 | rate_limit_period = response_data.getheader(name='X-RateLimit-Period-In-Sec') 45 | 46 | return self._result_metadata(RequestId=request_id, 47 | ResponseTime=response_time, 48 | RateLimitState=rate_limit_state, 49 | RateLimitReason=rate_limit_reason, 50 | RateLimitPeriod=rate_limit_period, 51 | RetryStatistics=retry_statistics) 52 | -------------------------------------------------------------------------------- /templates/metrics/http_metric.mustache: -------------------------------------------------------------------------------- 1 | import logging 2 | from collections import namedtuple 3 | 4 | from .publisher import Publisher 5 | 6 | 7 | class HttpMetric(Publisher): 8 | def __init__(self, name): 9 | Publisher.__init__(self) 10 | self.name = name 11 | self.logger = logging.getLogger('{{{packageName}}}') 12 | self._data = None 13 | self.metric = namedtuple('HttpMetric', ['transactionId', 'duration', 'resourcePath', 'retryStatistics', 'error', 14 | 'status', 'statusCode', 'request']) 15 | 16 | def __str__(self): 17 | return "{}: '{}' has data = {}".format(type(self).__name__, self.name, 18 | self._data) 19 | 20 | @property 21 | def data(self): 22 | return self._data 23 | 24 | def build_metric(self, transaction_id, duration, resource_path, retry_statistics, error, status, 25 | status_code, request): 26 | try: 27 | self._data = self.metric(transaction_id, duration, resource_path, retry_statistics, error, status, status_code, 28 | request) 29 | except ValueError as e: 30 | print('Error: {}'.format(e)) 31 | else: 32 | self.notify() 33 | self.logger.debug('HTTP Metrics Published') 34 | -------------------------------------------------------------------------------- /templates/metrics/observer.mustache: -------------------------------------------------------------------------------- 1 | import abc 2 | 3 | 4 | class Observer(abc.ABC): 5 | """ 6 | An updating interface for objects, to whom metrics should be published. 7 | The published metrics can be accessed in a named tuple at publisher.data in the notify function. 8 | """ 9 | 10 | @abc.abstractmethod 11 | def notify(self, publisher): 12 | pass 13 | -------------------------------------------------------------------------------- /templates/metrics/publisher.mustache: -------------------------------------------------------------------------------- 1 | import logging 2 | 3 | 4 | class Publisher: 5 | """ 6 | A base Publisher class to contain the common functionality 7 | of adding, removing, and notifying observers 8 | """ 9 | 10 | def __init__(self): 11 | self.observers = [] 12 | self.logger = logging.getLogger('{{{packageName}}}') 13 | 14 | def subscribe(self, observer): 15 | if observer not in self.observers: 16 | self.observers.append(observer) 17 | self.logger.debug('Observer subscribed') 18 | else: 19 | print('Failed to subscribe: {}'.format(observer)) 20 | 21 | def unsubscribe(self, observer): 22 | try: 23 | self.observers.remove(observer) 24 | self.logger.debug('Observer unsubscribed') 25 | except ValueError: 26 | print('Failed to unsubscribe: {}'.format(observer)) 27 | 28 | def notify(self): 29 | [o.notify(self) for o in self.observers] 30 | -------------------------------------------------------------------------------- /templates/metrics/sdk_metric.mustache: -------------------------------------------------------------------------------- 1 | import logging 2 | from collections import namedtuple 3 | 4 | from .publisher import Publisher 5 | 6 | 7 | class SdkMetric(Publisher): 8 | def __init__(self, name): 9 | Publisher.__init__(self) 10 | self.name = name 11 | self.logger = logging.getLogger('{{{packageName}}}') 12 | self._data = None 13 | self._metric = namedtuple('SdkMetric', 14 | ['transactionId', 'duration', 'resourcePath', 'errorType', 'errorMessage', 15 | 'sdkRequestDetails', 'sdkResultDetails']) 16 | 17 | def __str__(self): 18 | return "{}: '{}' has data = {}".format(type(self).__name__, self.name, 19 | self._data) 20 | 21 | @property 22 | def data(self): 23 | return self._data 24 | 25 | def build_metric(self, transaction_id, duration, resource_path, error_type, error_message, sdk_request_details, 26 | sdk_result_details): 27 | try: 28 | self._data = self._metric(transaction_id, duration, resource_path, error_type, error_message, 29 | sdk_request_details, 30 | sdk_result_details) 31 | except ValueError as e: 32 | print('Error: {}'.format(e)) 33 | else: 34 | self.notify() 35 | self.logger.debug('SDK Metrics Published') 36 | -------------------------------------------------------------------------------- /templates/model_doc.mustache: -------------------------------------------------------------------------------- 1 | {{#models}}{{#model}}# {{classname}} 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | {{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} 7 | {{/vars}} 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | {{/model}}{{/models}} 12 | -------------------------------------------------------------------------------- /templates/model_test.mustache: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | {{>partial_header}} 4 | 5 | from __future__ import absolute_import 6 | 7 | import unittest 8 | 9 | {{#models}} 10 | {{#model}} 11 | import {{packageName}} 12 | from {{modelPackage}}.{{classFilename}} import {{classname}} # noqa: E501 13 | from {{packageName}}.rest import ApiException 14 | 15 | 16 | class Test{{classname}}(unittest.TestCase): 17 | """{{classname}} unit test stubs""" 18 | 19 | def setUp(self): 20 | pass 21 | 22 | def tearDown(self): 23 | pass 24 | 25 | def test{{classname}}(self): 26 | """Test {{classname}}""" 27 | # FIXME: construct object with mandatory attributes with example values 28 | # model = {{packageName}}.models.{{classFilename}}.{{classname}}() # noqa: E501 29 | pass 30 | 31 | {{/model}} 32 | {{/models}} 33 | 34 | if __name__ == '__main__': 35 | unittest.main() 36 | -------------------------------------------------------------------------------- /templates/opsgenieCodegenModels.mustache: -------------------------------------------------------------------------------- 1 | classname,classFilename,opsgenieDomain 2 | {{#opsgenieCodegenModels}}{{{codegenModel.classname}}},{{{codegenModel.classFilename}}},{{{opsgenieDomain}}} 3 | {{/opsgenieCodegenModels}} 4 | -------------------------------------------------------------------------------- /templates/partial_header.mustache: -------------------------------------------------------------------------------- 1 | """ 2 | {{#appName}} 3 | {{{appName}}} 4 | {{/appName}} 5 | 6 | {{#appDescription}} 7 | {{{appDescription}}} # noqa: E501 8 | {{/appDescription}} 9 | 10 | {{#version}} 11 | The version of the OpenAPI document: {{{version}}} 12 | {{/version}} 13 | {{#infoEmail}} 14 | Contact: {{{infoEmail}}} 15 | {{/infoEmail}} 16 | Generated by: https://openapi-generator.tech 17 | """ 18 | -------------------------------------------------------------------------------- /templates/proxy_configuration.mustache: -------------------------------------------------------------------------------- 1 | from {{{packageName}}}.errors import InvalidConfigurationError 2 | 3 | 4 | class ProxyConfiguration: 5 | def __init__(self, host=None, port=None, username=None, password=None, protocol=None): 6 | """ 7 | Proxy configuration to use with {{{packageName}}} 8 | ---------- 9 | Example Usage: 10 | conf = {{{packageName}}}.configuration.Configuration() 11 | proxy_url = {{{packageName}}}.proxy_configuration.ProxyConfiguration().get_proxy_url() 12 | conf.proxy = proxy_url 13 | ---------- 14 | Parameters: 15 | host : str 16 | IP or the domain name of the proxy server ("10.10.0.1") 17 | port : int 18 | Port number of the proxy server ( 5432 ) 19 | username : str, optional 20 | password : str, optional 21 | protocol : {'http', 'https'} 22 | """ 23 | self.host = host 24 | self.port = port 25 | self.username = username 26 | self.password = password 27 | self.protocol = protocol.lower() if protocol is not None else None 28 | 29 | def validate(self): 30 | if not self.host or not self.port: 31 | raise InvalidConfigurationError("Host and Port Should be given") 32 | if self.protocol is None or not (self.protocol == "http" or self.protocol == "https"): 33 | raise InvalidConfigurationError( 34 | "Proxy Protocol must be one of ['http', 'https']. Current: {}".format(self.protocol)) 35 | 36 | def get_proxy_url(self): 37 | self.validate() 38 | 39 | if self.username: 40 | return self.protocol + '://' + self.username + ':' + self.password + '@' + self.host + ':' + self.port 41 | else: 42 | return self.protocol + '://' + self.host + ':' + self.port 43 | -------------------------------------------------------------------------------- /templates/python_doc_auth_partial.mustache: -------------------------------------------------------------------------------- 1 | {{#hasAuthMethods}} 2 | {{#authMethods}} 3 | configuration = {{{packageName}}}.Configuration() 4 | {{#isBasic}} 5 | {{^isBasicBearer}} 6 | # Configure HTTP basic authorization: {{{name}}} 7 | configuration.username = 'YOUR_USERNAME' 8 | configuration.password = 'YOUR_PASSWORD' 9 | {{/isBasicBearer}} 10 | {{#isBasicBearer}} 11 | # Configure Bearer authorization{{#bearerFormat}} ({{{.}}}){{/bearerFormat}}: {{{name}}} 12 | configuration.access_token = 'YOUR_BEARER_TOKEN' 13 | {{/isBasicBearer}} 14 | {{/isBasic}} 15 | {{#isApiKey}} 16 | # Configure API key authorization: {{{name}}} 17 | configuration.api_key['{{{keyParamName}}}'] = 'YOUR_API_KEY' 18 | {{/isApiKey}} 19 | {{#isOAuth}} 20 | # Configure OAuth2 access token for authorization: {{{name}}} 21 | configuration.access_token = 'YOUR_ACCESS_TOKEN' 22 | {{/isOAuth}} 23 | {{/authMethods}} 24 | {{/hasAuthMethods}} 25 | -------------------------------------------------------------------------------- /templates/requirements.mustache: -------------------------------------------------------------------------------- 1 | certifi >= 14.05.14 2 | six >= 1.10 3 | python_dateutil >= 2.5.3 4 | setuptools >= 21.0.0 5 | urllib3 >= 1.26.5 6 | tenacity >= 5.0.4 7 | -------------------------------------------------------------------------------- /templates/setup.mustache: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | {{>partial_header}} 4 | 5 | import os 6 | 7 | from setuptools import setup, find_packages # noqa: H301 8 | 9 | NAME = "{{{projectName}}}" 10 | VERSION = "{{packageVersion}}" 11 | {{#apiInfo}} 12 | {{#apis}} 13 | {{^hasMore}} 14 | # To install the library, run the following 15 | # 16 | # python setup.py install 17 | # 18 | # prerequisite: setuptools 19 | # http://pypi.python.org/pypi/setuptools 20 | 21 | REQUIRES = ["urllib3 >= 1.26.5", "six >= 1.10", "certifi", "python-dateutil", "setuptools >= 21.0.0", "tenacity >= 5.0.4"] 22 | {{#asyncio}} 23 | REQUIRES.append("aiohttp >= 3.0.0") 24 | {{/asyncio}} 25 | {{#tornado}} 26 | REQUIRES.append("tornado>=4.2,<5") 27 | {{/tornado}} 28 | 29 | with open("README.md", "r") as fh: 30 | long_description = fh.read() 31 | 32 | setup( 33 | name=NAME, 34 | version=VERSION, 35 | author="OpsGenie", 36 | author_email="{{infoEmail}}", 37 | description="{{appName}}", 38 | long_description=long_description, 39 | long_description_content_type="text/markdown", 40 | url="{{packageUrl}}", 41 | packages=find_packages(exclude=['samples']), 42 | keywords=["OpenAPI", "OpenAPI-Generator", "{{{appName}}}", "OpsGenie", "Opsgenie"], 43 | install_requires=REQUIRES, 44 | include_package_data=True, 45 | project_urls={ 46 | 'Documentation': 'https://docs.opsgenie.com/docs/opsgenie-python-api', 47 | 'Source': '{{packageUrl}}', 48 | 'Tracker': '{{packageUrl}}/issues', 49 | }, 50 | classifiers=[ 51 | 'Development Status :: 5 - Production/Stable', 52 | 'License :: OSI Approved :: Apache Software License', 53 | "Operating System :: OS Independent", 54 | ] 55 | ) 56 | {{/hasMore}} 57 | {{/apis}} 58 | {{/apiInfo}} 59 | -------------------------------------------------------------------------------- /templates/test-requirements.mustache: -------------------------------------------------------------------------------- 1 | {{^asyncio}} 2 | coverage>=4.0.3 3 | nose>=1.3.7 4 | {{/asyncio}} 5 | {{#asyncio}} 6 | pytest>=3.6.0 7 | pytest-cov>=2.6.1 8 | {{/asyncio}} 9 | pluggy>=0.3.1 10 | py>=1.4.31 11 | randomize>=0.13 12 | -------------------------------------------------------------------------------- /templates/tox.mustache: -------------------------------------------------------------------------------- 1 | [tox] 2 | {{^asyncio}} 3 | envlist = py27, py3 4 | {{/asyncio}} 5 | {{#asyncio}} 6 | envlist = py3 7 | {{/asyncio}} 8 | 9 | [testenv] 10 | deps=-r{toxinidir}/requirements.txt 11 | -r{toxinidir}/test-requirements.txt 12 | 13 | commands= 14 | {{^asyncio}} 15 | nosetests \ 16 | [] 17 | {{/asyncio}} 18 | {{#asyncio}} 19 | pytest -v --cov petstore_api 20 | {{/asyncio}} 21 | -------------------------------------------------------------------------------- /templates/travis.mustache: -------------------------------------------------------------------------------- 1 | # ref: https://docs.travis-ci.com/user/languages/python 2 | language: python 3 | python: 4 | - "2.7" 5 | - "3.2" 6 | - "3.3" 7 | - "3.4" 8 | - "3.5" 9 | #- "3.5-dev" # 3.5 development branch 10 | #- "nightly" # points to the latest development branch e.g. 3.6-dev 11 | # command to install dependencies 12 | install: "pip install -r requirements.txt" 13 | # command to run tests 14 | script: nosetests 15 | -------------------------------------------------------------------------------- /test-requirements.txt: -------------------------------------------------------------------------------- 1 | coverage>=4.0.3 2 | nose>=1.3.7 3 | pluggy>=0.3.1 4 | py>=1.4.31 5 | randomize>=0.13 6 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | envlist = py27, py3 3 | 4 | [testenv] 5 | deps=-r{toxinidir}/requirements.txt 6 | -r{toxinidir}/test-requirements.txt 7 | 8 | commands= 9 | nosetests \ 10 | [] 11 | --------------------------------------------------------------------------------