/*
In: Body
*/
- Payload models.SubscriptionResult `json:"body,omitempty"`
+ Payload *models.SubscriptionResponse `json:"body,omitempty"`
}
// NewSubscribeReportCreated creates SubscribeReportCreated with default headers values
}
// WithPayload adds the payload to the subscribe report created response
-func (o *SubscribeReportCreated) WithPayload(payload models.SubscriptionResult) *SubscribeReportCreated {
+func (o *SubscribeReportCreated) WithPayload(payload *models.SubscriptionResponse) *SubscribeReportCreated {
o.Payload = payload
return o
}
// SetPayload sets the payload to the subscribe report created response
-func (o *SubscribeReportCreated) SetPayload(payload models.SubscriptionResult) {
+func (o *SubscribeReportCreated) SetPayload(payload *models.SubscriptionResponse) {
o.Payload = payload
}
func (o *SubscribeReportCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(201)
- payload := o.Payload
- if payload == nil {
- // return empty array
- payload = models.SubscriptionResult{}
- }
-
- if err := producer.Produce(rw, payload); err != nil {
- panic(err) // let the recovery middleware deal with this
+ if o.Payload != nil {
+ payload := o.Payload
+ if err := producer.Produce(rw, payload); err != nil {
+ panic(err) // let the recovery middleware deal with this
+ }
}
}