// Code generated by go-swagger; DO NOT EDIT.

package cluster

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"context"
	"encoding/json"
	"fmt"
	"io"
	"strconv"

	"github.com/go-openapi/errors"
	"github.com/go-openapi/runtime"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
	"github.com/go-openapi/validate"
)

// GetClusterReader is a Reader for the GetCluster structure.
type GetClusterReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *GetClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewGetClusterOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewGetClusterBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewGetClusterUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewGetClusterForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewGetClusterNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 429:
		result := NewGetClusterTooManyRequests()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewGetClusterInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		result := NewGetClusterDefault(response.Code())
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		if response.Code()/100 == 2 {
			return result, nil
		}
		return nil, result
	}
}

// NewGetClusterOK creates a GetClusterOK with default headers values
func NewGetClusterOK() *GetClusterOK {
	return &GetClusterOK{}
}

/*
GetClusterOK describes a response with status code 200, with default header values.

A successful response.
*/
type GetClusterOK struct {
	Payload *GetClusterOKBody
}

// IsSuccess returns true when this get cluster o k response has a 2xx status code
func (o *GetClusterOK) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this get cluster o k response has a 3xx status code
func (o *GetClusterOK) IsRedirect() bool {
	return false
}

// IsClientError returns true when this get cluster o k response has a 4xx status code
func (o *GetClusterOK) IsClientError() bool {
	return false
}

// IsServerError returns true when this get cluster o k response has a 5xx status code
func (o *GetClusterOK) IsServerError() bool {
	return false
}

// IsCode returns true when this get cluster o k response a status code equal to that given
func (o *GetClusterOK) IsCode(code int) bool {
	return code == 200
}

// Code gets the status code for the get cluster o k response
func (o *GetClusterOK) Code() int {
	return 200
}

func (o *GetClusterOK) Error() string {
	return fmt.Sprintf("[GET /api/v1beta/projects/{project_id}/clusters/{cluster_id}][%d] getClusterOK  %+v", 200, o.Payload)
}

func (o *GetClusterOK) String() string {
	return fmt.Sprintf("[GET /api/v1beta/projects/{project_id}/clusters/{cluster_id}][%d] getClusterOK  %+v", 200, o.Payload)
}

func (o *GetClusterOK) GetPayload() *GetClusterOKBody {
	return o.Payload
}

