2022-07-27 17:35:28 +02:00
// Code generated by go-swagger; DO NOT EDIT.
package tunnel
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
2022-07-27 19:38:35 +02:00
"io"
2022-07-27 17:35:28 +02:00
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
2022-07-27 19:38:35 +02:00
"github.com/openziti-test-kitchen/zrok/rest_model_zrok"
2022-07-27 17:35:28 +02:00
)
// UntunnelReader is a Reader for the Untunnel structure.
type UntunnelReader struct {
formats strfmt . Registry
}
// ReadResponse reads a server response into the received o.
func ( o * UntunnelReader ) ReadResponse ( response runtime . ClientResponse , consumer runtime . Consumer ) ( interface { } , error ) {
switch response . Code ( ) {
case 200 :
result := NewUntunnelOK ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return result , nil
2022-08-01 21:44:26 +02:00
case 404 :
result := NewUntunnelNotFound ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
2022-07-27 17:35:28 +02:00
case 500 :
result := NewUntunnelInternalServerError ( )
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 ( ) )
}
}
// NewUntunnelOK creates a UntunnelOK with default headers values
func NewUntunnelOK ( ) * UntunnelOK {
return & UntunnelOK { }
}
2022-09-01 23:39:02 +02:00
/ *
UntunnelOK describes a response with status code 200 , with default header values .
2022-07-27 17:35:28 +02:00
tunnel removed
* /
type UntunnelOK struct {
}
2022-09-01 23:39:02 +02:00
// IsSuccess returns true when this untunnel o k response has a 2xx status code
func ( o * UntunnelOK ) IsSuccess ( ) bool {
return true
}
// IsRedirect returns true when this untunnel o k response has a 3xx status code
func ( o * UntunnelOK ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this untunnel o k response has a 4xx status code
func ( o * UntunnelOK ) IsClientError ( ) bool {
return false
}
// IsServerError returns true when this untunnel o k response has a 5xx status code
func ( o * UntunnelOK ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this untunnel o k response a status code equal to that given
func ( o * UntunnelOK ) IsCode ( code int ) bool {
return code == 200
}
2022-07-27 17:35:28 +02:00
func ( o * UntunnelOK ) Error ( ) string {
return fmt . Sprintf ( "[DELETE /untunnel][%d] untunnelOK " , 200 )
}
2022-09-01 23:39:02 +02:00
func ( o * UntunnelOK ) String ( ) string {
return fmt . Sprintf ( "[DELETE /untunnel][%d] untunnelOK " , 200 )
}
2022-07-27 17:35:28 +02:00
func ( o * UntunnelOK ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
return nil
}
2022-08-01 21:44:26 +02:00
// NewUntunnelNotFound creates a UntunnelNotFound with default headers values
func NewUntunnelNotFound ( ) * UntunnelNotFound {
return & UntunnelNotFound { }
}
2022-09-01 23:39:02 +02:00
/ *
UntunnelNotFound describes a response with status code 404 , with default header values .
2022-08-01 21:44:26 +02:00
not found
* /
type UntunnelNotFound struct {
Payload rest_model_zrok . ErrorMessage
}
2022-09-01 23:39:02 +02:00
// IsSuccess returns true when this untunnel not found response has a 2xx status code
func ( o * UntunnelNotFound ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this untunnel not found response has a 3xx status code
func ( o * UntunnelNotFound ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this untunnel not found response has a 4xx status code
func ( o * UntunnelNotFound ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this untunnel not found response has a 5xx status code
func ( o * UntunnelNotFound ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this untunnel not found response a status code equal to that given
func ( o * UntunnelNotFound ) IsCode ( code int ) bool {
return code == 404
}
2022-08-01 21:44:26 +02:00
func ( o * UntunnelNotFound ) Error ( ) string {
return fmt . Sprintf ( "[DELETE /untunnel][%d] untunnelNotFound %+v" , 404 , o . Payload )
}
2022-09-01 23:39:02 +02:00
func ( o * UntunnelNotFound ) String ( ) string {
return fmt . Sprintf ( "[DELETE /untunnel][%d] untunnelNotFound %+v" , 404 , o . Payload )
}
2022-08-01 21:44:26 +02:00
func ( o * UntunnelNotFound ) GetPayload ( ) rest_model_zrok . ErrorMessage {
return o . Payload
}
func ( o * UntunnelNotFound ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
// response payload
if err := consumer . Consume ( response . Body ( ) , & o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
2022-07-27 17:35:28 +02:00
// NewUntunnelInternalServerError creates a UntunnelInternalServerError with default headers values
func NewUntunnelInternalServerError ( ) * UntunnelInternalServerError {
return & UntunnelInternalServerError { }
}
2022-09-01 23:39:02 +02:00
/ *
UntunnelInternalServerError describes a response with status code 500 , with default header values .
2022-07-27 17:35:28 +02:00
internal server error
* /
type UntunnelInternalServerError struct {
2022-07-27 19:38:35 +02:00
Payload rest_model_zrok . ErrorMessage
2022-07-27 17:35:28 +02:00
}
2022-09-01 23:39:02 +02:00
// IsSuccess returns true when this untunnel internal server error response has a 2xx status code
func ( o * UntunnelInternalServerError ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this untunnel internal server error response has a 3xx status code
func ( o * UntunnelInternalServerError ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this untunnel internal server error response has a 4xx status code
func ( o * UntunnelInternalServerError ) IsClientError ( ) bool {
return false
}
// IsServerError returns true when this untunnel internal server error response has a 5xx status code
func ( o * UntunnelInternalServerError ) IsServerError ( ) bool {
return true
}
// IsCode returns true when this untunnel internal server error response a status code equal to that given
func ( o * UntunnelInternalServerError ) IsCode ( code int ) bool {
return code == 500
}
2022-07-27 17:35:28 +02:00
func ( o * UntunnelInternalServerError ) Error ( ) string {
2022-07-27 19:38:35 +02:00
return fmt . Sprintf ( "[DELETE /untunnel][%d] untunnelInternalServerError %+v" , 500 , o . Payload )
}
2022-09-01 23:39:02 +02:00
func ( o * UntunnelInternalServerError ) String ( ) string {
return fmt . Sprintf ( "[DELETE /untunnel][%d] untunnelInternalServerError %+v" , 500 , o . Payload )
}
2022-07-27 19:38:35 +02:00
func ( o * UntunnelInternalServerError ) GetPayload ( ) rest_model_zrok . ErrorMessage {
return o . Payload
2022-07-27 17:35:28 +02:00
}
func ( o * UntunnelInternalServerError ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
2022-07-27 19:38:35 +02:00
// response payload
if err := consumer . Consume ( response . Body ( ) , & o . Payload ) ; err != nil && err != io . EOF {
return err
}
2022-07-27 17:35:28 +02:00
return nil
}