mirror of
https://github.com/hanzozt/zt.git
synced 2026-11-03 05:01:58 +00:00
215 lines
6.4 KiB
Go
215 lines
6.4 KiB
Go
// 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 raft
|
|
|
|
// 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/ziti/controller/rest_model"
|
|
)
|
|
|
|
// RaftMemberAddOKCode is the HTTP code returned for type RaftMemberAddOK
|
|
const RaftMemberAddOKCode int = 200
|
|
|
|
/*RaftMemberAddOK Base empty response
|
|
|
|
swagger:response raftMemberAddOK
|
|
*/
|
|
type RaftMemberAddOK struct {
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.Empty `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewRaftMemberAddOK creates RaftMemberAddOK with default headers values
|
|
func NewRaftMemberAddOK() *RaftMemberAddOK {
|
|
|
|
return &RaftMemberAddOK{}
|
|
}
|
|
|
|
// WithPayload adds the payload to the raft member add o k response
|
|
func (o *RaftMemberAddOK) WithPayload(payload *rest_model.Empty) *RaftMemberAddOK {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the raft member add o k response
|
|
func (o *RaftMemberAddOK) SetPayload(payload *rest_model.Empty) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *RaftMemberAddOK) 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
|
|
}
|
|
}
|
|
}
|
|
|
|
// RaftMemberAddBadRequestCode is the HTTP code returned for type RaftMemberAddBadRequest
|
|
const RaftMemberAddBadRequestCode int = 400
|
|
|
|
/*RaftMemberAddBadRequest 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 raftMemberAddBadRequest
|
|
*/
|
|
type RaftMemberAddBadRequest struct {
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewRaftMemberAddBadRequest creates RaftMemberAddBadRequest with default headers values
|
|
func NewRaftMemberAddBadRequest() *RaftMemberAddBadRequest {
|
|
|
|
return &RaftMemberAddBadRequest{}
|
|
}
|
|
|
|
// WithPayload adds the payload to the raft member add bad request response
|
|
func (o *RaftMemberAddBadRequest) WithPayload(payload *rest_model.APIErrorEnvelope) *RaftMemberAddBadRequest {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the raft member add bad request response
|
|
func (o *RaftMemberAddBadRequest) SetPayload(payload *rest_model.APIErrorEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *RaftMemberAddBadRequest) 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
|
|
}
|
|
}
|
|
}
|
|
|
|
// RaftMemberAddUnauthorizedCode is the HTTP code returned for type RaftMemberAddUnauthorized
|
|
const RaftMemberAddUnauthorizedCode int = 401
|
|
|
|
/*RaftMemberAddUnauthorized The currently supplied session does not have the correct access rights to request this resource
|
|
|
|
swagger:response raftMemberAddUnauthorized
|
|
*/
|
|
type RaftMemberAddUnauthorized struct {
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewRaftMemberAddUnauthorized creates RaftMemberAddUnauthorized with default headers values
|
|
func NewRaftMemberAddUnauthorized() *RaftMemberAddUnauthorized {
|
|
|
|
return &RaftMemberAddUnauthorized{}
|
|
}
|
|
|
|
// WithPayload adds the payload to the raft member add unauthorized response
|
|
func (o *RaftMemberAddUnauthorized) WithPayload(payload *rest_model.APIErrorEnvelope) *RaftMemberAddUnauthorized {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the raft member add unauthorized response
|
|
func (o *RaftMemberAddUnauthorized) SetPayload(payload *rest_model.APIErrorEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *RaftMemberAddUnauthorized) 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
|
|
}
|
|
}
|
|
}
|
|
|
|
// RaftMemberAddTooManyRequestsCode is the HTTP code returned for type RaftMemberAddTooManyRequests
|
|
const RaftMemberAddTooManyRequestsCode int = 429
|
|
|
|
/*RaftMemberAddTooManyRequests The resource requested is rate limited and the rate limit has been exceeded
|
|
|
|
swagger:response raftMemberAddTooManyRequests
|
|
*/
|
|
type RaftMemberAddTooManyRequests struct {
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewRaftMemberAddTooManyRequests creates RaftMemberAddTooManyRequests with default headers values
|
|
func NewRaftMemberAddTooManyRequests() *RaftMemberAddTooManyRequests {
|
|
|
|
return &RaftMemberAddTooManyRequests{}
|
|
}
|
|
|
|
// WithPayload adds the payload to the raft member add too many requests response
|
|
func (o *RaftMemberAddTooManyRequests) WithPayload(payload *rest_model.APIErrorEnvelope) *RaftMemberAddTooManyRequests {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the raft member add too many requests response
|
|
func (o *RaftMemberAddTooManyRequests) SetPayload(payload *rest_model.APIErrorEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *RaftMemberAddTooManyRequests) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
rw.WriteHeader(429)
|
|
if o.Payload != nil {
|
|
payload := o.Payload
|
|
if err := producer.Produce(rw, payload); err != nil {
|
|
panic(err) // let the recovery middleware deal with this
|
|
}
|
|
}
|
|
}
|