github.com/thetreep/go-swagger@v0.0.0-20240223100711-35af64f14f01/examples/generated/restapi/operations/user/create_users_with_array_input_responses.go (about)

     1  // Code generated by go-swagger; DO NOT EDIT.
     2  
     3  package user
     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  
    14  /*
    15  CreateUsersWithArrayInputDefault successful operation
    16  
    17  swagger:response createUsersWithArrayInputDefault
    18  */
    19  type CreateUsersWithArrayInputDefault struct {
    20  	_statusCode int
    21  }
    22  
    23  // NewCreateUsersWithArrayInputDefault creates CreateUsersWithArrayInputDefault with default headers values
    24  func NewCreateUsersWithArrayInputDefault(code int) *CreateUsersWithArrayInputDefault {
    25  	if code <= 0 {
    26  		code = 500
    27  	}
    28  
    29  	return &CreateUsersWithArrayInputDefault{
    30  		_statusCode: code,
    31  	}
    32  }
    33  
    34  // WithStatusCode adds the status to the create users with array input default response
    35  func (o *CreateUsersWithArrayInputDefault) WithStatusCode(code int) *CreateUsersWithArrayInputDefault {
    36  	o._statusCode = code
    37  	return o
    38  }
    39  
    40  // SetStatusCode sets the status to the create users with array input default response
    41  func (o *CreateUsersWithArrayInputDefault) SetStatusCode(code int) {
    42  	o._statusCode = code
    43  }
    44  
    45  // WriteResponse to the client
    46  func (o *CreateUsersWithArrayInputDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
    47  
    48  	rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
    49  
    50  	rw.WriteHeader(o._statusCode)
    51  }