func (hc HTTPClient) UpdateIncident(ctx context.Context, id string, incident UpdateIncidentInput) (output Incident, err error) {
	var res *http.Response
	res, err = hc.Request(ctx,
		r2.OptPut(),
		r2.OptPathf("/incidents/%s", id),
		r2.OptJSONBody(updateIncidentInputWrapper{Incident: incident}),
	).Do()
	if err != nil {
		return
	}
	if statusCode := res.StatusCode; statusCode < 200 || statusCode > 299 {
		err = ex.New(ErrNon200Status, ex.OptMessagef("method: put, path: /incidents/%s, status: %d", id, statusCode))
		return
	}
	defer res.Body.Close()
	var body updateIncidentOutputWrapper
	if err = json.NewDecoder(res.Body).Decode(&body); err != nil {
		err = ex.New(err)
		return
	}
	output = body.Incident
	return
}
// UpdateIncident implements the update incident method for the client.
UpdateIncident implements the update incident method for the client.
// UpdateIncident implements the update incident method for the client .
func (hc HTTPClient) UpdateIncident(ctx context.Context, id string, incident UpdateIncidentInput) (output Incident, err error) {
	var res *http.Response
	res, err = hc.Request(ctx,
		r2.OptPut(),
		r2.OptPathf("/incidents/%s", id),
		r2.OptJSONBody(updateIncidentInputWrapper{Incident: incident}),
	).Do()
	if err != nil {
		return
	}
	if statusCode := res.StatusCode; statusCode < 200 || statusCode > 299 {
		err = ex.New(ErrNon200Status, ex.OptMessagef("method: put, path: /incidents/%s, status: %d", id, statusCode))
		return
	}
	defer res.Body.Close()
	var body updateIncidentOutputWrapper
	if err = json.NewDecoder(res.Body).Decode(&body); err != nil {
		err = ex.New(err)
		return
	}
	output = body.Incident
	return
}
func ( hc HTTPClient ) UpdateIncident ( ctx context . Context , id string , incident UpdateIncidentInput ) ( output Incident , err error ) { var res * http . Response res , err = hc . Request ( ctx , r2 . OptPut ( ) , r2 . OptPathf ( " " , id ) , r2 . OptJSONBody ( updateIncidentInputWrapper { Incident : incident } ) , ) . Do ( ) if err != nil { return } if statusCode := res . StatusCode ; statusCode < 200 || statusCode > 299 { err = ex . New ( ErrNon200Status , ex . OptMessagef ( " " , id , statusCode ) ) return } defer res . Body . Close ( ) var body updateIncidentOutputWrapper if err = json . NewDecoder ( res . Body ) . Decode ( & body ) ; err != nil { err = ex . New ( err ) return } output = body . Incident return }
UpdateIncident implements the update incident method for the client.
UpdateIncident implements the update incident method for the client .