Skip to content

Commit

Permalink
[index template] Fix data stream timestamp field. (#1570)
Browse files Browse the repository at this point in the history
Although this is a just a string on the Java object, it's expressed as an object in the JSON api.

Co-authored-by: Phillip Baker <phillbaker@retrodict.com>
  • Loading branch information
phillip-dd and phillbaker committed Mar 19, 2022
1 parent 6b76405 commit 058eb00
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions indices_get_index_template.go
Expand Up @@ -231,16 +231,20 @@ type IndicesGetIndexTemplateData struct {
}

type IndicesDataStream struct {
Name string `json:"name,omitempty"`
TimestampField string `json:"timestamp_field,omitempty"`
Indices []string `json:"indices,omitempty"`
Generation int64 `json:"generation,omitempty"`
Status string `json:"status,omitempty"`
IndexTemplate string `json:"template,omitempty"`
IlmPolicy string `json:"ilm_policy,omitempty"`
Meta map[string]interface{} `json:"_meta,omitempty"`
Hidden bool `json:"hidden,omitempty"`
System bool `json:"system,omitempty"`
AllowCustomRouting bool `json:"allow_custom_routing,omitempty"`
Replicated bool `json:"replicated,omitempty"`
Name string `json:"name,omitempty"`
TimestampField *IndicesDataStreamTimestampField `json:"timestamp_field,omitempty"`
Indices []string `json:"indices,omitempty"`
Generation int64 `json:"generation,omitempty"`
Status string `json:"status,omitempty"`
IndexTemplate string `json:"template,omitempty"`
IlmPolicy string `json:"ilm_policy,omitempty"`
Meta map[string]interface{} `json:"_meta,omitempty"`
Hidden bool `json:"hidden,omitempty"`
System bool `json:"system,omitempty"`
AllowCustomRouting bool `json:"allow_custom_routing,omitempty"`
Replicated bool `json:"replicated,omitempty"`
}

type IndicesDataStreamTimestampField struct {
Name string `json:"name,omitempty"`
}

0 comments on commit 058eb00

Please sign in to comment.