// Code generated by go-swagger; DO NOT EDIT. package admin // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "fmt" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // DeleteOrganizationReader is a Reader for the DeleteOrganization structure. type DeleteOrganizationReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *DeleteOrganizationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewDeleteOrganizationOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 401: result := NewDeleteOrganizationUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 404: result := NewDeleteOrganizationNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 500: result := NewDeleteOrganizationInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result default: return nil, runtime.NewAPIError("[DELETE /organization] deleteOrganization", response, response.Code()) } } // NewDeleteOrganizationOK creates a DeleteOrganizationOK with default headers values func NewDeleteOrganizationOK() *DeleteOrganizationOK { return &DeleteOrganizationOK{} } /* DeleteOrganizationOK describes a response with status code 200, with default header values. organization deleted */ type DeleteOrganizationOK struct { } // IsSuccess returns true when this delete organization o k response has a 2xx status code func (o *DeleteOrganizationOK) IsSuccess() bool { return true } // IsRedirect returns true when this delete organization o k response has a 3xx status code func (o *DeleteOrganizationOK) IsRedirect() bool { return false } // IsClientError returns true when this delete organization o k response has a 4xx status code func (o *DeleteOrganizationOK) IsClientError() bool { return false } // IsServerError returns true when this delete organization o k response has a 5xx status code func (o *DeleteOrganizationOK) IsServerError() bool { return false } // IsCode returns true when this delete organization o k response a status code equal to that given func (o *DeleteOrganizationOK) IsCode(code int) bool { return code == 200 } // Code gets the status code for the delete organization o k response func (o *DeleteOrganizationOK) Code() int { return 200 } func (o *DeleteOrganizationOK) Error() string { return fmt.Sprintf("[DELETE /organization][%d] deleteOrganizationOK ", 200) } func (o *DeleteOrganizationOK) String() string { return fmt.Sprintf("[DELETE /organization][%d] deleteOrganizationOK ", 200) } func (o *DeleteOrganizationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewDeleteOrganizationUnauthorized creates a DeleteOrganizationUnauthorized with default headers values func NewDeleteOrganizationUnauthorized() *DeleteOrganizationUnauthorized { return &DeleteOrganizationUnauthorized{} } /* DeleteOrganizationUnauthorized describes a response with status code 401, with default header values. unauthorized */ type DeleteOrganizationUnauthorized struct { } // IsSuccess returns true when this delete organization unauthorized response has a 2xx status code func (o *DeleteOrganizationUnauthorized) IsSuccess() bool { return false } // IsRedirect returns true when this delete organization unauthorized response has a 3xx status code func (o *DeleteOrganizationUnauthorized) IsRedirect() bool { return false } // IsClientError returns true when this delete organization unauthorized response has a 4xx status code func (o *DeleteOrganizationUnauthorized) IsClientError() bool { return true } // IsServerError returns true when this delete organization unauthorized response has a 5xx status code func (o *DeleteOrganizationUnauthorized) IsServerError() bool { return false } // IsCode returns true when this delete organization unauthorized response a status code equal to that given func (o *DeleteOrganizationUnauthorized) IsCode(code int) bool { return code == 401 } // Code gets the status code for the delete organization unauthorized response func (o *DeleteOrganizationUnauthorized) Code() int { return 401 } func (o *DeleteOrganizationUnauthorized) Error() string { return fmt.Sprintf("[DELETE /organization][%d] deleteOrganizationUnauthorized ", 401) } func (o *DeleteOrganizationUnauthorized) String() string { return fmt.Sprintf("[DELETE /organization][%d] deleteOrganizationUnauthorized ", 401) } func (o *DeleteOrganizationUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewDeleteOrganizationNotFound creates a DeleteOrganizationNotFound with default headers values func NewDeleteOrganizationNotFound() *DeleteOrganizationNotFound { return &DeleteOrganizationNotFound{} } /* DeleteOrganizationNotFound describes a response with status code 404, with default header values. organization not found */ type DeleteOrganizationNotFound struct { } // IsSuccess returns true when this delete organization not found response has a 2xx status code func (o *DeleteOrganizationNotFound) IsSuccess() bool { return false } // IsRedirect returns true when this delete organization not found response has a 3xx status code func (o *DeleteOrganizationNotFound) IsRedirect() bool { return false } // IsClientError returns true when this delete organization not found response has a 4xx status code func (o *DeleteOrganizationNotFound) IsClientError() bool { return true } // IsServerError returns true when this delete organization not found response has a 5xx status code func (o *DeleteOrganizationNotFound) IsServerError() bool { return false } // IsCode returns true when this delete organization not found response a status code equal to that given func (o *DeleteOrganizationNotFound) IsCode(code int) bool { return code == 404 } // Code gets the status code for the delete organization not found response func (o *DeleteOrganizationNotFound) Code() int { return 404 } func (o *DeleteOrganizationNotFound) Error() string { return fmt.Sprintf("[DELETE /organization][%d] deleteOrganizationNotFound ", 404) } func (o *DeleteOrganizationNotFound) String() string { return fmt.Sprintf("[DELETE /organization][%d] deleteOrganizationNotFound ", 404) } func (o *DeleteOrganizationNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewDeleteOrganizationInternalServerError creates a DeleteOrganizationInternalServerError with default headers values func NewDeleteOrganizationInternalServerError() *DeleteOrganizationInternalServerError { return &DeleteOrganizationInternalServerError{} } /* DeleteOrganizationInternalServerError describes a response with status code 500, with default header values. internal server error */ type DeleteOrganizationInternalServerError struct { } // IsSuccess returns true when this delete organization internal server error response has a 2xx status code func (o *DeleteOrganizationInternalServerError) IsSuccess() bool { return false } // IsRedirect returns true when this delete organization internal server error response has a 3xx status code func (o *DeleteOrganizationInternalServerError) IsRedirect() bool { return false } // IsClientError returns true when this delete organization internal server error response has a 4xx status code func (o *DeleteOrganizationInternalServerError) IsClientError() bool { return false } // IsServerError returns true when this delete organization internal server error response has a 5xx status code func (o *DeleteOrganizationInternalServerError) IsServerError() bool { return true } // IsCode returns true when this delete organization internal server error response a status code equal to that given func (o *DeleteOrganizationInternalServerError) IsCode(code int) bool { return code == 500 } // Code gets the status code for the delete organization internal server error response func (o *DeleteOrganizationInternalServerError) Code() int { return 500 } func (o *DeleteOrganizationInternalServerError) Error() string { return fmt.Sprintf("[DELETE /organization][%d] deleteOrganizationInternalServerError ", 500) } func (o *DeleteOrganizationInternalServerError) String() string { return fmt.Sprintf("[DELETE /organization][%d] deleteOrganizationInternalServerError ", 500) } func (o *DeleteOrganizationInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } /* DeleteOrganizationBody delete organization body swagger:model DeleteOrganizationBody */ type DeleteOrganizationBody struct { // organization token OrganizationToken string `json:"organizationToken,omitempty"` } // Validate validates this delete organization body func (o *DeleteOrganizationBody) Validate(formats strfmt.Registry) error { return nil } // ContextValidate validates this delete organization body based on context it is used func (o *DeleteOrganizationBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation func (o *DeleteOrganizationBody) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } return swag.WriteJSON(o) } // UnmarshalBinary interface implementation func (o *DeleteOrganizationBody) UnmarshalBinary(b []byte) error { var res DeleteOrganizationBody if err := swag.ReadJSON(b, &res); err != nil { return err } *o = res return nil }