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

     1  // Code generated by go-swagger; DO NOT EDIT.
     2  
     3  package policy
     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  // GetIdentityIDOKCode is the HTTP code returned for type GetIdentityIDOK
    17  const GetIdentityIDOKCode int = 200
    18  
    19  /*GetIdentityIDOK Success
    20  
    21  swagger:response getIdentityIdOK
    22  */
    23  type GetIdentityIDOK struct {
    24  
    25  	/*
    26  	  In: Body
    27  	*/
    28  	Payload *models.Identity `json:"body,omitempty"`
    29  }
    30  
    31  // NewGetIdentityIDOK creates GetIdentityIDOK with default headers values
    32  func NewGetIdentityIDOK() *GetIdentityIDOK {
    33  
    34  	return &GetIdentityIDOK{}
    35  }
    36  
    37  // WithPayload adds the payload to the get identity Id o k response
    38  func (o *GetIdentityIDOK) WithPayload(payload *models.Identity) *GetIdentityIDOK {
    39  	o.Payload = payload
    40  	return o
    41  }
    42  
    43  // SetPayload sets the payload to the get identity Id o k response
    44  func (o *GetIdentityIDOK) SetPayload(payload *models.Identity) {
    45  	o.Payload = payload
    46  }
    47  
    48  // WriteResponse to the client
    49  func (o *GetIdentityIDOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
    50  
    51  	rw.WriteHeader(200)
    52  	if o.Payload != nil {
    53  		payload := o.Payload
    54  		if err := producer.Produce(rw, payload); err != nil {
    55  			panic(err) // let the recovery middleware deal with this
    56  		}
    57  	}
    58  }
    59  
    60  // GetIdentityIDBadRequestCode is the HTTP code returned for type GetIdentityIDBadRequest
    61  const GetIdentityIDBadRequestCode int = 400
    62  
    63  /*GetIdentityIDBadRequest Invalid identity provided
    64  
    65  swagger:response getIdentityIdBadRequest
    66  */
    67  type GetIdentityIDBadRequest struct {
    68  }
    69  
    70  // NewGetIdentityIDBadRequest creates GetIdentityIDBadRequest with default headers values
    71  func NewGetIdentityIDBadRequest() *GetIdentityIDBadRequest {
    72  
    73  	return &GetIdentityIDBadRequest{}
    74  }
    75  
    76  // WriteResponse to the client
    77  func (o *GetIdentityIDBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
    78  
    79  	rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
    80  
    81  	rw.WriteHeader(400)
    82  }
    83  
    84  // GetIdentityIDNotFoundCode is the HTTP code returned for type GetIdentityIDNotFound
    85  const GetIdentityIDNotFoundCode int = 404
    86  
    87  /*GetIdentityIDNotFound Identity not found
    88  
    89  swagger:response getIdentityIdNotFound
    90  */
    91  type GetIdentityIDNotFound struct {
    92  }
    93  
    94  // NewGetIdentityIDNotFound creates GetIdentityIDNotFound with default headers values
    95  func NewGetIdentityIDNotFound() *GetIdentityIDNotFound {
    96  
    97  	return &GetIdentityIDNotFound{}
    98  }
    99  
   100  // WriteResponse to the client
   101  func (o *GetIdentityIDNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
   102  
   103  	rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
   104  
   105  	rw.WriteHeader(404)
   106  }
   107  
   108  // GetIdentityIDUnreachableCode is the HTTP code returned for type GetIdentityIDUnreachable
   109  const GetIdentityIDUnreachableCode int = 520
   110  
   111  /*GetIdentityIDUnreachable Identity storage unreachable. Likely a network problem.
   112  
   113  swagger:response getIdentityIdUnreachable
   114  */
   115  type GetIdentityIDUnreachable struct {
   116  
   117  	/*
   118  	  In: Body
   119  	*/
   120  	Payload models.Error `json:"body,omitempty"`
   121  }
   122  
   123  // NewGetIdentityIDUnreachable creates GetIdentityIDUnreachable with default headers values
   124  func NewGetIdentityIDUnreachable() *GetIdentityIDUnreachable {
   125  
   126  	return &GetIdentityIDUnreachable{}
   127  }
   128  
   129  // WithPayload adds the payload to the get identity Id unreachable response
   130  func (o *GetIdentityIDUnreachable) WithPayload(payload models.Error) *GetIdentityIDUnreachable {
   131  	o.Payload = payload
   132  	return o
   133  }
   134  
   135  // SetPayload sets the payload to the get identity Id unreachable response
   136  func (o *GetIdentityIDUnreachable) SetPayload(payload models.Error) {
   137  	o.Payload = payload
   138  }
   139  
   140  // WriteResponse to the client
   141  func (o *GetIdentityIDUnreachable) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
   142  
   143  	rw.WriteHeader(520)
   144  	payload := o.Payload
   145  	if err := producer.Produce(rw, payload); err != nil {
   146  		panic(err) // let the recovery middleware deal with this
   147  	}
   148  }
   149  
   150  // GetIdentityIDInvalidStorageFormatCode is the HTTP code returned for type GetIdentityIDInvalidStorageFormat
   151  const GetIdentityIDInvalidStorageFormatCode int = 521
   152  
   153  /*GetIdentityIDInvalidStorageFormat Invalid identity format in storage
   154  
   155  swagger:response getIdentityIdInvalidStorageFormat
   156  */
   157  type GetIdentityIDInvalidStorageFormat struct {
   158  
   159  	/*
   160  	  In: Body
   161  	*/
   162  	Payload models.Error `json:"body,omitempty"`
   163  }
   164  
   165  // NewGetIdentityIDInvalidStorageFormat creates GetIdentityIDInvalidStorageFormat with default headers values
   166  func NewGetIdentityIDInvalidStorageFormat() *GetIdentityIDInvalidStorageFormat {
   167  
   168  	return &GetIdentityIDInvalidStorageFormat{}
   169  }
   170  
   171  // WithPayload adds the payload to the get identity Id invalid storage format response
   172  func (o *GetIdentityIDInvalidStorageFormat) WithPayload(payload models.Error) *GetIdentityIDInvalidStorageFormat {
   173  	o.Payload = payload
   174  	return o
   175  }
   176  
   177  // SetPayload sets the payload to the get identity Id invalid storage format response
   178  func (o *GetIdentityIDInvalidStorageFormat) SetPayload(payload models.Error) {
   179  	o.Payload = payload
   180  }
   181  
   182  // WriteResponse to the client
   183  func (o *GetIdentityIDInvalidStorageFormat) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
   184  
   185  	rw.WriteHeader(521)
   186  	payload := o.Payload
   187  	if err := producer.Produce(rw, payload); err != nil {
   188  		panic(err) // let the recovery middleware deal with this
   189  	}
   190  }