api

package
v1.29.0-beta.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package api provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.15.0 DO NOT EDIT.

Package api provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.15.0 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGetRedfishV1SystemsSystemIdMachineLearningModelRequest

func NewGetRedfishV1SystemsSystemIdMachineLearningModelRequest(server string, systemId string) (*http.Request, error)

NewGetRedfishV1SystemsSystemIdMachineLearningModelRequest generates requests for GetRedfishV1SystemsSystemIdMachineLearningModel

func NewGetRedfishV1SystemsSystemIdRequest

func NewGetRedfishV1SystemsSystemIdRequest(server string, systemId string) (*http.Request, error)

NewGetRedfishV1SystemsSystemIdRequest generates requests for GetRedfishV1SystemsSystemId

Types

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) GetRedfishV1SystemsSystemId

func (c *Client) GetRedfishV1SystemsSystemId(ctx context.Context, systemId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetRedfishV1SystemsSystemIdMachineLearningModel

func (c *Client) GetRedfishV1SystemsSystemIdMachineLearningModel(ctx context.Context, systemId string, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// GetRedfishV1SystemsSystemId request
	GetRedfishV1SystemsSystemId(ctx context.Context, systemId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetRedfishV1SystemsSystemIdMachineLearningModel request
	GetRedfishV1SystemsSystemIdMachineLearningModel(ctx context.Context, systemId string, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) GetRedfishV1SystemsSystemIdMachineLearningModelWithResponse

func (c *ClientWithResponses) GetRedfishV1SystemsSystemIdMachineLearningModelWithResponse(ctx context.Context, systemId string, reqEditors ...RequestEditorFn) (*GetRedfishV1SystemsSystemIdMachineLearningModelResponse, error)

GetRedfishV1SystemsSystemIdMachineLearningModelWithResponse request returning *GetRedfishV1SystemsSystemIdMachineLearningModelResponse

func (*ClientWithResponses) GetRedfishV1SystemsSystemIdWithResponse

func (c *ClientWithResponses) GetRedfishV1SystemsSystemIdWithResponse(ctx context.Context, systemId string, reqEditors ...RequestEditorFn) (*GetRedfishV1SystemsSystemIdResponse, error)

GetRedfishV1SystemsSystemIdWithResponse request returning *GetRedfishV1SystemsSystemIdResponse

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetRedfishV1SystemsSystemIdWithResponse request
	GetRedfishV1SystemsSystemIdWithResponse(ctx context.Context, systemId string, reqEditors ...RequestEditorFn) (*GetRedfishV1SystemsSystemIdResponse, error)

	// GetRedfishV1SystemsSystemIdMachineLearningModelWithResponse request
	GetRedfishV1SystemsSystemIdMachineLearningModelWithResponse(ctx context.Context, systemId string, reqEditors ...RequestEditorFn) (*GetRedfishV1SystemsSystemIdMachineLearningModelResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type Forbidden

type Forbidden struct {
	Error *struct {
		MessageExtendedInfo *[]struct {
			// Message Error message.
			Message *string `json:"Message,omitempty"`

			// MessageId Message ID.
			MessageId *string `json:"MessageId,omitempty"`

			// Severity Severity of the error.
			Severity *string `json:"Severity,omitempty"`
		} `json:"@Message.ExtendedInfo,omitempty"`

		// Code Message code
		Code *string `json:"code,omitempty"`

		// Message Error message
		Message *string `json:"message,omitempty"`
	} `json:"error,omitempty"`
}

Forbidden defines model for Forbidden.

type GetRedfishV1SystemsSystemIdMachineLearningModelResponse

type GetRedfishV1SystemsSystemIdMachineLearningModelResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *MachineLearningModel
	JSON401      *Unauthorized
	JSON403      *Forbidden
	JSON404      *NotFound
	JSON405      *MethodNotAllowed
	JSON406      *NotAcceptable
	JSON500      *InternalError
}

func ParseGetRedfishV1SystemsSystemIdMachineLearningModelResponse

func ParseGetRedfishV1SystemsSystemIdMachineLearningModelResponse(rsp *http.Response) (*GetRedfishV1SystemsSystemIdMachineLearningModelResponse, error)

ParseGetRedfishV1SystemsSystemIdMachineLearningModelResponse parses an HTTP response from a GetRedfishV1SystemsSystemIdMachineLearningModelWithResponse call

func (GetRedfishV1SystemsSystemIdMachineLearningModelResponse) Status

Status returns HTTPResponse.Status

func (GetRedfishV1SystemsSystemIdMachineLearningModelResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type GetRedfishV1SystemsSystemIdResponse

type GetRedfishV1SystemsSystemIdResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *System
	JSON401      *Unauthorized
	JSON403      *Forbidden
	JSON404      *NotFound
	JSON405      *MethodNotAllowed
	JSON406      *NotAcceptable
	JSON500      *InternalError
}

func ParseGetRedfishV1SystemsSystemIdResponse

func ParseGetRedfishV1SystemsSystemIdResponse(rsp *http.Response) (*GetRedfishV1SystemsSystemIdResponse, error)

ParseGetRedfishV1SystemsSystemIdResponse parses an HTTP response from a GetRedfishV1SystemsSystemIdWithResponse call

func (GetRedfishV1SystemsSystemIdResponse) Status

Status returns HTTPResponse.Status

func (GetRedfishV1SystemsSystemIdResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type InternalError

type InternalError struct {
	Error *struct {
		MessageExtendedInfo *[]struct {
			// Message error message
			Message *string `json:"Message,omitempty"`
		} `json:"@Message.ExtendedInfo,omitempty"`

		// Code message code
		Code *string `json:"code,omitempty"`

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

InternalError defines model for InternalError.

type MachineLearningModel

type MachineLearningModel struct {
	// OdataContext Context URL of resource
	OdataContext *string `json:"@odata.context,omitempty"`

	// OdataId ID of resource
	OdataId *string `json:"@odata.id,omitempty"`

	// OdataType Type of resource
	OdataType *string `json:"@odata.type,omitempty"`

	// Name Resource name
	Name                  *string `json:"Name,omitempty"`
	PowerConsumptionModel *struct {
		// Name Name of power consumption model
		Name *string `json:"Name,omitempty"`

		// Type Type of inference protocol
		Type *string `json:"Type,omitempty"`

		// Url URL of power consumption model
		Url *string `json:"Url,omitempty"`

		// Version Version of power consumption model
		Version *string `json:"Version,omitempty"`
	} `json:"PowerConsumptionModel,omitempty"`
	ResponseTimeModel *struct {
		// Name Name of response time model
		Name *string `json:"Name,omitempty"`

		// Type Type of inference protocol
		Type *string `json:"Type,omitempty"`

		// Url URL of response time model
		Url *string `json:"Url,omitempty"`

		// Version Version of response time model
		Version *string `json:"Version,omitempty"`
	} `json:"ResponseTimeModel,omitempty"`
}

MachineLearningModel defines model for MachineLearningModel.

type MethodNotAllowed

type MethodNotAllowed struct {
	Error *struct {
		MessageExtendedInfo *[]struct {
			// Message Error message.
			Message *string `json:"Message,omitempty"`

			// MessageId Message ID.
			MessageId *string `json:"MessageId,omitempty"`

			// Severity Severity of the error.
			Severity *string `json:"Severity,omitempty"`
		} `json:"@Message.ExtendedInfo,omitempty"`

		// Code Message code
		Code *string `json:"code,omitempty"`

		// Message Error message
		Message *string `json:"message,omitempty"`
	} `json:"error,omitempty"`
}

MethodNotAllowed defines model for MethodNotAllowed.

type NotAcceptable

type NotAcceptable struct {
	Error *struct {
		MessageExtendedInfo *[]struct {
			// Message Error message.
			Message *string `json:"Message,omitempty"`

			// MessageId Message ID.
			MessageId *string `json:"MessageId,omitempty"`
		} `json:"@Message.ExtendedInfo,omitempty"`

		// Code Message code
		Code *string `json:"code,omitempty"`

		// Message Error message
		Message *string `json:"message,omitempty"`
	} `json:"error,omitempty"`
}

NotAcceptable defines model for NotAcceptable.

type NotFound

type NotFound struct {
	Error *struct {
		MessageExtendedInfo *[]struct {
			// Message Error message.
			Message *string `json:"Message,omitempty"`

			// MessageId Message ID.
			MessageId *string `json:"MessageId,omitempty"`

			// Severity Severity of the error.
			Severity *string `json:"Severity,omitempty"`
		} `json:"@Message.ExtendedInfo,omitempty"`

		// Code Message code
		Code *string `json:"code,omitempty"`

		// Message Error message
		Message *string `json:"message,omitempty"`
	} `json:"error,omitempty"`
}

NotFound defines model for NotFound.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type System

type System struct {
	MachineLearningModel *struct {
		// OdataId Path of the machine learning model resource
		OdataId *string `json:"@odata.id,omitempty"`
	} `json:"MachineLearningModel,omitempty"`
}

System defines model for System.

type Unauthorized

type Unauthorized struct {
	Error *struct {
		MessageExtendedInfo *[]struct {
			// Message Error message.
			Message *string `json:"Message,omitempty"`

			// MessageId Message ID.
			MessageId *string `json:"MessageId,omitempty"`

			// Severity Severity of the error.
			Severity *string `json:"Severity,omitempty"`
		} `json:"@Message.ExtendedInfo,omitempty"`

		// Code Message code
		Code *string `json:"code,omitempty"`

		// Message Error message
		Message *string `json:"message,omitempty"`
	} `json:"error,omitempty"`
}

Unauthorized defines model for Unauthorized.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL