// Code generated by go-swagger; DO NOT EDIT. package accounts // 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" ) // AccountMuteReader is a Reader for the AccountMute structure. type AccountMuteReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *AccountMuteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewAccountMuteOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 400: result := NewAccountMuteBadRequest() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 401: result := NewAccountMuteUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 403: result := NewAccountMuteForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 404: result := NewAccountMuteNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 406: result := NewAccountMuteNotAcceptable() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 500: result := NewAccountMuteInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result default: return nil, runtime.NewAPIError("[POST /api/v1/accounts/{id}/mute] accountMute", response, response.Code()) } } // NewAccountMuteOK creates a AccountMuteOK with default headers values func NewAccountMuteOK() *AccountMuteOK { return &AccountMuteOK{} } /* AccountMuteOK describes a response with status code 200, with default header values. Your relationship to the account. */ type AccountMuteOK struct { Payload *models.Relationship } // IsSuccess returns true when this account mute o k response has a 2xx status code func (o *AccountMuteOK) IsSuccess() bool { return true } // IsRedirect returns true when this account mute o k response has a 3xx status code func (o *AccountMuteOK) IsRedirect() bool { return false } // IsClientError returns true when this account mute o k response has a 4xx status code func (o *AccountMuteOK) IsClientError() bool { return false } // IsServerError returns true when this account mute o k response has a 5xx status code func (o *AccountMuteOK) IsServerError() bool { return false } // IsCode returns true when this account mute o k response a status code equal to that given func (o *AccountMuteOK) IsCode(code int) bool { return code == 200 } // Code gets the status code for the account mute o k response func (o *AccountMuteOK) Code() int { return 200 } func (o *AccountMuteOK) Error() string { payload, _ := json.Marshal(o.Payload) return fmt.Sprintf("[POST /api/v1/accounts/{id}/mute][%d] accountMuteOK %s", 200, payload) } func (o *AccountMuteOK) String() string { payload, _ := json.Marshal(o.Payload) return fmt.Sprintf("[POST /api/v1/accounts/{id}/mute][%d] accountMuteOK %s", 200, payload) } func (o *AccountMuteOK) GetPayload() *models.Relationship { return o.Payload } func (o *AccountMuteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Relationship) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewAccountMuteBadRequest creates a AccountMuteBadRequest with default headers values func NewAccountMuteBadRequest() *AccountMuteBadRequest { return &AccountMuteBadRequest{} } /* AccountMuteBadRequest describes a response with status code 400, with default header values. bad request */ type AccountMuteBadRequest struct { } // IsSuccess returns true when this account mute bad request response has a 2xx status code func (o *AccountMuteBadRequest) IsSuccess() bool { return false } // IsRedirect returns true when this account mute bad request response has a 3xx status code func (o *AccountMuteBadRequest) IsRedirect() bool { return false } // IsClientError returns true when this account mute bad request response has a 4xx status code func (o *AccountMuteBadRequest) IsClientError() bool { return true } // IsServerError returns true when this account mute bad request response has a 5xx status code func (o *AccountMuteBadRequest) IsServerError() bool { return false } // IsCode returns true when this account mute bad request response a status code equal to that given func (o *AccountMuteBadRequest) IsCode(code int) bool { return code == 400 } // Code gets the status code for the account mute bad request response func (o *AccountMuteBadRequest) Code() int { return 400 } func (o *AccountMuteBadRequest) Error() string { return fmt.Sprintf("[POST /api/v1/accounts/{id}/mute][%d] accountMuteBadRequest", 400) } func (o *AccountMuteBadRequest) String() string { return fmt.Sprintf("[POST /api/v1/accounts/{id}/mute][%d] accountMuteBadRequest", 400) } func (o *AccountMuteBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewAccountMuteUnauthorized creates a AccountMuteUnauthorized with default headers values func NewAccountMuteUnauthorized() *AccountMuteUnauthorized { return &AccountMuteUnauthorized{} } /* AccountMuteUnauthorized describes a response with status code 401, with default header values. unauthorized */ type AccountMuteUnauthorized struct { } // IsSuccess returns true when this account mute unauthorized response has a 2xx status code func (o *AccountMuteUnauthorized) IsSuccess() bool { return false } // IsRedirect returns true when this account mute unauthorized response has a 3xx status code func (o *AccountMuteUnauthorized) IsRedirect() bool { return false } // IsClientError returns true when this account mute unauthorized response has a 4xx status code func (o *AccountMuteUnauthorized) IsClientError() bool { return true } // IsServerError returns true when this account mute unauthorized response has a 5xx status code func (o *AccountMuteUnauthorized) IsServerError() bool { return false } // IsCode returns true when this account mute unauthorized response a status code equal to that given func (o *AccountMuteUnauthorized) IsCode(code int) bool { return code == 401 } // Code gets the status code for the account mute unauthorized response func (o *AccountMuteUnauthorized) Code() int { return 401 } func (o *AccountMuteUnauthorized) Error() string { return fmt.Sprintf("[POST /api/v1/accounts/{id}/mute][%d] accountMuteUnauthorized", 401) } func (o *AccountMuteUnauthorized) String() string { return fmt.Sprintf("[POST /api/v1/accounts/{id}/mute][%d] accountMuteUnauthorized", 401) } func (o *AccountMuteUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewAccountMuteForbidden creates a AccountMuteForbidden with default headers values func NewAccountMuteForbidden() *AccountMuteForbidden { return &AccountMuteForbidden{} } /* AccountMuteForbidden describes a response with status code 403, with default header values. forbidden to moved accounts */ type AccountMuteForbidden struct { } // IsSuccess returns true when this account mute forbidden response has a 2xx status code func (o *AccountMuteForbidden) IsSuccess() bool { return false } // IsRedirect returns true when this account mute forbidden response has a 3xx status code func (o *AccountMuteForbidden) IsRedirect() bool { return false } // IsClientError returns true when this account mute forbidden response has a 4xx status code func (o *AccountMuteForbidden) IsClientError() bool { return true } // IsServerError returns true when this account mute forbidden response has a 5xx status code func (o *AccountMuteForbidden) IsServerError() bool { return false } // IsCode returns true when this account mute forbidden response a status code equal to that given func (o *AccountMuteForbidden) IsCode(code int) bool { return code == 403 } // Code gets the status code for the account mute forbidden response func (o *AccountMuteForbidden) Code() int { return 403 } func (o *AccountMuteForbidden) Error() string { return fmt.Sprintf("[POST /api/v1/accounts/{id}/mute][%d] accountMuteForbidden", 403) } func (o *AccountMuteForbidden) String() string { return fmt.Sprintf("[POST /api/v1/accounts/{id}/mute][%d] accountMuteForbidden", 403) } func (o *AccountMuteForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewAccountMuteNotFound creates a AccountMuteNotFound with default headers values func NewAccountMuteNotFound() *AccountMuteNotFound { return &AccountMuteNotFound{} } /* AccountMuteNotFound describes a response with status code 404, with default header values. not found */ type AccountMuteNotFound struct { } // IsSuccess returns true when this account mute not found response has a 2xx status code func (o *AccountMuteNotFound) IsSuccess() bool { return false } // IsRedirect returns true when this account mute not found response has a 3xx status code func (o *AccountMuteNotFound) IsRedirect() bool { return false } // IsClientError returns true when this account mute not found response has a 4xx status code func (o *AccountMuteNotFound) IsClientError() bool { return true } // IsServerError returns true when this account mute not found response has a 5xx status code func (o *AccountMuteNotFound) IsServerError() bool { return false } // IsCode returns true when this account mute not found response a status code equal to that given func (o *AccountMuteNotFound) IsCode(code int) bool { return code == 404 } // Code gets the status code for the account mute not found response func (o *AccountMuteNotFound) Code() int { return 404 } func (o *AccountMuteNotFound) Error() string { return fmt.Sprintf("[POST /api/v1/accounts/{id}/mute][%d] accountMuteNotFound", 404) } func (o *AccountMuteNotFound) String() string { return fmt.Sprintf("[POST /api/v1/accounts/{id}/mute][%d] accountMuteNotFound", 404) } func (o *AccountMuteNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewAccountMuteNotAcceptable creates a AccountMuteNotAcceptable with default headers values func NewAccountMuteNotAcceptable() *AccountMuteNotAcceptable { return &AccountMuteNotAcceptable{} } /* AccountMuteNotAcceptable describes a response with status code 406, with default header values. not acceptable */ type AccountMuteNotAcceptable struct { } // IsSuccess returns true when this account mute not acceptable response has a 2xx status code func (o *AccountMuteNotAcceptable) IsSuccess() bool { return false } // IsRedirect returns true when this account mute not acceptable response has a 3xx status code func (o *AccountMuteNotAcceptable) IsRedirect() bool { return false } // IsClientError returns true when this account mute not acceptable response has a 4xx status code func (o *AccountMuteNotAcceptable) IsClientError() bool { return true } // IsServerError returns true when this account mute not acceptable response has a 5xx status code func (o *AccountMuteNotAcceptable) IsServerError() bool { return false } // IsCode returns true when this account mute not acceptable response a status code equal to that given func (o *AccountMuteNotAcceptable) IsCode(code int) bool { return code == 406 } // Code gets the status code for the account mute not acceptable response func (o *AccountMuteNotAcceptable) Code() int { return 406 } func (o *AccountMuteNotAcceptable) Error() string { return fmt.Sprintf("[POST /api/v1/accounts/{id}/mute][%d] accountMuteNotAcceptable", 406) } func (o *AccountMuteNotAcceptable) String() string { return fmt.Sprintf("[POST /api/v1/accounts/{id}/mute][%d] accountMuteNotAcceptable", 406) } func (o *AccountMuteNotAcceptable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewAccountMuteInternalServerError creates a AccountMuteInternalServerError with default headers values func NewAccountMuteInternalServerError() *AccountMuteInternalServerError { return &AccountMuteInternalServerError{} } /* AccountMuteInternalServerError describes a response with status code 500, with default header values. internal server error */ type AccountMuteInternalServerError struct { } // IsSuccess returns true when this account mute internal server error response has a 2xx status code func (o *AccountMuteInternalServerError) IsSuccess() bool { return false } // IsRedirect returns true when this account mute internal server error response has a 3xx status code func (o *AccountMuteInternalServerError) IsRedirect() bool { return false } // IsClientError returns true when this account mute internal server error response has a 4xx status code func (o *AccountMuteInternalServerError) IsClientError() bool { return false } // IsServerError returns true when this account mute internal server error response has a 5xx status code func (o *AccountMuteInternalServerError) IsServerError() bool { return true } // IsCode returns true when this account mute internal server error response a status code equal to that given func (o *AccountMuteInternalServerError) IsCode(code int) bool { return code == 500 } // Code gets the status code for the account mute internal server error response func (o *AccountMuteInternalServerError) Code() int { return 500 } func (o *AccountMuteInternalServerError) Error() string { return fmt.Sprintf("[POST /api/v1/accounts/{id}/mute][%d] accountMuteInternalServerError", 500) } func (o *AccountMuteInternalServerError) String() string { return fmt.Sprintf("[POST /api/v1/accounts/{id}/mute][%d] accountMuteInternalServerError", 500) } func (o *AccountMuteInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil }