You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
171 lines
4.5 KiB
171 lines
4.5 KiB
3 years ago
|
// Code generated by go-swagger; DO NOT EDIT.
|
||
|
|
||
|
package sku_management
|
||
|
|
||
|
// This file was generated by the swagger tool.
|
||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||
|
|
||
|
import (
|
||
|
"net/http"
|
||
|
|
||
|
"github.com/go-openapi/runtime"
|
||
|
|
||
|
"github.com/Cyclops-Labs/cyclops-4-hpc.git/services/plan-manager/models"
|
||
|
)
|
||
|
|
||
|
// CreateSkuCreatedCode is the HTTP code returned for type CreateSkuCreated
|
||
|
const CreateSkuCreatedCode int = 201
|
||
|
|
||
|
/*CreateSkuCreated item created
|
||
|
|
||
|
swagger:response createSkuCreated
|
||
|
*/
|
||
|
type CreateSkuCreated struct {
|
||
|
|
||
|
/*
|
||
|
In: Body
|
||
|
*/
|
||
|
Payload *models.ItemCreatedResponse `json:"body,omitempty"`
|
||
|
}
|
||
|
|
||
|
// NewCreateSkuCreated creates CreateSkuCreated with default headers values
|
||
|
func NewCreateSkuCreated() *CreateSkuCreated {
|
||
|
|
||
|
return &CreateSkuCreated{}
|
||
|
}
|
||
|
|
||
|
// WithPayload adds the payload to the create sku created response
|
||
|
func (o *CreateSkuCreated) WithPayload(payload *models.ItemCreatedResponse) *CreateSkuCreated {
|
||
|
o.Payload = payload
|
||
|
return o
|
||
|
}
|
||
|
|
||
|
// SetPayload sets the payload to the create sku created response
|
||
|
func (o *CreateSkuCreated) SetPayload(payload *models.ItemCreatedResponse) {
|
||
|
o.Payload = payload
|
||
|
}
|
||
|
|
||
|
// WriteResponse to the client
|
||
|
func (o *CreateSkuCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
||
|
|
||
|
rw.WriteHeader(201)
|
||
|
if o.Payload != nil {
|
||
|
payload := o.Payload
|
||
|
if err := producer.Produce(rw, payload); err != nil {
|
||
|
panic(err) // let the recovery middleware deal with this
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// CreateSkuBadRequestCode is the HTTP code returned for type CreateSkuBadRequest
|
||
|
const CreateSkuBadRequestCode int = 400
|
||
|
|
||
|
/*CreateSkuBadRequest invalid input, object invalid
|
||
|
|
||
|
swagger:response createSkuBadRequest
|
||
|
*/
|
||
|
type CreateSkuBadRequest struct {
|
||
|
}
|
||
|
|
||
|
// NewCreateSkuBadRequest creates CreateSkuBadRequest with default headers values
|
||
|
func NewCreateSkuBadRequest() *CreateSkuBadRequest {
|
||
|
|
||
|
return &CreateSkuBadRequest{}
|
||
|
}
|
||
|
|
||
|
// WriteResponse to the client
|
||
|
func (o *CreateSkuBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
||
|
|
||
|
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
|
||
|
|
||
|
rw.WriteHeader(400)
|
||
|
}
|
||
|
|
||
|
// CreateSkuConflictCode is the HTTP code returned for type CreateSkuConflict
|
||
|
const CreateSkuConflictCode int = 409
|
||
|
|
||
|
/*CreateSkuConflict an existing item already exists
|
||
|
|
||
|
swagger:response createSkuConflict
|
||
|
*/
|
||
|
type CreateSkuConflict struct {
|
||
|
|
||
|
/*
|
||
|
In: Body
|
||
|
*/
|
||
|
Payload *models.ErrorResponse `json:"body,omitempty"`
|
||
|
}
|
||
|
|
||
|
// NewCreateSkuConflict creates CreateSkuConflict with default headers values
|
||
|
func NewCreateSkuConflict() *CreateSkuConflict {
|
||
|
|
||
|
return &CreateSkuConflict{}
|
||
|
}
|
||
|
|
||
|
// WithPayload adds the payload to the create sku conflict response
|
||
|
func (o *CreateSkuConflict) WithPayload(payload *models.ErrorResponse) *CreateSkuConflict {
|
||
|
o.Payload = payload
|
||
|
return o
|
||
|
}
|
||
|
|
||
|
// SetPayload sets the payload to the create sku conflict response
|
||
|
func (o *CreateSkuConflict) SetPayload(payload *models.ErrorResponse) {
|
||
|
o.Payload = payload
|
||
|
}
|
||
|
|
||
|
// WriteResponse to the client
|
||
|
func (o *CreateSkuConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
||
|
|
||
|
rw.WriteHeader(409)
|
||
|
if o.Payload != nil {
|
||
|
payload := o.Payload
|
||
|
if err := producer.Produce(rw, payload); err != nil {
|
||
|
panic(err) // let the recovery middleware deal with this
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// CreateSkuInternalServerErrorCode is the HTTP code returned for type CreateSkuInternalServerError
|
||
|
const CreateSkuInternalServerErrorCode int = 500
|
||
|
|
||
|
/*CreateSkuInternalServerError unexpected error
|
||
|
|
||
|
swagger:response createSkuInternalServerError
|
||
|
*/
|
||
|
type CreateSkuInternalServerError struct {
|
||
|
|
||
|
/*
|
||
|
In: Body
|
||
|
*/
|
||
|
Payload *models.ErrorResponse `json:"body,omitempty"`
|
||
|
}
|
||
|
|
||
|
// NewCreateSkuInternalServerError creates CreateSkuInternalServerError with default headers values
|
||
|
func NewCreateSkuInternalServerError() *CreateSkuInternalServerError {
|
||
|
|
||
|
return &CreateSkuInternalServerError{}
|
||
|
}
|
||
|
|
||
|
// WithPayload adds the payload to the create sku internal server error response
|
||
|
func (o *CreateSkuInternalServerError) WithPayload(payload *models.ErrorResponse) *CreateSkuInternalServerError {
|
||
|
o.Payload = payload
|
||
|
return o
|
||
|
}
|
||
|
|
||
|
// SetPayload sets the payload to the create sku internal server error response
|
||
|
func (o *CreateSkuInternalServerError) SetPayload(payload *models.ErrorResponse) {
|
||
|
o.Payload = payload
|
||
|
}
|
||
|
|
||
|
// WriteResponse to the client
|
||
|
func (o *CreateSkuInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
||
|
|
||
|
rw.WriteHeader(500)
|
||
|
if o.Payload != nil {
|
||
|
payload := o.Payload
|
||
|
if err := producer.Produce(rw, payload); err != nil {
|
||
|
panic(err) // let the recovery middleware deal with this
|
||
|
}
|
||
|
}
|
||
|
}
|