deleteforecast

package
v8.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: Apache-2.0 Imports: 12 Imported by: 4

Documentation

Overview

Deletes forecasts from a machine learning job.

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 DeleteForecast

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

func (*DeleteForecast) AllowNoForecasts

func (r *DeleteForecast) AllowNoForecasts(allownoforecasts bool) *DeleteForecast

AllowNoForecasts Specifies whether an error occurs when there are no forecasts. In particular, if this parameter is set to `false` and there are no forecasts associated with the job, attempts to delete all forecasts return an error. API name: allow_no_forecasts

func (DeleteForecast) Do

func (r DeleteForecast) Do(providedCtx context.Context) (*Response, error)

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

func (*DeleteForecast) ForecastId

func (r *DeleteForecast) ForecastId(forecastid string) *DeleteForecast

ForecastId A comma-separated list of forecast identifiers. If you do not specify this optional parameter or if you specify `_all` or `*` the API deletes all forecasts from the job. API Name: forecastid

func (*DeleteForecast) Header

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

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

func (*DeleteForecast) HttpRequest

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

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

func (DeleteForecast) IsSuccess

func (r DeleteForecast) IsSuccess(providedCtx context.Context) (bool, error)

IsSuccess allows to run a query with a context and retrieve the result as a boolean. This only exists for endpoints without a request payload and allows for quick control flow.

func (DeleteForecast) Perform added in v8.7.0

func (r DeleteForecast) Perform(providedCtx context.Context) (*http.Response, error)

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

func (*DeleteForecast) Timeout

func (r *DeleteForecast) Timeout(duration string) *DeleteForecast

Timeout Specifies the period of time to wait for the completion of the delete operation. When this period of time elapses, the API fails and returns an error. API name: timeout

type NewDeleteForecast

type NewDeleteForecast func(jobid string) *DeleteForecast

NewDeleteForecast type alias for index.

func NewDeleteForecastFunc

func NewDeleteForecastFunc(tp elastictransport.Interface) NewDeleteForecast

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

type Response added in v8.7.0

type Response struct {

	// Acknowledged For a successful response, this value is always true. On failure, an
	// exception is returned instead.
	Acknowledged bool `json:"acknowledged"`
}

Response holds the response body struct for the package deleteforecast

https://github.com/elastic/elasticsearch-specification/blob/17ac39c7f9266bc303baa029f90194aecb1c3b7c/specification/ml/delete_forecast/MlDeleteForecastResponse.ts#L22-L24

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