getmodelsnapshots

package
v8.8.2 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: Apache-2.0 Imports: 12 Imported by: 4

Documentation

Overview

Retrieves information about model snapshots.

Index

Constants

This section is empty.

Variables

View Source
var ErrBuildPath = errors.New("cannot build path, check for missing path parameters")

ErrBuildPath is returned in case of missing parameters within the build of the request.

Functions

This section is empty.

Types

type GetModelSnapshots

type GetModelSnapshots struct {
	// contains filtered or unexported fields
}

func (*GetModelSnapshots) Desc

Desc If true, the results are sorted in descending order. API name: desc

func (GetModelSnapshots) Do

Do runs the request through the transport, handle the response and returns a getmodelsnapshots.Response

func (*GetModelSnapshots) End

End Returns snapshots with timestamps earlier than this time. API name: end

func (*GetModelSnapshots) From

From Skips the specified number of snapshots. API name: from

func (*GetModelSnapshots) Header

func (r *GetModelSnapshots) Header(key, value string) *GetModelSnapshots

Header set a key, value pair in the GetModelSnapshots headers map.

func (*GetModelSnapshots) HttpRequest

func (r *GetModelSnapshots) HttpRequest(ctx context.Context) (*http.Request, error)

HttpRequest returns the http.Request object built from the given parameters.

func (*GetModelSnapshots) JobId

JobId Identifier for the anomaly detection job. API Name: jobid

func (GetModelSnapshots) Perform added in v8.7.0

func (r GetModelSnapshots) Perform(ctx context.Context) (*http.Response, error)

Perform runs the http.Request through the provided transport and returns an http.Response.

func (*GetModelSnapshots) Raw

Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.

func (*GetModelSnapshots) Request

func (r *GetModelSnapshots) Request(req *Request) *GetModelSnapshots

Request allows to set the request property with the appropriate payload.

func (*GetModelSnapshots) Size

Size Specifies the maximum number of snapshots to obtain. API name: size

func (*GetModelSnapshots) SnapshotId

func (r *GetModelSnapshots) SnapshotId(v string) *GetModelSnapshots

SnapshotId A numerical character string that uniquely identifies the model snapshot. You can get information for multiple snapshots by using a comma-separated list or a wildcard expression. You can get all snapshots by using `_all`, by specifying `*` as the snapshot ID, or by omitting the snapshot ID. API Name: snapshotid

func (*GetModelSnapshots) Sort

Sort Specifies the sort field for the requested snapshots. By default, the snapshots are sorted by their timestamp. API name: sort

func (*GetModelSnapshots) Start

Start Returns snapshots with timestamps after this time. API name: start

type NewGetModelSnapshots

type NewGetModelSnapshots func(jobid string) *GetModelSnapshots

NewGetModelSnapshots type alias for index.

func NewGetModelSnapshotsFunc

func NewGetModelSnapshotsFunc(tp elastictransport.Interface) NewGetModelSnapshots

NewGetModelSnapshotsFunc returns a new instance of GetModelSnapshots with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.

type Request

type Request struct {

	// Desc Refer to the description for the `desc` query parameter.
	Desc *bool `json:"desc,omitempty"`
	// End Refer to the description for the `end` query parameter.
	End  types.DateTime `json:"end,omitempty"`
	Page *types.Page    `json:"page,omitempty"`
	// Sort Refer to the description for the `sort` query parameter.
	Sort *string `json:"sort,omitempty"`
	// Start Refer to the description for the `start` query parameter.
	Start types.DateTime `json:"start,omitempty"`
}

Request holds the request body struct for the package getmodelsnapshots

https://github.com/elastic/elasticsearch-specification/blob/a0da620389f06553c0727f98f95e40dbb564fcca/specification/ml/get_model_snapshots/MlGetModelSnapshotsRequest.ts#L26-L96

func NewRequest added in v8.5.0

func NewRequest() *Request

NewRequest returns a Request

func (*Request) FromJSON added in v8.5.0

func (r *Request) FromJSON(data string) (*Request, error)

FromJSON allows to load an arbitrary json into the request structure

type Response added in v8.7.0

type Response struct {
	Count          int64                 `json:"count"`
	ModelSnapshots []types.ModelSnapshot `json:"model_snapshots"`
}

func NewResponse added in v8.7.0

func NewResponse() *Response

NewResponse returns a Response

Jump to

Keyboard shortcuts

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