Skip to content

Commit

Permalink
Corrected deprecation statement
Browse files Browse the repository at this point in the history
Signed-off-by: Tanner Jones <alltechguyblog@gmail.com>
  • Loading branch information
tannerjones4075 committed Oct 13, 2023
1 parent 76d1948 commit 48c0af8
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions opensearchapi/api.indices.put_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
"time"
)

// deprecated: uses a nonexistent legacy REST API (/_template) correct REST API is /_index_template use newIndicesPutSettingsFunc instead
// Deprecated: uses a nonexistent legacy REST API (/_template) correct REST API is /_index_template use newIndicesPutSettingsFunc instead
func newIndicesPutTemplateFunc(t Transport) IndicesPutTemplate {
return func(name string, body io.Reader, o ...func(*IndicesPutTemplateRequest)) (*Response, error) {
var r = IndicesPutTemplateRequest{Name: name, Body: body}
Expand All @@ -49,11 +49,11 @@ func newIndicesPutTemplateFunc(t Transport) IndicesPutTemplate {
// ----- API Definition -------------------------------------------------------

// IndicesPutTemplate creates or updates an index template.
// deprecated: uses a nonexistent legacy REST API (/_template) correct REST API is /_index_template use IndicesPutSettings instead
// Deprecated: uses a nonexistent legacy REST API (/_template) correct REST API is /_index_template use IndicesPutSettings instead
type IndicesPutTemplate func(name string, body io.Reader, o ...func(*IndicesPutTemplateRequest)) (*Response, error)

// IndicesPutTemplateRequest configures the Indices Put Template API request.
// deprecated: uses a nonexistent legacy REST API (/_template) correct REST API is /_index_template use IndicesPutSettingsRequest instead
// Deprecated: uses a nonexistent legacy REST API (/_template) correct REST API is /_index_template use IndicesPutSettingsRequest instead
type IndicesPutTemplateRequest struct {
Body io.Reader

Expand All @@ -75,7 +75,7 @@ type IndicesPutTemplateRequest struct {
}

// Do executes the request and returns response or error.
// deprecated: uses a nonexistent legacy REST API (/_template) correct REST API is /_index_template use IndicesPutSettingsRequest instead
// Deprecated: uses a nonexistent legacy REST API (/_template) correct REST API is /_index_template use IndicesPutSettingsRequest instead
func (r IndicesPutTemplateRequest) Do(ctx context.Context, transport Transport) (*Response, error) {
var (
method string
Expand Down Expand Up @@ -173,15 +173,15 @@ func (r IndicesPutTemplateRequest) Do(ctx context.Context, transport Transport)
}

// WithContext sets the request context.
// deprecated: uses a nonexistent legacy REST API (/_template) correct REST API is /_index_template use IndicesPutSettings instead
// Deprecated: uses a nonexistent legacy REST API (/_template) correct REST API is /_index_template use IndicesPutSettings instead
func (f IndicesPutTemplate) WithContext(v context.Context) func(*IndicesPutTemplateRequest) {
return func(r *IndicesPutTemplateRequest) {
r.ctx = v
}
}

// WithCreate - whether the index template should only be added if new or can also replace an existing one.
// deprecated: uses a nonexistent legacy REST API (/_template) correct REST API is /_index_template use IndicesPutSettings instead
// Deprecated: uses a nonexistent legacy REST API (/_template) correct REST API is /_index_template use IndicesPutSettings instead
func (f IndicesPutTemplate) WithCreate(v bool) func(*IndicesPutTemplateRequest) {
return func(r *IndicesPutTemplateRequest) {
r.Create = &v
Expand All @@ -190,63 +190,63 @@ func (f IndicesPutTemplate) WithCreate(v bool) func(*IndicesPutTemplateRequest)

// WithMasterTimeout - explicit operation timeout for connection to cluster-manager node.
// Deprecated: To promote inclusive language, use WithClusterManagerTimeout instead.
// deprecated: uses a nonexistent legacy REST API (/_template) correct REST API is /_index_template use IndicesPutSettings instead
// Deprecated: uses a nonexistent legacy REST API (/_template) correct REST API is /_index_template use IndicesPutSettings instead
func (f IndicesPutTemplate) WithMasterTimeout(v time.Duration) func(*IndicesPutTemplateRequest) {
return func(r *IndicesPutTemplateRequest) {
r.MasterTimeout = v
}
}

// WithClusterManagerTimeout - explicit operation timeout for connection to cluster-manager node.
// deprecated: uses a nonexistent legacy REST API (/_template) correct REST API is /_index_template use IndicesPutSettings instead
// Deprecated: uses a nonexistent legacy REST API (/_template) correct REST API is /_index_template use IndicesPutSettings instead
func (f IndicesPutTemplate) WithClusterManagerTimeout(v time.Duration) func(*IndicesPutTemplateRequest) {
return func(r *IndicesPutTemplateRequest) {
r.ClusterManagerTimeout = v
}
}

// WithOrder - the order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers).
// deprecated: uses a nonexistent legacy REST API (/_template) correct REST API is /_index_template use IndicesPutSettings instead
// Deprecated: uses a nonexistent legacy REST API (/_template) correct REST API is /_index_template use IndicesPutSettings instead
func (f IndicesPutTemplate) WithOrder(v int) func(*IndicesPutTemplateRequest) {
return func(r *IndicesPutTemplateRequest) {
r.Order = &v
}
}

// WithPretty makes the response body pretty-printed.
// deprecated: uses a nonexistent legacy REST API (/_template) correct REST API is /_index_template use IndicesPutSettings instead
// Deprecated: uses a nonexistent legacy REST API (/_template) correct REST API is /_index_template use IndicesPutSettings instead
func (f IndicesPutTemplate) WithPretty() func(*IndicesPutTemplateRequest) {
return func(r *IndicesPutTemplateRequest) {
r.Pretty = true
}
}

// WithHuman makes statistical values human-readable.
// deprecated: uses a nonexistent legacy REST API (/_template) correct REST API is /_index_template use IndicesPutSettings instead
// Deprecated: uses a nonexistent legacy REST API (/_template) correct REST API is /_index_template use IndicesPutSettings instead
func (f IndicesPutTemplate) WithHuman() func(*IndicesPutTemplateRequest) {
return func(r *IndicesPutTemplateRequest) {
r.Human = true
}
}

// WithErrorTrace includes the stack trace for errors in the response body.
// deprecated: uses a nonexistent legacy REST API (/_template) correct REST API is /_index_template use IndicesPutSettings instead
// Deprecated: uses a nonexistent legacy REST API (/_template) correct REST API is /_index_template use IndicesPutSettings instead
func (f IndicesPutTemplate) WithErrorTrace() func(*IndicesPutTemplateRequest) {
return func(r *IndicesPutTemplateRequest) {
r.ErrorTrace = true
}
}

// WithFilterPath filters the properties of the response body.
// deprecated: uses a nonexistent legacy REST API (/_template) correct REST API is /_index_template use IndicesPutSettings instead
// Deprecated: uses a nonexistent legacy REST API (/_template) correct REST API is /_index_template use IndicesPutSettings instead
func (f IndicesPutTemplate) WithFilterPath(v ...string) func(*IndicesPutTemplateRequest) {
return func(r *IndicesPutTemplateRequest) {
r.FilterPath = v
}
}

// WithHeader adds the headers to the HTTP request.
// deprecated: uses a nonexistent legacy REST API (/_template) correct REST API is /_index_template use IndicesPutSettings instead
// Deprecated: uses a nonexistent legacy REST API (/_template) correct REST API is /_index_template use IndicesPutSettings instead
func (f IndicesPutTemplate) WithHeader(h map[string]string) func(*IndicesPutTemplateRequest) {
return func(r *IndicesPutTemplateRequest) {
if r.Header == nil {
Expand All @@ -259,7 +259,7 @@ func (f IndicesPutTemplate) WithHeader(h map[string]string) func(*IndicesPutTemp
}

// WithOpaqueID adds the X-Opaque-Id header to the HTTP request.
// deprecated: uses a nonexistent legacy REST API (/_template) correct REST API is /_index_template use IndicesPutSettings instead
// Deprecated: uses a nonexistent legacy REST API (/_template) correct REST API is /_index_template use IndicesPutSettings instead
func (f IndicesPutTemplate) WithOpaqueID(s string) func(*IndicesPutTemplateRequest) {
return func(r *IndicesPutTemplateRequest) {
if r.Header == nil {
Expand Down

0 comments on commit 48c0af8

Please sign in to comment.