@@ -324,6 +324,29 @@ impl ListIncidentNotificationTemplatesOptionalParams {
324324 }
325325}
326326
327+ /// ListIncidentPostmortemTemplatesOptionalParams is a struct for passing parameters to the method [`IncidentsAPI::list_incident_postmortem_templates`]
328+ #[ non_exhaustive]
329+ #[ derive( Clone , Default , Debug ) ]
330+ pub struct ListIncidentPostmortemTemplatesOptionalParams {
331+ /// Filter postmortem templates by the associated incident type ID.
332+ pub filter_incident_type : Option < uuid:: Uuid > ,
333+ /// The attribute to sort results by. Prefix with `-` for descending order.
334+ pub sort : Option < String > ,
335+ }
336+
337+ impl ListIncidentPostmortemTemplatesOptionalParams {
338+ /// Filter postmortem templates by the associated incident type ID.
339+ pub fn filter_incident_type ( mut self , value : uuid:: Uuid ) -> Self {
340+ self . filter_incident_type = Some ( value) ;
341+ self
342+ }
343+ /// The attribute to sort results by. Prefix with `-` for descending order.
344+ pub fn sort ( mut self , value : String ) -> Self {
345+ self . sort = Some ( value) ;
346+ self
347+ }
348+ }
349+
327350/// ListIncidentTypesOptionalParams is a struct for passing parameters to the method [`IncidentsAPI::list_incident_types`]
328351#[ non_exhaustive]
329352#[ derive( Clone , Default , Debug ) ]
@@ -6798,12 +6821,13 @@ impl IncidentsAPI {
67986821 /// Retrieve a list of all postmortem templates for incidents.
67996822 pub async fn list_incident_postmortem_templates (
68006823 & self ,
6824+ params : ListIncidentPostmortemTemplatesOptionalParams ,
68016825 ) -> Result <
68026826 crate :: datadogV2:: model:: PostmortemTemplatesResponse ,
68036827 datadog:: Error < ListIncidentPostmortemTemplatesError > ,
68046828 > {
68056829 match self
6806- . list_incident_postmortem_templates_with_http_info ( )
6830+ . list_incident_postmortem_templates_with_http_info ( params )
68076831 . await
68086832 {
68096833 Ok ( response_content) => {
@@ -6822,6 +6846,7 @@ impl IncidentsAPI {
68226846 /// Retrieve a list of all postmortem templates for incidents.
68236847 pub async fn list_incident_postmortem_templates_with_http_info (
68246848 & self ,
6849+ params : ListIncidentPostmortemTemplatesOptionalParams ,
68256850 ) -> Result <
68266851 datadog:: ResponseContent < crate :: datadogV2:: model:: PostmortemTemplatesResponse > ,
68276852 datadog:: Error < ListIncidentPostmortemTemplatesError > ,
@@ -6837,6 +6862,10 @@ impl IncidentsAPI {
68376862 return Err ( datadog:: Error :: UnstableOperationDisabledError ( local_error) ) ;
68386863 }
68396864
6865+ // unbox and build optional parameters
6866+ let filter_incident_type = params. filter_incident_type ;
6867+ let sort = params. sort ;
6868+
68406869 let local_client = & self . client ;
68416870
68426871 let local_uri_str = format ! (
@@ -6846,6 +6875,15 @@ impl IncidentsAPI {
68466875 let mut local_req_builder =
68476876 local_client. request ( reqwest:: Method :: GET , local_uri_str. as_str ( ) ) ;
68486877
6878+ if let Some ( ref local_query_param) = filter_incident_type {
6879+ local_req_builder = local_req_builder
6880+ . query ( & [ ( "filter[incident-type]" , & local_query_param. to_string ( ) ) ] ) ;
6881+ } ;
6882+ if let Some ( ref local_query_param) = sort {
6883+ local_req_builder =
6884+ local_req_builder. query ( & [ ( "sort" , & local_query_param. to_string ( ) ) ] ) ;
6885+ } ;
6886+
68496887 // build headers
68506888 let mut headers = HeaderMap :: new ( ) ;
68516889 headers. insert ( "Accept" , HeaderValue :: from_static ( "application/json" ) ) ;
0 commit comments