Documentation ¶
Overview ¶
Deletes forecasts from a machine learning job.
Index ¶
- Variables
- type DeleteForecast
- func (r *DeleteForecast) AllowNoForecasts(allownoforecasts bool) *DeleteForecast
- func (r DeleteForecast) Do(ctx context.Context) (*Response, error)
- func (r *DeleteForecast) ForecastId(forecastid string) *DeleteForecast
- func (r *DeleteForecast) Header(key, value string) *DeleteForecast
- func (r *DeleteForecast) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r DeleteForecast) IsSuccess(ctx context.Context) (bool, error)
- func (r DeleteForecast) Perform(ctx context.Context) (*http.Response, error)
- func (r *DeleteForecast) Timeout(duration string) *DeleteForecast
- type NewDeleteForecast
- type Response
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 DeleteForecast ¶
type DeleteForecast struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *DeleteForecast
Deletes forecasts from a machine learning job.
https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html
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(ctx 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 ¶
HttpRequest returns the http.Request object built from the given parameters.
func (DeleteForecast) IsSuccess ¶
func (r DeleteForecast) IsSuccess(ctx 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
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.