mirror of https://github.com/vernonkeenan/lib
487 lines
16 KiB
Go
487 lines
16 KiB
Go
|
// Code generated by go-swagger; DO NOT EDIT.
|
||
|
|
||
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||
|
// All rights reserved worldwide.
|
||
|
// Proprietary product; unlicensed use is not allowed
|
||
|
|
||
|
package courses
|
||
|
|
||
|
// 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"
|
||
|
|
||
|
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
|
||
|
)
|
||
|
|
||
|
// UpdateCourseLessonsReader is a Reader for the UpdateCourseLessons structure.
|
||
|
type UpdateCourseLessonsReader struct {
|
||
|
formats strfmt.Registry
|
||
|
}
|
||
|
|
||
|
// ReadResponse reads a server response into the received o.
|
||
|
func (o *UpdateCourseLessonsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||
|
switch response.Code() {
|
||
|
case 200:
|
||
|
result := NewUpdateCourseLessonsOK()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return result, nil
|
||
|
case 401:
|
||
|
result := NewUpdateCourseLessonsUnauthorized()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 403:
|
||
|
result := NewUpdateCourseLessonsForbidden()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 404:
|
||
|
result := NewUpdateCourseLessonsNotFound()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 422:
|
||
|
result := NewUpdateCourseLessonsUnprocessableEntity()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 500:
|
||
|
result := NewUpdateCourseLessonsInternalServerError()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
default:
|
||
|
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// NewUpdateCourseLessonsOK creates a UpdateCourseLessonsOK with default headers values
|
||
|
func NewUpdateCourseLessonsOK() *UpdateCourseLessonsOK {
|
||
|
return &UpdateCourseLessonsOK{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UpdateCourseLessonsOK describes a response with status code 200, with default header values.
|
||
|
|
||
|
CourseLesson Response Object
|
||
|
*/
|
||
|
type UpdateCourseLessonsOK struct {
|
||
|
Payload *members_models.CourseLessonResponse
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this update course lessons o k response has a 2xx status code
|
||
|
func (o *UpdateCourseLessonsOK) IsSuccess() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this update course lessons o k response has a 3xx status code
|
||
|
func (o *UpdateCourseLessonsOK) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this update course lessons o k response has a 4xx status code
|
||
|
func (o *UpdateCourseLessonsOK) IsClientError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this update course lessons o k response has a 5xx status code
|
||
|
func (o *UpdateCourseLessonsOK) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this update course lessons o k response a status code equal to that given
|
||
|
func (o *UpdateCourseLessonsOK) IsCode(code int) bool {
|
||
|
return code == 200
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the update course lessons o k response
|
||
|
func (o *UpdateCourseLessonsOK) Code() int {
|
||
|
return 200
|
||
|
}
|
||
|
|
||
|
func (o *UpdateCourseLessonsOK) Error() string {
|
||
|
return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonsOK %+v", 200, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *UpdateCourseLessonsOK) String() string {
|
||
|
return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonsOK %+v", 200, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *UpdateCourseLessonsOK) GetPayload() *members_models.CourseLessonResponse {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *UpdateCourseLessonsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
o.Payload = new(members_models.CourseLessonResponse)
|
||
|
|
||
|
// response payload
|
||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// NewUpdateCourseLessonsUnauthorized creates a UpdateCourseLessonsUnauthorized with default headers values
|
||
|
func NewUpdateCourseLessonsUnauthorized() *UpdateCourseLessonsUnauthorized {
|
||
|
return &UpdateCourseLessonsUnauthorized{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UpdateCourseLessonsUnauthorized describes a response with status code 401, with default header values.
|
||
|
|
||
|
Access Unauthorized, invalid API-KEY was used
|
||
|
*/
|
||
|
type UpdateCourseLessonsUnauthorized struct {
|
||
|
Payload *members_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this update course lessons unauthorized response has a 2xx status code
|
||
|
func (o *UpdateCourseLessonsUnauthorized) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this update course lessons unauthorized response has a 3xx status code
|
||
|
func (o *UpdateCourseLessonsUnauthorized) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this update course lessons unauthorized response has a 4xx status code
|
||
|
func (o *UpdateCourseLessonsUnauthorized) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this update course lessons unauthorized response has a 5xx status code
|
||
|
func (o *UpdateCourseLessonsUnauthorized) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this update course lessons unauthorized response a status code equal to that given
|
||
|
func (o *UpdateCourseLessonsUnauthorized) IsCode(code int) bool {
|
||
|
return code == 401
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the update course lessons unauthorized response
|
||
|
func (o *UpdateCourseLessonsUnauthorized) Code() int {
|
||
|
return 401
|
||
|
}
|
||
|
|
||
|
func (o *UpdateCourseLessonsUnauthorized) Error() string {
|
||
|
return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonsUnauthorized %+v", 401, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *UpdateCourseLessonsUnauthorized) String() string {
|
||
|
return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonsUnauthorized %+v", 401, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *UpdateCourseLessonsUnauthorized) GetPayload() *members_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *UpdateCourseLessonsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
o.Payload = new(members_models.Error)
|
||
|
|
||
|
// response payload
|
||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// NewUpdateCourseLessonsForbidden creates a UpdateCourseLessonsForbidden with default headers values
|
||
|
func NewUpdateCourseLessonsForbidden() *UpdateCourseLessonsForbidden {
|
||
|
return &UpdateCourseLessonsForbidden{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UpdateCourseLessonsForbidden describes a response with status code 403, with default header values.
|
||
|
|
||
|
Access forbidden, account lacks access
|
||
|
*/
|
||
|
type UpdateCourseLessonsForbidden struct {
|
||
|
AccessControlAllowOrigin string
|
||
|
|
||
|
Payload *members_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this update course lessons forbidden response has a 2xx status code
|
||
|
func (o *UpdateCourseLessonsForbidden) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this update course lessons forbidden response has a 3xx status code
|
||
|
func (o *UpdateCourseLessonsForbidden) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this update course lessons forbidden response has a 4xx status code
|
||
|
func (o *UpdateCourseLessonsForbidden) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this update course lessons forbidden response has a 5xx status code
|
||
|
func (o *UpdateCourseLessonsForbidden) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this update course lessons forbidden response a status code equal to that given
|
||
|
func (o *UpdateCourseLessonsForbidden) IsCode(code int) bool {
|
||
|
return code == 403
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the update course lessons forbidden response
|
||
|
func (o *UpdateCourseLessonsForbidden) Code() int {
|
||
|
return 403
|
||
|
}
|
||
|
|
||
|
func (o *UpdateCourseLessonsForbidden) Error() string {
|
||
|
return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonsForbidden %+v", 403, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *UpdateCourseLessonsForbidden) String() string {
|
||
|
return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonsForbidden %+v", 403, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *UpdateCourseLessonsForbidden) GetPayload() *members_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *UpdateCourseLessonsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
// hydrates response header Access-Control-Allow-Origin
|
||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||
|
|
||
|
if hdrAccessControlAllowOrigin != "" {
|
||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||
|
}
|
||
|
|
||
|
o.Payload = new(members_models.Error)
|
||
|
|
||
|
// response payload
|
||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// NewUpdateCourseLessonsNotFound creates a UpdateCourseLessonsNotFound with default headers values
|
||
|
func NewUpdateCourseLessonsNotFound() *UpdateCourseLessonsNotFound {
|
||
|
return &UpdateCourseLessonsNotFound{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UpdateCourseLessonsNotFound describes a response with status code 404, with default header values.
|
||
|
|
||
|
Resource was not found
|
||
|
*/
|
||
|
type UpdateCourseLessonsNotFound struct {
|
||
|
Payload *members_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this update course lessons not found response has a 2xx status code
|
||
|
func (o *UpdateCourseLessonsNotFound) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this update course lessons not found response has a 3xx status code
|
||
|
func (o *UpdateCourseLessonsNotFound) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this update course lessons not found response has a 4xx status code
|
||
|
func (o *UpdateCourseLessonsNotFound) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this update course lessons not found response has a 5xx status code
|
||
|
func (o *UpdateCourseLessonsNotFound) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this update course lessons not found response a status code equal to that given
|
||
|
func (o *UpdateCourseLessonsNotFound) IsCode(code int) bool {
|
||
|
return code == 404
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the update course lessons not found response
|
||
|
func (o *UpdateCourseLessonsNotFound) Code() int {
|
||
|
return 404
|
||
|
}
|
||
|
|
||
|
func (o *UpdateCourseLessonsNotFound) Error() string {
|
||
|
return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonsNotFound %+v", 404, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *UpdateCourseLessonsNotFound) String() string {
|
||
|
return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonsNotFound %+v", 404, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *UpdateCourseLessonsNotFound) GetPayload() *members_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *UpdateCourseLessonsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
o.Payload = new(members_models.Error)
|
||
|
|
||
|
// response payload
|
||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// NewUpdateCourseLessonsUnprocessableEntity creates a UpdateCourseLessonsUnprocessableEntity with default headers values
|
||
|
func NewUpdateCourseLessonsUnprocessableEntity() *UpdateCourseLessonsUnprocessableEntity {
|
||
|
return &UpdateCourseLessonsUnprocessableEntity{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UpdateCourseLessonsUnprocessableEntity describes a response with status code 422, with default header values.
|
||
|
|
||
|
Unprocessable Entity, likely a bad parameter
|
||
|
*/
|
||
|
type UpdateCourseLessonsUnprocessableEntity struct {
|
||
|
Payload *members_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this update course lessons unprocessable entity response has a 2xx status code
|
||
|
func (o *UpdateCourseLessonsUnprocessableEntity) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this update course lessons unprocessable entity response has a 3xx status code
|
||
|
func (o *UpdateCourseLessonsUnprocessableEntity) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this update course lessons unprocessable entity response has a 4xx status code
|
||
|
func (o *UpdateCourseLessonsUnprocessableEntity) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this update course lessons unprocessable entity response has a 5xx status code
|
||
|
func (o *UpdateCourseLessonsUnprocessableEntity) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this update course lessons unprocessable entity response a status code equal to that given
|
||
|
func (o *UpdateCourseLessonsUnprocessableEntity) IsCode(code int) bool {
|
||
|
return code == 422
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the update course lessons unprocessable entity response
|
||
|
func (o *UpdateCourseLessonsUnprocessableEntity) Code() int {
|
||
|
return 422
|
||
|
}
|
||
|
|
||
|
func (o *UpdateCourseLessonsUnprocessableEntity) Error() string {
|
||
|
return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonsUnprocessableEntity %+v", 422, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *UpdateCourseLessonsUnprocessableEntity) String() string {
|
||
|
return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonsUnprocessableEntity %+v", 422, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *UpdateCourseLessonsUnprocessableEntity) GetPayload() *members_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *UpdateCourseLessonsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
o.Payload = new(members_models.Error)
|
||
|
|
||
|
// response payload
|
||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// NewUpdateCourseLessonsInternalServerError creates a UpdateCourseLessonsInternalServerError with default headers values
|
||
|
func NewUpdateCourseLessonsInternalServerError() *UpdateCourseLessonsInternalServerError {
|
||
|
return &UpdateCourseLessonsInternalServerError{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
UpdateCourseLessonsInternalServerError describes a response with status code 500, with default header values.
|
||
|
|
||
|
Server Internal Error
|
||
|
*/
|
||
|
type UpdateCourseLessonsInternalServerError struct {
|
||
|
Payload *members_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this update course lessons internal server error response has a 2xx status code
|
||
|
func (o *UpdateCourseLessonsInternalServerError) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this update course lessons internal server error response has a 3xx status code
|
||
|
func (o *UpdateCourseLessonsInternalServerError) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this update course lessons internal server error response has a 4xx status code
|
||
|
func (o *UpdateCourseLessonsInternalServerError) IsClientError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this update course lessons internal server error response has a 5xx status code
|
||
|
func (o *UpdateCourseLessonsInternalServerError) IsServerError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this update course lessons internal server error response a status code equal to that given
|
||
|
func (o *UpdateCourseLessonsInternalServerError) IsCode(code int) bool {
|
||
|
return code == 500
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the update course lessons internal server error response
|
||
|
func (o *UpdateCourseLessonsInternalServerError) Code() int {
|
||
|
return 500
|
||
|
}
|
||
|
|
||
|
func (o *UpdateCourseLessonsInternalServerError) Error() string {
|
||
|
return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonsInternalServerError %+v", 500, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *UpdateCourseLessonsInternalServerError) String() string {
|
||
|
return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonsInternalServerError %+v", 500, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *UpdateCourseLessonsInternalServerError) GetPayload() *members_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *UpdateCourseLessonsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
o.Payload = new(members_models.Error)
|
||
|
|
||
|
// response payload
|
||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|