Documentation ¶
Overview ¶
Retrieves information about model snapshots.
Index ¶
- Variables
- type GetModelSnapshots
- func (r *GetModelSnapshots) Desc(b bool) *GetModelSnapshots
- func (r GetModelSnapshots) Do(ctx context.Context) (*http.Response, error)
- func (r *GetModelSnapshots) End(value string) *GetModelSnapshots
- func (r *GetModelSnapshots) From(i int) *GetModelSnapshots
- func (r *GetModelSnapshots) Header(key, value string) *GetModelSnapshots
- func (r *GetModelSnapshots) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *GetModelSnapshots) JobId(v string) *GetModelSnapshots
- func (r *GetModelSnapshots) Raw(raw json.RawMessage) *GetModelSnapshots
- func (r *GetModelSnapshots) Request(req *Request) *GetModelSnapshots
- func (r *GetModelSnapshots) Size(i int) *GetModelSnapshots
- func (r *GetModelSnapshots) SnapshotId(v string) *GetModelSnapshots
- func (r *GetModelSnapshots) Sort(value string) *GetModelSnapshots
- func (r *GetModelSnapshots) Start(value string) *GetModelSnapshots
- type NewGetModelSnapshots
- type Request
- type RequestBuilder
- func (rb *RequestBuilder) Build() *Request
- func (rb *RequestBuilder) Desc(desc bool) *RequestBuilder
- func (rb *RequestBuilder) End(end *types.DateTimeBuilder) *RequestBuilder
- func (rb *RequestBuilder) FromJSON(data string) (*Request, error)
- func (rb *RequestBuilder) Page(page *types.PageBuilder) *RequestBuilder
- func (rb *RequestBuilder) Sort(sort types.Field) *RequestBuilder
- func (rb *RequestBuilder) Start(start *types.DateTimeBuilder) *RequestBuilder
Constants ¶
This section is empty.
Variables ¶
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 New ¶
func New(tp elastictransport.Interface) *GetModelSnapshots
Retrieves information about model snapshots.
https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html
func (*GetModelSnapshots) Desc ¶
func (r *GetModelSnapshots) Desc(b bool) *GetModelSnapshots
Desc If true, the results are sorted in descending order. API name: desc
func (*GetModelSnapshots) End ¶
func (r *GetModelSnapshots) End(value string) *GetModelSnapshots
End Returns snapshots with timestamps earlier than this time. API name: end
func (*GetModelSnapshots) From ¶
func (r *GetModelSnapshots) From(i int) *GetModelSnapshots
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 ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*GetModelSnapshots) JobId ¶
func (r *GetModelSnapshots) JobId(v string) *GetModelSnapshots
JobId Identifier for the anomaly detection job. API Name: jobid
func (*GetModelSnapshots) Raw ¶
func (r *GetModelSnapshots) Raw(raw json.RawMessage) *GetModelSnapshots
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 ¶
func (r *GetModelSnapshots) Size(i int) *GetModelSnapshots
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 ¶
func (r *GetModelSnapshots) Sort(value string) *GetModelSnapshots
Sort Specifies the sort field for the requested snapshots. By default, the snapshots are sorted by their timestamp. API name: sort
func (*GetModelSnapshots) Start ¶
func (r *GetModelSnapshots) Start(value string) *GetModelSnapshots
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 *types.Field `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
type RequestBuilder ¶
type RequestBuilder struct {
// contains filtered or unexported fields
}
RequestBuilder is the builder API for the getmodelsnapshots.Request
func NewRequestBuilder ¶
func NewRequestBuilder() *RequestBuilder
NewRequest returns a RequestBuilder which can be chained and built to retrieve a RequestBuilder
func (*RequestBuilder) Build ¶
func (rb *RequestBuilder) Build() *Request
Build finalize the chain and returns the Request struct.
func (*RequestBuilder) Desc ¶
func (rb *RequestBuilder) Desc(desc bool) *RequestBuilder
func (*RequestBuilder) End ¶
func (rb *RequestBuilder) End(end *types.DateTimeBuilder) *RequestBuilder
func (*RequestBuilder) FromJSON ¶
func (rb *RequestBuilder) FromJSON(data string) (*Request, error)
FromJSON allows to load an arbitrary json into the request structure
func (*RequestBuilder) Page ¶
func (rb *RequestBuilder) Page(page *types.PageBuilder) *RequestBuilder
func (*RequestBuilder) Sort ¶
func (rb *RequestBuilder) Sort(sort types.Field) *RequestBuilder
func (*RequestBuilder) Start ¶
func (rb *RequestBuilder) Start(start *types.DateTimeBuilder) *RequestBuilder