// Code generated by go-swagger; DO NOT EDIT. package metadata // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // ClientVersionCheckReader is a Reader for the ClientVersionCheck structure. type ClientVersionCheckReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *ClientVersionCheckReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewClientVersionCheckOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 400: result := NewClientVersionCheckBadRequest() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result default: return nil, runtime.NewAPIError("[POST /clientVersionCheck] clientVersionCheck", response, response.Code()) } } // NewClientVersionCheckOK creates a ClientVersionCheckOK with default headers values func NewClientVersionCheckOK() *ClientVersionCheckOK { return &ClientVersionCheckOK{} } /* ClientVersionCheckOK describes a response with status code 200, with default header values. compatible */ type ClientVersionCheckOK struct { } // IsSuccess returns true when this client version check o k response has a 2xx status code func (o *ClientVersionCheckOK) IsSuccess() bool { return true } // IsRedirect returns true when this client version check o k response has a 3xx status code func (o *ClientVersionCheckOK) IsRedirect() bool { return false } // IsClientError returns true when this client version check o k response has a 4xx status code func (o *ClientVersionCheckOK) IsClientError() bool { return false } // IsServerError returns true when this client version check o k response has a 5xx status code func (o *ClientVersionCheckOK) IsServerError() bool { return false } // IsCode returns true when this client version check o k response a status code equal to that given func (o *ClientVersionCheckOK) IsCode(code int) bool { return code == 200 } // Code gets the status code for the client version check o k response func (o *ClientVersionCheckOK) Code() int { return 200 } func (o *ClientVersionCheckOK) Error() string { return fmt.Sprintf("[POST /clientVersionCheck][%d] clientVersionCheckOK ", 200) } func (o *ClientVersionCheckOK) String() string { return fmt.Sprintf("[POST /clientVersionCheck][%d] clientVersionCheckOK ", 200) } func (o *ClientVersionCheckOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewClientVersionCheckBadRequest creates a ClientVersionCheckBadRequest with default headers values func NewClientVersionCheckBadRequest() *ClientVersionCheckBadRequest { return &ClientVersionCheckBadRequest{} } /* ClientVersionCheckBadRequest describes a response with status code 400, with default header values. not compatible */ type ClientVersionCheckBadRequest struct { Payload string } // IsSuccess returns true when this client version check bad request response has a 2xx status code func (o *ClientVersionCheckBadRequest) IsSuccess() bool { return false } // IsRedirect returns true when this client version check bad request response has a 3xx status code func (o *ClientVersionCheckBadRequest) IsRedirect() bool { return false } // IsClientError returns true when this client version check bad request response has a 4xx status code func (o *ClientVersionCheckBadRequest) IsClientError() bool { return true } // IsServerError returns true when this client version check bad request response has a 5xx status code func (o *ClientVersionCheckBadRequest) IsServerError() bool { return false } // IsCode returns true when this client version check bad request response a status code equal to that given func (o *ClientVersionCheckBadRequest) IsCode(code int) bool { return code == 400 } // Code gets the status code for the client version check bad request response func (o *ClientVersionCheckBadRequest) Code() int { return 400 } func (o *ClientVersionCheckBadRequest) Error() string { return fmt.Sprintf("[POST /clientVersionCheck][%d] clientVersionCheckBadRequest %+v", 400, o.Payload) } func (o *ClientVersionCheckBadRequest) String() string { return fmt.Sprintf("[POST /clientVersionCheck][%d] clientVersionCheckBadRequest %+v", 400, o.Payload) } func (o *ClientVersionCheckBadRequest) GetPayload() string { return o.Payload } func (o *ClientVersionCheckBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err } return nil } /* ClientVersionCheckBody client version check body swagger:model ClientVersionCheckBody */ type ClientVersionCheckBody struct { // client version ClientVersion string `json:"clientVersion,omitempty"` } // Validate validates this client version check body func (o *ClientVersionCheckBody) Validate(formats strfmt.Registry) error { return nil } // ContextValidate validates this client version check body based on context it is used func (o *ClientVersionCheckBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation func (o *ClientVersionCheckBody) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } return swag.WriteJSON(o) } // UnmarshalBinary interface implementation func (o *ClientVersionCheckBody) UnmarshalBinary(b []byte) error { var res ClientVersionCheckBody if err := swag.ReadJSON(b, &res); err != nil { return err } *o = res return nil }