mirror of
https://github.com/hanzozt/edge-api.git
synced 2026-10-30 14:44:05 +00:00
Global rebrand of all OpenZiti references to Hanzo ZT: - Go module paths: github.com/openziti/* → github.com/hanzozt/* - Docker images: openziti/* → hanzozt/* - Java packages: org.openziti.* → org.hanzozt.* - Brand: OpenZiti → Hanzo ZT - URLs: openziti.io → hanzozt.dev
502 lines
16 KiB
Go
502 lines
16 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 enrollment
|
|
|
|
// 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/go-openapi/swag"
|
|
|
|
"github.com/hanzozt/edge-api/rest_model"
|
|
)
|
|
|
|
// CreateEnrollmentCreatedCode is the HTTP code returned for type CreateEnrollmentCreated
|
|
const CreateEnrollmentCreatedCode int = 201
|
|
|
|
/*
|
|
CreateEnrollmentCreated The create request was successful and the resource has been added at the following location
|
|
|
|
swagger:response createEnrollmentCreated
|
|
*/
|
|
type CreateEnrollmentCreated struct {
|
|
/*Denotes different type of security token related information
|
|
|
|
*/
|
|
WWWAuthenticate []string `json:"WWW-Authenticate"`
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.CreateEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewCreateEnrollmentCreated creates CreateEnrollmentCreated with default headers values
|
|
func NewCreateEnrollmentCreated() *CreateEnrollmentCreated {
|
|
|
|
return &CreateEnrollmentCreated{}
|
|
}
|
|
|
|
// WithWWWAuthenticate adds the wWWAuthenticate to the create enrollment created response
|
|
func (o *CreateEnrollmentCreated) WithWWWAuthenticate(wWWAuthenticate []string) *CreateEnrollmentCreated {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
return o
|
|
}
|
|
|
|
// SetWWWAuthenticate sets the wWWAuthenticate to the create enrollment created response
|
|
func (o *CreateEnrollmentCreated) SetWWWAuthenticate(wWWAuthenticate []string) {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
}
|
|
|
|
// WithPayload adds the payload to the create enrollment created response
|
|
func (o *CreateEnrollmentCreated) WithPayload(payload *rest_model.CreateEnvelope) *CreateEnrollmentCreated {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the create enrollment created response
|
|
func (o *CreateEnrollmentCreated) SetPayload(payload *rest_model.CreateEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *CreateEnrollmentCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
// response header WWW-Authenticate
|
|
|
|
var wWWAuthenticateIR []string
|
|
for _, wWWAuthenticateI := range o.WWWAuthenticate {
|
|
wWWAuthenticateIS := wWWAuthenticateI
|
|
if wWWAuthenticateIS != "" {
|
|
wWWAuthenticateIR = append(wWWAuthenticateIR, wWWAuthenticateIS)
|
|
}
|
|
}
|
|
wWWAuthenticate := swag.JoinByFormat(wWWAuthenticateIR, "")
|
|
if len(wWWAuthenticate) > 0 {
|
|
hv := wWWAuthenticate[0]
|
|
if hv != "" {
|
|
rw.Header().Set("WWW-Authenticate", hv)
|
|
}
|
|
}
|
|
|
|
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
|
|
}
|
|
}
|
|
}
|
|
|
|
// CreateEnrollmentBadRequestCode is the HTTP code returned for type CreateEnrollmentBadRequest
|
|
const CreateEnrollmentBadRequestCode int = 400
|
|
|
|
/*
|
|
CreateEnrollmentBadRequest 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 createEnrollmentBadRequest
|
|
*/
|
|
type CreateEnrollmentBadRequest struct {
|
|
/*Denotes different type of security token related information
|
|
|
|
*/
|
|
WWWAuthenticate []string `json:"WWW-Authenticate"`
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewCreateEnrollmentBadRequest creates CreateEnrollmentBadRequest with default headers values
|
|
func NewCreateEnrollmentBadRequest() *CreateEnrollmentBadRequest {
|
|
|
|
return &CreateEnrollmentBadRequest{}
|
|
}
|
|
|
|
// WithWWWAuthenticate adds the wWWAuthenticate to the create enrollment bad request response
|
|
func (o *CreateEnrollmentBadRequest) WithWWWAuthenticate(wWWAuthenticate []string) *CreateEnrollmentBadRequest {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
return o
|
|
}
|
|
|
|
// SetWWWAuthenticate sets the wWWAuthenticate to the create enrollment bad request response
|
|
func (o *CreateEnrollmentBadRequest) SetWWWAuthenticate(wWWAuthenticate []string) {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
}
|
|
|
|
// WithPayload adds the payload to the create enrollment bad request response
|
|
func (o *CreateEnrollmentBadRequest) WithPayload(payload *rest_model.APIErrorEnvelope) *CreateEnrollmentBadRequest {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the create enrollment bad request response
|
|
func (o *CreateEnrollmentBadRequest) SetPayload(payload *rest_model.APIErrorEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *CreateEnrollmentBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
// response header WWW-Authenticate
|
|
|
|
var wWWAuthenticateIR []string
|
|
for _, wWWAuthenticateI := range o.WWWAuthenticate {
|
|
wWWAuthenticateIS := wWWAuthenticateI
|
|
if wWWAuthenticateIS != "" {
|
|
wWWAuthenticateIR = append(wWWAuthenticateIR, wWWAuthenticateIS)
|
|
}
|
|
}
|
|
wWWAuthenticate := swag.JoinByFormat(wWWAuthenticateIR, "")
|
|
if len(wWWAuthenticate) > 0 {
|
|
hv := wWWAuthenticate[0]
|
|
if hv != "" {
|
|
rw.Header().Set("WWW-Authenticate", hv)
|
|
}
|
|
}
|
|
|
|
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
|
|
}
|
|
}
|
|
}
|
|
|
|
// CreateEnrollmentUnauthorizedCode is the HTTP code returned for type CreateEnrollmentUnauthorized
|
|
const CreateEnrollmentUnauthorizedCode int = 401
|
|
|
|
/*
|
|
CreateEnrollmentUnauthorized The supplied session does not have the correct access rights to request this resource
|
|
|
|
swagger:response createEnrollmentUnauthorized
|
|
*/
|
|
type CreateEnrollmentUnauthorized struct {
|
|
/*Denotes different type of security token related information
|
|
|
|
*/
|
|
WWWAuthenticate []string `json:"WWW-Authenticate"`
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewCreateEnrollmentUnauthorized creates CreateEnrollmentUnauthorized with default headers values
|
|
func NewCreateEnrollmentUnauthorized() *CreateEnrollmentUnauthorized {
|
|
|
|
return &CreateEnrollmentUnauthorized{}
|
|
}
|
|
|
|
// WithWWWAuthenticate adds the wWWAuthenticate to the create enrollment unauthorized response
|
|
func (o *CreateEnrollmentUnauthorized) WithWWWAuthenticate(wWWAuthenticate []string) *CreateEnrollmentUnauthorized {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
return o
|
|
}
|
|
|
|
// SetWWWAuthenticate sets the wWWAuthenticate to the create enrollment unauthorized response
|
|
func (o *CreateEnrollmentUnauthorized) SetWWWAuthenticate(wWWAuthenticate []string) {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
}
|
|
|
|
// WithPayload adds the payload to the create enrollment unauthorized response
|
|
func (o *CreateEnrollmentUnauthorized) WithPayload(payload *rest_model.APIErrorEnvelope) *CreateEnrollmentUnauthorized {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the create enrollment unauthorized response
|
|
func (o *CreateEnrollmentUnauthorized) SetPayload(payload *rest_model.APIErrorEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *CreateEnrollmentUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
// response header WWW-Authenticate
|
|
|
|
var wWWAuthenticateIR []string
|
|
for _, wWWAuthenticateI := range o.WWWAuthenticate {
|
|
wWWAuthenticateIS := wWWAuthenticateI
|
|
if wWWAuthenticateIS != "" {
|
|
wWWAuthenticateIR = append(wWWAuthenticateIR, wWWAuthenticateIS)
|
|
}
|
|
}
|
|
wWWAuthenticate := swag.JoinByFormat(wWWAuthenticateIR, "")
|
|
if len(wWWAuthenticate) > 0 {
|
|
hv := wWWAuthenticate[0]
|
|
if hv != "" {
|
|
rw.Header().Set("WWW-Authenticate", hv)
|
|
}
|
|
}
|
|
|
|
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
|
|
}
|
|
}
|
|
}
|
|
|
|
// CreateEnrollmentConflictCode is the HTTP code returned for type CreateEnrollmentConflict
|
|
const CreateEnrollmentConflictCode int = 409
|
|
|
|
/*
|
|
CreateEnrollmentConflict The request could not be completed due to a conflict of configuration or state
|
|
|
|
swagger:response createEnrollmentConflict
|
|
*/
|
|
type CreateEnrollmentConflict struct {
|
|
/*Denotes different type of security token related information
|
|
|
|
*/
|
|
WWWAuthenticate []string `json:"WWW-Authenticate"`
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewCreateEnrollmentConflict creates CreateEnrollmentConflict with default headers values
|
|
func NewCreateEnrollmentConflict() *CreateEnrollmentConflict {
|
|
|
|
return &CreateEnrollmentConflict{}
|
|
}
|
|
|
|
// WithWWWAuthenticate adds the wWWAuthenticate to the create enrollment conflict response
|
|
func (o *CreateEnrollmentConflict) WithWWWAuthenticate(wWWAuthenticate []string) *CreateEnrollmentConflict {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
return o
|
|
}
|
|
|
|
// SetWWWAuthenticate sets the wWWAuthenticate to the create enrollment conflict response
|
|
func (o *CreateEnrollmentConflict) SetWWWAuthenticate(wWWAuthenticate []string) {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
}
|
|
|
|
// WithPayload adds the payload to the create enrollment conflict response
|
|
func (o *CreateEnrollmentConflict) WithPayload(payload *rest_model.APIErrorEnvelope) *CreateEnrollmentConflict {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the create enrollment conflict response
|
|
func (o *CreateEnrollmentConflict) SetPayload(payload *rest_model.APIErrorEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *CreateEnrollmentConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
// response header WWW-Authenticate
|
|
|
|
var wWWAuthenticateIR []string
|
|
for _, wWWAuthenticateI := range o.WWWAuthenticate {
|
|
wWWAuthenticateIS := wWWAuthenticateI
|
|
if wWWAuthenticateIS != "" {
|
|
wWWAuthenticateIR = append(wWWAuthenticateIR, wWWAuthenticateIS)
|
|
}
|
|
}
|
|
wWWAuthenticate := swag.JoinByFormat(wWWAuthenticateIR, "")
|
|
if len(wWWAuthenticate) > 0 {
|
|
hv := wWWAuthenticate[0]
|
|
if hv != "" {
|
|
rw.Header().Set("WWW-Authenticate", hv)
|
|
}
|
|
}
|
|
|
|
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
|
|
}
|
|
}
|
|
}
|
|
|
|
// CreateEnrollmentTooManyRequestsCode is the HTTP code returned for type CreateEnrollmentTooManyRequests
|
|
const CreateEnrollmentTooManyRequestsCode int = 429
|
|
|
|
/*
|
|
CreateEnrollmentTooManyRequests The resource requested is rate limited and the rate limit has been exceeded
|
|
|
|
swagger:response createEnrollmentTooManyRequests
|
|
*/
|
|
type CreateEnrollmentTooManyRequests struct {
|
|
/*Denotes different type of security token related information
|
|
|
|
*/
|
|
WWWAuthenticate []string `json:"WWW-Authenticate"`
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewCreateEnrollmentTooManyRequests creates CreateEnrollmentTooManyRequests with default headers values
|
|
func NewCreateEnrollmentTooManyRequests() *CreateEnrollmentTooManyRequests {
|
|
|
|
return &CreateEnrollmentTooManyRequests{}
|
|
}
|
|
|
|
// WithWWWAuthenticate adds the wWWAuthenticate to the create enrollment too many requests response
|
|
func (o *CreateEnrollmentTooManyRequests) WithWWWAuthenticate(wWWAuthenticate []string) *CreateEnrollmentTooManyRequests {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
return o
|
|
}
|
|
|
|
// SetWWWAuthenticate sets the wWWAuthenticate to the create enrollment too many requests response
|
|
func (o *CreateEnrollmentTooManyRequests) SetWWWAuthenticate(wWWAuthenticate []string) {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
}
|
|
|
|
// WithPayload adds the payload to the create enrollment too many requests response
|
|
func (o *CreateEnrollmentTooManyRequests) WithPayload(payload *rest_model.APIErrorEnvelope) *CreateEnrollmentTooManyRequests {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the create enrollment too many requests response
|
|
func (o *CreateEnrollmentTooManyRequests) SetPayload(payload *rest_model.APIErrorEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *CreateEnrollmentTooManyRequests) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
// response header WWW-Authenticate
|
|
|
|
var wWWAuthenticateIR []string
|
|
for _, wWWAuthenticateI := range o.WWWAuthenticate {
|
|
wWWAuthenticateIS := wWWAuthenticateI
|
|
if wWWAuthenticateIS != "" {
|
|
wWWAuthenticateIR = append(wWWAuthenticateIR, wWWAuthenticateIS)
|
|
}
|
|
}
|
|
wWWAuthenticate := swag.JoinByFormat(wWWAuthenticateIR, "")
|
|
if len(wWWAuthenticate) > 0 {
|
|
hv := wWWAuthenticate[0]
|
|
if hv != "" {
|
|
rw.Header().Set("WWW-Authenticate", hv)
|
|
}
|
|
}
|
|
|
|
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
|
|
}
|
|
}
|
|
}
|
|
|
|
// CreateEnrollmentServiceUnavailableCode is the HTTP code returned for type CreateEnrollmentServiceUnavailable
|
|
const CreateEnrollmentServiceUnavailableCode int = 503
|
|
|
|
/*
|
|
CreateEnrollmentServiceUnavailable The request could not be completed due to the server being busy or in a temporarily bad state
|
|
|
|
swagger:response createEnrollmentServiceUnavailable
|
|
*/
|
|
type CreateEnrollmentServiceUnavailable struct {
|
|
/*Denotes different type of security token related information
|
|
|
|
*/
|
|
WWWAuthenticate []string `json:"WWW-Authenticate"`
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewCreateEnrollmentServiceUnavailable creates CreateEnrollmentServiceUnavailable with default headers values
|
|
func NewCreateEnrollmentServiceUnavailable() *CreateEnrollmentServiceUnavailable {
|
|
|
|
return &CreateEnrollmentServiceUnavailable{}
|
|
}
|
|
|
|
// WithWWWAuthenticate adds the wWWAuthenticate to the create enrollment service unavailable response
|
|
func (o *CreateEnrollmentServiceUnavailable) WithWWWAuthenticate(wWWAuthenticate []string) *CreateEnrollmentServiceUnavailable {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
return o
|
|
}
|
|
|
|
// SetWWWAuthenticate sets the wWWAuthenticate to the create enrollment service unavailable response
|
|
func (o *CreateEnrollmentServiceUnavailable) SetWWWAuthenticate(wWWAuthenticate []string) {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
}
|
|
|
|
// WithPayload adds the payload to the create enrollment service unavailable response
|
|
func (o *CreateEnrollmentServiceUnavailable) WithPayload(payload *rest_model.APIErrorEnvelope) *CreateEnrollmentServiceUnavailable {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the create enrollment service unavailable response
|
|
func (o *CreateEnrollmentServiceUnavailable) SetPayload(payload *rest_model.APIErrorEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *CreateEnrollmentServiceUnavailable) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
// response header WWW-Authenticate
|
|
|
|
var wWWAuthenticateIR []string
|
|
for _, wWWAuthenticateI := range o.WWWAuthenticate {
|
|
wWWAuthenticateIS := wWWAuthenticateI
|
|
if wWWAuthenticateIS != "" {
|
|
wWWAuthenticateIR = append(wWWAuthenticateIR, wWWAuthenticateIS)
|
|
}
|
|
}
|
|
wWWAuthenticate := swag.JoinByFormat(wWWAuthenticateIR, "")
|
|
if len(wWWAuthenticate) > 0 {
|
|
hv := wWWAuthenticate[0]
|
|
if hv != "" {
|
|
rw.Header().Set("WWW-Authenticate", hv)
|
|
}
|
|
}
|
|
|
|
rw.WriteHeader(503)
|
|
if o.Payload != nil {
|
|
payload := o.Payload
|
|
if err := producer.Produce(rw, payload); err != nil {
|
|
panic(err) // let the recovery middleware deal with this
|
|
}
|
|
}
|
|
}
|