github.com/weaviate/weaviate@v1.24.6/adapters/handlers/rest/operations/backups/backups_create_status_responses.go (about)

     1  //                           _       _
     2  // __      _____  __ ___   ___  __ _| |_ ___
     3  // \ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \
     4  //  \ V  V /  __/ (_| |\ V /| | (_| | ||  __/
     5  //   \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___|
     6  //
     7  //  Copyright © 2016 - 2024 Weaviate B.V. All rights reserved.
     8  //
     9  //  CONTACT: hello@weaviate.io
    10  //
    11  
    12  // Code generated by go-swagger; DO NOT EDIT.
    13  
    14  package backups
    15  
    16  // This file was generated by the swagger tool.
    17  // Editing this file might prove futile when you re-run the swagger generate command
    18  
    19  import (
    20  	"net/http"
    21  
    22  	"github.com/go-openapi/runtime"
    23  
    24  	"github.com/weaviate/weaviate/entities/models"
    25  )
    26  
    27  // BackupsCreateStatusOKCode is the HTTP code returned for type BackupsCreateStatusOK
    28  const BackupsCreateStatusOKCode int = 200
    29  
    30  /*
    31  BackupsCreateStatusOK Backup creation status successfully returned
    32  
    33  swagger:response backupsCreateStatusOK
    34  */
    35  type BackupsCreateStatusOK struct {
    36  
    37  	/*
    38  	  In: Body
    39  	*/
    40  	Payload *models.BackupCreateStatusResponse `json:"body,omitempty"`
    41  }
    42  
    43  // NewBackupsCreateStatusOK creates BackupsCreateStatusOK with default headers values
    44  func NewBackupsCreateStatusOK() *BackupsCreateStatusOK {
    45  
    46  	return &BackupsCreateStatusOK{}
    47  }
    48  
    49  // WithPayload adds the payload to the backups create status o k response
    50  func (o *BackupsCreateStatusOK) WithPayload(payload *models.BackupCreateStatusResponse) *BackupsCreateStatusOK {
    51  	o.Payload = payload
    52  	return o
    53  }
    54  
    55  // SetPayload sets the payload to the backups create status o k response
    56  func (o *BackupsCreateStatusOK) SetPayload(payload *models.BackupCreateStatusResponse) {
    57  	o.Payload = payload
    58  }
    59  
    60  // WriteResponse to the client
    61  func (o *BackupsCreateStatusOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
    62  
    63  	rw.WriteHeader(200)
    64  	if o.Payload != nil {
    65  		payload := o.Payload
    66  		if err := producer.Produce(rw, payload); err != nil {
    67  			panic(err) // let the recovery middleware deal with this
    68  		}
    69  	}
    70  }
    71  
    72  // BackupsCreateStatusUnauthorizedCode is the HTTP code returned for type BackupsCreateStatusUnauthorized
    73  const BackupsCreateStatusUnauthorizedCode int = 401
    74  
    75  /*
    76  BackupsCreateStatusUnauthorized Unauthorized or invalid credentials.
    77  
    78  swagger:response backupsCreateStatusUnauthorized
    79  */
    80  type BackupsCreateStatusUnauthorized struct {
    81  }
    82  
    83  // NewBackupsCreateStatusUnauthorized creates BackupsCreateStatusUnauthorized with default headers values
    84  func NewBackupsCreateStatusUnauthorized() *BackupsCreateStatusUnauthorized {
    85  
    86  	return &BackupsCreateStatusUnauthorized{}
    87  }
    88  
    89  // WriteResponse to the client
    90  func (o *BackupsCreateStatusUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
    91  
    92  	rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
    93  
    94  	rw.WriteHeader(401)
    95  }
    96  
    97  // BackupsCreateStatusForbiddenCode is the HTTP code returned for type BackupsCreateStatusForbidden
    98  const BackupsCreateStatusForbiddenCode int = 403
    99  
   100  /*
   101  BackupsCreateStatusForbidden Forbidden
   102  
   103  swagger:response backupsCreateStatusForbidden
   104  */
   105  type BackupsCreateStatusForbidden struct {
   106  
   107  	/*
   108  	  In: Body
   109  	*/
   110  	Payload *models.ErrorResponse `json:"body,omitempty"`
   111  }
   112  
   113  // NewBackupsCreateStatusForbidden creates BackupsCreateStatusForbidden with default headers values
   114  func NewBackupsCreateStatusForbidden() *BackupsCreateStatusForbidden {
   115  
   116  	return &BackupsCreateStatusForbidden{}
   117  }
   118  
   119  // WithPayload adds the payload to the backups create status forbidden response
   120  func (o *BackupsCreateStatusForbidden) WithPayload(payload *models.ErrorResponse) *BackupsCreateStatusForbidden {
   121  	o.Payload = payload
   122  	return o
   123  }
   124  
   125  // SetPayload sets the payload to the backups create status forbidden response
   126  func (o *BackupsCreateStatusForbidden) SetPayload(payload *models.ErrorResponse) {
   127  	o.Payload = payload
   128  }
   129  
   130  // WriteResponse to the client
   131  func (o *BackupsCreateStatusForbidden) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
   132  
   133  	rw.WriteHeader(403)
   134  	if o.Payload != nil {
   135  		payload := o.Payload
   136  		if err := producer.Produce(rw, payload); err != nil {
   137  			panic(err) // let the recovery middleware deal with this
   138  		}
   139  	}
   140  }
   141  
   142  // BackupsCreateStatusNotFoundCode is the HTTP code returned for type BackupsCreateStatusNotFound
   143  const BackupsCreateStatusNotFoundCode int = 404
   144  
   145  /*
   146  BackupsCreateStatusNotFound Not Found - Backup does not exist
   147  
   148  swagger:response backupsCreateStatusNotFound
   149  */
   150  type BackupsCreateStatusNotFound struct {
   151  
   152  	/*
   153  	  In: Body
   154  	*/
   155  	Payload *models.ErrorResponse `json:"body,omitempty"`
   156  }
   157  
   158  // NewBackupsCreateStatusNotFound creates BackupsCreateStatusNotFound with default headers values
   159  func NewBackupsCreateStatusNotFound() *BackupsCreateStatusNotFound {
   160  
   161  	return &BackupsCreateStatusNotFound{}
   162  }
   163  
   164  // WithPayload adds the payload to the backups create status not found response
   165  func (o *BackupsCreateStatusNotFound) WithPayload(payload *models.ErrorResponse) *BackupsCreateStatusNotFound {
   166  	o.Payload = payload
   167  	return o
   168  }
   169  
   170  // SetPayload sets the payload to the backups create status not found response
   171  func (o *BackupsCreateStatusNotFound) SetPayload(payload *models.ErrorResponse) {
   172  	o.Payload = payload
   173  }
   174  
   175  // WriteResponse to the client
   176  func (o *BackupsCreateStatusNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
   177  
   178  	rw.WriteHeader(404)
   179  	if o.Payload != nil {
   180  		payload := o.Payload
   181  		if err := producer.Produce(rw, payload); err != nil {
   182  			panic(err) // let the recovery middleware deal with this
   183  		}
   184  	}
   185  }
   186  
   187  // BackupsCreateStatusUnprocessableEntityCode is the HTTP code returned for type BackupsCreateStatusUnprocessableEntity
   188  const BackupsCreateStatusUnprocessableEntityCode int = 422
   189  
   190  /*
   191  BackupsCreateStatusUnprocessableEntity Invalid backup restoration status attempt.
   192  
   193  swagger:response backupsCreateStatusUnprocessableEntity
   194  */
   195  type BackupsCreateStatusUnprocessableEntity struct {
   196  
   197  	/*
   198  	  In: Body
   199  	*/
   200  	Payload *models.ErrorResponse `json:"body,omitempty"`
   201  }
   202  
   203  // NewBackupsCreateStatusUnprocessableEntity creates BackupsCreateStatusUnprocessableEntity with default headers values
   204  func NewBackupsCreateStatusUnprocessableEntity() *BackupsCreateStatusUnprocessableEntity {
   205  
   206  	return &BackupsCreateStatusUnprocessableEntity{}
   207  }
   208  
   209  // WithPayload adds the payload to the backups create status unprocessable entity response
   210  func (o *BackupsCreateStatusUnprocessableEntity) WithPayload(payload *models.ErrorResponse) *BackupsCreateStatusUnprocessableEntity {
   211  	o.Payload = payload
   212  	return o
   213  }
   214  
   215  // SetPayload sets the payload to the backups create status unprocessable entity response
   216  func (o *BackupsCreateStatusUnprocessableEntity) SetPayload(payload *models.ErrorResponse) {
   217  	o.Payload = payload
   218  }
   219  
   220  // WriteResponse to the client
   221  func (o *BackupsCreateStatusUnprocessableEntity) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
   222  
   223  	rw.WriteHeader(422)
   224  	if o.Payload != nil {
   225  		payload := o.Payload
   226  		if err := producer.Produce(rw, payload); err != nil {
   227  			panic(err) // let the recovery middleware deal with this
   228  		}
   229  	}
   230  }
   231  
   232  // BackupsCreateStatusInternalServerErrorCode is the HTTP code returned for type BackupsCreateStatusInternalServerError
   233  const BackupsCreateStatusInternalServerErrorCode int = 500
   234  
   235  /*
   236  BackupsCreateStatusInternalServerError An error has occurred while trying to fulfill the request. Most likely the ErrorResponse will contain more information about the error.
   237  
   238  swagger:response backupsCreateStatusInternalServerError
   239  */
   240  type BackupsCreateStatusInternalServerError struct {
   241  
   242  	/*
   243  	  In: Body
   244  	*/
   245  	Payload *models.ErrorResponse `json:"body,omitempty"`
   246  }
   247  
   248  // NewBackupsCreateStatusInternalServerError creates BackupsCreateStatusInternalServerError with default headers values
   249  func NewBackupsCreateStatusInternalServerError() *BackupsCreateStatusInternalServerError {
   250  
   251  	return &BackupsCreateStatusInternalServerError{}
   252  }
   253  
   254  // WithPayload adds the payload to the backups create status internal server error response
   255  func (o *BackupsCreateStatusInternalServerError) WithPayload(payload *models.ErrorResponse) *BackupsCreateStatusInternalServerError {
   256  	o.Payload = payload
   257  	return o
   258  }
   259  
   260  // SetPayload sets the payload to the backups create status internal server error response
   261  func (o *BackupsCreateStatusInternalServerError) SetPayload(payload *models.ErrorResponse) {
   262  	o.Payload = payload
   263  }
   264  
   265  // WriteResponse to the client
   266  func (o *BackupsCreateStatusInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
   267  
   268  	rw.WriteHeader(500)
   269  	if o.Payload != nil {
   270  		payload := o.Payload
   271  		if err := producer.Produce(rw, payload); err != nil {
   272  			panic(err) // let the recovery middleware deal with this
   273  		}
   274  	}
   275  }