// Code generated by go-swagger; DO NOT EDIT. package customer_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/customerdb/models" ) // AddCustomerCreatedCode is the HTTP code returned for type AddCustomerCreated const AddCustomerCreatedCode int = 201 /*AddCustomerCreated New customer was added successfully swagger:response addCustomerCreated */ type AddCustomerCreated struct { /* In: Body */ Payload *models.ItemCreatedResponse `json:"body,omitempty"` } // NewAddCustomerCreated creates AddCustomerCreated with default headers values func NewAddCustomerCreated() *AddCustomerCreated { return &AddCustomerCreated{} } // WithPayload adds the payload to the add customer created response func (o *AddCustomerCreated) WithPayload(payload *models.ItemCreatedResponse) *AddCustomerCreated { o.Payload = payload return o } // SetPayload sets the payload to the add customer created response func (o *AddCustomerCreated) SetPayload(payload *models.ItemCreatedResponse) { o.Payload = payload } // WriteResponse to the client func (o *AddCustomerCreated) 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 } } } // AddCustomerAcceptedCode is the HTTP code returned for type AddCustomerAccepted const AddCustomerAcceptedCode int = 202 /*AddCustomerAccepted The new customer was added but there might have been some fails when adding part of the data swagger:response addCustomerAccepted */ type AddCustomerAccepted struct { /* In: Body */ Payload *models.ItemCreatedResponse `json:"body,omitempty"` } // NewAddCustomerAccepted creates AddCustomerAccepted with default headers values func NewAddCustomerAccepted() *AddCustomerAccepted { return &AddCustomerAccepted{} } // WithPayload adds the payload to the add customer accepted response func (o *AddCustomerAccepted) WithPayload(payload *models.ItemCreatedResponse) *AddCustomerAccepted { o.Payload = payload return o } // SetPayload sets the payload to the add customer accepted response func (o *AddCustomerAccepted) SetPayload(payload *models.ItemCreatedResponse) { o.Payload = payload } // WriteResponse to the client func (o *AddCustomerAccepted) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { rw.WriteHeader(202) if o.Payload != nil { payload := o.Payload if err := producer.Produce(rw, payload); err != nil { panic(err) // let the recovery middleware deal with this } } } // AddCustomerBadRequestCode is the HTTP code returned for type AddCustomerBadRequest const AddCustomerBadRequestCode int = 400 /*AddCustomerBadRequest Invalid input, object invalid swagger:response addCustomerBadRequest */ type AddCustomerBadRequest struct { } // NewAddCustomerBadRequest creates AddCustomerBadRequest with default headers values func NewAddCustomerBadRequest() *AddCustomerBadRequest { return &AddCustomerBadRequest{} } // WriteResponse to the client func (o *AddCustomerBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses rw.WriteHeader(400) } // AddCustomerConflictCode is the HTTP code returned for type AddCustomerConflict const AddCustomerConflictCode int = 409 /*AddCustomerConflict The given item already exists swagger:response addCustomerConflict */ type AddCustomerConflict struct { /* In: Body */ Payload *models.ErrorResponse `json:"body,omitempty"` } // NewAddCustomerConflict creates AddCustomerConflict with default headers values func NewAddCustomerConflict() *AddCustomerConflict { return &AddCustomerConflict{} } // WithPayload adds the payload to the add customer conflict response func (o *AddCustomerConflict) WithPayload(payload *models.ErrorResponse) *AddCustomerConflict { o.Payload = payload return o } // SetPayload sets the payload to the add customer conflict response func (o *AddCustomerConflict) SetPayload(payload *models.ErrorResponse) { o.Payload = payload } // WriteResponse to the client func (o *AddCustomerConflict) 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 } } } // AddCustomerInternalServerErrorCode is the HTTP code returned for type AddCustomerInternalServerError const AddCustomerInternalServerErrorCode int = 500 /*AddCustomerInternalServerError Something unexpected happend, error raised swagger:response addCustomerInternalServerError */ type AddCustomerInternalServerError struct { /* In: Body */ Payload *models.ErrorResponse `json:"body,omitempty"` } // NewAddCustomerInternalServerError creates AddCustomerInternalServerError with default headers values func NewAddCustomerInternalServerError() *AddCustomerInternalServerError { return &AddCustomerInternalServerError{} } // WithPayload adds the payload to the add customer internal server error response func (o *AddCustomerInternalServerError) WithPayload(payload *models.ErrorResponse) *AddCustomerInternalServerError { o.Payload = payload return o } // SetPayload sets the payload to the add customer internal server error response func (o *AddCustomerInternalServerError) SetPayload(payload *models.ErrorResponse) { o.Payload = payload } // WriteResponse to the client func (o *AddCustomerInternalServerError) 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 } } }