// Code generated by go-swagger; DO NOT EDIT. // // Copyright NetFoundry, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // // __ __ _ // \ \ / / (_) // \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _ // \ \/ \/ / _` | '__| '_ \| | '_ \ / _` | // \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it. // \/ \/ \__,_|_| |_| |_|_|_| |_|\__, | // __/ | // |___/ package session // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "net/http" "github.com/go-openapi/runtime" "github.com/openziti/edge/rest_model" ) // DeleteSessionOKCode is the HTTP code returned for type DeleteSessionOK const DeleteSessionOKCode int = 200 /*DeleteSessionOK The delete request was successful and the resource has been removed swagger:response deleteSessionOK */ type DeleteSessionOK struct { /* In: Body */ Payload *rest_model.Empty `json:"body,omitempty"` } // NewDeleteSessionOK creates DeleteSessionOK with default headers values func NewDeleteSessionOK() *DeleteSessionOK { return &DeleteSessionOK{} } // WithPayload adds the payload to the delete session o k response func (o *DeleteSessionOK) WithPayload(payload *rest_model.Empty) *DeleteSessionOK { o.Payload = payload return o } // SetPayload sets the payload to the delete session o k response func (o *DeleteSessionOK) SetPayload(payload *rest_model.Empty) { o.Payload = payload } // WriteResponse to the client func (o *DeleteSessionOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { rw.WriteHeader(200) if o.Payload != nil { payload := o.Payload if err := producer.Produce(rw, payload); err != nil { panic(err) // let the recovery middleware deal with this } } } // DeleteSessionBadRequestCode is the HTTP code returned for type DeleteSessionBadRequest const DeleteSessionBadRequestCode int = 400 /*DeleteSessionBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information swagger:response deleteSessionBadRequest */ type DeleteSessionBadRequest struct { /* In: Body */ Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"` } // NewDeleteSessionBadRequest creates DeleteSessionBadRequest with default headers values func NewDeleteSessionBadRequest() *DeleteSessionBadRequest { return &DeleteSessionBadRequest{} } // WithPayload adds the payload to the delete session bad request response func (o *DeleteSessionBadRequest) WithPayload(payload *rest_model.APIErrorEnvelope) *DeleteSessionBadRequest { o.Payload = payload return o } // SetPayload sets the payload to the delete session bad request response func (o *DeleteSessionBadRequest) SetPayload(payload *rest_model.APIErrorEnvelope) { o.Payload = payload } // WriteResponse to the client func (o *DeleteSessionBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { rw.WriteHeader(400) if o.Payload != nil { payload := o.Payload if err := producer.Produce(rw, payload); err != nil { panic(err) // let the recovery middleware deal with this } } } // DeleteSessionUnauthorizedCode is the HTTP code returned for type DeleteSessionUnauthorized const DeleteSessionUnauthorizedCode int = 401 /*DeleteSessionUnauthorized The currently supplied session does not have the correct access rights to request this resource swagger:response deleteSessionUnauthorized */ type DeleteSessionUnauthorized struct { /* In: Body */ Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"` } // NewDeleteSessionUnauthorized creates DeleteSessionUnauthorized with default headers values func NewDeleteSessionUnauthorized() *DeleteSessionUnauthorized { return &DeleteSessionUnauthorized{} } // WithPayload adds the payload to the delete session unauthorized response func (o *DeleteSessionUnauthorized) WithPayload(payload *rest_model.APIErrorEnvelope) *DeleteSessionUnauthorized { o.Payload = payload return o } // SetPayload sets the payload to the delete session unauthorized response func (o *DeleteSessionUnauthorized) SetPayload(payload *rest_model.APIErrorEnvelope) { o.Payload = payload } // WriteResponse to the client func (o *DeleteSessionUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { rw.WriteHeader(401) if o.Payload != nil { payload := o.Payload if err := producer.Produce(rw, payload); err != nil { panic(err) // let the recovery middleware deal with this } } } // DeleteSessionConflictCode is the HTTP code returned for type DeleteSessionConflict const DeleteSessionConflictCode int = 409 /*DeleteSessionConflict The resource requested to be removed/altered cannot be as it is referenced by another object. swagger:response deleteSessionConflict */ type DeleteSessionConflict struct { /* In: Body */ Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"` } // NewDeleteSessionConflict creates DeleteSessionConflict with default headers values func NewDeleteSessionConflict() *DeleteSessionConflict { return &DeleteSessionConflict{} } // WithPayload adds the payload to the delete session conflict response func (o *DeleteSessionConflict) WithPayload(payload *rest_model.APIErrorEnvelope) *DeleteSessionConflict { o.Payload = payload return o } // SetPayload sets the payload to the delete session conflict response func (o *DeleteSessionConflict) SetPayload(payload *rest_model.APIErrorEnvelope) { o.Payload = payload } // WriteResponse to the client func (o *DeleteSessionConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { rw.WriteHeader(409) if o.Payload != nil { payload := o.Payload if err := producer.Produce(rw, payload); err != nil { panic(err) // let the recovery middleware deal with this } } }