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
862 lines
26 KiB
Go
862 lines
26 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 service
|
|
|
|
// This file was generated by the swagger tool.
|
|
// Editing this file might prove futile when you re-run the swagger generate command
|
|
|
|
import (
|
|
"encoding/json"
|
|
stderrors "errors"
|
|
"fmt"
|
|
"io"
|
|
|
|
"github.com/go-openapi/runtime"
|
|
"github.com/go-openapi/strfmt"
|
|
"github.com/go-openapi/swag"
|
|
|
|
"github.com/hanzozt/edge-api/rest_model"
|
|
)
|
|
|
|
// DeleteServiceReader is a Reader for the DeleteService structure.
|
|
type DeleteServiceReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *DeleteServiceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewDeleteServiceOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 400:
|
|
result := NewDeleteServiceBadRequest()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 401:
|
|
result := NewDeleteServiceUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewDeleteServiceNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 409:
|
|
result := NewDeleteServiceConflict()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 429:
|
|
result := NewDeleteServiceTooManyRequests()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 503:
|
|
result := NewDeleteServiceServiceUnavailable()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
default:
|
|
return nil, runtime.NewAPIError("[DELETE /services/{id}] deleteService", response, response.Code())
|
|
}
|
|
}
|
|
|
|
// NewDeleteServiceOK creates a DeleteServiceOK with default headers values
|
|
func NewDeleteServiceOK() *DeleteServiceOK {
|
|
return &DeleteServiceOK{}
|
|
}
|
|
|
|
/*
|
|
DeleteServiceOK describes a response with status code 200, with default header values.
|
|
|
|
The delete request was successful and the resource has been removed
|
|
*/
|
|
type DeleteServiceOK struct {
|
|
|
|
/* Denotes different type of security token related information
|
|
*/
|
|
WWWAuthenticate []string
|
|
|
|
Payload *rest_model.Empty
|
|
}
|
|
|
|
// IsSuccess returns true when this delete service o k response has a 2xx status code
|
|
func (o *DeleteServiceOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this delete service o k response has a 3xx status code
|
|
func (o *DeleteServiceOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this delete service o k response has a 4xx status code
|
|
func (o *DeleteServiceOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this delete service o k response has a 5xx status code
|
|
func (o *DeleteServiceOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this delete service o k response a status code equal to that given
|
|
func (o *DeleteServiceOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the delete service o k response
|
|
func (o *DeleteServiceOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *DeleteServiceOK) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[DELETE /services/{id}][%d] deleteServiceOK %s", 200, payload)
|
|
}
|
|
|
|
func (o *DeleteServiceOK) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[DELETE /services/{id}][%d] deleteServiceOK %s", 200, payload)
|
|
}
|
|
|
|
func (o *DeleteServiceOK) GetPayload() *rest_model.Empty {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *DeleteServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
// hydrates response header WWW-Authenticate
|
|
hdrWWWAuthenticate := response.GetHeader("WWW-Authenticate")
|
|
|
|
if hdrWWWAuthenticate != "" {
|
|
|
|
// binding header items for WWW-Authenticate
|
|
valWWWAuthenticate, err := o.bindHeaderWWWAuthenticate(hdrWWWAuthenticate, formats)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
o.WWWAuthenticate = valWWWAuthenticate
|
|
}
|
|
|
|
o.Payload = new(rest_model.Empty)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// bindHeaderDeleteServiceOK binds the response header WWW-Authenticate
|
|
func (o *DeleteServiceOK) bindHeaderWWWAuthenticate(hdr string, formats strfmt.Registry) ([]string, error) {
|
|
wWWAuthenticateIV := hdr
|
|
|
|
var (
|
|
wWWAuthenticateIC []string
|
|
)
|
|
// items.CollectionFormat: ""
|
|
wWWAuthenticateIR := swag.SplitByFormat(wWWAuthenticateIV, "")
|
|
|
|
for _, wWWAuthenticateIIV := range wWWAuthenticateIR {
|
|
|
|
// convert split string to string
|
|
wWWAuthenticateIIC := wWWAuthenticateIIV // string as string
|
|
wWWAuthenticateIC = append(wWWAuthenticateIC, wWWAuthenticateIIC) // roll-up string into []string
|
|
}
|
|
|
|
return wWWAuthenticateIC, nil
|
|
}
|
|
|
|
// NewDeleteServiceBadRequest creates a DeleteServiceBadRequest with default headers values
|
|
func NewDeleteServiceBadRequest() *DeleteServiceBadRequest {
|
|
return &DeleteServiceBadRequest{}
|
|
}
|
|
|
|
/*
|
|
DeleteServiceBadRequest describes a response with status code 400, with default header values.
|
|
|
|
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
|
|
*/
|
|
type DeleteServiceBadRequest struct {
|
|
|
|
/* Denotes different type of security token related information
|
|
*/
|
|
WWWAuthenticate []string
|
|
|
|
Payload *rest_model.APIErrorEnvelope
|
|
}
|
|
|
|
// IsSuccess returns true when this delete service bad request response has a 2xx status code
|
|
func (o *DeleteServiceBadRequest) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this delete service bad request response has a 3xx status code
|
|
func (o *DeleteServiceBadRequest) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this delete service bad request response has a 4xx status code
|
|
func (o *DeleteServiceBadRequest) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this delete service bad request response has a 5xx status code
|
|
func (o *DeleteServiceBadRequest) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this delete service bad request response a status code equal to that given
|
|
func (o *DeleteServiceBadRequest) IsCode(code int) bool {
|
|
return code == 400
|
|
}
|
|
|
|
// Code gets the status code for the delete service bad request response
|
|
func (o *DeleteServiceBadRequest) Code() int {
|
|
return 400
|
|
}
|
|
|
|
func (o *DeleteServiceBadRequest) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[DELETE /services/{id}][%d] deleteServiceBadRequest %s", 400, payload)
|
|
}
|
|
|
|
func (o *DeleteServiceBadRequest) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[DELETE /services/{id}][%d] deleteServiceBadRequest %s", 400, payload)
|
|
}
|
|
|
|
func (o *DeleteServiceBadRequest) GetPayload() *rest_model.APIErrorEnvelope {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *DeleteServiceBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
// hydrates response header WWW-Authenticate
|
|
hdrWWWAuthenticate := response.GetHeader("WWW-Authenticate")
|
|
|
|
if hdrWWWAuthenticate != "" {
|
|
|
|
// binding header items for WWW-Authenticate
|
|
valWWWAuthenticate, err := o.bindHeaderWWWAuthenticate(hdrWWWAuthenticate, formats)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
o.WWWAuthenticate = valWWWAuthenticate
|
|
}
|
|
|
|
o.Payload = new(rest_model.APIErrorEnvelope)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// bindHeaderDeleteServiceBadRequest binds the response header WWW-Authenticate
|
|
func (o *DeleteServiceBadRequest) bindHeaderWWWAuthenticate(hdr string, formats strfmt.Registry) ([]string, error) {
|
|
wWWAuthenticateIV := hdr
|
|
|
|
var (
|
|
wWWAuthenticateIC []string
|
|
)
|
|
// items.CollectionFormat: ""
|
|
wWWAuthenticateIR := swag.SplitByFormat(wWWAuthenticateIV, "")
|
|
|
|
for _, wWWAuthenticateIIV := range wWWAuthenticateIR {
|
|
|
|
// convert split string to string
|
|
wWWAuthenticateIIC := wWWAuthenticateIIV // string as string
|
|
wWWAuthenticateIC = append(wWWAuthenticateIC, wWWAuthenticateIIC) // roll-up string into []string
|
|
}
|
|
|
|
return wWWAuthenticateIC, nil
|
|
}
|
|
|
|
// NewDeleteServiceUnauthorized creates a DeleteServiceUnauthorized with default headers values
|
|
func NewDeleteServiceUnauthorized() *DeleteServiceUnauthorized {
|
|
return &DeleteServiceUnauthorized{}
|
|
}
|
|
|
|
/*
|
|
DeleteServiceUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
The supplied session does not have the correct access rights to request this resource
|
|
*/
|
|
type DeleteServiceUnauthorized struct {
|
|
|
|
/* Denotes different type of security token related information
|
|
*/
|
|
WWWAuthenticate []string
|
|
|
|
Payload *rest_model.APIErrorEnvelope
|
|
}
|
|
|
|
// IsSuccess returns true when this delete service unauthorized response has a 2xx status code
|
|
func (o *DeleteServiceUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this delete service unauthorized response has a 3xx status code
|
|
func (o *DeleteServiceUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this delete service unauthorized response has a 4xx status code
|
|
func (o *DeleteServiceUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this delete service unauthorized response has a 5xx status code
|
|
func (o *DeleteServiceUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this delete service unauthorized response a status code equal to that given
|
|
func (o *DeleteServiceUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
// Code gets the status code for the delete service unauthorized response
|
|
func (o *DeleteServiceUnauthorized) Code() int {
|
|
return 401
|
|
}
|
|
|
|
func (o *DeleteServiceUnauthorized) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[DELETE /services/{id}][%d] deleteServiceUnauthorized %s", 401, payload)
|
|
}
|
|
|
|
func (o *DeleteServiceUnauthorized) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[DELETE /services/{id}][%d] deleteServiceUnauthorized %s", 401, payload)
|
|
}
|
|
|
|
func (o *DeleteServiceUnauthorized) GetPayload() *rest_model.APIErrorEnvelope {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *DeleteServiceUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
// hydrates response header WWW-Authenticate
|
|
hdrWWWAuthenticate := response.GetHeader("WWW-Authenticate")
|
|
|
|
if hdrWWWAuthenticate != "" {
|
|
|
|
// binding header items for WWW-Authenticate
|
|
valWWWAuthenticate, err := o.bindHeaderWWWAuthenticate(hdrWWWAuthenticate, formats)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
o.WWWAuthenticate = valWWWAuthenticate
|
|
}
|
|
|
|
o.Payload = new(rest_model.APIErrorEnvelope)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// bindHeaderDeleteServiceUnauthorized binds the response header WWW-Authenticate
|
|
func (o *DeleteServiceUnauthorized) bindHeaderWWWAuthenticate(hdr string, formats strfmt.Registry) ([]string, error) {
|
|
wWWAuthenticateIV := hdr
|
|
|
|
var (
|
|
wWWAuthenticateIC []string
|
|
)
|
|
// items.CollectionFormat: ""
|
|
wWWAuthenticateIR := swag.SplitByFormat(wWWAuthenticateIV, "")
|
|
|
|
for _, wWWAuthenticateIIV := range wWWAuthenticateIR {
|
|
|
|
// convert split string to string
|
|
wWWAuthenticateIIC := wWWAuthenticateIIV // string as string
|
|
wWWAuthenticateIC = append(wWWAuthenticateIC, wWWAuthenticateIIC) // roll-up string into []string
|
|
}
|
|
|
|
return wWWAuthenticateIC, nil
|
|
}
|
|
|
|
// NewDeleteServiceNotFound creates a DeleteServiceNotFound with default headers values
|
|
func NewDeleteServiceNotFound() *DeleteServiceNotFound {
|
|
return &DeleteServiceNotFound{}
|
|
}
|
|
|
|
/*
|
|
DeleteServiceNotFound describes a response with status code 404, with default header values.
|
|
|
|
The requested resource does not exist
|
|
*/
|
|
type DeleteServiceNotFound struct {
|
|
|
|
/* Denotes different type of security token related information
|
|
*/
|
|
WWWAuthenticate []string
|
|
|
|
Payload *rest_model.APIErrorEnvelope
|
|
}
|
|
|
|
// IsSuccess returns true when this delete service not found response has a 2xx status code
|
|
func (o *DeleteServiceNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this delete service not found response has a 3xx status code
|
|
func (o *DeleteServiceNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this delete service not found response has a 4xx status code
|
|
func (o *DeleteServiceNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this delete service not found response has a 5xx status code
|
|
func (o *DeleteServiceNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this delete service not found response a status code equal to that given
|
|
func (o *DeleteServiceNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the delete service not found response
|
|
func (o *DeleteServiceNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *DeleteServiceNotFound) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[DELETE /services/{id}][%d] deleteServiceNotFound %s", 404, payload)
|
|
}
|
|
|
|
func (o *DeleteServiceNotFound) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[DELETE /services/{id}][%d] deleteServiceNotFound %s", 404, payload)
|
|
}
|
|
|
|
func (o *DeleteServiceNotFound) GetPayload() *rest_model.APIErrorEnvelope {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *DeleteServiceNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
// hydrates response header WWW-Authenticate
|
|
hdrWWWAuthenticate := response.GetHeader("WWW-Authenticate")
|
|
|
|
if hdrWWWAuthenticate != "" {
|
|
|
|
// binding header items for WWW-Authenticate
|
|
valWWWAuthenticate, err := o.bindHeaderWWWAuthenticate(hdrWWWAuthenticate, formats)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
o.WWWAuthenticate = valWWWAuthenticate
|
|
}
|
|
|
|
o.Payload = new(rest_model.APIErrorEnvelope)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// bindHeaderDeleteServiceNotFound binds the response header WWW-Authenticate
|
|
func (o *DeleteServiceNotFound) bindHeaderWWWAuthenticate(hdr string, formats strfmt.Registry) ([]string, error) {
|
|
wWWAuthenticateIV := hdr
|
|
|
|
var (
|
|
wWWAuthenticateIC []string
|
|
)
|
|
// items.CollectionFormat: ""
|
|
wWWAuthenticateIR := swag.SplitByFormat(wWWAuthenticateIV, "")
|
|
|
|
for _, wWWAuthenticateIIV := range wWWAuthenticateIR {
|
|
|
|
// convert split string to string
|
|
wWWAuthenticateIIC := wWWAuthenticateIIV // string as string
|
|
wWWAuthenticateIC = append(wWWAuthenticateIC, wWWAuthenticateIIC) // roll-up string into []string
|
|
}
|
|
|
|
return wWWAuthenticateIC, nil
|
|
}
|
|
|
|
// NewDeleteServiceConflict creates a DeleteServiceConflict with default headers values
|
|
func NewDeleteServiceConflict() *DeleteServiceConflict {
|
|
return &DeleteServiceConflict{}
|
|
}
|
|
|
|
/*
|
|
DeleteServiceConflict describes a response with status code 409, with default header values.
|
|
|
|
The resource requested to be removed/altered cannot be as it is referenced by another object.
|
|
*/
|
|
type DeleteServiceConflict struct {
|
|
|
|
/* Denotes different type of security token related information
|
|
*/
|
|
WWWAuthenticate []string
|
|
|
|
Payload *rest_model.APIErrorEnvelope
|
|
}
|
|
|
|
// IsSuccess returns true when this delete service conflict response has a 2xx status code
|
|
func (o *DeleteServiceConflict) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this delete service conflict response has a 3xx status code
|
|
func (o *DeleteServiceConflict) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this delete service conflict response has a 4xx status code
|
|
func (o *DeleteServiceConflict) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this delete service conflict response has a 5xx status code
|
|
func (o *DeleteServiceConflict) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this delete service conflict response a status code equal to that given
|
|
func (o *DeleteServiceConflict) IsCode(code int) bool {
|
|
return code == 409
|
|
}
|
|
|
|
// Code gets the status code for the delete service conflict response
|
|
func (o *DeleteServiceConflict) Code() int {
|
|
return 409
|
|
}
|
|
|
|
func (o *DeleteServiceConflict) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[DELETE /services/{id}][%d] deleteServiceConflict %s", 409, payload)
|
|
}
|
|
|
|
func (o *DeleteServiceConflict) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[DELETE /services/{id}][%d] deleteServiceConflict %s", 409, payload)
|
|
}
|
|
|
|
func (o *DeleteServiceConflict) GetPayload() *rest_model.APIErrorEnvelope {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *DeleteServiceConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
// hydrates response header WWW-Authenticate
|
|
hdrWWWAuthenticate := response.GetHeader("WWW-Authenticate")
|
|
|
|
if hdrWWWAuthenticate != "" {
|
|
|
|
// binding header items for WWW-Authenticate
|
|
valWWWAuthenticate, err := o.bindHeaderWWWAuthenticate(hdrWWWAuthenticate, formats)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
o.WWWAuthenticate = valWWWAuthenticate
|
|
}
|
|
|
|
o.Payload = new(rest_model.APIErrorEnvelope)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// bindHeaderDeleteServiceConflict binds the response header WWW-Authenticate
|
|
func (o *DeleteServiceConflict) bindHeaderWWWAuthenticate(hdr string, formats strfmt.Registry) ([]string, error) {
|
|
wWWAuthenticateIV := hdr
|
|
|
|
var (
|
|
wWWAuthenticateIC []string
|
|
)
|
|
// items.CollectionFormat: ""
|
|
wWWAuthenticateIR := swag.SplitByFormat(wWWAuthenticateIV, "")
|
|
|
|
for _, wWWAuthenticateIIV := range wWWAuthenticateIR {
|
|
|
|
// convert split string to string
|
|
wWWAuthenticateIIC := wWWAuthenticateIIV // string as string
|
|
wWWAuthenticateIC = append(wWWAuthenticateIC, wWWAuthenticateIIC) // roll-up string into []string
|
|
}
|
|
|
|
return wWWAuthenticateIC, nil
|
|
}
|
|
|
|
// NewDeleteServiceTooManyRequests creates a DeleteServiceTooManyRequests with default headers values
|
|
func NewDeleteServiceTooManyRequests() *DeleteServiceTooManyRequests {
|
|
return &DeleteServiceTooManyRequests{}
|
|
}
|
|
|
|
/*
|
|
DeleteServiceTooManyRequests describes a response with status code 429, with default header values.
|
|
|
|
The resource requested is rate limited and the rate limit has been exceeded
|
|
*/
|
|
type DeleteServiceTooManyRequests struct {
|
|
|
|
/* Denotes different type of security token related information
|
|
*/
|
|
WWWAuthenticate []string
|
|
|
|
Payload *rest_model.APIErrorEnvelope
|
|
}
|
|
|
|
// IsSuccess returns true when this delete service too many requests response has a 2xx status code
|
|
func (o *DeleteServiceTooManyRequests) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this delete service too many requests response has a 3xx status code
|
|
func (o *DeleteServiceTooManyRequests) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this delete service too many requests response has a 4xx status code
|
|
func (o *DeleteServiceTooManyRequests) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this delete service too many requests response has a 5xx status code
|
|
func (o *DeleteServiceTooManyRequests) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this delete service too many requests response a status code equal to that given
|
|
func (o *DeleteServiceTooManyRequests) IsCode(code int) bool {
|
|
return code == 429
|
|
}
|
|
|
|
// Code gets the status code for the delete service too many requests response
|
|
func (o *DeleteServiceTooManyRequests) Code() int {
|
|
return 429
|
|
}
|
|
|
|
func (o *DeleteServiceTooManyRequests) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[DELETE /services/{id}][%d] deleteServiceTooManyRequests %s", 429, payload)
|
|
}
|
|
|
|
func (o *DeleteServiceTooManyRequests) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[DELETE /services/{id}][%d] deleteServiceTooManyRequests %s", 429, payload)
|
|
}
|
|
|
|
func (o *DeleteServiceTooManyRequests) GetPayload() *rest_model.APIErrorEnvelope {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *DeleteServiceTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
// hydrates response header WWW-Authenticate
|
|
hdrWWWAuthenticate := response.GetHeader("WWW-Authenticate")
|
|
|
|
if hdrWWWAuthenticate != "" {
|
|
|
|
// binding header items for WWW-Authenticate
|
|
valWWWAuthenticate, err := o.bindHeaderWWWAuthenticate(hdrWWWAuthenticate, formats)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
o.WWWAuthenticate = valWWWAuthenticate
|
|
}
|
|
|
|
o.Payload = new(rest_model.APIErrorEnvelope)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// bindHeaderDeleteServiceTooManyRequests binds the response header WWW-Authenticate
|
|
func (o *DeleteServiceTooManyRequests) bindHeaderWWWAuthenticate(hdr string, formats strfmt.Registry) ([]string, error) {
|
|
wWWAuthenticateIV := hdr
|
|
|
|
var (
|
|
wWWAuthenticateIC []string
|
|
)
|
|
// items.CollectionFormat: ""
|
|
wWWAuthenticateIR := swag.SplitByFormat(wWWAuthenticateIV, "")
|
|
|
|
for _, wWWAuthenticateIIV := range wWWAuthenticateIR {
|
|
|
|
// convert split string to string
|
|
wWWAuthenticateIIC := wWWAuthenticateIIV // string as string
|
|
wWWAuthenticateIC = append(wWWAuthenticateIC, wWWAuthenticateIIC) // roll-up string into []string
|
|
}
|
|
|
|
return wWWAuthenticateIC, nil
|
|
}
|
|
|
|
// NewDeleteServiceServiceUnavailable creates a DeleteServiceServiceUnavailable with default headers values
|
|
func NewDeleteServiceServiceUnavailable() *DeleteServiceServiceUnavailable {
|
|
return &DeleteServiceServiceUnavailable{}
|
|
}
|
|
|
|
/*
|
|
DeleteServiceServiceUnavailable describes a response with status code 503, with default header values.
|
|
|
|
The request could not be completed due to the server being busy or in a temporarily bad state
|
|
*/
|
|
type DeleteServiceServiceUnavailable struct {
|
|
|
|
/* Denotes different type of security token related information
|
|
*/
|
|
WWWAuthenticate []string
|
|
|
|
Payload *rest_model.APIErrorEnvelope
|
|
}
|
|
|
|
// IsSuccess returns true when this delete service service unavailable response has a 2xx status code
|
|
func (o *DeleteServiceServiceUnavailable) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this delete service service unavailable response has a 3xx status code
|
|
func (o *DeleteServiceServiceUnavailable) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this delete service service unavailable response has a 4xx status code
|
|
func (o *DeleteServiceServiceUnavailable) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this delete service service unavailable response has a 5xx status code
|
|
func (o *DeleteServiceServiceUnavailable) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this delete service service unavailable response a status code equal to that given
|
|
func (o *DeleteServiceServiceUnavailable) IsCode(code int) bool {
|
|
return code == 503
|
|
}
|
|
|
|
// Code gets the status code for the delete service service unavailable response
|
|
func (o *DeleteServiceServiceUnavailable) Code() int {
|
|
return 503
|
|
}
|
|
|
|
func (o *DeleteServiceServiceUnavailable) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[DELETE /services/{id}][%d] deleteServiceServiceUnavailable %s", 503, payload)
|
|
}
|
|
|
|
func (o *DeleteServiceServiceUnavailable) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[DELETE /services/{id}][%d] deleteServiceServiceUnavailable %s", 503, payload)
|
|
}
|
|
|
|
func (o *DeleteServiceServiceUnavailable) GetPayload() *rest_model.APIErrorEnvelope {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *DeleteServiceServiceUnavailable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
// hydrates response header WWW-Authenticate
|
|
hdrWWWAuthenticate := response.GetHeader("WWW-Authenticate")
|
|
|
|
if hdrWWWAuthenticate != "" {
|
|
|
|
// binding header items for WWW-Authenticate
|
|
valWWWAuthenticate, err := o.bindHeaderWWWAuthenticate(hdrWWWAuthenticate, formats)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
o.WWWAuthenticate = valWWWAuthenticate
|
|
}
|
|
|
|
o.Payload = new(rest_model.APIErrorEnvelope)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// bindHeaderDeleteServiceServiceUnavailable binds the response header WWW-Authenticate
|
|
func (o *DeleteServiceServiceUnavailable) bindHeaderWWWAuthenticate(hdr string, formats strfmt.Registry) ([]string, error) {
|
|
wWWAuthenticateIV := hdr
|
|
|
|
var (
|
|
wWWAuthenticateIC []string
|
|
)
|
|
// items.CollectionFormat: ""
|
|
wWWAuthenticateIR := swag.SplitByFormat(wWWAuthenticateIV, "")
|
|
|
|
for _, wWWAuthenticateIIV := range wWWAuthenticateIR {
|
|
|
|
// convert split string to string
|
|
wWWAuthenticateIIC := wWWAuthenticateIIV // string as string
|
|
wWWAuthenticateIC = append(wWWAuthenticateIC, wWWAuthenticateIIC) // roll-up string into []string
|
|
}
|
|
|
|
return wWWAuthenticateIC, nil
|
|
}
|