2022-07-25 17:44:17 +02:00
|
|
|
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
|
|
|
|
package identity
|
|
|
|
|
|
|
|
// 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"
|
|
|
|
|
2022-07-26 21:16:02 +02:00
|
|
|
"github.com/openziti-test-kitchen/zrok/rest_model_zrok"
|
2022-07-25 17:44:17 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
// CreateAccountCreatedCode is the HTTP code returned for type CreateAccountCreated
|
|
|
|
const CreateAccountCreatedCode int = 201
|
|
|
|
|
|
|
|
/*CreateAccountCreated account created
|
|
|
|
|
|
|
|
swagger:response createAccountCreated
|
|
|
|
*/
|
|
|
|
type CreateAccountCreated struct {
|
|
|
|
|
|
|
|
/*
|
|
|
|
In: Body
|
|
|
|
*/
|
2022-07-26 21:16:02 +02:00
|
|
|
Payload *rest_model_zrok.AccountResponse `json:"body,omitempty"`
|
2022-07-25 17:44:17 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewCreateAccountCreated creates CreateAccountCreated with default headers values
|
|
|
|
func NewCreateAccountCreated() *CreateAccountCreated {
|
|
|
|
|
|
|
|
return &CreateAccountCreated{}
|
|
|
|
}
|
|
|
|
|
|
|
|
// WithPayload adds the payload to the create account created response
|
2022-07-26 21:16:02 +02:00
|
|
|
func (o *CreateAccountCreated) WithPayload(payload *rest_model_zrok.AccountResponse) *CreateAccountCreated {
|
2022-07-25 17:44:17 +02:00
|
|
|
o.Payload = payload
|
|
|
|
return o
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetPayload sets the payload to the create account created response
|
2022-07-26 21:16:02 +02:00
|
|
|
func (o *CreateAccountCreated) SetPayload(payload *rest_model_zrok.AccountResponse) {
|
2022-07-25 17:44:17 +02:00
|
|
|
o.Payload = payload
|
|
|
|
}
|
|
|
|
|
|
|
|
// WriteResponse to the client
|
|
|
|
func (o *CreateAccountCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
|
|
|
|
rw.WriteHeader(201)
|
|
|
|
if o.Payload != nil {
|
|
|
|
payload := o.Payload
|
|
|
|
if err := producer.Produce(rw, payload); err != nil {
|
|
|
|
panic(err) // let the recovery middleware deal with this
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-07-25 22:23:55 +02:00
|
|
|
|
|
|
|
// CreateAccountBadRequestCode is the HTTP code returned for type CreateAccountBadRequest
|
|
|
|
const CreateAccountBadRequestCode int = 400
|
|
|
|
|
|
|
|
/*CreateAccountBadRequest account not created (already exists)
|
|
|
|
|
|
|
|
swagger:response createAccountBadRequest
|
|
|
|
*/
|
|
|
|
type CreateAccountBadRequest struct {
|
2022-07-27 19:38:35 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
In: Body
|
|
|
|
*/
|
|
|
|
Payload rest_model_zrok.ErrorMessage `json:"body,omitempty"`
|
2022-07-25 22:23:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewCreateAccountBadRequest creates CreateAccountBadRequest with default headers values
|
|
|
|
func NewCreateAccountBadRequest() *CreateAccountBadRequest {
|
|
|
|
|
|
|
|
return &CreateAccountBadRequest{}
|
|
|
|
}
|
|
|
|
|
2022-07-27 19:38:35 +02:00
|
|
|
// WithPayload adds the payload to the create account bad request response
|
|
|
|
func (o *CreateAccountBadRequest) WithPayload(payload rest_model_zrok.ErrorMessage) *CreateAccountBadRequest {
|
|
|
|
o.Payload = payload
|
|
|
|
return o
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetPayload sets the payload to the create account bad request response
|
|
|
|
func (o *CreateAccountBadRequest) SetPayload(payload rest_model_zrok.ErrorMessage) {
|
|
|
|
o.Payload = payload
|
|
|
|
}
|
|
|
|
|
2022-07-25 22:23:55 +02:00
|
|
|
// WriteResponse to the client
|
|
|
|
func (o *CreateAccountBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
|
|
|
|
rw.WriteHeader(400)
|
2022-07-27 19:38:35 +02:00
|
|
|
payload := o.Payload
|
|
|
|
if err := producer.Produce(rw, payload); err != nil {
|
|
|
|
panic(err) // let the recovery middleware deal with this
|
|
|
|
}
|
2022-07-25 22:23:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// CreateAccountInternalServerErrorCode is the HTTP code returned for type CreateAccountInternalServerError
|
|
|
|
const CreateAccountInternalServerErrorCode int = 500
|
|
|
|
|
|
|
|
/*CreateAccountInternalServerError internal server error
|
|
|
|
|
|
|
|
swagger:response createAccountInternalServerError
|
|
|
|
*/
|
|
|
|
type CreateAccountInternalServerError struct {
|
2022-07-27 19:38:35 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
In: Body
|
|
|
|
*/
|
|
|
|
Payload rest_model_zrok.ErrorMessage `json:"body,omitempty"`
|
2022-07-25 22:23:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewCreateAccountInternalServerError creates CreateAccountInternalServerError with default headers values
|
|
|
|
func NewCreateAccountInternalServerError() *CreateAccountInternalServerError {
|
|
|
|
|
|
|
|
return &CreateAccountInternalServerError{}
|
|
|
|
}
|
|
|
|
|
2022-07-27 19:38:35 +02:00
|
|
|
// WithPayload adds the payload to the create account internal server error response
|
|
|
|
func (o *CreateAccountInternalServerError) WithPayload(payload rest_model_zrok.ErrorMessage) *CreateAccountInternalServerError {
|
|
|
|
o.Payload = payload
|
|
|
|
return o
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetPayload sets the payload to the create account internal server error response
|
|
|
|
func (o *CreateAccountInternalServerError) SetPayload(payload rest_model_zrok.ErrorMessage) {
|
|
|
|
o.Payload = payload
|
|
|
|
}
|
|
|
|
|
2022-07-25 22:23:55 +02:00
|
|
|
// WriteResponse to the client
|
|
|
|
func (o *CreateAccountInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
|
|
|
|
rw.WriteHeader(500)
|
2022-07-27 19:38:35 +02:00
|
|
|
payload := o.Payload
|
|
|
|
if err := producer.Produce(rw, payload); err != nil {
|
|
|
|
panic(err) // let the recovery middleware deal with this
|
|
|
|
}
|
2022-07-25 22:23:55 +02:00
|
|
|
}
|