|
| 1 | +package operations |
| 2 | + |
| 3 | +// This file was generated by the swagger tool. |
| 4 | +// Editing this file might prove futile when you re-run the swagger generate command |
| 5 | + |
| 6 | +import ( |
| 7 | + "net/http" |
| 8 | + |
| 9 | + "github.com/go-swagger/go-swagger/httpkit" |
| 10 | + |
| 11 | + "github.com/deis/workflow-manager-api/pkg/swagger/models" |
| 12 | +) |
| 13 | + |
| 14 | +/*CreateClusterDetailsForV2OK clusters details response |
| 15 | +
|
| 16 | +swagger:response createClusterDetailsForV2OK |
| 17 | +*/ |
| 18 | +type CreateClusterDetailsForV2OK struct { |
| 19 | + |
| 20 | + // In: body |
| 21 | + Payload *models.Cluster `json:"body,omitempty"` |
| 22 | +} |
| 23 | + |
| 24 | +// NewCreateClusterDetailsForV2OK creates CreateClusterDetailsForV2OK with default headers values |
| 25 | +func NewCreateClusterDetailsForV2OK() *CreateClusterDetailsForV2OK { |
| 26 | + return &CreateClusterDetailsForV2OK{} |
| 27 | +} |
| 28 | + |
| 29 | +// WithPayload adds the payload to the create cluster details for v2 o k response |
| 30 | +func (o *CreateClusterDetailsForV2OK) WithPayload(payload *models.Cluster) *CreateClusterDetailsForV2OK { |
| 31 | + o.Payload = payload |
| 32 | + return o |
| 33 | +} |
| 34 | + |
| 35 | +// SetPayload sets the payload to the create cluster details for v2 o k response |
| 36 | +func (o *CreateClusterDetailsForV2OK) SetPayload(payload *models.Cluster) { |
| 37 | + o.Payload = payload |
| 38 | +} |
| 39 | + |
| 40 | +// WriteResponse to the client |
| 41 | +func (o *CreateClusterDetailsForV2OK) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer) { |
| 42 | + |
| 43 | + rw.WriteHeader(200) |
| 44 | + if o.Payload != nil { |
| 45 | + if err := producer.Produce(rw, o.Payload); err != nil { |
| 46 | + panic(err) // let the recovery middleware deal with this |
| 47 | + } |
| 48 | + } |
| 49 | +} |
| 50 | + |
| 51 | +/*CreateClusterDetailsForV2Default unexpected error |
| 52 | +
|
| 53 | +swagger:response createClusterDetailsForV2Default |
| 54 | +*/ |
| 55 | +type CreateClusterDetailsForV2Default struct { |
| 56 | + _statusCode int |
| 57 | + |
| 58 | + // In: body |
| 59 | + Payload *models.Error `json:"body,omitempty"` |
| 60 | +} |
| 61 | + |
| 62 | +// NewCreateClusterDetailsForV2Default creates CreateClusterDetailsForV2Default with default headers values |
| 63 | +func NewCreateClusterDetailsForV2Default(code int) *CreateClusterDetailsForV2Default { |
| 64 | + if code <= 0 { |
| 65 | + code = 500 |
| 66 | + } |
| 67 | + |
| 68 | + return &CreateClusterDetailsForV2Default{ |
| 69 | + _statusCode: code, |
| 70 | + } |
| 71 | +} |
| 72 | + |
| 73 | +// WithStatusCode adds the status to the create cluster details for v2 default response |
| 74 | +func (o *CreateClusterDetailsForV2Default) WithStatusCode(code int) *CreateClusterDetailsForV2Default { |
| 75 | + o._statusCode = code |
| 76 | + return o |
| 77 | +} |
| 78 | + |
| 79 | +// SetStatusCode sets the status to the create cluster details for v2 default response |
| 80 | +func (o *CreateClusterDetailsForV2Default) SetStatusCode(code int) { |
| 81 | + o._statusCode = code |
| 82 | +} |
| 83 | + |
| 84 | +// WithPayload adds the payload to the create cluster details for v2 default response |
| 85 | +func (o *CreateClusterDetailsForV2Default) WithPayload(payload *models.Error) *CreateClusterDetailsForV2Default { |
| 86 | + o.Payload = payload |
| 87 | + return o |
| 88 | +} |
| 89 | + |
| 90 | +// SetPayload sets the payload to the create cluster details for v2 default response |
| 91 | +func (o *CreateClusterDetailsForV2Default) SetPayload(payload *models.Error) { |
| 92 | + o.Payload = payload |
| 93 | +} |
| 94 | + |
| 95 | +// WriteResponse to the client |
| 96 | +func (o *CreateClusterDetailsForV2Default) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer) { |
| 97 | + |
| 98 | + rw.WriteHeader(o._statusCode) |
| 99 | + if o.Payload != nil { |
| 100 | + if err := producer.Produce(rw, o.Payload); err != nil { |
| 101 | + panic(err) // let the recovery middleware deal with this |
| 102 | + } |
| 103 | + } |
| 104 | +} |
0 commit comments