// Code generated by go-swagger; DO NOT EDIT. package apps // 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" ) // AppCreateReader is a Reader for the AppCreate structure. type AppCreateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *AppCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewAppCreateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 400: result := NewAppCreateBadRequest() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 401: result := NewAppCreateUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 403: result := NewAppCreateForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 404: result := NewAppCreateNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 406: result := NewAppCreateNotAcceptable() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 500: result := NewAppCreateInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result default: return nil, runtime.NewAPIError("[POST /api/v1/apps] appCreate", response, response.Code()) } } // NewAppCreateOK creates a AppCreateOK with default headers values func NewAppCreateOK() *AppCreateOK { return &AppCreateOK{} } /* AppCreateOK describes a response with status code 200, with default header values. The newly-created application. */ type AppCreateOK struct { Payload *models.Application } // IsSuccess returns true when this app create o k response has a 2xx status code func (o *AppCreateOK) IsSuccess() bool { return true } // IsRedirect returns true when this app create o k response has a 3xx status code func (o *AppCreateOK) IsRedirect() bool { return false } // IsClientError returns true when this app create o k response has a 4xx status code func (o *AppCreateOK) IsClientError() bool { return false } // IsServerError returns true when this app create o k response has a 5xx status code func (o *AppCreateOK) IsServerError() bool { return false } // IsCode returns true when this app create o k response a status code equal to that given func (o *AppCreateOK) IsCode(code int) bool { return code == 200 } // Code gets the status code for the app create o k response func (o *AppCreateOK) Code() int { return 200 } func (o *AppCreateOK) Error() string { payload, _ := json.Marshal(o.Payload) return fmt.Sprintf("[POST /api/v1/apps][%d] appCreateOK %s", 200, payload) } func (o *AppCreateOK) String() string { payload, _ := json.Marshal(o.Payload) return fmt.Sprintf("[POST /api/v1/apps][%d] appCreateOK %s", 200, payload) } func (o *AppCreateOK) GetPayload() *models.Application { return o.Payload } func (o *AppCreateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Application) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewAppCreateBadRequest creates a AppCreateBadRequest with default headers values func NewAppCreateBadRequest() *AppCreateBadRequest { return &AppCreateBadRequest{} } /* AppCreateBadRequest describes a response with status code 400, with default header values. bad request */ type AppCreateBadRequest struct { } // IsSuccess returns true when this app create bad request response has a 2xx status code func (o *AppCreateBadRequest) IsSuccess() bool { return false } // IsRedirect returns true when this app create bad request response has a 3xx status code func (o *AppCreateBadRequest) IsRedirect() bool { return false } // IsClientError returns true when this app create bad request response has a 4xx status code func (o *AppCreateBadRequest) IsClientError() bool { return true } // IsServerError returns true when this app create bad request response has a 5xx status code func (o *AppCreateBadRequest) IsServerError() bool { return false } // IsCode returns true when this app create bad request response a status code equal to that given func (o *AppCreateBadRequest) IsCode(code int) bool { return code == 400 } // Code gets the status code for the app create bad request response func (o *AppCreateBadRequest) Code() int { return 400 } func (o *AppCreateBadRequest) Error() string { return fmt.Sprintf("[POST /api/v1/apps][%d] appCreateBadRequest", 400) } func (o *AppCreateBadRequest) String() string { return fmt.Sprintf("[POST /api/v1/apps][%d] appCreateBadRequest", 400) } func (o *AppCreateBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewAppCreateUnauthorized creates a AppCreateUnauthorized with default headers values func NewAppCreateUnauthorized() *AppCreateUnauthorized { return &AppCreateUnauthorized{} } /* AppCreateUnauthorized describes a response with status code 401, with default header values. unauthorized */ type AppCreateUnauthorized struct { } // IsSuccess returns true when this app create unauthorized response has a 2xx status code func (o *AppCreateUnauthorized) IsSuccess() bool { return false } // IsRedirect returns true when this app create unauthorized response has a 3xx status code func (o *AppCreateUnauthorized) IsRedirect() bool { return false } // IsClientError returns true when this app create unauthorized response has a 4xx status code func (o *AppCreateUnauthorized) IsClientError() bool { return true } // IsServerError returns true when this app create unauthorized response has a 5xx status code func (o *AppCreateUnauthorized) IsServerError() bool { return false } // IsCode returns true when this app create unauthorized response a status code equal to that given func (o *AppCreateUnauthorized) IsCode(code int) bool { return code == 401 } // Code gets the status code for the app create unauthorized response func (o *AppCreateUnauthorized) Code() int { return 401 } func (o *AppCreateUnauthorized) Error() string { return fmt.Sprintf("[POST /api/v1/apps][%d] appCreateUnauthorized", 401) } func (o *AppCreateUnauthorized) String() string { return fmt.Sprintf("[POST /api/v1/apps][%d] appCreateUnauthorized", 401) } func (o *AppCreateUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewAppCreateForbidden creates a AppCreateForbidden with default headers values func NewAppCreateForbidden() *AppCreateForbidden { return &AppCreateForbidden{} } /* AppCreateForbidden describes a response with status code 403, with default header values. forbidden */ type AppCreateForbidden struct { } // IsSuccess returns true when this app create forbidden response has a 2xx status code func (o *AppCreateForbidden) IsSuccess() bool { return false } // IsRedirect returns true when this app create forbidden response has a 3xx status code func (o *AppCreateForbidden) IsRedirect() bool { return false } // IsClientError returns true when this app create forbidden response has a 4xx status code func (o *AppCreateForbidden) IsClientError() bool { return true } // IsServerError returns true when this app create forbidden response has a 5xx status code func (o *AppCreateForbidden) IsServerError() bool { return false } // IsCode returns true when this app create forbidden response a status code equal to that given func (o *AppCreateForbidden) IsCode(code int) bool { return code == 403 } // Code gets the status code for the app create forbidden response func (o *AppCreateForbidden) Code() int { return 403 } func (o *AppCreateForbidden) Error() string { return fmt.Sprintf("[POST /api/v1/apps][%d] appCreateForbidden", 403) } func (o *AppCreateForbidden) String() string { return fmt.Sprintf("[POST /api/v1/apps][%d] appCreateForbidden", 403) } func (o *AppCreateForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewAppCreateNotFound creates a AppCreateNotFound with default headers values func NewAppCreateNotFound() *AppCreateNotFound { return &AppCreateNotFound{} } /* AppCreateNotFound describes a response with status code 404, with default header values. not found */ type AppCreateNotFound struct { } // IsSuccess returns true when this app create not found response has a 2xx status code func (o *AppCreateNotFound) IsSuccess() bool { return false } // IsRedirect returns true when this app create not found response has a 3xx status code func (o *AppCreateNotFound) IsRedirect() bool { return false } // IsClientError returns true when this app create not found response has a 4xx status code func (o *AppCreateNotFound) IsClientError() bool { return true } // IsServerError returns true when this app create not found response has a 5xx status code func (o *AppCreateNotFound) IsServerError() bool { return false } // IsCode returns true when this app create not found response a status code equal to that given func (o *AppCreateNotFound) IsCode(code int) bool { return code == 404 } // Code gets the status code for the app create not found response func (o *AppCreateNotFound) Code() int { return 404 } func (o *AppCreateNotFound) Error() string { return fmt.Sprintf("[POST /api/v1/apps][%d] appCreateNotFound", 404) } func (o *AppCreateNotFound) String() string { return fmt.Sprintf("[POST /api/v1/apps][%d] appCreateNotFound", 404) } func (o *AppCreateNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewAppCreateNotAcceptable creates a AppCreateNotAcceptable with default headers values func NewAppCreateNotAcceptable() *AppCreateNotAcceptable { return &AppCreateNotAcceptable{} } /* AppCreateNotAcceptable describes a response with status code 406, with default header values. not acceptable */ type AppCreateNotAcceptable struct { } // IsSuccess returns true when this app create not acceptable response has a 2xx status code func (o *AppCreateNotAcceptable) IsSuccess() bool { return false } // IsRedirect returns true when this app create not acceptable response has a 3xx status code func (o *AppCreateNotAcceptable) IsRedirect() bool { return false } // IsClientError returns true when this app create not acceptable response has a 4xx status code func (o *AppCreateNotAcceptable) IsClientError() bool { return true } // IsServerError returns true when this app create not acceptable response has a 5xx status code func (o *AppCreateNotAcceptable) IsServerError() bool { return false } // IsCode returns true when this app create not acceptable response a status code equal to that given func (o *AppCreateNotAcceptable) IsCode(code int) bool { return code == 406 } // Code gets the status code for the app create not acceptable response func (o *AppCreateNotAcceptable) Code() int { return 406 } func (o *AppCreateNotAcceptable) Error() string { return fmt.Sprintf("[POST /api/v1/apps][%d] appCreateNotAcceptable", 406) } func (o *AppCreateNotAcceptable) String() string { return fmt.Sprintf("[POST /api/v1/apps][%d] appCreateNotAcceptable", 406) } func (o *AppCreateNotAcceptable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewAppCreateInternalServerError creates a AppCreateInternalServerError with default headers values func NewAppCreateInternalServerError() *AppCreateInternalServerError { return &AppCreateInternalServerError{} } /* AppCreateInternalServerError describes a response with status code 500, with default header values. internal server error */ type AppCreateInternalServerError struct { } // IsSuccess returns true when this app create internal server error response has a 2xx status code func (o *AppCreateInternalServerError) IsSuccess() bool { return false } // IsRedirect returns true when this app create internal server error response has a 3xx status code func (o *AppCreateInternalServerError) IsRedirect() bool { return false } // IsClientError returns true when this app create internal server error response has a 4xx status code func (o *AppCreateInternalServerError) IsClientError() bool { return false } // IsServerError returns true when this app create internal server error response has a 5xx status code func (o *AppCreateInternalServerError) IsServerError() bool { return true } // IsCode returns true when this app create internal server error response a status code equal to that given func (o *AppCreateInternalServerError) IsCode(code int) bool { return code == 500 } // Code gets the status code for the app create internal server error response func (o *AppCreateInternalServerError) Code() int { return 500 } func (o *AppCreateInternalServerError) Error() string { return fmt.Sprintf("[POST /api/v1/apps][%d] appCreateInternalServerError", 500) } func (o *AppCreateInternalServerError) String() string { return fmt.Sprintf("[POST /api/v1/apps][%d] appCreateInternalServerError", 500) } func (o *AppCreateInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil }