lib/api/members/members_client/courses/update_course_sections_resp...

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"
)
// UpdateCourseSectionsReader is a Reader for the UpdateCourseSections structure.
type UpdateCourseSectionsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *UpdateCourseSectionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewUpdateCourseSectionsOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewUpdateCourseSectionsUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewUpdateCourseSectionsForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewUpdateCourseSectionsNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewUpdateCourseSectionsUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewUpdateCourseSectionsInternalServerError()
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())
}
}
// NewUpdateCourseSectionsOK creates a UpdateCourseSectionsOK with default headers values
func NewUpdateCourseSectionsOK() *UpdateCourseSectionsOK {
return &UpdateCourseSectionsOK{}
}
/*
UpdateCourseSectionsOK describes a response with status code 200, with default header values.
CourseSection Response Object
*/
type UpdateCourseSectionsOK struct {
Payload *members_models.CourseSectionResponse
}
// IsSuccess returns true when this update course sections o k response has a 2xx status code
func (o *UpdateCourseSectionsOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this update course sections o k response has a 3xx status code
func (o *UpdateCourseSectionsOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this update course sections o k response has a 4xx status code
func (o *UpdateCourseSectionsOK) IsClientError() bool {
return false
}
// IsServerError returns true when this update course sections o k response has a 5xx status code
func (o *UpdateCourseSectionsOK) IsServerError() bool {
return false
}
// IsCode returns true when this update course sections o k response a status code equal to that given
func (o *UpdateCourseSectionsOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the update course sections o k response
func (o *UpdateCourseSectionsOK) Code() int {
return 200
}
func (o *UpdateCourseSectionsOK) Error() string {
return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionsOK %+v", 200, o.Payload)
}
func (o *UpdateCourseSectionsOK) String() string {
return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionsOK %+v", 200, o.Payload)
}
func (o *UpdateCourseSectionsOK) GetPayload() *members_models.CourseSectionResponse {
return o.Payload
}
func (o *UpdateCourseSectionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(members_models.CourseSectionResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewUpdateCourseSectionsUnauthorized creates a UpdateCourseSectionsUnauthorized with default headers values
func NewUpdateCourseSectionsUnauthorized() *UpdateCourseSectionsUnauthorized {
return &UpdateCourseSectionsUnauthorized{}
}
/*
UpdateCourseSectionsUnauthorized describes a response with status code 401, with default header values.
Access Unauthorized, invalid API-KEY was used
*/
type UpdateCourseSectionsUnauthorized struct {
Payload *members_models.Error
}
// IsSuccess returns true when this update course sections unauthorized response has a 2xx status code
func (o *UpdateCourseSectionsUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this update course sections unauthorized response has a 3xx status code
func (o *UpdateCourseSectionsUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this update course sections unauthorized response has a 4xx status code
func (o *UpdateCourseSectionsUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this update course sections unauthorized response has a 5xx status code
func (o *UpdateCourseSectionsUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this update course sections unauthorized response a status code equal to that given
func (o *UpdateCourseSectionsUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the update course sections unauthorized response
func (o *UpdateCourseSectionsUnauthorized) Code() int {
return 401
}
func (o *UpdateCourseSectionsUnauthorized) Error() string {
return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionsUnauthorized %+v", 401, o.Payload)
}
func (o *UpdateCourseSectionsUnauthorized) String() string {
return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionsUnauthorized %+v", 401, o.Payload)
}
func (o *UpdateCourseSectionsUnauthorized) GetPayload() *members_models.Error {
return o.Payload
}
func (o *UpdateCourseSectionsUnauthorized) 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
}
// NewUpdateCourseSectionsForbidden creates a UpdateCourseSectionsForbidden with default headers values
func NewUpdateCourseSectionsForbidden() *UpdateCourseSectionsForbidden {
return &UpdateCourseSectionsForbidden{}
}
/*
UpdateCourseSectionsForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type UpdateCourseSectionsForbidden struct {
AccessControlAllowOrigin string
Payload *members_models.Error
}
// IsSuccess returns true when this update course sections forbidden response has a 2xx status code
func (o *UpdateCourseSectionsForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this update course sections forbidden response has a 3xx status code
func (o *UpdateCourseSectionsForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this update course sections forbidden response has a 4xx status code
func (o *UpdateCourseSectionsForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this update course sections forbidden response has a 5xx status code
func (o *UpdateCourseSectionsForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this update course sections forbidden response a status code equal to that given
func (o *UpdateCourseSectionsForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the update course sections forbidden response
func (o *UpdateCourseSectionsForbidden) Code() int {
return 403
}
func (o *UpdateCourseSectionsForbidden) Error() string {
return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionsForbidden %+v", 403, o.Payload)
}
func (o *UpdateCourseSectionsForbidden) String() string {
return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionsForbidden %+v", 403, o.Payload)
}
func (o *UpdateCourseSectionsForbidden) GetPayload() *members_models.Error {
return o.Payload
}
func (o *UpdateCourseSectionsForbidden) 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
}
// NewUpdateCourseSectionsNotFound creates a UpdateCourseSectionsNotFound with default headers values
func NewUpdateCourseSectionsNotFound() *UpdateCourseSectionsNotFound {
return &UpdateCourseSectionsNotFound{}
}
/*
UpdateCourseSectionsNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type UpdateCourseSectionsNotFound struct {
Payload *members_models.Error
}
// IsSuccess returns true when this update course sections not found response has a 2xx status code
func (o *UpdateCourseSectionsNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this update course sections not found response has a 3xx status code
func (o *UpdateCourseSectionsNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this update course sections not found response has a 4xx status code
func (o *UpdateCourseSectionsNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this update course sections not found response has a 5xx status code
func (o *UpdateCourseSectionsNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this update course sections not found response a status code equal to that given
func (o *UpdateCourseSectionsNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the update course sections not found response
func (o *UpdateCourseSectionsNotFound) Code() int {
return 404
}
func (o *UpdateCourseSectionsNotFound) Error() string {
return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionsNotFound %+v", 404, o.Payload)
}
func (o *UpdateCourseSectionsNotFound) String() string {
return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionsNotFound %+v", 404, o.Payload)
}
func (o *UpdateCourseSectionsNotFound) GetPayload() *members_models.Error {
return o.Payload
}
func (o *UpdateCourseSectionsNotFound) 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
}
// NewUpdateCourseSectionsUnprocessableEntity creates a UpdateCourseSectionsUnprocessableEntity with default headers values
func NewUpdateCourseSectionsUnprocessableEntity() *UpdateCourseSectionsUnprocessableEntity {
return &UpdateCourseSectionsUnprocessableEntity{}
}
/*
UpdateCourseSectionsUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type UpdateCourseSectionsUnprocessableEntity struct {
Payload *members_models.Error
}
// IsSuccess returns true when this update course sections unprocessable entity response has a 2xx status code
func (o *UpdateCourseSectionsUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this update course sections unprocessable entity response has a 3xx status code
func (o *UpdateCourseSectionsUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this update course sections unprocessable entity response has a 4xx status code
func (o *UpdateCourseSectionsUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this update course sections unprocessable entity response has a 5xx status code
func (o *UpdateCourseSectionsUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this update course sections unprocessable entity response a status code equal to that given
func (o *UpdateCourseSectionsUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the update course sections unprocessable entity response
func (o *UpdateCourseSectionsUnprocessableEntity) Code() int {
return 422
}
func (o *UpdateCourseSectionsUnprocessableEntity) Error() string {
return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionsUnprocessableEntity %+v", 422, o.Payload)
}
func (o *UpdateCourseSectionsUnprocessableEntity) String() string {
return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionsUnprocessableEntity %+v", 422, o.Payload)
}
func (o *UpdateCourseSectionsUnprocessableEntity) GetPayload() *members_models.Error {
return o.Payload
}
func (o *UpdateCourseSectionsUnprocessableEntity) 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
}
// NewUpdateCourseSectionsInternalServerError creates a UpdateCourseSectionsInternalServerError with default headers values
func NewUpdateCourseSectionsInternalServerError() *UpdateCourseSectionsInternalServerError {
return &UpdateCourseSectionsInternalServerError{}
}
/*
UpdateCourseSectionsInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type UpdateCourseSectionsInternalServerError struct {
Payload *members_models.Error
}
// IsSuccess returns true when this update course sections internal server error response has a 2xx status code
func (o *UpdateCourseSectionsInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this update course sections internal server error response has a 3xx status code
func (o *UpdateCourseSectionsInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this update course sections internal server error response has a 4xx status code
func (o *UpdateCourseSectionsInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this update course sections internal server error response has a 5xx status code
func (o *UpdateCourseSectionsInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this update course sections internal server error response a status code equal to that given
func (o *UpdateCourseSectionsInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the update course sections internal server error response
func (o *UpdateCourseSectionsInternalServerError) Code() int {
return 500
}
func (o *UpdateCourseSectionsInternalServerError) Error() string {
return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionsInternalServerError %+v", 500, o.Payload)
}
func (o *UpdateCourseSectionsInternalServerError) String() string {
return fmt.Sprintf("[PUT /coursesections][%d] updateCourseSectionsInternalServerError %+v", 500, o.Payload)
}
func (o *UpdateCourseSectionsInternalServerError) GetPayload() *members_models.Error {
return o.Payload
}
func (o *UpdateCourseSectionsInternalServerError) 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
}