44from __future__ import annotations
55
66from typing import Any , Dict , Union
7+ import warnings
78
89from datadog_api_client .api_client import ApiClient , Endpoint as _Endpoint
910from datadog_api_client .configuration import Configuration
@@ -166,7 +167,7 @@ def create_incident_service(
166167 self ,
167168 body : IncidentServiceCreateRequest ,
168169 ) -> IncidentServiceResponse :
169- """Create a new incident service.
170+ """Create a new incident service. **Deprecated**.
170171
171172 Creates a new incident service.
172173
@@ -177,13 +178,14 @@ def create_incident_service(
177178 kwargs : Dict [str , Any ] = {}
178179 kwargs ["body" ] = body
179180
181+ warnings .warn ("create_incident_service is deprecated" , DeprecationWarning , stacklevel = 2 )
180182 return self ._create_incident_service_endpoint .call_with_http_info (** kwargs )
181183
182184 def delete_incident_service (
183185 self ,
184186 service_id : str ,
185187 ) -> None :
186- """Delete an existing incident service.
188+ """Delete an existing incident service. **Deprecated**.
187189
188190 Deletes an existing incident service.
189191
@@ -194,6 +196,7 @@ def delete_incident_service(
194196 kwargs : Dict [str , Any ] = {}
195197 kwargs ["service_id" ] = service_id
196198
199+ warnings .warn ("delete_incident_service is deprecated" , DeprecationWarning , stacklevel = 2 )
197200 return self ._delete_incident_service_endpoint .call_with_http_info (** kwargs )
198201
199202 def get_incident_service (
@@ -202,7 +205,7 @@ def get_incident_service(
202205 * ,
203206 include : Union [IncidentRelatedObject , UnsetType ] = unset ,
204207 ) -> IncidentServiceResponse :
205- """Get details of an incident service.
208+ """Get details of an incident service. **Deprecated**.
206209
207210 Get details of an incident service. If the ``include[users]`` query parameter is provided,
208211 the included attribute will contain the users related to these incident services.
@@ -219,6 +222,7 @@ def get_incident_service(
219222 if include is not unset :
220223 kwargs ["include" ] = include
221224
225+ warnings .warn ("get_incident_service is deprecated" , DeprecationWarning , stacklevel = 2 )
222226 return self ._get_incident_service_endpoint .call_with_http_info (** kwargs )
223227
224228 def list_incident_services (
@@ -229,7 +233,7 @@ def list_incident_services(
229233 page_offset : Union [int , UnsetType ] = unset ,
230234 filter : Union [str , UnsetType ] = unset ,
231235 ) -> IncidentServicesResponse :
232- """Get a list of all incident services.
236+ """Get a list of all incident services. **Deprecated**.
233237
234238 Get all incident services uploaded for the requesting user's organization. If the ``include[users]`` query parameter is provided, the included attribute will contain the users related to these incident services.
235239
@@ -256,14 +260,15 @@ def list_incident_services(
256260 if filter is not unset :
257261 kwargs ["filter" ] = filter
258262
263+ warnings .warn ("list_incident_services is deprecated" , DeprecationWarning , stacklevel = 2 )
259264 return self ._list_incident_services_endpoint .call_with_http_info (** kwargs )
260265
261266 def update_incident_service (
262267 self ,
263268 service_id : str ,
264269 body : IncidentServiceUpdateRequest ,
265270 ) -> IncidentServiceResponse :
266- """Update an existing incident service.
271+ """Update an existing incident service. **Deprecated**.
267272
268273 Updates an existing incident service. Only provide the attributes which should be updated as this request is a partial update.
269274
@@ -278,4 +283,5 @@ def update_incident_service(
278283
279284 kwargs ["body" ] = body
280285
286+ warnings .warn ("update_incident_service is deprecated" , DeprecationWarning , stacklevel = 2 )
281287 return self ._update_incident_service_endpoint .call_with_http_info (** kwargs )
0 commit comments