github.com/kubearmor/cilium@v1.6.12/api/v1/server/restapi/service/put_service_id_responses.go (about)

     1  // Code generated by go-swagger; DO NOT EDIT.
     2  
     3  package service
     4  
     5  // This file was generated by the swagger tool.
     6  // Editing this file might prove futile when you re-run the swagger generate command
     7  
     8  import (
     9  	"net/http"
    10  
    11  	"github.com/go-openapi/runtime"
    12  
    13  	models "github.com/cilium/cilium/api/v1/models"
    14  )
    15  
    16  // PutServiceIDOKCode is the HTTP code returned for type PutServiceIDOK
    17  const PutServiceIDOKCode int = 200
    18  
    19  /*PutServiceIDOK Updated
    20  
    21  swagger:response putServiceIdOK
    22  */
    23  type PutServiceIDOK struct {
    24  }
    25  
    26  // NewPutServiceIDOK creates PutServiceIDOK with default headers values
    27  func NewPutServiceIDOK() *PutServiceIDOK {
    28  
    29  	return &PutServiceIDOK{}
    30  }
    31  
    32  // WriteResponse to the client
    33  func (o *PutServiceIDOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
    34  
    35  	rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
    36  
    37  	rw.WriteHeader(200)
    38  }
    39  
    40  // PutServiceIDCreatedCode is the HTTP code returned for type PutServiceIDCreated
    41  const PutServiceIDCreatedCode int = 201
    42  
    43  /*PutServiceIDCreated Created
    44  
    45  swagger:response putServiceIdCreated
    46  */
    47  type PutServiceIDCreated struct {
    48  }
    49  
    50  // NewPutServiceIDCreated creates PutServiceIDCreated with default headers values
    51  func NewPutServiceIDCreated() *PutServiceIDCreated {
    52  
    53  	return &PutServiceIDCreated{}
    54  }
    55  
    56  // WriteResponse to the client
    57  func (o *PutServiceIDCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
    58  
    59  	rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
    60  
    61  	rw.WriteHeader(201)
    62  }
    63  
    64  // PutServiceIDInvalidFrontendCode is the HTTP code returned for type PutServiceIDInvalidFrontend
    65  const PutServiceIDInvalidFrontendCode int = 460
    66  
    67  /*PutServiceIDInvalidFrontend Invalid frontend in service configuration
    68  
    69  swagger:response putServiceIdInvalidFrontend
    70  */
    71  type PutServiceIDInvalidFrontend struct {
    72  
    73  	/*
    74  	  In: Body
    75  	*/
    76  	Payload models.Error `json:"body,omitempty"`
    77  }
    78  
    79  // NewPutServiceIDInvalidFrontend creates PutServiceIDInvalidFrontend with default headers values
    80  func NewPutServiceIDInvalidFrontend() *PutServiceIDInvalidFrontend {
    81  
    82  	return &PutServiceIDInvalidFrontend{}
    83  }
    84  
    85  // WithPayload adds the payload to the put service Id invalid frontend response
    86  func (o *PutServiceIDInvalidFrontend) WithPayload(payload models.Error) *PutServiceIDInvalidFrontend {
    87  	o.Payload = payload
    88  	return o
    89  }
    90  
    91  // SetPayload sets the payload to the put service Id invalid frontend response
    92  func (o *PutServiceIDInvalidFrontend) SetPayload(payload models.Error) {
    93  	o.Payload = payload
    94  }
    95  
    96  // WriteResponse to the client
    97  func (o *PutServiceIDInvalidFrontend) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
    98  
    99  	rw.WriteHeader(460)
   100  	payload := o.Payload
   101  	if err := producer.Produce(rw, payload); err != nil {
   102  		panic(err) // let the recovery middleware deal with this
   103  	}
   104  }
   105  
   106  // PutServiceIDInvalidBackendCode is the HTTP code returned for type PutServiceIDInvalidBackend
   107  const PutServiceIDInvalidBackendCode int = 461
   108  
   109  /*PutServiceIDInvalidBackend Invalid backend in service configuration
   110  
   111  swagger:response putServiceIdInvalidBackend
   112  */
   113  type PutServiceIDInvalidBackend struct {
   114  
   115  	/*
   116  	  In: Body
   117  	*/
   118  	Payload models.Error `json:"body,omitempty"`
   119  }
   120  
   121  // NewPutServiceIDInvalidBackend creates PutServiceIDInvalidBackend with default headers values
   122  func NewPutServiceIDInvalidBackend() *PutServiceIDInvalidBackend {
   123  
   124  	return &PutServiceIDInvalidBackend{}
   125  }
   126  
   127  // WithPayload adds the payload to the put service Id invalid backend response
   128  func (o *PutServiceIDInvalidBackend) WithPayload(payload models.Error) *PutServiceIDInvalidBackend {
   129  	o.Payload = payload
   130  	return o
   131  }
   132  
   133  // SetPayload sets the payload to the put service Id invalid backend response
   134  func (o *PutServiceIDInvalidBackend) SetPayload(payload models.Error) {
   135  	o.Payload = payload
   136  }
   137  
   138  // WriteResponse to the client
   139  func (o *PutServiceIDInvalidBackend) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
   140  
   141  	rw.WriteHeader(461)
   142  	payload := o.Payload
   143  	if err := producer.Produce(rw, payload); err != nil {
   144  		panic(err) // let the recovery middleware deal with this
   145  	}
   146  }
   147  
   148  // PutServiceIDFailureCode is the HTTP code returned for type PutServiceIDFailure
   149  const PutServiceIDFailureCode int = 500
   150  
   151  /*PutServiceIDFailure Error while creating service
   152  
   153  swagger:response putServiceIdFailure
   154  */
   155  type PutServiceIDFailure struct {
   156  
   157  	/*
   158  	  In: Body
   159  	*/
   160  	Payload models.Error `json:"body,omitempty"`
   161  }
   162  
   163  // NewPutServiceIDFailure creates PutServiceIDFailure with default headers values
   164  func NewPutServiceIDFailure() *PutServiceIDFailure {
   165  
   166  	return &PutServiceIDFailure{}
   167  }
   168  
   169  // WithPayload adds the payload to the put service Id failure response
   170  func (o *PutServiceIDFailure) WithPayload(payload models.Error) *PutServiceIDFailure {
   171  	o.Payload = payload
   172  	return o
   173  }
   174  
   175  // SetPayload sets the payload to the put service Id failure response
   176  func (o *PutServiceIDFailure) SetPayload(payload models.Error) {
   177  	o.Payload = payload
   178  }
   179  
   180  // WriteResponse to the client
   181  func (o *PutServiceIDFailure) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
   182  
   183  	rw.WriteHeader(500)
   184  	payload := o.Payload
   185  	if err := producer.Produce(rw, payload); err != nil {
   186  		panic(err) // let the recovery middleware deal with this
   187  	}
   188  }