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.
		
		
		
		
		
			
		
			
				
					
					
						
							186 lines
						
					
					
						
							5.2 KiB
						
					
					
				
			
		
		
	
	
							186 lines
						
					
					
						
							5.2 KiB
						
					
					
				// Code generated by go-swagger; DO NOT EDIT.
 | 
						|
 | 
						|
package reseller_management
 | 
						|
 | 
						|
// This file was generated by the swagger tool.
 | 
						|
// Editing this file might prove futile when you re-run the swagger generate command
 | 
						|
 | 
						|
import (
 | 
						|
	"fmt"
 | 
						|
	"io"
 | 
						|
 | 
						|
	"github.com/go-openapi/runtime"
 | 
						|
	"github.com/go-openapi/strfmt"
 | 
						|
 | 
						|
	"github.com/Cyclops-Labs/cyclops-4-hpc.git/services/customerdb/models"
 | 
						|
)
 | 
						|
 | 
						|
// UpdateResellerReader is a Reader for the UpdateReseller structure.
 | 
						|
type UpdateResellerReader struct {
 | 
						|
	formats strfmt.Registry
 | 
						|
}
 | 
						|
 | 
						|
// ReadResponse reads a server response into the received o.
 | 
						|
func (o *UpdateResellerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
 | 
						|
	switch response.Code() {
 | 
						|
	case 200:
 | 
						|
		result := NewUpdateResellerOK()
 | 
						|
		if err := result.readResponse(response, consumer, o.formats); err != nil {
 | 
						|
			return nil, err
 | 
						|
		}
 | 
						|
		return result, nil
 | 
						|
	case 202:
 | 
						|
		result := NewUpdateResellerAccepted()
 | 
						|
		if err := result.readResponse(response, consumer, o.formats); err != nil {
 | 
						|
			return nil, err
 | 
						|
		}
 | 
						|
		return result, nil
 | 
						|
	case 404:
 | 
						|
		result := NewUpdateResellerNotFound()
 | 
						|
		if err := result.readResponse(response, consumer, o.formats); err != nil {
 | 
						|
			return nil, err
 | 
						|
		}
 | 
						|
		return nil, result
 | 
						|
	case 500:
 | 
						|
		result := NewUpdateResellerInternalServerError()
 | 
						|
		if err := result.readResponse(response, consumer, o.formats); err != nil {
 | 
						|
			return nil, err
 | 
						|
		}
 | 
						|
		return nil, result
 | 
						|
 | 
						|
	default:
 | 
						|
		return nil, runtime.NewAPIError("unknown error", response, response.Code())
 | 
						|
	}
 | 
						|
}
 | 
						|
 | 
						|
// NewUpdateResellerOK creates a UpdateResellerOK with default headers values
 | 
						|
func NewUpdateResellerOK() *UpdateResellerOK {
 | 
						|
	return &UpdateResellerOK{}
 | 
						|
}
 | 
						|
 | 
						|
/*UpdateResellerOK handles this case with default header values.
 | 
						|
 | 
						|
Reseller with the given id was updated
 | 
						|
*/
 | 
						|
type UpdateResellerOK struct {
 | 
						|
	Payload *models.ItemCreatedResponse
 | 
						|
}
 | 
						|
 | 
						|
func (o *UpdateResellerOK) Error() string {
 | 
						|
	return fmt.Sprintf("[PUT /reseller/{id}][%d] updateResellerOK  %+v", 200, o.Payload)
 | 
						|
}
 | 
						|
 | 
						|
func (o *UpdateResellerOK) GetPayload() *models.ItemCreatedResponse {
 | 
						|
	return o.Payload
 | 
						|
}
 | 
						|
 | 
						|
func (o *UpdateResellerOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
 | 
						|
 | 
						|
	o.Payload = new(models.ItemCreatedResponse)
 | 
						|
 | 
						|
	// response payload
 | 
						|
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
 | 
						|
		return err
 | 
						|
	}
 | 
						|
 | 
						|
	return nil
 | 
						|
}
 | 
						|
 | 
						|
// NewUpdateResellerAccepted creates a UpdateResellerAccepted with default headers values
 | 
						|
