// DoTransitionWithPayload performs a transition on an issue using any payload.
// When performing the transition you can update or set other issue fields.
//
// JIRA API docs: https://docs.atlassian.com/jira/REST/latest/#api/2/issue-doTransition
198246
func (s *IssueService) DoTransitionWithPayload(ticketID, payload interface{}) (*Response, error) {
	apiEndpoint := fmt.Sprintf("rest/api/2/issue/%s/transitions", ticketID)

	req, err := s.client.NewRequest("POST", apiEndpoint, payload)
	if err != nil {
		return nil, err
	}

	resp, err := s.client.Do(req, nil)
	if err != nil {
		err = NewJiraError(resp, err)
	}

	return resp, err
}
564221
func (o *OrderGetOK) WithPayload(payload *models.Order) *OrderGetOK {
	o.Payload = payload
	return o
}
47806
func (o *DeletePolicyInvalid) WithPayload(payload models.Error) *DeletePolicyInvalid {
	o.Payload = payload
	return o
}
478091
func (o *GetDebuginfoOK) WithPayload(payload *models.DebugInfo) *GetDebuginfoOK {
	o.Payload = payload
	return o
}
79762
func (o *GetEndpointIDLogOK) WithPayload(payload models.EndpointStatusLog) *GetEndpointIDLogOK {
	o.Payload = payload
	return o
}
850976
func (o *GetServiceOK) WithPayload(payload []*models.Service) *GetServiceOK {
	o.Payload = payload
	return o
}
4549
func (o *PatchEndpointIDInvalid) WithPayload(payload models.Error) *PatchEndpointIDInvalid {
	o.Payload = payload
	return o
}
299439
func (o *GetConfigOK) WithPayload(payload *models.DaemonConfiguration) *GetConfigOK {
	o.Payload = payload
	return o
}
1088109
func (o *GetAuthCallbackOK) WithPayload(payload *GetAuthCallbackOKBody) *GetAuthCallbackOK {
	o.Payload = payload
	return o
}
813366
func (o *GetPetByIDOK) WithPayload(payload *models.Pet) *GetPetByIDOK {
	o.Payload = payload
	return o
}
235218
func (o *PatchPrefilterFailure) WithPayload(payload models.Error) *PatchPrefilterFailure {
	o.Payload = payload
	return o
}
1070422
func (o *UpdateTaskOK) WithPayload(payload *models.Task) *UpdateTaskOK {
	o.Payload = payload
	return o
}
165711
func (o *GetServiceIDOK) WithPayload(payload *models.Service) *GetServiceIDOK {
	o.Payload = payload
	return o
}
728012
func (o *GetFqdnCacheBadRequest) WithPayload(payload models.Error) *GetFqdnCacheBadRequest {
	o.Payload = payload
	return o
}
160072
func (o *GetIdentityOK) WithPayload(payload []*models.Identity) *GetIdentityOK {
	o.Payload = payload
	return o
}
1023013
func (o *GetEndpointIDConfigOK) WithPayload(payload *models.EndpointConfigurationStatus) *GetEndpointIDConfigOK {
	o.Payload = payload
	return o
}
141940
func (o *ListTasksUnprocessableEntity) WithPayload(payload *models.ValidationError) *ListTasksUnprocessableEntity {
	o.Payload = payload
	return o
}