func (o *GetClusterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(GetClusterOKBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewGetClusterBadRequest creates a GetClusterBadRequest with default headers values
func NewGetClusterBadRequest() *GetClusterBadRequest {
	return &GetClusterBadRequest{}
}

/*
GetClusterBadRequest describes a response with status code 400, with default header values.

A request field is invalid.
*/
type GetClusterBadRequest struct {
	Payload *GetClusterBadRequestBody
}

// IsSuccess returns true when this get cluster bad request response has a 2xx status code
func (o *GetClusterBadRequest) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this get cluster bad request response has a 3xx status code
func (o *GetClusterBadRequest) IsRedirect() bool {
	return false
}

// IsClientError returns true when this get cluster bad request response has a 4xx status code
func (o *GetClusterBadRequest) IsClientError() bool {
	return true
}

// IsServerError returns true when this get cluster bad request response has a 5xx status code
func (o *GetClusterBadRequest) IsServerError() bool {
	return false
}

// IsCode returns true when this get cluster bad request response a status code equal to that given
func (o *GetClusterBadRequest) IsCode(code int) bool {
	return code == 400
}

// Code gets the status code for the get cluster bad request response
func (o *GetClusterBadRequest) Code() int {
	return 400
}

func (o *GetClusterBadRequest) Error() string {
	return fmt.Sprintf("[GET /api/v1beta/projects/{project_id}/clusters/{cluster_id}][%d] getClusterBadRequest  %+v", 400, o.Payload)
}

func (o *GetClusterBadRequest) String() string {
	return fmt.Sprintf("[GET /api/v1beta/projects/{project_id}/clusters/{cluster_id}][%d] getClusterBadRequest  %+v", 400, o.Payload)
}

func (o *GetClusterBadRequest) GetPayload() *GetClusterBadRequestBody {
	return o.Payload
}

func (o *GetClusterBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(GetClusterBadRequestBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewGetClusterUnauthorized creates a GetClusterUnauthorized with default headers values
func NewGetClusterUnauthorized() *GetClusterUnauthorized {
	return &GetClusterUnauthorized{}
}

/*
GetClusterUnauthorized describes a response with status code 401, with default header values.

The API key cannot be authenticated.
*/
type GetClusterUnauthorized struct {
	Payload interface{}
}

// IsSuccess returns true when this get cluster unauthorized response has a 2xx status code
func (o *GetClusterUnauthorized) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this get cluster unauthorized response has a 3xx status code
func (o *GetClusterUnauthorized) IsRedirect() bool {
	return false
}

// IsClientError returns true when this get cluster unauthorized response has a 4xx status code
func (o *GetClusterUnauthorized) IsClientError() bool {
	return true
}

// IsServerError returns true when this get cluster unauthorized response has a 5xx status code
func (o *GetClusterUnauthorized) IsServerError() bool {
	return false
}

// IsCode returns true when this get cluster unauthorized response a status code equal to that given
func (o *GetClusterUnauthorized) IsCode(code int) bool {
	return code == 401
}

// Code gets the status code for the get cluster unauthorized response
func (o *GetClusterUnauthorized) Code() int {
	return 401
}

func (o *GetClusterUnauthorized) Error() string {
	return fmt.Sprintf("[GET /api/v1beta/projects/{project_id}/clusters/{cluster_id}][%d] getClusterUnauthorized  %+v", 401, o.Payload)
}

func (o *GetClusterUnauthorized) String() string {
	return fmt.Sprintf("[GET /api/v1beta/projects/{project_id}/clusters/{cluster_id}][%d] getClusterUnauthorized  %+v", 401, o.Payload)
}

func (o *GetClusterUnauthorized) GetPayload() interface{} {
	return o.Payload
}

func (o *GetClusterUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	// response payload
	if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewGetClusterForbidden creates a GetClusterForbidden with default headers values
func NewGetClusterForbidden() *GetClusterForbidden {
	return &GetClusterForbidden{}
}

/*
GetClusterForbidden describes a response with status code 403, with default header values.

The API key does not have permission to access the resource.
*/
type GetClusterForbidden struct {
	Payload *GetClusterForbiddenBody
}

// IsSuccess returns true when this get cluster forbidden response has a 2xx status code
func (o *GetClusterForbidden) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this get cluster forbidden response has a 3xx status code
func (o *GetClusterForbidden) IsRedirect() bool {
	return false
}

// IsClientError returns true when this get cluster forbidden response has a 4xx status code
func (o *GetClusterForbidden) IsClientError() bool {
	return true
}

// IsServerError returns true when this get cluster forbidden response has a 5xx status code
func (o *GetClusterForbidden) IsServerError() bool {
	return false
}

// IsCode returns true when this get cluster forbidden response a status code equal to that given
func (o *GetClusterForbidden) IsCode(code int) bool {
	return code == 403
}

// Code gets the status code for the get cluster forbidden response
func (o *GetClusterForbidden) Code() int {
	return 403
}

func (o *GetClusterForbidden) Error() string {
	return fmt.Sprintf("[GET /api/v1beta/projects/{project_id}/clusters/{cluster_id}][%d] getClusterForbidden  %+v", 403, o.Payload)
}

func (o *GetClusterForbidden) String() string {
	return fmt.Sprintf("[GET /api/v1beta/projects/{project_id}/clusters/{cluster_id}][%d] getClusterForbidden  %+v", 403, o.Payload)
}

func (o *GetClusterForbidden) GetPayload() *GetClusterForbiddenBody {
	return o.Payload
}

func (o *GetClusterForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(GetClusterForbiddenBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewGetClusterNotFound creates a GetClusterNotFound with default headers values
func NewGetClusterNotFound() *GetClusterNotFound {
	return &GetClusterNotFound{}
}

/*
GetClusterNotFound describes a response with status code 404, with default header values.

The requested resource does not exist.
*/
type GetClusterNotFound struct {
	Payload *GetClusterNotFoundBody
}

// IsSuccess returns true when this get cluster not found response has a 2xx status code
func (o *GetClusterNotFound) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this get cluster not found response has a 3xx status code
func (o *GetClusterNotFound) IsRedirect() bool {
	return false
}

// IsClientError returns true when this get cluster not found response has a 4xx status code
func (o *GetClusterNotFound) IsClientError() bool {
	return true
}

// IsServerError returns true when this get cluster not found response has a 5xx status code
func (o *GetClusterNotFound) IsServerError() bool {
	return false
}

// IsCode returns true when this get cluster not found response a status code equal to that given
func (o *GetClusterNotFound) IsCode(code int) bool {
	return code == 404
}

// Code gets the status code for the get cluster not found response
func (o *GetClusterNotFound) Code() int {
	return 404
}

func (o *GetClusterNotFound) Error() string {
	return fmt.Sprintf("[GET /api/v1beta/projects/{project_id}/clusters/{cluster_id}][%d] getClusterNotFound  %+v", 404, o.Payload)
}

func (o *GetClusterNotFound) String() string {
	return fmt.Sprintf("[GET /api/v1beta/projects/{project_id}/clusters/{cluster_id}][%d] getClusterNotFound  %+v", 404, o.Payload)
}

func (o *GetClusterNotFound) GetPayload() *GetClusterNotFoundBody {
	return o.Payload
}

func (o *GetClusterNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(GetClusterNotFoundBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewGetClusterTooManyRequests creates a GetClusterTooManyRequests with default headers values
func NewGetClusterTooManyRequests() *GetClusterTooManyRequests {
	return &GetClusterTooManyRequests{}
}

/*
GetClusterTooManyRequests describes a response with status code 429, with default header values.

You have exceed the rate limit.
*/
type GetClusterTooManyRequests struct {
	Payload *GetClusterTooManyRequestsBody
}

// IsSuccess returns true when this get cluster too many requests response has a 2xx status code
func (o *GetClusterTooManyRequests) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this get cluster too many requests response has a 3xx status code
func (o *GetClusterTooManyRequests) IsRedirect() bool {
	return false
}

// IsClientError returns true when this get cluster too many requests response has a 4xx status code
func (o *GetClusterTooManyRequests) IsClientError() bool {
	return true
}

// IsServerError returns true when this get cluster too many requests response has a 5xx status code
func (o *GetClusterTooManyRequests) IsServerError() bool {
	return false
}

// IsCode returns true when this get cluster too many requests response a status code equal to that given
func (o *GetClusterTooManyRequests) IsCode(code int) bool {
	return code == 429
}

// Code gets the status code for the get cluster too many requests response
func (o *GetClusterTooManyRequests) Code() int {
	return 429
}

func (o *GetClusterTooManyRequests) Error() string {
	return fmt.Sprintf("[GET /api/v1beta/projects/{project_id}/clusters/{cluster_id}][%d] getClusterTooManyRequests  %+v", 429, o.Payload)
}

func (o *GetClusterTooManyRequests) String() string {
	return fmt.Sprintf("[GET /api/v1beta/projects/{project_id}/clusters/{cluster_id}][%d] getClusterTooManyRequests  %+v", 429, o.Payload)
}

func (o *GetClusterTooManyRequests) GetPayload() *GetClusterTooManyRequestsBody {
	return o.Payload
}

func (o *GetClusterTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(GetClusterTooManyRequestsBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewGetClusterInternalServerError creates a GetClusterInternalServerError with default headers values
func NewGetClusterInternalServerError() *GetClusterInternalServerError {
	return &GetClusterInternalServerError{}
}

/*
GetClusterInternalServerError describes a response with status code 500, with default header values.

Server error.
*/
type GetClusterInternalServerError struct {
	Payload *GetClusterInternalServerErrorBody
}

// IsSuccess returns true when this get cluster internal server error response has a 2xx status code
func (o *GetClusterInternalServerError) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this get cluster internal server error response has a 3xx status code
func (o *GetClusterInternalServerError) IsRedirect() bool {
	return false
}

// IsClientError returns true when this get cluster internal server error response has a 4xx status code
func (o *GetClusterInternalServerError) IsClientError() bool {
	return false
}

// IsServerError returns true when this get cluster internal server error response has a 5xx status code
func (o *GetClusterInternalServerError) IsServerError() bool {
	return true
}

// IsCode returns true when this get cluster internal server error response a status code equal to that given
func (o *GetClusterInternalServerError) IsCode(code int) bool {
	return code == 500
}

// Code gets the status code for the get cluster internal server error response
func (o *GetClusterInternalServerError) Code() int {
	return 500
}

func (o *GetClusterInternalServerError) Error() string {
	return fmt.Sprintf("[GET /api/v1beta/projects/{project_id}/clusters/{cluster_id}][%d] getClusterInternalServerError  %+v", 500, o.Payload)
}

func (o *GetClusterInternalServerError) String() string {
	return fmt.Sprintf("[GET /api/v1beta/projects/{project_id}/clusters/{cluster_id}][%d] getClusterInternalServerError  %+v", 500, o.Payload)
}

func (o *GetClusterInternalServerError) GetPayload() *GetClusterInternalServerErrorBody {
	return o.Payload
}

func (o *GetClusterInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(GetClusterInternalServerErrorBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewGetClusterDefault creates a GetClusterDefault with default headers values
func NewGetClusterDefault(code int) *GetClusterDefault {
	return &GetClusterDefault{
		_statusCode: code,
	}
}

/*
GetClusterDefault describes a response with status code -1, with default header values.

An unexpected error response.
*/
type GetClusterDefault struct {
	_statusCode int

	Payload *GetClusterDefaultBody
}

// IsSuccess returns true when this get cluster default response has a 2xx status code
func (o *GetClusterDefault) IsSuccess() bool {
	return o._statusCode/100 == 2
}

// IsRedirect returns true when this get cluster default response has a 3xx status code
func (o *GetClusterDefault) IsRedirect() bool {
	return o._statusCode/100 == 3
}

// IsClientError returns true when this get cluster default response has a 4xx status code
func (o *GetClusterDefault) IsClientError() bool {
	return o._statusCode/100 == 4
}

// IsServerError returns true when this get cluster default response has a 5xx status code
func (o *GetClusterDefault) IsServerError() bool {
	return o._statusCode/100 == 5
}

// IsCode returns true when this get cluster default response a status code equal to that given
func (o *GetClusterDefault) IsCode(code int) bool {
	return o._statusCode == code
}

// Code gets the status code for the get cluster default response
func (o *GetClusterDefault) Code() int {
	return o._statusCode
}

func (o *GetClusterDefault) Error() string {
	return fmt.Sprintf("[GET /api/v1beta/projects/{project_id}/clusters/{cluster_id}][%d] GetCluster default  %+v", o._statusCode, o.Payload)
}

func (o *GetClusterDefault) String() string {
	return fmt.Sprintf("[GET /api/v1beta/projects/{project_id}/clusters/{cluster_id}][%d] GetCluster default  %+v", o._statusCode, o.Payload)
}

func (o *GetClusterDefault) GetPayload() *GetClusterDefaultBody {
	return o.Payload
}

func (o *GetClusterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(GetClusterDefaultBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

/*
GetClusterBadRequestBody get cluster bad request body
swagger:model GetClusterBadRequestBody
*/
type GetClusterBadRequestBody struct {

	// code
	//
	// Error code returned with this error.
	Code int64 `json:"code,omitempty"`

	// details
	//
	// Error details returned with this error.
	Details []string `json:"details"`

	// message
	//
	// Error message returned with this error.
	Message string `json:"message,omitempty"`
}

// Validate validates this get cluster bad request body
func (o *GetClusterBadRequestBody) Validate(formats strfmt.Registry) error {
	return nil
}

// ContextValidate validates this get cluster bad request body based on context it is used
func (o *GetClusterBadRequestBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (o *GetClusterBadRequestBody) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}

// UnmarshalBinary interface implementation
func (o *GetClusterBadRequestBody) UnmarshalBinary(b []byte) error {
	var res GetClusterBadRequestBody
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}

/*
GetClusterDefaultBody get cluster default body
swagger:model GetClusterDefaultBody
*/
type GetClusterDefaultBody struct {

	// code
	Code int32 `json:"code,omitempty"`

	// details
	Details []*GetClusterDefaultBodyDetailsItems0 `json:"details"`

	// message
	Message string `json:"message,omitempty"`
}

// Validate validates this get cluster default body
func (o *GetClusterDefaultBody) Validate(formats strfmt.Registry) error {
	var res []error

	if err := o.validateDetails(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (o *GetClusterDefaultBody) validateDetails(formats strfmt.Registry) error {
	if swag.IsZero(o.Details) { // not required
		return nil
	}

	for i := 0; i < len(o.Details); i++ {
		if swag.IsZero(o.Details[i]) { // not required
			continue
		}

		if o.Details[i] != nil {
			if err := o.Details[i].Validate(formats); err != nil {
				if ve, ok := err.(*errors.Validation); ok {
					return ve.ValidateName("GetCluster default" + "." + "details" + "." + strconv.Itoa(i))
				} else if ce, ok := err.(*errors.CompositeError); ok {
					return ce.ValidateName("GetCluster default" + "." + "details" + "." + strconv.Itoa(i))
				}
				return err
			}
		}

	}

	return nil
}

// ContextValidate validate this get cluster default body based on the context it is used
func (o *GetClusterDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	var res []error

	if err := o.contextValidateDetails(ctx, formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (o *GetClusterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error {

	for i := 0; i < len(o.Details); i++ {

		if o.Details[i] != nil {

			if swag.IsZero(o.Details[i]) { // not required
				return nil
			}

			if err := o.Details[i].ContextValidate(ctx, formats); err != nil {
				if ve, ok := err.(*errors.Validation); ok {
					return ve.ValidateName("GetCluster default" + "." + "details" + "." + strconv.Itoa(i))
				} else if ce, ok := err.(*errors.CompositeError); ok {
					return ce.ValidateName("GetCluster default" + "." + "details" + "." + strconv.Itoa(i))
				}
				return err
			}
		}

	}

	return nil
}

// MarshalBinary interface implementation
func (o *GetClusterDefaultBody) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}

// UnmarshalBinary interface implementation
func (o *GetClusterDefaultBody) UnmarshalBinary(b []byte) error {
	var res GetClusterDefaultBody
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}

/*
GetClusterDefaultBodyDetailsItems0 get cluster default body details items0
swagger:model GetClusterDefaultBodyDetailsItems0
*/
type GetClusterDefaultBodyDetailsItems0 struct {

	// at type
	AtType string `json:"@type,omitempty"`
}

// Validate validates this get cluster default body details items0
func (o *GetClusterDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error {
	return nil
}

// ContextValidate validates this get cluster default body details items0 based on context it is used
func (o *GetClusterDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (o *GetClusterDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}

// UnmarshalBinary interface implementation
func (o *GetClusterDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error {
	var res GetClusterDefaultBodyDetailsItems0
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}

/*
GetClusterForbiddenBody get cluster forbidden body
swagger:model GetClusterForbiddenBody
*/
type GetClusterForbiddenBody struct {

	// code
	//
	// Error code returned with this error.
	Code int64 `json:"code,omitempty"`

	// details
	//
	// Error details returned with this error.
	Details []string `json:"details"`

	// message
	//
	// Error message returned with this error.
	Message string `json:"message,omitempty"`
}

// Validate validates this get cluster forbidden body
func (o *GetClusterForbiddenBody) Validate(formats strfmt.Registry) error {
	return nil
}

// ContextValidate validates this get cluster forbidden body based on context it is used
func (o *GetClusterForbiddenBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (o *GetClusterForbiddenBody) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}

// UnmarshalBinary interface implementation
func (o *GetClusterForbiddenBody) UnmarshalBinary(b []byte) error {
	var res GetClusterForbiddenBody
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}

/*
GetClusterInternalServerErrorBody get cluster internal server error body
swagger:model GetClusterInternalServerErrorBody
*/
type GetClusterInternalServerErrorBody struct {

	// code
	//
	// Error code returned with this error.
	Code int64 `json:"code,omitempty"`

	// details
	//
	// Error details returned with this error.
	Details []string `json:"details"`

	// message
	//
	// Error message returned with this error.
	Message string `json:"message,omitempty"`
}

// Validate validates this get cluster internal server error body
func (o *GetClusterInternalServerErrorBody) Validate(formats strfmt.Registry) error {
	return nil
}

// ContextValidate validates this get cluster internal server error body based on context it is used
func (o *GetClusterInternalServerErrorBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (o *GetClusterInternalServerErrorBody) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}

// UnmarshalBinary interface implementation
func (o *GetClusterInternalServerErrorBody) UnmarshalBinary(b []byte) error {
	var res GetClusterInternalServerErrorBody
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}

/*
GetClusterNotFoundBody get cluster not found body
swagger:model GetClusterNotFoundBody
*/
type GetClusterNotFoundBody struct {

	// code
	//
	// Error code returned with this error.
	Code int64 `json:"code,omitempty"`

	// details
	//
	// Error details returned with this error.
	Details []string `json:"details"`

	// message
	//
	// Error message returned with this error.
	Message string `json:"message,omitempty"`
}

// Validate validates this get cluster not found body
func (o *GetClusterNotFoundBody) Validate(formats strfmt.Registry) error {
	return nil
}

// ContextValidate validates this get cluster not found body based on context it is used
func (o *GetClusterNotFoundBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (o *GetClusterNotFoundBody) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}

// UnmarshalBinary interface implementation
func (o *GetClusterNotFoundBody) UnmarshalBinary(b []byte) error {
	var res GetClusterNotFoundBody
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}

/*
GetClusterOKBody ClusterItem
//
// ClusterItem is the information of cluster.
swagger:model GetClusterOKBody
*/
type GetClusterOKBody struct {

	// The cloud provider on which your TiDB cluster is hosted.
	// - `"AWS"`: the Amazon Web Services cloud provider
	// - `"GCP"`: the Google Cloud cloud provider
	// Example: AWS
	// Enum: [AWS GCP]
	CloudProvider string `json:"cloud_provider,omitempty"`

	// The cluster type:
	// - `"DEVELOPER"`: a [TiDB Serverless](https://docs.pingcap.com/tidbcloud/select-cluster-tier#tidb-serverless) cluster
	// - `"DEDICATED"`: a [TiDB Dedicated](https://docs.pingcap.com/tidbcloud/select-cluster-tier#dedicated-tier) cluster
	//
	// **Warning:** `"DEVELOPER"` will soon be changed to `"SERVERLESS"` to represent TiDB Serverless clusters.
	// Example: DEDICATED
	// Enum: [DEDICATED DEVELOPER]
	ClusterType string `json:"cluster_type,omitempty"`

	// config
	Config *GetClusterOKBodyConfig `json:"config,omitempty"`

	// The creation time of the cluster in Unix timestamp seconds (epoch time).
	// Example: 1656991448
	CreateTimestamp string `json:"create_timestamp,omitempty"`

	// The ID of the cluster.
	// Example: 1
	// Required: true
	ID *string `json:"id"`

	// The name of the cluster.
	// Example: Cluster0
	// Pattern: ^[A-Za-z0-9][-A-Za-z0-9]{2,62}[A-Za-z0-9]$
	Name string `json:"name,omitempty"`

	// The ID of the project.
	// Example: 1
	// Required: true
	ProjectID *string `json:"project_id"`

	// Region of the cluster.
	// Example: us-west-2
	Region string `json:"region,omitempty"`

	// status
	Status *GetClusterOKBodyStatus `json:"status,omitempty"`
}

// Validate validates this get cluster o k body
func (o *GetClusterOKBody) Validate(formats strfmt.Registry) error {
	var res []error

	if err := o.validateCloudProvider(formats); err != nil {
		res = append(res, err)
	}

	if err := o.validateClusterType(formats); err != nil {
		res = append(res, err)
	}

	if err := o.validateConfig(formats); err != nil {
		res = append(res, err)
	}

	if err := o.validateID(formats); err != nil {
		res = append(res, err)
	}

	if err := o.validateName(formats); err != nil {
		res = append(res, err)
	}

	if err := o.validateProjectID(formats); err != nil {
		res = append(res, err)
	}

	if err := o.validateStatus(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

var getClusterOKBodyTypeCloudProviderPropEnum []interface{}

func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["AWS","GCP"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		getClusterOKBodyTypeCloudProviderPropEnum = append(getClusterOKBodyTypeCloudProviderPropEnum, v)
	}
}

const (

	// GetClusterOKBodyCloudProviderAWS captures enum value "AWS"
	GetClusterOKBodyCloudProviderAWS string = "AWS"

	// GetClusterOKBodyCloudProviderGCP captures enum value "GCP"
	GetClusterOKBodyCloudProviderGCP string = "GCP"
)

// prop value enum
func (o *GetClusterOKBody) validateCloudProviderEnum(path, location string, value string) error {
	if err := validate.EnumCase(path, location, value, getClusterOKBodyTypeCloudProviderPropEnum, true); err != nil {
		return err
	}
	return nil
}

func (o *GetClusterOKBody) validateCloudProvider(formats strfmt.Registry) error {
	if swag.IsZero(o.CloudProvider) { // not required
		return nil
	}

	// value enum
	if err := o.validateCloudProviderEnum("getClusterOK"+"."+"cloud_provider", "body", o.CloudProvider); err != nil {
		return err
	}

	return nil
}

var getClusterOKBodyTypeClusterTypePropEnum []interface{}

func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["DEDICATED","DEVELOPER"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		getClusterOKBodyTypeClusterTypePropEnum = append(getClusterOKBodyTypeClusterTypePropEnum, v)
	}
}

const (

	// GetClusterOKBodyClusterTypeDEDICATED captures enum value "DEDICATED"
	GetClusterOKBodyClusterTypeDEDICATED string = "DEDICATED"

	// GetClusterOKBodyClusterTypeDEVELOPER captures enum value "DEVELOPER"
	GetClusterOKBodyClusterTypeDEVELOPER string = "DEVELOPER"
)

// prop value enum
func (o *GetClusterOKBody) validateClusterTypeEnum(path, location string, value string) error {
	if err := validate.EnumCase(path, location, value, getClusterOKBodyTypeClusterTypePropEnum, true); err != nil {
		return err
	}
	return nil
}

func (o *GetClusterOKBody) validateClusterType(formats strfmt.Registry) error {
	if swag.IsZero(o.ClusterType) { // not required
		return nil
	}

	// value enum
	if err := o.validateClusterTypeEnum("getClusterOK"+"."+"cluster_type", "body", o.ClusterType); err != nil {
		return err
	}

	return nil
}

func (o *GetClusterOKBody) validateConfig(formats strfmt.Registry) error {
	if swag.IsZero(o.Config) { // not required
		return nil
	}

	if o.Config != nil {
		if err := o.Config.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("getClusterOK" + "." + "config")
			} else if ce, ok := err.(*errors.CompositeError); ok {
				return ce.ValidateName("getClusterOK" + "." + "config")
			}
			return err
		}
	}

	return nil
}

func (o *GetClusterOKBody) validateID(formats strfmt.Registry) error {

	if err := validate.Required("getClusterOK"+"."+"id", "body", o.ID); err != nil {
		return err
	}

	return nil
}

func (o *GetClusterOKBody) validateName(formats strfmt.Registry) error {
	if swag.IsZero(o.Name) { // not required
		return nil
	}

	if err := validate.Pattern("getClusterOK"+"."+"name", "body", o.Name, `^[A-Za-z0-9][-A-Za-z0-9]{2,62}[A-Za-z0-9]$`); err != nil {
		return err
	}

	return nil
}

func (o *GetClusterOKBody) validateProjectID(formats strfmt.Registry) error {

	if err := validate.Required("getClusterOK"+"."+"project_id", "body", o.ProjectID); err != nil {
		return err
	}

	return nil
}

func (o *GetClusterOKBody) validateStatus(formats strfmt.Registry) error {
	if swag.IsZero(o.Status) { // not required
		return nil
	}

	if o.Status != nil {
		if err := o.Status.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("getClusterOK" + "." + "status")
			} else if ce, ok := err.(*errors.CompositeError); ok {
				return ce.ValidateName("getClusterOK" + "." + "status")
			}
			return err
		}
	}

	return nil
}

// ContextValidate validate this get cluster o k body based on the context it is used
func (o *GetClusterOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	var res []error

	if err := o.contextValidateConfig(ctx, formats); err != nil {
		res = append(res, err)
	}

	if err := o.contextValidateStatus(ctx, formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (o *GetClusterOKBody) contextValidateConfig(ctx context.Context, formats strfmt.Registry) error {

	if o.Config != nil {

		if swag.IsZero(o.Config) { // not required
			return nil
		}

		if err := o.Config.ContextValidate(ctx, formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("getClusterOK" + "." + "config")
			} else if ce, ok := err.(*errors.CompositeError); ok {
				return ce.ValidateName("getClusterOK" + "." + "config")
			}
			return err
		}
	}

	return nil
}

func (o *GetClusterOKBody) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error {

	if o.Status != nil {

		if swag.IsZero(o.Status) { // not required
			return nil
		}

		if err := o.Status.ContextValidate(ctx, formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("getClusterOK" + "." + "status")
			} else if ce, ok := err.(*errors.CompositeError); ok {
				return ce.ValidateName("getClusterOK" + "." + "status")
			}
			return err
		}
	}

	return nil
}

// MarshalBinary interface implementation
func (o *GetClusterOKBody) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}

// UnmarshalBinary interface implementation
func (o *GetClusterOKBody) UnmarshalBinary(b []byte) error {
	var res GetClusterOKBody
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}

/*
GetClusterOKBodyConfig The configuration of the cluster.
// Example: {"components":{"tidb":{"node_quantity":2,"node_size":"8C16G"},"tikv":{"node_quantity":3,"node_size":"8C32G","storage_size_gib":1024}},"port":4000}
swagger:model GetClusterOKBodyConfig
*/
type GetClusterOKBodyConfig struct {

	// components
	Components *GetClusterOKBodyConfigComponents `json:"components,omitempty"`

	// The TiDB port for connection. The port must be in the range of 1024-65535 except 10080.
	// Example: 4000
	// Maximum: 65535
	// Minimum: 1024
	Port int32 `json:"port,omitempty"`
}

// Validate validates this get cluster o k body config
func (o *GetClusterOKBodyConfig) Validate(formats strfmt.Registry) error {
	var res []error

	if err := o.validateComponents(formats); err != nil {
		res = append(res, err)
	}

	if err := o.validatePort(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (o *GetClusterOKBodyConfig) validateComponents(formats strfmt.Registry) error {
	if swag.IsZero(o.Components) { // not required
		return nil
	}

	if o.Components != nil {
		if err := o.Components.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("getClusterOK" + "." + "config" + "." + "components")
			} else if ce, ok := err.(*errors.CompositeError); ok {
				return ce.ValidateName("getClusterOK" + "." + "config" + "." + "components")
			}
			return err
		}
	}

	return nil
}

func (o *GetClusterOKBodyConfig) validatePort(formats strfmt.Registry) error {
	if swag.IsZero(o.Port) { // not required
		return nil
	}

	if err := validate.MinimumInt("getClusterOK"+"."+"config"+"."+"port", "body", int64(o.Port), 1024, false); err != nil {
		return err
	}

	if err := validate.MaximumInt("getClusterOK"+"."+"config"+"."+"port", "body", int64(o.Port), 65535, false); err != nil {
		return err
	}

	return nil
}

// ContextValidate validate this get cluster o k body config based on the context it is used
func (o *GetClusterOKBodyConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	var res []error

	if err := o.contextValidateComponents(ctx, formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (o *GetClusterOKBodyConfig) contextValidateComponents(ctx context.Context, formats strfmt.Registry) error {

	if o.Components != nil {

		if swag.IsZero(o.Components) { // not required
			return nil
		}

		if err := o.Components.ContextValidate(ctx, formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("getClusterOK" + "." + "config" + "." + "components")
			} else if ce, ok := err.(*errors.CompositeError); ok {
				return ce.ValidateName("getClusterOK" + "." + "config" + "." + "components")
			}
			return err
		}
	}

	return nil
}

// MarshalBinary interface implementation
func (o *GetClusterOKBodyConfig) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}

// UnmarshalBinary interface implementation
func (o *GetClusterOKBodyConfig) UnmarshalBinary(b []byte) error {
	var res GetClusterOKBodyConfig
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}

/*
GetClusterOKBodyConfigComponents The components of the cluster.
// Example: {"tidb":{"node_quantity":2,"node_size":"8C16G"},"tikv":{"node_quantity":3,"node_size":"8C32G","storage_size_gib":1024}}
swagger:model GetClusterOKBodyConfigComponents
*/
type GetClusterOKBodyConfigComponents struct {

	// tidb
	// Required: true
	Tidb *GetClusterOKBodyConfigComponentsTidb `json:"tidb"`

	// tiflash
	Tiflash *GetClusterOKBodyConfigComponentsTiflash `json:"tiflash,omitempty"`

	// tikv
	// Required: true
	Tikv *GetClusterOKBodyConfigComponentsTikv `json:"tikv"`
}

// Validate validates this get cluster o k body config components
func (o *GetClusterOKBodyConfigComponents) Validate(formats strfmt.Registry) error {
	var res []error

	if err := o.validateTidb(formats); err != nil {
		res = append(res, err)
	}

	if err := o.validateTiflash(formats); err != nil {
		res = append(res, err)
	}

	if err := o.validateTikv(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (o *GetClusterOKBodyConfigComponents) validateTidb(formats strfmt.Registry) error {

	if err := validate.Required("getClusterOK"+"."+"config"+"."+"components"+"."+"tidb", "body", o.Tidb); err != nil {
		return err
	}

	if o.Tidb != nil {
		if err := o.Tidb.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("getClusterOK" + "." + "config" + "." + "components" + "." + "tidb")
			} else if ce, ok := err.(*errors.CompositeError); ok {
				return ce.ValidateName("getClusterOK" + "." + "config" + "." + "components" + "." + "tidb")
			}
			return err
		}
	}

	return nil
}

func (o *GetClusterOKBodyConfigComponents) validateTiflash(formats strfmt.Registry) error {
	if swag.IsZero(o.Tiflash) { // not required
		return nil
	}

	if o.Tiflash != nil {
		if err := o.Tiflash.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("getClusterOK" + "." + "config" + "." + "components" + "." + "tiflash")
			} else if ce, ok := err.(*errors.CompositeError); ok {
				return ce.ValidateName("getClusterOK" + "." + "config" + "." + "components" + "." + "tiflash")
			}
			return err
		}
	}

	return nil
}

func (o *GetClusterOKBodyConfigComponents) validateTikv(formats strfmt.Registry) error {

	if err := validate.Required("getClusterOK"+"."+"config"+"."+"components"+"."+"tikv", "body", o.Tikv); err != nil {
		return err
	}

	if o.Tikv != nil {
		if err := o.Tikv.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("getClusterOK" + "." + "config" + "." + "components" + "." + "tikv")
			} else if ce, ok := err.(*errors.CompositeError); ok {
				return ce.ValidateName("getClusterOK" + "." + "config" + "." + "components" + "." + "tikv")
			}
			return err
		}
	}

	return nil
}

// ContextValidate validate this get cluster o k body config components based on the context it is used
func (o *GetClusterOKBodyConfigComponents) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	var res []error

	if err := o.contextValidateTidb(ctx, formats); err != nil {
		res = append(res, err)
	}

	if err := o.contextValidateTiflash(ctx, formats); err != nil {
		res = append(res, err)
	}

	if err := o.contextValidateTikv(ctx, formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (o *GetClusterOKBodyConfigComponents) contextValidateTidb(ctx context.Context, formats strfmt.Registry) error {

	if o.Tidb != nil {

		if err := o.Tidb.ContextValidate(ctx, formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("getClusterOK" + "." + "config" + "." + "components" + "." + "tidb")
			} else if ce, ok := err.(*errors.CompositeError); ok {
				return ce.ValidateName("getClusterOK" + "." + "config" + "." + "components" + "." + "tidb")
			}
			return err
		}
	}

	return nil
}

func (o *GetClusterOKBodyConfigComponents) contextValidateTiflash(ctx context.Context, formats strfmt.Registry) error {

	if o.Tiflash != nil {

		if swag.IsZero(o.Tiflash) { // not required
			return nil
		}

		if err := o.Tiflash.ContextValidate(ctx, formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("getClusterOK" + "." + "config" + "." + "components" + "." + "tiflash")
			} else if ce, ok := err.(*errors.CompositeError); ok {
				return ce.ValidateName("getClusterOK" + "." + "config" + "." + "components" + "." + "tiflash")
			}
			return err
		}
	}

	return nil
}

func (o *GetClusterOKBodyConfigComponents) contextValidateTikv(ctx context.Context, formats strfmt.Registry) error {

	if o.Tikv != nil {

		if err := o.Tikv.ContextValidate(ctx, formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("getClusterOK" + "." + "config" + "." + "components" + "." + "tikv")
			} else if ce, ok := err.(*errors.CompositeError); ok {
				return ce.ValidateName("getClusterOK" + "." + "config" + "." + "components" + "." + "tikv")
			}
			return err
		}
	}

	return nil
}

// MarshalBinary interface implementation
func (o *GetClusterOKBodyConfigComponents) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}

// UnmarshalBinary interface implementation
func (o *GetClusterOKBodyConfigComponents) UnmarshalBinary(b []byte) error {
	var res GetClusterOKBodyConfigComponents
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}

/*
GetClusterOKBodyConfigComponentsTidb The TiDB component of the cluster.
swagger:model GetClusterOKBodyConfigComponentsTidb
*/
type GetClusterOKBodyConfigComponentsTidb struct {

	// The number of nodes in the cluster. You can get the minimum and step of a node quantity from the response of [List the cloud providers, regions and available specifications](#tag/Cluster/operation/ListProviderRegions).
	//
	// Example: 2
	// Required: true
	NodeQuantity *int32 `json:"node_quantity"`

	// The size of the TiDB component in the cluster. You can get the available node size of each region from the response of [List the cloud providers, regions and available specifications](#tag/Cluster/operation/ListProviderRegions).
	//
	// **Additional combination rules**:
	// - If the vCPUs of TiDB or TiKV component is 4, then their vCPUs need to be the same.
	// - If the vCPUs of TiDB or TiKV component is 4, then the cluster does not support TiFlash.
	// Example: 8C16G
	// Required: true
	NodeSize *string `json:"node_size"`
}

// Validate validates this get cluster o k body config components tidb
func (o *GetClusterOKBodyConfigComponentsTidb) Validate(formats strfmt.Registry) error {
	var res []error

	if err := o.validateNodeQuantity(formats); err != nil {
		res = append(res, err)
	}

	if err := o.validateNodeSize(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (o *GetClusterOKBodyConfigComponentsTidb) validateNodeQuantity(formats strfmt.Registry) error {

	if err := validate.Required("getClusterOK"+"."+"config"+"."+"components"+"."+"tidb"+"."+"node_quantity", "body", o.NodeQuantity); err != nil {
		return err
	}

	return nil
}

func (o *GetClusterOKBodyConfigComponentsTidb) validateNodeSize(formats strfmt.Registry) error {

	if err := validate.Required("getClusterOK"+"."+"config"+"."+"components"+"."+"tidb"+"."+"node_size", "body", o.NodeSize); err != nil {
		return err
	}

	return nil
}

// ContextValidate validates this get cluster o k body config components tidb based on context it is used
func (o *GetClusterOKBodyConfigComponentsTidb) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (o *GetClusterOKBodyConfigComponentsTidb) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}

// UnmarshalBinary interface implementation
func (o *GetClusterOKBodyConfigComponentsTidb) UnmarshalBinary(b []byte) error {
	var res GetClusterOKBodyConfigComponentsTidb
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}

/*
GetClusterOKBodyConfigComponentsTiflash The TiFlash component of the cluster.
swagger:model GetClusterOKBodyConfigComponentsTiflash
*/
type GetClusterOKBodyConfigComponentsTiflash struct {

	// The number of nodes in the cluster. You can get the minimum and step of a node quantity from the response of [List the cloud providers, regions and available specifications](#tag/Cluster/operation/ListProviderRegions).
	// Example: 1
	// Required: true
	NodeQuantity *int32 `json:"node_quantity"`

	// The size of the TiFlash component in the cluster. You can get the available node size of each region from the response of [List the cloud providers, regions and available specifications](#tag/Cluster/operation/ListProviderRegions).
	//
	// **Additional combination rules**:
	// - If the vCPUs of TiDB or TiKV component is 4, then their vCPUs need to be the same.
	// - If the vCPUs of TiDB or TiKV component is 4, then the cluster does not support TiFlash.
	// Example: 8C64G
	// Required: true
	NodeSize *string `json:"node_size"`

	// The storage size of a node in the cluster. You can get the minimum and maximum of storage size from the response of [List the cloud providers, regions and available specifications](#tag/Cluster/operation/ListProviderRegions).
	//
	// Example: 1024
	// Required: true
	StorageSizeGib *int32 `json:"storage_size_gib"`
}

// Validate validates this get cluster o k body config components tiflash
func (o *GetClusterOKBodyConfigComponentsTiflash) Validate(formats strfmt.Registry) error {
	var res []error

	if err := o.validateNodeQuantity(formats); err != nil {
		res = append(res, err)
	}

	if err := o.validateNodeSize(formats); err != nil {
		res = append(res, err)
	}

	if err := o.validateStorageSizeGib(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (o *GetClusterOKBodyConfigComponentsTiflash) validateNodeQuantity(formats strfmt.Registry) error {

	if err := validate.Required("getClusterOK"+"."+"config"+"."+"components"+"."+"tiflash"+"."+"node_quantity", "body", o.NodeQuantity); err != nil {
		return err
	}

	return nil
}

func (o *GetClusterOKBodyConfigComponentsTiflash) validateNodeSize(formats strfmt.Registry) error {

	if err := validate.Required("getClusterOK"+"."+"config"+"."+"components"+"."+"tiflash"+"."+"node_size", "body", o.NodeSize); err != nil {
		return err
	}

	return nil
}

func (o *GetClusterOKBodyConfigComponentsTiflash) validateStorageSizeGib(formats strfmt.Registry) error {

	if err := validate.Required("getClusterOK"+"."+"config"+"."+"components"+"."+"tiflash"+"."+"storage_size_gib", "body", o.StorageSizeGib); err != nil {
		return err
	}

	return nil
}

// ContextValidate validates this get cluster o k body config components tiflash based on context it is used
func (o *GetClusterOKBodyConfigComponentsTiflash) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (o *GetClusterOKBodyConfigComponentsTiflash) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}

// UnmarshalBinary interface implementation
func (o *GetClusterOKBodyConfigComponentsTiflash) UnmarshalBinary(b []byte) error {
	var res GetClusterOKBodyConfigComponentsTiflash
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}

/*
GetClusterOKBodyConfigComponentsTikv The TiKV component of the cluster.
swagger:model GetClusterOKBodyConfigComponentsTikv
*/
type GetClusterOKBodyConfigComponentsTikv struct {

	// The number of nodes in the cluster. You can get the minimum and step of a node quantity from the response of [List the cloud providers, regions and available specifications](#tag/Cluster/operation/ListProviderRegions).
	//
	// **Limitations**:
	// - The `node_quantity` of TiKV must be a multiple of 3.
	// Example: 3
	// Required: true
	NodeQuantity *int32 `json:"node_quantity"`

	// The size of the TiKV component in the cluster. You can get the available node size of each region from the response of [List the cloud providers, regions and available specifications](#tag/Cluster/operation/ListProviderRegions).
	//
	// **Additional combination rules**:
	// - If the vCPUs of TiDB or TiKV component is 4, then their vCPUs need to be the same.
	// - If the vCPUs of TiDB or TiKV component is 4, then the cluster does not support TiFlash.
	// Example: 8C64G
	// Required: true
	NodeSize *string `json:"node_size"`

	// The storage size of a node in the cluster. You can get the minimum and maximum of storage size from the response of [List the cloud providers, regions and available specifications](#tag/Cluster/operation/ListProviderRegions).
	// Example: 1024
	// Required: true
	StorageSizeGib *int32 `json:"storage_size_gib"`
}

// Validate validates this get cluster o k body config components tikv
func (o *GetClusterOKBodyConfigComponentsTikv) Validate(formats strfmt.Registry) error {
	var res []error

	if err := o.validateNodeQuantity(formats); err != nil {
		res = append(res, err)
	}

	if err := o.validateNodeSize(formats); err != nil {
		res = append(res, err)
	}

	if err := o.validateStorageSizeGib(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (o *GetClusterOKBodyConfigComponentsTikv) validateNodeQuantity(formats strfmt.Registry) error {

	if err := validate.Required("getClusterOK"+"."+"config"+"."+"components"+"."+"tikv"+"."+"node_quantity", "body", o.NodeQuantity); err != nil {
		return err
	}

	return nil
}

func (o *GetClusterOKBodyConfigComponentsTikv) validateNodeSize(formats strfmt.Registry) error {

	if err := validate.Required("getClusterOK"+"."+"config"+"."+"components"+"."+"tikv"+"."+"node_size", "body", o.NodeSize); err != nil {
		return err
	}

	return nil
}

func (o *GetClusterOKBodyConfigComponentsTikv) validateStorageSizeGib(formats strfmt.Registry) error {

	if err := validate.Required("getClusterOK"+"."+"config"+"."+"components"+"."+"tikv"+"."+"storage_size_gib", "body", o.StorageSizeGib); err != nil {
		return err
	}

	return nil
}

// ContextValidate validates this get cluster o k body config components tikv based on context it is used
func (o *GetClusterOKBodyConfigComponentsTikv) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (o *GetClusterOKBodyConfigComponentsTikv) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}

// UnmarshalBinary interface implementation
func (o *GetClusterOKBodyConfigComponentsTikv) UnmarshalBinary(b []byte) error {
	var res GetClusterOKBodyConfigComponentsTikv
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}

/*
GetClusterOKBodyStatus ClusterItemStatus
//
// The status of the cluster.
swagger:model GetClusterOKBodyStatus
*/
type GetClusterOKBodyStatus struct {

	// Status of the cluster.
	// Example: AVAILABLE
	// Enum: [AVAILABLE CREATING MODIFYING PAUSED RESUMING UNAVAILABLE IMPORTING MAINTAINING PAUSING]
	ClusterStatus string `json:"cluster_status,omitempty"`

	// connection strings
	ConnectionStrings *GetClusterOKBodyStatusConnectionStrings `json:"connection_strings,omitempty"`

	// node map
	NodeMap *GetClusterOKBodyStatusNodeMap `json:"node_map,omitempty"`

	// TiDB version.
	// Example: v6.1.0
	TidbVersion string `json:"tidb_version,omitempty"`
}

// Validate validates this get cluster o k body status
func (o *GetClusterOKBodyStatus) Validate(formats strfmt.Registry) error {
	var res []error

	if err := o.validateClusterStatus(formats); err != nil {
		res = append(res, err)
	}

	if err := o.validateConnectionStrings(formats); err != nil {
		res = append(res, err)
	}

	if err := o.validateNodeMap(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

var getClusterOKBodyStatusTypeClusterStatusPropEnum []interface{}

func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["AVAILABLE","CREATING","MODIFYING","PAUSED","RESUMING","UNAVAILABLE","IMPORTING","MAINTAINING","PAUSING"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		getClusterOKBodyStatusTypeClusterStatusPropEnum = append(getClusterOKBodyStatusTypeClusterStatusPropEnum, v)
	}
}

const (

	// GetClusterOKBodyStatusClusterStatusAVAILABLE captures enum value "AVAILABLE"
	GetClusterOKBodyStatusClusterStatusAVAILABLE string = "AVAILABLE"

	// GetClusterOKBodyStatusClusterStatusCREATING captures enum value "CREATING"
	GetClusterOKBodyStatusClusterStatusCREATING string = "CREATING"

	// GetClusterOKBodyStatusClusterStatusMODIFYING captures enum value "MODIFYING"
	GetClusterOKBodyStatusClusterStatusMODIFYING string = "MODIFYING"

	// GetClusterOKBodyStatusClusterStatusPAUSED captures enum value "PAUSED"
	GetClusterOKBodyStatusClusterStatusPAUSED string = "PAUSED"

	// GetClusterOKBodyStatusClusterStatusRESUMING captures enum value "RESUMING"
	GetClusterOKBodyStatusClusterStatusRESUMING string = "RESUMING"

	// GetClusterOKBodyStatusClusterStatusUNAVAILABLE captures enum value "UNAVAILABLE"
	GetClusterOKBodyStatusClusterStatusUNAVAILABLE string = "UNAVAILABLE"

	// GetClusterOKBodyStatusClusterStatusIMPORTING captures enum value "IMPORTING"
	GetClusterOKBodyStatusClusterStatusIMPORTING string = "IMPORTING"

	// GetClusterOKBodyStatusClusterStatusMAINTAINING captures enum value "MAINTAINING"
	GetClusterOKBodyStatusClusterStatusMAINTAINING string = "MAINTAINING"

	// GetClusterOKBodyStatusClusterStatusPAUSING captures enum value "PAUSING"
	GetClusterOKBodyStatusClusterStatusPAUSING string = "PAUSING"
)

// prop value enum
func (o *GetClusterOKBodyStatus) validateClusterStatusEnum(path, location string, value string) error {
	if err := validate.EnumCase(path, location, value, getClusterOKBodyStatusTypeClusterStatusPropEnum, true); err != nil {
		return err
	}
	return nil
}

func (o *GetClusterOKBodyStatus) validateClusterStatus(formats strfmt.Registry) error {
	if swag.IsZero(o.ClusterStatus) { // not required
		return nil
	}

	// value enum
	if err := o.validateClusterStatusEnum("getClusterOK"+"."+"status"+"."+"cluster_status", "body", o.ClusterStatus); err != nil {
		return err
	}

	return nil
}

func (o *GetClusterOKBodyStatus) validateConnectionStrings(formats strfmt.Registry) error {
	if swag.IsZero(o.ConnectionStrings) { // not required
		return nil
	}

	if o.ConnectionStrings != nil {
		if err := o.ConnectionStrings.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("getClusterOK" + "." + "status" + "." + "connection_strings")
			} else if ce, ok := err.(*errors.CompositeError); ok {
				return ce.ValidateName("getClusterOK" + "." + "status" + "." + "connection_strings")
			}
			return err
		}
	}

	return nil
}

func (o *GetClusterOKBodyStatus) validateNodeMap(formats strfmt.Registry) error {
	if swag.IsZero(o.NodeMap) { // not required
		return nil
	}

	if o.NodeMap != nil {
		if err := o.NodeMap.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("getClusterOK" + "." + "status" + "." + "node_map")
			} else if ce, ok := err.(*errors.CompositeError); ok {
				return ce.ValidateName("getClusterOK" + "." + "status" + "." + "node_map")
			}
			return err
		}
	}

	return nil
}

// ContextValidate validate this get cluster o k body status based on the context it is used
func (o *GetClusterOKBodyStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	var res []error

	if err := o.contextValidateConnectionStrings(ctx, formats); err != nil {
		res = append(res, err)
	}

	if err := o.contextValidateNodeMap(ctx, formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (o *GetClusterOKBodyStatus) contextValidateConnectionStrings(ctx context.Context, formats strfmt.Registry) error {

	if o.ConnectionStrings != nil {

		if swag.IsZero(o.ConnectionStrings) { // not required
			return nil
		}

		if err := o.ConnectionStrings.ContextValidate(ctx, formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("getClusterOK" + "." + "status" + "." + "connection_strings")
			} else if ce, ok := err.(*errors.CompositeError); ok {
				return ce.ValidateName("getClusterOK" + "." + "status" + "." + "connection_strings")
			}
			return err
		}
	}

	return nil
}

func (o *GetClusterOKBodyStatus) contextValidateNodeMap(ctx context.Context, formats strfmt.Registry) error {

	if o.NodeMap != nil {

		if swag.IsZero(o.NodeMap) { // not required
			return nil
		}

		if err := o.NodeMap.ContextValidate(ctx, formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("getClusterOK" + "." + "status" + "." + "node_map")
			} else if ce, ok := err.(*errors.CompositeError); ok {
				return ce.ValidateName("getClusterOK" + "." + "status" + "." + "node_map")
			}
			return err
		}
	}

	return nil
}

// MarshalBinary interface implementation
func (o *GetClusterOKBodyStatus) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}

// UnmarshalBinary interface implementation
func (o *GetClusterOKBodyStatus) UnmarshalBinary(b []byte) error {
	var res GetClusterOKBodyStatus
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}

/*
GetClusterOKBodyStatusConnectionStrings Connection strings.
swagger:model GetClusterOKBodyStatusConnectionStrings
*/
type GetClusterOKBodyStatusConnectionStrings struct {

	// The default TiDB user for connection.
	// Example: root
	DefaultUser string `json:"default_user,omitempty"`

	// standard
	Standard *GetClusterOKBodyStatusConnectionStringsStandard `json:"standard,omitempty"`

	// vpc peering
	VpcPeering *GetClusterOKBodyStatusConnectionStringsVpcPeering `json:"vpc_peering,omitempty"`
}

// Validate validates this get cluster o k body status connection strings
func (o *GetClusterOKBodyStatusConnectionStrings) Validate(formats strfmt.Registry) error {
	var res []error

	if err := o.validateStandard(formats); err != nil {
		res = append(res, err)
	}

	if err := o.validateVpcPeering(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (o *GetClusterOKBodyStatusConnectionStrings) validateStandard(formats strfmt.Registry) error {
	if swag.IsZero(o.Standard) { // not required
		return nil
	}

	if o.Standard != nil {
		if err := o.Standard.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("getClusterOK" + "." + "status" + "." + "connection_strings" + "." + "standard")
			} else if ce, ok := err.(*errors.CompositeError); ok {
				return ce.ValidateName("getClusterOK" + "." + "status" + "." + "connection_strings" + "." + "standard")
			}
			return err
		}
	}

	return nil
}

func (o *GetClusterOKBodyStatusConnectionStrings) validateVpcPeering(formats strfmt.Registry) error {
	if swag.IsZero(o.VpcPeering) { // not required
		return nil
	}

	if o.VpcPeering != nil {
		if err := o.VpcPeering.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("getClusterOK" + "." + "status" + "." + "connection_strings" + "." + "vpc_peering")
			} else if ce, ok := err.(*errors.CompositeError); ok {
				return ce.ValidateName("getClusterOK" + "." + "status" + "." + "connection_strings" + "." + "vpc_peering")
			}
			return err
		}
	}

	return nil
}

// ContextValidate validate this get cluster o k body status connection strings based on the context it is used
func (o *GetClusterOKBodyStatusConnectionStrings) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	var res []error

	if err := o.contextValidateStandard(ctx, formats); err != nil {
		res = append(res, err)
	}

	if err := o.contextValidateVpcPeering(ctx, formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (o *GetClusterOKBodyStatusConnectionStrings) contextValidateStandard(ctx context.Context, formats strfmt.Registry) error {

	if o.Standard != nil {

		if swag.IsZero(o.Standard) { // not required
			return nil
		}

		if err := o.Standard.ContextValidate(ctx, formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("getClusterOK" + "." + "status" + "." + "connection_strings" + "." + "standard")
			} else if ce, ok := err.(*errors.CompositeError); ok {
				return ce.ValidateName("getClusterOK" + "." + "status" + "." + "connection_strings" + "." + "standard")
			}
			return err
		}
	}

	return nil
}

func (o *GetClusterOKBodyStatusConnectionStrings) contextValidateVpcPeering(ctx context.Context, formats strfmt.Registry) error {

	if o.VpcPeering != nil {

		if swag.IsZero(o.VpcPeering) { // not required
			return nil
		}

		if err := o.VpcPeering.ContextValidate(ctx, formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("getClusterOK" + "." + "status" + "." + "connection_strings" + "." + "vpc_peering")
			} else if ce, ok := err.(*errors.CompositeError); ok {
				return ce.ValidateName("getClusterOK" + "." + "status" + "." + "connection_strings" + "." + "vpc_peering")
			}
			return err
		}
	}

	return nil
}

// MarshalBinary interface implementation
func (o *GetClusterOKBodyStatusConnectionStrings) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}

// UnmarshalBinary interface implementation
func (o *GetClusterOKBodyStatusConnectionStrings) UnmarshalBinary(b []byte) error {
	var res GetClusterOKBodyStatusConnectionStrings
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}

/*
GetClusterOKBodyStatusConnectionStringsStandard Standard connection string.
//
// You must configure the [IP Access List](https://docs.pingcap.com/tidbcloud/connect-to-tidb-cluster#connect-via-standard-connection) for the cluster you created on [TiDB Cloud console](https://tidbcloud.com/) before connecting to this connection string.
swagger:model GetClusterOKBodyStatusConnectionStringsStandard
*/
type GetClusterOKBodyStatusConnectionStringsStandard struct {

	// The host of standard connection.
	// Example: tidb.f69f3808.acea1f2a.us-east-1.shared.aws.tidbcloud.com
	Host string `json:"host,omitempty"`

	// The TiDB port for connection. The port must be in the range of 1024-65535 except 10080.
	//
	// **Limitations**:
	// - For a TiDB Serverless cluster, only port `4000` is available.
	// Example: 4000
	// Maximum: 65535
	// Minimum: 1024
	Port int32 `json:"port,omitempty"`
}

// Validate validates this get cluster o k body status connection strings standard
func (o *GetClusterOKBodyStatusConnectionStringsStandard) Validate(formats strfmt.Registry) error {
	var res []error

	if err := o.validatePort(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (o *GetClusterOKBodyStatusConnectionStringsStandard) validatePort(formats strfmt.Registry) error {
	if swag.IsZero(o.Port) { // not required
		return nil
	}

	if err := validate.MinimumInt("getClusterOK"+"."+"status"+"."+"connection_strings"+"."+"standard"+"."+"port", "body", int64(o.Port), 1024, false); err != nil {
		return err
	}

	if err := validate.MaximumInt("getClusterOK"+"."+"status"+"."+"connection_strings"+"."+"standard"+"."+"port", "body", int64(o.Port), 65535, false); err != nil {
		return err
	}

	return nil
}

// ContextValidate validates this get cluster o k body status connection strings standard based on context it is used
func (o *GetClusterOKBodyStatusConnectionStringsStandard) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (o *GetClusterOKBodyStatusConnectionStringsStandard) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}

// UnmarshalBinary interface implementation
func (o *GetClusterOKBodyStatusConnectionStringsStandard) UnmarshalBinary(b []byte) error {
	var res GetClusterOKBodyStatusConnectionStringsStandard
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}

/*
GetClusterOKBodyStatusConnectionStringsVpcPeering [VPC peering](https://docs.pingcap.com/tidbcloud/tidb-cloud-glossary#vpc-peering) connection string.
//
// You must [Set up VPC peering connections](https://docs.pingcap.com/tidbcloud/set-up-vpc-peering-connections) for the project before connecting to this private connection string.
swagger:model GetClusterOKBodyStatusConnectionStringsVpcPeering
*/
type GetClusterOKBodyStatusConnectionStringsVpcPeering struct {

	// The host of VPC peering connection.
	// Example: private-tidb.f69f3808.acea1f2a.us-east-1.shared.aws.tidbcloud.com
	Host string `json:"host,omitempty"`

	// The TiDB port for connection. The port must be in the range of 1024-65535 except 10080.
	//
	// **Limitations**:
	// - For a TiDB Serverless cluster, only port `4000` is available.
	// Example: 4000
	// Maximum: 65535
	// Minimum: 1024
	Port int32 `json:"port,omitempty"`
}

// Validate validates this get cluster o k body status connection strings vpc peering
func (o *GetClusterOKBodyStatusConnectionStringsVpcPeering) Validate(formats strfmt.Registry) error {
	var res []error

	if err := o.validatePort(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (o *GetClusterOKBodyStatusConnectionStringsVpcPeering) validatePort(formats strfmt.Registry) error {
	if swag.IsZero(o.Port) { // not required
		return nil
	}

	if err := validate.MinimumInt("getClusterOK"+"."+"status"+"."+"connection_strings"+"."+"vpc_peering"+"."+"port", "body", int64(o.Port), 1024, false); err != nil {
		return err
	}

	if err := validate.MaximumInt("getClusterOK"+"."+"status"+"."+"connection_strings"+"."+"vpc_peering"+"."+"port", "body", int64(o.Port), 65535, false); err != nil {
		return err
	}

	return nil
}

// ContextValidate validates this get cluster o k body status connection strings vpc peering based on context it is used
func (o *GetClusterOKBodyStatusConnectionStringsVpcPeering) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (o *GetClusterOKBodyStatusConnectionStringsVpcPeering) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}

// UnmarshalBinary interface implementation
func (o *GetClusterOKBodyStatusConnectionStringsVpcPeering) UnmarshalBinary(b []byte) error {
	var res GetClusterOKBodyStatusConnectionStringsVpcPeering
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}

/*
GetClusterOKBodyStatusNodeMap Node map. The `node_map` is returned only when the `cluster_status` is `"AVAILABLE"` or `"MODIFYING"`.
swagger:model GetClusterOKBodyStatusNodeMap
*/
type GetClusterOKBodyStatusNodeMap struct {

	// TiDB node map.
	// Example: [{"availability_zone":"us-west-2a","node_name":"tidb-0","node_size":"8C16G","ram_bytes":"17179869184","status":"NODE_STATUS_AVAILABLE","vcpu_num":8},{"availability_zone":"us-west-2b","node_name":"tidb-1","node_size":"8C16G","ram_bytes":"17179869184","status":"NODE_STATUS_AVAILABLE","vcpu_num":8}]
	// Required: true
	Tidb []*GetClusterOKBodyStatusNodeMapTidbItems0 `json:"tidb"`

	// TiFlash node map.
	// Example: [{"availability_zone":"us-west-2a","node_name":"tiflash-0","node_size":"8C64G","ram_bytes":"68719476736","status":"NODE_STATUS_AVAILABLE","storage_size_gib":1024,"vcpu_num":8},{"availability_zone":"us-west-2b","node_name":"tiflash-1","node_size":"8C64G","ram_bytes":"68719476736","status":"NODE_STATUS_AVAILABLE","storage_size_gib":1024,"vcpu_num":8}]
	Tiflash []*GetClusterOKBodyStatusNodeMapTiflashItems0 `json:"tiflash"`

	// TiKV node map.
	// Example: [{"availability_zone":"us-west-2a","node_name":"tikv-0","node_size":"8C32G","ram_bytes":"68719476736","status":"NODE_STATUS_AVAILABLE","storage_size_gib":1024,"vcpu_num":8},{"availability_zone":"us-west-2b","node_name":"tikv-1","node_size":"8C64G","ram_bytes":"68719476736","status":"NODE_STATUS_AVAILABLE","storage_size_gib":1024,"vcpu_num":8},{"availability_zone":"us-west-2c","node_name":"tikv-2","node_size":"8C64G","ram_bytes":"68719476736","status":"NODE_STATUS_AVAILABLE","storage_size_gib":1024,"vcpu_num":8}]
	// Required: true
	Tikv []*GetClusterOKBodyStatusNodeMapTikvItems0 `json:"tikv"`
}

// Validate validates this get cluster o k body status node map
func (o *GetClusterOKBodyStatusNodeMap) Validate(formats strfmt.Registry) error {
	var res []error

	if err := o.validateTidb(formats); err != nil {
		res = append(res, err)
	}

	if err := o.validateTiflash(formats); err != nil {
		res = append(res, err)
	}

	if err := o.validateTikv(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (o *GetClusterOKBodyStatusNodeMap) validateTidb(formats strfmt.Registry) error {

	if err := validate.Required("getClusterOK"+"."+"status"+"."+"node_map"+"."+"tidb", "body", o.Tidb); err != nil {
		return err
	}

	for i := 0; i < len(o.Tidb); i++ {
		if swag.IsZero(o.Tidb[i]) { // not required
			continue
		}

		if o.Tidb[i] != nil {
			if err := o.Tidb[i].Validate(formats); err != nil {
				if ve, ok := err.(*errors.Validation); ok {
					return ve.ValidateName("getClusterOK" + "." + "status" + "." + "node_map" + "." + "tidb" + "." + strconv.Itoa(i))
				} else if ce, ok := err.(*errors.CompositeError); ok {
					return ce.ValidateName("getClusterOK" + "." + "status" + "." + "node_map" + "." + "tidb" + "." + strconv.Itoa(i))
				}
				return err
			}
		}

	}

	return nil
}

func (o *GetClusterOKBodyStatusNodeMap) validateTiflash(formats strfmt.Registry) error {
	if swag.IsZero(o.Tiflash) { // not required
		return nil
	}

	for i := 0; i < len(o.Tiflash); i++ {
		if swag.IsZero(o.Tiflash[i]) { // not required
			continue
		}

		if o.Tiflash[i] != nil {
			if err := o.Tiflash[i].Validate(formats); err != nil {
				if ve, ok := err.(*errors.Validation); ok {
					return ve.ValidateName("getClusterOK" + "." + "status" + "." + "node_map" + "." + "tiflash" + "." + strconv.Itoa(i))
				} else if ce, ok := err.(*errors.CompositeError); ok {
					return ce.ValidateName("getClusterOK" + "." + "status" + "." + "node_map" + "." + "tiflash" + "." + strconv.Itoa(i))
				}
				return err
			}
		}

	}

	return nil
}

func (o *GetClusterOKBodyStatusNodeMap) validateTikv(formats strfmt.Registry) error {

	if err := validate.Required("getClusterOK"+"."+"status"+"."+"node_map"+"."+"tikv", "body", o.Tikv); err != nil {
		return err
	}

	for i := 0; i < len(o.Tikv); i++ {
		if swag.IsZero(o.Tikv[i]) { // not required
			continue
		}

		if o.Tikv[i] != nil {
			if err := o.Tikv[i].Validate(formats); err != nil {
				if ve, ok := err.(*errors.Validation); ok {
					return ve.ValidateName("getClusterOK" + "." + "status" + "." + "node_map" + "." + "tikv" + "." + strconv.Itoa(i))
				} else if ce, ok := err.(*errors.CompositeError); ok {
					return ce.ValidateName("getClusterOK" + "." + "status" + "." + "node_map" + "." + "tikv" + "." + strconv.Itoa(i))
				}
				return err
			}
		}

	}

	return nil
}

// ContextValidate validate this get cluster o k body status node map based on the context it is used
func (o *GetClusterOKBodyStatusNodeMap) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	var res []error

	if err := o.contextValidateTidb(ctx, formats); err != nil {
		res = append(res, err)
	}

	if err := o.contextValidateTiflash(ctx, formats); err != nil {
		res = append(res, err)
	}

	if err := o.contextValidateTikv(ctx, formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (o *GetClusterOKBodyStatusNodeMap) contextValidateTidb(ctx context.Context, formats strfmt.Registry) error {

	for i := 0; i < len(o.Tidb); i++ {

		if o.Tidb[i] != nil {

			if swag.IsZero(o.Tidb[i]) { // not required
				return nil
			}

			if err := o.Tidb[i].ContextValidate(ctx, formats); err != nil {
				if ve, ok := err.(*errors.Validation); ok {
					return ve.ValidateName("getClusterOK" + "." + "status" + "." + "node_map" + "." + "tidb" + "." + strconv.Itoa(i))
				} else if ce, ok := err.(*errors.CompositeError); ok {
					return ce.ValidateName("getClusterOK" + "." + "status" + "." + "node_map" + "." + "tidb" + "." + strconv.Itoa(i))
				}
				return err
			}
		}

	}

	return nil
}

func (o *GetClusterOKBodyStatusNodeMap) contextValidateTiflash(ctx context.Context, formats strfmt.Registry) error {

	for i := 0; i < len(o.Tiflash); i++ {

		if o.Tiflash[i] != nil {

			if swag.IsZero(o.Tiflash[i]) { // not required
				return nil
			}

			if err := o.Tiflash[i].ContextValidate(ctx, formats); err != nil {
				if ve, ok := err.(*errors.Validation); ok {
					return ve.ValidateName("getClusterOK" + "." + "status" + "." + "node_map" + "." + "tiflash" + "." + strconv.Itoa(i))
				} else if ce, ok := err.(*errors.CompositeError); ok {
					return ce.ValidateName("getClusterOK" + "." + "status" + "." + "node_map" + "." + "tiflash" + "." + strconv.Itoa(i))
				}
				return err
			}
		}

	}

	return nil
}

func (o *GetClusterOKBodyStatusNodeMap) contextValidateTikv(ctx context.Context, formats strfmt.Registry) error {

	for i := 0; i < len(o.Tikv); i++ {

		if o.Tikv[i] != nil {

			if swag.IsZero(o.Tikv[i]) { // not required
				return nil
			}

			if err := o.Tikv[i].ContextValidate(ctx, formats); err != nil {
				if ve, ok := err.(*errors.Validation); ok {
					return ve.ValidateName("getClusterOK" + "." + "status" + "." + "node_map" + "." + "tikv" + "." + strconv.Itoa(i))
				} else if ce, ok := err.(*errors.CompositeError); ok {
					return ce.ValidateName("getClusterOK" + "." + "status" + "." + "node_map" + "." + "tikv" + "." + strconv.Itoa(i))
				}
				return err
			}
		}

	}

	return nil
}

// MarshalBinary interface implementation
func (o *GetClusterOKBodyStatusNodeMap) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}

// UnmarshalBinary interface implementation
func (o *GetClusterOKBodyStatusNodeMap) UnmarshalBinary(b []byte) error {
	var res GetClusterOKBodyStatusNodeMap
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}

/*
GetClusterOKBodyStatusNodeMapTidbItems0 get cluster o k body status node map tidb items0
swagger:model GetClusterOKBodyStatusNodeMapTidbItems0
*/
type GetClusterOKBodyStatusNodeMapTidbItems0 struct {

	// The availability zone of a node in the cluster.
	// Example: us-west-2a
	AvailabilityZone string `json:"availability_zone,omitempty"`

	// The name of a node in the cluster.
	// Example: tidb-0
	NodeName string `json:"node_name,omitempty"`

	// The size of the TiDB component in the cluster.
	// Example: 8C16G
	NodeSize string `json:"node_size,omitempty"`

	// The RAM size of a node in the cluster. If the `cluster_type` is `"DEVELOPER"`, `ram_bytes` is always 0.
	// Example: 17179869184
	RAMBytes string `json:"ram_bytes,omitempty"`

	// The status of a node in the cluster.
	// Example: NODE_STATUS_AVAILABLE
	// Enum: [NODE_STATUS_AVAILABLE NODE_STATUS_UNAVAILABLE NODE_STATUS_CREATING NODE_STATUS_DELETING]
	Status string `json:"status,omitempty"`

	// The total vCPUs of a node in the cluster. If the `cluster_type` is `"DEVELOPER"`, `vcpu_num` is always 0.
	// Example: 8
	VcpuNum int32 `json:"vcpu_num,omitempty"`
}

// Validate validates this get cluster o k body status node map tidb items0
func (o *GetClusterOKBodyStatusNodeMapTidbItems0) Validate(formats strfmt.Registry) error {
	var res []error

	if err := o.validateStatus(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

var getClusterOKBodyStatusNodeMapTidbItems0TypeStatusPropEnum []interface{}

func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["NODE_STATUS_AVAILABLE","NODE_STATUS_UNAVAILABLE","NODE_STATUS_CREATING","NODE_STATUS_DELETING"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		getClusterOKBodyStatusNodeMapTidbItems0TypeStatusPropEnum = append(getClusterOKBodyStatusNodeMapTidbItems0TypeStatusPropEnum, v)
	}
}

const (

	// GetClusterOKBodyStatusNodeMapTidbItems0StatusNODESTATUSAVAILABLE captures enum value "NODE_STATUS_AVAILABLE"
	GetClusterOKBodyStatusNodeMapTidbItems0StatusNODESTATUSAVAILABLE string = "NODE_STATUS_AVAILABLE"

	// GetClusterOKBodyStatusNodeMapTidbItems0StatusNODESTATUSUNAVAILABLE captures enum value "NODE_STATUS_UNAVAILABLE"
	GetClusterOKBodyStatusNodeMapTidbItems0StatusNODESTATUSUNAVAILABLE string = "NODE_STATUS_UNAVAILABLE"

	// GetClusterOKBodyStatusNodeMapTidbItems0StatusNODESTATUSCREATING captures enum value "NODE_STATUS_CREATING"
	GetClusterOKBodyStatusNodeMapTidbItems0StatusNODESTATUSCREATING string = "NODE_STATUS_CREATING"

	// GetClusterOKBodyStatusNodeMapTidbItems0StatusNODESTATUSDELETING captures enum value "NODE_STATUS_DELETING"
	GetClusterOKBodyStatusNodeMapTidbItems0StatusNODESTATUSDELETING string = "NODE_STATUS_DELETING"
)

// prop value enum
func (o *GetClusterOKBodyStatusNodeMapTidbItems0) validateStatusEnum(path, location string, value string) error {
	if err := validate.EnumCase(path, location, value, getClusterOKBodyStatusNodeMapTidbItems0TypeStatusPropEnum, true); err != nil {
		return err
	}
	return nil
}

func (o *GetClusterOKBodyStatusNodeMapTidbItems0) validateStatus(formats strfmt.Registry) error {
	if swag.IsZero(o.Status) { // not required
		return nil
	}

	// value enum
	if err := o.validateStatusEnum("status", "body", o.Status); err != nil {
		return err
	}

	return nil
}

// ContextValidate validates this get cluster o k body status node map tidb items0 based on context it is used
func (o *GetClusterOKBodyStatusNodeMapTidbItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (o *GetClusterOKBodyStatusNodeMapTidbItems0) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}

// UnmarshalBinary interface implementation
func (o *GetClusterOKBodyStatusNodeMapTidbItems0) UnmarshalBinary(b []byte) error {
	var res GetClusterOKBodyStatusNodeMapTidbItems0
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}

/*
GetClusterOKBodyStatusNodeMapTiflashItems0 get cluster o k body status node map tiflash items0
swagger:model GetClusterOKBodyStatusNodeMapTiflashItems0
*/
type GetClusterOKBodyStatusNodeMapTiflashItems0 struct {

	// The availability zone of a node in the cluster.
	// Example: us-west-2a
	AvailabilityZone string `json:"availability_zone,omitempty"`

	// The name of a node in the cluster.
	// Example: tiflash-0
	NodeName string `json:"node_name,omitempty"`

	// The size of the TiFlash component in the cluster.
	// Example: 8C64G
	NodeSize string `json:"node_size,omitempty"`

	// The RAM size of a node in the cluster. If the `cluster_type` is `"DEVELOPER"`, `ram_bytes` is always 0.
	// Example: 68719476736
	RAMBytes string `json:"ram_bytes,omitempty"`

	// The status of a node in the cluster.
	// Example: NODE_STATUS_AVAILABLE
	// Enum: [NODE_STATUS_AVAILABLE NODE_STATUS_UNAVAILABLE NODE_STATUS_CREATING NODE_STATUS_DELETING]
	Status string `json:"status,omitempty"`

	// The storage size of a node in the cluster.
	// Example: 1024
	StorageSizeGib int32 `json:"storage_size_gib,omitempty"`

	// The total vCPUs of a node in the cluster. If the `cluster_type` is `"DEVELOPER"`, `vcpu_num` is always 0.
	// Example: 8
	VcpuNum int32 `json:"vcpu_num,omitempty"`
}

// Validate validates this get cluster o k body status node map tiflash items0
func (o *GetClusterOKBodyStatusNodeMapTiflashItems0) Validate(formats strfmt.Registry) error {
	var res []error

	if err := o.validateStatus(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

var getClusterOKBodyStatusNodeMapTiflashItems0TypeStatusPropEnum []interface{}

func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["NODE_STATUS_AVAILABLE","NODE_STATUS_UNAVAILABLE","NODE_STATUS_CREATING","NODE_STATUS_DELETING"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		getClusterOKBodyStatusNodeMapTiflashItems0TypeStatusPropEnum = append(getClusterOKBodyStatusNodeMapTiflashItems0TypeStatusPropEnum, v)
	}
}

const (

	// GetClusterOKBodyStatusNodeMapTiflashItems0StatusNODESTATUSAVAILABLE captures enum value "NODE_STATUS_AVAILABLE"
	GetClusterOKBodyStatusNodeMapTiflashItems0StatusNODESTATUSAVAILABLE string = "NODE_STATUS_AVAILABLE"

	// GetClusterOKBodyStatusNodeMapTiflashItems0StatusNODESTATUSUNAVAILABLE captures enum value "NODE_STATUS_UNAVAILABLE"
	GetClusterOKBodyStatusNodeMapTiflashItems0StatusNODESTATUSUNAVAILABLE string = "NODE_STATUS_UNAVAILABLE"

	// GetClusterOKBodyStatusNodeMapTiflashItems0StatusNODESTATUSCREATING captures enum value "NODE_STATUS_CREATING"
	GetClusterOKBodyStatusNodeMapTiflashItems0StatusNODESTATUSCREATING string = "NODE_STATUS_CREATING"

	// GetClusterOKBodyStatusNodeMapTiflashItems0StatusNODESTATUSDELETING captures enum value "NODE_STATUS_DELETING"
	GetClusterOKBodyStatusNodeMapTiflashItems0StatusNODESTATUSDELETING string = "NODE_STATUS_DELETING"
)

// prop value enum
func (o *GetClusterOKBodyStatusNodeMapTiflashItems0) validateStatusEnum(path, location string, value string) error {
	if err := validate.EnumCase(path, location, value, getClusterOKBodyStatusNodeMapTiflashItems0TypeStatusPropEnum, true); err != nil {
		return err
	}
	return nil
}

func (o *GetClusterOKBodyStatusNodeMapTiflashItems0) validateStatus(formats strfmt.Registry) error {
	if swag.IsZero(o.Status) { // not required
		return nil
	}

	// value enum
	if err := o.validateStatusEnum("status", "body", o.Status); err != nil {
		return err
	}

	return nil
}

// ContextValidate validates this get cluster o k body status node map tiflash items0 based on context it is used
func (o *GetClusterOKBodyStatusNodeMapTiflashItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (o *GetClusterOKBodyStatusNodeMapTiflashItems0) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}

// UnmarshalBinary interface implementation
func (o *GetClusterOKBodyStatusNodeMapTiflashItems0) UnmarshalBinary(b []byte) error {
	var res GetClusterOKBodyStatusNodeMapTiflashItems0
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}

/*
GetClusterOKBodyStatusNodeMapTikvItems0 get cluster o k body status node map tikv items0
swagger:model GetClusterOKBodyStatusNodeMapTikvItems0
*/
type GetClusterOKBodyStatusNodeMapTikvItems0 struct {

	// The availability zone of a node in the cluster.
	// Example: us-west-2a
	AvailabilityZone string `json:"availability_zone,omitempty"`

	// The name of a node in the cluster.
	// Example: tikv-0
	NodeName string `json:"node_name,omitempty"`

	// The size of the TiKV component in the cluster.
	// Example: 8C32G
	NodeSize string `json:"node_size,omitempty"`

	// The RAM size of a node in the cluster. If the `cluster_type` is `"DEVELOPER"`, `ram_bytes` is always 0.
	// Example: 68719476736
	RAMBytes string `json:"ram_bytes,omitempty"`

	// The status of a node in the cluster.
	// Example: NODE_STATUS_AVAILABLE
	// Enum: [NODE_STATUS_AVAILABLE NODE_STATUS_UNAVAILABLE NODE_STATUS_CREATING NODE_STATUS_DELETING]
	Status string `json:"status,omitempty"`

	// The storage size of a node in the cluster.
	// Example: 1024
	StorageSizeGib int32 `json:"storage_size_gib,omitempty"`

	// The total vCPUs of a node in the cluster. If the `cluster_type` is `"DEVELOPER"`, `vcpu_num` is always 0.
	// Example: 8
	VcpuNum int32 `json:"vcpu_num,omitempty"`
}

// Validate validates this get cluster o k body status node map tikv items0
func (o *GetClusterOKBodyStatusNodeMapTikvItems0) Validate(formats strfmt.Registry) error {
	var res []error

	if err := o.validateStatus(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

var getClusterOKBodyStatusNodeMapTikvItems0TypeStatusPropEnum []interface{}

func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["NODE_STATUS_AVAILABLE","NODE_STATUS_UNAVAILABLE","NODE_STATUS_CREATING","NODE_STATUS_DELETING"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		getClusterOKBodyStatusNodeMapTikvItems0TypeStatusPropEnum = append(getClusterOKBodyStatusNodeMapTikvItems0TypeStatusPropEnum, v)
	}
}

const (

	// GetClusterOKBodyStatusNodeMapTikvItems0StatusNODESTATUSAVAILABLE captures enum value "NODE_STATUS_AVAILABLE"
	GetClusterOKBodyStatusNodeMapTikvItems0StatusNODESTATUSAVAILABLE string = "NODE_STATUS_AVAILABLE"

	// GetClusterOKBodyStatusNodeMapTikvItems0StatusNODESTATUSUNAVAILABLE captures enum value "NODE_STATUS_UNAVAILABLE"
	GetClusterOKBodyStatusNodeMapTikvItems0StatusNODESTATUSUNAVAILABLE string = "NODE_STATUS_UNAVAILABLE"

	// GetClusterOKBodyStatusNodeMapTikvItems0StatusNODESTATUSCREATING captures enum value "NODE_STATUS_CREATING"
	GetClusterOKBodyStatusNodeMapTikvItems0StatusNODESTATUSCREATING string = "NODE_STATUS_CREATING"

	// GetClusterOKBodyStatusNodeMapTikvItems0StatusNODESTATUSDELETING captures enum value "NODE_STATUS_DELETING"
	GetClusterOKBodyStatusNodeMapTikvItems0StatusNODESTATUSDELETING string = "NODE_STATUS_DELETING"
)

// prop value enum
func (o *GetClusterOKBodyStatusNodeMapTikvItems0) validateStatusEnum(path, location string, value string) error {
	if err := validate.EnumCase(path, location, value, getClusterOKBodyStatusNodeMapTikvItems0TypeStatusPropEnum, true); err != nil {
		return err
	}
	return nil
}

func (o *GetClusterOKBodyStatusNodeMapTikvItems0) validateStatus(formats strfmt.Registry) error {
	if swag.IsZero(o.Status) { // not required
		return nil
	}

	// value enum
	if err := o.validateStatusEnum("status", "body", o.Status); err != nil {
		return err
	}

	return nil
}

// ContextValidate validates this get cluster o k body status node map tikv items0 based on context it is used
func (o *GetClusterOKBodyStatusNodeMapTikvItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (o *GetClusterOKBodyStatusNodeMapTikvItems0) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}

// UnmarshalBinary interface implementation
func (o *GetClusterOKBodyStatusNodeMapTikvItems0) UnmarshalBinary(b []byte) error {
	var res GetClusterOKBodyStatusNodeMapTikvItems0
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}

/*
GetClusterTooManyRequestsBody get cluster too many requests body
swagger:model GetClusterTooManyRequestsBody
*/
type GetClusterTooManyRequestsBody struct {

	// code
	//
	// Error code returned with this error.
	Code int64 `json:"code,omitempty"`

	// details
	//
	// Error details returned with this error.
	Details []string `json:"details"`

	// message
	//
	// Error message returned with this error.
	Message string `json:"message,omitempty"`
}

// Validate validates this get cluster too many requests body
func (o *GetClusterTooManyRequestsBody) Validate(formats strfmt.Registry) error {
	return nil
}

// ContextValidate validates this get cluster too many requests body based on context it is used
func (o *GetClusterTooManyRequestsBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (o *GetClusterTooManyRequestsBody) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}

// UnmarshalBinary interface implementation
func (o *GetClusterTooManyRequestsBody) UnmarshalBinary(b []byte) error {
	var res GetClusterTooManyRequestsBody
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}
