lib/api/sfgate/sfgate_client/courses/update_course_lesson_respon...

478 lines
15 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/sfgate/sfgate_models"
)
// UpdateCourseLessonReader is a Reader for the UpdateCourseLesson structure.
type UpdateCourseLessonReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *UpdateCourseLessonReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewUpdateCourseLessonOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewUpdateCourseLessonUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewUpdateCourseLessonForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewUpdateCourseLessonNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewUpdateCourseLessonUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewUpdateCourseLessonInternalServerError()
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())
}
}
// NewUpdateCourseLessonOK creates a UpdateCourseLessonOK with default headers values
func NewUpdateCourseLessonOK() *UpdateCourseLessonOK {
return &UpdateCourseLessonOK{}
}
/*
UpdateCourseLessonOK describes a response with status code 200, with default header values.
CourseLesson Response Object
*/
type UpdateCourseLessonOK struct {
Payload *sfgate_models.CourseLessonResponse
}
// IsSuccess returns true when this update course lesson o k response has a 2xx status code
func (o *UpdateCourseLessonOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this update course lesson o k response has a 3xx status code
func (o *UpdateCourseLessonOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this update course lesson o k response has a 4xx status code
func (o *UpdateCourseLessonOK) IsClientError() bool {
return false
}
// IsServerError returns true when this update course lesson o k response has a 5xx status code
func (o *UpdateCourseLessonOK) IsServerError() bool {
return false
}
// IsCode returns true when this update course lesson o k response a status code equal to that given
func (o *UpdateCourseLessonOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the update course lesson o k response
func (o *UpdateCourseLessonOK) Code() int {
return 200
}
func (o *UpdateCourseLessonOK) Error() string {
return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonOK %+v", 200, o.Payload)
}
func (o *UpdateCourseLessonOK) String() string {
return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonOK %+v", 200, o.Payload)
}
func (o *UpdateCourseLessonOK) GetPayload() *sfgate_models.CourseLessonResponse {
return o.Payload
}
func (o *UpdateCourseLessonOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.CourseLessonResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewUpdateCourseLessonUnauthorized creates a UpdateCourseLessonUnauthorized with default headers values
func NewUpdateCourseLessonUnauthorized() *UpdateCourseLessonUnauthorized {
return &UpdateCourseLessonUnauthorized{}
}
/*
UpdateCourseLessonUnauthorized describes a response with status code 401, with default header values.
Access unauthorized, invalid API-KEY was used
*/
type UpdateCourseLessonUnauthorized struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this update course lesson unauthorized response has a 2xx status code
func (o *UpdateCourseLessonUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this update course lesson unauthorized response has a 3xx status code
func (o *UpdateCourseLessonUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this update course lesson unauthorized response has a 4xx status code
func (o *UpdateCourseLessonUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this update course lesson unauthorized response has a 5xx status code
func (o *UpdateCourseLessonUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this update course lesson unauthorized response a status code equal to that given
func (o *UpdateCourseLessonUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the update course lesson unauthorized response
func (o *UpdateCourseLessonUnauthorized) Code() int {
return 401
}
func (o *UpdateCourseLessonUnauthorized) Error() string {
return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonUnauthorized %+v", 401, o.Payload)
}
func (o *UpdateCourseLessonUnauthorized) String() string {
return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonUnauthorized %+v", 401, o.Payload)
}
func (o *UpdateCourseLessonUnauthorized) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *UpdateCourseLessonUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewUpdateCourseLessonForbidden creates a UpdateCourseLessonForbidden with default headers values
func NewUpdateCourseLessonForbidden() *UpdateCourseLessonForbidden {
return &UpdateCourseLessonForbidden{}
}
/*
UpdateCourseLessonForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type UpdateCourseLessonForbidden struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this update course lesson forbidden response has a 2xx status code
func (o *UpdateCourseLessonForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this update course lesson forbidden response has a 3xx status code
func (o *UpdateCourseLessonForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this update course lesson forbidden response has a 4xx status code
func (o *UpdateCourseLessonForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this update course lesson forbidden response has a 5xx status code
func (o *UpdateCourseLessonForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this update course lesson forbidden response a status code equal to that given
func (o *UpdateCourseLessonForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the update course lesson forbidden response
func (o *UpdateCourseLessonForbidden) Code() int {
return 403
}
func (o *UpdateCourseLessonForbidden) Error() string {
return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonForbidden %+v", 403, o.Payload)
}
func (o *UpdateCourseLessonForbidden) String() string {
return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonForbidden %+v", 403, o.Payload)
}
func (o *UpdateCourseLessonForbidden) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *UpdateCourseLessonForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewUpdateCourseLessonNotFound creates a UpdateCourseLessonNotFound with default headers values
func NewUpdateCourseLessonNotFound() *UpdateCourseLessonNotFound {
return &UpdateCourseLessonNotFound{}
}
/*
UpdateCourseLessonNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type UpdateCourseLessonNotFound struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this update course lesson not found response has a 2xx status code
func (o *UpdateCourseLessonNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this update course lesson not found response has a 3xx status code
func (o *UpdateCourseLessonNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this update course lesson not found response has a 4xx status code
func (o *UpdateCourseLessonNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this update course lesson not found response has a 5xx status code
func (o *UpdateCourseLessonNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this update course lesson not found response a status code equal to that given
func (o *UpdateCourseLessonNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the update course lesson not found response
func (o *UpdateCourseLessonNotFound) Code() int {
return 404
}
func (o *UpdateCourseLessonNotFound) Error() string {
return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonNotFound %+v", 404, o.Payload)
}
func (o *UpdateCourseLessonNotFound) String() string {
return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonNotFound %+v", 404, o.Payload)
}
func (o *UpdateCourseLessonNotFound) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *UpdateCourseLessonNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewUpdateCourseLessonUnprocessableEntity creates a UpdateCourseLessonUnprocessableEntity with default headers values
func NewUpdateCourseLessonUnprocessableEntity() *UpdateCourseLessonUnprocessableEntity {
return &UpdateCourseLessonUnprocessableEntity{}
}
/*
UpdateCourseLessonUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type UpdateCourseLessonUnprocessableEntity struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this update course lesson unprocessable entity response has a 2xx status code
func (o *UpdateCourseLessonUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this update course lesson unprocessable entity response has a 3xx status code
func (o *UpdateCourseLessonUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this update course lesson unprocessable entity response has a 4xx status code
func (o *UpdateCourseLessonUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this update course lesson unprocessable entity response has a 5xx status code
func (o *UpdateCourseLessonUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this update course lesson unprocessable entity response a status code equal to that given
func (o *UpdateCourseLessonUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the update course lesson unprocessable entity response
func (o *UpdateCourseLessonUnprocessableEntity) Code() int {
return 422
}
func (o *UpdateCourseLessonUnprocessableEntity) Error() string {
return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonUnprocessableEntity %+v", 422, o.Payload)
}
func (o *UpdateCourseLessonUnprocessableEntity) String() string {
return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonUnprocessableEntity %+v", 422, o.Payload)
}
func (o *UpdateCourseLessonUnprocessableEntity) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *UpdateCourseLessonUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewUpdateCourseLessonInternalServerError creates a UpdateCourseLessonInternalServerError with default headers values
func NewUpdateCourseLessonInternalServerError() *UpdateCourseLessonInternalServerError {
return &UpdateCourseLessonInternalServerError{}
}
/*
UpdateCourseLessonInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type UpdateCourseLessonInternalServerError struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this update course lesson internal server error response has a 2xx status code
func (o *UpdateCourseLessonInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this update course lesson internal server error response has a 3xx status code
func (o *UpdateCourseLessonInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this update course lesson internal server error response has a 4xx status code
func (o *UpdateCourseLessonInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this update course lesson internal server error response has a 5xx status code
func (o *UpdateCourseLessonInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this update course lesson internal server error response a status code equal to that given
func (o *UpdateCourseLessonInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the update course lesson internal server error response
func (o *UpdateCourseLessonInternalServerError) Code() int {
return 500
}
func (o *UpdateCourseLessonInternalServerError) Error() string {
return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonInternalServerError %+v", 500, o.Payload)
}
func (o *UpdateCourseLessonInternalServerError) String() string {
return fmt.Sprintf("[PUT /courselessons][%d] updateCourseLessonInternalServerError %+v", 500, o.Payload)
}
func (o *UpdateCourseLessonInternalServerError) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *UpdateCourseLessonInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}