// Code generated by go-swagger; DO NOT EDIT. package statuses // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "git.coopcloud.tech/decentral1se/gtslib/models" ) // StatusMuteReader is a Reader for the StatusMute structure. type StatusMuteReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *StatusMuteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewStatusMuteOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 400: result := NewStatusMuteBadRequest() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 401: result := NewStatusMuteUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 403: result := NewStatusMuteForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 404: result := NewStatusMuteNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 406: result := NewStatusMuteNotAcceptable() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 500: result := NewStatusMuteInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result default: return nil, runtime.NewAPIError("[POST /api/v1/statuses/{id}/mute] statusMute", response, response.Code()) } } // NewStatusMuteOK creates a StatusMuteOK with default headers values func NewStatusMuteOK() *StatusMuteOK { return &StatusMuteOK{} } /* StatusMuteOK describes a response with status code 200, with default header values. The now-muted status. */ type StatusMuteOK struct { Payload *models.Status } // IsSuccess returns true when this status mute o k response has a 2xx status code func (o *StatusMuteOK) IsSuccess() bool { return true } // IsRedirect returns true when this status mute o k response has a 3xx status code func (o *StatusMuteOK) IsRedirect() bool { return false } // IsClientError returns true when this status mute o k response has a 4xx status code func (o *StatusMuteOK) IsClientError() bool { return false } // IsServerError returns true when this status mute o k response has a 5xx status code func (o *StatusMuteOK) IsServerError() bool { return false } // IsCode returns true when this status mute o k response a status code equal to that given func (o *StatusMuteOK) IsCode(code int) bool { return code == 200 } // Code gets the status code for the status mute o k response func (o *StatusMuteOK) Code() int { return 200 } func (o *StatusMuteOK) Error() string { payload, _ := json.Marshal(o.Payload) return fmt.Sprintf("[POST /api/v1/statuses/{id}/mute][%d] statusMuteOK %s", 200, payload) } func (o *StatusMuteOK) String() string { payload, _ := json.Marshal(o.Payload) return fmt.Sprintf("[POST /api/v1/statuses/{id}/mute][%d] statusMuteOK %s", 200, payload) } func (o *StatusMuteOK) GetPayload() *models.Status { return o.Payload } func (o *StatusMuteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Status) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewStatusMuteBadRequest creates a StatusMuteBadRequest with default headers values func NewStatusMuteBadRequest() *StatusMuteBadRequest { return &StatusMuteBadRequest{} } /* StatusMuteBadRequest describes a response with status code 400, with default header values. bad request; you're not part of the target status thread */ type StatusMuteBadRequest struct { } // IsSuccess returns true when this status mute bad request response has a 2xx status code func (o *StatusMuteBadRequest) IsSuccess() bool { return false } // IsRedirect returns true when this status mute bad request response has a 3xx status code func (o *StatusMuteBadRequest) IsRedirect() bool { return false } // IsClientError returns true when this status mute bad request response has a 4xx status code func (o *StatusMuteBadRequest) IsClientError() bool { return true } // IsServerError returns true when this status mute bad request response has a 5xx status code func (o *StatusMuteBadRequest) IsServerError() bool { return false } // IsCode returns true when this status mute bad request response a status code equal to that given func (o *StatusMuteBadRequest) IsCode(code int) bool { return code == 400 } // Code gets the status code for the status mute bad request response func (o *StatusMuteBadRequest) Code() int { return 400 } func (o *StatusMuteBadRequest) Error() string { return fmt.Sprintf("[POST /api/v1/statuses/{id}/mute][%d] statusMuteBadRequest", 400) } func (o *StatusMuteBadRequest) String() string { return fmt.Sprintf("[POST /api/v1/statuses/{id}/mute][%d] statusMuteBadRequest", 400) } func (o *StatusMuteBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewStatusMuteUnauthorized creates a StatusMuteUnauthorized with default headers values func NewStatusMuteUnauthorized() *StatusMuteUnauthorized { return &StatusMuteUnauthorized{} } /* StatusMuteUnauthorized describes a response with status code 401, with default header values. unauthorized */ type StatusMuteUnauthorized struct { } // IsSuccess returns true when this status mute unauthorized response has a 2xx status code func (o *StatusMuteUnauthorized) IsSuccess() bool { return false } // IsRedirect returns true when this status mute unauthorized response has a 3xx status code func (o *StatusMuteUnauthorized) IsRedirect() bool { return false } // IsClientError returns true when this status mute unauthorized response has a 4xx status code func (o *StatusMuteUnauthorized) IsClientError() bool { return true } // IsServerError returns true when this status mute unauthorized response has a 5xx status code func (o *StatusMuteUnauthorized) IsServerError() bool { return false } // IsCode returns true when this status mute unauthorized response a status code equal to that given func (o *StatusMuteUnauthorized) IsCode(code int) bool { return code == 401 } // Code gets the status code for the status mute unauthorized response func (o *StatusMuteUnauthorized) Code() int { return 401 } func (o *StatusMuteUnauthorized) Error() string { return fmt.Sprintf("[POST /api/v1/statuses/{id}/mute][%d] statusMuteUnauthorized", 401) } func (o *StatusMuteUnauthorized) String() string { return fmt.Sprintf("[POST /api/v1/statuses/{id}/mute][%d] statusMuteUnauthorized", 401) } func (o *StatusMuteUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewStatusMuteForbidden creates a StatusMuteForbidden with default headers values func NewStatusMuteForbidden() *StatusMuteForbidden { return &StatusMuteForbidden{} } /* StatusMuteForbidden describes a response with status code 403, with default header values. forbidden */ type StatusMuteForbidden struct { } // IsSuccess returns true when this status mute forbidden response has a 2xx status code func (o *StatusMuteForbidden) IsSuccess() bool { return false } // IsRedirect returns true when this status mute forbidden response has a 3xx status code func (o *StatusMuteForbidden) IsRedirect() bool { return false } // IsClientError returns true when this status mute forbidden response has a 4xx status code func (o *StatusMuteForbidden) IsClientError() bool { return true } // IsServerError returns true when this status mute forbidden response has a 5xx status code func (o *StatusMuteForbidden) IsServerError() bool { return false } // IsCode returns true when this status mute forbidden response a status code equal to that given func (o *StatusMuteForbidden) IsCode(code int) bool { return code == 403 } // Code gets the status code for the status mute forbidden response func (o *StatusMuteForbidden) Code() int { return 403 } func (o *StatusMuteForbidden) Error() string { return fmt.Sprintf("[POST /api/v1/statuses/{id}/mute][%d] statusMuteForbidden", 403) } func (o *StatusMuteForbidden) String() string { return fmt.Sprintf("[POST /api/v1/statuses/{id}/mute][%d] statusMuteForbidden", 403) } func (o *StatusMuteForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewStatusMuteNotFound creates a StatusMuteNotFound with default headers values func NewStatusMuteNotFound() *StatusMuteNotFound { return &StatusMuteNotFound{} } /* StatusMuteNotFound describes a response with status code 404, with default header values. not found */ type StatusMuteNotFound struct { } // IsSuccess returns true when this status mute not found response has a 2xx status code func (o *StatusMuteNotFound) IsSuccess() bool { return false } // IsRedirect returns true when this status mute not found response has a 3xx status code func (o *StatusMuteNotFound) IsRedirect() bool { return false } // IsClientError returns true when this status mute not found response has a 4xx status code func (o *StatusMuteNotFound) IsClientError() bool { return true } // IsServerError returns true when this status mute not found response has a 5xx status code func (o *StatusMuteNotFound) IsServerError() bool { return false } // IsCode returns true when this status mute not found response a status code equal to that given func (o *StatusMuteNotFound) IsCode(code int) bool { return code == 404 } // Code gets the status code for the status mute not found response func (o *StatusMuteNotFound) Code() int { return 404 } func (o *StatusMuteNotFound) Error() string { return fmt.Sprintf("[POST /api/v1/statuses/{id}/mute][%d] statusMuteNotFound", 404) } func (o *StatusMuteNotFound) String() string { return fmt.Sprintf("[POST /api/v1/statuses/{id}/mute][%d] statusMuteNotFound", 404) } func (o *StatusMuteNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewStatusMuteNotAcceptable creates a StatusMuteNotAcceptable with default headers values func NewStatusMuteNotAcceptable() *StatusMuteNotAcceptable { return &StatusMuteNotAcceptable{} } /* StatusMuteNotAcceptable describes a response with status code 406, with default header values. not acceptable */ type StatusMuteNotAcceptable struct { } // IsSuccess returns true when this status mute not acceptable response has a 2xx status code func (o *StatusMuteNotAcceptable) IsSuccess() bool { return false } // IsRedirect returns true when this status mute not acceptable response has a 3xx status code func (o *StatusMuteNotAcceptable) IsRedirect() bool { return false } // IsClientError returns true when this status mute not acceptable response has a 4xx status code func (o *StatusMuteNotAcceptable) IsClientError() bool { return true } // IsServerError returns true when this status mute not acceptable response has a 5xx status code func (o *StatusMuteNotAcceptable) IsServerError() bool { return false } // IsCode returns true when this status mute not acceptable response a status code equal to that given func (o *StatusMuteNotAcceptable) IsCode(code int) bool { return code == 406 } // Code gets the status code for the status mute not acceptable response func (o *StatusMuteNotAcceptable) Code() int { return 406 } func (o *StatusMuteNotAcceptable) Error() string { return fmt.Sprintf("[POST /api/v1/statuses/{id}/mute][%d] statusMuteNotAcceptable", 406) } func (o *StatusMuteNotAcceptable) String() string { return fmt.Sprintf("[POST /api/v1/statuses/{id}/mute][%d] statusMuteNotAcceptable", 406) } func (o *StatusMuteNotAcceptable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewStatusMuteInternalServerError creates a StatusMuteInternalServerError with default headers values func NewStatusMuteInternalServerError() *StatusMuteInternalServerError { return &StatusMuteInternalServerError{} } /* StatusMuteInternalServerError describes a response with status code 500, with default header values. internal server error */ type StatusMuteInternalServerError struct { } // IsSuccess returns true when this status mute internal server error response has a 2xx status code func (o *StatusMuteInternalServerError) IsSuccess() bool { return false } // IsRedirect returns true when this status mute internal server error response has a 3xx status code func (o *StatusMuteInternalServerError) IsRedirect() bool { return false } // IsClientError returns true when this status mute internal server error response has a 4xx status code func (o *StatusMuteInternalServerError) IsClientError() bool { return false } // IsServerError returns true when this status mute internal server error response has a 5xx status code func (o *StatusMuteInternalServerError) IsServerError() bool { return true } // IsCode returns true when this status mute internal server error response a status code equal to that given func (o *StatusMuteInternalServerError) IsCode(code int) bool { return code == 500 } // Code gets the status code for the status mute internal server error response func (o *StatusMuteInternalServerError) Code() int { return 500 } func (o *StatusMuteInternalServerError) Error() string { return fmt.Sprintf("[POST /api/v1/statuses/{id}/mute][%d] statusMuteInternalServerError", 500) } func (o *StatusMuteInternalServerError) String() string { return fmt.Sprintf("[POST /api/v1/statuses/{id}/mute][%d] statusMuteInternalServerError", 500) } func (o *StatusMuteInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil }