@@ -671,6 +671,90 @@ def delete_status_page_with_http_info(page_id, opts = {})
671671 return data , status_code , headers
672672 end
673673
674+ # Edit degradation update.
675+ #
676+ # @see #edit_degradation_update_with_http_info
677+ def edit_degradation_update ( degradation_id , page_id , update_id , body , opts = { } )
678+ data , _status_code , _headers = edit_degradation_update_with_http_info ( degradation_id , page_id , update_id , body , opts )
679+ data
680+ end
681+
682+ # Edit degradation update.
683+ #
684+ # Edits a specific degradation update.
685+ #
686+ # @param degradation_id [UUID] The ID of the degradation.
687+ # @param page_id [UUID] The ID of the status page.
688+ # @param update_id [UUID] The ID of the degradation update.
689+ # @param body [PatchDegradationUpdateRequest]
690+ # @param opts [Hash] the optional parameters
691+ # @option opts [String] :include Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, degradation, status_page.
692+ # @return [Array<(DegradationUpdate, Integer, Hash)>] DegradationUpdate data, response status code and response headers
693+ def edit_degradation_update_with_http_info ( degradation_id , page_id , update_id , body , opts = { } )
694+
695+ if @api_client . config . debugging
696+ @api_client . config . logger . debug 'Calling API: StatusPagesAPI.edit_degradation_update ...'
697+ end
698+ # verify the required parameter 'degradation_id' is set
699+ if @api_client . config . client_side_validation && degradation_id . nil?
700+ fail ArgumentError , "Missing the required parameter 'degradation_id' when calling StatusPagesAPI.edit_degradation_update"
701+ end
702+ # verify the required parameter 'page_id' is set
703+ if @api_client . config . client_side_validation && page_id . nil?
704+ fail ArgumentError , "Missing the required parameter 'page_id' when calling StatusPagesAPI.edit_degradation_update"
705+ end
706+ # verify the required parameter 'update_id' is set
707+ if @api_client . config . client_side_validation && update_id . nil?
708+ fail ArgumentError , "Missing the required parameter 'update_id' when calling StatusPagesAPI.edit_degradation_update"
709+ end
710+ # verify the required parameter 'body' is set
711+ if @api_client . config . client_side_validation && body . nil?
712+ fail ArgumentError , "Missing the required parameter 'body' when calling StatusPagesAPI.edit_degradation_update"
713+ end
714+ # resource path
715+ local_var_path = '/api/v2/statuspages/{page_id}/degradations/{degradation_id}/updates/{update_id}' . sub ( '{degradation_id}' , CGI . escape ( degradation_id . to_s ) . gsub ( '%2F' , '/' ) ) . sub ( '{page_id}' , CGI . escape ( page_id . to_s ) . gsub ( '%2F' , '/' ) ) . sub ( '{update_id}' , CGI . escape ( update_id . to_s ) . gsub ( '%2F' , '/' ) )
716+
717+ # query parameters
718+ query_params = opts [ :query_params ] || { }
719+ query_params [ :'include' ] = opts [ :'include' ] if !opts [ :'include' ] . nil?
720+
721+ # header parameters
722+ header_params = opts [ :header_params ] || { }
723+ # HTTP header 'Accept' (if needed)
724+ header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] )
725+ # HTTP header 'Content-Type'
726+ header_params [ 'Content-Type' ] = @api_client . select_header_content_type ( [ 'application/json' ] )
727+
728+ # form parameters
729+ form_params = opts [ :form_params ] || { }
730+
731+ # http body (model)
732+ post_body = opts [ :debug_body ] || @api_client . object_to_http_body ( body )
733+
734+ # return_type
735+ return_type = opts [ :debug_return_type ] || 'DegradationUpdate'
736+
737+ # auth_names
738+ auth_names = opts [ :debug_auth_names ] || [ :apiKeyAuth , :appKeyAuth , :AuthZ ]
739+
740+ new_options = opts . merge (
741+ :operation => :edit_degradation_update ,
742+ :header_params => header_params ,
743+ :query_params => query_params ,
744+ :form_params => form_params ,
745+ :body => post_body ,
746+ :auth_names => auth_names ,
747+ :return_type => return_type ,
748+ :api_version => "V2"
749+ )
750+
751+ data , status_code , headers = @api_client . call_api ( Net ::HTTP ::Patch , local_var_path , new_options )
752+ if @api_client . config . debugging
753+ @api_client . config . logger . debug "API called: StatusPagesAPI#edit_degradation_update\n Data: #{ data . inspect } \n Status code: #{ status_code } \n Headers: #{ headers } "
754+ end
755+ return data , status_code , headers
756+ end
757+
674758 # Get component.
675759 #
676760 # @see #get_component_with_http_info
@@ -1298,6 +1382,81 @@ def publish_status_page_with_http_info(page_id, opts = {})
12981382 return data , status_code , headers
12991383 end
13001384
1385+ # Soft delete degradation update.
1386+ #
1387+ # @see #soft_delete_degradation_update_with_http_info
1388+ def soft_delete_degradation_update ( degradation_id , page_id , update_id , opts = { } )
1389+ soft_delete_degradation_update_with_http_info ( degradation_id , page_id , update_id , opts )
1390+ nil
1391+ end
1392+
1393+ # Soft delete degradation update.
1394+ #
1395+ # Soft-deletes a degradation update.
1396+ #
1397+ # @param degradation_id [UUID] The ID of the degradation.
1398+ # @param page_id [UUID] The ID of the status page.
1399+ # @param update_id [UUID] The ID of the degradation update.
1400+ # @param opts [Hash] the optional parameters
1401+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1402+ def soft_delete_degradation_update_with_http_info ( degradation_id , page_id , update_id , opts = { } )
1403+
1404+ if @api_client . config . debugging
1405+ @api_client . config . logger . debug 'Calling API: StatusPagesAPI.soft_delete_degradation_update ...'
1406+ end
1407+ # verify the required parameter 'degradation_id' is set
1408+ if @api_client . config . client_side_validation && degradation_id . nil?
1409+ fail ArgumentError , "Missing the required parameter 'degradation_id' when calling StatusPagesAPI.soft_delete_degradation_update"
1410+ end
1411+ # verify the required parameter 'page_id' is set
1412+ if @api_client . config . client_side_validation && page_id . nil?
1413+ fail ArgumentError , "Missing the required parameter 'page_id' when calling StatusPagesAPI.soft_delete_degradation_update"
1414+ end
1415+ # verify the required parameter 'update_id' is set
1416+ if @api_client . config . client_side_validation && update_id . nil?
1417+ fail ArgumentError , "Missing the required parameter 'update_id' when calling StatusPagesAPI.soft_delete_degradation_update"
1418+ end
1419+ # resource path
1420+ local_var_path = '/api/v2/statuspages/{page_id}/degradations/{degradation_id}/updates/{update_id}' . sub ( '{degradation_id}' , CGI . escape ( degradation_id . to_s ) . gsub ( '%2F' , '/' ) ) . sub ( '{page_id}' , CGI . escape ( page_id . to_s ) . gsub ( '%2F' , '/' ) ) . sub ( '{update_id}' , CGI . escape ( update_id . to_s ) . gsub ( '%2F' , '/' ) )
1421+
1422+ # query parameters
1423+ query_params = opts [ :query_params ] || { }
1424+
1425+ # header parameters
1426+ header_params = opts [ :header_params ] || { }
1427+ # HTTP header 'Accept' (if needed)
1428+ header_params [ 'Accept' ] = @api_client . select_header_accept ( [ '*/*' ] )
1429+
1430+ # form parameters
1431+ form_params = opts [ :form_params ] || { }
1432+
1433+ # http body (model)
1434+ post_body = opts [ :debug_body ]
1435+
1436+ # return_type
1437+ return_type = opts [ :debug_return_type ]
1438+
1439+ # auth_names
1440+ auth_names = opts [ :debug_auth_names ] || [ :apiKeyAuth , :appKeyAuth , :AuthZ ]
1441+
1442+ new_options = opts . merge (
1443+ :operation => :soft_delete_degradation_update ,
1444+ :header_params => header_params ,
1445+ :query_params => query_params ,
1446+ :form_params => form_params ,
1447+ :body => post_body ,
1448+ :auth_names => auth_names ,
1449+ :return_type => return_type ,
1450+ :api_version => "V2"
1451+ )
1452+
1453+ data , status_code , headers = @api_client . call_api ( Net ::HTTP ::Delete , local_var_path , new_options )
1454+ if @api_client . config . debugging
1455+ @api_client . config . logger . debug "API called: StatusPagesAPI#soft_delete_degradation_update\n Data: #{ data . inspect } \n Status code: #{ status_code } \n Headers: #{ headers } "
1456+ end
1457+ return data , status_code , headers
1458+ end
1459+
13011460 # Unpublish status page.
13021461 #
13031462 # @see #unpublish_status_page_with_http_info
0 commit comments