mirror of
https://github.com/openziti/zrok.git
synced 2024-12-23 07:09:12 +01:00
253 lines
8.2 KiB
Go
253 lines
8.2 KiB
Go
|
// Code generated by go-swagger; DO NOT EDIT.
|
||
|
|
||
|
package admin
|
||
|
|
||
|
// This file was generated by the swagger tool.
|
||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"fmt"
|
||
|
|
||
|
"github.com/go-openapi/runtime"
|
||
|
"github.com/go-openapi/strfmt"
|
||
|
"github.com/go-openapi/swag"
|
||
|
)
|
||
|
|
||
|
// AddOrganizationMemberReader is a Reader for the AddOrganizationMember structure.
|
||
|
type AddOrganizationMemberReader struct {
|
||
|
formats strfmt.Registry
|
||
|
}
|
||
|
|
||
|
// ReadResponse reads a server response into the received o.
|
||
|
func (o *AddOrganizationMemberReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||
|
switch response.Code() {
|
||
|
case 201:
|
||
|
result := NewAddOrganizationMemberCreated()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return result, nil
|
||
|
case 401:
|
||
|
result := NewAddOrganizationMemberUnauthorized()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 500:
|
||
|
result := NewAddOrganizationMemberInternalServerError()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
default:
|
||
|
return nil, runtime.NewAPIError("[POST /organization/add] addOrganizationMember", response, response.Code())
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// NewAddOrganizationMemberCreated creates a AddOrganizationMemberCreated with default headers values
|
||
|
func NewAddOrganizationMemberCreated() *AddOrganizationMemberCreated {
|
||
|
return &AddOrganizationMemberCreated{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
AddOrganizationMemberCreated describes a response with status code 201, with default header values.
|
||
|
|
||
|
member added
|
||
|
*/
|
||
|
type AddOrganizationMemberCreated struct {
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this add organization member created response has a 2xx status code
|
||
|
func (o *AddOrganizationMemberCreated) IsSuccess() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this add organization member created response has a 3xx status code
|
||
|
func (o *AddOrganizationMemberCreated) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this add organization member created response has a 4xx status code
|
||
|
func (o *AddOrganizationMemberCreated) IsClientError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this add organization member created response has a 5xx status code
|
||
|
func (o *AddOrganizationMemberCreated) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this add organization member created response a status code equal to that given
|
||
|
func (o *AddOrganizationMemberCreated) IsCode(code int) bool {
|
||
|
return code == 201
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the add organization member created response
|
||
|
func (o *AddOrganizationMemberCreated) Code() int {
|
||
|
return 201
|
||
|
}
|
||
|
|
||
|
func (o *AddOrganizationMemberCreated) Error() string {
|
||
|
return fmt.Sprintf("[POST /organization/add][%d] addOrganizationMemberCreated ", 201)
|
||
|
}
|
||
|
|
||
|
func (o *AddOrganizationMemberCreated) String() string {
|
||
|
return fmt.Sprintf("[POST /organization/add][%d] addOrganizationMemberCreated ", 201)
|
||
|
}
|
||
|
|
||
|
func (o *AddOrganizationMemberCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// NewAddOrganizationMemberUnauthorized creates a AddOrganizationMemberUnauthorized with default headers values
|
||
|
func NewAddOrganizationMemberUnauthorized() *AddOrganizationMemberUnauthorized {
|
||
|
return &AddOrganizationMemberUnauthorized{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
AddOrganizationMemberUnauthorized describes a response with status code 401, with default header values.
|
||
|
|
||
|
unauthorized
|
||
|
*/
|
||
|
type AddOrganizationMemberUnauthorized struct {
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this add organization member unauthorized response has a 2xx status code
|
||
|
func (o *AddOrganizationMemberUnauthorized) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this add organization member unauthorized response has a 3xx status code
|
||
|
func (o *AddOrganizationMemberUnauthorized) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this add organization member unauthorized response has a 4xx status code
|
||
|
func (o *AddOrganizationMemberUnauthorized) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this add organization member unauthorized response has a 5xx status code
|
||
|
func (o *AddOrganizationMemberUnauthorized) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this add organization member unauthorized response a status code equal to that given
|
||
|
func (o *AddOrganizationMemberUnauthorized) IsCode(code int) bool {
|
||
|
return code == 401
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the add organization member unauthorized response
|
||
|
func (o *AddOrganizationMemberUnauthorized) Code() int {
|
||
|
return 401
|
||
|
}
|
||
|
|
||
|
func (o *AddOrganizationMemberUnauthorized) Error() string {
|
||
|
return fmt.Sprintf("[POST /organization/add][%d] addOrganizationMemberUnauthorized ", 401)
|
||
|
}
|
||
|
|
||
|
func (o *AddOrganizationMemberUnauthorized) String() string {
|
||
|
return fmt.Sprintf("[POST /organization/add][%d] addOrganizationMemberUnauthorized ", 401)
|
||
|
}
|
||
|
|
||
|
func (o *AddOrganizationMemberUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// NewAddOrganizationMemberInternalServerError creates a AddOrganizationMemberInternalServerError with default headers values
|
||
|
func NewAddOrganizationMemberInternalServerError() *AddOrganizationMemberInternalServerError {
|
||
|
return &AddOrganizationMemberInternalServerError{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
AddOrganizationMemberInternalServerError describes a response with status code 500, with default header values.
|
||
|
|
||
|
internal server error
|
||
|
*/
|
||
|
type AddOrganizationMemberInternalServerError struct {
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this add organization member internal server error response has a 2xx status code
|
||
|
func (o *AddOrganizationMemberInternalServerError) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this add organization member internal server error response has a 3xx status code
|
||
|
func (o *AddOrganizationMemberInternalServerError) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this add organization member internal server error response has a 4xx status code
|
||
|
func (o *AddOrganizationMemberInternalServerError) IsClientError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this add organization member internal server error response has a 5xx status code
|
||
|
func (o *AddOrganizationMemberInternalServerError) IsServerError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this add organization member internal server error response a status code equal to that given
|
||
|
func (o *AddOrganizationMemberInternalServerError) IsCode(code int) bool {
|
||
|
return code == 500
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the add organization member internal server error response
|
||
|
func (o *AddOrganizationMemberInternalServerError) Code() int {
|
||
|
return 500
|
||
|
}
|
||
|
|
||
|
func (o *AddOrganizationMemberInternalServerError) Error() string {
|
||
|
return fmt.Sprintf("[POST /organization/add][%d] addOrganizationMemberInternalServerError ", 500)
|
||
|
}
|
||
|
|
||
|
func (o *AddOrganizationMemberInternalServerError) String() string {
|
||
|
return fmt.Sprintf("[POST /organization/add][%d] addOrganizationMemberInternalServerError ", 500)
|
||
|
}
|
||
|
|
||
|
func (o *AddOrganizationMemberInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
AddOrganizationMemberBody add organization member body
|
||
|
swagger:model AddOrganizationMemberBody
|
||
|
*/
|
||
|
type AddOrganizationMemberBody struct {
|
||
|
|
||
|
// email
|
||
|
Email string `json:"email,omitempty"`
|
||
|
}
|
||
|
|
||
|
// Validate validates this add organization member body
|
||
|
func (o *AddOrganizationMemberBody) Validate(formats strfmt.Registry) error {
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// ContextValidate validates this add organization member body based on context it is used
|
||
|
func (o *AddOrganizationMemberBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// MarshalBinary interface implementation
|
||
|
func (o *AddOrganizationMemberBody) MarshalBinary() ([]byte, error) {
|
||
|
if o == nil {
|
||
|
return nil, nil
|
||
|
}
|
||
|
return swag.WriteJSON(o)
|
||
|
}
|
||
|
|
||
|
// UnmarshalBinary interface implementation
|
||
|
func (o *AddOrganizationMemberBody) UnmarshalBinary(b []byte) error {
|
||
|
var res AddOrganizationMemberBody
|
||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
*o = res
|
||
|
return nil
|
||
|
}
|