func NewUpdateResellerAccepted() *UpdateResellerAccepted {
 | 
						|
	return &UpdateResellerAccepted{}
 | 
						|
}
 | 
						|
 | 
						|
/*UpdateResellerAccepted handles this case with default header values.
 | 
						|
 | 
						|
The reseller was updated but there might have been some fails when adding part of the data
 | 
						|
*/
 | 
						|
type UpdateResellerAccepted struct {
 | 
						|
	Payload *models.ItemCreatedResponse
 | 
						|
}
 | 
						|
 | 
						|
func (o *UpdateResellerAccepted) Error() string {
 | 
						|
	return fmt.Sprintf("[PUT /reseller/{id}][%d] updateResellerAccepted  %+v", 202, o.Payload)
 | 
						|
}
 | 
						|
 | 
						|
func (o *UpdateResellerAccepted) GetPayload() *models.ItemCreatedResponse {
 | 
						|
	return o.Payload
 | 
						|
}
 | 
						|
 | 
						|
func (o *UpdateResellerAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
 | 
						|
 | 
						|
	o.Payload = new(models.ItemCreatedResponse)
 | 
						|
 | 
						|
	// response payload
 | 
						|
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
 | 
						|
		return err
 | 
						|
	}
 | 
						|
 | 
						|
	return nil
 | 
						|
}
 | 
						|
 | 
						|
// NewUpdateResellerNotFound creates a UpdateResellerNotFound with default headers values
 | 
						|
func NewUpdateResellerNotFound() *UpdateResellerNotFound {
 | 
						|
	return &UpdateResellerNotFound{}
 | 
						|
}
 | 
						|
 | 
						|
/*UpdateResellerNotFound handles this case with default header values.
 | 
						|
 | 
						|
The reseller with the given id wasn't found
 | 
						|
*/
 | 
						|
type UpdateResellerNotFound struct {
 | 
						|
	Payload *models.ErrorResponse
 | 
						|
}
 | 
						|
 | 
						|
func (o *UpdateResellerNotFound) Error() string {
 | 
						|
	return fmt.Sprintf("[PUT /reseller/{id}][%d] updateResellerNotFound  %+v", 404, o.Payload)
 | 
						|
}
 | 
						|
 | 
						|
func (o *UpdateResellerNotFound) GetPayload() *models.ErrorResponse {
 | 
						|
	return o.Payload
 | 
						|
}
 | 
						|
 | 
						|
func (o *UpdateResellerNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
 | 
						|
 | 
						|
	o.Payload = new(models.ErrorResponse)
 | 
						|
 | 
						|
	// response payload
 | 
						|
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
 | 
						|
		return err
 | 
						|
	}
 | 
						|
 | 
						|
	return nil
 | 
						|
}
 | 
						|
 | 
						|
// NewUpdateResellerInternalServerError creates a UpdateResellerInternalServerError with default headers values
 | 
						|
func NewUpdateResellerInternalServerError() *UpdateResellerInternalServerError {
 | 
						|
	return &UpdateResellerInternalServerError{}
 | 
						|
}
 | 
						|
 | 
						|
/*UpdateResellerInternalServerError handles this case with default header values.
 | 
						|
 | 
						|
Something unexpected happend, error raised
 | 
						|
*/
 | 
						|
type UpdateResellerInternalServerError struct {
 | 
						|
	Payload *models.ErrorResponse
 | 
						|
}
 | 
						|
 | 
						|
func (o *UpdateResellerInternalServerError) Error() string {
 | 
						|
	return fmt.Sprintf("[PUT /reseller/{id}][%d] updateResellerInternalServerError  %+v", 500, o.Payload)
 | 
						|
}
 | 
						|
 | 
						|
func (o *UpdateResellerInternalServerError) GetPayload() *models.ErrorResponse {
 | 
						|
	return o.Payload
 | 
						|
}
 | 
						|
 | 
						|
func (o *UpdateResellerInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
 | 
						|
 | 
						|
	o.Payload = new(models.ErrorResponse)
 | 
						|
 | 
						|
	// response payload
 | 
						|
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
 | 
						|
		return err
 | 
						|
	}
 | 
						|
 | 
						|
	return nil
 | 
						|
}
 | 
						|
 |