diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8e809e4be..c93de56ca 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,8 @@
- Add 'elasticstack_fleet_package' data source ([#469](https://github.com/elastic/terraform-provider-elasticstack/pull/469))
- Add `tags` option to Kibana's SLOs ([#495](https://github.com/elastic/terraform-provider-elasticstack/pull/495))
- Add support for Authorization header - Bearer Token and ES-Client-Authentication fields added.([#500](https://github.com/elastic/terraform-provider-elasticstack/pull/500))
+- Add support for managing Kibana Data Views ([#502](https://github.com/elastic/terraform-provider-elasticstack/pull/502))
+
### Fixed
- Rename fleet package objects to `elasticstack_fleet_integration` and `elasticstack_fleet_integration_policy` ([#476](https://github.com/elastic/terraform-provider-elasticstack/pull/476))
- Fix a provider crash when managing SLOs outside of the default Kibana space. ([#485](https://github.com/elastic/terraform-provider-elasticstack/pull/485))
diff --git a/Makefile b/Makefile
index 2304b755f..5248d6022 100644
--- a/Makefile
+++ b/Makefile
@@ -266,7 +266,7 @@ help: ## this help
.PHONY: generate-alerting-client
generate-alerting-client: ## generate Kibana alerting client
- @ docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate \
+ @ docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli:v7.0.1 generate \
-i https://raw.githubusercontent.com/elastic/kibana/$(SWAGGER_VERSION)/x-pack/plugins/alerting/docs/openapi/bundled.json \
--skip-validate-spec \
--git-repo-id terraform-provider-elasticstack \
@@ -279,17 +279,30 @@ generate-alerting-client: ## generate Kibana alerting client
@ rm -rf generated/alerting/go.mod generated/alerting/go.sum generated/alerting/test
@ go fmt ./generated/alerting/...
+.PHONY: generate-data-views-client
+generate-data-views-client: ## generate Kibana data-views client
+ @ docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli:v7.0.1 generate \
+ -i /local/generated/data_views/bundled.yaml \
+ --skip-validate-spec \
+ --git-repo-id terraform-provider-elasticstack \
+ --git-user-id elastic \
+ -p isGoSubmodule=true \
+ -p packageName=data_views \
+ -p generateInterfaces=true \
+ -g go \
+ -o /local/generated/data_views
+ @ rm -rf generated/data_views/go.mod generated/data_views/go.sum generated/data_views/test
+ @ go fmt ./generated/data_views/...
+
.PHONY: generate-connectors-client
generate-connectors-client: tools ## generate Kibana connectors client
@ cd tools && go generate
@ go fmt ./generated/connectors/...
-## -i https://raw.githubusercontent.com/elastic/kibana/main/x-pack/plugins/observability/docs/openapi/slo/bundled.yaml \
-
.PHONY: generate-slo-client
generate-slo-client: tools ## generate Kibana slo client
@ rm -rf generated/slo
- @ docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli:v7.0.0-beta generate \
+ @ docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli:v7.0.1 generate \
-i /local/generated/slo-spec.yml \
--git-repo-id terraform-provider-elasticstack \
--git-user-id elastic \
@@ -304,4 +317,4 @@ generate-slo-client: tools ## generate Kibana slo client
@ go fmt ./generated/...
.PHONY: generate-clients
-generate-clients: generate-alerting-client generate-slo-client generate-connectors-client ## generate all clients
+generate-clients: generate-alerting-client generate-slo-client generate-data-views-client generate-connectors-client ## generate all clients
diff --git a/docs/resources/kibana_data_view.md b/docs/resources/kibana_data_view.md
new file mode 100644
index 000000000..f0342d1c4
--- /dev/null
+++ b/docs/resources/kibana_data_view.md
@@ -0,0 +1,82 @@
+---
+# generated by https://github.com/hashicorp/terraform-plugin-docs
+page_title: "elasticstack_kibana_data_view Resource - terraform-provider-elasticstack"
+subcategory: ""
+description: |-
+ Manages Kibana data views
+---
+
+# elasticstack_kibana_data_view (Resource)
+
+Manages Kibana data views
+
+
+
+
+## Schema
+
+### Required
+
+- `data_view` (Attributes) (see [below for nested schema](#nestedatt--data_view))
+
+### Optional
+
+- `override` (Boolean) Overrides an existing data view if a data view with the provided title already exists.
+- `space_id` (String) An identifier for the space. If space_id is not provided, the default space is used.
+
+### Read-Only
+
+- `id` (String) Generated ID for the data view.
+
+
+### Nested Schema for `data_view`
+
+Optional:
+
+- `allow_no_index` (Boolean) Allows the Data view saved object to exist before the data is available.
+- `field_attrs` (Attributes Map) Map of field attributes by field name. (see [below for nested schema](#nestedatt--data_view--field_attrs))
+- `field_formats` (Attributes Map) Map of field formats by field name. (see [below for nested schema](#nestedatt--data_view--field_formats))
+- `id` (String) Saved object ID.
+- `name` (String) The Data view name.
+- `namespaces` (List of String) Array of space IDs for sharing the Data view between multiple spaces.
+- `runtime_field_map` (Attributes Map) Map of runtime field definitions by field name. (see [below for nested schema](#nestedatt--data_view--runtime_field_map))
+- `source_filters` (List of String) List of field names you want to filter out in Discover.
+- `time_field_name` (String) Timestamp field name, which you use for time-based Data views.
+- `title` (String) Comma-separated list of data streams, indices, and aliases that you want to search. Supports wildcards (*).
+
+
+### Nested Schema for `data_view.field_attrs`
+
+Optional:
+
+- `count` (Number) Popularity count for the field.
+- `custom_label` (String) Custom label for the field.
+
+
+
+### Nested Schema for `data_view.field_formats`
+
+Required:
+
+- `id` (String)
+
+Optional:
+
+- `params` (Attributes) (see [below for nested schema](#nestedatt--data_view--field_formats--params))
+
+
+### Nested Schema for `data_view.field_formats.params`
+
+Optional:
+
+- `pattern` (String)
+
+
+
+
+### Nested Schema for `data_view.runtime_field_map`
+
+Required:
+
+- `script_source` (String) Script of the runtime field.
+- `type` (String) Mapping type of the runtime field. For more information, check [Field data types](https://www.elastic.co/guide/en/elasticsearch/reference/8.11/mapping-types.html).
diff --git a/generated/alerting/.openapi-generator/FILES b/generated/alerting/.openapi-generator/FILES
index a363f3d87..07ea4bbb3 100644
--- a/generated/alerting/.openapi-generator/FILES
+++ b/generated/alerting/.openapi-generator/FILES
@@ -10,7 +10,7 @@ docs/ActionsInnerFrequency.md
docs/AlertResponseProperties.md
docs/AlertResponsePropertiesExecutionStatus.md
docs/AlertResponsePropertiesSchedule.md
-docs/AlertingApi.md
+docs/AlertingAPI.md
docs/CreateRuleRequest.md
docs/FindRules200Response.md
docs/FindRulesHasReferenceParameter.md
diff --git a/generated/alerting/.openapi-generator/VERSION b/generated/alerting/.openapi-generator/VERSION
index 7f4d792ec..40e36364a 100644
--- a/generated/alerting/.openapi-generator/VERSION
+++ b/generated/alerting/.openapi-generator/VERSION
@@ -1 +1 @@
-6.5.0-SNAPSHOT
\ No newline at end of file
+7.1.0-SNAPSHOT
\ No newline at end of file
diff --git a/generated/alerting/README.md b/generated/alerting/README.md
index f8c965888..9bbae6df9 100644
--- a/generated/alerting/README.md
+++ b/generated/alerting/README.md
@@ -36,7 +36,7 @@ Default configuration comes with `Servers` field that contains server objects as
### Select Server Configuration
-For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`.
+For using other server than the one defined on index 0 set context value `alerting.ContextServerIndex` of type `int`.
```golang
ctx := context.WithValue(context.Background(), alerting.ContextServerIndex, 1)
@@ -44,7 +44,7 @@ ctx := context.WithValue(context.Background(), alerting.ContextServerIndex, 1)
### Templated Server URL
-Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`.
+Templated server URL is formatted using default variables from configuration or from context value `alerting.ContextServerVariables` of type `map[string]string`.
```golang
ctx := context.WithValue(context.Background(), alerting.ContextServerVariables, map[string]string{
@@ -58,7 +58,7 @@ Note, enum values are always validated and all unused variables are silently ign
Each operation can use different server URL defined using `OperationServers` map in the `Configuration`.
An operation is uniquely identified by `"{classname}Service.{nickname}"` string.
-Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.
+Similar rules for overriding default operation server index and variables applies by using `alerting.ContextOperationServerIndices` and `alerting.ContextOperationServerVariables` context maps.
```golang
ctx := context.WithValue(context.Background(), alerting.ContextOperationServerIndices, map[string]int{
@@ -77,32 +77,32 @@ All URIs are relative to *http://localhost:5601*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
-*AlertingApi* | [**CreateRule**](docs/AlertingApi.md#createrule) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId} | Creates a rule.
-*AlertingApi* | [**DeleteRule**](docs/AlertingApi.md#deleterule) | **Delete** /s/{spaceId}/api/alerting/rule/{ruleId} | Deletes a rule.
-*AlertingApi* | [**DisableRule**](docs/AlertingApi.md#disablerule) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/_disable | Disables a rule.
-*AlertingApi* | [**EnableRule**](docs/AlertingApi.md#enablerule) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/_enable | Enables a rule.
-*AlertingApi* | [**FindRules**](docs/AlertingApi.md#findrules) | **Get** /s/{spaceId}/api/alerting/rules/_find | Retrieves information about rules.
-*AlertingApi* | [**GetAlertingHealth**](docs/AlertingApi.md#getalertinghealth) | **Get** /s/{spaceId}/api/alerting/_health | Retrieves the health status of the alerting framework.
-*AlertingApi* | [**GetRule**](docs/AlertingApi.md#getrule) | **Get** /s/{spaceId}/api/alerting/rule/{ruleId} | Retrieves a rule by its identifier.
-*AlertingApi* | [**GetRuleTypes**](docs/AlertingApi.md#getruletypes) | **Get** /s/{spaceId}/api/alerting/rule_types | Retrieves a list of rule types.
-*AlertingApi* | [**LegacyCreateAlert**](docs/AlertingApi.md#legacycreatealert) | **Post** /s/{spaceId}/api/alerts/alert/{alertId} | Create an alert.
-*AlertingApi* | [**LegacyDisableAlert**](docs/AlertingApi.md#legacydisablealert) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/_disable | Disables an alert.
-*AlertingApi* | [**LegacyEnableAlert**](docs/AlertingApi.md#legacyenablealert) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/_enable | Enables an alert.
-*AlertingApi* | [**LegacyFindAlerts**](docs/AlertingApi.md#legacyfindalerts) | **Get** /s/{spaceId}/api/alerts/alerts/_find | Retrieves a paginated set of alerts.
-*AlertingApi* | [**LegacyGetAlert**](docs/AlertingApi.md#legacygetalert) | **Get** /s/{spaceId}/api/alerts/alert/{alertId} | Retrieves an alert by its identifier.
-*AlertingApi* | [**LegacyGetAlertTypes**](docs/AlertingApi.md#legacygetalerttypes) | **Get** /s/{spaceId}/api/alerts/alerts/list_alert_types | Retrieves a list of alert types.
-*AlertingApi* | [**LegacyGetAlertingHealth**](docs/AlertingApi.md#legacygetalertinghealth) | **Get** /s/{spaceId}/api/alerts/alerts/_health | Retrieves the health status of the alerting framework.
-*AlertingApi* | [**LegacyMuteAlertInstance**](docs/AlertingApi.md#legacymutealertinstance) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/alert_instance/{alertInstanceId}/_mute | Mutes an alert instance.
-*AlertingApi* | [**LegacyMuteAllAlertInstances**](docs/AlertingApi.md#legacymuteallalertinstances) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/_mute_all | Mutes all alert instances.
-*AlertingApi* | [**LegacyUnmuteAlertInstance**](docs/AlertingApi.md#legacyunmutealertinstance) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/alert_instance/{alertInstanceId}/_unmute | Unmutes an alert instance.
-*AlertingApi* | [**LegacyUnmuteAllAlertInstances**](docs/AlertingApi.md#legacyunmuteallalertinstances) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/_unmute_all | Unmutes all alert instances.
-*AlertingApi* | [**LegacyUpdateAlert**](docs/AlertingApi.md#legacyupdatealert) | **Put** /s/{spaceId}/api/alerts/alert/{alertId} | Updates the attributes for an alert.
-*AlertingApi* | [**LegaryDeleteAlert**](docs/AlertingApi.md#legarydeletealert) | **Delete** /s/{spaceId}/api/alerts/alert/{alertId} | Permanently removes an alert.
-*AlertingApi* | [**MuteAlert**](docs/AlertingApi.md#mutealert) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/alert/{alertId}/_mute | Mutes an alert.
-*AlertingApi* | [**MuteAllAlerts**](docs/AlertingApi.md#muteallalerts) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/_mute_all | Mutes all alerts.
-*AlertingApi* | [**UnmuteAlert**](docs/AlertingApi.md#unmutealert) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/alert/{alertId}/_unmute | Unmutes an alert.
-*AlertingApi* | [**UnmuteAllAlerts**](docs/AlertingApi.md#unmuteallalerts) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/_unmute_all | Unmutes all alerts.
-*AlertingApi* | [**UpdateRule**](docs/AlertingApi.md#updaterule) | **Put** /s/{spaceId}/api/alerting/rule/{ruleId} | Updates the attributes for a rule.
+*AlertingAPI* | [**CreateRule**](docs/AlertingAPI.md#createrule) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId} | Creates a rule.
+*AlertingAPI* | [**DeleteRule**](docs/AlertingAPI.md#deleterule) | **Delete** /s/{spaceId}/api/alerting/rule/{ruleId} | Deletes a rule.
+*AlertingAPI* | [**DisableRule**](docs/AlertingAPI.md#disablerule) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/_disable | Disables a rule.
+*AlertingAPI* | [**EnableRule**](docs/AlertingAPI.md#enablerule) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/_enable | Enables a rule.
+*AlertingAPI* | [**FindRules**](docs/AlertingAPI.md#findrules) | **Get** /s/{spaceId}/api/alerting/rules/_find | Retrieves information about rules.
+*AlertingAPI* | [**GetAlertingHealth**](docs/AlertingAPI.md#getalertinghealth) | **Get** /s/{spaceId}/api/alerting/_health | Retrieves the health status of the alerting framework.
+*AlertingAPI* | [**GetRule**](docs/AlertingAPI.md#getrule) | **Get** /s/{spaceId}/api/alerting/rule/{ruleId} | Retrieves a rule by its identifier.
+*AlertingAPI* | [**GetRuleTypes**](docs/AlertingAPI.md#getruletypes) | **Get** /s/{spaceId}/api/alerting/rule_types | Retrieves a list of rule types.
+*AlertingAPI* | [**LegacyCreateAlert**](docs/AlertingAPI.md#legacycreatealert) | **Post** /s/{spaceId}/api/alerts/alert/{alertId} | Create an alert.
+*AlertingAPI* | [**LegacyDisableAlert**](docs/AlertingAPI.md#legacydisablealert) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/_disable | Disables an alert.
+*AlertingAPI* | [**LegacyEnableAlert**](docs/AlertingAPI.md#legacyenablealert) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/_enable | Enables an alert.
+*AlertingAPI* | [**LegacyFindAlerts**](docs/AlertingAPI.md#legacyfindalerts) | **Get** /s/{spaceId}/api/alerts/alerts/_find | Retrieves a paginated set of alerts.
+*AlertingAPI* | [**LegacyGetAlert**](docs/AlertingAPI.md#legacygetalert) | **Get** /s/{spaceId}/api/alerts/alert/{alertId} | Retrieves an alert by its identifier.
+*AlertingAPI* | [**LegacyGetAlertTypes**](docs/AlertingAPI.md#legacygetalerttypes) | **Get** /s/{spaceId}/api/alerts/alerts/list_alert_types | Retrieves a list of alert types.
+*AlertingAPI* | [**LegacyGetAlertingHealth**](docs/AlertingAPI.md#legacygetalertinghealth) | **Get** /s/{spaceId}/api/alerts/alerts/_health | Retrieves the health status of the alerting framework.
+*AlertingAPI* | [**LegacyMuteAlertInstance**](docs/AlertingAPI.md#legacymutealertinstance) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/alert_instance/{alertInstanceId}/_mute | Mutes an alert instance.
+*AlertingAPI* | [**LegacyMuteAllAlertInstances**](docs/AlertingAPI.md#legacymuteallalertinstances) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/_mute_all | Mutes all alert instances.
+*AlertingAPI* | [**LegacyUnmuteAlertInstance**](docs/AlertingAPI.md#legacyunmutealertinstance) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/alert_instance/{alertInstanceId}/_unmute | Unmutes an alert instance.
+*AlertingAPI* | [**LegacyUnmuteAllAlertInstances**](docs/AlertingAPI.md#legacyunmuteallalertinstances) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/_unmute_all | Unmutes all alert instances.
+*AlertingAPI* | [**LegacyUpdateAlert**](docs/AlertingAPI.md#legacyupdatealert) | **Put** /s/{spaceId}/api/alerts/alert/{alertId} | Updates the attributes for an alert.
+*AlertingAPI* | [**LegaryDeleteAlert**](docs/AlertingAPI.md#legarydeletealert) | **Delete** /s/{spaceId}/api/alerts/alert/{alertId} | Permanently removes an alert.
+*AlertingAPI* | [**MuteAlert**](docs/AlertingAPI.md#mutealert) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/alert/{alertId}/_mute | Mutes an alert.
+*AlertingAPI* | [**MuteAllAlerts**](docs/AlertingAPI.md#muteallalerts) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/_mute_all | Mutes all alerts.
+*AlertingAPI* | [**UnmuteAlert**](docs/AlertingAPI.md#unmutealert) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/alert/{alertId}/_unmute | Unmutes an alert.
+*AlertingAPI* | [**UnmuteAllAlerts**](docs/AlertingAPI.md#unmuteallalerts) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/_unmute_all | Unmutes all alerts.
+*AlertingAPI* | [**UpdateRule**](docs/AlertingAPI.md#updaterule) | **Put** /s/{spaceId}/api/alerting/rule/{ruleId} | Updates the attributes for a rule.
## Documentation For Models
@@ -160,7 +160,7 @@ Class | Method | HTTP request | Description
## Documentation For Authorization
-
+Authentication schemes defined for the API:
### basicAuth
- **Type**: HTTP basic authentication
@@ -168,14 +168,13 @@ Class | Method | HTTP request | Description
Example
```golang
-auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
+auth := context.WithValue(context.Background(), alerting.ContextBasicAuth, alerting.BasicAuth{
UserName: "username",
Password: "password",
})
r, err := client.Service.Operation(auth, args)
```
-
### apiKeyAuth
- **Type**: API key
@@ -184,6 +183,19 @@ r, err := client.Service.Operation(auth, args)
Note, each API key must be added to a map of `map[string]APIKey` where the key is: ApiKey and passed in as the auth context for each request.
+Example
+
+```golang
+auth := context.WithValue(
+ context.Background(),
+ alerting.ContextAPIKeys,
+ map[string]alerting.APIKey{
+ "ApiKey": {Key: "API_KEY_STRING"},
+ },
+ )
+r, err := client.Service.Operation(auth, args)
+```
+
## Documentation for Utility Methods
diff --git a/generated/alerting/api/openapi.yaml b/generated/alerting/api/openapi.yaml
index 291bcc645..3f8256e9f 100644
--- a/generated/alerting/api/openapi.yaml
+++ b/generated/alerting/api/openapi.yaml
@@ -102,7 +102,6 @@ paths:
examples:
getRuleResponse:
$ref: '#/components/examples/get_rule_response'
- value: null
schema:
$ref: '#/components/schemas/rule_response_properties'
description: Indicates a successful call.
@@ -162,7 +161,6 @@ paths:
examples:
createCaseRequest:
$ref: '#/components/examples/create_rule_request'
- value: null
schema:
$ref: '#/components/schemas/create_rule_request'
required: true
@@ -173,7 +171,6 @@ paths:
examples:
createRuleResponse:
$ref: '#/components/examples/create_rule_response'
- value: null
schema:
$ref: '#/components/schemas/rule_response_properties'
description: Indicates a successful call.
@@ -232,7 +229,6 @@ paths:
examples:
updateCaseRequest:
$ref: '#/components/examples/update_rule_request'
- value: null
schema:
$ref: '#/components/schemas/update_rule_request'
required: true
@@ -243,7 +239,6 @@ paths:
examples:
updateRuleResponse:
$ref: '#/components/examples/update_rule_response'
- value: null
schema:
$ref: '#/components/schemas/rule_response_properties'
description: Indicates a successful call.
@@ -496,7 +491,6 @@ paths:
examples:
findRulesResponse:
$ref: '#/components/examples/find_rules_response'
- value: null
schema:
$ref: '#/components/schemas/findRules_200_response'
description: Indicates a successful call.
@@ -536,7 +530,6 @@ paths:
examples:
getAlertingHealthResponse:
$ref: '#/components/examples/get_health_response'
- value: null
schema:
$ref: '#/components/schemas/getAlertingHealth_200_response'
description: Indicates a successful call.
@@ -574,7 +567,6 @@ paths:
examples:
getRuleTypesResponse:
$ref: '#/components/examples/get_rule_types_response'
- value: null
schema:
items:
$ref: '#/components/schemas/getRuleTypes_200_response_inner'
diff --git a/generated/alerting/api_alerting.go b/generated/alerting/api_alerting.go
index a36195a81..965a0d993 100644
--- a/generated/alerting/api_alerting.go
+++ b/generated/alerting/api_alerting.go
@@ -20,7 +20,7 @@ import (
"strings"
)
-type AlertingApi interface {
+type AlertingAPI interface {
/*
CreateRule Creates a rule.
@@ -477,12 +477,12 @@ type AlertingApi interface {
UpdateRuleExecute(r ApiUpdateRuleRequest) (*RuleResponseProperties, *http.Response, error)
}
-// AlertingApiService AlertingApi service
-type AlertingApiService service
+// AlertingAPIService AlertingAPI service
+type AlertingAPIService service
type ApiCreateRuleRequest struct {
ctx context.Context
- ApiService AlertingApi
+ ApiService AlertingAPI
kbnXsrf *string
spaceId string
ruleId string
@@ -514,7 +514,7 @@ You must have `all` privileges for the appropriate Kibana features, depending on
@param ruleId An UUID v1 or v4 identifier for the rule. If you omit this parameter, an identifier is randomly generated.
@return ApiCreateRuleRequest
*/
-func (a *AlertingApiService) CreateRule(ctx context.Context, spaceId string, ruleId string) ApiCreateRuleRequest {
+func (a *AlertingAPIService) CreateRule(ctx context.Context, spaceId string, ruleId string) ApiCreateRuleRequest {
return ApiCreateRuleRequest{
ApiService: a,
ctx: ctx,
@@ -526,7 +526,7 @@ func (a *AlertingApiService) CreateRule(ctx context.Context, spaceId string, rul
// Execute executes the request
//
// @return RuleResponseProperties
-func (a *AlertingApiService) CreateRuleExecute(r ApiCreateRuleRequest) (*RuleResponseProperties, *http.Response, error) {
+func (a *AlertingAPIService) CreateRuleExecute(r ApiCreateRuleRequest) (*RuleResponseProperties, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
@@ -534,7 +534,7 @@ func (a *AlertingApiService) CreateRuleExecute(r ApiCreateRuleRequest) (*RuleRes
localVarReturnValue *RuleResponseProperties
)
- localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingApiService.CreateRule")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingAPIService.CreateRule")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
@@ -647,7 +647,7 @@ func (a *AlertingApiService) CreateRuleExecute(r ApiCreateRuleRequest) (*RuleRes
type ApiDeleteRuleRequest struct {
ctx context.Context
- ApiService AlertingApi
+ ApiService AlertingAPI
kbnXsrf *string
ruleId string
spaceId string
@@ -673,7 +673,7 @@ You must have `all` privileges for the appropriate Kibana features, depending on
@param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used.
@return ApiDeleteRuleRequest
*/
-func (a *AlertingApiService) DeleteRule(ctx context.Context, ruleId string, spaceId string) ApiDeleteRuleRequest {
+func (a *AlertingAPIService) DeleteRule(ctx context.Context, ruleId string, spaceId string) ApiDeleteRuleRequest {
return ApiDeleteRuleRequest{
ApiService: a,
ctx: ctx,
@@ -683,14 +683,14 @@ func (a *AlertingApiService) DeleteRule(ctx context.Context, ruleId string, spac
}
// Execute executes the request
-func (a *AlertingApiService) DeleteRuleExecute(r ApiDeleteRuleRequest) (*http.Response, error) {
+func (a *AlertingAPIService) DeleteRuleExecute(r ApiDeleteRuleRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
)
- localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingApiService.DeleteRule")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingAPIService.DeleteRule")
if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()}
}
@@ -789,7 +789,7 @@ func (a *AlertingApiService) DeleteRuleExecute(r ApiDeleteRuleRequest) (*http.Re
type ApiDisableRuleRequest struct {
ctx context.Context
- ApiService AlertingApi
+ ApiService AlertingAPI
kbnXsrf *string
ruleId string
spaceId string
@@ -815,7 +815,7 @@ You must have `all` privileges for the appropriate Kibana features, depending on
@param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used.
@return ApiDisableRuleRequest
*/
-func (a *AlertingApiService) DisableRule(ctx context.Context, ruleId string, spaceId string) ApiDisableRuleRequest {
+func (a *AlertingAPIService) DisableRule(ctx context.Context, ruleId string, spaceId string) ApiDisableRuleRequest {
return ApiDisableRuleRequest{
ApiService: a,
ctx: ctx,
@@ -825,14 +825,14 @@ func (a *AlertingApiService) DisableRule(ctx context.Context, ruleId string, spa
}
// Execute executes the request
-func (a *AlertingApiService) DisableRuleExecute(r ApiDisableRuleRequest) (*http.Response, error) {
+func (a *AlertingAPIService) DisableRuleExecute(r ApiDisableRuleRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
)
- localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingApiService.DisableRule")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingAPIService.DisableRule")
if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()}
}
@@ -931,7 +931,7 @@ func (a *AlertingApiService) DisableRuleExecute(r ApiDisableRuleRequest) (*http.
type ApiEnableRuleRequest struct {
ctx context.Context
- ApiService AlertingApi
+ ApiService AlertingAPI
kbnXsrf *string
ruleId string
spaceId string
@@ -957,7 +957,7 @@ This API supports token-based authentication only. You must have `all` privilege
@param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used.
@return ApiEnableRuleRequest
*/
-func (a *AlertingApiService) EnableRule(ctx context.Context, ruleId string, spaceId string) ApiEnableRuleRequest {
+func (a *AlertingAPIService) EnableRule(ctx context.Context, ruleId string, spaceId string) ApiEnableRuleRequest {
return ApiEnableRuleRequest{
ApiService: a,
ctx: ctx,
@@ -967,14 +967,14 @@ func (a *AlertingApiService) EnableRule(ctx context.Context, ruleId string, spac
}
// Execute executes the request
-func (a *AlertingApiService) EnableRuleExecute(r ApiEnableRuleRequest) (*http.Response, error) {
+func (a *AlertingAPIService) EnableRuleExecute(r ApiEnableRuleRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
)
- localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingApiService.EnableRule")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingAPIService.EnableRule")
if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()}
}
@@ -1073,7 +1073,7 @@ func (a *AlertingApiService) EnableRuleExecute(r ApiEnableRuleRequest) (*http.Re
type ApiFindRulesRequest struct {
ctx context.Context
- ApiService AlertingApi
+ ApiService AlertingAPI
spaceId string
defaultSearchOperator *string
fields *[]string
@@ -1160,7 +1160,7 @@ You must have `read` privileges for the appropriate Kibana features, depending o
@param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used.
@return ApiFindRulesRequest
*/
-func (a *AlertingApiService) FindRules(ctx context.Context, spaceId string) ApiFindRulesRequest {
+func (a *AlertingAPIService) FindRules(ctx context.Context, spaceId string) ApiFindRulesRequest {
return ApiFindRulesRequest{
ApiService: a,
ctx: ctx,
@@ -1171,7 +1171,7 @@ func (a *AlertingApiService) FindRules(ctx context.Context, spaceId string) ApiF
// Execute executes the request
//
// @return FindRules200Response
-func (a *AlertingApiService) FindRulesExecute(r ApiFindRulesRequest) (*FindRules200Response, *http.Response, error) {
+func (a *AlertingAPIService) FindRulesExecute(r ApiFindRulesRequest) (*FindRules200Response, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
@@ -1179,7 +1179,7 @@ func (a *AlertingApiService) FindRulesExecute(r ApiFindRulesRequest) (*FindRules
localVarReturnValue *FindRules200Response
)
- localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingApiService.FindRules")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingAPIService.FindRules")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
@@ -1193,13 +1193,16 @@ func (a *AlertingApiService) FindRulesExecute(r ApiFindRulesRequest) (*FindRules
if r.defaultSearchOperator != nil {
parameterAddToHeaderOrQuery(localVarQueryParams, "default_search_operator", r.defaultSearchOperator, "")
+ } else {
+ var defaultValue string = "OR"
+ r.defaultSearchOperator = &defaultValue
}
if r.fields != nil {
t := *r.fields
if reflect.TypeOf(t).Kind() == reflect.Slice {
s := reflect.ValueOf(t)
for i := 0; i < s.Len(); i++ {
- parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi")
+ parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i).Interface(), "multi")
}
} else {
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi")
@@ -1213,9 +1216,15 @@ func (a *AlertingApiService) FindRulesExecute(r ApiFindRulesRequest) (*FindRules
}
if r.page != nil {
parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "")
+ } else {
+ var defaultValue int32 = 1
+ r.page = &defaultValue
}
if r.perPage != nil {
parameterAddToHeaderOrQuery(localVarQueryParams, "per_page", r.perPage, "")
+ } else {
+ var defaultValue int32 = 20
+ r.perPage = &defaultValue
}
if r.search != nil {
parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "")
@@ -1228,6 +1237,9 @@ func (a *AlertingApiService) FindRulesExecute(r ApiFindRulesRequest) (*FindRules
}
if r.sortOrder != nil {
parameterAddToHeaderOrQuery(localVarQueryParams, "sort_order", r.sortOrder, "")
+ } else {
+ var defaultValue string = "desc"
+ r.sortOrder = &defaultValue
}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
@@ -1309,7 +1321,7 @@ func (a *AlertingApiService) FindRulesExecute(r ApiFindRulesRequest) (*FindRules
type ApiGetAlertingHealthRequest struct {
ctx context.Context
- ApiService AlertingApi
+ ApiService AlertingAPI
spaceId string
}
@@ -1326,7 +1338,7 @@ You must have `read` privileges for the **Management > Stack Rules** feature or
@param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used.
@return ApiGetAlertingHealthRequest
*/
-func (a *AlertingApiService) GetAlertingHealth(ctx context.Context, spaceId string) ApiGetAlertingHealthRequest {
+func (a *AlertingAPIService) GetAlertingHealth(ctx context.Context, spaceId string) ApiGetAlertingHealthRequest {
return ApiGetAlertingHealthRequest{
ApiService: a,
ctx: ctx,
@@ -1337,7 +1349,7 @@ func (a *AlertingApiService) GetAlertingHealth(ctx context.Context, spaceId stri
// Execute executes the request
//
// @return GetAlertingHealth200Response
-func (a *AlertingApiService) GetAlertingHealthExecute(r ApiGetAlertingHealthRequest) (*GetAlertingHealth200Response, *http.Response, error) {
+func (a *AlertingAPIService) GetAlertingHealthExecute(r ApiGetAlertingHealthRequest) (*GetAlertingHealth200Response, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
@@ -1345,7 +1357,7 @@ func (a *AlertingApiService) GetAlertingHealthExecute(r ApiGetAlertingHealthRequ
localVarReturnValue *GetAlertingHealth200Response
)
- localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingApiService.GetAlertingHealth")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingAPIService.GetAlertingHealth")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
@@ -1437,7 +1449,7 @@ func (a *AlertingApiService) GetAlertingHealthExecute(r ApiGetAlertingHealthRequ
type ApiGetRuleRequest struct {
ctx context.Context
- ApiService AlertingApi
+ ApiService AlertingAPI
ruleId string
spaceId string
}
@@ -1456,7 +1468,7 @@ You must have `read` privileges for the appropriate Kibana features, depending o
@param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used.
@return ApiGetRuleRequest
*/
-func (a *AlertingApiService) GetRule(ctx context.Context, ruleId string, spaceId string) ApiGetRuleRequest {
+func (a *AlertingAPIService) GetRule(ctx context.Context, ruleId string, spaceId string) ApiGetRuleRequest {
return ApiGetRuleRequest{
ApiService: a,
ctx: ctx,
@@ -1468,7 +1480,7 @@ func (a *AlertingApiService) GetRule(ctx context.Context, ruleId string, spaceId
// Execute executes the request
//
// @return RuleResponseProperties
-func (a *AlertingApiService) GetRuleExecute(r ApiGetRuleRequest) (*RuleResponseProperties, *http.Response, error) {
+func (a *AlertingAPIService) GetRuleExecute(r ApiGetRuleRequest) (*RuleResponseProperties, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
@@ -1476,7 +1488,7 @@ func (a *AlertingApiService) GetRuleExecute(r ApiGetRuleRequest) (*RuleResponseP
localVarReturnValue *RuleResponseProperties
)
- localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingApiService.GetRule")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingAPIService.GetRule")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
@@ -1580,7 +1592,7 @@ func (a *AlertingApiService) GetRuleExecute(r ApiGetRuleRequest) (*RuleResponseP
type ApiGetRuleTypesRequest struct {
ctx context.Context
- ApiService AlertingApi
+ ApiService AlertingAPI
spaceId string
}
@@ -1597,7 +1609,7 @@ If you have `read` privileges for one or more Kibana features, the API response
@param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used.
@return ApiGetRuleTypesRequest
*/
-func (a *AlertingApiService) GetRuleTypes(ctx context.Context, spaceId string) ApiGetRuleTypesRequest {
+func (a *AlertingAPIService) GetRuleTypes(ctx context.Context, spaceId string) ApiGetRuleTypesRequest {
return ApiGetRuleTypesRequest{
ApiService: a,
ctx: ctx,
@@ -1608,7 +1620,7 @@ func (a *AlertingApiService) GetRuleTypes(ctx context.Context, spaceId string) A
// Execute executes the request
//
// @return []GetRuleTypes200ResponseInner
-func (a *AlertingApiService) GetRuleTypesExecute(r ApiGetRuleTypesRequest) ([]GetRuleTypes200ResponseInner, *http.Response, error) {
+func (a *AlertingAPIService) GetRuleTypesExecute(r ApiGetRuleTypesRequest) ([]GetRuleTypes200ResponseInner, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
@@ -1616,7 +1628,7 @@ func (a *AlertingApiService) GetRuleTypesExecute(r ApiGetRuleTypesRequest) ([]Ge
localVarReturnValue []GetRuleTypes200ResponseInner
)
- localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingApiService.GetRuleTypes")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingAPIService.GetRuleTypes")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
@@ -1708,7 +1720,7 @@ func (a *AlertingApiService) GetRuleTypesExecute(r ApiGetRuleTypesRequest) ([]Ge
type ApiLegacyCreateAlertRequest struct {
ctx context.Context
- ApiService AlertingApi
+ ApiService AlertingAPI
kbnXsrf *string
alertId string
spaceId string
@@ -1742,7 +1754,7 @@ Deprecated in 7.13.0. Use the create rule API instead.
Deprecated
*/
-func (a *AlertingApiService) LegacyCreateAlert(ctx context.Context, alertId string, spaceId string) ApiLegacyCreateAlertRequest {
+func (a *AlertingAPIService) LegacyCreateAlert(ctx context.Context, alertId string, spaceId string) ApiLegacyCreateAlertRequest {
return ApiLegacyCreateAlertRequest{
ApiService: a,
ctx: ctx,
@@ -1756,7 +1768,7 @@ func (a *AlertingApiService) LegacyCreateAlert(ctx context.Context, alertId stri
// @return AlertResponseProperties
//
// Deprecated
-func (a *AlertingApiService) LegacyCreateAlertExecute(r ApiLegacyCreateAlertRequest) (*AlertResponseProperties, *http.Response, error) {
+func (a *AlertingAPIService) LegacyCreateAlertExecute(r ApiLegacyCreateAlertRequest) (*AlertResponseProperties, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
@@ -1764,7 +1776,7 @@ func (a *AlertingApiService) LegacyCreateAlertExecute(r ApiLegacyCreateAlertRequ
localVarReturnValue *AlertResponseProperties
)
- localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingApiService.LegacyCreateAlert")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingAPIService.LegacyCreateAlert")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
@@ -1866,7 +1878,7 @@ func (a *AlertingApiService) LegacyCreateAlertExecute(r ApiLegacyCreateAlertRequ
type ApiLegacyDisableAlertRequest struct {
ctx context.Context
- ApiService AlertingApi
+ ApiService AlertingAPI
kbnXsrf *string
spaceId string
alertId string
@@ -1894,7 +1906,7 @@ Deprecated in 7.13.0. Use the disable rule API instead.
Deprecated
*/
-func (a *AlertingApiService) LegacyDisableAlert(ctx context.Context, spaceId string, alertId string) ApiLegacyDisableAlertRequest {
+func (a *AlertingAPIService) LegacyDisableAlert(ctx context.Context, spaceId string, alertId string) ApiLegacyDisableAlertRequest {
return ApiLegacyDisableAlertRequest{
ApiService: a,
ctx: ctx,
@@ -1905,14 +1917,14 @@ func (a *AlertingApiService) LegacyDisableAlert(ctx context.Context, spaceId str
// Execute executes the request
// Deprecated
-func (a *AlertingApiService) LegacyDisableAlertExecute(r ApiLegacyDisableAlertRequest) (*http.Response, error) {
+func (a *AlertingAPIService) LegacyDisableAlertExecute(r ApiLegacyDisableAlertRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
)
- localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingApiService.LegacyDisableAlert")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingAPIService.LegacyDisableAlert")
if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()}
}
@@ -2000,7 +2012,7 @@ func (a *AlertingApiService) LegacyDisableAlertExecute(r ApiLegacyDisableAlertRe
type ApiLegacyEnableAlertRequest struct {
ctx context.Context
- ApiService AlertingApi
+ ApiService AlertingAPI
kbnXsrf *string
spaceId string
alertId string
@@ -2028,7 +2040,7 @@ Deprecated in 7.13.0. Use the enable rule API instead.
Deprecated
*/
-func (a *AlertingApiService) LegacyEnableAlert(ctx context.Context, spaceId string, alertId string) ApiLegacyEnableAlertRequest {
+func (a *AlertingAPIService) LegacyEnableAlert(ctx context.Context, spaceId string, alertId string) ApiLegacyEnableAlertRequest {
return ApiLegacyEnableAlertRequest{
ApiService: a,
ctx: ctx,
@@ -2039,14 +2051,14 @@ func (a *AlertingApiService) LegacyEnableAlert(ctx context.Context, spaceId stri
// Execute executes the request
// Deprecated
-func (a *AlertingApiService) LegacyEnableAlertExecute(r ApiLegacyEnableAlertRequest) (*http.Response, error) {
+func (a *AlertingAPIService) LegacyEnableAlertExecute(r ApiLegacyEnableAlertRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
)
- localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingApiService.LegacyEnableAlert")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingAPIService.LegacyEnableAlert")
if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()}
}
@@ -2134,7 +2146,7 @@ func (a *AlertingApiService) LegacyEnableAlertExecute(r ApiLegacyEnableAlertRequ
type ApiLegacyFindAlertsRequest struct {
ctx context.Context
- ApiService AlertingApi
+ ApiService AlertingAPI
spaceId string
defaultSearchOperator *string
fields *[]string
@@ -2223,7 +2235,7 @@ Deprecated in 7.13.0. Use the find rules API instead. NOTE: Alert `params` are s
Deprecated
*/
-func (a *AlertingApiService) LegacyFindAlerts(ctx context.Context, spaceId string) ApiLegacyFindAlertsRequest {
+func (a *AlertingAPIService) LegacyFindAlerts(ctx context.Context, spaceId string) ApiLegacyFindAlertsRequest {
return ApiLegacyFindAlertsRequest{
ApiService: a,
ctx: ctx,
@@ -2236,7 +2248,7 @@ func (a *AlertingApiService) LegacyFindAlerts(ctx context.Context, spaceId strin
// @return LegacyFindAlerts200Response
//
// Deprecated
-func (a *AlertingApiService) LegacyFindAlertsExecute(r ApiLegacyFindAlertsRequest) (*LegacyFindAlerts200Response, *http.Response, error) {
+func (a *AlertingAPIService) LegacyFindAlertsExecute(r ApiLegacyFindAlertsRequest) (*LegacyFindAlerts200Response, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
@@ -2244,7 +2256,7 @@ func (a *AlertingApiService) LegacyFindAlertsExecute(r ApiLegacyFindAlertsReques
localVarReturnValue *LegacyFindAlerts200Response
)
- localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingApiService.LegacyFindAlerts")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingAPIService.LegacyFindAlerts")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
@@ -2258,13 +2270,16 @@ func (a *AlertingApiService) LegacyFindAlertsExecute(r ApiLegacyFindAlertsReques
if r.defaultSearchOperator != nil {
parameterAddToHeaderOrQuery(localVarQueryParams, "default_search_operator", r.defaultSearchOperator, "")
+ } else {
+ var defaultValue string = "OR"
+ r.defaultSearchOperator = &defaultValue
}
if r.fields != nil {
t := *r.fields
if reflect.TypeOf(t).Kind() == reflect.Slice {
s := reflect.ValueOf(t)
for i := 0; i < s.Len(); i++ {
- parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i), "multi")
+ parameterAddToHeaderOrQuery(localVarQueryParams, "fields", s.Index(i).Interface(), "multi")
}
} else {
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", t, "multi")
@@ -2278,9 +2293,15 @@ func (a *AlertingApiService) LegacyFindAlertsExecute(r ApiLegacyFindAlertsReques
}
if r.page != nil {
parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "")
+ } else {
+ var defaultValue int32 = 1
+ r.page = &defaultValue
}
if r.perPage != nil {
parameterAddToHeaderOrQuery(localVarQueryParams, "per_page", r.perPage, "")
+ } else {
+ var defaultValue int32 = 20
+ r.perPage = &defaultValue
}
if r.search != nil {
parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "")
@@ -2293,6 +2314,9 @@ func (a *AlertingApiService) LegacyFindAlertsExecute(r ApiLegacyFindAlertsReques
}
if r.sortOrder != nil {
parameterAddToHeaderOrQuery(localVarQueryParams, "sort_order", r.sortOrder, "")
+ } else {
+ var defaultValue string = "desc"
+ r.sortOrder = &defaultValue
}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
@@ -2374,7 +2398,7 @@ func (a *AlertingApiService) LegacyFindAlertsExecute(r ApiLegacyFindAlertsReques
type ApiLegacyGetAlertRequest struct {
ctx context.Context
- ApiService AlertingApi
+ ApiService AlertingAPI
spaceId string
alertId string
}
@@ -2395,7 +2419,7 @@ Deprecated in 7.13.0. Use the get rule API instead.
Deprecated
*/
-func (a *AlertingApiService) LegacyGetAlert(ctx context.Context, spaceId string, alertId string) ApiLegacyGetAlertRequest {
+func (a *AlertingAPIService) LegacyGetAlert(ctx context.Context, spaceId string, alertId string) ApiLegacyGetAlertRequest {
return ApiLegacyGetAlertRequest{
ApiService: a,
ctx: ctx,
@@ -2409,7 +2433,7 @@ func (a *AlertingApiService) LegacyGetAlert(ctx context.Context, spaceId string,
// @return AlertResponseProperties
//
// Deprecated
-func (a *AlertingApiService) LegacyGetAlertExecute(r ApiLegacyGetAlertRequest) (*AlertResponseProperties, *http.Response, error) {
+func (a *AlertingAPIService) LegacyGetAlertExecute(r ApiLegacyGetAlertRequest) (*AlertResponseProperties, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
@@ -2417,7 +2441,7 @@ func (a *AlertingApiService) LegacyGetAlertExecute(r ApiLegacyGetAlertRequest) (
localVarReturnValue *AlertResponseProperties
)
- localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingApiService.LegacyGetAlert")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingAPIService.LegacyGetAlert")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
@@ -2510,7 +2534,7 @@ func (a *AlertingApiService) LegacyGetAlertExecute(r ApiLegacyGetAlertRequest) (
type ApiLegacyGetAlertTypesRequest struct {
ctx context.Context
- ApiService AlertingApi
+ ApiService AlertingAPI
spaceId string
}
@@ -2529,7 +2553,7 @@ Deprecated in 7.13.0. Use the get rule types API instead.
Deprecated
*/
-func (a *AlertingApiService) LegacyGetAlertTypes(ctx context.Context, spaceId string) ApiLegacyGetAlertTypesRequest {
+func (a *AlertingAPIService) LegacyGetAlertTypes(ctx context.Context, spaceId string) ApiLegacyGetAlertTypesRequest {
return ApiLegacyGetAlertTypesRequest{
ApiService: a,
ctx: ctx,
@@ -2542,7 +2566,7 @@ func (a *AlertingApiService) LegacyGetAlertTypes(ctx context.Context, spaceId st
// @return []LegacyGetAlertTypes200ResponseInner
//
// Deprecated
-func (a *AlertingApiService) LegacyGetAlertTypesExecute(r ApiLegacyGetAlertTypesRequest) ([]LegacyGetAlertTypes200ResponseInner, *http.Response, error) {
+func (a *AlertingAPIService) LegacyGetAlertTypesExecute(r ApiLegacyGetAlertTypesRequest) ([]LegacyGetAlertTypes200ResponseInner, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
@@ -2550,7 +2574,7 @@ func (a *AlertingApiService) LegacyGetAlertTypesExecute(r ApiLegacyGetAlertTypes
localVarReturnValue []LegacyGetAlertTypes200ResponseInner
)
- localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingApiService.LegacyGetAlertTypes")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingAPIService.LegacyGetAlertTypes")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
@@ -2642,7 +2666,7 @@ func (a *AlertingApiService) LegacyGetAlertTypesExecute(r ApiLegacyGetAlertTypes
type ApiLegacyGetAlertingHealthRequest struct {
ctx context.Context
- ApiService AlertingApi
+ ApiService AlertingAPI
spaceId string
}
@@ -2661,7 +2685,7 @@ Deprecated in 7.13.0. Use the get alerting framework health API instead.
Deprecated
*/
-func (a *AlertingApiService) LegacyGetAlertingHealth(ctx context.Context, spaceId string) ApiLegacyGetAlertingHealthRequest {
+func (a *AlertingAPIService) LegacyGetAlertingHealth(ctx context.Context, spaceId string) ApiLegacyGetAlertingHealthRequest {
return ApiLegacyGetAlertingHealthRequest{
ApiService: a,
ctx: ctx,
@@ -2674,7 +2698,7 @@ func (a *AlertingApiService) LegacyGetAlertingHealth(ctx context.Context, spaceI
// @return LegacyGetAlertingHealth200Response
//
// Deprecated
-func (a *AlertingApiService) LegacyGetAlertingHealthExecute(r ApiLegacyGetAlertingHealthRequest) (*LegacyGetAlertingHealth200Response, *http.Response, error) {
+func (a *AlertingAPIService) LegacyGetAlertingHealthExecute(r ApiLegacyGetAlertingHealthRequest) (*LegacyGetAlertingHealth200Response, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
@@ -2682,7 +2706,7 @@ func (a *AlertingApiService) LegacyGetAlertingHealthExecute(r ApiLegacyGetAlerti
localVarReturnValue *LegacyGetAlertingHealth200Response
)
- localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingApiService.LegacyGetAlertingHealth")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingAPIService.LegacyGetAlertingHealth")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
@@ -2774,7 +2798,7 @@ func (a *AlertingApiService) LegacyGetAlertingHealthExecute(r ApiLegacyGetAlerti
type ApiLegacyMuteAlertInstanceRequest struct {
ctx context.Context
- ApiService AlertingApi
+ ApiService AlertingAPI
kbnXsrf *string
spaceId string
alertId string
@@ -2804,7 +2828,7 @@ Deprecated in 7.13.0. Use the mute alert API instead.
Deprecated
*/
-func (a *AlertingApiService) LegacyMuteAlertInstance(ctx context.Context, spaceId string, alertId string, alertInstanceId string) ApiLegacyMuteAlertInstanceRequest {
+func (a *AlertingAPIService) LegacyMuteAlertInstance(ctx context.Context, spaceId string, alertId string, alertInstanceId string) ApiLegacyMuteAlertInstanceRequest {
return ApiLegacyMuteAlertInstanceRequest{
ApiService: a,
ctx: ctx,
@@ -2816,14 +2840,14 @@ func (a *AlertingApiService) LegacyMuteAlertInstance(ctx context.Context, spaceI
// Execute executes the request
// Deprecated
-func (a *AlertingApiService) LegacyMuteAlertInstanceExecute(r ApiLegacyMuteAlertInstanceRequest) (*http.Response, error) {
+func (a *AlertingAPIService) LegacyMuteAlertInstanceExecute(r ApiLegacyMuteAlertInstanceRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
)
- localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingApiService.LegacyMuteAlertInstance")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingAPIService.LegacyMuteAlertInstance")
if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()}
}
@@ -2912,7 +2936,7 @@ func (a *AlertingApiService) LegacyMuteAlertInstanceExecute(r ApiLegacyMuteAlert
type ApiLegacyMuteAllAlertInstancesRequest struct {
ctx context.Context
- ApiService AlertingApi
+ ApiService AlertingAPI
kbnXsrf *string
spaceId string
alertId string
@@ -2940,7 +2964,7 @@ Deprecated in 7.13.0. Use the mute all alerts API instead.
Deprecated
*/
-func (a *AlertingApiService) LegacyMuteAllAlertInstances(ctx context.Context, spaceId string, alertId string) ApiLegacyMuteAllAlertInstancesRequest {
+func (a *AlertingAPIService) LegacyMuteAllAlertInstances(ctx context.Context, spaceId string, alertId string) ApiLegacyMuteAllAlertInstancesRequest {
return ApiLegacyMuteAllAlertInstancesRequest{
ApiService: a,
ctx: ctx,
@@ -2951,14 +2975,14 @@ func (a *AlertingApiService) LegacyMuteAllAlertInstances(ctx context.Context, sp
// Execute executes the request
// Deprecated
-func (a *AlertingApiService) LegacyMuteAllAlertInstancesExecute(r ApiLegacyMuteAllAlertInstancesRequest) (*http.Response, error) {
+func (a *AlertingAPIService) LegacyMuteAllAlertInstancesExecute(r ApiLegacyMuteAllAlertInstancesRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
)
- localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingApiService.LegacyMuteAllAlertInstances")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingAPIService.LegacyMuteAllAlertInstances")
if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()}
}
@@ -3046,7 +3070,7 @@ func (a *AlertingApiService) LegacyMuteAllAlertInstancesExecute(r ApiLegacyMuteA
type ApiLegacyUnmuteAlertInstanceRequest struct {
ctx context.Context
- ApiService AlertingApi
+ ApiService AlertingAPI
kbnXsrf *string
spaceId string
alertId string
@@ -3076,7 +3100,7 @@ Deprecated in 7.13.0. Use the unmute alert API instead.
Deprecated
*/
-func (a *AlertingApiService) LegacyUnmuteAlertInstance(ctx context.Context, spaceId string, alertId string, alertInstanceId string) ApiLegacyUnmuteAlertInstanceRequest {
+func (a *AlertingAPIService) LegacyUnmuteAlertInstance(ctx context.Context, spaceId string, alertId string, alertInstanceId string) ApiLegacyUnmuteAlertInstanceRequest {
return ApiLegacyUnmuteAlertInstanceRequest{
ApiService: a,
ctx: ctx,
@@ -3088,14 +3112,14 @@ func (a *AlertingApiService) LegacyUnmuteAlertInstance(ctx context.Context, spac
// Execute executes the request
// Deprecated
-func (a *AlertingApiService) LegacyUnmuteAlertInstanceExecute(r ApiLegacyUnmuteAlertInstanceRequest) (*http.Response, error) {
+func (a *AlertingAPIService) LegacyUnmuteAlertInstanceExecute(r ApiLegacyUnmuteAlertInstanceRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
)
- localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingApiService.LegacyUnmuteAlertInstance")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingAPIService.LegacyUnmuteAlertInstance")
if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()}
}
@@ -3184,7 +3208,7 @@ func (a *AlertingApiService) LegacyUnmuteAlertInstanceExecute(r ApiLegacyUnmuteA
type ApiLegacyUnmuteAllAlertInstancesRequest struct {
ctx context.Context
- ApiService AlertingApi
+ ApiService AlertingAPI
kbnXsrf *string
spaceId string
alertId string
@@ -3212,7 +3236,7 @@ Deprecated in 7.13.0. Use the unmute all alerts API instead.
Deprecated
*/
-func (a *AlertingApiService) LegacyUnmuteAllAlertInstances(ctx context.Context, spaceId string, alertId string) ApiLegacyUnmuteAllAlertInstancesRequest {
+func (a *AlertingAPIService) LegacyUnmuteAllAlertInstances(ctx context.Context, spaceId string, alertId string) ApiLegacyUnmuteAllAlertInstancesRequest {
return ApiLegacyUnmuteAllAlertInstancesRequest{
ApiService: a,
ctx: ctx,
@@ -3223,14 +3247,14 @@ func (a *AlertingApiService) LegacyUnmuteAllAlertInstances(ctx context.Context,
// Execute executes the request
// Deprecated
-func (a *AlertingApiService) LegacyUnmuteAllAlertInstancesExecute(r ApiLegacyUnmuteAllAlertInstancesRequest) (*http.Response, error) {
+func (a *AlertingAPIService) LegacyUnmuteAllAlertInstancesExecute(r ApiLegacyUnmuteAllAlertInstancesRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
)
- localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingApiService.LegacyUnmuteAllAlertInstances")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingAPIService.LegacyUnmuteAllAlertInstances")
if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()}
}
@@ -3318,7 +3342,7 @@ func (a *AlertingApiService) LegacyUnmuteAllAlertInstancesExecute(r ApiLegacyUnm
type ApiLegacyUpdateAlertRequest struct {
ctx context.Context
- ApiService AlertingApi
+ ApiService AlertingAPI
kbnXsrf *string
spaceId string
alertId string
@@ -3352,7 +3376,7 @@ Deprecated in 7.13.0. Use the update rule API instead.
Deprecated
*/
-func (a *AlertingApiService) LegacyUpdateAlert(ctx context.Context, spaceId string, alertId string) ApiLegacyUpdateAlertRequest {
+func (a *AlertingAPIService) LegacyUpdateAlert(ctx context.Context, spaceId string, alertId string) ApiLegacyUpdateAlertRequest {
return ApiLegacyUpdateAlertRequest{
ApiService: a,
ctx: ctx,
@@ -3366,7 +3390,7 @@ func (a *AlertingApiService) LegacyUpdateAlert(ctx context.Context, spaceId stri
// @return AlertResponseProperties
//
// Deprecated
-func (a *AlertingApiService) LegacyUpdateAlertExecute(r ApiLegacyUpdateAlertRequest) (*AlertResponseProperties, *http.Response, error) {
+func (a *AlertingAPIService) LegacyUpdateAlertExecute(r ApiLegacyUpdateAlertRequest) (*AlertResponseProperties, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPut
localVarPostBody interface{}
@@ -3374,7 +3398,7 @@ func (a *AlertingApiService) LegacyUpdateAlertExecute(r ApiLegacyUpdateAlertRequ
localVarReturnValue *AlertResponseProperties
)
- localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingApiService.LegacyUpdateAlert")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingAPIService.LegacyUpdateAlert")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
@@ -3476,7 +3500,7 @@ func (a *AlertingApiService) LegacyUpdateAlertExecute(r ApiLegacyUpdateAlertRequ
type ApiLegaryDeleteAlertRequest struct {
ctx context.Context
- ApiService AlertingApi
+ ApiService AlertingAPI
kbnXsrf *string
spaceId string
alertId string
@@ -3504,7 +3528,7 @@ Deprecated in 7.13.0. Use the delete rule API instead. WARNING: After you delete
Deprecated
*/
-func (a *AlertingApiService) LegaryDeleteAlert(ctx context.Context, spaceId string, alertId string) ApiLegaryDeleteAlertRequest {
+func (a *AlertingAPIService) LegaryDeleteAlert(ctx context.Context, spaceId string, alertId string) ApiLegaryDeleteAlertRequest {
return ApiLegaryDeleteAlertRequest{
ApiService: a,
ctx: ctx,
@@ -3515,14 +3539,14 @@ func (a *AlertingApiService) LegaryDeleteAlert(ctx context.Context, spaceId stri
// Execute executes the request
// Deprecated
-func (a *AlertingApiService) LegaryDeleteAlertExecute(r ApiLegaryDeleteAlertRequest) (*http.Response, error) {
+func (a *AlertingAPIService) LegaryDeleteAlertExecute(r ApiLegaryDeleteAlertRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
)
- localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingApiService.LegaryDeleteAlert")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingAPIService.LegaryDeleteAlert")
if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()}
}
@@ -3610,7 +3634,7 @@ func (a *AlertingApiService) LegaryDeleteAlertExecute(r ApiLegaryDeleteAlertRequ
type ApiMuteAlertRequest struct {
ctx context.Context
- ApiService AlertingApi
+ ApiService AlertingAPI
kbnXsrf *string
alertId string
ruleId string
@@ -3638,7 +3662,7 @@ You must have `all` privileges for the appropriate Kibana features, depending on
@param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used.
@return ApiMuteAlertRequest
*/
-func (a *AlertingApiService) MuteAlert(ctx context.Context, alertId string, ruleId string, spaceId string) ApiMuteAlertRequest {
+func (a *AlertingAPIService) MuteAlert(ctx context.Context, alertId string, ruleId string, spaceId string) ApiMuteAlertRequest {
return ApiMuteAlertRequest{
ApiService: a,
ctx: ctx,
@@ -3649,14 +3673,14 @@ func (a *AlertingApiService) MuteAlert(ctx context.Context, alertId string, rule
}
// Execute executes the request
-func (a *AlertingApiService) MuteAlertExecute(r ApiMuteAlertRequest) (*http.Response, error) {
+func (a *AlertingAPIService) MuteAlertExecute(r ApiMuteAlertRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
)
- localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingApiService.MuteAlert")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingAPIService.MuteAlert")
if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()}
}
@@ -3745,7 +3769,7 @@ func (a *AlertingApiService) MuteAlertExecute(r ApiMuteAlertRequest) (*http.Resp
type ApiMuteAllAlertsRequest struct {
ctx context.Context
- ApiService AlertingApi
+ ApiService AlertingAPI
kbnXsrf *string
ruleId string
spaceId string
@@ -3771,7 +3795,7 @@ This API snoozes the notifications for the rule indefinitely. The rule checks co
@param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used.
@return ApiMuteAllAlertsRequest
*/
-func (a *AlertingApiService) MuteAllAlerts(ctx context.Context, ruleId string, spaceId string) ApiMuteAllAlertsRequest {
+func (a *AlertingAPIService) MuteAllAlerts(ctx context.Context, ruleId string, spaceId string) ApiMuteAllAlertsRequest {
return ApiMuteAllAlertsRequest{
ApiService: a,
ctx: ctx,
@@ -3781,14 +3805,14 @@ func (a *AlertingApiService) MuteAllAlerts(ctx context.Context, ruleId string, s
}
// Execute executes the request
-func (a *AlertingApiService) MuteAllAlertsExecute(r ApiMuteAllAlertsRequest) (*http.Response, error) {
+func (a *AlertingAPIService) MuteAllAlertsExecute(r ApiMuteAllAlertsRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
)
- localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingApiService.MuteAllAlerts")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingAPIService.MuteAllAlerts")
if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()}
}
@@ -3876,7 +3900,7 @@ func (a *AlertingApiService) MuteAllAlertsExecute(r ApiMuteAllAlertsRequest) (*h
type ApiUnmuteAlertRequest struct {
ctx context.Context
- ApiService AlertingApi
+ ApiService AlertingAPI
kbnXsrf *string
alertId string
ruleId string
@@ -3904,7 +3928,7 @@ You must have `all` privileges for the appropriate Kibana features, depending on
@param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used.
@return ApiUnmuteAlertRequest
*/
-func (a *AlertingApiService) UnmuteAlert(ctx context.Context, alertId string, ruleId string, spaceId string) ApiUnmuteAlertRequest {
+func (a *AlertingAPIService) UnmuteAlert(ctx context.Context, alertId string, ruleId string, spaceId string) ApiUnmuteAlertRequest {
return ApiUnmuteAlertRequest{
ApiService: a,
ctx: ctx,
@@ -3915,14 +3939,14 @@ func (a *AlertingApiService) UnmuteAlert(ctx context.Context, alertId string, ru
}
// Execute executes the request
-func (a *AlertingApiService) UnmuteAlertExecute(r ApiUnmuteAlertRequest) (*http.Response, error) {
+func (a *AlertingAPIService) UnmuteAlertExecute(r ApiUnmuteAlertRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
)
- localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingApiService.UnmuteAlert")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingAPIService.UnmuteAlert")
if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()}
}
@@ -4011,7 +4035,7 @@ func (a *AlertingApiService) UnmuteAlertExecute(r ApiUnmuteAlertRequest) (*http.
type ApiUnmuteAllAlertsRequest struct {
ctx context.Context
- ApiService AlertingApi
+ ApiService AlertingAPI
kbnXsrf *string
ruleId string
spaceId string
@@ -4037,7 +4061,7 @@ If the rule has its notifications snoozed indefinitely, this API cancels the sno
@param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used.
@return ApiUnmuteAllAlertsRequest
*/
-func (a *AlertingApiService) UnmuteAllAlerts(ctx context.Context, ruleId string, spaceId string) ApiUnmuteAllAlertsRequest {
+func (a *AlertingAPIService) UnmuteAllAlerts(ctx context.Context, ruleId string, spaceId string) ApiUnmuteAllAlertsRequest {
return ApiUnmuteAllAlertsRequest{
ApiService: a,
ctx: ctx,
@@ -4047,14 +4071,14 @@ func (a *AlertingApiService) UnmuteAllAlerts(ctx context.Context, ruleId string,
}
// Execute executes the request
-func (a *AlertingApiService) UnmuteAllAlertsExecute(r ApiUnmuteAllAlertsRequest) (*http.Response, error) {
+func (a *AlertingAPIService) UnmuteAllAlertsExecute(r ApiUnmuteAllAlertsRequest) (*http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
)
- localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingApiService.UnmuteAllAlerts")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingAPIService.UnmuteAllAlerts")
if err != nil {
return nil, &GenericOpenAPIError{error: err.Error()}
}
@@ -4142,7 +4166,7 @@ func (a *AlertingApiService) UnmuteAllAlertsExecute(r ApiUnmuteAllAlertsRequest)
type ApiUpdateRuleRequest struct {
ctx context.Context
- ApiService AlertingApi
+ ApiService AlertingAPI
kbnXsrf *string
ruleId string
spaceId string
@@ -4174,7 +4198,7 @@ You must have `all` privileges for the appropriate Kibana features, depending on
@param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used.
@return ApiUpdateRuleRequest
*/
-func (a *AlertingApiService) UpdateRule(ctx context.Context, ruleId string, spaceId string) ApiUpdateRuleRequest {
+func (a *AlertingAPIService) UpdateRule(ctx context.Context, ruleId string, spaceId string) ApiUpdateRuleRequest {
return ApiUpdateRuleRequest{
ApiService: a,
ctx: ctx,
@@ -4186,7 +4210,7 @@ func (a *AlertingApiService) UpdateRule(ctx context.Context, ruleId string, spac
// Execute executes the request
//
// @return RuleResponseProperties
-func (a *AlertingApiService) UpdateRuleExecute(r ApiUpdateRuleRequest) (*RuleResponseProperties, *http.Response, error) {
+func (a *AlertingAPIService) UpdateRuleExecute(r ApiUpdateRuleRequest) (*RuleResponseProperties, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPut
localVarPostBody interface{}
@@ -4194,7 +4218,7 @@ func (a *AlertingApiService) UpdateRuleExecute(r ApiUpdateRuleRequest) (*RuleRes
localVarReturnValue *RuleResponseProperties
)
- localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingApiService.UpdateRule")
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AlertingAPIService.UpdateRule")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
diff --git a/generated/alerting/client.go b/generated/alerting/client.go
index 94ccb6505..82cdfee61 100644
--- a/generated/alerting/client.go
+++ b/generated/alerting/client.go
@@ -34,8 +34,8 @@ import (
)
var (
- jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`)
- xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`)
+ JsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?json)`)
+ XmlCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?xml)`)
queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`)
queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]")
)
@@ -48,7 +48,7 @@ type APIClient struct {
// API Services
- AlertingApi AlertingApi
+ AlertingAPI AlertingAPI
}
type service struct {
@@ -67,7 +67,7 @@ func NewAPIClient(cfg *Configuration) *APIClient {
c.common.client = c
// API Services
- c.AlertingApi = (*AlertingApiService)(&c.common)
+ c.AlertingAPI = (*AlertingAPIService)(&c.common)
return c
}
@@ -459,13 +459,13 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err
_, err = (*f).Seek(0, io.SeekStart)
return
}
- if xmlCheck.MatchString(contentType) {
+ if XmlCheck.MatchString(contentType) {
if err = xml.Unmarshal(b, v); err != nil {
return err
}
return nil
}
- if jsonCheck.MatchString(contentType) {
+ if JsonCheck.MatchString(contentType) {
if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas
if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined
if err = unmarshalObj.UnmarshalJSON(b); err != nil {
@@ -530,10 +530,14 @@ func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err e
_, err = bodyBuf.WriteString(s)
} else if s, ok := body.(*string); ok {
_, err = bodyBuf.WriteString(*s)
- } else if jsonCheck.MatchString(contentType) {
+ } else if JsonCheck.MatchString(contentType) {
err = json.NewEncoder(bodyBuf).Encode(body)
- } else if xmlCheck.MatchString(contentType) {
- err = xml.NewEncoder(bodyBuf).Encode(body)
+ } else if XmlCheck.MatchString(contentType) {
+ var bs []byte
+ bs, err = xml.Marshal(body)
+ if err == nil {
+ bodyBuf.Write(bs)
+ }
}
if err != nil {
@@ -649,16 +653,17 @@ func formatErrorMessage(status string, v interface{}) string {
str := ""
metaValue := reflect.ValueOf(v).Elem()
- field := metaValue.FieldByName("Title")
- if field != (reflect.Value{}) {
- str = fmt.Sprintf("%s", field.Interface())
- }
+ if metaValue.Kind() == reflect.Struct {
+ field := metaValue.FieldByName("Title")
+ if field != (reflect.Value{}) {
+ str = fmt.Sprintf("%s", field.Interface())
+ }
- field = metaValue.FieldByName("Detail")
- if field != (reflect.Value{}) {
- str = fmt.Sprintf("%s (%s)", str, field.Interface())
+ field = metaValue.FieldByName("Detail")
+ if field != (reflect.Value{}) {
+ str = fmt.Sprintf("%s (%s)", str, field.Interface())
+ }
}
- // status title (detail)
return strings.TrimSpace(fmt.Sprintf("%s %s", status, str))
}
diff --git a/generated/alerting/configuration.go b/generated/alerting/configuration.go
index 7b209ad61..9194a2ee2 100644
--- a/generated/alerting/configuration.go
+++ b/generated/alerting/configuration.go
@@ -101,157 +101,157 @@ func NewConfiguration() *Configuration {
},
},
OperationServers: map[string]ServerConfigurations{
- "AlertingApiService.CreateRule": {
+ "AlertingAPIService.CreateRule": {
{
URL: "https://localhost:5601",
Description: "No description provided",
},
},
- "AlertingApiService.DeleteRule": {
+ "AlertingAPIService.DeleteRule": {
{
URL: "https://localhost:5601",
Description: "No description provided",
},
},
- "AlertingApiService.DisableRule": {
+ "AlertingAPIService.DisableRule": {
{
URL: "https://localhost:5601",
Description: "No description provided",
},
},
- "AlertingApiService.EnableRule": {
+ "AlertingAPIService.EnableRule": {
{
URL: "https://localhost:5601",
Description: "No description provided",
},
},
- "AlertingApiService.FindRules": {
+ "AlertingAPIService.FindRules": {
{
URL: "https://localhost:5601",
Description: "No description provided",
},
},
- "AlertingApiService.GetAlertingHealth": {
+ "AlertingAPIService.GetAlertingHealth": {
{
URL: "https://localhost:5601",
Description: "No description provided",
},
},
- "AlertingApiService.GetRule": {
+ "AlertingAPIService.GetRule": {
{
URL: "https://localhost:5601",
Description: "No description provided",
},
},
- "AlertingApiService.GetRuleTypes": {
+ "AlertingAPIService.GetRuleTypes": {
{
URL: "https://localhost:5601",
Description: "No description provided",
},
},
- "AlertingApiService.LegacyCreateAlert": {
+ "AlertingAPIService.LegacyCreateAlert": {
{
URL: "https://localhost:5601",
Description: "No description provided",
},
},
- "AlertingApiService.LegacyDisableAlert": {
+ "AlertingAPIService.LegacyDisableAlert": {
{
URL: "https://localhost:5601",
Description: "No description provided",
},
},
- "AlertingApiService.LegacyEnableAlert": {
+ "AlertingAPIService.LegacyEnableAlert": {
{
URL: "https://localhost:5601",
Description: "No description provided",
},
},
- "AlertingApiService.LegacyFindAlerts": {
+ "AlertingAPIService.LegacyFindAlerts": {
{
URL: "https://localhost:5601",
Description: "No description provided",
},
},
- "AlertingApiService.LegacyGetAlert": {
+ "AlertingAPIService.LegacyGetAlert": {
{
URL: "https://localhost:5601",
Description: "No description provided",
},
},
- "AlertingApiService.LegacyGetAlertTypes": {
+ "AlertingAPIService.LegacyGetAlertTypes": {
{
URL: "https://localhost:5601",
Description: "No description provided",
},
},
- "AlertingApiService.LegacyGetAlertingHealth": {
+ "AlertingAPIService.LegacyGetAlertingHealth": {
{
URL: "https://localhost:5601",
Description: "No description provided",
},
},
- "AlertingApiService.LegacyMuteAlertInstance": {
+ "AlertingAPIService.LegacyMuteAlertInstance": {
{
URL: "https://localhost:5601",
Description: "No description provided",
},
},
- "AlertingApiService.LegacyMuteAllAlertInstances": {
+ "AlertingAPIService.LegacyMuteAllAlertInstances": {
{
URL: "https://localhost:5601",
Description: "No description provided",
},
},
- "AlertingApiService.LegacyUnmuteAlertInstance": {
+ "AlertingAPIService.LegacyUnmuteAlertInstance": {
{
URL: "https://localhost:5601",
Description: "No description provided",
},
},
- "AlertingApiService.LegacyUnmuteAllAlertInstances": {
+ "AlertingAPIService.LegacyUnmuteAllAlertInstances": {
{
URL: "https://localhost:5601",
Description: "No description provided",
},
},
- "AlertingApiService.LegacyUpdateAlert": {
+ "AlertingAPIService.LegacyUpdateAlert": {
{
URL: "https://localhost:5601",
Description: "No description provided",
},
},
- "AlertingApiService.LegaryDeleteAlert": {
+ "AlertingAPIService.LegaryDeleteAlert": {
{
URL: "https://localhost:5601",
Description: "No description provided",
},
},
- "AlertingApiService.MuteAlert": {
+ "AlertingAPIService.MuteAlert": {
{
URL: "https://localhost:5601",
Description: "No description provided",
},
},
- "AlertingApiService.MuteAllAlerts": {
+ "AlertingAPIService.MuteAllAlerts": {
{
URL: "https://localhost:5601",
Description: "No description provided",
},
},
- "AlertingApiService.UnmuteAlert": {
+ "AlertingAPIService.UnmuteAlert": {
{
URL: "https://localhost:5601",
Description: "No description provided",
},
},
- "AlertingApiService.UnmuteAllAlerts": {
+ "AlertingAPIService.UnmuteAllAlerts": {
{
URL: "https://localhost:5601",
Description: "No description provided",
},
},
- "AlertingApiService.UpdateRule": {
+ "AlertingAPIService.UpdateRule": {
{
URL: "https://localhost:5601",
Description: "No description provided",
diff --git a/generated/alerting/docs/AlertingApi.md b/generated/alerting/docs/AlertingApi.md
index 66427ca54..66196f2b9 100644
--- a/generated/alerting/docs/AlertingApi.md
+++ b/generated/alerting/docs/AlertingApi.md
@@ -1,35 +1,35 @@
-# \AlertingApi
+# \AlertingAPI
All URIs are relative to *http://localhost:5601*
Method | HTTP request | Description
------------- | ------------- | -------------
-[**CreateRule**](AlertingApi.md#CreateRule) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId} | Creates a rule.
-[**DeleteRule**](AlertingApi.md#DeleteRule) | **Delete** /s/{spaceId}/api/alerting/rule/{ruleId} | Deletes a rule.
-[**DisableRule**](AlertingApi.md#DisableRule) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/_disable | Disables a rule.
-[**EnableRule**](AlertingApi.md#EnableRule) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/_enable | Enables a rule.
-[**FindRules**](AlertingApi.md#FindRules) | **Get** /s/{spaceId}/api/alerting/rules/_find | Retrieves information about rules.
-[**GetAlertingHealth**](AlertingApi.md#GetAlertingHealth) | **Get** /s/{spaceId}/api/alerting/_health | Retrieves the health status of the alerting framework.
-[**GetRule**](AlertingApi.md#GetRule) | **Get** /s/{spaceId}/api/alerting/rule/{ruleId} | Retrieves a rule by its identifier.
-[**GetRuleTypes**](AlertingApi.md#GetRuleTypes) | **Get** /s/{spaceId}/api/alerting/rule_types | Retrieves a list of rule types.
-[**LegacyCreateAlert**](AlertingApi.md#LegacyCreateAlert) | **Post** /s/{spaceId}/api/alerts/alert/{alertId} | Create an alert.
-[**LegacyDisableAlert**](AlertingApi.md#LegacyDisableAlert) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/_disable | Disables an alert.
-[**LegacyEnableAlert**](AlertingApi.md#LegacyEnableAlert) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/_enable | Enables an alert.
-[**LegacyFindAlerts**](AlertingApi.md#LegacyFindAlerts) | **Get** /s/{spaceId}/api/alerts/alerts/_find | Retrieves a paginated set of alerts.
-[**LegacyGetAlert**](AlertingApi.md#LegacyGetAlert) | **Get** /s/{spaceId}/api/alerts/alert/{alertId} | Retrieves an alert by its identifier.
-[**LegacyGetAlertTypes**](AlertingApi.md#LegacyGetAlertTypes) | **Get** /s/{spaceId}/api/alerts/alerts/list_alert_types | Retrieves a list of alert types.
-[**LegacyGetAlertingHealth**](AlertingApi.md#LegacyGetAlertingHealth) | **Get** /s/{spaceId}/api/alerts/alerts/_health | Retrieves the health status of the alerting framework.
-[**LegacyMuteAlertInstance**](AlertingApi.md#LegacyMuteAlertInstance) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/alert_instance/{alertInstanceId}/_mute | Mutes an alert instance.
-[**LegacyMuteAllAlertInstances**](AlertingApi.md#LegacyMuteAllAlertInstances) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/_mute_all | Mutes all alert instances.
-[**LegacyUnmuteAlertInstance**](AlertingApi.md#LegacyUnmuteAlertInstance) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/alert_instance/{alertInstanceId}/_unmute | Unmutes an alert instance.
-[**LegacyUnmuteAllAlertInstances**](AlertingApi.md#LegacyUnmuteAllAlertInstances) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/_unmute_all | Unmutes all alert instances.
-[**LegacyUpdateAlert**](AlertingApi.md#LegacyUpdateAlert) | **Put** /s/{spaceId}/api/alerts/alert/{alertId} | Updates the attributes for an alert.
-[**LegaryDeleteAlert**](AlertingApi.md#LegaryDeleteAlert) | **Delete** /s/{spaceId}/api/alerts/alert/{alertId} | Permanently removes an alert.
-[**MuteAlert**](AlertingApi.md#MuteAlert) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/alert/{alertId}/_mute | Mutes an alert.
-[**MuteAllAlerts**](AlertingApi.md#MuteAllAlerts) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/_mute_all | Mutes all alerts.
-[**UnmuteAlert**](AlertingApi.md#UnmuteAlert) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/alert/{alertId}/_unmute | Unmutes an alert.
-[**UnmuteAllAlerts**](AlertingApi.md#UnmuteAllAlerts) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/_unmute_all | Unmutes all alerts.
-[**UpdateRule**](AlertingApi.md#UpdateRule) | **Put** /s/{spaceId}/api/alerting/rule/{ruleId} | Updates the attributes for a rule.
+[**CreateRule**](AlertingAPI.md#CreateRule) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId} | Creates a rule.
+[**DeleteRule**](AlertingAPI.md#DeleteRule) | **Delete** /s/{spaceId}/api/alerting/rule/{ruleId} | Deletes a rule.
+[**DisableRule**](AlertingAPI.md#DisableRule) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/_disable | Disables a rule.
+[**EnableRule**](AlertingAPI.md#EnableRule) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/_enable | Enables a rule.
+[**FindRules**](AlertingAPI.md#FindRules) | **Get** /s/{spaceId}/api/alerting/rules/_find | Retrieves information about rules.
+[**GetAlertingHealth**](AlertingAPI.md#GetAlertingHealth) | **Get** /s/{spaceId}/api/alerting/_health | Retrieves the health status of the alerting framework.
+[**GetRule**](AlertingAPI.md#GetRule) | **Get** /s/{spaceId}/api/alerting/rule/{ruleId} | Retrieves a rule by its identifier.
+[**GetRuleTypes**](AlertingAPI.md#GetRuleTypes) | **Get** /s/{spaceId}/api/alerting/rule_types | Retrieves a list of rule types.
+[**LegacyCreateAlert**](AlertingAPI.md#LegacyCreateAlert) | **Post** /s/{spaceId}/api/alerts/alert/{alertId} | Create an alert.
+[**LegacyDisableAlert**](AlertingAPI.md#LegacyDisableAlert) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/_disable | Disables an alert.
+[**LegacyEnableAlert**](AlertingAPI.md#LegacyEnableAlert) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/_enable | Enables an alert.
+[**LegacyFindAlerts**](AlertingAPI.md#LegacyFindAlerts) | **Get** /s/{spaceId}/api/alerts/alerts/_find | Retrieves a paginated set of alerts.
+[**LegacyGetAlert**](AlertingAPI.md#LegacyGetAlert) | **Get** /s/{spaceId}/api/alerts/alert/{alertId} | Retrieves an alert by its identifier.
+[**LegacyGetAlertTypes**](AlertingAPI.md#LegacyGetAlertTypes) | **Get** /s/{spaceId}/api/alerts/alerts/list_alert_types | Retrieves a list of alert types.
+[**LegacyGetAlertingHealth**](AlertingAPI.md#LegacyGetAlertingHealth) | **Get** /s/{spaceId}/api/alerts/alerts/_health | Retrieves the health status of the alerting framework.
+[**LegacyMuteAlertInstance**](AlertingAPI.md#LegacyMuteAlertInstance) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/alert_instance/{alertInstanceId}/_mute | Mutes an alert instance.
+[**LegacyMuteAllAlertInstances**](AlertingAPI.md#LegacyMuteAllAlertInstances) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/_mute_all | Mutes all alert instances.
+[**LegacyUnmuteAlertInstance**](AlertingAPI.md#LegacyUnmuteAlertInstance) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/alert_instance/{alertInstanceId}/_unmute | Unmutes an alert instance.
+[**LegacyUnmuteAllAlertInstances**](AlertingAPI.md#LegacyUnmuteAllAlertInstances) | **Post** /s/{spaceId}/api/alerts/alert/{alertId}/_unmute_all | Unmutes all alert instances.
+[**LegacyUpdateAlert**](AlertingAPI.md#LegacyUpdateAlert) | **Put** /s/{spaceId}/api/alerts/alert/{alertId} | Updates the attributes for an alert.
+[**LegaryDeleteAlert**](AlertingAPI.md#LegaryDeleteAlert) | **Delete** /s/{spaceId}/api/alerts/alert/{alertId} | Permanently removes an alert.
+[**MuteAlert**](AlertingAPI.md#MuteAlert) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/alert/{alertId}/_mute | Mutes an alert.
+[**MuteAllAlerts**](AlertingAPI.md#MuteAllAlerts) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/_mute_all | Mutes all alerts.
+[**UnmuteAlert**](AlertingAPI.md#UnmuteAlert) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/alert/{alertId}/_unmute | Unmutes an alert.
+[**UnmuteAllAlerts**](AlertingAPI.md#UnmuteAllAlerts) | **Post** /s/{spaceId}/api/alerting/rule/{ruleId}/_unmute_all | Unmutes all alerts.
+[**UpdateRule**](AlertingAPI.md#UpdateRule) | **Put** /s/{spaceId}/api/alerting/rule/{ruleId} | Updates the attributes for a rule.
@@ -61,13 +61,13 @@ func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
- resp, r, err := apiClient.AlertingApi.CreateRule(context.Background(), spaceId, ruleId).KbnXsrf(kbnXsrf).CreateRuleRequest(createRuleRequest).Execute()
+ resp, r, err := apiClient.AlertingAPI.CreateRule(context.Background(), spaceId, ruleId).KbnXsrf(kbnXsrf).CreateRuleRequest(createRuleRequest).Execute()
if err != nil {
- fmt.Fprintf(os.Stderr, "Error when calling `AlertingApi.CreateRule``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Error when calling `AlertingAPI.CreateRule``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateRule`: RuleResponseProperties
- fmt.Fprintf(os.Stdout, "Response from `AlertingApi.CreateRule`: %v\n", resp)
+ fmt.Fprintf(os.Stdout, "Response from `AlertingAPI.CreateRule`: %v\n", resp)
}
```
@@ -137,9 +137,9 @@ func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
- r, err := apiClient.AlertingApi.DeleteRule(context.Background(), ruleId, spaceId).KbnXsrf(kbnXsrf).Execute()
+ r, err := apiClient.AlertingAPI.DeleteRule(context.Background(), ruleId, spaceId).KbnXsrf(kbnXsrf).Execute()
if err != nil {
- fmt.Fprintf(os.Stderr, "Error when calling `AlertingApi.DeleteRule``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Error when calling `AlertingAPI.DeleteRule``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
@@ -210,9 +210,9 @@ func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
- r, err := apiClient.AlertingApi.DisableRule(context.Background(), ruleId, spaceId).KbnXsrf(kbnXsrf).Execute()
+ r, err := apiClient.AlertingAPI.DisableRule(context.Background(), ruleId, spaceId).KbnXsrf(kbnXsrf).Execute()
if err != nil {
- fmt.Fprintf(os.Stderr, "Error when calling `AlertingApi.DisableRule``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Error when calling `AlertingAPI.DisableRule``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
@@ -283,9 +283,9 @@ func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
- r, err := apiClient.AlertingApi.EnableRule(context.Background(), ruleId, spaceId).KbnXsrf(kbnXsrf).Execute()
+ r, err := apiClient.AlertingAPI.EnableRule(context.Background(), ruleId, spaceId).KbnXsrf(kbnXsrf).Execute()
if err != nil {
- fmt.Fprintf(os.Stderr, "Error when calling `AlertingApi.EnableRule``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Error when calling `AlertingAPI.EnableRule``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
@@ -354,7 +354,7 @@ func main() {
defaultSearchOperator := "OR" // string | The default operator to use for the simple_query_string. (optional) (default to "OR")
fields := []string{"Inner_example"} // []string | The fields to return in the `attributes` key of the response. (optional)
filter := "filter_example" // string | A KQL string that you filter with an attribute from your saved object. It should look like `savedObjectType.attributes.title: \"myTitle\"`. However, if you used a direct attribute of a saved object, such as `updatedAt`, you must define your filter, for example, `savedObjectType.updatedAt > 2018-12-22`. (optional)
- hasReference := map[string][]openapiclient.FindRulesHasReferenceParameter{ ... } // FindRulesHasReferenceParameter | Filters the rules that have a relation with the reference objects with a specific type and identifier. (optional)
+ hasReference := *openapiclient.NewFindRulesHasReferenceParameter() // FindRulesHasReferenceParameter | Filters the rules that have a relation with the reference objects with a specific type and identifier. (optional)
page := int32(1) // int32 | The page number to return. (optional) (default to 1)
perPage := int32(20) // int32 | The number of rules to return per page. (optional) (default to 20)
search := "search_example" // string | An Elasticsearch simple_query_string query that filters the objects in the response. (optional)
@@ -364,13 +364,13 @@ func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
- resp, r, err := apiClient.AlertingApi.FindRules(context.Background(), spaceId).DefaultSearchOperator(defaultSearchOperator).Fields(fields).Filter(filter).HasReference(hasReference).Page(page).PerPage(perPage).Search(search).SearchFields(searchFields).SortField(sortField).SortOrder(sortOrder).Execute()
+ resp, r, err := apiClient.AlertingAPI.FindRules(context.Background(), spaceId).DefaultSearchOperator(defaultSearchOperator).Fields(fields).Filter(filter).HasReference(hasReference).Page(page).PerPage(perPage).Search(search).SearchFields(searchFields).SortField(sortField).SortOrder(sortOrder).Execute()
if err != nil {
- fmt.Fprintf(os.Stderr, "Error when calling `AlertingApi.FindRules``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Error when calling `AlertingAPI.FindRules``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `FindRules`: FindRules200Response
- fmt.Fprintf(os.Stdout, "Response from `AlertingApi.FindRules`: %v\n", resp)
+ fmt.Fprintf(os.Stdout, "Response from `AlertingAPI.FindRules`: %v\n", resp)
}
```
@@ -444,13 +444,13 @@ func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
- resp, r, err := apiClient.AlertingApi.GetAlertingHealth(context.Background(), spaceId).Execute()
+ resp, r, err := apiClient.AlertingAPI.GetAlertingHealth(context.Background(), spaceId).Execute()
if err != nil {
- fmt.Fprintf(os.Stderr, "Error when calling `AlertingApi.GetAlertingHealth``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Error when calling `AlertingAPI.GetAlertingHealth``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAlertingHealth`: GetAlertingHealth200Response
- fmt.Fprintf(os.Stdout, "Response from `AlertingApi.GetAlertingHealth`: %v\n", resp)
+ fmt.Fprintf(os.Stdout, "Response from `AlertingAPI.GetAlertingHealth`: %v\n", resp)
}
```
@@ -515,13 +515,13 @@ func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
- resp, r, err := apiClient.AlertingApi.GetRule(context.Background(), ruleId, spaceId).Execute()
+ resp, r, err := apiClient.AlertingAPI.GetRule(context.Background(), ruleId, spaceId).Execute()
if err != nil {
- fmt.Fprintf(os.Stderr, "Error when calling `AlertingApi.GetRule``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Error when calling `AlertingAPI.GetRule``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetRule`: RuleResponseProperties
- fmt.Fprintf(os.Stdout, "Response from `AlertingApi.GetRule`: %v\n", resp)
+ fmt.Fprintf(os.Stdout, "Response from `AlertingAPI.GetRule`: %v\n", resp)
}
```
@@ -587,13 +587,13 @@ func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
- resp, r, err := apiClient.AlertingApi.GetRuleTypes(context.Background(), spaceId).Execute()
+ resp, r, err := apiClient.AlertingAPI.GetRuleTypes(context.Background(), spaceId).Execute()
if err != nil {
- fmt.Fprintf(os.Stderr, "Error when calling `AlertingApi.GetRuleTypes``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Error when calling `AlertingAPI.GetRuleTypes``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetRuleTypes`: []GetRuleTypes200ResponseInner
- fmt.Fprintf(os.Stdout, "Response from `AlertingApi.GetRuleTypes`: %v\n", resp)
+ fmt.Fprintf(os.Stdout, "Response from `AlertingAPI.GetRuleTypes`: %v\n", resp)
}
```
@@ -660,13 +660,13 @@ func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
- resp, r, err := apiClient.AlertingApi.LegacyCreateAlert(context.Background(), alertId, spaceId).KbnXsrf(kbnXsrf).LegacyCreateAlertRequestProperties(legacyCreateAlertRequestProperties).Execute()
+ resp, r, err := apiClient.AlertingAPI.LegacyCreateAlert(context.Background(), alertId, spaceId).KbnXsrf(kbnXsrf).LegacyCreateAlertRequestProperties(legacyCreateAlertRequestProperties).Execute()
if err != nil {
- fmt.Fprintf(os.Stderr, "Error when calling `AlertingApi.LegacyCreateAlert``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Error when calling `AlertingAPI.LegacyCreateAlert``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `LegacyCreateAlert`: AlertResponseProperties
- fmt.Fprintf(os.Stdout, "Response from `AlertingApi.LegacyCreateAlert`: %v\n", resp)
+ fmt.Fprintf(os.Stdout, "Response from `AlertingAPI.LegacyCreateAlert`: %v\n", resp)
}
```
@@ -736,9 +736,9 @@ func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
- r, err := apiClient.AlertingApi.LegacyDisableAlert(context.Background(), spaceId, alertId).KbnXsrf(kbnXsrf).Execute()
+ r, err := apiClient.AlertingAPI.LegacyDisableAlert(context.Background(), spaceId, alertId).KbnXsrf(kbnXsrf).Execute()
if err != nil {
- fmt.Fprintf(os.Stderr, "Error when calling `AlertingApi.LegacyDisableAlert``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Error when calling `AlertingAPI.LegacyDisableAlert``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
@@ -809,9 +809,9 @@ func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
- r, err := apiClient.AlertingApi.LegacyEnableAlert(context.Background(), spaceId, alertId).KbnXsrf(kbnXsrf).Execute()
+ r, err := apiClient.AlertingAPI.LegacyEnableAlert(context.Background(), spaceId, alertId).KbnXsrf(kbnXsrf).Execute()
if err != nil {
- fmt.Fprintf(os.Stderr, "Error when calling `AlertingApi.LegacyEnableAlert``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Error when calling `AlertingAPI.LegacyEnableAlert``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
@@ -880,7 +880,7 @@ func main() {
defaultSearchOperator := "OR" // string | The default operator to use for the `simple_query_string`. (optional) (default to "OR")
fields := []string{"Inner_example"} // []string | The fields to return in the `attributes` key of the response. (optional)
filter := "filter_example" // string | A KQL string that you filter with an attribute from your saved object. It should look like `savedObjectType.attributes.title: \"myTitle\"`. However, if you used a direct attribute of a saved object, such as `updatedAt`, you must define your filter, for example, `savedObjectType.updatedAt > 2018-12-22`. (optional)
- hasReference := map[string][]openapiclient.FindRulesHasReferenceParameter{ ... } // FindRulesHasReferenceParameter | Filters the rules that have a relation with the reference objects with a specific type and identifier. (optional)
+ hasReference := *openapiclient.NewFindRulesHasReferenceParameter() // FindRulesHasReferenceParameter | Filters the rules that have a relation with the reference objects with a specific type and identifier. (optional)
page := int32(1) // int32 | The page number to return. (optional) (default to 1)
perPage := int32(20) // int32 | The number of alerts to return per page. (optional) (default to 20)
search := "search_example" // string | An Elasticsearch `simple_query_string` query that filters the alerts in the response. (optional)
@@ -890,13 +890,13 @@ func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
- resp, r, err := apiClient.AlertingApi.LegacyFindAlerts(context.Background(), spaceId).DefaultSearchOperator(defaultSearchOperator).Fields(fields).Filter(filter).HasReference(hasReference).Page(page).PerPage(perPage).Search(search).SearchFields(searchFields).SortField(sortField).SortOrder(sortOrder).Execute()
+ resp, r, err := apiClient.AlertingAPI.LegacyFindAlerts(context.Background(), spaceId).DefaultSearchOperator(defaultSearchOperator).Fields(fields).Filter(filter).HasReference(hasReference).Page(page).PerPage(perPage).Search(search).SearchFields(searchFields).SortField(sortField).SortOrder(sortOrder).Execute()
if err != nil {
- fmt.Fprintf(os.Stderr, "Error when calling `AlertingApi.LegacyFindAlerts``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Error when calling `AlertingAPI.LegacyFindAlerts``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `LegacyFindAlerts`: LegacyFindAlerts200Response
- fmt.Fprintf(os.Stdout, "Response from `AlertingApi.LegacyFindAlerts`: %v\n", resp)
+ fmt.Fprintf(os.Stdout, "Response from `AlertingAPI.LegacyFindAlerts`: %v\n", resp)
}
```
@@ -971,13 +971,13 @@ func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
- resp, r, err := apiClient.AlertingApi.LegacyGetAlert(context.Background(), spaceId, alertId).Execute()
+ resp, r, err := apiClient.AlertingAPI.LegacyGetAlert(context.Background(), spaceId, alertId).Execute()
if err != nil {
- fmt.Fprintf(os.Stderr, "Error when calling `AlertingApi.LegacyGetAlert``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Error when calling `AlertingAPI.LegacyGetAlert``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `LegacyGetAlert`: AlertResponseProperties
- fmt.Fprintf(os.Stdout, "Response from `AlertingApi.LegacyGetAlert`: %v\n", resp)
+ fmt.Fprintf(os.Stdout, "Response from `AlertingAPI.LegacyGetAlert`: %v\n", resp)
}
```
@@ -1043,13 +1043,13 @@ func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
- resp, r, err := apiClient.AlertingApi.LegacyGetAlertTypes(context.Background(), spaceId).Execute()
+ resp, r, err := apiClient.AlertingAPI.LegacyGetAlertTypes(context.Background(), spaceId).Execute()
if err != nil {
- fmt.Fprintf(os.Stderr, "Error when calling `AlertingApi.LegacyGetAlertTypes``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Error when calling `AlertingAPI.LegacyGetAlertTypes``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `LegacyGetAlertTypes`: []LegacyGetAlertTypes200ResponseInner
- fmt.Fprintf(os.Stdout, "Response from `AlertingApi.LegacyGetAlertTypes`: %v\n", resp)
+ fmt.Fprintf(os.Stdout, "Response from `AlertingAPI.LegacyGetAlertTypes`: %v\n", resp)
}
```
@@ -1113,13 +1113,13 @@ func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
- resp, r, err := apiClient.AlertingApi.LegacyGetAlertingHealth(context.Background(), spaceId).Execute()
+ resp, r, err := apiClient.AlertingAPI.LegacyGetAlertingHealth(context.Background(), spaceId).Execute()
if err != nil {
- fmt.Fprintf(os.Stderr, "Error when calling `AlertingApi.LegacyGetAlertingHealth``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Error when calling `AlertingAPI.LegacyGetAlertingHealth``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `LegacyGetAlertingHealth`: LegacyGetAlertingHealth200Response
- fmt.Fprintf(os.Stdout, "Response from `AlertingApi.LegacyGetAlertingHealth`: %v\n", resp)
+ fmt.Fprintf(os.Stdout, "Response from `AlertingAPI.LegacyGetAlertingHealth`: %v\n", resp)
}
```
@@ -1186,9 +1186,9 @@ func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
- r, err := apiClient.AlertingApi.LegacyMuteAlertInstance(context.Background(), spaceId, alertId, alertInstanceId).KbnXsrf(kbnXsrf).Execute()
+ r, err := apiClient.AlertingAPI.LegacyMuteAlertInstance(context.Background(), spaceId, alertId, alertInstanceId).KbnXsrf(kbnXsrf).Execute()
if err != nil {
- fmt.Fprintf(os.Stderr, "Error when calling `AlertingApi.LegacyMuteAlertInstance``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Error when calling `AlertingAPI.LegacyMuteAlertInstance``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
@@ -1261,9 +1261,9 @@ func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
- r, err := apiClient.AlertingApi.LegacyMuteAllAlertInstances(context.Background(), spaceId, alertId).KbnXsrf(kbnXsrf).Execute()
+ r, err := apiClient.AlertingAPI.LegacyMuteAllAlertInstances(context.Background(), spaceId, alertId).KbnXsrf(kbnXsrf).Execute()
if err != nil {
- fmt.Fprintf(os.Stderr, "Error when calling `AlertingApi.LegacyMuteAllAlertInstances``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Error when calling `AlertingAPI.LegacyMuteAllAlertInstances``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
@@ -1335,9 +1335,9 @@ func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
- r, err := apiClient.AlertingApi.LegacyUnmuteAlertInstance(context.Background(), spaceId, alertId, alertInstanceId).KbnXsrf(kbnXsrf).Execute()
+ r, err := apiClient.AlertingAPI.LegacyUnmuteAlertInstance(context.Background(), spaceId, alertId, alertInstanceId).KbnXsrf(kbnXsrf).Execute()
if err != nil {
- fmt.Fprintf(os.Stderr, "Error when calling `AlertingApi.LegacyUnmuteAlertInstance``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Error when calling `AlertingAPI.LegacyUnmuteAlertInstance``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
@@ -1410,9 +1410,9 @@ func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
- r, err := apiClient.AlertingApi.LegacyUnmuteAllAlertInstances(context.Background(), spaceId, alertId).KbnXsrf(kbnXsrf).Execute()
+ r, err := apiClient.AlertingAPI.LegacyUnmuteAllAlertInstances(context.Background(), spaceId, alertId).KbnXsrf(kbnXsrf).Execute()
if err != nil {
- fmt.Fprintf(os.Stderr, "Error when calling `AlertingApi.LegacyUnmuteAllAlertInstances``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Error when calling `AlertingAPI.LegacyUnmuteAllAlertInstances``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
@@ -1484,13 +1484,13 @@ func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
- resp, r, err := apiClient.AlertingApi.LegacyUpdateAlert(context.Background(), spaceId, alertId).KbnXsrf(kbnXsrf).LegacyUpdateAlertRequestProperties(legacyUpdateAlertRequestProperties).Execute()
+ resp, r, err := apiClient.AlertingAPI.LegacyUpdateAlert(context.Background(), spaceId, alertId).KbnXsrf(kbnXsrf).LegacyUpdateAlertRequestProperties(legacyUpdateAlertRequestProperties).Execute()
if err != nil {
- fmt.Fprintf(os.Stderr, "Error when calling `AlertingApi.LegacyUpdateAlert``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Error when calling `AlertingAPI.LegacyUpdateAlert``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `LegacyUpdateAlert`: AlertResponseProperties
- fmt.Fprintf(os.Stdout, "Response from `AlertingApi.LegacyUpdateAlert`: %v\n", resp)
+ fmt.Fprintf(os.Stdout, "Response from `AlertingAPI.LegacyUpdateAlert`: %v\n", resp)
}
```
@@ -1560,9 +1560,9 @@ func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
- r, err := apiClient.AlertingApi.LegaryDeleteAlert(context.Background(), spaceId, alertId).KbnXsrf(kbnXsrf).Execute()
+ r, err := apiClient.AlertingAPI.LegaryDeleteAlert(context.Background(), spaceId, alertId).KbnXsrf(kbnXsrf).Execute()
if err != nil {
- fmt.Fprintf(os.Stderr, "Error when calling `AlertingApi.LegaryDeleteAlert``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Error when calling `AlertingAPI.LegaryDeleteAlert``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
@@ -1634,9 +1634,9 @@ func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
- r, err := apiClient.AlertingApi.MuteAlert(context.Background(), alertId, ruleId, spaceId).KbnXsrf(kbnXsrf).Execute()
+ r, err := apiClient.AlertingAPI.MuteAlert(context.Background(), alertId, ruleId, spaceId).KbnXsrf(kbnXsrf).Execute()
if err != nil {
- fmt.Fprintf(os.Stderr, "Error when calling `AlertingApi.MuteAlert``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Error when calling `AlertingAPI.MuteAlert``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
@@ -1709,9 +1709,9 @@ func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
- r, err := apiClient.AlertingApi.MuteAllAlerts(context.Background(), ruleId, spaceId).KbnXsrf(kbnXsrf).Execute()
+ r, err := apiClient.AlertingAPI.MuteAllAlerts(context.Background(), ruleId, spaceId).KbnXsrf(kbnXsrf).Execute()
if err != nil {
- fmt.Fprintf(os.Stderr, "Error when calling `AlertingApi.MuteAllAlerts``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Error when calling `AlertingAPI.MuteAllAlerts``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
@@ -1783,9 +1783,9 @@ func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
- r, err := apiClient.AlertingApi.UnmuteAlert(context.Background(), alertId, ruleId, spaceId).KbnXsrf(kbnXsrf).Execute()
+ r, err := apiClient.AlertingAPI.UnmuteAlert(context.Background(), alertId, ruleId, spaceId).KbnXsrf(kbnXsrf).Execute()
if err != nil {
- fmt.Fprintf(os.Stderr, "Error when calling `AlertingApi.UnmuteAlert``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Error when calling `AlertingAPI.UnmuteAlert``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
@@ -1858,9 +1858,9 @@ func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
- r, err := apiClient.AlertingApi.UnmuteAllAlerts(context.Background(), ruleId, spaceId).KbnXsrf(kbnXsrf).Execute()
+ r, err := apiClient.AlertingAPI.UnmuteAllAlerts(context.Background(), ruleId, spaceId).KbnXsrf(kbnXsrf).Execute()
if err != nil {
- fmt.Fprintf(os.Stderr, "Error when calling `AlertingApi.UnmuteAllAlerts``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Error when calling `AlertingAPI.UnmuteAllAlerts``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
@@ -1932,13 +1932,13 @@ func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
- resp, r, err := apiClient.AlertingApi.UpdateRule(context.Background(), ruleId, spaceId).KbnXsrf(kbnXsrf).UpdateRuleRequest(updateRuleRequest).Execute()
+ resp, r, err := apiClient.AlertingAPI.UpdateRule(context.Background(), ruleId, spaceId).KbnXsrf(kbnXsrf).UpdateRuleRequest(updateRuleRequest).Execute()
if err != nil {
- fmt.Fprintf(os.Stderr, "Error when calling `AlertingApi.UpdateRule``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Error when calling `AlertingAPI.UpdateRule``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateRule`: RuleResponseProperties
- fmt.Fprintf(os.Stdout, "Response from `AlertingApi.UpdateRule`: %v\n", resp)
+ fmt.Fprintf(os.Stdout, "Response from `AlertingAPI.UpdateRule`: %v\n", resp)
}
```
diff --git a/generated/alerting/model_actions_inner.go b/generated/alerting/model_actions_inner.go
index 819cda7d9..38fdb9aef 100644
--- a/generated/alerting/model_actions_inner.go
+++ b/generated/alerting/model_actions_inner.go
@@ -217,7 +217,9 @@ func (o ActionsInner) MarshalJSON() ([]byte, error) {
func (o ActionsInner) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
- // skip: connector_type_id is readOnly
+ if !IsNil(o.ConnectorTypeId) {
+ toSerialize["connector_type_id"] = o.ConnectorTypeId
+ }
if !IsNil(o.Frequency) {
toSerialize["frequency"] = o.Frequency
}
diff --git a/generated/alerting/model_actions_inner_frequency.go b/generated/alerting/model_actions_inner_frequency.go
index b33da8787..32872db4e 100644
--- a/generated/alerting/model_actions_inner_frequency.go
+++ b/generated/alerting/model_actions_inner_frequency.go
@@ -12,6 +12,7 @@ package alerting
import (
"encoding/json"
+ "fmt"
)
// checks if the ActionsInnerFrequency type satisfies the MappedNullable interface at compile time
@@ -26,6 +27,8 @@ type ActionsInnerFrequency struct {
Throttle NullableString `json:"throttle,omitempty"`
}
+type _ActionsInnerFrequency ActionsInnerFrequency
+
// NewActionsInnerFrequency instantiates a new ActionsInnerFrequency object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
@@ -154,6 +157,42 @@ func (o ActionsInnerFrequency) ToMap() (map[string]interface{}, error) {
return toSerialize, nil
}
+func (o *ActionsInnerFrequency) UnmarshalJSON(bytes []byte) (err error) {
+ // This validates that all required properties are included in the JSON object
+ // by unmarshalling the object into a generic map with string keys and checking
+ // that every required field exists as a key in the generic map.
+ requiredProperties := []string{
+ "notify_when",
+ "summary",
+ }
+
+ allProperties := make(map[string]interface{})
+
+ err = json.Unmarshal(bytes, &allProperties)
+
+ if err != nil {
+ return err
+ }
+
+ for _, requiredProperty := range requiredProperties {
+ if _, exists := allProperties[requiredProperty]; !exists {
+ return fmt.Errorf("no value given for required property %v", requiredProperty)
+ }
+ }
+
+ varActionsInnerFrequency := _ActionsInnerFrequency{}
+
+ err = json.Unmarshal(bytes, &varActionsInnerFrequency)
+
+ if err != nil {
+ return err
+ }
+
+ *o = ActionsInnerFrequency(varActionsInnerFrequency)
+
+ return err
+}
+
type NullableActionsInnerFrequency struct {
value *ActionsInnerFrequency
isSet bool
diff --git a/generated/alerting/model_create_rule_request.go b/generated/alerting/model_create_rule_request.go
index 3b03004fa..7c088ce40 100644
--- a/generated/alerting/model_create_rule_request.go
+++ b/generated/alerting/model_create_rule_request.go
@@ -12,6 +12,7 @@ package alerting
import (
"encoding/json"
+ "fmt"
)
// checks if the CreateRuleRequest type satisfies the MappedNullable interface at compile time
@@ -38,6 +39,8 @@ type CreateRuleRequest struct {
Throttle NullableString `json:"throttle,omitempty"`
}
+type _CreateRuleRequest CreateRuleRequest
+
// NewCreateRuleRequest instantiates a new CreateRuleRequest object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
@@ -385,6 +388,45 @@ func (o CreateRuleRequest) ToMap() (map[string]interface{}, error) {
return toSerialize, nil
}
+func (o *CreateRuleRequest) UnmarshalJSON(bytes []byte) (err error) {
+ // This validates that all required properties are included in the JSON object
+ // by unmarshalling the object into a generic map with string keys and checking
+ // that every required field exists as a key in the generic map.
+ requiredProperties := []string{
+ "consumer",
+ "name",
+ "params",
+ "rule_type_id",
+ "schedule",
+ }
+
+ allProperties := make(map[string]interface{})
+
+ err = json.Unmarshal(bytes, &allProperties)
+
+ if err != nil {
+ return err
+ }
+
+ for _, requiredProperty := range requiredProperties {
+ if _, exists := allProperties[requiredProperty]; !exists {
+ return fmt.Errorf("no value given for required property %v", requiredProperty)
+ }
+ }
+
+ varCreateRuleRequest := _CreateRuleRequest{}
+
+ err = json.Unmarshal(bytes, &varCreateRuleRequest)
+
+ if err != nil {
+ return err
+ }
+
+ *o = CreateRuleRequest(varCreateRuleRequest)
+
+ return err
+}
+
type NullableCreateRuleRequest struct {
value *CreateRuleRequest
isSet bool
diff --git a/generated/alerting/model_legacy_create_alert_request_properties.go b/generated/alerting/model_legacy_create_alert_request_properties.go
index df02db423..eb256af91 100644
--- a/generated/alerting/model_legacy_create_alert_request_properties.go
+++ b/generated/alerting/model_legacy_create_alert_request_properties.go
@@ -12,6 +12,7 @@ package alerting
import (
"encoding/json"
+ "fmt"
)
// checks if the LegacyCreateAlertRequestProperties type satisfies the MappedNullable interface at compile time
@@ -39,6 +40,8 @@ type LegacyCreateAlertRequestProperties struct {
Throttle *string `json:"throttle,omitempty"`
}
+type _LegacyCreateAlertRequestProperties LegacyCreateAlertRequestProperties
+
// NewLegacyCreateAlertRequestProperties instantiates a new LegacyCreateAlertRequestProperties object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
@@ -365,6 +368,46 @@ func (o LegacyCreateAlertRequestProperties) ToMap() (map[string]interface{}, err
return toSerialize, nil
}
+func (o *LegacyCreateAlertRequestProperties) UnmarshalJSON(bytes []byte) (err error) {
+ // This validates that all required properties are included in the JSON object
+ // by unmarshalling the object into a generic map with string keys and checking
+ // that every required field exists as a key in the generic map.
+ requiredProperties := []string{
+ "alertTypeId",
+ "consumer",
+ "name",
+ "notifyWhen",
+ "params",
+ "schedule",
+ }
+
+ allProperties := make(map[string]interface{})
+
+ err = json.Unmarshal(bytes, &allProperties)
+
+ if err != nil {
+ return err
+ }
+
+ for _, requiredProperty := range requiredProperties {
+ if _, exists := allProperties[requiredProperty]; !exists {
+ return fmt.Errorf("no value given for required property %v", requiredProperty)
+ }
+ }
+
+ varLegacyCreateAlertRequestProperties := _LegacyCreateAlertRequestProperties{}
+
+ err = json.Unmarshal(bytes, &varLegacyCreateAlertRequestProperties)
+
+ if err != nil {
+ return err
+ }
+
+ *o = LegacyCreateAlertRequestProperties(varLegacyCreateAlertRequestProperties)
+
+ return err
+}
+
type NullableLegacyCreateAlertRequestProperties struct {
value *LegacyCreateAlertRequestProperties
isSet bool
diff --git a/generated/alerting/model_legacy_update_alert_request_properties.go b/generated/alerting/model_legacy_update_alert_request_properties.go
index 52c0cc513..ba1b5c8d2 100644
--- a/generated/alerting/model_legacy_update_alert_request_properties.go
+++ b/generated/alerting/model_legacy_update_alert_request_properties.go
@@ -12,6 +12,7 @@ package alerting
import (
"encoding/json"
+ "fmt"
)
// checks if the LegacyUpdateAlertRequestProperties type satisfies the MappedNullable interface at compile time
@@ -33,6 +34,8 @@ type LegacyUpdateAlertRequestProperties struct {
Throttle *string `json:"throttle,omitempty"`
}
+type _LegacyUpdateAlertRequestProperties LegacyUpdateAlertRequestProperties
+
// NewLegacyUpdateAlertRequestProperties instantiates a new LegacyUpdateAlertRequestProperties object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
@@ -272,6 +275,44 @@ func (o LegacyUpdateAlertRequestProperties) ToMap() (map[string]interface{}, err
return toSerialize, nil
}
+func (o *LegacyUpdateAlertRequestProperties) UnmarshalJSON(bytes []byte) (err error) {
+ // This validates that all required properties are included in the JSON object
+ // by unmarshalling the object into a generic map with string keys and checking
+ // that every required field exists as a key in the generic map.
+ requiredProperties := []string{
+ "name",
+ "notifyWhen",
+ "params",
+ "schedule",
+ }
+
+ allProperties := make(map[string]interface{})
+
+ err = json.Unmarshal(bytes, &allProperties)
+
+ if err != nil {
+ return err
+ }
+
+ for _, requiredProperty := range requiredProperties {
+ if _, exists := allProperties[requiredProperty]; !exists {
+ return fmt.Errorf("no value given for required property %v", requiredProperty)
+ }
+ }
+
+ varLegacyUpdateAlertRequestProperties := _LegacyUpdateAlertRequestProperties{}
+
+ err = json.Unmarshal(bytes, &varLegacyUpdateAlertRequestProperties)
+
+ if err != nil {
+ return err
+ }
+
+ *o = LegacyUpdateAlertRequestProperties(varLegacyUpdateAlertRequestProperties)
+
+ return err
+}
+
type NullableLegacyUpdateAlertRequestProperties struct {
value *LegacyUpdateAlertRequestProperties
isSet bool
diff --git a/generated/alerting/model_legacy_update_alert_request_properties_actions_inner.go b/generated/alerting/model_legacy_update_alert_request_properties_actions_inner.go
index d7395b789..7121e5090 100644
--- a/generated/alerting/model_legacy_update_alert_request_properties_actions_inner.go
+++ b/generated/alerting/model_legacy_update_alert_request_properties_actions_inner.go
@@ -12,6 +12,7 @@ package alerting
import (
"encoding/json"
+ "fmt"
)
// checks if the LegacyUpdateAlertRequestPropertiesActionsInner type satisfies the MappedNullable interface at compile time
@@ -29,6 +30,8 @@ type LegacyUpdateAlertRequestPropertiesActionsInner struct {
Params map[string]interface{} `json:"params"`
}
+type _LegacyUpdateAlertRequestPropertiesActionsInner LegacyUpdateAlertRequestPropertiesActionsInner
+
// NewLegacyUpdateAlertRequestPropertiesActionsInner instantiates a new LegacyUpdateAlertRequestPropertiesActionsInner object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
@@ -163,6 +166,44 @@ func (o LegacyUpdateAlertRequestPropertiesActionsInner) ToMap() (map[string]inte
return toSerialize, nil
}
+func (o *LegacyUpdateAlertRequestPropertiesActionsInner) UnmarshalJSON(bytes []byte) (err error) {
+ // This validates that all required properties are included in the JSON object
+ // by unmarshalling the object into a generic map with string keys and checking
+ // that every required field exists as a key in the generic map.
+ requiredProperties := []string{
+ "actionTypeId",
+ "group",
+ "id",
+ "params",
+ }
+
+ allProperties := make(map[string]interface{})
+
+ err = json.Unmarshal(bytes, &allProperties)
+
+ if err != nil {
+ return err
+ }
+
+ for _, requiredProperty := range requiredProperties {
+ if _, exists := allProperties[requiredProperty]; !exists {
+ return fmt.Errorf("no value given for required property %v", requiredProperty)
+ }
+ }
+
+ varLegacyUpdateAlertRequestPropertiesActionsInner := _LegacyUpdateAlertRequestPropertiesActionsInner{}
+
+ err = json.Unmarshal(bytes, &varLegacyUpdateAlertRequestPropertiesActionsInner)
+
+ if err != nil {
+ return err
+ }
+
+ *o = LegacyUpdateAlertRequestPropertiesActionsInner(varLegacyUpdateAlertRequestPropertiesActionsInner)
+
+ return err
+}
+
type NullableLegacyUpdateAlertRequestPropertiesActionsInner struct {
value *LegacyUpdateAlertRequestPropertiesActionsInner
isSet bool
diff --git a/generated/alerting/model_rule_response_properties.go b/generated/alerting/model_rule_response_properties.go
index 5c5a40603..17b16447b 100644
--- a/generated/alerting/model_rule_response_properties.go
+++ b/generated/alerting/model_rule_response_properties.go
@@ -12,6 +12,7 @@ package alerting
import (
"encoding/json"
+ "fmt"
"time"
)
@@ -58,6 +59,8 @@ type RuleResponseProperties struct {
UpdatedBy NullableString `json:"updated_by"`
}
+type _RuleResponseProperties RuleResponseProperties
+
// NewRuleResponseProperties instantiates a new RuleResponseProperties object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
@@ -758,6 +761,58 @@ func (o RuleResponseProperties) ToMap() (map[string]interface{}, error) {
return toSerialize, nil
}
+func (o *RuleResponseProperties) UnmarshalJSON(bytes []byte) (err error) {
+ // This validates that all required properties are included in the JSON object
+ // by unmarshalling the object into a generic map with string keys and checking
+ // that every required field exists as a key in the generic map.
+ requiredProperties := []string{
+ "actions",
+ "api_key_owner",
+ "consumer",
+ "created_at",
+ "created_by",
+ "enabled",
+ "execution_status",
+ "id",
+ "muted_alert_ids",
+ "mute_all",
+ "name",
+ "params",
+ "rule_type_id",
+ "schedule",
+ "tags",
+ "throttle",
+ "updated_at",
+ "updated_by",
+ }
+
+ allProperties := make(map[string]interface{})
+
+ err = json.Unmarshal(bytes, &allProperties)
+
+ if err != nil {
+ return err
+ }
+
+ for _, requiredProperty := range requiredProperties {
+ if _, exists := allProperties[requiredProperty]; !exists {
+ return fmt.Errorf("no value given for required property %v", requiredProperty)
+ }
+ }
+
+ varRuleResponseProperties := _RuleResponseProperties{}
+
+ err = json.Unmarshal(bytes, &varRuleResponseProperties)
+
+ if err != nil {
+ return err
+ }
+
+ *o = RuleResponseProperties(varRuleResponseProperties)
+
+ return err
+}
+
type NullableRuleResponseProperties struct {
value *RuleResponseProperties
isSet bool
diff --git a/generated/alerting/model_update_rule_request.go b/generated/alerting/model_update_rule_request.go
index e2239b119..f64b4fcc7 100644
--- a/generated/alerting/model_update_rule_request.go
+++ b/generated/alerting/model_update_rule_request.go
@@ -12,6 +12,7 @@ package alerting
import (
"encoding/json"
+ "fmt"
)
// checks if the UpdateRuleRequest type satisfies the MappedNullable interface at compile time
@@ -32,6 +33,8 @@ type UpdateRuleRequest struct {
Throttle NullableString `json:"throttle,omitempty"`
}
+type _UpdateRuleRequest UpdateRuleRequest
+
// NewUpdateRuleRequest instantiates a new UpdateRuleRequest object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
@@ -292,6 +295,43 @@ func (o UpdateRuleRequest) ToMap() (map[string]interface{}, error) {
return toSerialize, nil
}
+func (o *UpdateRuleRequest) UnmarshalJSON(bytes []byte) (err error) {
+ // This validates that all required properties are included in the JSON object
+ // by unmarshalling the object into a generic map with string keys and checking
+ // that every required field exists as a key in the generic map.
+ requiredProperties := []string{
+ "name",
+ "params",
+ "schedule",
+ }
+
+ allProperties := make(map[string]interface{})
+
+ err = json.Unmarshal(bytes, &allProperties)
+
+ if err != nil {
+ return err
+ }
+
+ for _, requiredProperty := range requiredProperties {
+ if _, exists := allProperties[requiredProperty]; !exists {
+ return fmt.Errorf("no value given for required property %v", requiredProperty)
+ }
+ }
+
+ varUpdateRuleRequest := _UpdateRuleRequest{}
+
+ err = json.Unmarshal(bytes, &varUpdateRuleRequest)
+
+ if err != nil {
+ return err
+ }
+
+ *o = UpdateRuleRequest(varUpdateRuleRequest)
+
+ return err
+}
+
type NullableUpdateRuleRequest struct {
value *UpdateRuleRequest
isSet bool
diff --git a/generated/connectors/connectors.gen.go b/generated/connectors/connectors.gen.go
index 0cf9937f7..600b88067 100644
--- a/generated/connectors/connectors.gen.go
+++ b/generated/connectors/connectors.gen.go
@@ -1,6 +1,6 @@
// Package connectors provides primitives to interact with the openapi HTTP API.
//
-// Code generated by github.com/deepmap/oapi-codegen version v1.16.2 DO NOT EDIT.
+// Code generated by github.com/deepmap/oapi-codegen/v2 version v2.0.0 DO NOT EDIT.
package connectors
import (
diff --git a/generated/data_views/.gitignore b/generated/data_views/.gitignore
new file mode 100644
index 000000000..daf913b1b
--- /dev/null
+++ b/generated/data_views/.gitignore
@@ -0,0 +1,24 @@
+# Compiled Object files, Static and Dynamic libs (Shared Objects)
+*.o
+*.a
+*.so
+
+# Folders
+_obj
+_test
+
+# Architecture specific extensions/prefixes
+*.[568vq]
+[568vq].out
+
+*.cgo1.go
+*.cgo2.c
+_cgo_defun.c
+_cgo_gotypes.go
+_cgo_export.*
+
+_testmain.go
+
+*.exe
+*.test
+*.prof
diff --git a/generated/data_views/.openapi-generator-ignore b/generated/data_views/.openapi-generator-ignore
new file mode 100644
index 000000000..7484ee590
--- /dev/null
+++ b/generated/data_views/.openapi-generator-ignore
@@ -0,0 +1,23 @@
+# OpenAPI Generator Ignore
+# Generated by openapi-generator https://github.com/openapitools/openapi-generator
+
+# Use this file to prevent files from being overwritten by the generator.
+# The patterns follow closely to .gitignore or .dockerignore.
+
+# As an example, the C# client generator defines ApiClient.cs.
+# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
+#ApiClient.cs
+
+# You can match any string of characters against a directory, file or extension with a single asterisk (*):
+#foo/*/qux
+# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
+
+# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
+#foo/**/qux
+# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
+
+# You can also negate patterns with an exclamation (!).
+# For example, you can ignore all files in a docs folder with the file extension .md:
+#docs/*.md
+# Then explicitly reverse the ignore rule for a single file:
+#!docs/README.md
diff --git a/generated/data_views/.openapi-generator/FILES b/generated/data_views/.openapi-generator/FILES
new file mode 100644
index 000000000..6f95fb7ed
--- /dev/null
+++ b/generated/data_views/.openapi-generator/FILES
@@ -0,0 +1,50 @@
+.gitignore
+.travis.yml
+README.md
+api/openapi.yaml
+api_data_views.go
+client.go
+configuration.go
+docs/CreateDataViewRequestObject.md
+docs/CreateDataViewRequestObjectDataView.md
+docs/CreateUpdateRuntimeField200Response.md
+docs/CreateUpdateRuntimeFieldRequest.md
+docs/DataViewResponseObject.md
+docs/DataViewResponseObjectDataView.md
+docs/DataViewsAPI.md
+docs/GetAllDataViews200Response.md
+docs/GetAllDataViews200ResponseDataViewInner.md
+docs/GetDefaultDataView200Response.md
+docs/Model400Response.md
+docs/Model404Response.md
+docs/SetDefaultDatailViewRequest.md
+docs/SourcefiltersInner.md
+docs/UpdateDataViewRequestObject.md
+docs/UpdateDataViewRequestObjectDataView.md
+docs/UpdateFieldsMetadata200Response.md
+docs/UpdateFieldsMetadataRequest.md
+docs/UpdateRuntimeFieldRequest.md
+git_push.sh
+go.mod
+go.sum
+model_400_response.go
+model_404_response.go
+model_create_data_view_request_object.go
+model_create_data_view_request_object_data_view.go
+model_create_update_runtime_field_200_response.go
+model_create_update_runtime_field_request.go
+model_data_view_response_object.go
+model_data_view_response_object_data_view.go
+model_get_all_data_views_200_response.go
+model_get_all_data_views_200_response_data_view_inner.go
+model_get_default_data_view_200_response.go
+model_set_default_datail_view_request.go
+model_sourcefilters_inner.go
+model_update_data_view_request_object.go
+model_update_data_view_request_object_data_view.go
+model_update_fields_metadata_200_response.go
+model_update_fields_metadata_request.go
+model_update_runtime_field_request.go
+response.go
+test/api_data_views_test.go
+utils.go
diff --git a/generated/data_views/.openapi-generator/VERSION b/generated/data_views/.openapi-generator/VERSION
new file mode 100644
index 000000000..73a86b197
--- /dev/null
+++ b/generated/data_views/.openapi-generator/VERSION
@@ -0,0 +1 @@
+7.0.1
\ No newline at end of file
diff --git a/generated/data_views/.travis.yml b/generated/data_views/.travis.yml
new file mode 100644
index 000000000..f5cb2ce9a
--- /dev/null
+++ b/generated/data_views/.travis.yml
@@ -0,0 +1,8 @@
+language: go
+
+install:
+ - go get -d -v .
+
+script:
+ - go build -v ./
+
diff --git a/generated/data_views/README.md b/generated/data_views/README.md
new file mode 100644
index 000000000..0f3783c34
--- /dev/null
+++ b/generated/data_views/README.md
@@ -0,0 +1,176 @@
+# Go API client for data_views
+
+OpenAPI schema for data view endpoints
+
+## Overview
+This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.
+
+- API version: 0.1
+- Package version: 1.0.0
+- Build package: org.openapitools.codegen.languages.GoClientCodegen
+
+## Installation
+
+Install the following dependencies:
+
+```shell
+go get github.com/stretchr/testify/assert
+go get golang.org/x/net/context
+```
+
+Put the package under your project folder and add the following in import:
+
+```golang
+import data_views "github.com/elastic/terraform-provider-elasticstack/data_views"
+```
+
+To use a proxy, set the environment variable `HTTP_PROXY`:
+
+```golang
+os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
+```
+
+## Configuration of Server URL
+
+Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification.
+
+### Select Server Configuration
+
+For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`.
+
+```golang
+ctx := context.WithValue(context.Background(), data_views.ContextServerIndex, 1)
+```
+
+### Templated Server URL
+
+Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`.
+
+```golang
+ctx := context.WithValue(context.Background(), data_views.ContextServerVariables, map[string]string{
+ "basePath": "v2",
+})
+```
+
+Note, enum values are always validated and all unused variables are silently ignored.
+
+### URLs Configuration per Operation
+
+Each operation can use different server URL defined using `OperationServers` map in the `Configuration`.
+An operation is uniquely identified by `"{classname}Service.{nickname}"` string.
+Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.
+
+```golang
+ctx := context.WithValue(context.Background(), data_views.ContextOperationServerIndices, map[string]int{
+ "{classname}Service.{nickname}": 2,
+})
+ctx = context.WithValue(context.Background(), data_views.ContextOperationServerVariables, map[string]map[string]string{
+ "{classname}Service.{nickname}": {
+ "port": "8443",
+ },
+})
+```
+
+## Documentation for API Endpoints
+
+All URIs are relative to *http://localhost*
+
+Class | Method | HTTP request | Description
+------------ | ------------- | ------------- | -------------
+*DataViewsAPI* | [**CreateDataView**](docs/DataViewsAPI.md#createdataview) | **Post** /api/data_views/data_view | Creates a data view.
+*DataViewsAPI* | [**CreateRuntimeField**](docs/DataViewsAPI.md#createruntimefield) | **Post** /api/data_views/data_view/{viewId}/runtime_field | Creates a runtime field.
+*DataViewsAPI* | [**CreateUpdateRuntimeField**](docs/DataViewsAPI.md#createupdateruntimefield) | **Put** /api/data_views/data_view/{viewId}/runtime_field | Create or update an existing runtime field.
+*DataViewsAPI* | [**DeleteDataView**](docs/DataViewsAPI.md#deletedataview) | **Delete** /api/data_views/data_view/{viewId} | Deletes a data view.
+*DataViewsAPI* | [**DeleteRuntimeField**](docs/DataViewsAPI.md#deleteruntimefield) | **Delete** /api/data_views/data_view/{viewId}/runtime_field/{fieldName} | Delete a runtime field from a data view.
+*DataViewsAPI* | [**GetAllDataViews**](docs/DataViewsAPI.md#getalldataviews) | **Get** /api/data_views | Retrieves a list of all data views.
+*DataViewsAPI* | [**GetDataView**](docs/DataViewsAPI.md#getdataview) | **Get** /api/data_views/data_view/{viewId} | Retrieves a single data view by identifier.
+*DataViewsAPI* | [**GetDefaultDataView**](docs/DataViewsAPI.md#getdefaultdataview) | **Get** /api/data_views/default | Retrieves the default data view identifier.
+*DataViewsAPI* | [**GetRuntimeField**](docs/DataViewsAPI.md#getruntimefield) | **Get** /api/data_views/data_view/{viewId}/runtime_field/{fieldName} | Retrieves a runtime field.
+*DataViewsAPI* | [**SetDefaultDatailView**](docs/DataViewsAPI.md#setdefaultdatailview) | **Post** /api/data_views/default | Sets the default data view identifier.
+*DataViewsAPI* | [**UpdateDataView**](docs/DataViewsAPI.md#updatedataview) | **Post** /api/data_views/data_view/{viewId} | Updates a data view.
+*DataViewsAPI* | [**UpdateFieldsMetadata**](docs/DataViewsAPI.md#updatefieldsmetadata) | **Post** /api/data_views/data_view/{viewId}/fields | Update fields presentation metadata such as count, customLabel and format.
+*DataViewsAPI* | [**UpdateRuntimeField**](docs/DataViewsAPI.md#updateruntimefield) | **Post** /api/data_views/data_view/{viewId}/runtime_field/{fieldName} | Update an existing runtime field.
+
+
+## Documentation For Models
+
+ - [CreateDataViewRequestObject](docs/CreateDataViewRequestObject.md)
+ - [CreateDataViewRequestObjectDataView](docs/CreateDataViewRequestObjectDataView.md)
+ - [CreateUpdateRuntimeField200Response](docs/CreateUpdateRuntimeField200Response.md)
+ - [CreateUpdateRuntimeFieldRequest](docs/CreateUpdateRuntimeFieldRequest.md)
+ - [DataViewResponseObject](docs/DataViewResponseObject.md)
+ - [DataViewResponseObjectDataView](docs/DataViewResponseObjectDataView.md)
+ - [GetAllDataViews200Response](docs/GetAllDataViews200Response.md)
+ - [GetAllDataViews200ResponseDataViewInner](docs/GetAllDataViews200ResponseDataViewInner.md)
+ - [GetDefaultDataView200Response](docs/GetDefaultDataView200Response.md)
+ - [Model400Response](docs/Model400Response.md)
+ - [Model404Response](docs/Model404Response.md)
+ - [SetDefaultDatailViewRequest](docs/SetDefaultDatailViewRequest.md)
+ - [SourcefiltersInner](docs/SourcefiltersInner.md)
+ - [UpdateDataViewRequestObject](docs/UpdateDataViewRequestObject.md)
+ - [UpdateDataViewRequestObjectDataView](docs/UpdateDataViewRequestObjectDataView.md)
+ - [UpdateFieldsMetadata200Response](docs/UpdateFieldsMetadata200Response.md)
+ - [UpdateFieldsMetadataRequest](docs/UpdateFieldsMetadataRequest.md)
+ - [UpdateRuntimeFieldRequest](docs/UpdateRuntimeFieldRequest.md)
+
+
+## Documentation For Authorization
+
+
+Authentication schemes defined for the API:
+### basicAuth
+
+- **Type**: HTTP basic authentication
+
+Example
+
+```golang
+auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
+ UserName: "username",
+ Password: "password",
+})
+r, err := client.Service.Operation(auth, args)
+```
+
+### apiKeyAuth
+
+- **Type**: API key
+- **API key parameter name**: ApiKey
+- **Location**: HTTP header
+
+Note, each API key must be added to a map of `map[string]APIKey` where the key is: ApiKey and passed in as the auth context for each request.
+
+Example
+
+```golang
+auth := context.WithValue(
+ context.Background(),
+ sw.ContextAPIKeys,
+ map[string]sw.APIKey{
+ "ApiKey": {Key: "API_KEY_STRING"},
+ },
+ )
+r, err := client.Service.Operation(auth, args)
+```
+
+
+## Documentation for Utility Methods
+
+Due to the fact that model structure members are all pointers, this package contains
+a number of utility functions to easily obtain pointers to values of basic types.
+Each of these functions takes a value of the given basic type and returns a pointer to it:
+
+* `PtrBool`
+* `PtrInt`
+* `PtrInt32`
+* `PtrInt64`
+* `PtrFloat`
+* `PtrFloat32`
+* `PtrFloat64`
+* `PtrString`
+* `PtrTime`
+
+## Author
+
+
+
diff --git a/generated/data_views/api/openapi.yaml b/generated/data_views/api/openapi.yaml
new file mode 100644
index 000000000..9aacd5168
--- /dev/null
+++ b/generated/data_views/api/openapi.yaml
@@ -0,0 +1,2477 @@
+openapi: 3.0.1
+info:
+ contact:
+ name: Kibana Core Team
+ description: OpenAPI schema for data view endpoints
+ license:
+ name: Elastic License 2.0
+ url: https://www.elastic.co/licensing/elastic-license
+ title: Data views
+ version: "0.1"
+servers:
+- url: /
+security:
+- basicAuth: []
+- apiKeyAuth: []
+tags:
+- description: "Data view APIs enable you to manage data views, formerly known as\
+ \ Kibana index patterns."
+ name: data views
+paths:
+ /api/data_views:
+ get:
+ description: |
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+ operationId: getAllDataViews
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ getAllDataViewsResponse:
+ $ref: '#/components/examples/get_data_views_response'
+ schema:
+ $ref: '#/components/schemas/getAllDataViews_200_response'
+ description: Indicates a successful call.
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/400_response'
+ description: Bad request
+ summary: Retrieves a list of all data views.
+ tags:
+ - data views
+ /api/data_views/data_view:
+ post:
+ description: |
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+ operationId: createDataView
+ parameters:
+ - description: Cross-site request forgery protection
+ explode: false
+ in: header
+ name: kbn-xsrf
+ required: true
+ schema:
+ type: string
+ style: simple
+ requestBody:
+ content:
+ application/json:
+ examples:
+ createDataViewRequest:
+ $ref: '#/components/examples/create_data_view_request'
+ schema:
+ $ref: '#/components/schemas/create_data_view_request_object'
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/data_view_response_object'
+ description: Indicates a successful call.
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/400_response'
+ description: Bad request
+ summary: Creates a data view.
+ tags:
+ - data views
+ /api/data_views/data_view/{viewId}:
+ delete:
+ description: |
+ WARNING: When you delete a data view, it cannot be recovered. This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+ operationId: deleteDataView
+ parameters:
+ - description: Cross-site request forgery protection
+ explode: false
+ in: header
+ name: kbn-xsrf
+ required: true
+ schema:
+ type: string
+ style: simple
+ - description: An identifier for the data view.
+ explode: false
+ in: path
+ name: viewId
+ required: true
+ schema:
+ example: ff959d40-b880-11e8-a6d9-e546fe2bba5f
+ type: string
+ style: simple
+ responses:
+ "204":
+ description: Indicates a successful call.
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/404_response'
+ description: Object is not found.
+ summary: Deletes a data view.
+ tags:
+ - data views
+ get:
+ description: |
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+ operationId: getDataView
+ parameters:
+ - description: An identifier for the data view.
+ explode: false
+ in: path
+ name: viewId
+ required: true
+ schema:
+ example: ff959d40-b880-11e8-a6d9-e546fe2bba5f
+ type: string
+ style: simple
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ getDataViewResponse:
+ $ref: '#/components/examples/get_data_view_response'
+ schema:
+ $ref: '#/components/schemas/data_view_response_object'
+ description: Indicates a successful call.
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/404_response'
+ description: Object is not found.
+ summary: Retrieves a single data view by identifier.
+ tags:
+ - data views
+ post:
+ description: |
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+ operationId: updateDataView
+ parameters:
+ - description: Cross-site request forgery protection
+ explode: false
+ in: header
+ name: kbn-xsrf
+ required: true
+ schema:
+ type: string
+ style: simple
+ - description: An identifier for the data view.
+ explode: false
+ in: path
+ name: viewId
+ required: true
+ schema:
+ example: ff959d40-b880-11e8-a6d9-e546fe2bba5f
+ type: string
+ style: simple
+ requestBody:
+ content:
+ application/json:
+ examples:
+ updateDataViewRequest:
+ $ref: '#/components/examples/update_data_view_request'
+ schema:
+ $ref: '#/components/schemas/update_data_view_request_object'
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/data_view_response_object'
+ description: Indicates a successful call.
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/400_response'
+ description: Bad request
+ summary: Updates a data view.
+ tags:
+ - data views
+ /api/data_views/data_view/{viewId}/fields:
+ post:
+ description: |
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. You can update multiple fields in one request. Updates are merged with persisted metadata. To remove existing metadata, specify null as the value.
+ operationId: updateFieldsMetadata
+ parameters:
+ - description: Cross-site request forgery protection
+ explode: false
+ in: header
+ name: kbn-xsrf
+ required: true
+ schema:
+ type: string
+ style: simple
+ - description: An identifier for the data view.
+ explode: false
+ in: path
+ name: viewId
+ required: true
+ schema:
+ example: ff959d40-b880-11e8-a6d9-e546fe2bba5f
+ type: string
+ style: simple
+ requestBody:
+ content:
+ application/json:
+ examples:
+ updateFieldsMetadataRequest:
+ $ref: '#/components/examples/update_field_metadata_request'
+ schema:
+ $ref: '#/components/schemas/updateFieldsMetadata_request'
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/updateFieldsMetadata_200_response'
+ description: Indicates a successful call.
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/400_response'
+ description: Bad request
+ summary: "Update fields presentation metadata such as count, customLabel and\
+ \ format."
+ tags:
+ - data views
+ /api/data_views/data_view/{viewId}/runtime_field:
+ post:
+ description: |
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+ operationId: createRuntimeField
+ parameters:
+ - description: Cross-site request forgery protection
+ explode: false
+ in: header
+ name: kbn-xsrf
+ required: true
+ schema:
+ type: string
+ style: simple
+ - description: An identifier for the data view.
+ explode: false
+ in: path
+ name: viewId
+ required: true
+ schema:
+ example: ff959d40-b880-11e8-a6d9-e546fe2bba5f
+ type: string
+ style: simple
+ requestBody:
+ content:
+ application/json:
+ examples:
+ createRuntimeFieldRequest:
+ $ref: '#/components/examples/create_runtime_field_request'
+ schema:
+ $ref: '#/components/schemas/createUpdateRuntimeField_request'
+ required: true
+ summary: Creates a runtime field.
+ tags:
+ - data views
+ put:
+ description: |
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+ operationId: createUpdateRuntimeField
+ parameters:
+ - description: Cross-site request forgery protection
+ explode: false
+ in: header
+ name: kbn-xsrf
+ required: true
+ schema:
+ type: string
+ style: simple
+ - description: |
+ The ID of the data view fields you want to update.
+ explode: false
+ in: path
+ name: viewId
+ required: true
+ schema:
+ type: string
+ style: simple
+ requestBody:
+ content:
+ application/json:
+ examples:
+ updateRuntimeFieldRequest:
+ $ref: '#/components/examples/create_runtime_field_request'
+ schema:
+ $ref: '#/components/schemas/createUpdateRuntimeField_request'
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ createRuntimeFieldResponse:
+ $ref: '#/components/examples/create_runtime_field_response'
+ schema:
+ $ref: '#/components/schemas/createUpdateRuntimeField_200_response'
+ description: Indicates a successful call.
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/400_response'
+ description: Bad request
+ summary: Create or update an existing runtime field.
+ tags:
+ - data views
+ /api/data_views/data_view/{viewId}/runtime_field/{fieldName}:
+ delete:
+ description: |
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+ operationId: deleteRuntimeField
+ parameters:
+ - description: The name of the runtime field.
+ explode: false
+ in: path
+ name: fieldName
+ required: true
+ schema:
+ example: hour_of_day
+ type: string
+ style: simple
+ - description: An identifier for the data view.
+ explode: false
+ in: path
+ name: viewId
+ required: true
+ schema:
+ example: ff959d40-b880-11e8-a6d9-e546fe2bba5f
+ type: string
+ style: simple
+ responses:
+ "200":
+ description: Indicates a successful call.
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/404_response'
+ description: Object is not found.
+ summary: Delete a runtime field from a data view.
+ tags:
+ - data views
+ get:
+ description: |
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+ operationId: getRuntimeField
+ parameters:
+ - description: The name of the runtime field.
+ explode: false
+ in: path
+ name: fieldName
+ required: true
+ schema:
+ example: hour_of_day
+ type: string
+ style: simple
+ - description: An identifier for the data view.
+ explode: false
+ in: path
+ name: viewId
+ required: true
+ schema:
+ example: ff959d40-b880-11e8-a6d9-e546fe2bba5f
+ type: string
+ style: simple
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ getRuntimeFieldResponse:
+ $ref: '#/components/examples/get_runtime_field_response'
+ schema:
+ $ref: '#/components/schemas/createUpdateRuntimeField_200_response'
+ description: Indicates a successful call.
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/404_response'
+ description: Object is not found.
+ summary: Retrieves a runtime field.
+ tags:
+ - data views
+ post:
+ description: |
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+ operationId: updateRuntimeField
+ parameters:
+ - description: The name of the runtime field.
+ explode: false
+ in: path
+ name: fieldName
+ required: true
+ schema:
+ example: hour_of_day
+ type: string
+ style: simple
+ - description: An identifier for the data view.
+ explode: false
+ in: path
+ name: viewId
+ required: true
+ schema:
+ example: ff959d40-b880-11e8-a6d9-e546fe2bba5f
+ type: string
+ style: simple
+ requestBody:
+ content:
+ application/json:
+ examples:
+ updateRuntimeFieldRequest:
+ $ref: '#/components/examples/update_runtime_field_request'
+ schema:
+ $ref: '#/components/schemas/updateRuntimeField_request'
+ required: true
+ responses:
+ "200":
+ description: Indicates a successful call.
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/400_response'
+ description: Bad request
+ summary: Update an existing runtime field.
+ tags:
+ - data views
+ /api/data_views/default:
+ get:
+ description: |
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+ operationId: getDefaultDataView
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ getDefaultDataViewResponse:
+ $ref: '#/components/examples/get_default_data_view_response'
+ schema:
+ $ref: '#/components/schemas/getDefaultDataView_200_response'
+ description: Indicates a successful call.
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/400_response'
+ description: Bad request
+ summary: Retrieves the default data view identifier.
+ tags:
+ - data views
+ post:
+ description: |
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+ operationId: setDefaultDatailView
+ parameters:
+ - description: Cross-site request forgery protection
+ explode: false
+ in: header
+ name: kbn-xsrf
+ required: true
+ schema:
+ type: string
+ style: simple
+ requestBody:
+ content:
+ application/json:
+ examples:
+ setDefaultDataViewRequest:
+ $ref: '#/components/examples/set_default_data_view_request'
+ schema:
+ $ref: '#/components/schemas/setDefaultDatailView_request'
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/updateFieldsMetadata_200_response'
+ description: Indicates a successful call.
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/400_response'
+ description: Bad request
+ summary: Sets the default data view identifier.
+ tags:
+ - data views
+components:
+ examples:
+ get_data_views_response:
+ summary: The get all data views API returns a list of data views.
+ value:
+ data_view:
+ - id: ff959d40-b880-11e8-a6d9-e546fe2bba5f
+ namespaces:
+ - default
+ title: kibana_sample_data_ecommerce
+ typeMeta: {}
+ name: Kibana Sample Data eCommerce
+ - id: d3d7af60-4c81-11e8-b3d7-01146121b73d
+ namespaces:
+ - default
+ title: kibana_sample_data_flights
+ name: Kibana Sample Data Flights
+ - id: 90943e30-9a47-11e8-b64d-95841ca0b247
+ namespaces:
+ - default
+ title: kibana_sample_data_logs
+ name: Kibana Sample Data Logs
+ create_data_view_request:
+ summary: Create a data view with runtime fields.
+ value:
+ data_view:
+ title: logstash-*
+ name: My Logstash data view
+ runtimeFieldMap:
+ runtime_shape_name:
+ type: keyword
+ script:
+ source: "emit(doc['shape_name'].value)"
+ get_data_view_response:
+ summary: The get data view API returns a JSON object that contains information
+ about the data view.
+ value:
+ data_view:
+ id: ff959d40-b880-11e8-a6d9-e546fe2bba5f
+ version: WzUsMV0=
+ title: kibana_sample_data_ecommerce
+ timeFieldName: order_date
+ sourceFilters: []
+ fields:
+ _id:
+ count: 0
+ name: _id
+ type: string
+ esTypes:
+ - _id
+ scripted: false
+ searchable: true
+ aggregatable: false
+ readFromDocValues: false
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ _index:
+ count: 0
+ name: _index
+ type: string
+ esTypes:
+ - _index
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: false
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ _score:
+ count: 0
+ name: _score
+ type: number
+ scripted: false
+ searchable: false
+ aggregatable: false
+ readFromDocValues: false
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ _source:
+ count: 0
+ name: _source
+ type: _source
+ esTypes:
+ - _source
+ scripted: false
+ searchable: false
+ aggregatable: false
+ readFromDocValues: false
+ format:
+ id: _source
+ shortDotsEnable: false
+ isMapped: true
+ category:
+ count: 0
+ name: category
+ type: string
+ esTypes:
+ - text
+ scripted: false
+ searchable: true
+ aggregatable: false
+ readFromDocValues: false
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ category.keyword:
+ count: 0
+ name: category.keyword
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ subType:
+ multi:
+ parent: category
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ currency:
+ count: 0
+ name: currency
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ customer_birth_date:
+ count: 0
+ name: customer_birth_date
+ type: date
+ esTypes:
+ - date
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: date
+ shortDotsEnable: false
+ isMapped: true
+ customer_first_name:
+ count: 0
+ name: customer_first_name
+ type: string
+ esTypes:
+ - text
+ scripted: false
+ searchable: true
+ aggregatable: false
+ readFromDocValues: false
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ customer_first_name.keyword:
+ count: 0
+ name: customer_first_name.keyword
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ subType:
+ multi:
+ parent: customer_first_name
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ customer_full_name:
+ count: 0
+ name: customer_full_name
+ type: string
+ esTypes:
+ - text
+ scripted: false
+ searchable: true
+ aggregatable: false
+ readFromDocValues: false
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ customer_full_name.keyword:
+ count: 0
+ name: customer_full_name.keyword
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ subType:
+ multi:
+ parent: customer_full_name
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ customer_gender:
+ count: 0
+ name: customer_gender
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ customer_id:
+ count: 0
+ name: customer_id
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ customer_last_name:
+ count: 0
+ name: customer_last_name
+ type: string
+ esTypes:
+ - text
+ scripted: false
+ searchable: true
+ aggregatable: false
+ readFromDocValues: false
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ customer_last_name.keyword:
+ count: 0
+ name: customer_last_name.keyword
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ subType:
+ multi:
+ parent: customer_last_name
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ customer_phone:
+ count: 0
+ name: customer_phone
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ day_of_week:
+ count: 0
+ name: day_of_week
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ day_of_week_i:
+ count: 0
+ name: day_of_week_i
+ type: number
+ esTypes:
+ - integer
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ email:
+ count: 0
+ name: email
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ event.dataset:
+ count: 0
+ name: event.dataset
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ geoip.city_name:
+ count: 0
+ name: geoip.city_name
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ geoip.continent_name:
+ count: 0
+ name: geoip.continent_name
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ geoip.country_iso_code:
+ count: 0
+ name: geoip.country_iso_code
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ geoip.location:
+ count: 0
+ name: geoip.location
+ type: geo_point
+ esTypes:
+ - geo_point
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: geo_point
+ params:
+ transform: wkt
+ shortDotsEnable: false
+ isMapped: true
+ geoip.region_name:
+ count: 0
+ name: geoip.region_name
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ manufacturer:
+ count: 0
+ name: manufacturer
+ type: string
+ esTypes:
+ - text
+ scripted: false
+ searchable: true
+ aggregatable: false
+ readFromDocValues: false
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ manufacturer.keyword:
+ count: 0
+ name: manufacturer.keyword
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ subType:
+ multi:
+ parent: manufacturer
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ order_date:
+ count: 0
+ name: order_date
+ type: date
+ esTypes:
+ - date
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: date
+ shortDotsEnable: false
+ isMapped: true
+ order_id:
+ count: 0
+ name: order_id
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ products._id:
+ count: 0
+ name: products._id
+ type: string
+ esTypes:
+ - text
+ scripted: false
+ searchable: true
+ aggregatable: false
+ readFromDocValues: false
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ products._id.keyword:
+ count: 0
+ name: products._id.keyword
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ subType:
+ multi:
+ parent: products._id
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ products.base_price:
+ count: 0
+ name: products.base_price
+ type: number
+ esTypes:
+ - half_float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ params:
+ pattern: "$0,0.00"
+ shortDotsEnable: false
+ isMapped: true
+ products.base_unit_price:
+ count: 0
+ name: products.base_unit_price
+ type: number
+ esTypes:
+ - half_float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ params:
+ pattern: "$0,0.00"
+ shortDotsEnable: false
+ isMapped: true
+ products.category:
+ count: 0
+ name: products.category
+ type: string
+ esTypes:
+ - text
+ scripted: false
+ searchable: true
+ aggregatable: false
+ readFromDocValues: false
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ products.category.keyword:
+ count: 0
+ name: products.category.keyword
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ subType:
+ multi:
+ parent: products.category
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ products.created_on:
+ count: 0
+ name: products.created_on
+ type: date
+ esTypes:
+ - date
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: date
+ shortDotsEnable: false
+ isMapped: true
+ products.discount_amount:
+ count: 0
+ name: products.discount_amount
+ type: number
+ esTypes:
+ - half_float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ products.discount_percentage:
+ count: 0
+ name: products.discount_percentage
+ type: number
+ esTypes:
+ - half_float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ products.manufacturer:
+ count: 1
+ name: products.manufacturer
+ type: string
+ esTypes:
+ - text
+ scripted: false
+ searchable: true
+ aggregatable: false
+ readFromDocValues: false
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ products.manufacturer.keyword:
+ count: 0
+ name: products.manufacturer.keyword
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ subType:
+ multi:
+ parent: products.manufacturer
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ products.min_price:
+ count: 0
+ name: products.min_price
+ type: number
+ esTypes:
+ - half_float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ params:
+ pattern: "$0,0.00"
+ shortDotsEnable: false
+ isMapped: true
+ products.price:
+ count: 1
+ name: products.price
+ type: number
+ esTypes:
+ - half_float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ params:
+ pattern: "$0,0.00"
+ shortDotsEnable: false
+ isMapped: true
+ products.product_id:
+ count: 0
+ name: products.product_id
+ type: number
+ esTypes:
+ - long
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ products.product_name:
+ count: 1
+ name: products.product_name
+ type: string
+ esTypes:
+ - text
+ scripted: false
+ searchable: true
+ aggregatable: false
+ readFromDocValues: false
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ products.product_name.keyword:
+ count: 0
+ name: products.product_name.keyword
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ subType:
+ multi:
+ parent: products.product_name
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ products.quantity:
+ count: 0
+ name: products.quantity
+ type: number
+ esTypes:
+ - integer
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ products.sku:
+ count: 0
+ name: products.sku
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ products.tax_amount:
+ count: 0
+ name: products.tax_amount
+ type: number
+ esTypes:
+ - half_float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ products.taxful_price:
+ count: 0
+ name: products.taxful_price
+ type: number
+ esTypes:
+ - half_float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ params:
+ pattern: "$0,0.00"
+ shortDotsEnable: false
+ isMapped: true
+ products.taxless_price:
+ count: 0
+ name: products.taxless_price
+ type: number
+ esTypes:
+ - half_float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ params:
+ pattern: "$0,0.00"
+ shortDotsEnable: false
+ isMapped: true
+ products.unit_discount_amount:
+ count: 0
+ name: products.unit_discount_amount
+ type: number
+ esTypes:
+ - half_float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ sku:
+ count: 0
+ name: sku
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ taxful_total_price:
+ count: 0
+ name: taxful_total_price
+ type: number
+ esTypes:
+ - half_float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ params:
+ pattern: "$0,0.[00]"
+ shortDotsEnable: false
+ isMapped: true
+ taxless_total_price:
+ count: 0
+ name: taxless_total_price
+ type: number
+ esTypes:
+ - half_float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ params:
+ pattern: "$0,0.00"
+ shortDotsEnable: false
+ isMapped: true
+ total_quantity:
+ count: 1
+ name: total_quantity
+ type: number
+ esTypes:
+ - integer
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ total_unique_products:
+ count: 0
+ name: total_unique_products
+ type: number
+ esTypes:
+ - integer
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ type:
+ count: 0
+ name: type
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ user:
+ count: 0
+ name: user
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ typeMeta: {}
+ fieldFormats:
+ taxful_total_price:
+ id: number
+ params:
+ pattern: "$0,0.[00]"
+ products.price:
+ id: number
+ params:
+ pattern: "$0,0.00"
+ taxless_total_price:
+ id: number
+ params:
+ pattern: "$0,0.00"
+ products.taxless_price:
+ id: number
+ params:
+ pattern: "$0,0.00"
+ products.taxful_price:
+ id: number
+ params:
+ pattern: "$0,0.00"
+ products.min_price:
+ id: number
+ params:
+ pattern: "$0,0.00"
+ products.base_unit_price:
+ id: number
+ params:
+ pattern: "$0,0.00"
+ products.base_price:
+ id: number
+ params:
+ pattern: "$0,0.00"
+ runtimeFieldMap: {}
+ fieldAttrs:
+ products.manufacturer:
+ count: 1
+ products.price:
+ count: 1
+ products.product_name:
+ count: 1
+ total_quantity:
+ count: 1
+ allowNoIndex: false
+ name: Kibana Sample Data eCommerce
+ namespaces:
+ - default
+ update_data_view_request:
+ summary: Update some properties for a data view.
+ value:
+ data_view:
+ title: kibana_sample_data_ecommerce
+ timeFieldName: order_date
+ allowNoIndex: false
+ name: Kibana Sample Data eCommerce
+ refresh_fields: true
+ update_field_metadata_request:
+ summary: Set popularity count for field foo.
+ value:
+ fields:
+ foo:
+ count: 123
+ create_runtime_field_request:
+ summary: Create a runtime field.
+ value:
+ name: runtimeFoo
+ runtimeField:
+ type: long
+ script:
+ source: "emit(doc[\"foo\"].value)"
+ create_runtime_field_response:
+ summary: The API returns created runtime field object array and updated data
+ view object.
+ value:
+ data_view:
+ "...": null
+ fields:
+ - '...'
+ get_runtime_field_response:
+ summary: The get runtime field API returns a JSON object that contains information
+ about the runtime field (`hour_of_day`) and the data view (`d3d7af60-4c81-11e8-b3d7-01146121b73d`).
+ value:
+ fields:
+ - count: 0
+ name: hour_of_day
+ type: number
+ esTypes:
+ - long
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: false
+ shortDotsEnable: false
+ runtimeField:
+ type: long
+ script:
+ source: "emit(doc['timestamp'].value.getHour());"
+ data_view:
+ id: d3d7af60-4c81-11e8-b3d7-01146121b73d
+ version: WzM2LDJd
+ title: kibana_sample_data_flights
+ timeFieldName: timestamp
+ sourceFilters: []
+ fields:
+ hour_of_day:
+ count: 0
+ name: hour_of_day
+ type: number
+ esTypes:
+ - long
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: false
+ format:
+ id: number
+ params:
+ pattern: "00"
+ shortDotsEnable: false
+ runtimeField:
+ type: long
+ script:
+ source: "emit(doc['timestamp'].value.getHour());"
+ AvgTicketPrice:
+ count: 0
+ name: AvgTicketPrice
+ type: number
+ esTypes:
+ - float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ params:
+ pattern: "$0,0.[00]"
+ shortDotsEnable: false
+ isMapped: true
+ Cancelled:
+ count: 0
+ name: Cancelled
+ type: boolean
+ esTypes:
+ - boolean
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: boolean
+ shortDotsEnable: false
+ isMapped: true
+ Carrier:
+ count: 0
+ name: Carrier
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ Dest:
+ count: 0
+ name: Dest
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ DestAirportID:
+ count: 0
+ name: DestAirportID
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ DestCityName:
+ count: 0
+ name: DestCityName
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ DestCountry:
+ count: 0
+ name: DestCountry
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ DestLocation:
+ count: 0
+ name: DestLocation
+ type: geo_point
+ esTypes:
+ - geo_point
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: geo_point
+ params:
+ transform: wkt
+ shortDotsEnable: false
+ isMapped: true
+ DestRegion:
+ count: 0
+ name: DestRegion
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ DestWeather:
+ count: 0
+ name: DestWeather
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ DistanceKilometers:
+ count: 0
+ name: DistanceKilometers
+ type: number
+ esTypes:
+ - float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ DistanceMiles:
+ count: 0
+ name: DistanceMiles
+ type: number
+ esTypes:
+ - float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ FlightDelay:
+ count: 0
+ name: FlightDelay
+ type: boolean
+ esTypes:
+ - boolean
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: boolean
+ shortDotsEnable: false
+ isMapped: true
+ FlightDelayMin:
+ count: 0
+ name: FlightDelayMin
+ type: number
+ esTypes:
+ - integer
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ FlightDelayType:
+ count: 0
+ name: FlightDelayType
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ FlightNum:
+ count: 0
+ name: FlightNum
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ FlightTimeHour:
+ count: 0
+ name: FlightTimeHour
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ FlightTimeMin:
+ count: 0
+ name: FlightTimeMin
+ type: number
+ esTypes:
+ - float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ Origin:
+ count: 0
+ name: Origin
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ OriginAirportID:
+ count: 0
+ name: OriginAirportID
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ OriginCityName:
+ count: 0
+ name: OriginCityName
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ OriginCountry:
+ count: 0
+ name: OriginCountry
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ OriginLocation:
+ count: 0
+ name: OriginLocation
+ type: geo_point
+ esTypes:
+ - geo_point
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: geo_point
+ params:
+ transform: wkt
+ shortDotsEnable: false
+ isMapped: true
+ OriginRegion:
+ count: 0
+ name: OriginRegion
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ OriginWeather:
+ count: 0
+ name: OriginWeather
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ _id:
+ count: 0
+ name: _id
+ type: string
+ esTypes:
+ - _id
+ scripted: false
+ searchable: true
+ aggregatable: false
+ readFromDocValues: false
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ _index:
+ count: 0
+ name: _index
+ type: string
+ esTypes:
+ - _index
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: false
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ _score:
+ count: 0
+ name: _score
+ type: number
+ scripted: false
+ searchable: false
+ aggregatable: false
+ readFromDocValues: false
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ _source:
+ count: 0
+ name: _source
+ type: _source
+ esTypes:
+ - _source
+ scripted: false
+ searchable: false
+ aggregatable: false
+ readFromDocValues: false
+ format:
+ id: _source
+ shortDotsEnable: false
+ isMapped: true
+ dayOfWeek:
+ count: 0
+ name: dayOfWeek
+ type: number
+ esTypes:
+ - integer
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ timestamp:
+ count: 0
+ name: timestamp
+ type: date
+ esTypes:
+ - date
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: date
+ shortDotsEnable: false
+ isMapped: true
+ fieldFormats:
+ hour_of_day:
+ id: number
+ params:
+ pattern: "00"
+ AvgTicketPrice:
+ id: number
+ params:
+ pattern: "$0,0.[00]"
+ runtimeFieldMap:
+ hour_of_day:
+ type: long
+ script:
+ source: "emit(doc['timestamp'].value.getHour());"
+ fieldAttrs: {}
+ allowNoIndex: false
+ name: Kibana Sample Data Flights
+ update_runtime_field_request:
+ summary: Update an existing runtime field on a data view.
+ value:
+ runtimeField:
+ script:
+ source: "emit(doc[\"bar\"].value)"
+ get_default_data_view_response:
+ summary: The get default data view API returns the default data view identifier.
+ value:
+ data_view_id: ff959d40-b880-11e8-a6d9-e546fe2bba5f
+ set_default_data_view_request:
+ summary: Set the default data view identifier.
+ value:
+ data_view_id: ff959d40-b880-11e8-a6d9-e546fe2bba5f
+ force: true
+ parameters:
+ kbn_xsrf:
+ description: Cross-site request forgery protection
+ explode: false
+ in: header
+ name: kbn-xsrf
+ required: true
+ schema:
+ type: string
+ style: simple
+ view_id:
+ description: An identifier for the data view.
+ explode: false
+ in: path
+ name: viewId
+ required: true
+ schema:
+ example: ff959d40-b880-11e8-a6d9-e546fe2bba5f
+ type: string
+ style: simple
+ field_name:
+ description: The name of the runtime field.
+ explode: false
+ in: path
+ name: fieldName
+ required: true
+ schema:
+ example: hour_of_day
+ type: string
+ style: simple
+ schemas:
+ "400_response":
+ properties:
+ statusCode:
+ example: 400
+ type: number
+ error:
+ example: Bad Request
+ type: string
+ message:
+ type: string
+ required:
+ - error
+ - message
+ - statusCode
+ title: Bad request
+ type: object
+ allownoindex:
+ description: Allows the data view saved object to exist before the data is available.
+ type: boolean
+ fieldattrs:
+ description: A map of field attributes by field name.
+ type: object
+ fieldformats:
+ description: A map of field formats by field name.
+ type: object
+ namespaces:
+ description: An array of space identifiers for sharing the data view between
+ multiple spaces.
+ items:
+ default: default
+ type: string
+ type: array
+ runtimefieldmap:
+ description: A map of runtime field definitions by field name.
+ type: object
+ sourcefilters:
+ description: The array of field names you want to filter out in Discover.
+ items:
+ $ref: '#/components/schemas/sourcefilters_inner'
+ type: array
+ timefieldname:
+ description: "The timestamp field name, which you use for time-based data views."
+ type: string
+ title:
+ description: "Comma-separated list of data streams, indices, and aliases that\
+ \ you want to search. Supports wildcards (`*`)."
+ type: string
+ type:
+ description: "When set to `rollup`, identifies the rollup data views."
+ type: string
+ typemeta:
+ description: "When you use rollup indices, contains the field list for the rollup\
+ \ data view API endpoints."
+ type: object
+ create_data_view_request_object:
+ properties:
+ data_view:
+ $ref: '#/components/schemas/create_data_view_request_object_data_view'
+ override:
+ default: false
+ description: Override an existing data view if a data view with the provided
+ title already exists.
+ type: boolean
+ required:
+ - data_view
+ title: Create data view request
+ type: object
+ data_view_response_object:
+ example:
+ data_view:
+ title: title
+ version: WzQ2LDJd
+ allowNoIndex: true
+ runtimeFieldMap: "{}"
+ fieldAttrs: "{}"
+ sourceFilters:
+ - value: value
+ - value: value
+ typeMeta: "{}"
+ timeFieldName: timeFieldName
+ fieldFormats: "{}"
+ name: name
+ id: ff959d40-b880-11e8-a6d9-e546fe2bba5f
+ fields: "{}"
+ namespaces:
+ - default
+ - default
+ properties:
+ data_view:
+ $ref: '#/components/schemas/data_view_response_object_data_view'
+ title: Data view response properties
+ type: object
+ "404_response":
+ properties:
+ error:
+ enum:
+ - Not Found
+ example: Not Found
+ type: string
+ message:
+ example: "Saved object [index-pattern/caaad6d0-920c-11ed-b36a-874bd1548a00]\
+ \ not found"
+ type: string
+ statusCode:
+ enum:
+ - 404
+ example: 404
+ type: integer
+ type: object
+ update_data_view_request_object:
+ properties:
+ data_view:
+ $ref: '#/components/schemas/update_data_view_request_object_data_view'
+ refresh_fields:
+ default: false
+ description: Reloads the data view fields after the data view is updated.
+ type: boolean
+ required:
+ - data_view
+ title: Update data view request
+ type: object
+ getAllDataViews_200_response_data_view_inner:
+ example:
+ typeMeta: "{}"
+ name: name
+ id: id
+ title: title
+ namespaces:
+ - namespaces
+ - namespaces
+ properties:
+ id:
+ type: string
+ name:
+ type: string
+ namespaces:
+ items:
+ type: string
+ type: array
+ title:
+ type: string
+ typeMeta:
+ type: object
+ type: object
+ getAllDataViews_200_response:
+ example:
+ data_view:
+ - typeMeta: "{}"
+ name: name
+ id: id
+ title: title
+ namespaces:
+ - namespaces
+ - namespaces
+ - typeMeta: "{}"
+ name: name
+ id: id
+ title: title
+ namespaces:
+ - namespaces
+ - namespaces
+ properties:
+ data_view:
+ items:
+ $ref: '#/components/schemas/getAllDataViews_200_response_data_view_inner'
+ type: array
+ type: object
+ updateFieldsMetadata_request:
+ properties:
+ fields:
+ description: The field object.
+ type: object
+ required:
+ - fields
+ type: object
+ updateFieldsMetadata_200_response:
+ example:
+ acknowledged: true
+ properties:
+ acknowledged:
+ type: boolean
+ type: object
+ createUpdateRuntimeField_request:
+ properties:
+ name:
+ description: |
+ The name for a runtime field.
+ type: string
+ runtimeField:
+ description: |
+ The runtime field definition object.
+ type: object
+ required:
+ - name
+ - runtimeField
+ type: object
+ createUpdateRuntimeField_200_response:
+ example:
+ data_view: "{}"
+ fields:
+ - "{}"
+ - "{}"
+ properties:
+ data_view:
+ type: object
+ fields:
+ items:
+ type: object
+ type: array
+ type: object
+ updateRuntimeField_request:
+ properties:
+ runtimeField:
+ description: |
+ The runtime field definition object.
+
+ You can update following fields:
+
+ - `type`
+ - `script`
+ type: object
+ required:
+ - runtimeField
+ type: object
+ getDefaultDataView_200_response:
+ example:
+ data_view_id: data_view_id
+ properties:
+ data_view_id:
+ type: string
+ type: object
+ setDefaultDatailView_request:
+ properties:
+ data_view_id:
+ description: |
+ The data view identifier. NOTE: The API does not validate whether it is a valid identifier. Use `null` to unset the default data view.
+ force:
+ default: false
+ description: Update an existing default data view identifier.
+ type: boolean
+ required:
+ - data_view_id
+ type: object
+ sourcefilters_inner:
+ example:
+ value: value
+ properties:
+ value:
+ type: string
+ required:
+ - value
+ type: object
+ create_data_view_request_object_data_view:
+ description: The data view object.
+ properties:
+ allowNoIndex:
+ description: Allows the data view saved object to exist before the data
+ is available.
+ type: boolean
+ fieldAttrs:
+ description: A map of field attributes by field name.
+ type: object
+ fieldFormats:
+ description: A map of field formats by field name.
+ type: object
+ fields:
+ type: object
+ id:
+ type: string
+ name:
+ description: The data view name.
+ type: string
+ namespaces:
+ description: An array of space identifiers for sharing the data view between
+ multiple spaces.
+ items:
+ default: default
+ type: string
+ type: array
+ runtimeFieldMap:
+ description: A map of runtime field definitions by field name.
+ type: object
+ sourceFilters:
+ description: The array of field names you want to filter out in Discover.
+ items:
+ $ref: '#/components/schemas/sourcefilters_inner'
+ type: array
+ timeFieldName:
+ description: "The timestamp field name, which you use for time-based data\
+ \ views."
+ type: string
+ title:
+ description: "Comma-separated list of data streams, indices, and aliases\
+ \ that you want to search. Supports wildcards (`*`)."
+ type: string
+ type:
+ description: "When set to `rollup`, identifies the rollup data views."
+ type: string
+ typeMeta:
+ description: "When you use rollup indices, contains the field list for the\
+ \ rollup data view API endpoints."
+ type: object
+ version:
+ type: string
+ required:
+ - title
+ type: object
+ data_view_response_object_data_view:
+ example:
+ title: title
+ version: WzQ2LDJd
+ allowNoIndex: true
+ runtimeFieldMap: "{}"
+ fieldAttrs: "{}"
+ sourceFilters:
+ - value: value
+ - value: value
+ typeMeta: "{}"
+ timeFieldName: timeFieldName
+ fieldFormats: "{}"
+ name: name
+ id: ff959d40-b880-11e8-a6d9-e546fe2bba5f
+ fields: "{}"
+ namespaces:
+ - default
+ - default
+ properties:
+ allowNoIndex:
+ description: Allows the data view saved object to exist before the data
+ is available.
+ type: boolean
+ fieldAttrs:
+ description: A map of field attributes by field name.
+ type: object
+ fieldFormats:
+ description: A map of field formats by field name.
+ type: object
+ fields:
+ type: object
+ id:
+ example: ff959d40-b880-11e8-a6d9-e546fe2bba5f
+ type: string
+ name:
+ description: The data view name.
+ type: string
+ namespaces:
+ description: An array of space identifiers for sharing the data view between
+ multiple spaces.
+ items:
+ default: default
+ type: string
+ type: array
+ runtimeFieldMap:
+ description: A map of runtime field definitions by field name.
+ type: object
+ sourceFilters:
+ description: The array of field names you want to filter out in Discover.
+ items:
+ $ref: '#/components/schemas/sourcefilters_inner'
+ type: array
+ timeFieldName:
+ description: "The timestamp field name, which you use for time-based data\
+ \ views."
+ type: string
+ title:
+ description: "Comma-separated list of data streams, indices, and aliases\
+ \ that you want to search. Supports wildcards (`*`)."
+ type: string
+ typeMeta:
+ description: "When you use rollup indices, contains the field list for the\
+ \ rollup data view API endpoints."
+ type: object
+ version:
+ example: WzQ2LDJd
+ type: string
+ type: object
+ update_data_view_request_object_data_view:
+ description: |
+ The data view properties you want to update. Only the specified properties are updated in the data view. Unspecified fields stay as they are persisted.
+ properties:
+ allowNoIndex:
+ description: Allows the data view saved object to exist before the data
+ is available.
+ type: boolean
+ fieldFormats:
+ description: A map of field formats by field name.
+ type: object
+ fields:
+ type: object
+ name:
+ type: string
+ runtimeFieldMap:
+ description: A map of runtime field definitions by field name.
+ type: object
+ sourceFilters:
+ description: The array of field names you want to filter out in Discover.
+ items:
+ $ref: '#/components/schemas/sourcefilters_inner'
+ type: array
+ timeFieldName:
+ description: "The timestamp field name, which you use for time-based data\
+ \ views."
+ type: string
+ title:
+ description: "Comma-separated list of data streams, indices, and aliases\
+ \ that you want to search. Supports wildcards (`*`)."
+ type: string
+ type:
+ description: "When set to `rollup`, identifies the rollup data views."
+ type: string
+ typeMeta:
+ description: "When you use rollup indices, contains the field list for the\
+ \ rollup data view API endpoints."
+ type: object
+ type: object
+ securitySchemes:
+ basicAuth:
+ scheme: basic
+ type: http
+ apiKeyAuth:
+ in: header
+ name: ApiKey
+ type: apiKey
diff --git a/generated/data_views/api_data_views.go b/generated/data_views/api_data_views.go
new file mode 100644
index 000000000..3c4c3206e
--- /dev/null
+++ b/generated/data_views/api_data_views.go
@@ -0,0 +1,1985 @@
+/*
+Data views
+
+OpenAPI schema for data view endpoints
+
+API version: 0.1
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package data_views
+
+import (
+ "bytes"
+ "context"
+ "io"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+type DataViewsAPI interface {
+
+ /*
+ CreateDataView Creates a data view.
+
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @return ApiCreateDataViewRequest
+ */
+ CreateDataView(ctx context.Context) ApiCreateDataViewRequest
+
+ // CreateDataViewExecute executes the request
+ // @return DataViewResponseObject
+ CreateDataViewExecute(r ApiCreateDataViewRequest) (*DataViewResponseObject, *http.Response, error)
+
+ /*
+ CreateRuntimeField Creates a runtime field.
+
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param viewId An identifier for the data view.
+ @return ApiCreateRuntimeFieldRequest
+ */
+ CreateRuntimeField(ctx context.Context, viewId string) ApiCreateRuntimeFieldRequest
+
+ // CreateRuntimeFieldExecute executes the request
+ CreateRuntimeFieldExecute(r ApiCreateRuntimeFieldRequest) (*http.Response, error)
+
+ /*
+ CreateUpdateRuntimeField Create or update an existing runtime field.
+
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param viewId The ID of the data view fields you want to update.
+ @return ApiCreateUpdateRuntimeFieldRequest
+ */
+ CreateUpdateRuntimeField(ctx context.Context, viewId string) ApiCreateUpdateRuntimeFieldRequest
+
+ // CreateUpdateRuntimeFieldExecute executes the request
+ // @return CreateUpdateRuntimeField200Response
+ CreateUpdateRuntimeFieldExecute(r ApiCreateUpdateRuntimeFieldRequest) (*CreateUpdateRuntimeField200Response, *http.Response, error)
+
+ /*
+ DeleteDataView Deletes a data view.
+
+ WARNING: When you delete a data view, it cannot be recovered. This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param viewId An identifier for the data view.
+ @return ApiDeleteDataViewRequest
+ */
+ DeleteDataView(ctx context.Context, viewId string) ApiDeleteDataViewRequest
+
+ // DeleteDataViewExecute executes the request
+ DeleteDataViewExecute(r ApiDeleteDataViewRequest) (*http.Response, error)
+
+ /*
+ DeleteRuntimeField Delete a runtime field from a data view.
+
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param fieldName The name of the runtime field.
+ @param viewId An identifier for the data view.
+ @return ApiDeleteRuntimeFieldRequest
+ */
+ DeleteRuntimeField(ctx context.Context, fieldName string, viewId string) ApiDeleteRuntimeFieldRequest
+
+ // DeleteRuntimeFieldExecute executes the request
+ DeleteRuntimeFieldExecute(r ApiDeleteRuntimeFieldRequest) (*http.Response, error)
+
+ /*
+ GetAllDataViews Retrieves a list of all data views.
+
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @return ApiGetAllDataViewsRequest
+ */
+ GetAllDataViews(ctx context.Context) ApiGetAllDataViewsRequest
+
+ // GetAllDataViewsExecute executes the request
+ // @return GetAllDataViews200Response
+ GetAllDataViewsExecute(r ApiGetAllDataViewsRequest) (*GetAllDataViews200Response, *http.Response, error)
+
+ /*
+ GetDataView Retrieves a single data view by identifier.
+
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param viewId An identifier for the data view.
+ @return ApiGetDataViewRequest
+ */
+ GetDataView(ctx context.Context, viewId string) ApiGetDataViewRequest
+
+ // GetDataViewExecute executes the request
+ // @return DataViewResponseObject
+ GetDataViewExecute(r ApiGetDataViewRequest) (*DataViewResponseObject, *http.Response, error)
+
+ /*
+ GetDefaultDataView Retrieves the default data view identifier.
+
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @return ApiGetDefaultDataViewRequest
+ */
+ GetDefaultDataView(ctx context.Context) ApiGetDefaultDataViewRequest
+
+ // GetDefaultDataViewExecute executes the request
+ // @return GetDefaultDataView200Response
+ GetDefaultDataViewExecute(r ApiGetDefaultDataViewRequest) (*GetDefaultDataView200Response, *http.Response, error)
+
+ /*
+ GetRuntimeField Retrieves a runtime field.
+
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param fieldName The name of the runtime field.
+ @param viewId An identifier for the data view.
+ @return ApiGetRuntimeFieldRequest
+ */
+ GetRuntimeField(ctx context.Context, fieldName string, viewId string) ApiGetRuntimeFieldRequest
+
+ // GetRuntimeFieldExecute executes the request
+ // @return CreateUpdateRuntimeField200Response
+ GetRuntimeFieldExecute(r ApiGetRuntimeFieldRequest) (*CreateUpdateRuntimeField200Response, *http.Response, error)
+
+ /*
+ SetDefaultDatailView Sets the default data view identifier.
+
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @return ApiSetDefaultDatailViewRequest
+ */
+ SetDefaultDatailView(ctx context.Context) ApiSetDefaultDatailViewRequest
+
+ // SetDefaultDatailViewExecute executes the request
+ // @return UpdateFieldsMetadata200Response
+ SetDefaultDatailViewExecute(r ApiSetDefaultDatailViewRequest) (*UpdateFieldsMetadata200Response, *http.Response, error)
+
+ /*
+ UpdateDataView Updates a data view.
+
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param viewId An identifier for the data view.
+ @return ApiUpdateDataViewRequest
+ */
+ UpdateDataView(ctx context.Context, viewId string) ApiUpdateDataViewRequest
+
+ // UpdateDataViewExecute executes the request
+ // @return DataViewResponseObject
+ UpdateDataViewExecute(r ApiUpdateDataViewRequest) (*DataViewResponseObject, *http.Response, error)
+
+ /*
+ UpdateFieldsMetadata Update fields presentation metadata such as count, customLabel and format.
+
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. You can update multiple fields in one request. Updates are merged with persisted metadata. To remove existing metadata, specify null as the value.
+
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param viewId An identifier for the data view.
+ @return ApiUpdateFieldsMetadataRequest
+ */
+ UpdateFieldsMetadata(ctx context.Context, viewId string) ApiUpdateFieldsMetadataRequest
+
+ // UpdateFieldsMetadataExecute executes the request
+ // @return UpdateFieldsMetadata200Response
+ UpdateFieldsMetadataExecute(r ApiUpdateFieldsMetadataRequest) (*UpdateFieldsMetadata200Response, *http.Response, error)
+
+ /*
+ UpdateRuntimeField Update an existing runtime field.
+
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param fieldName The name of the runtime field.
+ @param viewId An identifier for the data view.
+ @return ApiUpdateRuntimeFieldRequest
+ */
+ UpdateRuntimeField(ctx context.Context, fieldName string, viewId string) ApiUpdateRuntimeFieldRequest
+
+ // UpdateRuntimeFieldExecute executes the request
+ UpdateRuntimeFieldExecute(r ApiUpdateRuntimeFieldRequest) (*http.Response, error)
+}
+
+// DataViewsAPIService DataViewsAPI service
+type DataViewsAPIService service
+
+type ApiCreateDataViewRequest struct {
+ ctx context.Context
+ ApiService DataViewsAPI
+ kbnXsrf *string
+ createDataViewRequestObject *CreateDataViewRequestObject
+}
+
+// Cross-site request forgery protection
+func (r ApiCreateDataViewRequest) KbnXsrf(kbnXsrf string) ApiCreateDataViewRequest {
+ r.kbnXsrf = &kbnXsrf
+ return r
+}
+
+func (r ApiCreateDataViewRequest) CreateDataViewRequestObject(createDataViewRequestObject CreateDataViewRequestObject) ApiCreateDataViewRequest {
+ r.createDataViewRequestObject = &createDataViewRequestObject
+ return r
+}
+
+func (r ApiCreateDataViewRequest) Execute() (*DataViewResponseObject, *http.Response, error) {
+ return r.ApiService.CreateDataViewExecute(r)
+}
+
+/*
+CreateDataView Creates a data view.
+
+This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @return ApiCreateDataViewRequest
+*/
+func (a *DataViewsAPIService) CreateDataView(ctx context.Context) ApiCreateDataViewRequest {
+ return ApiCreateDataViewRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+// Execute executes the request
+//
+// @return DataViewResponseObject
+func (a *DataViewsAPIService) CreateDataViewExecute(r ApiCreateDataViewRequest) (*DataViewResponseObject, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodPost
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *DataViewResponseObject
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataViewsAPIService.CreateDataView")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/data_views/data_view"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.kbnXsrf == nil {
+ return localVarReturnValue, nil, reportError("kbnXsrf is required and must be specified")
+ }
+ if r.createDataViewRequestObject == nil {
+ return localVarReturnValue, nil, reportError("createDataViewRequestObject is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "")
+ // body params
+ localVarPostBody = r.createDataViewRequestObject
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {
+ if apiKey, ok := auth["apiKeyAuth"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["ApiKey"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Model400Response
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiCreateRuntimeFieldRequest struct {
+ ctx context.Context
+ ApiService DataViewsAPI
+ kbnXsrf *string
+ viewId string
+ createUpdateRuntimeFieldRequest *CreateUpdateRuntimeFieldRequest
+}
+
+// Cross-site request forgery protection
+func (r ApiCreateRuntimeFieldRequest) KbnXsrf(kbnXsrf string) ApiCreateRuntimeFieldRequest {
+ r.kbnXsrf = &kbnXsrf
+ return r
+}
+
+func (r ApiCreateRuntimeFieldRequest) CreateUpdateRuntimeFieldRequest(createUpdateRuntimeFieldRequest CreateUpdateRuntimeFieldRequest) ApiCreateRuntimeFieldRequest {
+ r.createUpdateRuntimeFieldRequest = &createUpdateRuntimeFieldRequest
+ return r
+}
+
+func (r ApiCreateRuntimeFieldRequest) Execute() (*http.Response, error) {
+ return r.ApiService.CreateRuntimeFieldExecute(r)
+}
+
+/*
+CreateRuntimeField Creates a runtime field.
+
+This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param viewId An identifier for the data view.
+ @return ApiCreateRuntimeFieldRequest
+*/
+func (a *DataViewsAPIService) CreateRuntimeField(ctx context.Context, viewId string) ApiCreateRuntimeFieldRequest {
+ return ApiCreateRuntimeFieldRequest{
+ ApiService: a,
+ ctx: ctx,
+ viewId: viewId,
+ }
+}
+
+// Execute executes the request
+func (a *DataViewsAPIService) CreateRuntimeFieldExecute(r ApiCreateRuntimeFieldRequest) (*http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodPost
+ localVarPostBody interface{}
+ formFiles []formFile
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataViewsAPIService.CreateRuntimeField")
+ if err != nil {
+ return nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/data_views/data_view/{viewId}/runtime_field"
+ localVarPath = strings.Replace(localVarPath, "{"+"viewId"+"}", url.PathEscape(parameterValueToString(r.viewId, "viewId")), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.kbnXsrf == nil {
+ return nil, reportError("kbnXsrf is required and must be specified")
+ }
+ if r.createUpdateRuntimeFieldRequest == nil {
+ return nil, reportError("createUpdateRuntimeFieldRequest is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "")
+ // body params
+ localVarPostBody = r.createUpdateRuntimeFieldRequest
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {
+ if apiKey, ok := auth["apiKeyAuth"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["ApiKey"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ return localVarHTTPResponse, newErr
+ }
+
+ return localVarHTTPResponse, nil
+}
+
+type ApiCreateUpdateRuntimeFieldRequest struct {
+ ctx context.Context
+ ApiService DataViewsAPI
+ kbnXsrf *string
+ viewId string
+ createUpdateRuntimeFieldRequest *CreateUpdateRuntimeFieldRequest
+}
+
+// Cross-site request forgery protection
+func (r ApiCreateUpdateRuntimeFieldRequest) KbnXsrf(kbnXsrf string) ApiCreateUpdateRuntimeFieldRequest {
+ r.kbnXsrf = &kbnXsrf
+ return r
+}
+
+func (r ApiCreateUpdateRuntimeFieldRequest) CreateUpdateRuntimeFieldRequest(createUpdateRuntimeFieldRequest CreateUpdateRuntimeFieldRequest) ApiCreateUpdateRuntimeFieldRequest {
+ r.createUpdateRuntimeFieldRequest = &createUpdateRuntimeFieldRequest
+ return r
+}
+
+func (r ApiCreateUpdateRuntimeFieldRequest) Execute() (*CreateUpdateRuntimeField200Response, *http.Response, error) {
+ return r.ApiService.CreateUpdateRuntimeFieldExecute(r)
+}
+
+/*
+CreateUpdateRuntimeField Create or update an existing runtime field.
+
+This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param viewId The ID of the data view fields you want to update.
+ @return ApiCreateUpdateRuntimeFieldRequest
+*/
+func (a *DataViewsAPIService) CreateUpdateRuntimeField(ctx context.Context, viewId string) ApiCreateUpdateRuntimeFieldRequest {
+ return ApiCreateUpdateRuntimeFieldRequest{
+ ApiService: a,
+ ctx: ctx,
+ viewId: viewId,
+ }
+}
+
+// Execute executes the request
+//
+// @return CreateUpdateRuntimeField200Response
+func (a *DataViewsAPIService) CreateUpdateRuntimeFieldExecute(r ApiCreateUpdateRuntimeFieldRequest) (*CreateUpdateRuntimeField200Response, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodPut
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *CreateUpdateRuntimeField200Response
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataViewsAPIService.CreateUpdateRuntimeField")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/data_views/data_view/{viewId}/runtime_field"
+ localVarPath = strings.Replace(localVarPath, "{"+"viewId"+"}", url.PathEscape(parameterValueToString(r.viewId, "viewId")), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.kbnXsrf == nil {
+ return localVarReturnValue, nil, reportError("kbnXsrf is required and must be specified")
+ }
+ if r.createUpdateRuntimeFieldRequest == nil {
+ return localVarReturnValue, nil, reportError("createUpdateRuntimeFieldRequest is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "")
+ // body params
+ localVarPostBody = r.createUpdateRuntimeFieldRequest
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {
+ if apiKey, ok := auth["apiKeyAuth"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["ApiKey"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Model400Response
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiDeleteDataViewRequest struct {
+ ctx context.Context
+ ApiService DataViewsAPI
+ kbnXsrf *string
+ viewId string
+}
+
+// Cross-site request forgery protection
+func (r ApiDeleteDataViewRequest) KbnXsrf(kbnXsrf string) ApiDeleteDataViewRequest {
+ r.kbnXsrf = &kbnXsrf
+ return r
+}
+
+func (r ApiDeleteDataViewRequest) Execute() (*http.Response, error) {
+ return r.ApiService.DeleteDataViewExecute(r)
+}
+
+/*
+DeleteDataView Deletes a data view.
+
+WARNING: When you delete a data view, it cannot be recovered. This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param viewId An identifier for the data view.
+ @return ApiDeleteDataViewRequest
+*/
+func (a *DataViewsAPIService) DeleteDataView(ctx context.Context, viewId string) ApiDeleteDataViewRequest {
+ return ApiDeleteDataViewRequest{
+ ApiService: a,
+ ctx: ctx,
+ viewId: viewId,
+ }
+}
+
+// Execute executes the request
+func (a *DataViewsAPIService) DeleteDataViewExecute(r ApiDeleteDataViewRequest) (*http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodDelete
+ localVarPostBody interface{}
+ formFiles []formFile
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataViewsAPIService.DeleteDataView")
+ if err != nil {
+ return nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/data_views/data_view/{viewId}"
+ localVarPath = strings.Replace(localVarPath, "{"+"viewId"+"}", url.PathEscape(parameterValueToString(r.viewId, "viewId")), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.kbnXsrf == nil {
+ return nil, reportError("kbnXsrf is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "")
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {
+ if apiKey, ok := auth["apiKeyAuth"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["ApiKey"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Model404Response
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarHTTPResponse, newErr
+ }
+
+ return localVarHTTPResponse, nil
+}
+
+type ApiDeleteRuntimeFieldRequest struct {
+ ctx context.Context
+ ApiService DataViewsAPI
+ fieldName string
+ viewId string
+}
+
+func (r ApiDeleteRuntimeFieldRequest) Execute() (*http.Response, error) {
+ return r.ApiService.DeleteRuntimeFieldExecute(r)
+}
+
+/*
+DeleteRuntimeField Delete a runtime field from a data view.
+
+This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param fieldName The name of the runtime field.
+ @param viewId An identifier for the data view.
+ @return ApiDeleteRuntimeFieldRequest
+*/
+func (a *DataViewsAPIService) DeleteRuntimeField(ctx context.Context, fieldName string, viewId string) ApiDeleteRuntimeFieldRequest {
+ return ApiDeleteRuntimeFieldRequest{
+ ApiService: a,
+ ctx: ctx,
+ fieldName: fieldName,
+ viewId: viewId,
+ }
+}
+
+// Execute executes the request
+func (a *DataViewsAPIService) DeleteRuntimeFieldExecute(r ApiDeleteRuntimeFieldRequest) (*http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodDelete
+ localVarPostBody interface{}
+ formFiles []formFile
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataViewsAPIService.DeleteRuntimeField")
+ if err != nil {
+ return nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/data_views/data_view/{viewId}/runtime_field/{fieldName}"
+ localVarPath = strings.Replace(localVarPath, "{"+"fieldName"+"}", url.PathEscape(parameterValueToString(r.fieldName, "fieldName")), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"viewId"+"}", url.PathEscape(parameterValueToString(r.viewId, "viewId")), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {
+ if apiKey, ok := auth["apiKeyAuth"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["ApiKey"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Model404Response
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarHTTPResponse, newErr
+ }
+
+ return localVarHTTPResponse, nil
+}
+
+type ApiGetAllDataViewsRequest struct {
+ ctx context.Context
+ ApiService DataViewsAPI
+}
+
+func (r ApiGetAllDataViewsRequest) Execute() (*GetAllDataViews200Response, *http.Response, error) {
+ return r.ApiService.GetAllDataViewsExecute(r)
+}
+
+/*
+GetAllDataViews Retrieves a list of all data views.
+
+This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @return ApiGetAllDataViewsRequest
+*/
+func (a *DataViewsAPIService) GetAllDataViews(ctx context.Context) ApiGetAllDataViewsRequest {
+ return ApiGetAllDataViewsRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+// Execute executes the request
+//
+// @return GetAllDataViews200Response
+func (a *DataViewsAPIService) GetAllDataViewsExecute(r ApiGetAllDataViewsRequest) (*GetAllDataViews200Response, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *GetAllDataViews200Response
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataViewsAPIService.GetAllDataViews")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/data_views"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {
+ if apiKey, ok := auth["apiKeyAuth"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["ApiKey"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Model400Response
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiGetDataViewRequest struct {
+ ctx context.Context
+ ApiService DataViewsAPI
+ viewId string
+}
+
+func (r ApiGetDataViewRequest) Execute() (*DataViewResponseObject, *http.Response, error) {
+ return r.ApiService.GetDataViewExecute(r)
+}
+
+/*
+GetDataView Retrieves a single data view by identifier.
+
+This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param viewId An identifier for the data view.
+ @return ApiGetDataViewRequest
+*/
+func (a *DataViewsAPIService) GetDataView(ctx context.Context, viewId string) ApiGetDataViewRequest {
+ return ApiGetDataViewRequest{
+ ApiService: a,
+ ctx: ctx,
+ viewId: viewId,
+ }
+}
+
+// Execute executes the request
+//
+// @return DataViewResponseObject
+func (a *DataViewsAPIService) GetDataViewExecute(r ApiGetDataViewRequest) (*DataViewResponseObject, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *DataViewResponseObject
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataViewsAPIService.GetDataView")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/data_views/data_view/{viewId}"
+ localVarPath = strings.Replace(localVarPath, "{"+"viewId"+"}", url.PathEscape(parameterValueToString(r.viewId, "viewId")), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {
+ if apiKey, ok := auth["apiKeyAuth"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["ApiKey"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Model404Response
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiGetDefaultDataViewRequest struct {
+ ctx context.Context
+ ApiService DataViewsAPI
+}
+
+func (r ApiGetDefaultDataViewRequest) Execute() (*GetDefaultDataView200Response, *http.Response, error) {
+ return r.ApiService.GetDefaultDataViewExecute(r)
+}
+
+/*
+GetDefaultDataView Retrieves the default data view identifier.
+
+This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @return ApiGetDefaultDataViewRequest
+*/
+func (a *DataViewsAPIService) GetDefaultDataView(ctx context.Context) ApiGetDefaultDataViewRequest {
+ return ApiGetDefaultDataViewRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+// Execute executes the request
+//
+// @return GetDefaultDataView200Response
+func (a *DataViewsAPIService) GetDefaultDataViewExecute(r ApiGetDefaultDataViewRequest) (*GetDefaultDataView200Response, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *GetDefaultDataView200Response
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataViewsAPIService.GetDefaultDataView")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/data_views/default"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {
+ if apiKey, ok := auth["apiKeyAuth"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["ApiKey"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Model400Response
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiGetRuntimeFieldRequest struct {
+ ctx context.Context
+ ApiService DataViewsAPI
+ fieldName string
+ viewId string
+}
+
+func (r ApiGetRuntimeFieldRequest) Execute() (*CreateUpdateRuntimeField200Response, *http.Response, error) {
+ return r.ApiService.GetRuntimeFieldExecute(r)
+}
+
+/*
+GetRuntimeField Retrieves a runtime field.
+
+This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param fieldName The name of the runtime field.
+ @param viewId An identifier for the data view.
+ @return ApiGetRuntimeFieldRequest
+*/
+func (a *DataViewsAPIService) GetRuntimeField(ctx context.Context, fieldName string, viewId string) ApiGetRuntimeFieldRequest {
+ return ApiGetRuntimeFieldRequest{
+ ApiService: a,
+ ctx: ctx,
+ fieldName: fieldName,
+ viewId: viewId,
+ }
+}
+
+// Execute executes the request
+//
+// @return CreateUpdateRuntimeField200Response
+func (a *DataViewsAPIService) GetRuntimeFieldExecute(r ApiGetRuntimeFieldRequest) (*CreateUpdateRuntimeField200Response, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *CreateUpdateRuntimeField200Response
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataViewsAPIService.GetRuntimeField")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/data_views/data_view/{viewId}/runtime_field/{fieldName}"
+ localVarPath = strings.Replace(localVarPath, "{"+"fieldName"+"}", url.PathEscape(parameterValueToString(r.fieldName, "fieldName")), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"viewId"+"}", url.PathEscape(parameterValueToString(r.viewId, "viewId")), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {
+ if apiKey, ok := auth["apiKeyAuth"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["ApiKey"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Model404Response
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiSetDefaultDatailViewRequest struct {
+ ctx context.Context
+ ApiService DataViewsAPI
+ kbnXsrf *string
+ setDefaultDatailViewRequest *SetDefaultDatailViewRequest
+}
+
+// Cross-site request forgery protection
+func (r ApiSetDefaultDatailViewRequest) KbnXsrf(kbnXsrf string) ApiSetDefaultDatailViewRequest {
+ r.kbnXsrf = &kbnXsrf
+ return r
+}
+
+func (r ApiSetDefaultDatailViewRequest) SetDefaultDatailViewRequest(setDefaultDatailViewRequest SetDefaultDatailViewRequest) ApiSetDefaultDatailViewRequest {
+ r.setDefaultDatailViewRequest = &setDefaultDatailViewRequest
+ return r
+}
+
+func (r ApiSetDefaultDatailViewRequest) Execute() (*UpdateFieldsMetadata200Response, *http.Response, error) {
+ return r.ApiService.SetDefaultDatailViewExecute(r)
+}
+
+/*
+SetDefaultDatailView Sets the default data view identifier.
+
+This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @return ApiSetDefaultDatailViewRequest
+*/
+func (a *DataViewsAPIService) SetDefaultDatailView(ctx context.Context) ApiSetDefaultDatailViewRequest {
+ return ApiSetDefaultDatailViewRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+// Execute executes the request
+//
+// @return UpdateFieldsMetadata200Response
+func (a *DataViewsAPIService) SetDefaultDatailViewExecute(r ApiSetDefaultDatailViewRequest) (*UpdateFieldsMetadata200Response, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodPost
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *UpdateFieldsMetadata200Response
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataViewsAPIService.SetDefaultDatailView")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/data_views/default"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.kbnXsrf == nil {
+ return localVarReturnValue, nil, reportError("kbnXsrf is required and must be specified")
+ }
+ if r.setDefaultDatailViewRequest == nil {
+ return localVarReturnValue, nil, reportError("setDefaultDatailViewRequest is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "")
+ // body params
+ localVarPostBody = r.setDefaultDatailViewRequest
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {
+ if apiKey, ok := auth["apiKeyAuth"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["ApiKey"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Model400Response
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiUpdateDataViewRequest struct {
+ ctx context.Context
+ ApiService DataViewsAPI
+ kbnXsrf *string
+ viewId string
+ updateDataViewRequestObject *UpdateDataViewRequestObject
+}
+
+// Cross-site request forgery protection
+func (r ApiUpdateDataViewRequest) KbnXsrf(kbnXsrf string) ApiUpdateDataViewRequest {
+ r.kbnXsrf = &kbnXsrf
+ return r
+}
+
+func (r ApiUpdateDataViewRequest) UpdateDataViewRequestObject(updateDataViewRequestObject UpdateDataViewRequestObject) ApiUpdateDataViewRequest {
+ r.updateDataViewRequestObject = &updateDataViewRequestObject
+ return r
+}
+
+func (r ApiUpdateDataViewRequest) Execute() (*DataViewResponseObject, *http.Response, error) {
+ return r.ApiService.UpdateDataViewExecute(r)
+}
+
+/*
+UpdateDataView Updates a data view.
+
+This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param viewId An identifier for the data view.
+ @return ApiUpdateDataViewRequest
+*/
+func (a *DataViewsAPIService) UpdateDataView(ctx context.Context, viewId string) ApiUpdateDataViewRequest {
+ return ApiUpdateDataViewRequest{
+ ApiService: a,
+ ctx: ctx,
+ viewId: viewId,
+ }
+}
+
+// Execute executes the request
+//
+// @return DataViewResponseObject
+func (a *DataViewsAPIService) UpdateDataViewExecute(r ApiUpdateDataViewRequest) (*DataViewResponseObject, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodPost
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *DataViewResponseObject
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataViewsAPIService.UpdateDataView")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/data_views/data_view/{viewId}"
+ localVarPath = strings.Replace(localVarPath, "{"+"viewId"+"}", url.PathEscape(parameterValueToString(r.viewId, "viewId")), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.kbnXsrf == nil {
+ return localVarReturnValue, nil, reportError("kbnXsrf is required and must be specified")
+ }
+ if r.updateDataViewRequestObject == nil {
+ return localVarReturnValue, nil, reportError("updateDataViewRequestObject is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "")
+ // body params
+ localVarPostBody = r.updateDataViewRequestObject
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {
+ if apiKey, ok := auth["apiKeyAuth"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["ApiKey"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Model400Response
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiUpdateFieldsMetadataRequest struct {
+ ctx context.Context
+ ApiService DataViewsAPI
+ kbnXsrf *string
+ viewId string
+ updateFieldsMetadataRequest *UpdateFieldsMetadataRequest
+}
+
+// Cross-site request forgery protection
+func (r ApiUpdateFieldsMetadataRequest) KbnXsrf(kbnXsrf string) ApiUpdateFieldsMetadataRequest {
+ r.kbnXsrf = &kbnXsrf
+ return r
+}
+
+func (r ApiUpdateFieldsMetadataRequest) UpdateFieldsMetadataRequest(updateFieldsMetadataRequest UpdateFieldsMetadataRequest) ApiUpdateFieldsMetadataRequest {
+ r.updateFieldsMetadataRequest = &updateFieldsMetadataRequest
+ return r
+}
+
+func (r ApiUpdateFieldsMetadataRequest) Execute() (*UpdateFieldsMetadata200Response, *http.Response, error) {
+ return r.ApiService.UpdateFieldsMetadataExecute(r)
+}
+
+/*
+UpdateFieldsMetadata Update fields presentation metadata such as count, customLabel and format.
+
+This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. You can update multiple fields in one request. Updates are merged with persisted metadata. To remove existing metadata, specify null as the value.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param viewId An identifier for the data view.
+ @return ApiUpdateFieldsMetadataRequest
+*/
+func (a *DataViewsAPIService) UpdateFieldsMetadata(ctx context.Context, viewId string) ApiUpdateFieldsMetadataRequest {
+ return ApiUpdateFieldsMetadataRequest{
+ ApiService: a,
+ ctx: ctx,
+ viewId: viewId,
+ }
+}
+
+// Execute executes the request
+//
+// @return UpdateFieldsMetadata200Response
+func (a *DataViewsAPIService) UpdateFieldsMetadataExecute(r ApiUpdateFieldsMetadataRequest) (*UpdateFieldsMetadata200Response, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodPost
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *UpdateFieldsMetadata200Response
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataViewsAPIService.UpdateFieldsMetadata")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/data_views/data_view/{viewId}/fields"
+ localVarPath = strings.Replace(localVarPath, "{"+"viewId"+"}", url.PathEscape(parameterValueToString(r.viewId, "viewId")), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.kbnXsrf == nil {
+ return localVarReturnValue, nil, reportError("kbnXsrf is required and must be specified")
+ }
+ if r.updateFieldsMetadataRequest == nil {
+ return localVarReturnValue, nil, reportError("updateFieldsMetadataRequest is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "")
+ // body params
+ localVarPostBody = r.updateFieldsMetadataRequest
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {
+ if apiKey, ok := auth["apiKeyAuth"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["ApiKey"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Model400Response
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type ApiUpdateRuntimeFieldRequest struct {
+ ctx context.Context
+ ApiService DataViewsAPI
+ fieldName string
+ viewId string
+ updateRuntimeFieldRequest *UpdateRuntimeFieldRequest
+}
+
+func (r ApiUpdateRuntimeFieldRequest) UpdateRuntimeFieldRequest(updateRuntimeFieldRequest UpdateRuntimeFieldRequest) ApiUpdateRuntimeFieldRequest {
+ r.updateRuntimeFieldRequest = &updateRuntimeFieldRequest
+ return r
+}
+
+func (r ApiUpdateRuntimeFieldRequest) Execute() (*http.Response, error) {
+ return r.ApiService.UpdateRuntimeFieldExecute(r)
+}
+
+/*
+UpdateRuntimeField Update an existing runtime field.
+
+This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param fieldName The name of the runtime field.
+ @param viewId An identifier for the data view.
+ @return ApiUpdateRuntimeFieldRequest
+*/
+func (a *DataViewsAPIService) UpdateRuntimeField(ctx context.Context, fieldName string, viewId string) ApiUpdateRuntimeFieldRequest {
+ return ApiUpdateRuntimeFieldRequest{
+ ApiService: a,
+ ctx: ctx,
+ fieldName: fieldName,
+ viewId: viewId,
+ }
+}
+
+// Execute executes the request
+func (a *DataViewsAPIService) UpdateRuntimeFieldExecute(r ApiUpdateRuntimeFieldRequest) (*http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodPost
+ localVarPostBody interface{}
+ formFiles []formFile
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataViewsAPIService.UpdateRuntimeField")
+ if err != nil {
+ return nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/api/data_views/data_view/{viewId}/runtime_field/{fieldName}"
+ localVarPath = strings.Replace(localVarPath, "{"+"fieldName"+"}", url.PathEscape(parameterValueToString(r.fieldName, "fieldName")), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"viewId"+"}", url.PathEscape(parameterValueToString(r.viewId, "viewId")), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.updateRuntimeFieldRequest == nil {
+ return nil, reportError("updateRuntimeFieldRequest is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ // body params
+ localVarPostBody = r.updateRuntimeFieldRequest
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {
+ if apiKey, ok := auth["apiKeyAuth"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["ApiKey"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Model400Response
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHTTPResponse, newErr
+ }
+ newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)
+ newErr.model = v
+ }
+ return localVarHTTPResponse, newErr
+ }
+
+ return localVarHTTPResponse, nil
+}
diff --git a/generated/data_views/bundled.yaml b/generated/data_views/bundled.yaml
new file mode 100644
index 000000000..b7fdc271e
--- /dev/null
+++ b/generated/data_views/bundled.yaml
@@ -0,0 +1,2196 @@
+openapi: 3.0.1
+info:
+ title: Data views
+ description: OpenAPI schema for data view endpoints
+ version: '0.1'
+ contact:
+ name: Kibana Core Team
+ license:
+ name: Elastic License 2.0
+ url: https://www.elastic.co/licensing/elastic-license
+servers:
+ - url: /
+security:
+ - basicAuth: []
+ - apiKeyAuth: []
+tags:
+ - name: data views
+ description: Data view APIs enable you to manage data views, formerly known as Kibana index patterns.
+paths:
+ /api/data_views:
+ get:
+ summary: Retrieves a list of all data views.
+ operationId: getAllDataViews
+ description: |
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+ tags:
+ - data views
+ responses:
+ '200':
+ description: Indicates a successful call.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data_view:
+ type: array
+ items:
+ type: object
+ properties:
+ id:
+ type: string
+ name:
+ type: string
+ namespaces:
+ type: array
+ items:
+ type: string
+ title:
+ type: string
+ typeMeta:
+ type: object
+ examples:
+ getAllDataViewsResponse:
+ $ref: '#/components/examples/get_data_views_response'
+ '400':
+ description: Bad request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/400_response'
+ /api/data_views/data_view:
+ post:
+ summary: Creates a data view.
+ operationId: createDataView
+ description: |
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+ tags:
+ - data views
+ parameters:
+ - $ref: '#/components/parameters/kbn_xsrf'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/create_data_view_request_object'
+ examples:
+ createDataViewRequest:
+ $ref: '#/components/examples/create_data_view_request'
+ responses:
+ '200':
+ description: Indicates a successful call.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/data_view_response_object'
+ '400':
+ description: Bad request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/400_response'
+ /api/data_views/data_view/{viewId}:
+ get:
+ summary: Retrieves a single data view by identifier.
+ operationId: getDataView
+ description: |
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+ tags:
+ - data views
+ parameters:
+ - $ref: '#/components/parameters/view_id'
+ responses:
+ '200':
+ description: Indicates a successful call.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/data_view_response_object'
+ examples:
+ getDataViewResponse:
+ $ref: '#/components/examples/get_data_view_response'
+ '404':
+ description: Object is not found.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/404_response'
+ delete:
+ summary: Deletes a data view.
+ operationId: deleteDataView
+ description: |
+ WARNING: When you delete a data view, it cannot be recovered. This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+ tags:
+ - data views
+ parameters:
+ - $ref: '#/components/parameters/kbn_xsrf'
+ - $ref: '#/components/parameters/view_id'
+ responses:
+ '204':
+ description: Indicates a successful call.
+ '404':
+ description: Object is not found.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/404_response'
+ post:
+ summary: Updates a data view.
+ operationId: updateDataView
+ description: |
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+ tags:
+ - data views
+ parameters:
+ - $ref: '#/components/parameters/kbn_xsrf'
+ - $ref: '#/components/parameters/view_id'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/update_data_view_request_object'
+ examples:
+ updateDataViewRequest:
+ $ref: '#/components/examples/update_data_view_request'
+ responses:
+ '200':
+ description: Indicates a successful call.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/data_view_response_object'
+ '400':
+ description: Bad request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/400_response'
+ /api/data_views/data_view/{viewId}/fields:
+ post:
+ summary: Update fields presentation metadata such as count, customLabel and format.
+ operationId: updateFieldsMetadata
+ description: |
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. You can update multiple fields in one request. Updates are merged with persisted metadata. To remove existing metadata, specify null as the value.
+ tags:
+ - data views
+ parameters:
+ - $ref: '#/components/parameters/kbn_xsrf'
+ - $ref: '#/components/parameters/view_id'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ required:
+ - fields
+ properties:
+ fields:
+ description: The field object.
+ type: object
+ examples:
+ updateFieldsMetadataRequest:
+ $ref: '#/components/examples/update_field_metadata_request'
+ responses:
+ '200':
+ description: Indicates a successful call.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ acknowledged:
+ type: boolean
+ '400':
+ description: Bad request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/400_response'
+ /api/data_views/data_view/{viewId}/runtime_field:
+ post:
+ summary: Creates a runtime field.
+ operationId: createRuntimeField
+ description: |
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+ tags:
+ - data views
+ parameters:
+ - $ref: '#/components/parameters/kbn_xsrf'
+ - $ref: '#/components/parameters/view_id'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ required:
+ - name
+ - runtimeField
+ properties:
+ name:
+ type: string
+ description: |
+ The name for a runtime field.
+ runtimeField:
+ type: object
+ description: |
+ The runtime field definition object.
+ examples:
+ createRuntimeFieldRequest:
+ $ref: '#/components/examples/create_runtime_field_request'
+ put:
+ summary: Create or update an existing runtime field.
+ operationId: createUpdateRuntimeField
+ description: |
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+ tags:
+ - data views
+ parameters:
+ - $ref: '#/components/parameters/kbn_xsrf'
+ - name: viewId
+ in: path
+ description: |
+ The ID of the data view fields you want to update.
+ required: true
+ schema:
+ type: string
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ required:
+ - name
+ - runtimeField
+ properties:
+ name:
+ type: string
+ description: |
+ The name for a runtime field.
+ runtimeField:
+ type: object
+ description: |
+ The runtime field definition object.
+ examples:
+ updateRuntimeFieldRequest:
+ $ref: '#/components/examples/create_runtime_field_request'
+ responses:
+ '200':
+ description: Indicates a successful call.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data_view:
+ type: object
+ fields:
+ type: array
+ items:
+ type: object
+ examples:
+ createRuntimeFieldResponse:
+ $ref: '#/components/examples/create_runtime_field_response'
+ '400':
+ description: Bad request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/400_response'
+ /api/data_views/data_view/{viewId}/runtime_field/{fieldName}:
+ get:
+ summary: Retrieves a runtime field.
+ operationId: getRuntimeField
+ description: |
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+ tags:
+ - data views
+ parameters:
+ - $ref: '#/components/parameters/field_name'
+ - $ref: '#/components/parameters/view_id'
+ responses:
+ '200':
+ description: Indicates a successful call.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data_view:
+ type: object
+ fields:
+ type: array
+ items:
+ type: object
+ examples:
+ getRuntimeFieldResponse:
+ $ref: '#/components/examples/get_runtime_field_response'
+ '404':
+ description: Object is not found.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/404_response'
+ delete:
+ summary: Delete a runtime field from a data view.
+ operationId: deleteRuntimeField
+ description: |
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+ tags:
+ - data views
+ parameters:
+ - $ref: '#/components/parameters/field_name'
+ - $ref: '#/components/parameters/view_id'
+ responses:
+ '200':
+ description: Indicates a successful call.
+ '404':
+ description: Object is not found.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/404_response'
+ post:
+ summary: Update an existing runtime field.
+ operationId: updateRuntimeField
+ description: |
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+ tags:
+ - data views
+ parameters:
+ - $ref: '#/components/parameters/field_name'
+ - $ref: '#/components/parameters/view_id'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ required:
+ - runtimeField
+ properties:
+ runtimeField:
+ type: object
+ description: |
+ The runtime field definition object.
+
+ You can update following fields:
+
+ - `type`
+ - `script`
+ examples:
+ updateRuntimeFieldRequest:
+ $ref: '#/components/examples/update_runtime_field_request'
+ responses:
+ '200':
+ description: Indicates a successful call.
+ '400':
+ description: Bad request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/400_response'
+ /api/data_views/default:
+ get:
+ summary: Retrieves the default data view identifier.
+ operationId: getDefaultDataView
+ description: |
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+ tags:
+ - data views
+ responses:
+ '200':
+ description: Indicates a successful call.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ data_view_id:
+ type: string
+ examples:
+ getDefaultDataViewResponse:
+ $ref: '#/components/examples/get_default_data_view_response'
+ '400':
+ description: Bad request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/400_response'
+ post:
+ summary: Sets the default data view identifier.
+ operationId: setDefaultDatailView
+ description: |
+ This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
+ tags:
+ - data views
+ parameters:
+ - $ref: '#/components/parameters/kbn_xsrf'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: object
+ required:
+ - data_view_id
+ properties:
+ data_view_id:
+ type:
+ - string
+ - 'null'
+ description: |
+ The data view identifier. NOTE: The API does not validate whether it is a valid identifier. Use `null` to unset the default data view.
+ force:
+ type: boolean
+ description: Update an existing default data view identifier.
+ default: false
+ examples:
+ setDefaultDataViewRequest:
+ $ref: '#/components/examples/set_default_data_view_request'
+ responses:
+ '200':
+ description: Indicates a successful call.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ acknowledged:
+ type: boolean
+ '400':
+ description: Bad request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/400_response'
+components:
+ securitySchemes:
+ basicAuth:
+ type: http
+ scheme: basic
+ apiKeyAuth:
+ type: apiKey
+ in: header
+ name: ApiKey
+ examples:
+ get_data_views_response:
+ summary: The get all data views API returns a list of data views.
+ value:
+ data_view:
+ - id: ff959d40-b880-11e8-a6d9-e546fe2bba5f
+ namespaces:
+ - default
+ title: kibana_sample_data_ecommerce
+ typeMeta: {}
+ name: Kibana Sample Data eCommerce
+ - id: d3d7af60-4c81-11e8-b3d7-01146121b73d
+ namespaces:
+ - default
+ title: kibana_sample_data_flights
+ name: Kibana Sample Data Flights
+ - id: 90943e30-9a47-11e8-b64d-95841ca0b247
+ namespaces:
+ - default
+ title: kibana_sample_data_logs
+ name: Kibana Sample Data Logs
+ create_data_view_request:
+ summary: Create a data view with runtime fields.
+ value:
+ data_view:
+ title: logstash-*
+ name: My Logstash data view
+ runtimeFieldMap:
+ runtime_shape_name:
+ type: keyword
+ script:
+ source: emit(doc['shape_name'].value)
+ get_data_view_response:
+ summary: The get data view API returns a JSON object that contains information about the data view.
+ value:
+ data_view:
+ id: ff959d40-b880-11e8-a6d9-e546fe2bba5f
+ version: WzUsMV0=
+ title: kibana_sample_data_ecommerce
+ timeFieldName: order_date
+ sourceFilters: []
+ fields:
+ _id:
+ count: 0
+ name: _id
+ type: string
+ esTypes:
+ - _id
+ scripted: false
+ searchable: true
+ aggregatable: false
+ readFromDocValues: false
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ _index:
+ count: 0
+ name: _index
+ type: string
+ esTypes:
+ - _index
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: false
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ _score:
+ count: 0
+ name: _score
+ type: number
+ scripted: false
+ searchable: false
+ aggregatable: false
+ readFromDocValues: false
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ _source:
+ count: 0
+ name: _source
+ type: _source
+ esTypes:
+ - _source
+ scripted: false
+ searchable: false
+ aggregatable: false
+ readFromDocValues: false
+ format:
+ id: _source
+ shortDotsEnable: false
+ isMapped: true
+ category:
+ count: 0
+ name: category
+ type: string
+ esTypes:
+ - text
+ scripted: false
+ searchable: true
+ aggregatable: false
+ readFromDocValues: false
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ category.keyword:
+ count: 0
+ name: category.keyword
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ subType:
+ multi:
+ parent: category
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ currency:
+ count: 0
+ name: currency
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ customer_birth_date:
+ count: 0
+ name: customer_birth_date
+ type: date
+ esTypes:
+ - date
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: date
+ shortDotsEnable: false
+ isMapped: true
+ customer_first_name:
+ count: 0
+ name: customer_first_name
+ type: string
+ esTypes:
+ - text
+ scripted: false
+ searchable: true
+ aggregatable: false
+ readFromDocValues: false
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ customer_first_name.keyword:
+ count: 0
+ name: customer_first_name.keyword
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ subType:
+ multi:
+ parent: customer_first_name
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ customer_full_name:
+ count: 0
+ name: customer_full_name
+ type: string
+ esTypes:
+ - text
+ scripted: false
+ searchable: true
+ aggregatable: false
+ readFromDocValues: false
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ customer_full_name.keyword:
+ count: 0
+ name: customer_full_name.keyword
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ subType:
+ multi:
+ parent: customer_full_name
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ customer_gender:
+ count: 0
+ name: customer_gender
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ customer_id:
+ count: 0
+ name: customer_id
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ customer_last_name:
+ count: 0
+ name: customer_last_name
+ type: string
+ esTypes:
+ - text
+ scripted: false
+ searchable: true
+ aggregatable: false
+ readFromDocValues: false
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ customer_last_name.keyword:
+ count: 0
+ name: customer_last_name.keyword
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ subType:
+ multi:
+ parent: customer_last_name
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ customer_phone:
+ count: 0
+ name: customer_phone
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ day_of_week:
+ count: 0
+ name: day_of_week
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ day_of_week_i:
+ count: 0
+ name: day_of_week_i
+ type: number
+ esTypes:
+ - integer
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ email:
+ count: 0
+ name: email
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ event.dataset:
+ count: 0
+ name: event.dataset
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ geoip.city_name:
+ count: 0
+ name: geoip.city_name
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ geoip.continent_name:
+ count: 0
+ name: geoip.continent_name
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ geoip.country_iso_code:
+ count: 0
+ name: geoip.country_iso_code
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ geoip.location:
+ count: 0
+ name: geoip.location
+ type: geo_point
+ esTypes:
+ - geo_point
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: geo_point
+ params:
+ transform: wkt
+ shortDotsEnable: false
+ isMapped: true
+ geoip.region_name:
+ count: 0
+ name: geoip.region_name
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ manufacturer:
+ count: 0
+ name: manufacturer
+ type: string
+ esTypes:
+ - text
+ scripted: false
+ searchable: true
+ aggregatable: false
+ readFromDocValues: false
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ manufacturer.keyword:
+ count: 0
+ name: manufacturer.keyword
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ subType:
+ multi:
+ parent: manufacturer
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ order_date:
+ count: 0
+ name: order_date
+ type: date
+ esTypes:
+ - date
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: date
+ shortDotsEnable: false
+ isMapped: true
+ order_id:
+ count: 0
+ name: order_id
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ products._id:
+ count: 0
+ name: products._id
+ type: string
+ esTypes:
+ - text
+ scripted: false
+ searchable: true
+ aggregatable: false
+ readFromDocValues: false
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ products._id.keyword:
+ count: 0
+ name: products._id.keyword
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ subType:
+ multi:
+ parent: products._id
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ products.base_price:
+ count: 0
+ name: products.base_price
+ type: number
+ esTypes:
+ - half_float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ params:
+ pattern: $0,0.00
+ shortDotsEnable: false
+ isMapped: true
+ products.base_unit_price:
+ count: 0
+ name: products.base_unit_price
+ type: number
+ esTypes:
+ - half_float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ params:
+ pattern: $0,0.00
+ shortDotsEnable: false
+ isMapped: true
+ products.category:
+ count: 0
+ name: products.category
+ type: string
+ esTypes:
+ - text
+ scripted: false
+ searchable: true
+ aggregatable: false
+ readFromDocValues: false
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ products.category.keyword:
+ count: 0
+ name: products.category.keyword
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ subType:
+ multi:
+ parent: products.category
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ products.created_on:
+ count: 0
+ name: products.created_on
+ type: date
+ esTypes:
+ - date
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: date
+ shortDotsEnable: false
+ isMapped: true
+ products.discount_amount:
+ count: 0
+ name: products.discount_amount
+ type: number
+ esTypes:
+ - half_float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ products.discount_percentage:
+ count: 0
+ name: products.discount_percentage
+ type: number
+ esTypes:
+ - half_float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ products.manufacturer:
+ count: 1
+ name: products.manufacturer
+ type: string
+ esTypes:
+ - text
+ scripted: false
+ searchable: true
+ aggregatable: false
+ readFromDocValues: false
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ products.manufacturer.keyword:
+ count: 0
+ name: products.manufacturer.keyword
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ subType:
+ multi:
+ parent: products.manufacturer
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ products.min_price:
+ count: 0
+ name: products.min_price
+ type: number
+ esTypes:
+ - half_float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ params:
+ pattern: $0,0.00
+ shortDotsEnable: false
+ isMapped: true
+ products.price:
+ count: 1
+ name: products.price
+ type: number
+ esTypes:
+ - half_float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ params:
+ pattern: $0,0.00
+ shortDotsEnable: false
+ isMapped: true
+ products.product_id:
+ count: 0
+ name: products.product_id
+ type: number
+ esTypes:
+ - long
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ products.product_name:
+ count: 1
+ name: products.product_name
+ type: string
+ esTypes:
+ - text
+ scripted: false
+ searchable: true
+ aggregatable: false
+ readFromDocValues: false
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ products.product_name.keyword:
+ count: 0
+ name: products.product_name.keyword
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ subType:
+ multi:
+ parent: products.product_name
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ products.quantity:
+ count: 0
+ name: products.quantity
+ type: number
+ esTypes:
+ - integer
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ products.sku:
+ count: 0
+ name: products.sku
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ products.tax_amount:
+ count: 0
+ name: products.tax_amount
+ type: number
+ esTypes:
+ - half_float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ products.taxful_price:
+ count: 0
+ name: products.taxful_price
+ type: number
+ esTypes:
+ - half_float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ params:
+ pattern: $0,0.00
+ shortDotsEnable: false
+ isMapped: true
+ products.taxless_price:
+ count: 0
+ name: products.taxless_price
+ type: number
+ esTypes:
+ - half_float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ params:
+ pattern: $0,0.00
+ shortDotsEnable: false
+ isMapped: true
+ products.unit_discount_amount:
+ count: 0
+ name: products.unit_discount_amount
+ type: number
+ esTypes:
+ - half_float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ sku:
+ count: 0
+ name: sku
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ taxful_total_price:
+ count: 0
+ name: taxful_total_price
+ type: number
+ esTypes:
+ - half_float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ params:
+ pattern: $0,0.[00]
+ shortDotsEnable: false
+ isMapped: true
+ taxless_total_price:
+ count: 0
+ name: taxless_total_price
+ type: number
+ esTypes:
+ - half_float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ params:
+ pattern: $0,0.00
+ shortDotsEnable: false
+ isMapped: true
+ total_quantity:
+ count: 1
+ name: total_quantity
+ type: number
+ esTypes:
+ - integer
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ total_unique_products:
+ count: 0
+ name: total_unique_products
+ type: number
+ esTypes:
+ - integer
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ type:
+ count: 0
+ name: type
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ user:
+ count: 0
+ name: user
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ typeMeta: {}
+ fieldFormats:
+ taxful_total_price:
+ id: number
+ params:
+ pattern: $0,0.[00]
+ products.price:
+ id: number
+ params:
+ pattern: $0,0.00
+ taxless_total_price:
+ id: number
+ params:
+ pattern: $0,0.00
+ products.taxless_price:
+ id: number
+ params:
+ pattern: $0,0.00
+ products.taxful_price:
+ id: number
+ params:
+ pattern: $0,0.00
+ products.min_price:
+ id: number
+ params:
+ pattern: $0,0.00
+ products.base_unit_price:
+ id: number
+ params:
+ pattern: $0,0.00
+ products.base_price:
+ id: number
+ params:
+ pattern: $0,0.00
+ runtimeFieldMap: {}
+ fieldAttrs:
+ products.manufacturer:
+ count: 1
+ products.price:
+ count: 1
+ products.product_name:
+ count: 1
+ total_quantity:
+ count: 1
+ allowNoIndex: false
+ name: Kibana Sample Data eCommerce
+ namespaces:
+ - default
+ update_data_view_request:
+ summary: Update some properties for a data view.
+ value:
+ data_view:
+ title: kibana_sample_data_ecommerce
+ timeFieldName: order_date
+ allowNoIndex: false
+ name: Kibana Sample Data eCommerce
+ refresh_fields: true
+ update_field_metadata_request:
+ summary: Set popularity count for field foo.
+ value:
+ fields:
+ foo:
+ count: 123
+ create_runtime_field_request:
+ summary: Create a runtime field.
+ value:
+ name: runtimeFoo
+ runtimeField:
+ type: long
+ script:
+ source: emit(doc["foo"].value)
+ create_runtime_field_response:
+ summary: The API returns created runtime field object array and updated data view object.
+ value:
+ data_view:
+ ...: null
+ fields:
+ - ...
+ get_runtime_field_response:
+ summary: The get runtime field API returns a JSON object that contains information about the runtime field (`hour_of_day`) and the data view (`d3d7af60-4c81-11e8-b3d7-01146121b73d`).
+ value:
+ fields:
+ - count: 0
+ name: hour_of_day
+ type: number
+ esTypes:
+ - long
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: false
+ shortDotsEnable: false
+ runtimeField:
+ type: long
+ script:
+ source: emit(doc['timestamp'].value.getHour());
+ data_view:
+ id: d3d7af60-4c81-11e8-b3d7-01146121b73d
+ version: WzM2LDJd
+ title: kibana_sample_data_flights
+ timeFieldName: timestamp
+ sourceFilters: []
+ fields:
+ hour_of_day:
+ count: 0
+ name: hour_of_day
+ type: number
+ esTypes:
+ - long
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: false
+ format:
+ id: number
+ params:
+ pattern: '00'
+ shortDotsEnable: false
+ runtimeField:
+ type: long
+ script:
+ source: emit(doc['timestamp'].value.getHour());
+ AvgTicketPrice:
+ count: 0
+ name: AvgTicketPrice
+ type: number
+ esTypes:
+ - float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ params:
+ pattern: $0,0.[00]
+ shortDotsEnable: false
+ isMapped: true
+ Cancelled:
+ count: 0
+ name: Cancelled
+ type: boolean
+ esTypes:
+ - boolean
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: boolean
+ shortDotsEnable: false
+ isMapped: true
+ Carrier:
+ count: 0
+ name: Carrier
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ Dest:
+ count: 0
+ name: Dest
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ DestAirportID:
+ count: 0
+ name: DestAirportID
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ DestCityName:
+ count: 0
+ name: DestCityName
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ DestCountry:
+ count: 0
+ name: DestCountry
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ DestLocation:
+ count: 0
+ name: DestLocation
+ type: geo_point
+ esTypes:
+ - geo_point
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: geo_point
+ params:
+ transform: wkt
+ shortDotsEnable: false
+ isMapped: true
+ DestRegion:
+ count: 0
+ name: DestRegion
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ DestWeather:
+ count: 0
+ name: DestWeather
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ DistanceKilometers:
+ count: 0
+ name: DistanceKilometers
+ type: number
+ esTypes:
+ - float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ DistanceMiles:
+ count: 0
+ name: DistanceMiles
+ type: number
+ esTypes:
+ - float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ FlightDelay:
+ count: 0
+ name: FlightDelay
+ type: boolean
+ esTypes:
+ - boolean
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: boolean
+ shortDotsEnable: false
+ isMapped: true
+ FlightDelayMin:
+ count: 0
+ name: FlightDelayMin
+ type: number
+ esTypes:
+ - integer
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ FlightDelayType:
+ count: 0
+ name: FlightDelayType
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ FlightNum:
+ count: 0
+ name: FlightNum
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ FlightTimeHour:
+ count: 0
+ name: FlightTimeHour
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ FlightTimeMin:
+ count: 0
+ name: FlightTimeMin
+ type: number
+ esTypes:
+ - float
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ Origin:
+ count: 0
+ name: Origin
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ OriginAirportID:
+ count: 0
+ name: OriginAirportID
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ OriginCityName:
+ count: 0
+ name: OriginCityName
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ OriginCountry:
+ count: 0
+ name: OriginCountry
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ OriginLocation:
+ count: 0
+ name: OriginLocation
+ type: geo_point
+ esTypes:
+ - geo_point
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: geo_point
+ params:
+ transform: wkt
+ shortDotsEnable: false
+ isMapped: true
+ OriginRegion:
+ count: 0
+ name: OriginRegion
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ OriginWeather:
+ count: 0
+ name: OriginWeather
+ type: string
+ esTypes:
+ - keyword
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ _id:
+ count: 0
+ name: _id
+ type: string
+ esTypes:
+ - _id
+ scripted: false
+ searchable: true
+ aggregatable: false
+ readFromDocValues: false
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ _index:
+ count: 0
+ name: _index
+ type: string
+ esTypes:
+ - _index
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: false
+ format:
+ id: string
+ shortDotsEnable: false
+ isMapped: true
+ _score:
+ count: 0
+ name: _score
+ type: number
+ scripted: false
+ searchable: false
+ aggregatable: false
+ readFromDocValues: false
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ _source:
+ count: 0
+ name: _source
+ type: _source
+ esTypes:
+ - _source
+ scripted: false
+ searchable: false
+ aggregatable: false
+ readFromDocValues: false
+ format:
+ id: _source
+ shortDotsEnable: false
+ isMapped: true
+ dayOfWeek:
+ count: 0
+ name: dayOfWeek
+ type: number
+ esTypes:
+ - integer
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: number
+ shortDotsEnable: false
+ isMapped: true
+ timestamp:
+ count: 0
+ name: timestamp
+ type: date
+ esTypes:
+ - date
+ scripted: false
+ searchable: true
+ aggregatable: true
+ readFromDocValues: true
+ format:
+ id: date
+ shortDotsEnable: false
+ isMapped: true
+ fieldFormats:
+ hour_of_day:
+ id: number
+ params:
+ pattern: '00'
+ AvgTicketPrice:
+ id: number
+ params:
+ pattern: $0,0.[00]
+ runtimeFieldMap:
+ hour_of_day:
+ type: long
+ script:
+ source: emit(doc['timestamp'].value.getHour());
+ fieldAttrs: {}
+ allowNoIndex: false
+ name: Kibana Sample Data Flights
+ update_runtime_field_request:
+ summary: Update an existing runtime field on a data view.
+ value:
+ runtimeField:
+ script:
+ source: emit(doc["bar"].value)
+ get_default_data_view_response:
+ summary: The get default data view API returns the default data view identifier.
+ value:
+ data_view_id: ff959d40-b880-11e8-a6d9-e546fe2bba5f
+ set_default_data_view_request:
+ summary: Set the default data view identifier.
+ value:
+ data_view_id: ff959d40-b880-11e8-a6d9-e546fe2bba5f
+ force: true
+ schemas:
+ 400_response:
+ title: Bad request
+ type: object
+ required:
+ - statusCode
+ - error
+ - message
+ properties:
+ statusCode:
+ type: number
+ example: 400
+ error:
+ type: string
+ example: Bad Request
+ message:
+ type: string
+ allownoindex:
+ type: boolean
+ description: Allows the data view saved object to exist before the data is available.
+ fieldattrs:
+ type: object
+ description: A map of field attributes by field name.
+ fieldformats:
+ type: object
+ description: A map of field formats by field name.
+ namespaces:
+ type: array
+ description: An array of space identifiers for sharing the data view between multiple spaces.
+ items:
+ type: string
+ default: default
+ runtimefieldmap:
+ type: object
+ description: A map of runtime field definitions by field name.
+ sourcefilters:
+ type: array
+ description: The array of field names you want to filter out in Discover.
+ items:
+ type: object
+ required:
+ - value
+ properties:
+ value:
+ type: string
+ timefieldname:
+ type: string
+ description: The timestamp field name, which you use for time-based data views.
+ title:
+ type: string
+ description: Comma-separated list of data streams, indices, and aliases that you want to search. Supports wildcards (`*`).
+ type:
+ type: string
+ description: When set to `rollup`, identifies the rollup data views.
+ typemeta:
+ type: object
+ description: When you use rollup indices, contains the field list for the rollup data view API endpoints.
+ create_data_view_request_object:
+ title: Create data view request
+ type: object
+ required:
+ - data_view
+ properties:
+ data_view:
+ type: object
+ required:
+ - title
+ description: The data view object.
+ properties:
+ allowNoIndex:
+ $ref: '#/components/schemas/allownoindex'
+ fieldAttrs:
+ $ref: '#/components/schemas/fieldattrs'
+ fieldFormats:
+ $ref: '#/components/schemas/fieldformats'
+ fields:
+ type: object
+ id:
+ type: string
+ name:
+ type: string
+ description: The data view name.
+ namespaces:
+ $ref: '#/components/schemas/namespaces'
+ runtimeFieldMap:
+ $ref: '#/components/schemas/runtimefieldmap'
+ sourceFilters:
+ $ref: '#/components/schemas/sourcefilters'
+ timeFieldName:
+ $ref: '#/components/schemas/timefieldname'
+ title:
+ $ref: '#/components/schemas/title'
+ type:
+ $ref: '#/components/schemas/type'
+ typeMeta:
+ $ref: '#/components/schemas/typemeta'
+ version:
+ type: string
+ override:
+ type: boolean
+ description: Override an existing data view if a data view with the provided title already exists.
+ default: false
+ data_view_response_object:
+ title: Data view response properties
+ type: object
+ properties:
+ data_view:
+ type: object
+ properties:
+ allowNoIndex:
+ $ref: '#/components/schemas/allownoindex'
+ fieldAttrs:
+ $ref: '#/components/schemas/fieldattrs'
+ fieldFormats:
+ $ref: '#/components/schemas/fieldformats'
+ fields:
+ type: object
+ id:
+ type: string
+ example: ff959d40-b880-11e8-a6d9-e546fe2bba5f
+ name:
+ type: string
+ description: The data view name.
+ namespaces:
+ $ref: '#/components/schemas/namespaces'
+ runtimeFieldMap:
+ $ref: '#/components/schemas/runtimefieldmap'
+ sourceFilters:
+ $ref: '#/components/schemas/sourcefilters'
+ timeFieldName:
+ $ref: '#/components/schemas/timefieldname'
+ title:
+ $ref: '#/components/schemas/title'
+ typeMeta:
+ $ref: '#/components/schemas/typemeta'
+ version:
+ type: string
+ example: WzQ2LDJd
+ 404_response:
+ type: object
+ properties:
+ error:
+ type: string
+ example: Not Found
+ enum:
+ - Not Found
+ message:
+ type: string
+ example: Saved object [index-pattern/caaad6d0-920c-11ed-b36a-874bd1548a00] not found
+ statusCode:
+ type: integer
+ example: 404
+ enum:
+ - 404
+ update_data_view_request_object:
+ title: Update data view request
+ type: object
+ required:
+ - data_view
+ properties:
+ data_view:
+ type: object
+ description: |
+ The data view properties you want to update. Only the specified properties are updated in the data view. Unspecified fields stay as they are persisted.
+ properties:
+ allowNoIndex:
+ $ref: '#/components/schemas/allownoindex'
+ fieldFormats:
+ $ref: '#/components/schemas/fieldformats'
+ fields:
+ type: object
+ name:
+ type: string
+ runtimeFieldMap:
+ $ref: '#/components/schemas/runtimefieldmap'
+ sourceFilters:
+ $ref: '#/components/schemas/sourcefilters'
+ timeFieldName:
+ $ref: '#/components/schemas/timefieldname'
+ title:
+ $ref: '#/components/schemas/title'
+ type:
+ $ref: '#/components/schemas/type'
+ typeMeta:
+ $ref: '#/components/schemas/typemeta'
+ refresh_fields:
+ type: boolean
+ description: Reloads the data view fields after the data view is updated.
+ default: false
+ parameters:
+ kbn_xsrf:
+ schema:
+ type: string
+ in: header
+ name: kbn-xsrf
+ description: Cross-site request forgery protection
+ required: true
+ view_id:
+ in: path
+ name: viewId
+ description: An identifier for the data view.
+ required: true
+ schema:
+ type: string
+ example: ff959d40-b880-11e8-a6d9-e546fe2bba5f
+ field_name:
+ in: path
+ name: fieldName
+ description: The name of the runtime field.
+ required: true
+ schema:
+ type: string
+ example: hour_of_day
diff --git a/generated/data_views/client.go b/generated/data_views/client.go
new file mode 100644
index 000000000..bd364336b
--- /dev/null
+++ b/generated/data_views/client.go
@@ -0,0 +1,666 @@
+/*
+Data views
+
+OpenAPI schema for data view endpoints
+
+API version: 0.1
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package data_views
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "encoding/xml"
+ "errors"
+ "fmt"
+ "io"
+ "log"
+ "mime/multipart"
+ "net/http"
+ "net/http/httputil"
+ "net/url"
+ "os"
+ "path/filepath"
+ "reflect"
+ "regexp"
+ "strconv"
+ "strings"
+ "time"
+ "unicode/utf8"
+)
+
+var (
+ jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`)
+ xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`)
+ queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`)
+ queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]")
+)
+
+// APIClient manages communication with the Data views API v0.1
+// In most cases there should be only one, shared, APIClient.
+type APIClient struct {
+ cfg *Configuration
+ common service // Reuse a single struct instead of allocating one for each service on the heap.
+
+ // API Services
+
+ DataViewsAPI DataViewsAPI
+}
+
+type service struct {
+ client *APIClient
+}
+
+// NewAPIClient creates a new API client. Requires a userAgent string describing your application.
+// optionally a custom http.Client to allow for advanced features such as caching.
+func NewAPIClient(cfg *Configuration) *APIClient {
+ if cfg.HTTPClient == nil {
+ cfg.HTTPClient = http.DefaultClient
+ }
+
+ c := &APIClient{}
+ c.cfg = cfg
+ c.common.client = c
+
+ // API Services
+ c.DataViewsAPI = (*DataViewsAPIService)(&c.common)
+
+ return c
+}
+
+func atoi(in string) (int, error) {
+ return strconv.Atoi(in)
+}
+
+// selectHeaderContentType select a content type from the available list.
+func selectHeaderContentType(contentTypes []string) string {
+ if len(contentTypes) == 0 {
+ return ""
+ }
+ if contains(contentTypes, "application/json") {
+ return "application/json"
+ }
+ return contentTypes[0] // use the first content type specified in 'consumes'
+}
+
+// selectHeaderAccept join all accept types and return
+func selectHeaderAccept(accepts []string) string {
+ if len(accepts) == 0 {
+ return ""
+ }
+
+ if contains(accepts, "application/json") {
+ return "application/json"
+ }
+
+ return strings.Join(accepts, ",")
+}
+
+// contains is a case insensitive match, finding needle in a haystack
+func contains(haystack []string, needle string) bool {
+ for _, a := range haystack {
+ if strings.EqualFold(a, needle) {
+ return true
+ }
+ }
+ return false
+}
+
+// Verify optional parameters are of the correct type.
+func typeCheckParameter(obj interface{}, expected string, name string) error {
+ // Make sure there is an object.
+ if obj == nil {
+ return nil
+ }
+
+ // Check the type is as expected.
+ if reflect.TypeOf(obj).String() != expected {
+ return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String())
+ }
+ return nil
+}
+
+func parameterValueToString(obj interface{}, key string) string {
+ if reflect.TypeOf(obj).Kind() != reflect.Ptr {
+ return fmt.Sprintf("%v", obj)
+ }
+ var param, ok = obj.(MappedNullable)
+ if !ok {
+ return ""
+ }
+ dataMap, err := param.ToMap()
+ if err != nil {
+ return ""
+ }
+ return fmt.Sprintf("%v", dataMap[key])
+}
+
+// parameterAddToHeaderOrQuery adds the provided object to the request header or url query
+// supporting deep object syntax
+func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) {
+ var v = reflect.ValueOf(obj)
+ var value = ""
+ if v == reflect.ValueOf(nil) {
+ value = "null"
+ } else {
+ switch v.Kind() {
+ case reflect.Invalid:
+ value = "invalid"
+
+ case reflect.Struct:
+ if t, ok := obj.(MappedNullable); ok {
+ dataMap, err := t.ToMap()
+ if err != nil {
+ return
+ }
+ parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType)
+ return
+ }
+ if t, ok := obj.(time.Time); ok {
+ parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType)
+ return
+ }
+ value = v.Type().String() + " value"
+ case reflect.Slice:
+ var indValue = reflect.ValueOf(obj)
+ if indValue == reflect.ValueOf(nil) {
+ return
+ }
+ var lenIndValue = indValue.Len()
+ for i := 0; i < lenIndValue; i++ {
+ var arrayValue = indValue.Index(i)
+ parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, arrayValue.Interface(), collectionType)
+ }
+ return
+
+ case reflect.Map:
+ var indValue = reflect.ValueOf(obj)
+ if indValue == reflect.ValueOf(nil) {
+ return
+ }
+ iter := indValue.MapRange()
+ for iter.Next() {
+ k, v := iter.Key(), iter.Value()
+ parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), collectionType)
+ }
+ return
+
+ case reflect.Interface:
+ fallthrough
+ case reflect.Ptr:
+ parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), collectionType)
+ return
+
+ case reflect.Int, reflect.Int8, reflect.Int16,
+ reflect.Int32, reflect.Int64:
+ value = strconv.FormatInt(v.Int(), 10)
+ case reflect.Uint, reflect.Uint8, reflect.Uint16,
+ reflect.Uint32, reflect.Uint64, reflect.Uintptr:
+ value = strconv.FormatUint(v.Uint(), 10)
+ case reflect.Float32, reflect.Float64:
+ value = strconv.FormatFloat(v.Float(), 'g', -1, 32)
+ case reflect.Bool:
+ value = strconv.FormatBool(v.Bool())
+ case reflect.String:
+ value = v.String()
+ default:
+ value = v.Type().String() + " value"
+ }
+ }
+
+ switch valuesMap := headerOrQueryParams.(type) {
+ case url.Values:
+ if collectionType == "csv" && valuesMap.Get(keyPrefix) != "" {
+ valuesMap.Set(keyPrefix, valuesMap.Get(keyPrefix)+","+value)
+ } else {
+ valuesMap.Add(keyPrefix, value)
+ }
+ break
+ case map[string]string:
+ valuesMap[keyPrefix] = value
+ break
+ }
+}
+
+// helper for converting interface{} parameters to json strings
+func parameterToJson(obj interface{}) (string, error) {
+ jsonBuf, err := json.Marshal(obj)
+ if err != nil {
+ return "", err
+ }
+ return string(jsonBuf), err
+}
+
+// callAPI do the request.
+func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
+ if c.cfg.Debug {
+ dump, err := httputil.DumpRequestOut(request, true)
+ if err != nil {
+ return nil, err
+ }
+ log.Printf("\n%s\n", string(dump))
+ }
+
+ resp, err := c.cfg.HTTPClient.Do(request)
+ if err != nil {
+ return resp, err
+ }
+
+ if c.cfg.Debug {
+ dump, err := httputil.DumpResponse(resp, true)
+ if err != nil {
+ return resp, err
+ }
+ log.Printf("\n%s\n", string(dump))
+ }
+ return resp, err
+}
+
+// Allow modification of underlying config for alternate implementations and testing
+// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior
+func (c *APIClient) GetConfig() *Configuration {
+ return c.cfg
+}
+
+type formFile struct {
+ fileBytes []byte
+ fileName string
+ formFileName string
+}
+
+// prepareRequest build the request
+func (c *APIClient) prepareRequest(
+ ctx context.Context,
+ path string, method string,
+ postBody interface{},
+ headerParams map[string]string,
+ queryParams url.Values,
+ formParams url.Values,
+ formFiles []formFile) (localVarRequest *http.Request, err error) {
+
+ var body *bytes.Buffer
+
+ // Detect postBody type and post.
+ if postBody != nil {
+ contentType := headerParams["Content-Type"]
+ if contentType == "" {
+ contentType = detectContentType(postBody)
+ headerParams["Content-Type"] = contentType
+ }
+
+ body, err = setBody(postBody, contentType)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ // add form parameters and file if available.
+ if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(formFiles) > 0) {
+ if body != nil {
+ return nil, errors.New("Cannot specify postBody and multipart form at the same time.")
+ }
+ body = &bytes.Buffer{}
+ w := multipart.NewWriter(body)
+
+ for k, v := range formParams {
+ for _, iv := range v {
+ if strings.HasPrefix(k, "@") { // file
+ err = addFile(w, k[1:], iv)
+ if err != nil {
+ return nil, err
+ }
+ } else { // form value
+ w.WriteField(k, iv)
+ }
+ }
+ }
+ for _, formFile := range formFiles {
+ if len(formFile.fileBytes) > 0 && formFile.fileName != "" {
+ w.Boundary()
+ part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName))
+ if err != nil {
+ return nil, err
+ }
+ _, err = part.Write(formFile.fileBytes)
+ if err != nil {
+ return nil, err
+ }
+ }
+ }
+
+ // Set the Boundary in the Content-Type
+ headerParams["Content-Type"] = w.FormDataContentType()
+
+ // Set Content-Length
+ headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len())
+ w.Close()
+ }
+
+ if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 {
+ if body != nil {
+ return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.")
+ }
+ body = &bytes.Buffer{}
+ body.WriteString(formParams.Encode())
+ // Set Content-Length
+ headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len())
+ }
+
+ // Setup path and query parameters
+ url, err := url.Parse(path)
+ if err != nil {
+ return nil, err
+ }
+
+ // Override request host, if applicable
+ if c.cfg.Host != "" {
+ url.Host = c.cfg.Host
+ }
+
+ // Override request scheme, if applicable
+ if c.cfg.Scheme != "" {
+ url.Scheme = c.cfg.Scheme
+ }
+
+ // Adding Query Param
+ query := url.Query()
+ for k, v := range queryParams {
+ for _, iv := range v {
+ query.Add(k, iv)
+ }
+ }
+
+ // Encode the parameters.
+ url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string {
+ pieces := strings.Split(s, "=")
+ pieces[0] = queryDescape.Replace(pieces[0])
+ return strings.Join(pieces, "=")
+ })
+
+ // Generate a new request
+ if body != nil {
+ localVarRequest, err = http.NewRequest(method, url.String(), body)
+ } else {
+ localVarRequest, err = http.NewRequest(method, url.String(), nil)
+ }
+ if err != nil {
+ return nil, err
+ }
+
+ // add header parameters, if any
+ if len(headerParams) > 0 {
+ headers := http.Header{}
+ for h, v := range headerParams {
+ headers[h] = []string{v}
+ }
+ localVarRequest.Header = headers
+ }
+
+ // Add the user agent to the request.
+ localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent)
+
+ if ctx != nil {
+ // add context to the request
+ localVarRequest = localVarRequest.WithContext(ctx)
+
+ // Walk through any authentication.
+
+ // Basic HTTP Authentication
+ if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok {
+ localVarRequest.SetBasicAuth(auth.UserName, auth.Password)
+ }
+
+ }
+
+ for header, value := range c.cfg.DefaultHeader {
+ localVarRequest.Header.Add(header, value)
+ }
+ return localVarRequest, nil
+}
+
+func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) {
+ if len(b) == 0 {
+ return nil
+ }
+ if s, ok := v.(*string); ok {
+ *s = string(b)
+ return nil
+ }
+ if f, ok := v.(*os.File); ok {
+ f, err = os.CreateTemp("", "HttpClientFile")
+ if err != nil {
+ return
+ }
+ _, err = f.Write(b)
+ if err != nil {
+ return
+ }
+ _, err = f.Seek(0, io.SeekStart)
+ err = os.Remove(f.Name())
+ return
+ }
+ if f, ok := v.(**os.File); ok {
+ *f, err = os.CreateTemp("", "HttpClientFile")
+ if err != nil {
+ return
+ }
+ _, err = (*f).Write(b)
+ if err != nil {
+ return
+ }
+ _, err = (*f).Seek(0, io.SeekStart)
+ err = os.Remove((*f).Name())
+ return
+ }
+ if xmlCheck.MatchString(contentType) {
+ if err = xml.Unmarshal(b, v); err != nil {
+ return err
+ }
+ return nil
+ }
+ if jsonCheck.MatchString(contentType) {
+ if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas
+ if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined
+ if err = unmarshalObj.UnmarshalJSON(b); err != nil {
+ return err
+ }
+ } else {
+ return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined")
+ }
+ } else if err = json.Unmarshal(b, v); err != nil { // simple model
+ return err
+ }
+ return nil
+ }
+ return errors.New("undefined response type")
+}
+
+// Add a file to the multipart request
+func addFile(w *multipart.Writer, fieldName, path string) error {
+ file, err := os.Open(filepath.Clean(path))
+ if err != nil {
+ return err
+ }
+ err = file.Close()
+ if err != nil {
+ return err
+ }
+
+ part, err := w.CreateFormFile(fieldName, filepath.Base(path))
+ if err != nil {
+ return err
+ }
+ _, err = io.Copy(part, file)
+
+ return err
+}
+
+// Prevent trying to import "fmt"
+func reportError(format string, a ...interface{}) error {
+ return fmt.Errorf(format, a...)
+}
+
+// A wrapper for strict JSON decoding
+func newStrictDecoder(data []byte) *json.Decoder {
+ dec := json.NewDecoder(bytes.NewBuffer(data))
+ dec.DisallowUnknownFields()
+ return dec
+}
+
+// Set request body from an interface{}
+func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) {
+ if bodyBuf == nil {
+ bodyBuf = &bytes.Buffer{}
+ }
+
+ if reader, ok := body.(io.Reader); ok {
+ _, err = bodyBuf.ReadFrom(reader)
+ } else if fp, ok := body.(*os.File); ok {
+ _, err = bodyBuf.ReadFrom(fp)
+ } else if b, ok := body.([]byte); ok {
+ _, err = bodyBuf.Write(b)
+ } else if s, ok := body.(string); ok {
+ _, err = bodyBuf.WriteString(s)
+ } else if s, ok := body.(*string); ok {
+ _, err = bodyBuf.WriteString(*s)
+ } else if jsonCheck.MatchString(contentType) {
+ err = json.NewEncoder(bodyBuf).Encode(body)
+ } else if xmlCheck.MatchString(contentType) {
+ var bs []byte
+ bs, err = xml.Marshal(body)
+ if err == nil {
+ bodyBuf.Write(bs)
+ }
+ }
+
+ if err != nil {
+ return nil, err
+ }
+
+ if bodyBuf.Len() == 0 {
+ err = fmt.Errorf("invalid body type %s\n", contentType)
+ return nil, err
+ }
+ return bodyBuf, nil
+}
+
+// detectContentType method is used to figure out `Request.Body` content type for request header
+func detectContentType(body interface{}) string {
+ contentType := "text/plain; charset=utf-8"
+ kind := reflect.TypeOf(body).Kind()
+
+ switch kind {
+ case reflect.Struct, reflect.Map, reflect.Ptr:
+ contentType = "application/json; charset=utf-8"
+ case reflect.String:
+ contentType = "text/plain; charset=utf-8"
+ default:
+ if b, ok := body.([]byte); ok {
+ contentType = http.DetectContentType(b)
+ } else if kind == reflect.Slice {
+ contentType = "application/json; charset=utf-8"
+ }
+ }
+
+ return contentType
+}
+
+// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go
+type cacheControl map[string]string
+
+func parseCacheControl(headers http.Header) cacheControl {
+ cc := cacheControl{}
+ ccHeader := headers.Get("Cache-Control")
+ for _, part := range strings.Split(ccHeader, ",") {
+ part = strings.Trim(part, " ")
+ if part == "" {
+ continue
+ }
+ if strings.ContainsRune(part, '=') {
+ keyval := strings.Split(part, "=")
+ cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",")
+ } else {
+ cc[part] = ""
+ }
+ }
+ return cc
+}
+
+// CacheExpires helper function to determine remaining time before repeating a request.
+func CacheExpires(r *http.Response) time.Time {
+ // Figure out when the cache expires.
+ var expires time.Time
+ now, err := time.Parse(time.RFC1123, r.Header.Get("date"))
+ if err != nil {
+ return time.Now()
+ }
+ respCacheControl := parseCacheControl(r.Header)
+
+ if maxAge, ok := respCacheControl["max-age"]; ok {
+ lifetime, err := time.ParseDuration(maxAge + "s")
+ if err != nil {
+ expires = now
+ } else {
+ expires = now.Add(lifetime)
+ }
+ } else {
+ expiresHeader := r.Header.Get("Expires")
+ if expiresHeader != "" {
+ expires, err = time.Parse(time.RFC1123, expiresHeader)
+ if err != nil {
+ expires = now
+ }
+ }
+ }
+ return expires
+}
+
+func strlen(s string) int {
+ return utf8.RuneCountInString(s)
+}
+
+// GenericOpenAPIError Provides access to the body, error and model on returned errors.
+type GenericOpenAPIError struct {
+ body []byte
+ error string
+ model interface{}
+}
+
+// Error returns non-empty string if there was an error.
+func (e GenericOpenAPIError) Error() string {
+ return e.error
+}
+
+// Body returns the raw bytes of the response
+func (e GenericOpenAPIError) Body() []byte {
+ return e.body
+}
+
+// Model returns the unpacked model of the error
+func (e GenericOpenAPIError) Model() interface{} {
+ return e.model
+}
+
+// format error message using title and detail when model implements rfc7807
+func formatErrorMessage(status string, v interface{}) string {
+ str := ""
+ metaValue := reflect.ValueOf(v).Elem()
+
+ if metaValue.Kind() == reflect.Struct {
+ field := metaValue.FieldByName("Title")
+ if field != (reflect.Value{}) {
+ str = fmt.Sprintf("%s", field.Interface())
+ }
+
+ field = metaValue.FieldByName("Detail")
+ if field != (reflect.Value{}) {
+ str = fmt.Sprintf("%s (%s)", str, field.Interface())
+ }
+ }
+
+ return strings.TrimSpace(fmt.Sprintf("%s %s", status, str))
+}
diff --git a/generated/data_views/configuration.go b/generated/data_views/configuration.go
new file mode 100644
index 000000000..9e7e50bc6
--- /dev/null
+++ b/generated/data_views/configuration.go
@@ -0,0 +1,220 @@
+/*
+Data views
+
+OpenAPI schema for data view endpoints
+
+API version: 0.1
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package data_views
+
+import (
+ "context"
+ "fmt"
+ "net/http"
+ "strings"
+)
+
+// contextKeys are used to identify the type of value in the context.
+// Since these are string, it is possible to get a short description of the
+// context key for logging and debugging using key.String().
+
+type contextKey string
+
+func (c contextKey) String() string {
+ return "auth " + string(c)
+}
+
+var (
+ // ContextBasicAuth takes BasicAuth as authentication for the request.
+ ContextBasicAuth = contextKey("basic")
+
+ // ContextAPIKeys takes a string apikey as authentication for the request
+ ContextAPIKeys = contextKey("apiKeys")
+
+ // ContextServerIndex uses a server configuration from the index.
+ ContextServerIndex = contextKey("serverIndex")
+
+ // ContextOperationServerIndices uses a server configuration from the index mapping.
+ ContextOperationServerIndices = contextKey("serverOperationIndices")
+
+ // ContextServerVariables overrides a server configuration variables.
+ ContextServerVariables = contextKey("serverVariables")
+
+ // ContextOperationServerVariables overrides a server configuration variables using operation specific values.
+ ContextOperationServerVariables = contextKey("serverOperationVariables")
+)
+
+// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
+type BasicAuth struct {
+ UserName string `json:"userName,omitempty"`
+ Password string `json:"password,omitempty"`
+}
+
+// APIKey provides API key based authentication to a request passed via context using ContextAPIKey
+type APIKey struct {
+ Key string
+ Prefix string
+}
+
+// ServerVariable stores the information about a server variable
+type ServerVariable struct {
+ Description string
+ DefaultValue string
+ EnumValues []string
+}
+
+// ServerConfiguration stores the information about a server
+type ServerConfiguration struct {
+ URL string
+ Description string
+ Variables map[string]ServerVariable
+}
+
+// ServerConfigurations stores multiple ServerConfiguration items
+type ServerConfigurations []ServerConfiguration
+
+// Configuration stores the configuration of the API client
+type Configuration struct {
+ Host string `json:"host,omitempty"`
+ Scheme string `json:"scheme,omitempty"`
+ DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
+ UserAgent string `json:"userAgent,omitempty"`
+ Debug bool `json:"debug,omitempty"`
+ Servers ServerConfigurations
+ OperationServers map[string]ServerConfigurations
+ HTTPClient *http.Client
+}
+
+// NewConfiguration returns a new Configuration object
+func NewConfiguration() *Configuration {
+ cfg := &Configuration{
+ DefaultHeader: make(map[string]string),
+ UserAgent: "OpenAPI-Generator/1.0.0/go",
+ Debug: false,
+ Servers: ServerConfigurations{
+ {
+ URL: "",
+ Description: "No description provided",
+ },
+ },
+ OperationServers: map[string]ServerConfigurations{},
+ }
+ return cfg
+}
+
+// AddDefaultHeader adds a new HTTP header to the default header in the request
+func (c *Configuration) AddDefaultHeader(key string, value string) {
+ c.DefaultHeader[key] = value
+}
+
+// URL formats template on a index using given variables
+func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) {
+ if index < 0 || len(sc) <= index {
+ return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1)
+ }
+ server := sc[index]
+ url := server.URL
+
+ // go through variables and replace placeholders
+ for name, variable := range server.Variables {
+ if value, ok := variables[name]; ok {
+ found := bool(len(variable.EnumValues) == 0)
+ for _, enumValue := range variable.EnumValues {
+ if value == enumValue {
+ found = true
+ }
+ }
+ if !found {
+ return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues)
+ }
+ url = strings.Replace(url, "{"+name+"}", value, -1)
+ } else {
+ url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1)
+ }
+ }
+ return url, nil
+}
+
+// ServerURL returns URL based on server settings
+func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) {
+ return c.Servers.URL(index, variables)
+}
+
+func getServerIndex(ctx context.Context) (int, error) {
+ si := ctx.Value(ContextServerIndex)
+ if si != nil {
+ if index, ok := si.(int); ok {
+ return index, nil
+ }
+ return 0, reportError("Invalid type %T should be int", si)
+ }
+ return 0, nil
+}
+
+func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) {
+ osi := ctx.Value(ContextOperationServerIndices)
+ if osi != nil {
+ if operationIndices, ok := osi.(map[string]int); !ok {
+ return 0, reportError("Invalid type %T should be map[string]int", osi)
+ } else {
+ index, ok := operationIndices[endpoint]
+ if ok {
+ return index, nil
+ }
+ }
+ }
+ return getServerIndex(ctx)
+}
+
+func getServerVariables(ctx context.Context) (map[string]string, error) {
+ sv := ctx.Value(ContextServerVariables)
+ if sv != nil {
+ if variables, ok := sv.(map[string]string); ok {
+ return variables, nil
+ }
+ return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv)
+ }
+ return nil, nil
+}
+
+func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) {
+ osv := ctx.Value(ContextOperationServerVariables)
+ if osv != nil {
+ if operationVariables, ok := osv.(map[string]map[string]string); !ok {
+ return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv)
+ } else {
+ variables, ok := operationVariables[endpoint]
+ if ok {
+ return variables, nil
+ }
+ }
+ }
+ return getServerVariables(ctx)
+}
+
+// ServerURLWithContext returns a new server URL given an endpoint
+func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) {
+ sc, ok := c.OperationServers[endpoint]
+ if !ok {
+ sc = c.Servers
+ }
+
+ if ctx == nil {
+ return sc.URL(0, nil)
+ }
+
+ index, err := getServerOperationIndex(ctx, endpoint)
+ if err != nil {
+ return "", err
+ }
+
+ variables, err := getServerOperationVariables(ctx, endpoint)
+ if err != nil {
+ return "", err
+ }
+
+ return sc.URL(index, variables)
+}
diff --git a/generated/data_views/docs/CreateDataViewRequestObject.md b/generated/data_views/docs/CreateDataViewRequestObject.md
new file mode 100644
index 000000000..added5a05
--- /dev/null
+++ b/generated/data_views/docs/CreateDataViewRequestObject.md
@@ -0,0 +1,77 @@
+# CreateDataViewRequestObject
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**DataView** | [**CreateDataViewRequestObjectDataView**](CreateDataViewRequestObjectDataView.md) | |
+**Override** | Pointer to **bool** | Override an existing data view if a data view with the provided title already exists. | [optional] [default to false]
+
+## Methods
+
+### NewCreateDataViewRequestObject
+
+`func NewCreateDataViewRequestObject(dataView CreateDataViewRequestObjectDataView, ) *CreateDataViewRequestObject`
+
+NewCreateDataViewRequestObject instantiates a new CreateDataViewRequestObject object
+This constructor will assign default values to properties that have it defined,
+and makes sure properties required by API are set, but the set of arguments
+will change when the set of required properties is changed
+
+### NewCreateDataViewRequestObjectWithDefaults
+
+`func NewCreateDataViewRequestObjectWithDefaults() *CreateDataViewRequestObject`
+
+NewCreateDataViewRequestObjectWithDefaults instantiates a new CreateDataViewRequestObject object
+This constructor will only assign default values to properties that have it defined,
+but it doesn't guarantee that properties required by API are set
+
+### GetDataView
+
+`func (o *CreateDataViewRequestObject) GetDataView() CreateDataViewRequestObjectDataView`
+
+GetDataView returns the DataView field if non-nil, zero value otherwise.
+
+### GetDataViewOk
+
+`func (o *CreateDataViewRequestObject) GetDataViewOk() (*CreateDataViewRequestObjectDataView, bool)`
+
+GetDataViewOk returns a tuple with the DataView field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetDataView
+
+`func (o *CreateDataViewRequestObject) SetDataView(v CreateDataViewRequestObjectDataView)`
+
+SetDataView sets DataView field to given value.
+
+
+### GetOverride
+
+`func (o *CreateDataViewRequestObject) GetOverride() bool`
+
+GetOverride returns the Override field if non-nil, zero value otherwise.
+
+### GetOverrideOk
+
+`func (o *CreateDataViewRequestObject) GetOverrideOk() (*bool, bool)`
+
+GetOverrideOk returns a tuple with the Override field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetOverride
+
+`func (o *CreateDataViewRequestObject) SetOverride(v bool)`
+
+SetOverride sets Override field to given value.
+
+### HasOverride
+
+`func (o *CreateDataViewRequestObject) HasOverride() bool`
+
+HasOverride returns a boolean if a field has been set.
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/generated/data_views/docs/CreateDataViewRequestObjectDataView.md b/generated/data_views/docs/CreateDataViewRequestObjectDataView.md
new file mode 100644
index 000000000..c248f2271
--- /dev/null
+++ b/generated/data_views/docs/CreateDataViewRequestObjectDataView.md
@@ -0,0 +1,389 @@
+# CreateDataViewRequestObjectDataView
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**AllowNoIndex** | Pointer to **bool** | Allows the data view saved object to exist before the data is available. | [optional]
+**FieldAttrs** | Pointer to **map[string]interface{}** | A map of field attributes by field name. | [optional]
+**FieldFormats** | Pointer to **map[string]interface{}** | A map of field formats by field name. | [optional]
+**Fields** | Pointer to **map[string]interface{}** | | [optional]
+**Id** | Pointer to **string** | | [optional]
+**Name** | Pointer to **string** | The data view name. | [optional]
+**Namespaces** | Pointer to **[]string** | An array of space identifiers for sharing the data view between multiple spaces. | [optional]
+**RuntimeFieldMap** | Pointer to **map[string]interface{}** | A map of runtime field definitions by field name. | [optional]
+**SourceFilters** | Pointer to [**[]SourcefiltersInner**](SourcefiltersInner.md) | The array of field names you want to filter out in Discover. | [optional]
+**TimeFieldName** | Pointer to **string** | The timestamp field name, which you use for time-based data views. | [optional]
+**Title** | **string** | Comma-separated list of data streams, indices, and aliases that you want to search. Supports wildcards (`*`). |
+**Type** | Pointer to **string** | When set to `rollup`, identifies the rollup data views. | [optional]
+**TypeMeta** | Pointer to **map[string]interface{}** | When you use rollup indices, contains the field list for the rollup data view API endpoints. | [optional]
+**Version** | Pointer to **string** | | [optional]
+
+## Methods
+
+### NewCreateDataViewRequestObjectDataView
+
+`func NewCreateDataViewRequestObjectDataView(title string, ) *CreateDataViewRequestObjectDataView`
+
+NewCreateDataViewRequestObjectDataView instantiates a new CreateDataViewRequestObjectDataView object
+This constructor will assign default values to properties that have it defined,
+and makes sure properties required by API are set, but the set of arguments
+will change when the set of required properties is changed
+
+### NewCreateDataViewRequestObjectDataViewWithDefaults
+
+`func NewCreateDataViewRequestObjectDataViewWithDefaults() *CreateDataViewRequestObjectDataView`
+
+NewCreateDataViewRequestObjectDataViewWithDefaults instantiates a new CreateDataViewRequestObjectDataView object
+This constructor will only assign default values to properties that have it defined,
+but it doesn't guarantee that properties required by API are set
+
+### GetAllowNoIndex
+
+`func (o *CreateDataViewRequestObjectDataView) GetAllowNoIndex() bool`
+
+GetAllowNoIndex returns the AllowNoIndex field if non-nil, zero value otherwise.
+
+### GetAllowNoIndexOk
+
+`func (o *CreateDataViewRequestObjectDataView) GetAllowNoIndexOk() (*bool, bool)`
+
+GetAllowNoIndexOk returns a tuple with the AllowNoIndex field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetAllowNoIndex
+
+`func (o *CreateDataViewRequestObjectDataView) SetAllowNoIndex(v bool)`
+
+SetAllowNoIndex sets AllowNoIndex field to given value.
+
+### HasAllowNoIndex
+
+`func (o *CreateDataViewRequestObjectDataView) HasAllowNoIndex() bool`
+
+HasAllowNoIndex returns a boolean if a field has been set.
+
+### GetFieldAttrs
+
+`func (o *CreateDataViewRequestObjectDataView) GetFieldAttrs() map[string]interface{}`
+
+GetFieldAttrs returns the FieldAttrs field if non-nil, zero value otherwise.
+
+### GetFieldAttrsOk
+
+`func (o *CreateDataViewRequestObjectDataView) GetFieldAttrsOk() (*map[string]interface{}, bool)`
+
+GetFieldAttrsOk returns a tuple with the FieldAttrs field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetFieldAttrs
+
+`func (o *CreateDataViewRequestObjectDataView) SetFieldAttrs(v map[string]interface{})`
+
+SetFieldAttrs sets FieldAttrs field to given value.
+
+### HasFieldAttrs
+
+`func (o *CreateDataViewRequestObjectDataView) HasFieldAttrs() bool`
+
+HasFieldAttrs returns a boolean if a field has been set.
+
+### GetFieldFormats
+
+`func (o *CreateDataViewRequestObjectDataView) GetFieldFormats() map[string]interface{}`
+
+GetFieldFormats returns the FieldFormats field if non-nil, zero value otherwise.
+
+### GetFieldFormatsOk
+
+`func (o *CreateDataViewRequestObjectDataView) GetFieldFormatsOk() (*map[string]interface{}, bool)`
+
+GetFieldFormatsOk returns a tuple with the FieldFormats field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetFieldFormats
+
+`func (o *CreateDataViewRequestObjectDataView) SetFieldFormats(v map[string]interface{})`
+
+SetFieldFormats sets FieldFormats field to given value.
+
+### HasFieldFormats
+
+`func (o *CreateDataViewRequestObjectDataView) HasFieldFormats() bool`
+
+HasFieldFormats returns a boolean if a field has been set.
+
+### GetFields
+
+`func (o *CreateDataViewRequestObjectDataView) GetFields() map[string]interface{}`
+
+GetFields returns the Fields field if non-nil, zero value otherwise.
+
+### GetFieldsOk
+
+`func (o *CreateDataViewRequestObjectDataView) GetFieldsOk() (*map[string]interface{}, bool)`
+
+GetFieldsOk returns a tuple with the Fields field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetFields
+
+`func (o *CreateDataViewRequestObjectDataView) SetFields(v map[string]interface{})`
+
+SetFields sets Fields field to given value.
+
+### HasFields
+
+`func (o *CreateDataViewRequestObjectDataView) HasFields() bool`
+
+HasFields returns a boolean if a field has been set.
+
+### GetId
+
+`func (o *CreateDataViewRequestObjectDataView) GetId() string`
+
+GetId returns the Id field if non-nil, zero value otherwise.
+
+### GetIdOk
+
+`func (o *CreateDataViewRequestObjectDataView) GetIdOk() (*string, bool)`
+
+GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetId
+
+`func (o *CreateDataViewRequestObjectDataView) SetId(v string)`
+
+SetId sets Id field to given value.
+
+### HasId
+
+`func (o *CreateDataViewRequestObjectDataView) HasId() bool`
+
+HasId returns a boolean if a field has been set.
+
+### GetName
+
+`func (o *CreateDataViewRequestObjectDataView) GetName() string`
+
+GetName returns the Name field if non-nil, zero value otherwise.
+
+### GetNameOk
+
+`func (o *CreateDataViewRequestObjectDataView) GetNameOk() (*string, bool)`
+
+GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetName
+
+`func (o *CreateDataViewRequestObjectDataView) SetName(v string)`
+
+SetName sets Name field to given value.
+
+### HasName
+
+`func (o *CreateDataViewRequestObjectDataView) HasName() bool`
+
+HasName returns a boolean if a field has been set.
+
+### GetNamespaces
+
+`func (o *CreateDataViewRequestObjectDataView) GetNamespaces() []string`
+
+GetNamespaces returns the Namespaces field if non-nil, zero value otherwise.
+
+### GetNamespacesOk
+
+`func (o *CreateDataViewRequestObjectDataView) GetNamespacesOk() (*[]string, bool)`
+
+GetNamespacesOk returns a tuple with the Namespaces field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetNamespaces
+
+`func (o *CreateDataViewRequestObjectDataView) SetNamespaces(v []string)`
+
+SetNamespaces sets Namespaces field to given value.
+
+### HasNamespaces
+
+`func (o *CreateDataViewRequestObjectDataView) HasNamespaces() bool`
+
+HasNamespaces returns a boolean if a field has been set.
+
+### GetRuntimeFieldMap
+
+`func (o *CreateDataViewRequestObjectDataView) GetRuntimeFieldMap() map[string]interface{}`
+
+GetRuntimeFieldMap returns the RuntimeFieldMap field if non-nil, zero value otherwise.
+
+### GetRuntimeFieldMapOk
+
+`func (o *CreateDataViewRequestObjectDataView) GetRuntimeFieldMapOk() (*map[string]interface{}, bool)`
+
+GetRuntimeFieldMapOk returns a tuple with the RuntimeFieldMap field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetRuntimeFieldMap
+
+`func (o *CreateDataViewRequestObjectDataView) SetRuntimeFieldMap(v map[string]interface{})`
+
+SetRuntimeFieldMap sets RuntimeFieldMap field to given value.
+
+### HasRuntimeFieldMap
+
+`func (o *CreateDataViewRequestObjectDataView) HasRuntimeFieldMap() bool`
+
+HasRuntimeFieldMap returns a boolean if a field has been set.
+
+### GetSourceFilters
+
+`func (o *CreateDataViewRequestObjectDataView) GetSourceFilters() []SourcefiltersInner`
+
+GetSourceFilters returns the SourceFilters field if non-nil, zero value otherwise.
+
+### GetSourceFiltersOk
+
+`func (o *CreateDataViewRequestObjectDataView) GetSourceFiltersOk() (*[]SourcefiltersInner, bool)`
+
+GetSourceFiltersOk returns a tuple with the SourceFilters field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetSourceFilters
+
+`func (o *CreateDataViewRequestObjectDataView) SetSourceFilters(v []SourcefiltersInner)`
+
+SetSourceFilters sets SourceFilters field to given value.
+
+### HasSourceFilters
+
+`func (o *CreateDataViewRequestObjectDataView) HasSourceFilters() bool`
+
+HasSourceFilters returns a boolean if a field has been set.
+
+### GetTimeFieldName
+
+`func (o *CreateDataViewRequestObjectDataView) GetTimeFieldName() string`
+
+GetTimeFieldName returns the TimeFieldName field if non-nil, zero value otherwise.
+
+### GetTimeFieldNameOk
+
+`func (o *CreateDataViewRequestObjectDataView) GetTimeFieldNameOk() (*string, bool)`
+
+GetTimeFieldNameOk returns a tuple with the TimeFieldName field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetTimeFieldName
+
+`func (o *CreateDataViewRequestObjectDataView) SetTimeFieldName(v string)`
+
+SetTimeFieldName sets TimeFieldName field to given value.
+
+### HasTimeFieldName
+
+`func (o *CreateDataViewRequestObjectDataView) HasTimeFieldName() bool`
+
+HasTimeFieldName returns a boolean if a field has been set.
+
+### GetTitle
+
+`func (o *CreateDataViewRequestObjectDataView) GetTitle() string`
+
+GetTitle returns the Title field if non-nil, zero value otherwise.
+
+### GetTitleOk
+
+`func (o *CreateDataViewRequestObjectDataView) GetTitleOk() (*string, bool)`
+
+GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetTitle
+
+`func (o *CreateDataViewRequestObjectDataView) SetTitle(v string)`
+
+SetTitle sets Title field to given value.
+
+
+### GetType
+
+`func (o *CreateDataViewRequestObjectDataView) GetType() string`
+
+GetType returns the Type field if non-nil, zero value otherwise.
+
+### GetTypeOk
+
+`func (o *CreateDataViewRequestObjectDataView) GetTypeOk() (*string, bool)`
+
+GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetType
+
+`func (o *CreateDataViewRequestObjectDataView) SetType(v string)`
+
+SetType sets Type field to given value.
+
+### HasType
+
+`func (o *CreateDataViewRequestObjectDataView) HasType() bool`
+
+HasType returns a boolean if a field has been set.
+
+### GetTypeMeta
+
+`func (o *CreateDataViewRequestObjectDataView) GetTypeMeta() map[string]interface{}`
+
+GetTypeMeta returns the TypeMeta field if non-nil, zero value otherwise.
+
+### GetTypeMetaOk
+
+`func (o *CreateDataViewRequestObjectDataView) GetTypeMetaOk() (*map[string]interface{}, bool)`
+
+GetTypeMetaOk returns a tuple with the TypeMeta field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetTypeMeta
+
+`func (o *CreateDataViewRequestObjectDataView) SetTypeMeta(v map[string]interface{})`
+
+SetTypeMeta sets TypeMeta field to given value.
+
+### HasTypeMeta
+
+`func (o *CreateDataViewRequestObjectDataView) HasTypeMeta() bool`
+
+HasTypeMeta returns a boolean if a field has been set.
+
+### GetVersion
+
+`func (o *CreateDataViewRequestObjectDataView) GetVersion() string`
+
+GetVersion returns the Version field if non-nil, zero value otherwise.
+
+### GetVersionOk
+
+`func (o *CreateDataViewRequestObjectDataView) GetVersionOk() (*string, bool)`
+
+GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetVersion
+
+`func (o *CreateDataViewRequestObjectDataView) SetVersion(v string)`
+
+SetVersion sets Version field to given value.
+
+### HasVersion
+
+`func (o *CreateDataViewRequestObjectDataView) HasVersion() bool`
+
+HasVersion returns a boolean if a field has been set.
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/generated/data_views/docs/CreateRuntimeFieldRequest.md b/generated/data_views/docs/CreateRuntimeFieldRequest.md
new file mode 100644
index 000000000..81b63b3fd
--- /dev/null
+++ b/generated/data_views/docs/CreateRuntimeFieldRequest.md
@@ -0,0 +1,92 @@
+# CreateRuntimeFieldRequest
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Name** | **interface{}** | The name for a runtime field. |
+**RuntimeField** | **interface{}** | The runtime field definition object. |
+
+## Methods
+
+### NewCreateRuntimeFieldRequest
+
+`func NewCreateRuntimeFieldRequest(name interface{}, runtimeField interface{}, ) *CreateRuntimeFieldRequest`
+
+NewCreateRuntimeFieldRequest instantiates a new CreateRuntimeFieldRequest object
+This constructor will assign default values to properties that have it defined,
+and makes sure properties required by API are set, but the set of arguments
+will change when the set of required properties is changed
+
+### NewCreateRuntimeFieldRequestWithDefaults
+
+`func NewCreateRuntimeFieldRequestWithDefaults() *CreateRuntimeFieldRequest`
+
+NewCreateRuntimeFieldRequestWithDefaults instantiates a new CreateRuntimeFieldRequest object
+This constructor will only assign default values to properties that have it defined,
+but it doesn't guarantee that properties required by API are set
+
+### GetName
+
+`func (o *CreateRuntimeFieldRequest) GetName() interface{}`
+
+GetName returns the Name field if non-nil, zero value otherwise.
+
+### GetNameOk
+
+`func (o *CreateRuntimeFieldRequest) GetNameOk() (*interface{}, bool)`
+
+GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetName
+
+`func (o *CreateRuntimeFieldRequest) SetName(v interface{})`
+
+SetName sets Name field to given value.
+
+
+### SetNameNil
+
+`func (o *CreateRuntimeFieldRequest) SetNameNil(b bool)`
+
+ SetNameNil sets the value for Name to be an explicit nil
+
+### UnsetName
+`func (o *CreateRuntimeFieldRequest) UnsetName()`
+
+UnsetName ensures that no value is present for Name, not even an explicit nil
+### GetRuntimeField
+
+`func (o *CreateRuntimeFieldRequest) GetRuntimeField() interface{}`
+
+GetRuntimeField returns the RuntimeField field if non-nil, zero value otherwise.
+
+### GetRuntimeFieldOk
+
+`func (o *CreateRuntimeFieldRequest) GetRuntimeFieldOk() (*interface{}, bool)`
+
+GetRuntimeFieldOk returns a tuple with the RuntimeField field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetRuntimeField
+
+`func (o *CreateRuntimeFieldRequest) SetRuntimeField(v interface{})`
+
+SetRuntimeField sets RuntimeField field to given value.
+
+
+### SetRuntimeFieldNil
+
+`func (o *CreateRuntimeFieldRequest) SetRuntimeFieldNil(b bool)`
+
+ SetRuntimeFieldNil sets the value for RuntimeField to be an explicit nil
+
+### UnsetRuntimeField
+`func (o *CreateRuntimeFieldRequest) UnsetRuntimeField()`
+
+UnsetRuntimeField ensures that no value is present for RuntimeField, not even an explicit nil
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/generated/data_views/docs/CreateUpdateRuntimeField200Response.md b/generated/data_views/docs/CreateUpdateRuntimeField200Response.md
new file mode 100644
index 000000000..51e6739e1
--- /dev/null
+++ b/generated/data_views/docs/CreateUpdateRuntimeField200Response.md
@@ -0,0 +1,82 @@
+# CreateUpdateRuntimeField200Response
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**DataView** | Pointer to **map[string]interface{}** | | [optional]
+**Fields** | Pointer to **[]map[string]interface{}** | | [optional]
+
+## Methods
+
+### NewCreateUpdateRuntimeField200Response
+
+`func NewCreateUpdateRuntimeField200Response() *CreateUpdateRuntimeField200Response`
+
+NewCreateUpdateRuntimeField200Response instantiates a new CreateUpdateRuntimeField200Response object
+This constructor will assign default values to properties that have it defined,
+and makes sure properties required by API are set, but the set of arguments
+will change when the set of required properties is changed
+
+### NewCreateUpdateRuntimeField200ResponseWithDefaults
+
+`func NewCreateUpdateRuntimeField200ResponseWithDefaults() *CreateUpdateRuntimeField200Response`
+
+NewCreateUpdateRuntimeField200ResponseWithDefaults instantiates a new CreateUpdateRuntimeField200Response object
+This constructor will only assign default values to properties that have it defined,
+but it doesn't guarantee that properties required by API are set
+
+### GetDataView
+
+`func (o *CreateUpdateRuntimeField200Response) GetDataView() map[string]interface{}`
+
+GetDataView returns the DataView field if non-nil, zero value otherwise.
+
+### GetDataViewOk
+
+`func (o *CreateUpdateRuntimeField200Response) GetDataViewOk() (*map[string]interface{}, bool)`
+
+GetDataViewOk returns a tuple with the DataView field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetDataView
+
+`func (o *CreateUpdateRuntimeField200Response) SetDataView(v map[string]interface{})`
+
+SetDataView sets DataView field to given value.
+
+### HasDataView
+
+`func (o *CreateUpdateRuntimeField200Response) HasDataView() bool`
+
+HasDataView returns a boolean if a field has been set.
+
+### GetFields
+
+`func (o *CreateUpdateRuntimeField200Response) GetFields() []map[string]interface{}`
+
+GetFields returns the Fields field if non-nil, zero value otherwise.
+
+### GetFieldsOk
+
+`func (o *CreateUpdateRuntimeField200Response) GetFieldsOk() (*[]map[string]interface{}, bool)`
+
+GetFieldsOk returns a tuple with the Fields field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetFields
+
+`func (o *CreateUpdateRuntimeField200Response) SetFields(v []map[string]interface{})`
+
+SetFields sets Fields field to given value.
+
+### HasFields
+
+`func (o *CreateUpdateRuntimeField200Response) HasFields() bool`
+
+HasFields returns a boolean if a field has been set.
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/generated/data_views/docs/CreateUpdateRuntimeFieldRequest.md b/generated/data_views/docs/CreateUpdateRuntimeFieldRequest.md
new file mode 100644
index 000000000..61a7e189f
--- /dev/null
+++ b/generated/data_views/docs/CreateUpdateRuntimeFieldRequest.md
@@ -0,0 +1,72 @@
+# CreateUpdateRuntimeFieldRequest
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Name** | **string** | The name for a runtime field. |
+**RuntimeField** | **map[string]interface{}** | The runtime field definition object. |
+
+## Methods
+
+### NewCreateUpdateRuntimeFieldRequest
+
+`func NewCreateUpdateRuntimeFieldRequest(name string, runtimeField map[string]interface{}, ) *CreateUpdateRuntimeFieldRequest`
+
+NewCreateUpdateRuntimeFieldRequest instantiates a new CreateUpdateRuntimeFieldRequest object
+This constructor will assign default values to properties that have it defined,
+and makes sure properties required by API are set, but the set of arguments
+will change when the set of required properties is changed
+
+### NewCreateUpdateRuntimeFieldRequestWithDefaults
+
+`func NewCreateUpdateRuntimeFieldRequestWithDefaults() *CreateUpdateRuntimeFieldRequest`
+
+NewCreateUpdateRuntimeFieldRequestWithDefaults instantiates a new CreateUpdateRuntimeFieldRequest object
+This constructor will only assign default values to properties that have it defined,
+but it doesn't guarantee that properties required by API are set
+
+### GetName
+
+`func (o *CreateUpdateRuntimeFieldRequest) GetName() string`
+
+GetName returns the Name field if non-nil, zero value otherwise.
+
+### GetNameOk
+
+`func (o *CreateUpdateRuntimeFieldRequest) GetNameOk() (*string, bool)`
+
+GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetName
+
+`func (o *CreateUpdateRuntimeFieldRequest) SetName(v string)`
+
+SetName sets Name field to given value.
+
+
+### GetRuntimeField
+
+`func (o *CreateUpdateRuntimeFieldRequest) GetRuntimeField() map[string]interface{}`
+
+GetRuntimeField returns the RuntimeField field if non-nil, zero value otherwise.
+
+### GetRuntimeFieldOk
+
+`func (o *CreateUpdateRuntimeFieldRequest) GetRuntimeFieldOk() (*map[string]interface{}, bool)`
+
+GetRuntimeFieldOk returns a tuple with the RuntimeField field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetRuntimeField
+
+`func (o *CreateUpdateRuntimeFieldRequest) SetRuntimeField(v map[string]interface{})`
+
+SetRuntimeField sets RuntimeField field to given value.
+
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/generated/data_views/docs/DataViewResponseObject.md b/generated/data_views/docs/DataViewResponseObject.md
new file mode 100644
index 000000000..ae8ff0827
--- /dev/null
+++ b/generated/data_views/docs/DataViewResponseObject.md
@@ -0,0 +1,56 @@
+# DataViewResponseObject
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**DataView** | Pointer to [**DataViewResponseObjectDataView**](DataViewResponseObjectDataView.md) | | [optional]
+
+## Methods
+
+### NewDataViewResponseObject
+
+`func NewDataViewResponseObject() *DataViewResponseObject`
+
+NewDataViewResponseObject instantiates a new DataViewResponseObject object
+This constructor will assign default values to properties that have it defined,
+and makes sure properties required by API are set, but the set of arguments
+will change when the set of required properties is changed
+
+### NewDataViewResponseObjectWithDefaults
+
+`func NewDataViewResponseObjectWithDefaults() *DataViewResponseObject`
+
+NewDataViewResponseObjectWithDefaults instantiates a new DataViewResponseObject object
+This constructor will only assign default values to properties that have it defined,
+but it doesn't guarantee that properties required by API are set
+
+### GetDataView
+
+`func (o *DataViewResponseObject) GetDataView() DataViewResponseObjectDataView`
+
+GetDataView returns the DataView field if non-nil, zero value otherwise.
+
+### GetDataViewOk
+
+`func (o *DataViewResponseObject) GetDataViewOk() (*DataViewResponseObjectDataView, bool)`
+
+GetDataViewOk returns a tuple with the DataView field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetDataView
+
+`func (o *DataViewResponseObject) SetDataView(v DataViewResponseObjectDataView)`
+
+SetDataView sets DataView field to given value.
+
+### HasDataView
+
+`func (o *DataViewResponseObject) HasDataView() bool`
+
+HasDataView returns a boolean if a field has been set.
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/generated/data_views/docs/DataViewResponseObjectDataView.md b/generated/data_views/docs/DataViewResponseObjectDataView.md
new file mode 100644
index 000000000..616140dee
--- /dev/null
+++ b/generated/data_views/docs/DataViewResponseObjectDataView.md
@@ -0,0 +1,368 @@
+# DataViewResponseObjectDataView
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**AllowNoIndex** | Pointer to **bool** | Allows the data view saved object to exist before the data is available. | [optional]
+**FieldAttrs** | Pointer to **map[string]interface{}** | A map of field attributes by field name. | [optional]
+**FieldFormats** | Pointer to **map[string]interface{}** | A map of field formats by field name. | [optional]
+**Fields** | Pointer to **map[string]interface{}** | | [optional]
+**Id** | Pointer to **string** | | [optional]
+**Name** | Pointer to **string** | The data view name. | [optional]
+**Namespaces** | Pointer to **[]string** | An array of space identifiers for sharing the data view between multiple spaces. | [optional]
+**RuntimeFieldMap** | Pointer to **map[string]interface{}** | A map of runtime field definitions by field name. | [optional]
+**SourceFilters** | Pointer to [**[]SourcefiltersInner**](SourcefiltersInner.md) | The array of field names you want to filter out in Discover. | [optional]
+**TimeFieldName** | Pointer to **string** | The timestamp field name, which you use for time-based data views. | [optional]
+**Title** | Pointer to **string** | Comma-separated list of data streams, indices, and aliases that you want to search. Supports wildcards (`*`). | [optional]
+**TypeMeta** | Pointer to **map[string]interface{}** | When you use rollup indices, contains the field list for the rollup data view API endpoints. | [optional]
+**Version** | Pointer to **string** | | [optional]
+
+## Methods
+
+### NewDataViewResponseObjectDataView
+
+`func NewDataViewResponseObjectDataView() *DataViewResponseObjectDataView`
+
+NewDataViewResponseObjectDataView instantiates a new DataViewResponseObjectDataView object
+This constructor will assign default values to properties that have it defined,
+and makes sure properties required by API are set, but the set of arguments
+will change when the set of required properties is changed
+
+### NewDataViewResponseObjectDataViewWithDefaults
+
+`func NewDataViewResponseObjectDataViewWithDefaults() *DataViewResponseObjectDataView`
+
+NewDataViewResponseObjectDataViewWithDefaults instantiates a new DataViewResponseObjectDataView object
+This constructor will only assign default values to properties that have it defined,
+but it doesn't guarantee that properties required by API are set
+
+### GetAllowNoIndex
+
+`func (o *DataViewResponseObjectDataView) GetAllowNoIndex() bool`
+
+GetAllowNoIndex returns the AllowNoIndex field if non-nil, zero value otherwise.
+
+### GetAllowNoIndexOk
+
+`func (o *DataViewResponseObjectDataView) GetAllowNoIndexOk() (*bool, bool)`
+
+GetAllowNoIndexOk returns a tuple with the AllowNoIndex field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetAllowNoIndex
+
+`func (o *DataViewResponseObjectDataView) SetAllowNoIndex(v bool)`
+
+SetAllowNoIndex sets AllowNoIndex field to given value.
+
+### HasAllowNoIndex
+
+`func (o *DataViewResponseObjectDataView) HasAllowNoIndex() bool`
+
+HasAllowNoIndex returns a boolean if a field has been set.
+
+### GetFieldAttrs
+
+`func (o *DataViewResponseObjectDataView) GetFieldAttrs() map[string]interface{}`
+
+GetFieldAttrs returns the FieldAttrs field if non-nil, zero value otherwise.
+
+### GetFieldAttrsOk
+
+`func (o *DataViewResponseObjectDataView) GetFieldAttrsOk() (*map[string]interface{}, bool)`
+
+GetFieldAttrsOk returns a tuple with the FieldAttrs field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetFieldAttrs
+
+`func (o *DataViewResponseObjectDataView) SetFieldAttrs(v map[string]interface{})`
+
+SetFieldAttrs sets FieldAttrs field to given value.
+
+### HasFieldAttrs
+
+`func (o *DataViewResponseObjectDataView) HasFieldAttrs() bool`
+
+HasFieldAttrs returns a boolean if a field has been set.
+
+### GetFieldFormats
+
+`func (o *DataViewResponseObjectDataView) GetFieldFormats() map[string]interface{}`
+
+GetFieldFormats returns the FieldFormats field if non-nil, zero value otherwise.
+
+### GetFieldFormatsOk
+
+`func (o *DataViewResponseObjectDataView) GetFieldFormatsOk() (*map[string]interface{}, bool)`
+
+GetFieldFormatsOk returns a tuple with the FieldFormats field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetFieldFormats
+
+`func (o *DataViewResponseObjectDataView) SetFieldFormats(v map[string]interface{})`
+
+SetFieldFormats sets FieldFormats field to given value.
+
+### HasFieldFormats
+
+`func (o *DataViewResponseObjectDataView) HasFieldFormats() bool`
+
+HasFieldFormats returns a boolean if a field has been set.
+
+### GetFields
+
+`func (o *DataViewResponseObjectDataView) GetFields() map[string]interface{}`
+
+GetFields returns the Fields field if non-nil, zero value otherwise.
+
+### GetFieldsOk
+
+`func (o *DataViewResponseObjectDataView) GetFieldsOk() (*map[string]interface{}, bool)`
+
+GetFieldsOk returns a tuple with the Fields field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetFields
+
+`func (o *DataViewResponseObjectDataView) SetFields(v map[string]interface{})`
+
+SetFields sets Fields field to given value.
+
+### HasFields
+
+`func (o *DataViewResponseObjectDataView) HasFields() bool`
+
+HasFields returns a boolean if a field has been set.
+
+### GetId
+
+`func (o *DataViewResponseObjectDataView) GetId() string`
+
+GetId returns the Id field if non-nil, zero value otherwise.
+
+### GetIdOk
+
+`func (o *DataViewResponseObjectDataView) GetIdOk() (*string, bool)`
+
+GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetId
+
+`func (o *DataViewResponseObjectDataView) SetId(v string)`
+
+SetId sets Id field to given value.
+
+### HasId
+
+`func (o *DataViewResponseObjectDataView) HasId() bool`
+
+HasId returns a boolean if a field has been set.
+
+### GetName
+
+`func (o *DataViewResponseObjectDataView) GetName() string`
+
+GetName returns the Name field if non-nil, zero value otherwise.
+
+### GetNameOk
+
+`func (o *DataViewResponseObjectDataView) GetNameOk() (*string, bool)`
+
+GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetName
+
+`func (o *DataViewResponseObjectDataView) SetName(v string)`
+
+SetName sets Name field to given value.
+
+### HasName
+
+`func (o *DataViewResponseObjectDataView) HasName() bool`
+
+HasName returns a boolean if a field has been set.
+
+### GetNamespaces
+
+`func (o *DataViewResponseObjectDataView) GetNamespaces() []string`
+
+GetNamespaces returns the Namespaces field if non-nil, zero value otherwise.
+
+### GetNamespacesOk
+
+`func (o *DataViewResponseObjectDataView) GetNamespacesOk() (*[]string, bool)`
+
+GetNamespacesOk returns a tuple with the Namespaces field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetNamespaces
+
+`func (o *DataViewResponseObjectDataView) SetNamespaces(v []string)`
+
+SetNamespaces sets Namespaces field to given value.
+
+### HasNamespaces
+
+`func (o *DataViewResponseObjectDataView) HasNamespaces() bool`
+
+HasNamespaces returns a boolean if a field has been set.
+
+### GetRuntimeFieldMap
+
+`func (o *DataViewResponseObjectDataView) GetRuntimeFieldMap() map[string]interface{}`
+
+GetRuntimeFieldMap returns the RuntimeFieldMap field if non-nil, zero value otherwise.
+
+### GetRuntimeFieldMapOk
+
+`func (o *DataViewResponseObjectDataView) GetRuntimeFieldMapOk() (*map[string]interface{}, bool)`
+
+GetRuntimeFieldMapOk returns a tuple with the RuntimeFieldMap field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetRuntimeFieldMap
+
+`func (o *DataViewResponseObjectDataView) SetRuntimeFieldMap(v map[string]interface{})`
+
+SetRuntimeFieldMap sets RuntimeFieldMap field to given value.
+
+### HasRuntimeFieldMap
+
+`func (o *DataViewResponseObjectDataView) HasRuntimeFieldMap() bool`
+
+HasRuntimeFieldMap returns a boolean if a field has been set.
+
+### GetSourceFilters
+
+`func (o *DataViewResponseObjectDataView) GetSourceFilters() []SourcefiltersInner`
+
+GetSourceFilters returns the SourceFilters field if non-nil, zero value otherwise.
+
+### GetSourceFiltersOk
+
+`func (o *DataViewResponseObjectDataView) GetSourceFiltersOk() (*[]SourcefiltersInner, bool)`
+
+GetSourceFiltersOk returns a tuple with the SourceFilters field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetSourceFilters
+
+`func (o *DataViewResponseObjectDataView) SetSourceFilters(v []SourcefiltersInner)`
+
+SetSourceFilters sets SourceFilters field to given value.
+
+### HasSourceFilters
+
+`func (o *DataViewResponseObjectDataView) HasSourceFilters() bool`
+
+HasSourceFilters returns a boolean if a field has been set.
+
+### GetTimeFieldName
+
+`func (o *DataViewResponseObjectDataView) GetTimeFieldName() string`
+
+GetTimeFieldName returns the TimeFieldName field if non-nil, zero value otherwise.
+
+### GetTimeFieldNameOk
+
+`func (o *DataViewResponseObjectDataView) GetTimeFieldNameOk() (*string, bool)`
+
+GetTimeFieldNameOk returns a tuple with the TimeFieldName field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetTimeFieldName
+
+`func (o *DataViewResponseObjectDataView) SetTimeFieldName(v string)`
+
+SetTimeFieldName sets TimeFieldName field to given value.
+
+### HasTimeFieldName
+
+`func (o *DataViewResponseObjectDataView) HasTimeFieldName() bool`
+
+HasTimeFieldName returns a boolean if a field has been set.
+
+### GetTitle
+
+`func (o *DataViewResponseObjectDataView) GetTitle() string`
+
+GetTitle returns the Title field if non-nil, zero value otherwise.
+
+### GetTitleOk
+
+`func (o *DataViewResponseObjectDataView) GetTitleOk() (*string, bool)`
+
+GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetTitle
+
+`func (o *DataViewResponseObjectDataView) SetTitle(v string)`
+
+SetTitle sets Title field to given value.
+
+### HasTitle
+
+`func (o *DataViewResponseObjectDataView) HasTitle() bool`
+
+HasTitle returns a boolean if a field has been set.
+
+### GetTypeMeta
+
+`func (o *DataViewResponseObjectDataView) GetTypeMeta() map[string]interface{}`
+
+GetTypeMeta returns the TypeMeta field if non-nil, zero value otherwise.
+
+### GetTypeMetaOk
+
+`func (o *DataViewResponseObjectDataView) GetTypeMetaOk() (*map[string]interface{}, bool)`
+
+GetTypeMetaOk returns a tuple with the TypeMeta field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetTypeMeta
+
+`func (o *DataViewResponseObjectDataView) SetTypeMeta(v map[string]interface{})`
+
+SetTypeMeta sets TypeMeta field to given value.
+
+### HasTypeMeta
+
+`func (o *DataViewResponseObjectDataView) HasTypeMeta() bool`
+
+HasTypeMeta returns a boolean if a field has been set.
+
+### GetVersion
+
+`func (o *DataViewResponseObjectDataView) GetVersion() string`
+
+GetVersion returns the Version field if non-nil, zero value otherwise.
+
+### GetVersionOk
+
+`func (o *DataViewResponseObjectDataView) GetVersionOk() (*string, bool)`
+
+GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetVersion
+
+`func (o *DataViewResponseObjectDataView) SetVersion(v string)`
+
+SetVersion sets Version field to given value.
+
+### HasVersion
+
+`func (o *DataViewResponseObjectDataView) HasVersion() bool`
+
+HasVersion returns a boolean if a field has been set.
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/generated/data_views/docs/DataViewsAPI.md b/generated/data_views/docs/DataViewsAPI.md
new file mode 100644
index 000000000..d0069eeaa
--- /dev/null
+++ b/generated/data_views/docs/DataViewsAPI.md
@@ -0,0 +1,930 @@
+# \DataViewsAPI
+
+All URIs are relative to *http://localhost*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**CreateDataView**](DataViewsAPI.md#CreateDataView) | **Post** /api/data_views/data_view | Creates a data view.
+[**CreateRuntimeField**](DataViewsAPI.md#CreateRuntimeField) | **Post** /api/data_views/data_view/{viewId}/runtime_field | Creates a runtime field.
+[**CreateUpdateRuntimeField**](DataViewsAPI.md#CreateUpdateRuntimeField) | **Put** /api/data_views/data_view/{viewId}/runtime_field | Create or update an existing runtime field.
+[**DeleteDataView**](DataViewsAPI.md#DeleteDataView) | **Delete** /api/data_views/data_view/{viewId} | Deletes a data view.
+[**DeleteRuntimeField**](DataViewsAPI.md#DeleteRuntimeField) | **Delete** /api/data_views/data_view/{viewId}/runtime_field/{fieldName} | Delete a runtime field from a data view.
+[**GetAllDataViews**](DataViewsAPI.md#GetAllDataViews) | **Get** /api/data_views | Retrieves a list of all data views.
+[**GetDataView**](DataViewsAPI.md#GetDataView) | **Get** /api/data_views/data_view/{viewId} | Retrieves a single data view by identifier.
+[**GetDefaultDataView**](DataViewsAPI.md#GetDefaultDataView) | **Get** /api/data_views/default | Retrieves the default data view identifier.
+[**GetRuntimeField**](DataViewsAPI.md#GetRuntimeField) | **Get** /api/data_views/data_view/{viewId}/runtime_field/{fieldName} | Retrieves a runtime field.
+[**SetDefaultDatailView**](DataViewsAPI.md#SetDefaultDatailView) | **Post** /api/data_views/default | Sets the default data view identifier.
+[**UpdateDataView**](DataViewsAPI.md#UpdateDataView) | **Post** /api/data_views/data_view/{viewId} | Updates a data view.
+[**UpdateFieldsMetadata**](DataViewsAPI.md#UpdateFieldsMetadata) | **Post** /api/data_views/data_view/{viewId}/fields | Update fields presentation metadata such as count, customLabel and format.
+[**UpdateRuntimeField**](DataViewsAPI.md#UpdateRuntimeField) | **Post** /api/data_views/data_view/{viewId}/runtime_field/{fieldName} | Update an existing runtime field.
+
+
+
+## CreateDataView
+
+> DataViewResponseObject CreateDataView(ctx).KbnXsrf(kbnXsrf).CreateDataViewRequestObject(createDataViewRequestObject).Execute()
+
+Creates a data view.
+
+
+
+### Example
+
+```go
+package main
+
+import (
+ "context"
+ "fmt"
+ "os"
+ openapiclient "github.com/elastic/terraform-provider-elasticstack/data_views"
+)
+
+func main() {
+ kbnXsrf := "kbnXsrf_example" // string | Cross-site request forgery protection
+ createDataViewRequestObject := *openapiclient.NewCreateDataViewRequestObject(*openapiclient.NewCreateDataViewRequestObjectDataView("Title_example")) // CreateDataViewRequestObject |
+
+ configuration := openapiclient.NewConfiguration()
+ apiClient := openapiclient.NewAPIClient(configuration)
+ resp, r, err := apiClient.DataViewsAPI.CreateDataView(context.Background()).KbnXsrf(kbnXsrf).CreateDataViewRequestObject(createDataViewRequestObject).Execute()
+ if err != nil {
+ fmt.Fprintf(os.Stderr, "Error when calling `DataViewsAPI.CreateDataView``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
+ }
+ // response from `CreateDataView`: DataViewResponseObject
+ fmt.Fprintf(os.Stdout, "Response from `DataViewsAPI.CreateDataView`: %v\n", resp)
+}
+```
+
+### Path Parameters
+
+
+
+### Other Parameters
+
+Other parameters are passed through a pointer to a apiCreateDataViewRequest struct via the builder pattern
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **kbnXsrf** | **string** | Cross-site request forgery protection |
+ **createDataViewRequestObject** | [**CreateDataViewRequestObject**](CreateDataViewRequestObject.md) | |
+
+### Return type
+
+[**DataViewResponseObject**](DataViewResponseObject.md)
+
+### Authorization
+
+[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
+[[Back to Model list]](../README.md#documentation-for-models)
+[[Back to README]](../README.md)
+
+
+## CreateRuntimeField
+
+> CreateRuntimeField(ctx, viewId).KbnXsrf(kbnXsrf).CreateUpdateRuntimeFieldRequest(createUpdateRuntimeFieldRequest).Execute()
+
+Creates a runtime field.
+
+
+
+### Example
+
+```go
+package main
+
+import (
+ "context"
+ "fmt"
+ "os"
+ openapiclient "github.com/elastic/terraform-provider-elasticstack/data_views"
+)
+
+func main() {
+ kbnXsrf := "kbnXsrf_example" // string | Cross-site request forgery protection
+ viewId := "ff959d40-b880-11e8-a6d9-e546fe2bba5f" // string | An identifier for the data view.
+ createUpdateRuntimeFieldRequest := *openapiclient.NewCreateUpdateRuntimeFieldRequest("Name_example", map[string]interface{}(123)) // CreateUpdateRuntimeFieldRequest |
+
+ configuration := openapiclient.NewConfiguration()
+ apiClient := openapiclient.NewAPIClient(configuration)
+ r, err := apiClient.DataViewsAPI.CreateRuntimeField(context.Background(), viewId).KbnXsrf(kbnXsrf).CreateUpdateRuntimeFieldRequest(createUpdateRuntimeFieldRequest).Execute()
+ if err != nil {
+ fmt.Fprintf(os.Stderr, "Error when calling `DataViewsAPI.CreateRuntimeField``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
+ }
+}
+```
+
+### Path Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**viewId** | **string** | An identifier for the data view. |
+
+### Other Parameters
+
+Other parameters are passed through a pointer to a apiCreateRuntimeFieldRequest struct via the builder pattern
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **kbnXsrf** | **string** | Cross-site request forgery protection |
+
+ **createUpdateRuntimeFieldRequest** | [**CreateUpdateRuntimeFieldRequest**](CreateUpdateRuntimeFieldRequest.md) | |
+
+### Return type
+
+ (empty response body)
+
+### Authorization
+
+[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: Not defined
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
+[[Back to Model list]](../README.md#documentation-for-models)
+[[Back to README]](../README.md)
+
+
+## CreateUpdateRuntimeField
+
+> CreateUpdateRuntimeField200Response CreateUpdateRuntimeField(ctx, viewId).KbnXsrf(kbnXsrf).CreateUpdateRuntimeFieldRequest(createUpdateRuntimeFieldRequest).Execute()
+
+Create or update an existing runtime field.
+
+
+
+### Example
+
+```go
+package main
+
+import (
+ "context"
+ "fmt"
+ "os"
+ openapiclient "github.com/elastic/terraform-provider-elasticstack/data_views"
+)
+
+func main() {
+ kbnXsrf := "kbnXsrf_example" // string | Cross-site request forgery protection
+ viewId := "viewId_example" // string | The ID of the data view fields you want to update.
+ createUpdateRuntimeFieldRequest := *openapiclient.NewCreateUpdateRuntimeFieldRequest("Name_example", map[string]interface{}(123)) // CreateUpdateRuntimeFieldRequest |
+
+ configuration := openapiclient.NewConfiguration()
+ apiClient := openapiclient.NewAPIClient(configuration)
+ resp, r, err := apiClient.DataViewsAPI.CreateUpdateRuntimeField(context.Background(), viewId).KbnXsrf(kbnXsrf).CreateUpdateRuntimeFieldRequest(createUpdateRuntimeFieldRequest).Execute()
+ if err != nil {
+ fmt.Fprintf(os.Stderr, "Error when calling `DataViewsAPI.CreateUpdateRuntimeField``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
+ }
+ // response from `CreateUpdateRuntimeField`: CreateUpdateRuntimeField200Response
+ fmt.Fprintf(os.Stdout, "Response from `DataViewsAPI.CreateUpdateRuntimeField`: %v\n", resp)
+}
+```
+
+### Path Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**viewId** | **string** | The ID of the data view fields you want to update. |
+
+### Other Parameters
+
+Other parameters are passed through a pointer to a apiCreateUpdateRuntimeFieldRequest struct via the builder pattern
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **kbnXsrf** | **string** | Cross-site request forgery protection |
+
+ **createUpdateRuntimeFieldRequest** | [**CreateUpdateRuntimeFieldRequest**](CreateUpdateRuntimeFieldRequest.md) | |
+
+### Return type
+
+[**CreateUpdateRuntimeField200Response**](CreateUpdateRuntimeField200Response.md)
+
+### Authorization
+
+[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
+[[Back to Model list]](../README.md#documentation-for-models)
+[[Back to README]](../README.md)
+
+
+## DeleteDataView
+
+> DeleteDataView(ctx, viewId).KbnXsrf(kbnXsrf).Execute()
+
+Deletes a data view.
+
+
+
+### Example
+
+```go
+package main
+
+import (
+ "context"
+ "fmt"
+ "os"
+ openapiclient "github.com/elastic/terraform-provider-elasticstack/data_views"
+)
+
+func main() {
+ kbnXsrf := "kbnXsrf_example" // string | Cross-site request forgery protection
+ viewId := "ff959d40-b880-11e8-a6d9-e546fe2bba5f" // string | An identifier for the data view.
+
+ configuration := openapiclient.NewConfiguration()
+ apiClient := openapiclient.NewAPIClient(configuration)
+ r, err := apiClient.DataViewsAPI.DeleteDataView(context.Background(), viewId).KbnXsrf(kbnXsrf).Execute()
+ if err != nil {
+ fmt.Fprintf(os.Stderr, "Error when calling `DataViewsAPI.DeleteDataView``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
+ }
+}
+```
+
+### Path Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**viewId** | **string** | An identifier for the data view. |
+
+### Other Parameters
+
+Other parameters are passed through a pointer to a apiDeleteDataViewRequest struct via the builder pattern
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **kbnXsrf** | **string** | Cross-site request forgery protection |
+
+
+### Return type
+
+ (empty response body)
+
+### Authorization
+
+[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
+[[Back to Model list]](../README.md#documentation-for-models)
+[[Back to README]](../README.md)
+
+
+## DeleteRuntimeField
+
+> DeleteRuntimeField(ctx, fieldName, viewId).Execute()
+
+Delete a runtime field from a data view.
+
+
+
+### Example
+
+```go
+package main
+
+import (
+ "context"
+ "fmt"
+ "os"
+ openapiclient "github.com/elastic/terraform-provider-elasticstack/data_views"
+)
+
+func main() {
+ fieldName := "hour_of_day" // string | The name of the runtime field.
+ viewId := "ff959d40-b880-11e8-a6d9-e546fe2bba5f" // string | An identifier for the data view.
+
+ configuration := openapiclient.NewConfiguration()
+ apiClient := openapiclient.NewAPIClient(configuration)
+ r, err := apiClient.DataViewsAPI.DeleteRuntimeField(context.Background(), fieldName, viewId).Execute()
+ if err != nil {
+ fmt.Fprintf(os.Stderr, "Error when calling `DataViewsAPI.DeleteRuntimeField``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
+ }
+}
+```
+
+### Path Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**fieldName** | **string** | The name of the runtime field. |
+**viewId** | **string** | An identifier for the data view. |
+
+### Other Parameters
+
+Other parameters are passed through a pointer to a apiDeleteRuntimeFieldRequest struct via the builder pattern
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+
+
+
+### Return type
+
+ (empty response body)
+
+### Authorization
+
+[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
+[[Back to Model list]](../README.md#documentation-for-models)
+[[Back to README]](../README.md)
+
+
+## GetAllDataViews
+
+> GetAllDataViews200Response GetAllDataViews(ctx).Execute()
+
+Retrieves a list of all data views.
+
+
+
+### Example
+
+```go
+package main
+
+import (
+ "context"
+ "fmt"
+ "os"
+ openapiclient "github.com/elastic/terraform-provider-elasticstack/data_views"
+)
+
+func main() {
+
+ configuration := openapiclient.NewConfiguration()
+ apiClient := openapiclient.NewAPIClient(configuration)
+ resp, r, err := apiClient.DataViewsAPI.GetAllDataViews(context.Background()).Execute()
+ if err != nil {
+ fmt.Fprintf(os.Stderr, "Error when calling `DataViewsAPI.GetAllDataViews``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
+ }
+ // response from `GetAllDataViews`: GetAllDataViews200Response
+ fmt.Fprintf(os.Stdout, "Response from `DataViewsAPI.GetAllDataViews`: %v\n", resp)
+}
+```
+
+### Path Parameters
+
+This endpoint does not need any parameter.
+
+### Other Parameters
+
+Other parameters are passed through a pointer to a apiGetAllDataViewsRequest struct via the builder pattern
+
+
+### Return type
+
+[**GetAllDataViews200Response**](GetAllDataViews200Response.md)
+
+### Authorization
+
+[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
+[[Back to Model list]](../README.md#documentation-for-models)
+[[Back to README]](../README.md)
+
+
+## GetDataView
+
+> DataViewResponseObject GetDataView(ctx, viewId).Execute()
+
+Retrieves a single data view by identifier.
+
+
+
+### Example
+
+```go
+package main
+
+import (
+ "context"
+ "fmt"
+ "os"
+ openapiclient "github.com/elastic/terraform-provider-elasticstack/data_views"
+)
+
+func main() {
+ viewId := "ff959d40-b880-11e8-a6d9-e546fe2bba5f" // string | An identifier for the data view.
+
+ configuration := openapiclient.NewConfiguration()
+ apiClient := openapiclient.NewAPIClient(configuration)
+ resp, r, err := apiClient.DataViewsAPI.GetDataView(context.Background(), viewId).Execute()
+ if err != nil {
+ fmt.Fprintf(os.Stderr, "Error when calling `DataViewsAPI.GetDataView``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
+ }
+ // response from `GetDataView`: DataViewResponseObject
+ fmt.Fprintf(os.Stdout, "Response from `DataViewsAPI.GetDataView`: %v\n", resp)
+}
+```
+
+### Path Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**viewId** | **string** | An identifier for the data view. |
+
+### Other Parameters
+
+Other parameters are passed through a pointer to a apiGetDataViewRequest struct via the builder pattern
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+
+
+### Return type
+
+[**DataViewResponseObject**](DataViewResponseObject.md)
+
+### Authorization
+
+[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
+[[Back to Model list]](../README.md#documentation-for-models)
+[[Back to README]](../README.md)
+
+
+## GetDefaultDataView
+
+> GetDefaultDataView200Response GetDefaultDataView(ctx).Execute()
+
+Retrieves the default data view identifier.
+
+
+
+### Example
+
+```go
+package main
+
+import (
+ "context"
+ "fmt"
+ "os"
+ openapiclient "github.com/elastic/terraform-provider-elasticstack/data_views"
+)
+
+func main() {
+
+ configuration := openapiclient.NewConfiguration()
+ apiClient := openapiclient.NewAPIClient(configuration)
+ resp, r, err := apiClient.DataViewsAPI.GetDefaultDataView(context.Background()).Execute()
+ if err != nil {
+ fmt.Fprintf(os.Stderr, "Error when calling `DataViewsAPI.GetDefaultDataView``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
+ }
+ // response from `GetDefaultDataView`: GetDefaultDataView200Response
+ fmt.Fprintf(os.Stdout, "Response from `DataViewsAPI.GetDefaultDataView`: %v\n", resp)
+}
+```
+
+### Path Parameters
+
+This endpoint does not need any parameter.
+
+### Other Parameters
+
+Other parameters are passed through a pointer to a apiGetDefaultDataViewRequest struct via the builder pattern
+
+
+### Return type
+
+[**GetDefaultDataView200Response**](GetDefaultDataView200Response.md)
+
+### Authorization
+
+[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
+[[Back to Model list]](../README.md#documentation-for-models)
+[[Back to README]](../README.md)
+
+
+## GetRuntimeField
+
+> CreateUpdateRuntimeField200Response GetRuntimeField(ctx, fieldName, viewId).Execute()
+
+Retrieves a runtime field.
+
+
+
+### Example
+
+```go
+package main
+
+import (
+ "context"
+ "fmt"
+ "os"
+ openapiclient "github.com/elastic/terraform-provider-elasticstack/data_views"
+)
+
+func main() {
+ fieldName := "hour_of_day" // string | The name of the runtime field.
+ viewId := "ff959d40-b880-11e8-a6d9-e546fe2bba5f" // string | An identifier for the data view.
+
+ configuration := openapiclient.NewConfiguration()
+ apiClient := openapiclient.NewAPIClient(configuration)
+ resp, r, err := apiClient.DataViewsAPI.GetRuntimeField(context.Background(), fieldName, viewId).Execute()
+ if err != nil {
+ fmt.Fprintf(os.Stderr, "Error when calling `DataViewsAPI.GetRuntimeField``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
+ }
+ // response from `GetRuntimeField`: CreateUpdateRuntimeField200Response
+ fmt.Fprintf(os.Stdout, "Response from `DataViewsAPI.GetRuntimeField`: %v\n", resp)
+}
+```
+
+### Path Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**fieldName** | **string** | The name of the runtime field. |
+**viewId** | **string** | An identifier for the data view. |
+
+### Other Parameters
+
+Other parameters are passed through a pointer to a apiGetRuntimeFieldRequest struct via the builder pattern
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+
+
+
+### Return type
+
+[**CreateUpdateRuntimeField200Response**](CreateUpdateRuntimeField200Response.md)
+
+### Authorization
+
+[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
+[[Back to Model list]](../README.md#documentation-for-models)
+[[Back to README]](../README.md)
+
+
+## SetDefaultDatailView
+
+> UpdateFieldsMetadata200Response SetDefaultDatailView(ctx).KbnXsrf(kbnXsrf).SetDefaultDatailViewRequest(setDefaultDatailViewRequest).Execute()
+
+Sets the default data view identifier.
+
+
+
+### Example
+
+```go
+package main
+
+import (
+ "context"
+ "fmt"
+ "os"
+ openapiclient "github.com/elastic/terraform-provider-elasticstack/data_views"
+)
+
+func main() {
+ kbnXsrf := "kbnXsrf_example" // string | Cross-site request forgery protection
+ setDefaultDatailViewRequest := *openapiclient.NewSetDefaultDatailViewRequest(interface{}(123)) // SetDefaultDatailViewRequest |
+
+ configuration := openapiclient.NewConfiguration()
+ apiClient := openapiclient.NewAPIClient(configuration)
+ resp, r, err := apiClient.DataViewsAPI.SetDefaultDatailView(context.Background()).KbnXsrf(kbnXsrf).SetDefaultDatailViewRequest(setDefaultDatailViewRequest).Execute()
+ if err != nil {
+ fmt.Fprintf(os.Stderr, "Error when calling `DataViewsAPI.SetDefaultDatailView``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
+ }
+ // response from `SetDefaultDatailView`: UpdateFieldsMetadata200Response
+ fmt.Fprintf(os.Stdout, "Response from `DataViewsAPI.SetDefaultDatailView`: %v\n", resp)
+}
+```
+
+### Path Parameters
+
+
+
+### Other Parameters
+
+Other parameters are passed through a pointer to a apiSetDefaultDatailViewRequest struct via the builder pattern
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **kbnXsrf** | **string** | Cross-site request forgery protection |
+ **setDefaultDatailViewRequest** | [**SetDefaultDatailViewRequest**](SetDefaultDatailViewRequest.md) | |
+
+### Return type
+
+[**UpdateFieldsMetadata200Response**](UpdateFieldsMetadata200Response.md)
+
+### Authorization
+
+[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
+[[Back to Model list]](../README.md#documentation-for-models)
+[[Back to README]](../README.md)
+
+
+## UpdateDataView
+
+> DataViewResponseObject UpdateDataView(ctx, viewId).KbnXsrf(kbnXsrf).UpdateDataViewRequestObject(updateDataViewRequestObject).Execute()
+
+Updates a data view.
+
+
+
+### Example
+
+```go
+package main
+
+import (
+ "context"
+ "fmt"
+ "os"
+ openapiclient "github.com/elastic/terraform-provider-elasticstack/data_views"
+)
+
+func main() {
+ kbnXsrf := "kbnXsrf_example" // string | Cross-site request forgery protection
+ viewId := "ff959d40-b880-11e8-a6d9-e546fe2bba5f" // string | An identifier for the data view.
+ updateDataViewRequestObject := *openapiclient.NewUpdateDataViewRequestObject(*openapiclient.NewUpdateDataViewRequestObjectDataView()) // UpdateDataViewRequestObject |
+
+ configuration := openapiclient.NewConfiguration()
+ apiClient := openapiclient.NewAPIClient(configuration)
+ resp, r, err := apiClient.DataViewsAPI.UpdateDataView(context.Background(), viewId).KbnXsrf(kbnXsrf).UpdateDataViewRequestObject(updateDataViewRequestObject).Execute()
+ if err != nil {
+ fmt.Fprintf(os.Stderr, "Error when calling `DataViewsAPI.UpdateDataView``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
+ }
+ // response from `UpdateDataView`: DataViewResponseObject
+ fmt.Fprintf(os.Stdout, "Response from `DataViewsAPI.UpdateDataView`: %v\n", resp)
+}
+```
+
+### Path Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**viewId** | **string** | An identifier for the data view. |
+
+### Other Parameters
+
+Other parameters are passed through a pointer to a apiUpdateDataViewRequest struct via the builder pattern
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **kbnXsrf** | **string** | Cross-site request forgery protection |
+
+ **updateDataViewRequestObject** | [**UpdateDataViewRequestObject**](UpdateDataViewRequestObject.md) | |
+
+### Return type
+
+[**DataViewResponseObject**](DataViewResponseObject.md)
+
+### Authorization
+
+[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
+[[Back to Model list]](../README.md#documentation-for-models)
+[[Back to README]](../README.md)
+
+
+## UpdateFieldsMetadata
+
+> UpdateFieldsMetadata200Response UpdateFieldsMetadata(ctx, viewId).KbnXsrf(kbnXsrf).UpdateFieldsMetadataRequest(updateFieldsMetadataRequest).Execute()
+
+Update fields presentation metadata such as count, customLabel and format.
+
+
+
+### Example
+
+```go
+package main
+
+import (
+ "context"
+ "fmt"
+ "os"
+ openapiclient "github.com/elastic/terraform-provider-elasticstack/data_views"
+)
+
+func main() {
+ kbnXsrf := "kbnXsrf_example" // string | Cross-site request forgery protection
+ viewId := "ff959d40-b880-11e8-a6d9-e546fe2bba5f" // string | An identifier for the data view.
+ updateFieldsMetadataRequest := *openapiclient.NewUpdateFieldsMetadataRequest(map[string]interface{}(123)) // UpdateFieldsMetadataRequest |
+
+ configuration := openapiclient.NewConfiguration()
+ apiClient := openapiclient.NewAPIClient(configuration)
+ resp, r, err := apiClient.DataViewsAPI.UpdateFieldsMetadata(context.Background(), viewId).KbnXsrf(kbnXsrf).UpdateFieldsMetadataRequest(updateFieldsMetadataRequest).Execute()
+ if err != nil {
+ fmt.Fprintf(os.Stderr, "Error when calling `DataViewsAPI.UpdateFieldsMetadata``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
+ }
+ // response from `UpdateFieldsMetadata`: UpdateFieldsMetadata200Response
+ fmt.Fprintf(os.Stdout, "Response from `DataViewsAPI.UpdateFieldsMetadata`: %v\n", resp)
+}
+```
+
+### Path Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**viewId** | **string** | An identifier for the data view. |
+
+### Other Parameters
+
+Other parameters are passed through a pointer to a apiUpdateFieldsMetadataRequest struct via the builder pattern
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **kbnXsrf** | **string** | Cross-site request forgery protection |
+
+ **updateFieldsMetadataRequest** | [**UpdateFieldsMetadataRequest**](UpdateFieldsMetadataRequest.md) | |
+
+### Return type
+
+[**UpdateFieldsMetadata200Response**](UpdateFieldsMetadata200Response.md)
+
+### Authorization
+
+[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
+[[Back to Model list]](../README.md#documentation-for-models)
+[[Back to README]](../README.md)
+
+
+## UpdateRuntimeField
+
+> UpdateRuntimeField(ctx, fieldName, viewId).UpdateRuntimeFieldRequest(updateRuntimeFieldRequest).Execute()
+
+Update an existing runtime field.
+
+
+
+### Example
+
+```go
+package main
+
+import (
+ "context"
+ "fmt"
+ "os"
+ openapiclient "github.com/elastic/terraform-provider-elasticstack/data_views"
+)
+
+func main() {
+ fieldName := "hour_of_day" // string | The name of the runtime field.
+ viewId := "ff959d40-b880-11e8-a6d9-e546fe2bba5f" // string | An identifier for the data view.
+ updateRuntimeFieldRequest := *openapiclient.NewUpdateRuntimeFieldRequest(map[string]interface{}(123)) // UpdateRuntimeFieldRequest |
+
+ configuration := openapiclient.NewConfiguration()
+ apiClient := openapiclient.NewAPIClient(configuration)
+ r, err := apiClient.DataViewsAPI.UpdateRuntimeField(context.Background(), fieldName, viewId).UpdateRuntimeFieldRequest(updateRuntimeFieldRequest).Execute()
+ if err != nil {
+ fmt.Fprintf(os.Stderr, "Error when calling `DataViewsAPI.UpdateRuntimeField``: %v\n", err)
+ fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
+ }
+}
+```
+
+### Path Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+**fieldName** | **string** | The name of the runtime field. |
+**viewId** | **string** | An identifier for the data view. |
+
+### Other Parameters
+
+Other parameters are passed through a pointer to a apiUpdateRuntimeFieldRequest struct via the builder pattern
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+
+
+ **updateRuntimeFieldRequest** | [**UpdateRuntimeFieldRequest**](UpdateRuntimeFieldRequest.md) | |
+
+### Return type
+
+ (empty response body)
+
+### Authorization
+
+[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
+[[Back to Model list]](../README.md#documentation-for-models)
+[[Back to README]](../README.md)
+
diff --git a/generated/data_views/docs/GetAllDataViews200Response.md b/generated/data_views/docs/GetAllDataViews200Response.md
new file mode 100644
index 000000000..3120b686e
--- /dev/null
+++ b/generated/data_views/docs/GetAllDataViews200Response.md
@@ -0,0 +1,56 @@
+# GetAllDataViews200Response
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**DataView** | Pointer to [**[]GetAllDataViews200ResponseDataViewInner**](GetAllDataViews200ResponseDataViewInner.md) | | [optional]
+
+## Methods
+
+### NewGetAllDataViews200Response
+
+`func NewGetAllDataViews200Response() *GetAllDataViews200Response`
+
+NewGetAllDataViews200Response instantiates a new GetAllDataViews200Response object
+This constructor will assign default values to properties that have it defined,
+and makes sure properties required by API are set, but the set of arguments
+will change when the set of required properties is changed
+
+### NewGetAllDataViews200ResponseWithDefaults
+
+`func NewGetAllDataViews200ResponseWithDefaults() *GetAllDataViews200Response`
+
+NewGetAllDataViews200ResponseWithDefaults instantiates a new GetAllDataViews200Response object
+This constructor will only assign default values to properties that have it defined,
+but it doesn't guarantee that properties required by API are set
+
+### GetDataView
+
+`func (o *GetAllDataViews200Response) GetDataView() []GetAllDataViews200ResponseDataViewInner`
+
+GetDataView returns the DataView field if non-nil, zero value otherwise.
+
+### GetDataViewOk
+
+`func (o *GetAllDataViews200Response) GetDataViewOk() (*[]GetAllDataViews200ResponseDataViewInner, bool)`
+
+GetDataViewOk returns a tuple with the DataView field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetDataView
+
+`func (o *GetAllDataViews200Response) SetDataView(v []GetAllDataViews200ResponseDataViewInner)`
+
+SetDataView sets DataView field to given value.
+
+### HasDataView
+
+`func (o *GetAllDataViews200Response) HasDataView() bool`
+
+HasDataView returns a boolean if a field has been set.
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/generated/data_views/docs/GetAllDataViews200ResponseDataViewInner.md b/generated/data_views/docs/GetAllDataViews200ResponseDataViewInner.md
new file mode 100644
index 000000000..9f145f74c
--- /dev/null
+++ b/generated/data_views/docs/GetAllDataViews200ResponseDataViewInner.md
@@ -0,0 +1,160 @@
+# GetAllDataViews200ResponseDataViewInner
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Id** | Pointer to **string** | | [optional]
+**Name** | Pointer to **string** | | [optional]
+**Namespaces** | Pointer to **[]string** | | [optional]
+**Title** | Pointer to **string** | | [optional]
+**TypeMeta** | Pointer to **map[string]interface{}** | | [optional]
+
+## Methods
+
+### NewGetAllDataViews200ResponseDataViewInner
+
+`func NewGetAllDataViews200ResponseDataViewInner() *GetAllDataViews200ResponseDataViewInner`
+
+NewGetAllDataViews200ResponseDataViewInner instantiates a new GetAllDataViews200ResponseDataViewInner object
+This constructor will assign default values to properties that have it defined,
+and makes sure properties required by API are set, but the set of arguments
+will change when the set of required properties is changed
+
+### NewGetAllDataViews200ResponseDataViewInnerWithDefaults
+
+`func NewGetAllDataViews200ResponseDataViewInnerWithDefaults() *GetAllDataViews200ResponseDataViewInner`
+
+NewGetAllDataViews200ResponseDataViewInnerWithDefaults instantiates a new GetAllDataViews200ResponseDataViewInner object
+This constructor will only assign default values to properties that have it defined,
+but it doesn't guarantee that properties required by API are set
+
+### GetId
+
+`func (o *GetAllDataViews200ResponseDataViewInner) GetId() string`
+
+GetId returns the Id field if non-nil, zero value otherwise.
+
+### GetIdOk
+
+`func (o *GetAllDataViews200ResponseDataViewInner) GetIdOk() (*string, bool)`
+
+GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetId
+
+`func (o *GetAllDataViews200ResponseDataViewInner) SetId(v string)`
+
+SetId sets Id field to given value.
+
+### HasId
+
+`func (o *GetAllDataViews200ResponseDataViewInner) HasId() bool`
+
+HasId returns a boolean if a field has been set.
+
+### GetName
+
+`func (o *GetAllDataViews200ResponseDataViewInner) GetName() string`
+
+GetName returns the Name field if non-nil, zero value otherwise.
+
+### GetNameOk
+
+`func (o *GetAllDataViews200ResponseDataViewInner) GetNameOk() (*string, bool)`
+
+GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetName
+
+`func (o *GetAllDataViews200ResponseDataViewInner) SetName(v string)`
+
+SetName sets Name field to given value.
+
+### HasName
+
+`func (o *GetAllDataViews200ResponseDataViewInner) HasName() bool`
+
+HasName returns a boolean if a field has been set.
+
+### GetNamespaces
+
+`func (o *GetAllDataViews200ResponseDataViewInner) GetNamespaces() []string`
+
+GetNamespaces returns the Namespaces field if non-nil, zero value otherwise.
+
+### GetNamespacesOk
+
+`func (o *GetAllDataViews200ResponseDataViewInner) GetNamespacesOk() (*[]string, bool)`
+
+GetNamespacesOk returns a tuple with the Namespaces field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetNamespaces
+
+`func (o *GetAllDataViews200ResponseDataViewInner) SetNamespaces(v []string)`
+
+SetNamespaces sets Namespaces field to given value.
+
+### HasNamespaces
+
+`func (o *GetAllDataViews200ResponseDataViewInner) HasNamespaces() bool`
+
+HasNamespaces returns a boolean if a field has been set.
+
+### GetTitle
+
+`func (o *GetAllDataViews200ResponseDataViewInner) GetTitle() string`
+
+GetTitle returns the Title field if non-nil, zero value otherwise.
+
+### GetTitleOk
+
+`func (o *GetAllDataViews200ResponseDataViewInner) GetTitleOk() (*string, bool)`
+
+GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetTitle
+
+`func (o *GetAllDataViews200ResponseDataViewInner) SetTitle(v string)`
+
+SetTitle sets Title field to given value.
+
+### HasTitle
+
+`func (o *GetAllDataViews200ResponseDataViewInner) HasTitle() bool`
+
+HasTitle returns a boolean if a field has been set.
+
+### GetTypeMeta
+
+`func (o *GetAllDataViews200ResponseDataViewInner) GetTypeMeta() map[string]interface{}`
+
+GetTypeMeta returns the TypeMeta field if non-nil, zero value otherwise.
+
+### GetTypeMetaOk
+
+`func (o *GetAllDataViews200ResponseDataViewInner) GetTypeMetaOk() (*map[string]interface{}, bool)`
+
+GetTypeMetaOk returns a tuple with the TypeMeta field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetTypeMeta
+
+`func (o *GetAllDataViews200ResponseDataViewInner) SetTypeMeta(v map[string]interface{})`
+
+SetTypeMeta sets TypeMeta field to given value.
+
+### HasTypeMeta
+
+`func (o *GetAllDataViews200ResponseDataViewInner) HasTypeMeta() bool`
+
+HasTypeMeta returns a boolean if a field has been set.
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/generated/data_views/docs/GetDefaultDataView200Response.md b/generated/data_views/docs/GetDefaultDataView200Response.md
new file mode 100644
index 000000000..d83f33709
--- /dev/null
+++ b/generated/data_views/docs/GetDefaultDataView200Response.md
@@ -0,0 +1,56 @@
+# GetDefaultDataView200Response
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**DataViewId** | Pointer to **string** | | [optional]
+
+## Methods
+
+### NewGetDefaultDataView200Response
+
+`func NewGetDefaultDataView200Response() *GetDefaultDataView200Response`
+
+NewGetDefaultDataView200Response instantiates a new GetDefaultDataView200Response object
+This constructor will assign default values to properties that have it defined,
+and makes sure properties required by API are set, but the set of arguments
+will change when the set of required properties is changed
+
+### NewGetDefaultDataView200ResponseWithDefaults
+
+`func NewGetDefaultDataView200ResponseWithDefaults() *GetDefaultDataView200Response`
+
+NewGetDefaultDataView200ResponseWithDefaults instantiates a new GetDefaultDataView200Response object
+This constructor will only assign default values to properties that have it defined,
+but it doesn't guarantee that properties required by API are set
+
+### GetDataViewId
+
+`func (o *GetDefaultDataView200Response) GetDataViewId() string`
+
+GetDataViewId returns the DataViewId field if non-nil, zero value otherwise.
+
+### GetDataViewIdOk
+
+`func (o *GetDefaultDataView200Response) GetDataViewIdOk() (*string, bool)`
+
+GetDataViewIdOk returns a tuple with the DataViewId field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetDataViewId
+
+`func (o *GetDefaultDataView200Response) SetDataViewId(v string)`
+
+SetDataViewId sets DataViewId field to given value.
+
+### HasDataViewId
+
+`func (o *GetDefaultDataView200Response) HasDataViewId() bool`
+
+HasDataViewId returns a boolean if a field has been set.
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/generated/data_views/docs/GetRuntimeField200Response.md b/generated/data_views/docs/GetRuntimeField200Response.md
new file mode 100644
index 000000000..0994054a3
--- /dev/null
+++ b/generated/data_views/docs/GetRuntimeField200Response.md
@@ -0,0 +1,82 @@
+# GetRuntimeField200Response
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**DataView** | Pointer to **map[string]interface{}** | | [optional]
+**Fields** | Pointer to **[]map[string]interface{}** | | [optional]
+
+## Methods
+
+### NewGetRuntimeField200Response
+
+`func NewGetRuntimeField200Response() *GetRuntimeField200Response`
+
+NewGetRuntimeField200Response instantiates a new GetRuntimeField200Response object
+This constructor will assign default values to properties that have it defined,
+and makes sure properties required by API are set, but the set of arguments
+will change when the set of required properties is changed
+
+### NewGetRuntimeField200ResponseWithDefaults
+
+`func NewGetRuntimeField200ResponseWithDefaults() *GetRuntimeField200Response`
+
+NewGetRuntimeField200ResponseWithDefaults instantiates a new GetRuntimeField200Response object
+This constructor will only assign default values to properties that have it defined,
+but it doesn't guarantee that properties required by API are set
+
+### GetDataView
+
+`func (o *GetRuntimeField200Response) GetDataView() map[string]interface{}`
+
+GetDataView returns the DataView field if non-nil, zero value otherwise.
+
+### GetDataViewOk
+
+`func (o *GetRuntimeField200Response) GetDataViewOk() (*map[string]interface{}, bool)`
+
+GetDataViewOk returns a tuple with the DataView field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetDataView
+
+`func (o *GetRuntimeField200Response) SetDataView(v map[string]interface{})`
+
+SetDataView sets DataView field to given value.
+
+### HasDataView
+
+`func (o *GetRuntimeField200Response) HasDataView() bool`
+
+HasDataView returns a boolean if a field has been set.
+
+### GetFields
+
+`func (o *GetRuntimeField200Response) GetFields() []map[string]interface{}`
+
+GetFields returns the Fields field if non-nil, zero value otherwise.
+
+### GetFieldsOk
+
+`func (o *GetRuntimeField200Response) GetFieldsOk() (*[]map[string]interface{}, bool)`
+
+GetFieldsOk returns a tuple with the Fields field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetFields
+
+`func (o *GetRuntimeField200Response) SetFields(v []map[string]interface{})`
+
+SetFields sets Fields field to given value.
+
+### HasFields
+
+`func (o *GetRuntimeField200Response) HasFields() bool`
+
+HasFields returns a boolean if a field has been set.
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/generated/data_views/docs/Model400Response.md b/generated/data_views/docs/Model400Response.md
new file mode 100644
index 000000000..3ddd9fbe5
--- /dev/null
+++ b/generated/data_views/docs/Model400Response.md
@@ -0,0 +1,93 @@
+# Model400Response
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**StatusCode** | **float32** | |
+**Error** | **string** | |
+**Message** | **string** | |
+
+## Methods
+
+### NewModel400Response
+
+`func NewModel400Response(statusCode float32, error_ string, message string, ) *Model400Response`
+
+NewModel400Response instantiates a new Model400Response object
+This constructor will assign default values to properties that have it defined,
+and makes sure properties required by API are set, but the set of arguments
+will change when the set of required properties is changed
+
+### NewModel400ResponseWithDefaults
+
+`func NewModel400ResponseWithDefaults() *Model400Response`
+
+NewModel400ResponseWithDefaults instantiates a new Model400Response object
+This constructor will only assign default values to properties that have it defined,
+but it doesn't guarantee that properties required by API are set
+
+### GetStatusCode
+
+`func (o *Model400Response) GetStatusCode() float32`
+
+GetStatusCode returns the StatusCode field if non-nil, zero value otherwise.
+
+### GetStatusCodeOk
+
+`func (o *Model400Response) GetStatusCodeOk() (*float32, bool)`
+
+GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetStatusCode
+
+`func (o *Model400Response) SetStatusCode(v float32)`
+
+SetStatusCode sets StatusCode field to given value.
+
+
+### GetError
+
+`func (o *Model400Response) GetError() string`
+
+GetError returns the Error field if non-nil, zero value otherwise.
+
+### GetErrorOk
+
+`func (o *Model400Response) GetErrorOk() (*string, bool)`
+
+GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetError
+
+`func (o *Model400Response) SetError(v string)`
+
+SetError sets Error field to given value.
+
+
+### GetMessage
+
+`func (o *Model400Response) GetMessage() string`
+
+GetMessage returns the Message field if non-nil, zero value otherwise.
+
+### GetMessageOk
+
+`func (o *Model400Response) GetMessageOk() (*string, bool)`
+
+GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetMessage
+
+`func (o *Model400Response) SetMessage(v string)`
+
+SetMessage sets Message field to given value.
+
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/generated/data_views/docs/Model404Response.md b/generated/data_views/docs/Model404Response.md
new file mode 100644
index 000000000..1bfd84837
--- /dev/null
+++ b/generated/data_views/docs/Model404Response.md
@@ -0,0 +1,108 @@
+# Model404Response
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Error** | Pointer to **string** | | [optional]
+**Message** | Pointer to **string** | | [optional]
+**StatusCode** | Pointer to **int32** | | [optional]
+
+## Methods
+
+### NewModel404Response
+
+`func NewModel404Response() *Model404Response`
+
+NewModel404Response instantiates a new Model404Response object
+This constructor will assign default values to properties that have it defined,
+and makes sure properties required by API are set, but the set of arguments
+will change when the set of required properties is changed
+
+### NewModel404ResponseWithDefaults
+
+`func NewModel404ResponseWithDefaults() *Model404Response`
+
+NewModel404ResponseWithDefaults instantiates a new Model404Response object
+This constructor will only assign default values to properties that have it defined,
+but it doesn't guarantee that properties required by API are set
+
+### GetError
+
+`func (o *Model404Response) GetError() string`
+
+GetError returns the Error field if non-nil, zero value otherwise.
+
+### GetErrorOk
+
+`func (o *Model404Response) GetErrorOk() (*string, bool)`
+
+GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetError
+
+`func (o *Model404Response) SetError(v string)`
+
+SetError sets Error field to given value.
+
+### HasError
+
+`func (o *Model404Response) HasError() bool`
+
+HasError returns a boolean if a field has been set.
+
+### GetMessage
+
+`func (o *Model404Response) GetMessage() string`
+
+GetMessage returns the Message field if non-nil, zero value otherwise.
+
+### GetMessageOk
+
+`func (o *Model404Response) GetMessageOk() (*string, bool)`
+
+GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetMessage
+
+`func (o *Model404Response) SetMessage(v string)`
+
+SetMessage sets Message field to given value.
+
+### HasMessage
+
+`func (o *Model404Response) HasMessage() bool`
+
+HasMessage returns a boolean if a field has been set.
+
+### GetStatusCode
+
+`func (o *Model404Response) GetStatusCode() int32`
+
+GetStatusCode returns the StatusCode field if non-nil, zero value otherwise.
+
+### GetStatusCodeOk
+
+`func (o *Model404Response) GetStatusCodeOk() (*int32, bool)`
+
+GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetStatusCode
+
+`func (o *Model404Response) SetStatusCode(v int32)`
+
+SetStatusCode sets StatusCode field to given value.
+
+### HasStatusCode
+
+`func (o *Model404Response) HasStatusCode() bool`
+
+HasStatusCode returns a boolean if a field has been set.
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/generated/data_views/docs/SetDefaultDatailViewRequest.md b/generated/data_views/docs/SetDefaultDatailViewRequest.md
new file mode 100644
index 000000000..d33ef8986
--- /dev/null
+++ b/generated/data_views/docs/SetDefaultDatailViewRequest.md
@@ -0,0 +1,87 @@
+# SetDefaultDatailViewRequest
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**DataViewId** | **interface{}** | The data view identifier. NOTE: The API does not validate whether it is a valid identifier. Use `null` to unset the default data view. |
+**Force** | Pointer to **bool** | Update an existing default data view identifier. | [optional] [default to false]
+
+## Methods
+
+### NewSetDefaultDatailViewRequest
+
+`func NewSetDefaultDatailViewRequest(dataViewId interface{}, ) *SetDefaultDatailViewRequest`
+
+NewSetDefaultDatailViewRequest instantiates a new SetDefaultDatailViewRequest object
+This constructor will assign default values to properties that have it defined,
+and makes sure properties required by API are set, but the set of arguments
+will change when the set of required properties is changed
+
+### NewSetDefaultDatailViewRequestWithDefaults
+
+`func NewSetDefaultDatailViewRequestWithDefaults() *SetDefaultDatailViewRequest`
+
+NewSetDefaultDatailViewRequestWithDefaults instantiates a new SetDefaultDatailViewRequest object
+This constructor will only assign default values to properties that have it defined,
+but it doesn't guarantee that properties required by API are set
+
+### GetDataViewId
+
+`func (o *SetDefaultDatailViewRequest) GetDataViewId() interface{}`
+
+GetDataViewId returns the DataViewId field if non-nil, zero value otherwise.
+
+### GetDataViewIdOk
+
+`func (o *SetDefaultDatailViewRequest) GetDataViewIdOk() (*interface{}, bool)`
+
+GetDataViewIdOk returns a tuple with the DataViewId field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetDataViewId
+
+`func (o *SetDefaultDatailViewRequest) SetDataViewId(v interface{})`
+
+SetDataViewId sets DataViewId field to given value.
+
+
+### SetDataViewIdNil
+
+`func (o *SetDefaultDatailViewRequest) SetDataViewIdNil(b bool)`
+
+ SetDataViewIdNil sets the value for DataViewId to be an explicit nil
+
+### UnsetDataViewId
+`func (o *SetDefaultDatailViewRequest) UnsetDataViewId()`
+
+UnsetDataViewId ensures that no value is present for DataViewId, not even an explicit nil
+### GetForce
+
+`func (o *SetDefaultDatailViewRequest) GetForce() bool`
+
+GetForce returns the Force field if non-nil, zero value otherwise.
+
+### GetForceOk
+
+`func (o *SetDefaultDatailViewRequest) GetForceOk() (*bool, bool)`
+
+GetForceOk returns a tuple with the Force field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetForce
+
+`func (o *SetDefaultDatailViewRequest) SetForce(v bool)`
+
+SetForce sets Force field to given value.
+
+### HasForce
+
+`func (o *SetDefaultDatailViewRequest) HasForce() bool`
+
+HasForce returns a boolean if a field has been set.
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/generated/data_views/docs/SourcefiltersInner.md b/generated/data_views/docs/SourcefiltersInner.md
new file mode 100644
index 000000000..653e07a54
--- /dev/null
+++ b/generated/data_views/docs/SourcefiltersInner.md
@@ -0,0 +1,51 @@
+# SourcefiltersInner
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Value** | **string** | |
+
+## Methods
+
+### NewSourcefiltersInner
+
+`func NewSourcefiltersInner(value string, ) *SourcefiltersInner`
+
+NewSourcefiltersInner instantiates a new SourcefiltersInner object
+This constructor will assign default values to properties that have it defined,
+and makes sure properties required by API are set, but the set of arguments
+will change when the set of required properties is changed
+
+### NewSourcefiltersInnerWithDefaults
+
+`func NewSourcefiltersInnerWithDefaults() *SourcefiltersInner`
+
+NewSourcefiltersInnerWithDefaults instantiates a new SourcefiltersInner object
+This constructor will only assign default values to properties that have it defined,
+but it doesn't guarantee that properties required by API are set
+
+### GetValue
+
+`func (o *SourcefiltersInner) GetValue() string`
+
+GetValue returns the Value field if non-nil, zero value otherwise.
+
+### GetValueOk
+
+`func (o *SourcefiltersInner) GetValueOk() (*string, bool)`
+
+GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetValue
+
+`func (o *SourcefiltersInner) SetValue(v string)`
+
+SetValue sets Value field to given value.
+
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/generated/data_views/docs/UpdateDataViewRequestObject.md b/generated/data_views/docs/UpdateDataViewRequestObject.md
new file mode 100644
index 000000000..e94a1a3ed
--- /dev/null
+++ b/generated/data_views/docs/UpdateDataViewRequestObject.md
@@ -0,0 +1,77 @@
+# UpdateDataViewRequestObject
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**DataView** | [**UpdateDataViewRequestObjectDataView**](UpdateDataViewRequestObjectDataView.md) | |
+**RefreshFields** | Pointer to **bool** | Reloads the data view fields after the data view is updated. | [optional] [default to false]
+
+## Methods
+
+### NewUpdateDataViewRequestObject
+
+`func NewUpdateDataViewRequestObject(dataView UpdateDataViewRequestObjectDataView, ) *UpdateDataViewRequestObject`
+
+NewUpdateDataViewRequestObject instantiates a new UpdateDataViewRequestObject object
+This constructor will assign default values to properties that have it defined,
+and makes sure properties required by API are set, but the set of arguments
+will change when the set of required properties is changed
+
+### NewUpdateDataViewRequestObjectWithDefaults
+
+`func NewUpdateDataViewRequestObjectWithDefaults() *UpdateDataViewRequestObject`
+
+NewUpdateDataViewRequestObjectWithDefaults instantiates a new UpdateDataViewRequestObject object
+This constructor will only assign default values to properties that have it defined,
+but it doesn't guarantee that properties required by API are set
+
+### GetDataView
+
+`func (o *UpdateDataViewRequestObject) GetDataView() UpdateDataViewRequestObjectDataView`
+
+GetDataView returns the DataView field if non-nil, zero value otherwise.
+
+### GetDataViewOk
+
+`func (o *UpdateDataViewRequestObject) GetDataViewOk() (*UpdateDataViewRequestObjectDataView, bool)`
+
+GetDataViewOk returns a tuple with the DataView field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetDataView
+
+`func (o *UpdateDataViewRequestObject) SetDataView(v UpdateDataViewRequestObjectDataView)`
+
+SetDataView sets DataView field to given value.
+
+
+### GetRefreshFields
+
+`func (o *UpdateDataViewRequestObject) GetRefreshFields() bool`
+
+GetRefreshFields returns the RefreshFields field if non-nil, zero value otherwise.
+
+### GetRefreshFieldsOk
+
+`func (o *UpdateDataViewRequestObject) GetRefreshFieldsOk() (*bool, bool)`
+
+GetRefreshFieldsOk returns a tuple with the RefreshFields field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetRefreshFields
+
+`func (o *UpdateDataViewRequestObject) SetRefreshFields(v bool)`
+
+SetRefreshFields sets RefreshFields field to given value.
+
+### HasRefreshFields
+
+`func (o *UpdateDataViewRequestObject) HasRefreshFields() bool`
+
+HasRefreshFields returns a boolean if a field has been set.
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/generated/data_views/docs/UpdateDataViewRequestObjectDataView.md b/generated/data_views/docs/UpdateDataViewRequestObjectDataView.md
new file mode 100644
index 000000000..6ca9e7c06
--- /dev/null
+++ b/generated/data_views/docs/UpdateDataViewRequestObjectDataView.md
@@ -0,0 +1,290 @@
+# UpdateDataViewRequestObjectDataView
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**AllowNoIndex** | Pointer to **bool** | Allows the data view saved object to exist before the data is available. | [optional]
+**FieldFormats** | Pointer to **map[string]interface{}** | A map of field formats by field name. | [optional]
+**Fields** | Pointer to **map[string]interface{}** | | [optional]
+**Name** | Pointer to **string** | | [optional]
+**RuntimeFieldMap** | Pointer to **map[string]interface{}** | A map of runtime field definitions by field name. | [optional]
+**SourceFilters** | Pointer to [**[]SourcefiltersInner**](SourcefiltersInner.md) | The array of field names you want to filter out in Discover. | [optional]
+**TimeFieldName** | Pointer to **string** | The timestamp field name, which you use for time-based data views. | [optional]
+**Title** | Pointer to **string** | Comma-separated list of data streams, indices, and aliases that you want to search. Supports wildcards (`*`). | [optional]
+**Type** | Pointer to **string** | When set to `rollup`, identifies the rollup data views. | [optional]
+**TypeMeta** | Pointer to **map[string]interface{}** | When you use rollup indices, contains the field list for the rollup data view API endpoints. | [optional]
+
+## Methods
+
+### NewUpdateDataViewRequestObjectDataView
+
+`func NewUpdateDataViewRequestObjectDataView() *UpdateDataViewRequestObjectDataView`
+
+NewUpdateDataViewRequestObjectDataView instantiates a new UpdateDataViewRequestObjectDataView object
+This constructor will assign default values to properties that have it defined,
+and makes sure properties required by API are set, but the set of arguments
+will change when the set of required properties is changed
+
+### NewUpdateDataViewRequestObjectDataViewWithDefaults
+
+`func NewUpdateDataViewRequestObjectDataViewWithDefaults() *UpdateDataViewRequestObjectDataView`
+
+NewUpdateDataViewRequestObjectDataViewWithDefaults instantiates a new UpdateDataViewRequestObjectDataView object
+This constructor will only assign default values to properties that have it defined,
+but it doesn't guarantee that properties required by API are set
+
+### GetAllowNoIndex
+
+`func (o *UpdateDataViewRequestObjectDataView) GetAllowNoIndex() bool`
+
+GetAllowNoIndex returns the AllowNoIndex field if non-nil, zero value otherwise.
+
+### GetAllowNoIndexOk
+
+`func (o *UpdateDataViewRequestObjectDataView) GetAllowNoIndexOk() (*bool, bool)`
+
+GetAllowNoIndexOk returns a tuple with the AllowNoIndex field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetAllowNoIndex
+
+`func (o *UpdateDataViewRequestObjectDataView) SetAllowNoIndex(v bool)`
+
+SetAllowNoIndex sets AllowNoIndex field to given value.
+
+### HasAllowNoIndex
+
+`func (o *UpdateDataViewRequestObjectDataView) HasAllowNoIndex() bool`
+
+HasAllowNoIndex returns a boolean if a field has been set.
+
+### GetFieldFormats
+
+`func (o *UpdateDataViewRequestObjectDataView) GetFieldFormats() map[string]interface{}`
+
+GetFieldFormats returns the FieldFormats field if non-nil, zero value otherwise.
+
+### GetFieldFormatsOk
+
+`func (o *UpdateDataViewRequestObjectDataView) GetFieldFormatsOk() (*map[string]interface{}, bool)`
+
+GetFieldFormatsOk returns a tuple with the FieldFormats field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetFieldFormats
+
+`func (o *UpdateDataViewRequestObjectDataView) SetFieldFormats(v map[string]interface{})`
+
+SetFieldFormats sets FieldFormats field to given value.
+
+### HasFieldFormats
+
+`func (o *UpdateDataViewRequestObjectDataView) HasFieldFormats() bool`
+
+HasFieldFormats returns a boolean if a field has been set.
+
+### GetFields
+
+`func (o *UpdateDataViewRequestObjectDataView) GetFields() map[string]interface{}`
+
+GetFields returns the Fields field if non-nil, zero value otherwise.
+
+### GetFieldsOk
+
+`func (o *UpdateDataViewRequestObjectDataView) GetFieldsOk() (*map[string]interface{}, bool)`
+
+GetFieldsOk returns a tuple with the Fields field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetFields
+
+`func (o *UpdateDataViewRequestObjectDataView) SetFields(v map[string]interface{})`
+
+SetFields sets Fields field to given value.
+
+### HasFields
+
+`func (o *UpdateDataViewRequestObjectDataView) HasFields() bool`
+
+HasFields returns a boolean if a field has been set.
+
+### GetName
+
+`func (o *UpdateDataViewRequestObjectDataView) GetName() string`
+
+GetName returns the Name field if non-nil, zero value otherwise.
+
+### GetNameOk
+
+`func (o *UpdateDataViewRequestObjectDataView) GetNameOk() (*string, bool)`
+
+GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetName
+
+`func (o *UpdateDataViewRequestObjectDataView) SetName(v string)`
+
+SetName sets Name field to given value.
+
+### HasName
+
+`func (o *UpdateDataViewRequestObjectDataView) HasName() bool`
+
+HasName returns a boolean if a field has been set.
+
+### GetRuntimeFieldMap
+
+`func (o *UpdateDataViewRequestObjectDataView) GetRuntimeFieldMap() map[string]interface{}`
+
+GetRuntimeFieldMap returns the RuntimeFieldMap field if non-nil, zero value otherwise.
+
+### GetRuntimeFieldMapOk
+
+`func (o *UpdateDataViewRequestObjectDataView) GetRuntimeFieldMapOk() (*map[string]interface{}, bool)`
+
+GetRuntimeFieldMapOk returns a tuple with the RuntimeFieldMap field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetRuntimeFieldMap
+
+`func (o *UpdateDataViewRequestObjectDataView) SetRuntimeFieldMap(v map[string]interface{})`
+
+SetRuntimeFieldMap sets RuntimeFieldMap field to given value.
+
+### HasRuntimeFieldMap
+
+`func (o *UpdateDataViewRequestObjectDataView) HasRuntimeFieldMap() bool`
+
+HasRuntimeFieldMap returns a boolean if a field has been set.
+
+### GetSourceFilters
+
+`func (o *UpdateDataViewRequestObjectDataView) GetSourceFilters() []SourcefiltersInner`
+
+GetSourceFilters returns the SourceFilters field if non-nil, zero value otherwise.
+
+### GetSourceFiltersOk
+
+`func (o *UpdateDataViewRequestObjectDataView) GetSourceFiltersOk() (*[]SourcefiltersInner, bool)`
+
+GetSourceFiltersOk returns a tuple with the SourceFilters field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetSourceFilters
+
+`func (o *UpdateDataViewRequestObjectDataView) SetSourceFilters(v []SourcefiltersInner)`
+
+SetSourceFilters sets SourceFilters field to given value.
+
+### HasSourceFilters
+
+`func (o *UpdateDataViewRequestObjectDataView) HasSourceFilters() bool`
+
+HasSourceFilters returns a boolean if a field has been set.
+
+### GetTimeFieldName
+
+`func (o *UpdateDataViewRequestObjectDataView) GetTimeFieldName() string`
+
+GetTimeFieldName returns the TimeFieldName field if non-nil, zero value otherwise.
+
+### GetTimeFieldNameOk
+
+`func (o *UpdateDataViewRequestObjectDataView) GetTimeFieldNameOk() (*string, bool)`
+
+GetTimeFieldNameOk returns a tuple with the TimeFieldName field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetTimeFieldName
+
+`func (o *UpdateDataViewRequestObjectDataView) SetTimeFieldName(v string)`
+
+SetTimeFieldName sets TimeFieldName field to given value.
+
+### HasTimeFieldName
+
+`func (o *UpdateDataViewRequestObjectDataView) HasTimeFieldName() bool`
+
+HasTimeFieldName returns a boolean if a field has been set.
+
+### GetTitle
+
+`func (o *UpdateDataViewRequestObjectDataView) GetTitle() string`
+
+GetTitle returns the Title field if non-nil, zero value otherwise.
+
+### GetTitleOk
+
+`func (o *UpdateDataViewRequestObjectDataView) GetTitleOk() (*string, bool)`
+
+GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetTitle
+
+`func (o *UpdateDataViewRequestObjectDataView) SetTitle(v string)`
+
+SetTitle sets Title field to given value.
+
+### HasTitle
+
+`func (o *UpdateDataViewRequestObjectDataView) HasTitle() bool`
+
+HasTitle returns a boolean if a field has been set.
+
+### GetType
+
+`func (o *UpdateDataViewRequestObjectDataView) GetType() string`
+
+GetType returns the Type field if non-nil, zero value otherwise.
+
+### GetTypeOk
+
+`func (o *UpdateDataViewRequestObjectDataView) GetTypeOk() (*string, bool)`
+
+GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetType
+
+`func (o *UpdateDataViewRequestObjectDataView) SetType(v string)`
+
+SetType sets Type field to given value.
+
+### HasType
+
+`func (o *UpdateDataViewRequestObjectDataView) HasType() bool`
+
+HasType returns a boolean if a field has been set.
+
+### GetTypeMeta
+
+`func (o *UpdateDataViewRequestObjectDataView) GetTypeMeta() map[string]interface{}`
+
+GetTypeMeta returns the TypeMeta field if non-nil, zero value otherwise.
+
+### GetTypeMetaOk
+
+`func (o *UpdateDataViewRequestObjectDataView) GetTypeMetaOk() (*map[string]interface{}, bool)`
+
+GetTypeMetaOk returns a tuple with the TypeMeta field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetTypeMeta
+
+`func (o *UpdateDataViewRequestObjectDataView) SetTypeMeta(v map[string]interface{})`
+
+SetTypeMeta sets TypeMeta field to given value.
+
+### HasTypeMeta
+
+`func (o *UpdateDataViewRequestObjectDataView) HasTypeMeta() bool`
+
+HasTypeMeta returns a boolean if a field has been set.
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/generated/data_views/docs/UpdateFieldsMetadata200Response.md b/generated/data_views/docs/UpdateFieldsMetadata200Response.md
new file mode 100644
index 000000000..03cfbe5cd
--- /dev/null
+++ b/generated/data_views/docs/UpdateFieldsMetadata200Response.md
@@ -0,0 +1,56 @@
+# UpdateFieldsMetadata200Response
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Acknowledged** | Pointer to **bool** | | [optional]
+
+## Methods
+
+### NewUpdateFieldsMetadata200Response
+
+`func NewUpdateFieldsMetadata200Response() *UpdateFieldsMetadata200Response`
+
+NewUpdateFieldsMetadata200Response instantiates a new UpdateFieldsMetadata200Response object
+This constructor will assign default values to properties that have it defined,
+and makes sure properties required by API are set, but the set of arguments
+will change when the set of required properties is changed
+
+### NewUpdateFieldsMetadata200ResponseWithDefaults
+
+`func NewUpdateFieldsMetadata200ResponseWithDefaults() *UpdateFieldsMetadata200Response`
+
+NewUpdateFieldsMetadata200ResponseWithDefaults instantiates a new UpdateFieldsMetadata200Response object
+This constructor will only assign default values to properties that have it defined,
+but it doesn't guarantee that properties required by API are set
+
+### GetAcknowledged
+
+`func (o *UpdateFieldsMetadata200Response) GetAcknowledged() bool`
+
+GetAcknowledged returns the Acknowledged field if non-nil, zero value otherwise.
+
+### GetAcknowledgedOk
+
+`func (o *UpdateFieldsMetadata200Response) GetAcknowledgedOk() (*bool, bool)`
+
+GetAcknowledgedOk returns a tuple with the Acknowledged field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetAcknowledged
+
+`func (o *UpdateFieldsMetadata200Response) SetAcknowledged(v bool)`
+
+SetAcknowledged sets Acknowledged field to given value.
+
+### HasAcknowledged
+
+`func (o *UpdateFieldsMetadata200Response) HasAcknowledged() bool`
+
+HasAcknowledged returns a boolean if a field has been set.
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/generated/data_views/docs/UpdateFieldsMetadataRequest.md b/generated/data_views/docs/UpdateFieldsMetadataRequest.md
new file mode 100644
index 000000000..a7635babc
--- /dev/null
+++ b/generated/data_views/docs/UpdateFieldsMetadataRequest.md
@@ -0,0 +1,51 @@
+# UpdateFieldsMetadataRequest
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Fields** | **map[string]interface{}** | The field object. |
+
+## Methods
+
+### NewUpdateFieldsMetadataRequest
+
+`func NewUpdateFieldsMetadataRequest(fields map[string]interface{}, ) *UpdateFieldsMetadataRequest`
+
+NewUpdateFieldsMetadataRequest instantiates a new UpdateFieldsMetadataRequest object
+This constructor will assign default values to properties that have it defined,
+and makes sure properties required by API are set, but the set of arguments
+will change when the set of required properties is changed
+
+### NewUpdateFieldsMetadataRequestWithDefaults
+
+`func NewUpdateFieldsMetadataRequestWithDefaults() *UpdateFieldsMetadataRequest`
+
+NewUpdateFieldsMetadataRequestWithDefaults instantiates a new UpdateFieldsMetadataRequest object
+This constructor will only assign default values to properties that have it defined,
+but it doesn't guarantee that properties required by API are set
+
+### GetFields
+
+`func (o *UpdateFieldsMetadataRequest) GetFields() map[string]interface{}`
+
+GetFields returns the Fields field if non-nil, zero value otherwise.
+
+### GetFieldsOk
+
+`func (o *UpdateFieldsMetadataRequest) GetFieldsOk() (*map[string]interface{}, bool)`
+
+GetFieldsOk returns a tuple with the Fields field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetFields
+
+`func (o *UpdateFieldsMetadataRequest) SetFields(v map[string]interface{})`
+
+SetFields sets Fields field to given value.
+
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/generated/data_views/docs/UpdateRuntimeFieldRequest.md b/generated/data_views/docs/UpdateRuntimeFieldRequest.md
new file mode 100644
index 000000000..923fb29fb
--- /dev/null
+++ b/generated/data_views/docs/UpdateRuntimeFieldRequest.md
@@ -0,0 +1,51 @@
+# UpdateRuntimeFieldRequest
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**RuntimeField** | **map[string]interface{}** | The runtime field definition object. You can update following fields: - `type` - `script` |
+
+## Methods
+
+### NewUpdateRuntimeFieldRequest
+
+`func NewUpdateRuntimeFieldRequest(runtimeField map[string]interface{}, ) *UpdateRuntimeFieldRequest`
+
+NewUpdateRuntimeFieldRequest instantiates a new UpdateRuntimeFieldRequest object
+This constructor will assign default values to properties that have it defined,
+and makes sure properties required by API are set, but the set of arguments
+will change when the set of required properties is changed
+
+### NewUpdateRuntimeFieldRequestWithDefaults
+
+`func NewUpdateRuntimeFieldRequestWithDefaults() *UpdateRuntimeFieldRequest`
+
+NewUpdateRuntimeFieldRequestWithDefaults instantiates a new UpdateRuntimeFieldRequest object
+This constructor will only assign default values to properties that have it defined,
+but it doesn't guarantee that properties required by API are set
+
+### GetRuntimeField
+
+`func (o *UpdateRuntimeFieldRequest) GetRuntimeField() map[string]interface{}`
+
+GetRuntimeField returns the RuntimeField field if non-nil, zero value otherwise.
+
+### GetRuntimeFieldOk
+
+`func (o *UpdateRuntimeFieldRequest) GetRuntimeFieldOk() (*map[string]interface{}, bool)`
+
+GetRuntimeFieldOk returns a tuple with the RuntimeField field if it's non-nil, zero value otherwise
+and a boolean to check if the value has been set.
+
+### SetRuntimeField
+
+`func (o *UpdateRuntimeFieldRequest) SetRuntimeField(v map[string]interface{})`
+
+SetRuntimeField sets RuntimeField field to given value.
+
+
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/generated/data_views/git_push.sh b/generated/data_views/git_push.sh
new file mode 100644
index 000000000..9c304b700
--- /dev/null
+++ b/generated/data_views/git_push.sh
@@ -0,0 +1,57 @@
+#!/bin/sh
+# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
+#
+# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
+
+git_user_id=$1
+git_repo_id=$2
+release_note=$3
+git_host=$4
+
+if [ "$git_host" = "" ]; then
+ git_host="github.com"
+ echo "[INFO] No command line input provided. Set \$git_host to $git_host"
+fi
+
+if [ "$git_user_id" = "" ]; then
+ git_user_id="elastic"
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
+fi
+
+if [ "$git_repo_id" = "" ]; then
+ git_repo_id="terraform-provider-elasticstack"
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
+fi
+
+if [ "$release_note" = "" ]; then
+ release_note="Minor update"
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
+fi
+
+# Initialize the local directory as a Git repository
+git init
+
+# Adds the files in the local repository and stages them for commit.
+git add .
+
+# Commits the tracked changes and prepares them to be pushed to a remote repository.
+git commit -m "$release_note"
+
+# Sets the new remote
+git_remote=$(git remote)
+if [ "$git_remote" = "" ]; then # git remote not defined
+
+ if [ "$GIT_TOKEN" = "" ]; then
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
+ git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
+ else
+ git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
+ fi
+
+fi
+
+git pull origin master
+
+# Pushes (Forces) the changes in the local repository up to the remote repository
+echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
+git push origin master 2>&1 | grep -v 'To https'
diff --git a/generated/data_views/model_400_response.go b/generated/data_views/model_400_response.go
new file mode 100644
index 000000000..fb5d91545
--- /dev/null
+++ b/generated/data_views/model_400_response.go
@@ -0,0 +1,169 @@
+/*
+Data views
+
+OpenAPI schema for data view endpoints
+
+API version: 0.1
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package data_views
+
+import (
+ "encoding/json"
+)
+
+// checks if the Model400Response type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &Model400Response{}
+
+// Model400Response struct for Model400Response
+type Model400Response struct {
+ StatusCode float32 `json:"statusCode"`
+ Error string `json:"error"`
+ Message string `json:"message"`
+}
+
+// NewModel400Response instantiates a new Model400Response object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewModel400Response(statusCode float32, error_ string, message string) *Model400Response {
+ this := Model400Response{}
+ this.StatusCode = statusCode
+ this.Error = error_
+ this.Message = message
+ return &this
+}
+
+// NewModel400ResponseWithDefaults instantiates a new Model400Response object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewModel400ResponseWithDefaults() *Model400Response {
+ this := Model400Response{}
+ return &this
+}
+
+// GetStatusCode returns the StatusCode field value
+func (o *Model400Response) GetStatusCode() float32 {
+ if o == nil {
+ var ret float32
+ return ret
+ }
+
+ return o.StatusCode
+}
+
+// GetStatusCodeOk returns a tuple with the StatusCode field value
+// and a boolean to check if the value has been set.
+func (o *Model400Response) GetStatusCodeOk() (*float32, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.StatusCode, true
+}
+
+// SetStatusCode sets field value
+func (o *Model400Response) SetStatusCode(v float32) {
+ o.StatusCode = v
+}
+
+// GetError returns the Error field value
+func (o *Model400Response) GetError() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Error
+}
+
+// GetErrorOk returns a tuple with the Error field value
+// and a boolean to check if the value has been set.
+func (o *Model400Response) GetErrorOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Error, true
+}
+
+// SetError sets field value
+func (o *Model400Response) SetError(v string) {
+ o.Error = v
+}
+
+// GetMessage returns the Message field value
+func (o *Model400Response) GetMessage() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Message
+}
+
+// GetMessageOk returns a tuple with the Message field value
+// and a boolean to check if the value has been set.
+func (o *Model400Response) GetMessageOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Message, true
+}
+
+// SetMessage sets field value
+func (o *Model400Response) SetMessage(v string) {
+ o.Message = v
+}
+
+func (o Model400Response) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o Model400Response) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["statusCode"] = o.StatusCode
+ toSerialize["error"] = o.Error
+ toSerialize["message"] = o.Message
+ return toSerialize, nil
+}
+
+type NullableModel400Response struct {
+ value *Model400Response
+ isSet bool
+}
+
+func (v NullableModel400Response) Get() *Model400Response {
+ return v.value
+}
+
+func (v *NullableModel400Response) Set(val *Model400Response) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableModel400Response) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableModel400Response) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableModel400Response(val *Model400Response) *NullableModel400Response {
+ return &NullableModel400Response{value: val, isSet: true}
+}
+
+func (v NullableModel400Response) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableModel400Response) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/generated/data_views/model_404_response.go b/generated/data_views/model_404_response.go
new file mode 100644
index 000000000..d2d56e102
--- /dev/null
+++ b/generated/data_views/model_404_response.go
@@ -0,0 +1,196 @@
+/*
+Data views
+
+OpenAPI schema for data view endpoints
+
+API version: 0.1
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package data_views
+
+import (
+ "encoding/json"
+)
+
+// checks if the Model404Response type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &Model404Response{}
+
+// Model404Response struct for Model404Response
+type Model404Response struct {
+ Error *string `json:"error,omitempty"`
+ Message *string `json:"message,omitempty"`
+ StatusCode *int32 `json:"statusCode,omitempty"`
+}
+
+// NewModel404Response instantiates a new Model404Response object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewModel404Response() *Model404Response {
+ this := Model404Response{}
+ return &this
+}
+
+// NewModel404ResponseWithDefaults instantiates a new Model404Response object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewModel404ResponseWithDefaults() *Model404Response {
+ this := Model404Response{}
+ return &this
+}
+
+// GetError returns the Error field value if set, zero value otherwise.
+func (o *Model404Response) GetError() string {
+ if o == nil || IsNil(o.Error) {
+ var ret string
+ return ret
+ }
+ return *o.Error
+}
+
+// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Model404Response) GetErrorOk() (*string, bool) {
+ if o == nil || IsNil(o.Error) {
+ return nil, false
+ }
+ return o.Error, true
+}
+
+// HasError returns a boolean if a field has been set.
+func (o *Model404Response) HasError() bool {
+ if o != nil && !IsNil(o.Error) {
+ return true
+ }
+
+ return false
+}
+
+// SetError gets a reference to the given string and assigns it to the Error field.
+func (o *Model404Response) SetError(v string) {
+ o.Error = &v
+}
+
+// GetMessage returns the Message field value if set, zero value otherwise.
+func (o *Model404Response) GetMessage() string {
+ if o == nil || IsNil(o.Message) {
+ var ret string
+ return ret
+ }
+ return *o.Message
+}
+
+// GetMessageOk returns a tuple with the Message field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Model404Response) GetMessageOk() (*string, bool) {
+ if o == nil || IsNil(o.Message) {
+ return nil, false
+ }
+ return o.Message, true
+}
+
+// HasMessage returns a boolean if a field has been set.
+func (o *Model404Response) HasMessage() bool {
+ if o != nil && !IsNil(o.Message) {
+ return true
+ }
+
+ return false
+}
+
+// SetMessage gets a reference to the given string and assigns it to the Message field.
+func (o *Model404Response) SetMessage(v string) {
+ o.Message = &v
+}
+
+// GetStatusCode returns the StatusCode field value if set, zero value otherwise.
+func (o *Model404Response) GetStatusCode() int32 {
+ if o == nil || IsNil(o.StatusCode) {
+ var ret int32
+ return ret
+ }
+ return *o.StatusCode
+}
+
+// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Model404Response) GetStatusCodeOk() (*int32, bool) {
+ if o == nil || IsNil(o.StatusCode) {
+ return nil, false
+ }
+ return o.StatusCode, true
+}
+
+// HasStatusCode returns a boolean if a field has been set.
+func (o *Model404Response) HasStatusCode() bool {
+ if o != nil && !IsNil(o.StatusCode) {
+ return true
+ }
+
+ return false
+}
+
+// SetStatusCode gets a reference to the given int32 and assigns it to the StatusCode field.
+func (o *Model404Response) SetStatusCode(v int32) {
+ o.StatusCode = &v
+}
+
+func (o Model404Response) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o Model404Response) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Error) {
+ toSerialize["error"] = o.Error
+ }
+ if !IsNil(o.Message) {
+ toSerialize["message"] = o.Message
+ }
+ if !IsNil(o.StatusCode) {
+ toSerialize["statusCode"] = o.StatusCode
+ }
+ return toSerialize, nil
+}
+
+type NullableModel404Response struct {
+ value *Model404Response
+ isSet bool
+}
+
+func (v NullableModel404Response) Get() *Model404Response {
+ return v.value
+}
+
+func (v *NullableModel404Response) Set(val *Model404Response) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableModel404Response) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableModel404Response) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableModel404Response(val *Model404Response) *NullableModel404Response {
+ return &NullableModel404Response{value: val, isSet: true}
+}
+
+func (v NullableModel404Response) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableModel404Response) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/generated/data_views/model_create_data_view_request_object.go b/generated/data_views/model_create_data_view_request_object.go
new file mode 100644
index 000000000..d79756a45
--- /dev/null
+++ b/generated/data_views/model_create_data_view_request_object.go
@@ -0,0 +1,156 @@
+/*
+Data views
+
+OpenAPI schema for data view endpoints
+
+API version: 0.1
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package data_views
+
+import (
+ "encoding/json"
+)
+
+// checks if the CreateDataViewRequestObject type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &CreateDataViewRequestObject{}
+
+// CreateDataViewRequestObject struct for CreateDataViewRequestObject
+type CreateDataViewRequestObject struct {
+ DataView CreateDataViewRequestObjectDataView `json:"data_view"`
+ // Override an existing data view if a data view with the provided title already exists.
+ Override *bool `json:"override,omitempty"`
+}
+
+// NewCreateDataViewRequestObject instantiates a new CreateDataViewRequestObject object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewCreateDataViewRequestObject(dataView CreateDataViewRequestObjectDataView) *CreateDataViewRequestObject {
+ this := CreateDataViewRequestObject{}
+ this.DataView = dataView
+ var override bool = false
+ this.Override = &override
+ return &this
+}
+
+// NewCreateDataViewRequestObjectWithDefaults instantiates a new CreateDataViewRequestObject object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewCreateDataViewRequestObjectWithDefaults() *CreateDataViewRequestObject {
+ this := CreateDataViewRequestObject{}
+ var override bool = false
+ this.Override = &override
+ return &this
+}
+
+// GetDataView returns the DataView field value
+func (o *CreateDataViewRequestObject) GetDataView() CreateDataViewRequestObjectDataView {
+ if o == nil {
+ var ret CreateDataViewRequestObjectDataView
+ return ret
+ }
+
+ return o.DataView
+}
+
+// GetDataViewOk returns a tuple with the DataView field value
+// and a boolean to check if the value has been set.
+func (o *CreateDataViewRequestObject) GetDataViewOk() (*CreateDataViewRequestObjectDataView, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.DataView, true
+}
+
+// SetDataView sets field value
+func (o *CreateDataViewRequestObject) SetDataView(v CreateDataViewRequestObjectDataView) {
+ o.DataView = v
+}
+
+// GetOverride returns the Override field value if set, zero value otherwise.
+func (o *CreateDataViewRequestObject) GetOverride() bool {
+ if o == nil || IsNil(o.Override) {
+ var ret bool
+ return ret
+ }
+ return *o.Override
+}
+
+// GetOverrideOk returns a tuple with the Override field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CreateDataViewRequestObject) GetOverrideOk() (*bool, bool) {
+ if o == nil || IsNil(o.Override) {
+ return nil, false
+ }
+ return o.Override, true
+}
+
+// HasOverride returns a boolean if a field has been set.
+func (o *CreateDataViewRequestObject) HasOverride() bool {
+ if o != nil && !IsNil(o.Override) {
+ return true
+ }
+
+ return false
+}
+
+// SetOverride gets a reference to the given bool and assigns it to the Override field.
+func (o *CreateDataViewRequestObject) SetOverride(v bool) {
+ o.Override = &v
+}
+
+func (o CreateDataViewRequestObject) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o CreateDataViewRequestObject) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["data_view"] = o.DataView
+ if !IsNil(o.Override) {
+ toSerialize["override"] = o.Override
+ }
+ return toSerialize, nil
+}
+
+type NullableCreateDataViewRequestObject struct {
+ value *CreateDataViewRequestObject
+ isSet bool
+}
+
+func (v NullableCreateDataViewRequestObject) Get() *CreateDataViewRequestObject {
+ return v.value
+}
+
+func (v *NullableCreateDataViewRequestObject) Set(val *CreateDataViewRequestObject) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableCreateDataViewRequestObject) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableCreateDataViewRequestObject) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableCreateDataViewRequestObject(val *CreateDataViewRequestObject) *NullableCreateDataViewRequestObject {
+ return &NullableCreateDataViewRequestObject{value: val, isSet: true}
+}
+
+func (v NullableCreateDataViewRequestObject) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableCreateDataViewRequestObject) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/generated/data_views/model_create_data_view_request_object_data_view.go b/generated/data_views/model_create_data_view_request_object_data_view.go
new file mode 100644
index 000000000..a5b59e97d
--- /dev/null
+++ b/generated/data_views/model_create_data_view_request_object_data_view.go
@@ -0,0 +1,594 @@
+/*
+Data views
+
+OpenAPI schema for data view endpoints
+
+API version: 0.1
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package data_views
+
+import (
+ "encoding/json"
+)
+
+// checks if the CreateDataViewRequestObjectDataView type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &CreateDataViewRequestObjectDataView{}
+
+// CreateDataViewRequestObjectDataView The data view object.
+type CreateDataViewRequestObjectDataView struct {
+ // Allows the data view saved object to exist before the data is available.
+ AllowNoIndex *bool `json:"allowNoIndex,omitempty"`
+ // A map of field attributes by field name.
+ FieldAttrs map[string]interface{} `json:"fieldAttrs,omitempty"`
+ // A map of field formats by field name.
+ FieldFormats map[string]interface{} `json:"fieldFormats,omitempty"`
+ Fields map[string]interface{} `json:"fields,omitempty"`
+ Id *string `json:"id,omitempty"`
+ // The data view name.
+ Name *string `json:"name,omitempty"`
+ // An array of space identifiers for sharing the data view between multiple spaces.
+ Namespaces []string `json:"namespaces,omitempty"`
+ // A map of runtime field definitions by field name.
+ RuntimeFieldMap map[string]interface{} `json:"runtimeFieldMap,omitempty"`
+ // The array of field names you want to filter out in Discover.
+ SourceFilters []SourcefiltersInner `json:"sourceFilters,omitempty"`
+ // The timestamp field name, which you use for time-based data views.
+ TimeFieldName *string `json:"timeFieldName,omitempty"`
+ // Comma-separated list of data streams, indices, and aliases that you want to search. Supports wildcards (`*`).
+ Title string `json:"title"`
+ // When set to `rollup`, identifies the rollup data views.
+ Type *string `json:"type,omitempty"`
+ // When you use rollup indices, contains the field list for the rollup data view API endpoints.
+ TypeMeta map[string]interface{} `json:"typeMeta,omitempty"`
+ Version *string `json:"version,omitempty"`
+}
+
+// NewCreateDataViewRequestObjectDataView instantiates a new CreateDataViewRequestObjectDataView object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewCreateDataViewRequestObjectDataView(title string) *CreateDataViewRequestObjectDataView {
+ this := CreateDataViewRequestObjectDataView{}
+ this.Title = title
+ return &this
+}
+
+// NewCreateDataViewRequestObjectDataViewWithDefaults instantiates a new CreateDataViewRequestObjectDataView object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewCreateDataViewRequestObjectDataViewWithDefaults() *CreateDataViewRequestObjectDataView {
+ this := CreateDataViewRequestObjectDataView{}
+ return &this
+}
+
+// GetAllowNoIndex returns the AllowNoIndex field value if set, zero value otherwise.
+func (o *CreateDataViewRequestObjectDataView) GetAllowNoIndex() bool {
+ if o == nil || IsNil(o.AllowNoIndex) {
+ var ret bool
+ return ret
+ }
+ return *o.AllowNoIndex
+}
+
+// GetAllowNoIndexOk returns a tuple with the AllowNoIndex field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CreateDataViewRequestObjectDataView) GetAllowNoIndexOk() (*bool, bool) {
+ if o == nil || IsNil(o.AllowNoIndex) {
+ return nil, false
+ }
+ return o.AllowNoIndex, true
+}
+
+// HasAllowNoIndex returns a boolean if a field has been set.
+func (o *CreateDataViewRequestObjectDataView) HasAllowNoIndex() bool {
+ if o != nil && !IsNil(o.AllowNoIndex) {
+ return true
+ }
+
+ return false
+}
+
+// SetAllowNoIndex gets a reference to the given bool and assigns it to the AllowNoIndex field.
+func (o *CreateDataViewRequestObjectDataView) SetAllowNoIndex(v bool) {
+ o.AllowNoIndex = &v
+}
+
+// GetFieldAttrs returns the FieldAttrs field value if set, zero value otherwise.
+func (o *CreateDataViewRequestObjectDataView) GetFieldAttrs() map[string]interface{} {
+ if o == nil || IsNil(o.FieldAttrs) {
+ var ret map[string]interface{}
+ return ret
+ }
+ return o.FieldAttrs
+}
+
+// GetFieldAttrsOk returns a tuple with the FieldAttrs field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CreateDataViewRequestObjectDataView) GetFieldAttrsOk() (map[string]interface{}, bool) {
+ if o == nil || IsNil(o.FieldAttrs) {
+ return map[string]interface{}{}, false
+ }
+ return o.FieldAttrs, true
+}
+
+// HasFieldAttrs returns a boolean if a field has been set.
+func (o *CreateDataViewRequestObjectDataView) HasFieldAttrs() bool {
+ if o != nil && !IsNil(o.FieldAttrs) {
+ return true
+ }
+
+ return false
+}
+
+// SetFieldAttrs gets a reference to the given map[string]interface{} and assigns it to the FieldAttrs field.
+func (o *CreateDataViewRequestObjectDataView) SetFieldAttrs(v map[string]interface{}) {
+ o.FieldAttrs = v
+}
+
+// GetFieldFormats returns the FieldFormats field value if set, zero value otherwise.
+func (o *CreateDataViewRequestObjectDataView) GetFieldFormats() map[string]interface{} {
+ if o == nil || IsNil(o.FieldFormats) {
+ var ret map[string]interface{}
+ return ret
+ }
+ return o.FieldFormats
+}
+
+// GetFieldFormatsOk returns a tuple with the FieldFormats field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CreateDataViewRequestObjectDataView) GetFieldFormatsOk() (map[string]interface{}, bool) {
+ if o == nil || IsNil(o.FieldFormats) {
+ return map[string]interface{}{}, false
+ }
+ return o.FieldFormats, true
+}
+
+// HasFieldFormats returns a boolean if a field has been set.
+func (o *CreateDataViewRequestObjectDataView) HasFieldFormats() bool {
+ if o != nil && !IsNil(o.FieldFormats) {
+ return true
+ }
+
+ return false
+}
+
+// SetFieldFormats gets a reference to the given map[string]interface{} and assigns it to the FieldFormats field.
+func (o *CreateDataViewRequestObjectDataView) SetFieldFormats(v map[string]interface{}) {
+ o.FieldFormats = v
+}
+
+// GetFields returns the Fields field value if set, zero value otherwise.
+func (o *CreateDataViewRequestObjectDataView) GetFields() map[string]interface{} {
+ if o == nil || IsNil(o.Fields) {
+ var ret map[string]interface{}
+ return ret
+ }
+ return o.Fields
+}
+
+// GetFieldsOk returns a tuple with the Fields field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CreateDataViewRequestObjectDataView) GetFieldsOk() (map[string]interface{}, bool) {
+ if o == nil || IsNil(o.Fields) {
+ return map[string]interface{}{}, false
+ }
+ return o.Fields, true
+}
+
+// HasFields returns a boolean if a field has been set.
+func (o *CreateDataViewRequestObjectDataView) HasFields() bool {
+ if o != nil && !IsNil(o.Fields) {
+ return true
+ }
+
+ return false
+}
+
+// SetFields gets a reference to the given map[string]interface{} and assigns it to the Fields field.
+func (o *CreateDataViewRequestObjectDataView) SetFields(v map[string]interface{}) {
+ o.Fields = v
+}
+
+// GetId returns the Id field value if set, zero value otherwise.
+func (o *CreateDataViewRequestObjectDataView) GetId() string {
+ if o == nil || IsNil(o.Id) {
+ var ret string
+ return ret
+ }
+ return *o.Id
+}
+
+// GetIdOk returns a tuple with the Id field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CreateDataViewRequestObjectDataView) GetIdOk() (*string, bool) {
+ if o == nil || IsNil(o.Id) {
+ return nil, false
+ }
+ return o.Id, true
+}
+
+// HasId returns a boolean if a field has been set.
+func (o *CreateDataViewRequestObjectDataView) HasId() bool {
+ if o != nil && !IsNil(o.Id) {
+ return true
+ }
+
+ return false
+}
+
+// SetId gets a reference to the given string and assigns it to the Id field.
+func (o *CreateDataViewRequestObjectDataView) SetId(v string) {
+ o.Id = &v
+}
+
+// GetName returns the Name field value if set, zero value otherwise.
+func (o *CreateDataViewRequestObjectDataView) GetName() string {
+ if o == nil || IsNil(o.Name) {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CreateDataViewRequestObjectDataView) GetNameOk() (*string, bool) {
+ if o == nil || IsNil(o.Name) {
+ return nil, false
+ }
+ return o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *CreateDataViewRequestObjectDataView) HasName() bool {
+ if o != nil && !IsNil(o.Name) {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *CreateDataViewRequestObjectDataView) SetName(v string) {
+ o.Name = &v
+}
+
+// GetNamespaces returns the Namespaces field value if set, zero value otherwise.
+func (o *CreateDataViewRequestObjectDataView) GetNamespaces() []string {
+ if o == nil || IsNil(o.Namespaces) {
+ var ret []string
+ return ret
+ }
+ return o.Namespaces
+}
+
+// GetNamespacesOk returns a tuple with the Namespaces field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CreateDataViewRequestObjectDataView) GetNamespacesOk() ([]string, bool) {
+ if o == nil || IsNil(o.Namespaces) {
+ return nil, false
+ }
+ return o.Namespaces, true
+}
+
+// HasNamespaces returns a boolean if a field has been set.
+func (o *CreateDataViewRequestObjectDataView) HasNamespaces() bool {
+ if o != nil && !IsNil(o.Namespaces) {
+ return true
+ }
+
+ return false
+}
+
+// SetNamespaces gets a reference to the given []string and assigns it to the Namespaces field.
+func (o *CreateDataViewRequestObjectDataView) SetNamespaces(v []string) {
+ o.Namespaces = v
+}
+
+// GetRuntimeFieldMap returns the RuntimeFieldMap field value if set, zero value otherwise.
+func (o *CreateDataViewRequestObjectDataView) GetRuntimeFieldMap() map[string]interface{} {
+ if o == nil || IsNil(o.RuntimeFieldMap) {
+ var ret map[string]interface{}
+ return ret
+ }
+ return o.RuntimeFieldMap
+}
+
+// GetRuntimeFieldMapOk returns a tuple with the RuntimeFieldMap field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CreateDataViewRequestObjectDataView) GetRuntimeFieldMapOk() (map[string]interface{}, bool) {
+ if o == nil || IsNil(o.RuntimeFieldMap) {
+ return map[string]interface{}{}, false
+ }
+ return o.RuntimeFieldMap, true
+}
+
+// HasRuntimeFieldMap returns a boolean if a field has been set.
+func (o *CreateDataViewRequestObjectDataView) HasRuntimeFieldMap() bool {
+ if o != nil && !IsNil(o.RuntimeFieldMap) {
+ return true
+ }
+
+ return false
+}
+
+// SetRuntimeFieldMap gets a reference to the given map[string]interface{} and assigns it to the RuntimeFieldMap field.
+func (o *CreateDataViewRequestObjectDataView) SetRuntimeFieldMap(v map[string]interface{}) {
+ o.RuntimeFieldMap = v
+}
+
+// GetSourceFilters returns the SourceFilters field value if set, zero value otherwise.
+func (o *CreateDataViewRequestObjectDataView) GetSourceFilters() []SourcefiltersInner {
+ if o == nil || IsNil(o.SourceFilters) {
+ var ret []SourcefiltersInner
+ return ret
+ }
+ return o.SourceFilters
+}
+
+// GetSourceFiltersOk returns a tuple with the SourceFilters field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CreateDataViewRequestObjectDataView) GetSourceFiltersOk() ([]SourcefiltersInner, bool) {
+ if o == nil || IsNil(o.SourceFilters) {
+ return nil, false
+ }
+ return o.SourceFilters, true
+}
+
+// HasSourceFilters returns a boolean if a field has been set.
+func (o *CreateDataViewRequestObjectDataView) HasSourceFilters() bool {
+ if o != nil && !IsNil(o.SourceFilters) {
+ return true
+ }
+
+ return false
+}
+
+// SetSourceFilters gets a reference to the given []SourcefiltersInner and assigns it to the SourceFilters field.
+func (o *CreateDataViewRequestObjectDataView) SetSourceFilters(v []SourcefiltersInner) {
+ o.SourceFilters = v
+}
+
+// GetTimeFieldName returns the TimeFieldName field value if set, zero value otherwise.
+func (o *CreateDataViewRequestObjectDataView) GetTimeFieldName() string {
+ if o == nil || IsNil(o.TimeFieldName) {
+ var ret string
+ return ret
+ }
+ return *o.TimeFieldName
+}
+
+// GetTimeFieldNameOk returns a tuple with the TimeFieldName field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CreateDataViewRequestObjectDataView) GetTimeFieldNameOk() (*string, bool) {
+ if o == nil || IsNil(o.TimeFieldName) {
+ return nil, false
+ }
+ return o.TimeFieldName, true
+}
+
+// HasTimeFieldName returns a boolean if a field has been set.
+func (o *CreateDataViewRequestObjectDataView) HasTimeFieldName() bool {
+ if o != nil && !IsNil(o.TimeFieldName) {
+ return true
+ }
+
+ return false
+}
+
+// SetTimeFieldName gets a reference to the given string and assigns it to the TimeFieldName field.
+func (o *CreateDataViewRequestObjectDataView) SetTimeFieldName(v string) {
+ o.TimeFieldName = &v
+}
+
+// GetTitle returns the Title field value
+func (o *CreateDataViewRequestObjectDataView) GetTitle() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Title
+}
+
+// GetTitleOk returns a tuple with the Title field value
+// and a boolean to check if the value has been set.
+func (o *CreateDataViewRequestObjectDataView) GetTitleOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Title, true
+}
+
+// SetTitle sets field value
+func (o *CreateDataViewRequestObjectDataView) SetTitle(v string) {
+ o.Title = v
+}
+
+// GetType returns the Type field value if set, zero value otherwise.
+func (o *CreateDataViewRequestObjectDataView) GetType() string {
+ if o == nil || IsNil(o.Type) {
+ var ret string
+ return ret
+ }
+ return *o.Type
+}
+
+// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CreateDataViewRequestObjectDataView) GetTypeOk() (*string, bool) {
+ if o == nil || IsNil(o.Type) {
+ return nil, false
+ }
+ return o.Type, true
+}
+
+// HasType returns a boolean if a field has been set.
+func (o *CreateDataViewRequestObjectDataView) HasType() bool {
+ if o != nil && !IsNil(o.Type) {
+ return true
+ }
+
+ return false
+}
+
+// SetType gets a reference to the given string and assigns it to the Type field.
+func (o *CreateDataViewRequestObjectDataView) SetType(v string) {
+ o.Type = &v
+}
+
+// GetTypeMeta returns the TypeMeta field value if set, zero value otherwise.
+func (o *CreateDataViewRequestObjectDataView) GetTypeMeta() map[string]interface{} {
+ if o == nil || IsNil(o.TypeMeta) {
+ var ret map[string]interface{}
+ return ret
+ }
+ return o.TypeMeta
+}
+
+// GetTypeMetaOk returns a tuple with the TypeMeta field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CreateDataViewRequestObjectDataView) GetTypeMetaOk() (map[string]interface{}, bool) {
+ if o == nil || IsNil(o.TypeMeta) {
+ return map[string]interface{}{}, false
+ }
+ return o.TypeMeta, true
+}
+
+// HasTypeMeta returns a boolean if a field has been set.
+func (o *CreateDataViewRequestObjectDataView) HasTypeMeta() bool {
+ if o != nil && !IsNil(o.TypeMeta) {
+ return true
+ }
+
+ return false
+}
+
+// SetTypeMeta gets a reference to the given map[string]interface{} and assigns it to the TypeMeta field.
+func (o *CreateDataViewRequestObjectDataView) SetTypeMeta(v map[string]interface{}) {
+ o.TypeMeta = v
+}
+
+// GetVersion returns the Version field value if set, zero value otherwise.
+func (o *CreateDataViewRequestObjectDataView) GetVersion() string {
+ if o == nil || IsNil(o.Version) {
+ var ret string
+ return ret
+ }
+ return *o.Version
+}
+
+// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CreateDataViewRequestObjectDataView) GetVersionOk() (*string, bool) {
+ if o == nil || IsNil(o.Version) {
+ return nil, false
+ }
+ return o.Version, true
+}
+
+// HasVersion returns a boolean if a field has been set.
+func (o *CreateDataViewRequestObjectDataView) HasVersion() bool {
+ if o != nil && !IsNil(o.Version) {
+ return true
+ }
+
+ return false
+}
+
+// SetVersion gets a reference to the given string and assigns it to the Version field.
+func (o *CreateDataViewRequestObjectDataView) SetVersion(v string) {
+ o.Version = &v
+}
+
+func (o CreateDataViewRequestObjectDataView) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o CreateDataViewRequestObjectDataView) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.AllowNoIndex) {
+ toSerialize["allowNoIndex"] = o.AllowNoIndex
+ }
+ if !IsNil(o.FieldAttrs) {
+ toSerialize["fieldAttrs"] = o.FieldAttrs
+ }
+ if !IsNil(o.FieldFormats) {
+ toSerialize["fieldFormats"] = o.FieldFormats
+ }
+ if !IsNil(o.Fields) {
+ toSerialize["fields"] = o.Fields
+ }
+ if !IsNil(o.Id) {
+ toSerialize["id"] = o.Id
+ }
+ if !IsNil(o.Name) {
+ toSerialize["name"] = o.Name
+ }
+ if !IsNil(o.Namespaces) {
+ toSerialize["namespaces"] = o.Namespaces
+ }
+ if !IsNil(o.RuntimeFieldMap) {
+ toSerialize["runtimeFieldMap"] = o.RuntimeFieldMap
+ }
+ if !IsNil(o.SourceFilters) {
+ toSerialize["sourceFilters"] = o.SourceFilters
+ }
+ if !IsNil(o.TimeFieldName) {
+ toSerialize["timeFieldName"] = o.TimeFieldName
+ }
+ toSerialize["title"] = o.Title
+ if !IsNil(o.Type) {
+ toSerialize["type"] = o.Type
+ }
+ if !IsNil(o.TypeMeta) {
+ toSerialize["typeMeta"] = o.TypeMeta
+ }
+ if !IsNil(o.Version) {
+ toSerialize["version"] = o.Version
+ }
+ return toSerialize, nil
+}
+
+type NullableCreateDataViewRequestObjectDataView struct {
+ value *CreateDataViewRequestObjectDataView
+ isSet bool
+}
+
+func (v NullableCreateDataViewRequestObjectDataView) Get() *CreateDataViewRequestObjectDataView {
+ return v.value
+}
+
+func (v *NullableCreateDataViewRequestObjectDataView) Set(val *CreateDataViewRequestObjectDataView) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableCreateDataViewRequestObjectDataView) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableCreateDataViewRequestObjectDataView) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableCreateDataViewRequestObjectDataView(val *CreateDataViewRequestObjectDataView) *NullableCreateDataViewRequestObjectDataView {
+ return &NullableCreateDataViewRequestObjectDataView{value: val, isSet: true}
+}
+
+func (v NullableCreateDataViewRequestObjectDataView) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableCreateDataViewRequestObjectDataView) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/generated/data_views/model_create_runtime_field_request.go b/generated/data_views/model_create_runtime_field_request.go
new file mode 100644
index 000000000..6e717809a
--- /dev/null
+++ b/generated/data_views/model_create_runtime_field_request.go
@@ -0,0 +1,152 @@
+/*
+Data views
+
+OpenAPI schema for data view endpoints
+
+API version: 0.1
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package data_views
+
+import (
+ "encoding/json"
+)
+
+// checks if the CreateRuntimeFieldRequest type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &CreateRuntimeFieldRequest{}
+
+// CreateRuntimeFieldRequest struct for CreateRuntimeFieldRequest
+type CreateRuntimeFieldRequest struct {
+ // The name for a runtime field.
+ Name interface{} `json:"name"`
+ // The runtime field definition object.
+ RuntimeField interface{} `json:"runtimeField"`
+}
+
+// NewCreateRuntimeFieldRequest instantiates a new CreateRuntimeFieldRequest object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewCreateRuntimeFieldRequest(name interface{}, runtimeField interface{}) *CreateRuntimeFieldRequest {
+ this := CreateRuntimeFieldRequest{}
+ this.Name = name
+ this.RuntimeField = runtimeField
+ return &this
+}
+
+// NewCreateRuntimeFieldRequestWithDefaults instantiates a new CreateRuntimeFieldRequest object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewCreateRuntimeFieldRequestWithDefaults() *CreateRuntimeFieldRequest {
+ this := CreateRuntimeFieldRequest{}
+ return &this
+}
+
+// GetName returns the Name field value
+// If the value is explicit nil, the zero value for interface{} will be returned
+func (o *CreateRuntimeFieldRequest) GetName() interface{} {
+ if o == nil {
+ var ret interface{}
+ return ret
+ }
+
+ return o.Name
+}
+
+// GetNameOk returns a tuple with the Name field value
+// and a boolean to check if the value has been set.
+// NOTE: If the value is an explicit nil, `nil, true` will be returned
+func (o *CreateRuntimeFieldRequest) GetNameOk() (*interface{}, bool) {
+ if o == nil || IsNil(o.Name) {
+ return nil, false
+ }
+ return &o.Name, true
+}
+
+// SetName sets field value
+func (o *CreateRuntimeFieldRequest) SetName(v interface{}) {
+ o.Name = v
+}
+
+// GetRuntimeField returns the RuntimeField field value
+// If the value is explicit nil, the zero value for interface{} will be returned
+func (o *CreateRuntimeFieldRequest) GetRuntimeField() interface{} {
+ if o == nil {
+ var ret interface{}
+ return ret
+ }
+
+ return o.RuntimeField
+}
+
+// GetRuntimeFieldOk returns a tuple with the RuntimeField field value
+// and a boolean to check if the value has been set.
+// NOTE: If the value is an explicit nil, `nil, true` will be returned
+func (o *CreateRuntimeFieldRequest) GetRuntimeFieldOk() (*interface{}, bool) {
+ if o == nil || IsNil(o.RuntimeField) {
+ return nil, false
+ }
+ return &o.RuntimeField, true
+}
+
+// SetRuntimeField sets field value
+func (o *CreateRuntimeFieldRequest) SetRuntimeField(v interface{}) {
+ o.RuntimeField = v
+}
+
+func (o CreateRuntimeFieldRequest) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o CreateRuntimeFieldRequest) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Name != nil {
+ toSerialize["name"] = o.Name
+ }
+ if o.RuntimeField != nil {
+ toSerialize["runtimeField"] = o.RuntimeField
+ }
+ return toSerialize, nil
+}
+
+type NullableCreateRuntimeFieldRequest struct {
+ value *CreateRuntimeFieldRequest
+ isSet bool
+}
+
+func (v NullableCreateRuntimeFieldRequest) Get() *CreateRuntimeFieldRequest {
+ return v.value
+}
+
+func (v *NullableCreateRuntimeFieldRequest) Set(val *CreateRuntimeFieldRequest) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableCreateRuntimeFieldRequest) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableCreateRuntimeFieldRequest) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableCreateRuntimeFieldRequest(val *CreateRuntimeFieldRequest) *NullableCreateRuntimeFieldRequest {
+ return &NullableCreateRuntimeFieldRequest{value: val, isSet: true}
+}
+
+func (v NullableCreateRuntimeFieldRequest) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableCreateRuntimeFieldRequest) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/generated/data_views/model_create_update_runtime_field_200_response.go b/generated/data_views/model_create_update_runtime_field_200_response.go
new file mode 100644
index 000000000..d63611c19
--- /dev/null
+++ b/generated/data_views/model_create_update_runtime_field_200_response.go
@@ -0,0 +1,160 @@
+/*
+Data views
+
+OpenAPI schema for data view endpoints
+
+API version: 0.1
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package data_views
+
+import (
+ "encoding/json"
+)
+
+// checks if the CreateUpdateRuntimeField200Response type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &CreateUpdateRuntimeField200Response{}
+
+// CreateUpdateRuntimeField200Response struct for CreateUpdateRuntimeField200Response
+type CreateUpdateRuntimeField200Response struct {
+ DataView map[string]interface{} `json:"data_view,omitempty"`
+ Fields []map[string]interface{} `json:"fields,omitempty"`
+}
+
+// NewCreateUpdateRuntimeField200Response instantiates a new CreateUpdateRuntimeField200Response object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewCreateUpdateRuntimeField200Response() *CreateUpdateRuntimeField200Response {
+ this := CreateUpdateRuntimeField200Response{}
+ return &this
+}
+
+// NewCreateUpdateRuntimeField200ResponseWithDefaults instantiates a new CreateUpdateRuntimeField200Response object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewCreateUpdateRuntimeField200ResponseWithDefaults() *CreateUpdateRuntimeField200Response {
+ this := CreateUpdateRuntimeField200Response{}
+ return &this
+}
+
+// GetDataView returns the DataView field value if set, zero value otherwise.
+func (o *CreateUpdateRuntimeField200Response) GetDataView() map[string]interface{} {
+ if o == nil || IsNil(o.DataView) {
+ var ret map[string]interface{}
+ return ret
+ }
+ return o.DataView
+}
+
+// GetDataViewOk returns a tuple with the DataView field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CreateUpdateRuntimeField200Response) GetDataViewOk() (map[string]interface{}, bool) {
+ if o == nil || IsNil(o.DataView) {
+ return map[string]interface{}{}, false
+ }
+ return o.DataView, true
+}
+
+// HasDataView returns a boolean if a field has been set.
+func (o *CreateUpdateRuntimeField200Response) HasDataView() bool {
+ if o != nil && !IsNil(o.DataView) {
+ return true
+ }
+
+ return false
+}
+
+// SetDataView gets a reference to the given map[string]interface{} and assigns it to the DataView field.
+func (o *CreateUpdateRuntimeField200Response) SetDataView(v map[string]interface{}) {
+ o.DataView = v
+}
+
+// GetFields returns the Fields field value if set, zero value otherwise.
+func (o *CreateUpdateRuntimeField200Response) GetFields() []map[string]interface{} {
+ if o == nil || IsNil(o.Fields) {
+ var ret []map[string]interface{}
+ return ret
+ }
+ return o.Fields
+}
+
+// GetFieldsOk returns a tuple with the Fields field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CreateUpdateRuntimeField200Response) GetFieldsOk() ([]map[string]interface{}, bool) {
+ if o == nil || IsNil(o.Fields) {
+ return nil, false
+ }
+ return o.Fields, true
+}
+
+// HasFields returns a boolean if a field has been set.
+func (o *CreateUpdateRuntimeField200Response) HasFields() bool {
+ if o != nil && !IsNil(o.Fields) {
+ return true
+ }
+
+ return false
+}
+
+// SetFields gets a reference to the given []map[string]interface{} and assigns it to the Fields field.
+func (o *CreateUpdateRuntimeField200Response) SetFields(v []map[string]interface{}) {
+ o.Fields = v
+}
+
+func (o CreateUpdateRuntimeField200Response) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o CreateUpdateRuntimeField200Response) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.DataView) {
+ toSerialize["data_view"] = o.DataView
+ }
+ if !IsNil(o.Fields) {
+ toSerialize["fields"] = o.Fields
+ }
+ return toSerialize, nil
+}
+
+type NullableCreateUpdateRuntimeField200Response struct {
+ value *CreateUpdateRuntimeField200Response
+ isSet bool
+}
+
+func (v NullableCreateUpdateRuntimeField200Response) Get() *CreateUpdateRuntimeField200Response {
+ return v.value
+}
+
+func (v *NullableCreateUpdateRuntimeField200Response) Set(val *CreateUpdateRuntimeField200Response) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableCreateUpdateRuntimeField200Response) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableCreateUpdateRuntimeField200Response) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableCreateUpdateRuntimeField200Response(val *CreateUpdateRuntimeField200Response) *NullableCreateUpdateRuntimeField200Response {
+ return &NullableCreateUpdateRuntimeField200Response{value: val, isSet: true}
+}
+
+func (v NullableCreateUpdateRuntimeField200Response) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableCreateUpdateRuntimeField200Response) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/generated/data_views/model_create_update_runtime_field_request.go b/generated/data_views/model_create_update_runtime_field_request.go
new file mode 100644
index 000000000..798fba607
--- /dev/null
+++ b/generated/data_views/model_create_update_runtime_field_request.go
@@ -0,0 +1,144 @@
+/*
+Data views
+
+OpenAPI schema for data view endpoints
+
+API version: 0.1
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package data_views
+
+import (
+ "encoding/json"
+)
+
+// checks if the CreateUpdateRuntimeFieldRequest type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &CreateUpdateRuntimeFieldRequest{}
+
+// CreateUpdateRuntimeFieldRequest struct for CreateUpdateRuntimeFieldRequest
+type CreateUpdateRuntimeFieldRequest struct {
+ // The name for a runtime field.
+ Name string `json:"name"`
+ // The runtime field definition object.
+ RuntimeField map[string]interface{} `json:"runtimeField"`
+}
+
+// NewCreateUpdateRuntimeFieldRequest instantiates a new CreateUpdateRuntimeFieldRequest object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewCreateUpdateRuntimeFieldRequest(name string, runtimeField map[string]interface{}) *CreateUpdateRuntimeFieldRequest {
+ this := CreateUpdateRuntimeFieldRequest{}
+ this.Name = name
+ this.RuntimeField = runtimeField
+ return &this
+}
+
+// NewCreateUpdateRuntimeFieldRequestWithDefaults instantiates a new CreateUpdateRuntimeFieldRequest object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewCreateUpdateRuntimeFieldRequestWithDefaults() *CreateUpdateRuntimeFieldRequest {
+ this := CreateUpdateRuntimeFieldRequest{}
+ return &this
+}
+
+// GetName returns the Name field value
+func (o *CreateUpdateRuntimeFieldRequest) GetName() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Name
+}
+
+// GetNameOk returns a tuple with the Name field value
+// and a boolean to check if the value has been set.
+func (o *CreateUpdateRuntimeFieldRequest) GetNameOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Name, true
+}
+
+// SetName sets field value
+func (o *CreateUpdateRuntimeFieldRequest) SetName(v string) {
+ o.Name = v
+}
+
+// GetRuntimeField returns the RuntimeField field value
+func (o *CreateUpdateRuntimeFieldRequest) GetRuntimeField() map[string]interface{} {
+ if o == nil {
+ var ret map[string]interface{}
+ return ret
+ }
+
+ return o.RuntimeField
+}
+
+// GetRuntimeFieldOk returns a tuple with the RuntimeField field value
+// and a boolean to check if the value has been set.
+func (o *CreateUpdateRuntimeFieldRequest) GetRuntimeFieldOk() (map[string]interface{}, bool) {
+ if o == nil {
+ return map[string]interface{}{}, false
+ }
+ return o.RuntimeField, true
+}
+
+// SetRuntimeField sets field value
+func (o *CreateUpdateRuntimeFieldRequest) SetRuntimeField(v map[string]interface{}) {
+ o.RuntimeField = v
+}
+
+func (o CreateUpdateRuntimeFieldRequest) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o CreateUpdateRuntimeFieldRequest) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["name"] = o.Name
+ toSerialize["runtimeField"] = o.RuntimeField
+ return toSerialize, nil
+}
+
+type NullableCreateUpdateRuntimeFieldRequest struct {
+ value *CreateUpdateRuntimeFieldRequest
+ isSet bool
+}
+
+func (v NullableCreateUpdateRuntimeFieldRequest) Get() *CreateUpdateRuntimeFieldRequest {
+ return v.value
+}
+
+func (v *NullableCreateUpdateRuntimeFieldRequest) Set(val *CreateUpdateRuntimeFieldRequest) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableCreateUpdateRuntimeFieldRequest) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableCreateUpdateRuntimeFieldRequest) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableCreateUpdateRuntimeFieldRequest(val *CreateUpdateRuntimeFieldRequest) *NullableCreateUpdateRuntimeFieldRequest {
+ return &NullableCreateUpdateRuntimeFieldRequest{value: val, isSet: true}
+}
+
+func (v NullableCreateUpdateRuntimeFieldRequest) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableCreateUpdateRuntimeFieldRequest) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/generated/data_views/model_data_view_response_object.go b/generated/data_views/model_data_view_response_object.go
new file mode 100644
index 000000000..df6b81113
--- /dev/null
+++ b/generated/data_views/model_data_view_response_object.go
@@ -0,0 +1,124 @@
+/*
+Data views
+
+OpenAPI schema for data view endpoints
+
+API version: 0.1
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package data_views
+
+import (
+ "encoding/json"
+)
+
+// checks if the DataViewResponseObject type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &DataViewResponseObject{}
+
+// DataViewResponseObject struct for DataViewResponseObject
+type DataViewResponseObject struct {
+ DataView *DataViewResponseObjectDataView `json:"data_view,omitempty"`
+}
+
+// NewDataViewResponseObject instantiates a new DataViewResponseObject object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewDataViewResponseObject() *DataViewResponseObject {
+ this := DataViewResponseObject{}
+ return &this
+}
+
+// NewDataViewResponseObjectWithDefaults instantiates a new DataViewResponseObject object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewDataViewResponseObjectWithDefaults() *DataViewResponseObject {
+ this := DataViewResponseObject{}
+ return &this
+}
+
+// GetDataView returns the DataView field value if set, zero value otherwise.
+func (o *DataViewResponseObject) GetDataView() DataViewResponseObjectDataView {
+ if o == nil || IsNil(o.DataView) {
+ var ret DataViewResponseObjectDataView
+ return ret
+ }
+ return *o.DataView
+}
+
+// GetDataViewOk returns a tuple with the DataView field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DataViewResponseObject) GetDataViewOk() (*DataViewResponseObjectDataView, bool) {
+ if o == nil || IsNil(o.DataView) {
+ return nil, false
+ }
+ return o.DataView, true
+}
+
+// HasDataView returns a boolean if a field has been set.
+func (o *DataViewResponseObject) HasDataView() bool {
+ if o != nil && !IsNil(o.DataView) {
+ return true
+ }
+
+ return false
+}
+
+// SetDataView gets a reference to the given DataViewResponseObjectDataView and assigns it to the DataView field.
+func (o *DataViewResponseObject) SetDataView(v DataViewResponseObjectDataView) {
+ o.DataView = &v
+}
+
+func (o DataViewResponseObject) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o DataViewResponseObject) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.DataView) {
+ toSerialize["data_view"] = o.DataView
+ }
+ return toSerialize, nil
+}
+
+type NullableDataViewResponseObject struct {
+ value *DataViewResponseObject
+ isSet bool
+}
+
+func (v NullableDataViewResponseObject) Get() *DataViewResponseObject {
+ return v.value
+}
+
+func (v *NullableDataViewResponseObject) Set(val *DataViewResponseObject) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableDataViewResponseObject) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableDataViewResponseObject) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableDataViewResponseObject(val *DataViewResponseObject) *NullableDataViewResponseObject {
+ return &NullableDataViewResponseObject{value: val, isSet: true}
+}
+
+func (v NullableDataViewResponseObject) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableDataViewResponseObject) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/generated/data_views/model_data_view_response_object_data_view.go b/generated/data_views/model_data_view_response_object_data_view.go
new file mode 100644
index 000000000..177b3b495
--- /dev/null
+++ b/generated/data_views/model_data_view_response_object_data_view.go
@@ -0,0 +1,566 @@
+/*
+Data views
+
+OpenAPI schema for data view endpoints
+
+API version: 0.1
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package data_views
+
+import (
+ "encoding/json"
+)
+
+// checks if the DataViewResponseObjectDataView type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &DataViewResponseObjectDataView{}
+
+// DataViewResponseObjectDataView struct for DataViewResponseObjectDataView
+type DataViewResponseObjectDataView struct {
+ // Allows the data view saved object to exist before the data is available.
+ AllowNoIndex *bool `json:"allowNoIndex,omitempty"`
+ // A map of field attributes by field name.
+ FieldAttrs map[string]interface{} `json:"fieldAttrs,omitempty"`
+ // A map of field formats by field name.
+ FieldFormats map[string]interface{} `json:"fieldFormats,omitempty"`
+ Fields map[string]interface{} `json:"fields,omitempty"`
+ Id *string `json:"id,omitempty"`
+ // The data view name.
+ Name *string `json:"name,omitempty"`
+ // An array of space identifiers for sharing the data view between multiple spaces.
+ Namespaces []string `json:"namespaces,omitempty"`
+ // A map of runtime field definitions by field name.
+ RuntimeFieldMap map[string]interface{} `json:"runtimeFieldMap,omitempty"`
+ // The array of field names you want to filter out in Discover.
+ SourceFilters []SourcefiltersInner `json:"sourceFilters,omitempty"`
+ // The timestamp field name, which you use for time-based data views.
+ TimeFieldName *string `json:"timeFieldName,omitempty"`
+ // Comma-separated list of data streams, indices, and aliases that you want to search. Supports wildcards (`*`).
+ Title *string `json:"title,omitempty"`
+ // When you use rollup indices, contains the field list for the rollup data view API endpoints.
+ TypeMeta map[string]interface{} `json:"typeMeta,omitempty"`
+ Version *string `json:"version,omitempty"`
+}
+
+// NewDataViewResponseObjectDataView instantiates a new DataViewResponseObjectDataView object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewDataViewResponseObjectDataView() *DataViewResponseObjectDataView {
+ this := DataViewResponseObjectDataView{}
+ return &this
+}
+
+// NewDataViewResponseObjectDataViewWithDefaults instantiates a new DataViewResponseObjectDataView object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewDataViewResponseObjectDataViewWithDefaults() *DataViewResponseObjectDataView {
+ this := DataViewResponseObjectDataView{}
+ return &this
+}
+
+// GetAllowNoIndex returns the AllowNoIndex field value if set, zero value otherwise.
+func (o *DataViewResponseObjectDataView) GetAllowNoIndex() bool {
+ if o == nil || IsNil(o.AllowNoIndex) {
+ var ret bool
+ return ret
+ }
+ return *o.AllowNoIndex
+}
+
+// GetAllowNoIndexOk returns a tuple with the AllowNoIndex field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DataViewResponseObjectDataView) GetAllowNoIndexOk() (*bool, bool) {
+ if o == nil || IsNil(o.AllowNoIndex) {
+ return nil, false
+ }
+ return o.AllowNoIndex, true
+}
+
+// HasAllowNoIndex returns a boolean if a field has been set.
+func (o *DataViewResponseObjectDataView) HasAllowNoIndex() bool {
+ if o != nil && !IsNil(o.AllowNoIndex) {
+ return true
+ }
+
+ return false
+}
+
+// SetAllowNoIndex gets a reference to the given bool and assigns it to the AllowNoIndex field.
+func (o *DataViewResponseObjectDataView) SetAllowNoIndex(v bool) {
+ o.AllowNoIndex = &v
+}
+
+// GetFieldAttrs returns the FieldAttrs field value if set, zero value otherwise.
+func (o *DataViewResponseObjectDataView) GetFieldAttrs() map[string]interface{} {
+ if o == nil || IsNil(o.FieldAttrs) {
+ var ret map[string]interface{}
+ return ret
+ }
+ return o.FieldAttrs
+}
+
+// GetFieldAttrsOk returns a tuple with the FieldAttrs field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DataViewResponseObjectDataView) GetFieldAttrsOk() (map[string]interface{}, bool) {
+ if o == nil || IsNil(o.FieldAttrs) {
+ return map[string]interface{}{}, false
+ }
+ return o.FieldAttrs, true
+}
+
+// HasFieldAttrs returns a boolean if a field has been set.
+func (o *DataViewResponseObjectDataView) HasFieldAttrs() bool {
+ if o != nil && !IsNil(o.FieldAttrs) {
+ return true
+ }
+
+ return false
+}
+
+// SetFieldAttrs gets a reference to the given map[string]interface{} and assigns it to the FieldAttrs field.
+func (o *DataViewResponseObjectDataView) SetFieldAttrs(v map[string]interface{}) {
+ o.FieldAttrs = v
+}
+
+// GetFieldFormats returns the FieldFormats field value if set, zero value otherwise.
+func (o *DataViewResponseObjectDataView) GetFieldFormats() map[string]interface{} {
+ if o == nil || IsNil(o.FieldFormats) {
+ var ret map[string]interface{}
+ return ret
+ }
+ return o.FieldFormats
+}
+
+// GetFieldFormatsOk returns a tuple with the FieldFormats field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DataViewResponseObjectDataView) GetFieldFormatsOk() (map[string]interface{}, bool) {
+ if o == nil || IsNil(o.FieldFormats) {
+ return map[string]interface{}{}, false
+ }
+ return o.FieldFormats, true
+}
+
+// HasFieldFormats returns a boolean if a field has been set.
+func (o *DataViewResponseObjectDataView) HasFieldFormats() bool {
+ if o != nil && !IsNil(o.FieldFormats) {
+ return true
+ }
+
+ return false
+}
+
+// SetFieldFormats gets a reference to the given map[string]interface{} and assigns it to the FieldFormats field.
+func (o *DataViewResponseObjectDataView) SetFieldFormats(v map[string]interface{}) {
+ o.FieldFormats = v
+}
+
+// GetFields returns the Fields field value if set, zero value otherwise.
+func (o *DataViewResponseObjectDataView) GetFields() map[string]interface{} {
+ if o == nil || IsNil(o.Fields) {
+ var ret map[string]interface{}
+ return ret
+ }
+ return o.Fields
+}
+
+// GetFieldsOk returns a tuple with the Fields field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DataViewResponseObjectDataView) GetFieldsOk() (map[string]interface{}, bool) {
+ if o == nil || IsNil(o.Fields) {
+ return map[string]interface{}{}, false
+ }
+ return o.Fields, true
+}
+
+// HasFields returns a boolean if a field has been set.
+func (o *DataViewResponseObjectDataView) HasFields() bool {
+ if o != nil && !IsNil(o.Fields) {
+ return true
+ }
+
+ return false
+}
+
+// SetFields gets a reference to the given map[string]interface{} and assigns it to the Fields field.
+func (o *DataViewResponseObjectDataView) SetFields(v map[string]interface{}) {
+ o.Fields = v
+}
+
+// GetId returns the Id field value if set, zero value otherwise.
+func (o *DataViewResponseObjectDataView) GetId() string {
+ if o == nil || IsNil(o.Id) {
+ var ret string
+ return ret
+ }
+ return *o.Id
+}
+
+// GetIdOk returns a tuple with the Id field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DataViewResponseObjectDataView) GetIdOk() (*string, bool) {
+ if o == nil || IsNil(o.Id) {
+ return nil, false
+ }
+ return o.Id, true
+}
+
+// HasId returns a boolean if a field has been set.
+func (o *DataViewResponseObjectDataView) HasId() bool {
+ if o != nil && !IsNil(o.Id) {
+ return true
+ }
+
+ return false
+}
+
+// SetId gets a reference to the given string and assigns it to the Id field.
+func (o *DataViewResponseObjectDataView) SetId(v string) {
+ o.Id = &v
+}
+
+// GetName returns the Name field value if set, zero value otherwise.
+func (o *DataViewResponseObjectDataView) GetName() string {
+ if o == nil || IsNil(o.Name) {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DataViewResponseObjectDataView) GetNameOk() (*string, bool) {
+ if o == nil || IsNil(o.Name) {
+ return nil, false
+ }
+ return o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *DataViewResponseObjectDataView) HasName() bool {
+ if o != nil && !IsNil(o.Name) {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *DataViewResponseObjectDataView) SetName(v string) {
+ o.Name = &v
+}
+
+// GetNamespaces returns the Namespaces field value if set, zero value otherwise.
+func (o *DataViewResponseObjectDataView) GetNamespaces() []string {
+ if o == nil || IsNil(o.Namespaces) {
+ var ret []string
+ return ret
+ }
+ return o.Namespaces
+}
+
+// GetNamespacesOk returns a tuple with the Namespaces field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DataViewResponseObjectDataView) GetNamespacesOk() ([]string, bool) {
+ if o == nil || IsNil(o.Namespaces) {
+ return nil, false
+ }
+ return o.Namespaces, true
+}
+
+// HasNamespaces returns a boolean if a field has been set.
+func (o *DataViewResponseObjectDataView) HasNamespaces() bool {
+ if o != nil && !IsNil(o.Namespaces) {
+ return true
+ }
+
+ return false
+}
+
+// SetNamespaces gets a reference to the given []string and assigns it to the Namespaces field.
+func (o *DataViewResponseObjectDataView) SetNamespaces(v []string) {
+ o.Namespaces = v
+}
+
+// GetRuntimeFieldMap returns the RuntimeFieldMap field value if set, zero value otherwise.
+func (o *DataViewResponseObjectDataView) GetRuntimeFieldMap() map[string]interface{} {
+ if o == nil || IsNil(o.RuntimeFieldMap) {
+ var ret map[string]interface{}
+ return ret
+ }
+ return o.RuntimeFieldMap
+}
+
+// GetRuntimeFieldMapOk returns a tuple with the RuntimeFieldMap field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DataViewResponseObjectDataView) GetRuntimeFieldMapOk() (map[string]interface{}, bool) {
+ if o == nil || IsNil(o.RuntimeFieldMap) {
+ return map[string]interface{}{}, false
+ }
+ return o.RuntimeFieldMap, true
+}
+
+// HasRuntimeFieldMap returns a boolean if a field has been set.
+func (o *DataViewResponseObjectDataView) HasRuntimeFieldMap() bool {
+ if o != nil && !IsNil(o.RuntimeFieldMap) {
+ return true
+ }
+
+ return false
+}
+
+// SetRuntimeFieldMap gets a reference to the given map[string]interface{} and assigns it to the RuntimeFieldMap field.
+func (o *DataViewResponseObjectDataView) SetRuntimeFieldMap(v map[string]interface{}) {
+ o.RuntimeFieldMap = v
+}
+
+// GetSourceFilters returns the SourceFilters field value if set, zero value otherwise.
+func (o *DataViewResponseObjectDataView) GetSourceFilters() []SourcefiltersInner {
+ if o == nil || IsNil(o.SourceFilters) {
+ var ret []SourcefiltersInner
+ return ret
+ }
+ return o.SourceFilters
+}
+
+// GetSourceFiltersOk returns a tuple with the SourceFilters field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DataViewResponseObjectDataView) GetSourceFiltersOk() ([]SourcefiltersInner, bool) {
+ if o == nil || IsNil(o.SourceFilters) {
+ return nil, false
+ }
+ return o.SourceFilters, true
+}
+
+// HasSourceFilters returns a boolean if a field has been set.
+func (o *DataViewResponseObjectDataView) HasSourceFilters() bool {
+ if o != nil && !IsNil(o.SourceFilters) {
+ return true
+ }
+
+ return false
+}
+
+// SetSourceFilters gets a reference to the given []SourcefiltersInner and assigns it to the SourceFilters field.
+func (o *DataViewResponseObjectDataView) SetSourceFilters(v []SourcefiltersInner) {
+ o.SourceFilters = v
+}
+
+// GetTimeFieldName returns the TimeFieldName field value if set, zero value otherwise.
+func (o *DataViewResponseObjectDataView) GetTimeFieldName() string {
+ if o == nil || IsNil(o.TimeFieldName) {
+ var ret string
+ return ret
+ }
+ return *o.TimeFieldName
+}
+
+// GetTimeFieldNameOk returns a tuple with the TimeFieldName field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DataViewResponseObjectDataView) GetTimeFieldNameOk() (*string, bool) {
+ if o == nil || IsNil(o.TimeFieldName) {
+ return nil, false
+ }
+ return o.TimeFieldName, true
+}
+
+// HasTimeFieldName returns a boolean if a field has been set.
+func (o *DataViewResponseObjectDataView) HasTimeFieldName() bool {
+ if o != nil && !IsNil(o.TimeFieldName) {
+ return true
+ }
+
+ return false
+}
+
+// SetTimeFieldName gets a reference to the given string and assigns it to the TimeFieldName field.
+func (o *DataViewResponseObjectDataView) SetTimeFieldName(v string) {
+ o.TimeFieldName = &v
+}
+
+// GetTitle returns the Title field value if set, zero value otherwise.
+func (o *DataViewResponseObjectDataView) GetTitle() string {
+ if o == nil || IsNil(o.Title) {
+ var ret string
+ return ret
+ }
+ return *o.Title
+}
+
+// GetTitleOk returns a tuple with the Title field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DataViewResponseObjectDataView) GetTitleOk() (*string, bool) {
+ if o == nil || IsNil(o.Title) {
+ return nil, false
+ }
+ return o.Title, true
+}
+
+// HasTitle returns a boolean if a field has been set.
+func (o *DataViewResponseObjectDataView) HasTitle() bool {
+ if o != nil && !IsNil(o.Title) {
+ return true
+ }
+
+ return false
+}
+
+// SetTitle gets a reference to the given string and assigns it to the Title field.
+func (o *DataViewResponseObjectDataView) SetTitle(v string) {
+ o.Title = &v
+}
+
+// GetTypeMeta returns the TypeMeta field value if set, zero value otherwise.
+func (o *DataViewResponseObjectDataView) GetTypeMeta() map[string]interface{} {
+ if o == nil || IsNil(o.TypeMeta) {
+ var ret map[string]interface{}
+ return ret
+ }
+ return o.TypeMeta
+}
+
+// GetTypeMetaOk returns a tuple with the TypeMeta field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DataViewResponseObjectDataView) GetTypeMetaOk() (map[string]interface{}, bool) {
+ if o == nil || IsNil(o.TypeMeta) {
+ return map[string]interface{}{}, false
+ }
+ return o.TypeMeta, true
+}
+
+// HasTypeMeta returns a boolean if a field has been set.
+func (o *DataViewResponseObjectDataView) HasTypeMeta() bool {
+ if o != nil && !IsNil(o.TypeMeta) {
+ return true
+ }
+
+ return false
+}
+
+// SetTypeMeta gets a reference to the given map[string]interface{} and assigns it to the TypeMeta field.
+func (o *DataViewResponseObjectDataView) SetTypeMeta(v map[string]interface{}) {
+ o.TypeMeta = v
+}
+
+// GetVersion returns the Version field value if set, zero value otherwise.
+func (o *DataViewResponseObjectDataView) GetVersion() string {
+ if o == nil || IsNil(o.Version) {
+ var ret string
+ return ret
+ }
+ return *o.Version
+}
+
+// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DataViewResponseObjectDataView) GetVersionOk() (*string, bool) {
+ if o == nil || IsNil(o.Version) {
+ return nil, false
+ }
+ return o.Version, true
+}
+
+// HasVersion returns a boolean if a field has been set.
+func (o *DataViewResponseObjectDataView) HasVersion() bool {
+ if o != nil && !IsNil(o.Version) {
+ return true
+ }
+
+ return false
+}
+
+// SetVersion gets a reference to the given string and assigns it to the Version field.
+func (o *DataViewResponseObjectDataView) SetVersion(v string) {
+ o.Version = &v
+}
+
+func (o DataViewResponseObjectDataView) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o DataViewResponseObjectDataView) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.AllowNoIndex) {
+ toSerialize["allowNoIndex"] = o.AllowNoIndex
+ }
+ if !IsNil(o.FieldAttrs) {
+ toSerialize["fieldAttrs"] = o.FieldAttrs
+ }
+ if !IsNil(o.FieldFormats) {
+ toSerialize["fieldFormats"] = o.FieldFormats
+ }
+ if !IsNil(o.Fields) {
+ toSerialize["fields"] = o.Fields
+ }
+ if !IsNil(o.Id) {
+ toSerialize["id"] = o.Id
+ }
+ if !IsNil(o.Name) {
+ toSerialize["name"] = o.Name
+ }
+ if !IsNil(o.Namespaces) {
+ toSerialize["namespaces"] = o.Namespaces
+ }
+ if !IsNil(o.RuntimeFieldMap) {
+ toSerialize["runtimeFieldMap"] = o.RuntimeFieldMap
+ }
+ if !IsNil(o.SourceFilters) {
+ toSerialize["sourceFilters"] = o.SourceFilters
+ }
+ if !IsNil(o.TimeFieldName) {
+ toSerialize["timeFieldName"] = o.TimeFieldName
+ }
+ if !IsNil(o.Title) {
+ toSerialize["title"] = o.Title
+ }
+ if !IsNil(o.TypeMeta) {
+ toSerialize["typeMeta"] = o.TypeMeta
+ }
+ if !IsNil(o.Version) {
+ toSerialize["version"] = o.Version
+ }
+ return toSerialize, nil
+}
+
+type NullableDataViewResponseObjectDataView struct {
+ value *DataViewResponseObjectDataView
+ isSet bool
+}
+
+func (v NullableDataViewResponseObjectDataView) Get() *DataViewResponseObjectDataView {
+ return v.value
+}
+
+func (v *NullableDataViewResponseObjectDataView) Set(val *DataViewResponseObjectDataView) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableDataViewResponseObjectDataView) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableDataViewResponseObjectDataView) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableDataViewResponseObjectDataView(val *DataViewResponseObjectDataView) *NullableDataViewResponseObjectDataView {
+ return &NullableDataViewResponseObjectDataView{value: val, isSet: true}
+}
+
+func (v NullableDataViewResponseObjectDataView) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableDataViewResponseObjectDataView) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/generated/data_views/model_get_all_data_views_200_response.go b/generated/data_views/model_get_all_data_views_200_response.go
new file mode 100644
index 000000000..f3fccd753
--- /dev/null
+++ b/generated/data_views/model_get_all_data_views_200_response.go
@@ -0,0 +1,124 @@
+/*
+Data views
+
+OpenAPI schema for data view endpoints
+
+API version: 0.1
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package data_views
+
+import (
+ "encoding/json"
+)
+
+// checks if the GetAllDataViews200Response type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &GetAllDataViews200Response{}
+
+// GetAllDataViews200Response struct for GetAllDataViews200Response
+type GetAllDataViews200Response struct {
+ DataView []GetAllDataViews200ResponseDataViewInner `json:"data_view,omitempty"`
+}
+
+// NewGetAllDataViews200Response instantiates a new GetAllDataViews200Response object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewGetAllDataViews200Response() *GetAllDataViews200Response {
+ this := GetAllDataViews200Response{}
+ return &this
+}
+
+// NewGetAllDataViews200ResponseWithDefaults instantiates a new GetAllDataViews200Response object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewGetAllDataViews200ResponseWithDefaults() *GetAllDataViews200Response {
+ this := GetAllDataViews200Response{}
+ return &this
+}
+
+// GetDataView returns the DataView field value if set, zero value otherwise.
+func (o *GetAllDataViews200Response) GetDataView() []GetAllDataViews200ResponseDataViewInner {
+ if o == nil || IsNil(o.DataView) {
+ var ret []GetAllDataViews200ResponseDataViewInner
+ return ret
+ }
+ return o.DataView
+}
+
+// GetDataViewOk returns a tuple with the DataView field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *GetAllDataViews200Response) GetDataViewOk() ([]GetAllDataViews200ResponseDataViewInner, bool) {
+ if o == nil || IsNil(o.DataView) {
+ return nil, false
+ }
+ return o.DataView, true
+}
+
+// HasDataView returns a boolean if a field has been set.
+func (o *GetAllDataViews200Response) HasDataView() bool {
+ if o != nil && !IsNil(o.DataView) {
+ return true
+ }
+
+ return false
+}
+
+// SetDataView gets a reference to the given []GetAllDataViews200ResponseDataViewInner and assigns it to the DataView field.
+func (o *GetAllDataViews200Response) SetDataView(v []GetAllDataViews200ResponseDataViewInner) {
+ o.DataView = v
+}
+
+func (o GetAllDataViews200Response) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o GetAllDataViews200Response) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.DataView) {
+ toSerialize["data_view"] = o.DataView
+ }
+ return toSerialize, nil
+}
+
+type NullableGetAllDataViews200Response struct {
+ value *GetAllDataViews200Response
+ isSet bool
+}
+
+func (v NullableGetAllDataViews200Response) Get() *GetAllDataViews200Response {
+ return v.value
+}
+
+func (v *NullableGetAllDataViews200Response) Set(val *GetAllDataViews200Response) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableGetAllDataViews200Response) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableGetAllDataViews200Response) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableGetAllDataViews200Response(val *GetAllDataViews200Response) *NullableGetAllDataViews200Response {
+ return &NullableGetAllDataViews200Response{value: val, isSet: true}
+}
+
+func (v NullableGetAllDataViews200Response) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableGetAllDataViews200Response) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/generated/data_views/model_get_all_data_views_200_response_data_view_inner.go b/generated/data_views/model_get_all_data_views_200_response_data_view_inner.go
new file mode 100644
index 000000000..73d4ded06
--- /dev/null
+++ b/generated/data_views/model_get_all_data_views_200_response_data_view_inner.go
@@ -0,0 +1,268 @@
+/*
+Data views
+
+OpenAPI schema for data view endpoints
+
+API version: 0.1
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package data_views
+
+import (
+ "encoding/json"
+)
+
+// checks if the GetAllDataViews200ResponseDataViewInner type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &GetAllDataViews200ResponseDataViewInner{}
+
+// GetAllDataViews200ResponseDataViewInner struct for GetAllDataViews200ResponseDataViewInner
+type GetAllDataViews200ResponseDataViewInner struct {
+ Id *string `json:"id,omitempty"`
+ Name *string `json:"name,omitempty"`
+ Namespaces []string `json:"namespaces,omitempty"`
+ Title *string `json:"title,omitempty"`
+ TypeMeta map[string]interface{} `json:"typeMeta,omitempty"`
+}
+
+// NewGetAllDataViews200ResponseDataViewInner instantiates a new GetAllDataViews200ResponseDataViewInner object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewGetAllDataViews200ResponseDataViewInner() *GetAllDataViews200ResponseDataViewInner {
+ this := GetAllDataViews200ResponseDataViewInner{}
+ return &this
+}
+
+// NewGetAllDataViews200ResponseDataViewInnerWithDefaults instantiates a new GetAllDataViews200ResponseDataViewInner object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewGetAllDataViews200ResponseDataViewInnerWithDefaults() *GetAllDataViews200ResponseDataViewInner {
+ this := GetAllDataViews200ResponseDataViewInner{}
+ return &this
+}
+
+// GetId returns the Id field value if set, zero value otherwise.
+func (o *GetAllDataViews200ResponseDataViewInner) GetId() string {
+ if o == nil || IsNil(o.Id) {
+ var ret string
+ return ret
+ }
+ return *o.Id
+}
+
+// GetIdOk returns a tuple with the Id field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *GetAllDataViews200ResponseDataViewInner) GetIdOk() (*string, bool) {
+ if o == nil || IsNil(o.Id) {
+ return nil, false
+ }
+ return o.Id, true
+}
+
+// HasId returns a boolean if a field has been set.
+func (o *GetAllDataViews200ResponseDataViewInner) HasId() bool {
+ if o != nil && !IsNil(o.Id) {
+ return true
+ }
+
+ return false
+}
+
+// SetId gets a reference to the given string and assigns it to the Id field.
+func (o *GetAllDataViews200ResponseDataViewInner) SetId(v string) {
+ o.Id = &v
+}
+
+// GetName returns the Name field value if set, zero value otherwise.
+func (o *GetAllDataViews200ResponseDataViewInner) GetName() string {
+ if o == nil || IsNil(o.Name) {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *GetAllDataViews200ResponseDataViewInner) GetNameOk() (*string, bool) {
+ if o == nil || IsNil(o.Name) {
+ return nil, false
+ }
+ return o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *GetAllDataViews200ResponseDataViewInner) HasName() bool {
+ if o != nil && !IsNil(o.Name) {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *GetAllDataViews200ResponseDataViewInner) SetName(v string) {
+ o.Name = &v
+}
+
+// GetNamespaces returns the Namespaces field value if set, zero value otherwise.
+func (o *GetAllDataViews200ResponseDataViewInner) GetNamespaces() []string {
+ if o == nil || IsNil(o.Namespaces) {
+ var ret []string
+ return ret
+ }
+ return o.Namespaces
+}
+
+// GetNamespacesOk returns a tuple with the Namespaces field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *GetAllDataViews200ResponseDataViewInner) GetNamespacesOk() ([]string, bool) {
+ if o == nil || IsNil(o.Namespaces) {
+ return nil, false
+ }
+ return o.Namespaces, true
+}
+
+// HasNamespaces returns a boolean if a field has been set.
+func (o *GetAllDataViews200ResponseDataViewInner) HasNamespaces() bool {
+ if o != nil && !IsNil(o.Namespaces) {
+ return true
+ }
+
+ return false
+}
+
+// SetNamespaces gets a reference to the given []string and assigns it to the Namespaces field.
+func (o *GetAllDataViews200ResponseDataViewInner) SetNamespaces(v []string) {
+ o.Namespaces = v
+}
+
+// GetTitle returns the Title field value if set, zero value otherwise.
+func (o *GetAllDataViews200ResponseDataViewInner) GetTitle() string {
+ if o == nil || IsNil(o.Title) {
+ var ret string
+ return ret
+ }
+ return *o.Title
+}
+
+// GetTitleOk returns a tuple with the Title field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *GetAllDataViews200ResponseDataViewInner) GetTitleOk() (*string, bool) {
+ if o == nil || IsNil(o.Title) {
+ return nil, false
+ }
+ return o.Title, true
+}
+
+// HasTitle returns a boolean if a field has been set.
+func (o *GetAllDataViews200ResponseDataViewInner) HasTitle() bool {
+ if o != nil && !IsNil(o.Title) {
+ return true
+ }
+
+ return false
+}
+
+// SetTitle gets a reference to the given string and assigns it to the Title field.
+func (o *GetAllDataViews200ResponseDataViewInner) SetTitle(v string) {
+ o.Title = &v
+}
+
+// GetTypeMeta returns the TypeMeta field value if set, zero value otherwise.
+func (o *GetAllDataViews200ResponseDataViewInner) GetTypeMeta() map[string]interface{} {
+ if o == nil || IsNil(o.TypeMeta) {
+ var ret map[string]interface{}
+ return ret
+ }
+ return o.TypeMeta
+}
+
+// GetTypeMetaOk returns a tuple with the TypeMeta field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *GetAllDataViews200ResponseDataViewInner) GetTypeMetaOk() (map[string]interface{}, bool) {
+ if o == nil || IsNil(o.TypeMeta) {
+ return map[string]interface{}{}, false
+ }
+ return o.TypeMeta, true
+}
+
+// HasTypeMeta returns a boolean if a field has been set.
+func (o *GetAllDataViews200ResponseDataViewInner) HasTypeMeta() bool {
+ if o != nil && !IsNil(o.TypeMeta) {
+ return true
+ }
+
+ return false
+}
+
+// SetTypeMeta gets a reference to the given map[string]interface{} and assigns it to the TypeMeta field.
+func (o *GetAllDataViews200ResponseDataViewInner) SetTypeMeta(v map[string]interface{}) {
+ o.TypeMeta = v
+}
+
+func (o GetAllDataViews200ResponseDataViewInner) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o GetAllDataViews200ResponseDataViewInner) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Id) {
+ toSerialize["id"] = o.Id
+ }
+ if !IsNil(o.Name) {
+ toSerialize["name"] = o.Name
+ }
+ if !IsNil(o.Namespaces) {
+ toSerialize["namespaces"] = o.Namespaces
+ }
+ if !IsNil(o.Title) {
+ toSerialize["title"] = o.Title
+ }
+ if !IsNil(o.TypeMeta) {
+ toSerialize["typeMeta"] = o.TypeMeta
+ }
+ return toSerialize, nil
+}
+
+type NullableGetAllDataViews200ResponseDataViewInner struct {
+ value *GetAllDataViews200ResponseDataViewInner
+ isSet bool
+}
+
+func (v NullableGetAllDataViews200ResponseDataViewInner) Get() *GetAllDataViews200ResponseDataViewInner {
+ return v.value
+}
+
+func (v *NullableGetAllDataViews200ResponseDataViewInner) Set(val *GetAllDataViews200ResponseDataViewInner) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableGetAllDataViews200ResponseDataViewInner) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableGetAllDataViews200ResponseDataViewInner) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableGetAllDataViews200ResponseDataViewInner(val *GetAllDataViews200ResponseDataViewInner) *NullableGetAllDataViews200ResponseDataViewInner {
+ return &NullableGetAllDataViews200ResponseDataViewInner{value: val, isSet: true}
+}
+
+func (v NullableGetAllDataViews200ResponseDataViewInner) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableGetAllDataViews200ResponseDataViewInner) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/generated/data_views/model_get_default_data_view_200_response.go b/generated/data_views/model_get_default_data_view_200_response.go
new file mode 100644
index 000000000..209c591f3
--- /dev/null
+++ b/generated/data_views/model_get_default_data_view_200_response.go
@@ -0,0 +1,124 @@
+/*
+Data views
+
+OpenAPI schema for data view endpoints
+
+API version: 0.1
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package data_views
+
+import (
+ "encoding/json"
+)
+
+// checks if the GetDefaultDataView200Response type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &GetDefaultDataView200Response{}
+
+// GetDefaultDataView200Response struct for GetDefaultDataView200Response
+type GetDefaultDataView200Response struct {
+ DataViewId *string `json:"data_view_id,omitempty"`
+}
+
+// NewGetDefaultDataView200Response instantiates a new GetDefaultDataView200Response object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewGetDefaultDataView200Response() *GetDefaultDataView200Response {
+ this := GetDefaultDataView200Response{}
+ return &this
+}
+
+// NewGetDefaultDataView200ResponseWithDefaults instantiates a new GetDefaultDataView200Response object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewGetDefaultDataView200ResponseWithDefaults() *GetDefaultDataView200Response {
+ this := GetDefaultDataView200Response{}
+ return &this
+}
+
+// GetDataViewId returns the DataViewId field value if set, zero value otherwise.
+func (o *GetDefaultDataView200Response) GetDataViewId() string {
+ if o == nil || IsNil(o.DataViewId) {
+ var ret string
+ return ret
+ }
+ return *o.DataViewId
+}
+
+// GetDataViewIdOk returns a tuple with the DataViewId field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *GetDefaultDataView200Response) GetDataViewIdOk() (*string, bool) {
+ if o == nil || IsNil(o.DataViewId) {
+ return nil, false
+ }
+ return o.DataViewId, true
+}
+
+// HasDataViewId returns a boolean if a field has been set.
+func (o *GetDefaultDataView200Response) HasDataViewId() bool {
+ if o != nil && !IsNil(o.DataViewId) {
+ return true
+ }
+
+ return false
+}
+
+// SetDataViewId gets a reference to the given string and assigns it to the DataViewId field.
+func (o *GetDefaultDataView200Response) SetDataViewId(v string) {
+ o.DataViewId = &v
+}
+
+func (o GetDefaultDataView200Response) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o GetDefaultDataView200Response) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.DataViewId) {
+ toSerialize["data_view_id"] = o.DataViewId
+ }
+ return toSerialize, nil
+}
+
+type NullableGetDefaultDataView200Response struct {
+ value *GetDefaultDataView200Response
+ isSet bool
+}
+
+func (v NullableGetDefaultDataView200Response) Get() *GetDefaultDataView200Response {
+ return v.value
+}
+
+func (v *NullableGetDefaultDataView200Response) Set(val *GetDefaultDataView200Response) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableGetDefaultDataView200Response) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableGetDefaultDataView200Response) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableGetDefaultDataView200Response(val *GetDefaultDataView200Response) *NullableGetDefaultDataView200Response {
+ return &NullableGetDefaultDataView200Response{value: val, isSet: true}
+}
+
+func (v NullableGetDefaultDataView200Response) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableGetDefaultDataView200Response) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/generated/data_views/model_get_runtime_field_200_response.go b/generated/data_views/model_get_runtime_field_200_response.go
new file mode 100644
index 000000000..b32af8fef
--- /dev/null
+++ b/generated/data_views/model_get_runtime_field_200_response.go
@@ -0,0 +1,160 @@
+/*
+Data views
+
+OpenAPI schema for data view endpoints
+
+API version: 0.1
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package data_views
+
+import (
+ "encoding/json"
+)
+
+// checks if the GetRuntimeField200Response type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &GetRuntimeField200Response{}
+
+// GetRuntimeField200Response struct for GetRuntimeField200Response
+type GetRuntimeField200Response struct {
+ DataView map[string]interface{} `json:"data_view,omitempty"`
+ Fields []map[string]interface{} `json:"fields,omitempty"`
+}
+
+// NewGetRuntimeField200Response instantiates a new GetRuntimeField200Response object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewGetRuntimeField200Response() *GetRuntimeField200Response {
+ this := GetRuntimeField200Response{}
+ return &this
+}
+
+// NewGetRuntimeField200ResponseWithDefaults instantiates a new GetRuntimeField200Response object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewGetRuntimeField200ResponseWithDefaults() *GetRuntimeField200Response {
+ this := GetRuntimeField200Response{}
+ return &this
+}
+
+// GetDataView returns the DataView field value if set, zero value otherwise.
+func (o *GetRuntimeField200Response) GetDataView() map[string]interface{} {
+ if o == nil || IsNil(o.DataView) {
+ var ret map[string]interface{}
+ return ret
+ }
+ return o.DataView
+}
+
+// GetDataViewOk returns a tuple with the DataView field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *GetRuntimeField200Response) GetDataViewOk() (map[string]interface{}, bool) {
+ if o == nil || IsNil(o.DataView) {
+ return map[string]interface{}{}, false
+ }
+ return o.DataView, true
+}
+
+// HasDataView returns a boolean if a field has been set.
+func (o *GetRuntimeField200Response) HasDataView() bool {
+ if o != nil && !IsNil(o.DataView) {
+ return true
+ }
+
+ return false
+}
+
+// SetDataView gets a reference to the given map[string]interface{} and assigns it to the DataView field.
+func (o *GetRuntimeField200Response) SetDataView(v map[string]interface{}) {
+ o.DataView = v
+}
+
+// GetFields returns the Fields field value if set, zero value otherwise.
+func (o *GetRuntimeField200Response) GetFields() []map[string]interface{} {
+ if o == nil || IsNil(o.Fields) {
+ var ret []map[string]interface{}
+ return ret
+ }
+ return o.Fields
+}
+
+// GetFieldsOk returns a tuple with the Fields field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *GetRuntimeField200Response) GetFieldsOk() ([]map[string]interface{}, bool) {
+ if o == nil || IsNil(o.Fields) {
+ return nil, false
+ }
+ return o.Fields, true
+}
+
+// HasFields returns a boolean if a field has been set.
+func (o *GetRuntimeField200Response) HasFields() bool {
+ if o != nil && !IsNil(o.Fields) {
+ return true
+ }
+
+ return false
+}
+
+// SetFields gets a reference to the given []map[string]interface{} and assigns it to the Fields field.
+func (o *GetRuntimeField200Response) SetFields(v []map[string]interface{}) {
+ o.Fields = v
+}
+
+func (o GetRuntimeField200Response) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o GetRuntimeField200Response) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.DataView) {
+ toSerialize["data_view"] = o.DataView
+ }
+ if !IsNil(o.Fields) {
+ toSerialize["fields"] = o.Fields
+ }
+ return toSerialize, nil
+}
+
+type NullableGetRuntimeField200Response struct {
+ value *GetRuntimeField200Response
+ isSet bool
+}
+
+func (v NullableGetRuntimeField200Response) Get() *GetRuntimeField200Response {
+ return v.value
+}
+
+func (v *NullableGetRuntimeField200Response) Set(val *GetRuntimeField200Response) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableGetRuntimeField200Response) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableGetRuntimeField200Response) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableGetRuntimeField200Response(val *GetRuntimeField200Response) *NullableGetRuntimeField200Response {
+ return &NullableGetRuntimeField200Response{value: val, isSet: true}
+}
+
+func (v NullableGetRuntimeField200Response) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableGetRuntimeField200Response) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/generated/data_views/model_set_default_datail_view_request.go b/generated/data_views/model_set_default_datail_view_request.go
new file mode 100644
index 000000000..82997ba59
--- /dev/null
+++ b/generated/data_views/model_set_default_datail_view_request.go
@@ -0,0 +1,161 @@
+/*
+Data views
+
+OpenAPI schema for data view endpoints
+
+API version: 0.1
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package data_views
+
+import (
+ "encoding/json"
+)
+
+// checks if the SetDefaultDatailViewRequest type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &SetDefaultDatailViewRequest{}
+
+// SetDefaultDatailViewRequest struct for SetDefaultDatailViewRequest
+type SetDefaultDatailViewRequest struct {
+ // The data view identifier. NOTE: The API does not validate whether it is a valid identifier. Use `null` to unset the default data view.
+ DataViewId interface{} `json:"data_view_id"`
+ // Update an existing default data view identifier.
+ Force *bool `json:"force,omitempty"`
+}
+
+// NewSetDefaultDatailViewRequest instantiates a new SetDefaultDatailViewRequest object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewSetDefaultDatailViewRequest(dataViewId interface{}) *SetDefaultDatailViewRequest {
+ this := SetDefaultDatailViewRequest{}
+ this.DataViewId = dataViewId
+ var force bool = false
+ this.Force = &force
+ return &this
+}
+
+// NewSetDefaultDatailViewRequestWithDefaults instantiates a new SetDefaultDatailViewRequest object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewSetDefaultDatailViewRequestWithDefaults() *SetDefaultDatailViewRequest {
+ this := SetDefaultDatailViewRequest{}
+ var force bool = false
+ this.Force = &force
+ return &this
+}
+
+// GetDataViewId returns the DataViewId field value
+// If the value is explicit nil, the zero value for interface{} will be returned
+func (o *SetDefaultDatailViewRequest) GetDataViewId() interface{} {
+ if o == nil {
+ var ret interface{}
+ return ret
+ }
+
+ return o.DataViewId
+}
+
+// GetDataViewIdOk returns a tuple with the DataViewId field value
+// and a boolean to check if the value has been set.
+// NOTE: If the value is an explicit nil, `nil, true` will be returned
+func (o *SetDefaultDatailViewRequest) GetDataViewIdOk() (*interface{}, bool) {
+ if o == nil || IsNil(o.DataViewId) {
+ return nil, false
+ }
+ return &o.DataViewId, true
+}
+
+// SetDataViewId sets field value
+func (o *SetDefaultDatailViewRequest) SetDataViewId(v interface{}) {
+ o.DataViewId = v
+}
+
+// GetForce returns the Force field value if set, zero value otherwise.
+func (o *SetDefaultDatailViewRequest) GetForce() bool {
+ if o == nil || IsNil(o.Force) {
+ var ret bool
+ return ret
+ }
+ return *o.Force
+}
+
+// GetForceOk returns a tuple with the Force field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *SetDefaultDatailViewRequest) GetForceOk() (*bool, bool) {
+ if o == nil || IsNil(o.Force) {
+ return nil, false
+ }
+ return o.Force, true
+}
+
+// HasForce returns a boolean if a field has been set.
+func (o *SetDefaultDatailViewRequest) HasForce() bool {
+ if o != nil && !IsNil(o.Force) {
+ return true
+ }
+
+ return false
+}
+
+// SetForce gets a reference to the given bool and assigns it to the Force field.
+func (o *SetDefaultDatailViewRequest) SetForce(v bool) {
+ o.Force = &v
+}
+
+func (o SetDefaultDatailViewRequest) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o SetDefaultDatailViewRequest) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if o.DataViewId != nil {
+ toSerialize["data_view_id"] = o.DataViewId
+ }
+ if !IsNil(o.Force) {
+ toSerialize["force"] = o.Force
+ }
+ return toSerialize, nil
+}
+
+type NullableSetDefaultDatailViewRequest struct {
+ value *SetDefaultDatailViewRequest
+ isSet bool
+}
+
+func (v NullableSetDefaultDatailViewRequest) Get() *SetDefaultDatailViewRequest {
+ return v.value
+}
+
+func (v *NullableSetDefaultDatailViewRequest) Set(val *SetDefaultDatailViewRequest) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableSetDefaultDatailViewRequest) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableSetDefaultDatailViewRequest) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableSetDefaultDatailViewRequest(val *SetDefaultDatailViewRequest) *NullableSetDefaultDatailViewRequest {
+ return &NullableSetDefaultDatailViewRequest{value: val, isSet: true}
+}
+
+func (v NullableSetDefaultDatailViewRequest) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableSetDefaultDatailViewRequest) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/generated/data_views/model_sourcefilters_inner.go b/generated/data_views/model_sourcefilters_inner.go
new file mode 100644
index 000000000..e15ce7277
--- /dev/null
+++ b/generated/data_views/model_sourcefilters_inner.go
@@ -0,0 +1,115 @@
+/*
+Data views
+
+OpenAPI schema for data view endpoints
+
+API version: 0.1
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package data_views
+
+import (
+ "encoding/json"
+)
+
+// checks if the SourcefiltersInner type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &SourcefiltersInner{}
+
+// SourcefiltersInner struct for SourcefiltersInner
+type SourcefiltersInner struct {
+ Value string `json:"value"`
+}
+
+// NewSourcefiltersInner instantiates a new SourcefiltersInner object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewSourcefiltersInner(value string) *SourcefiltersInner {
+ this := SourcefiltersInner{}
+ this.Value = value
+ return &this
+}
+
+// NewSourcefiltersInnerWithDefaults instantiates a new SourcefiltersInner object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewSourcefiltersInnerWithDefaults() *SourcefiltersInner {
+ this := SourcefiltersInner{}
+ return &this
+}
+
+// GetValue returns the Value field value
+func (o *SourcefiltersInner) GetValue() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Value
+}
+
+// GetValueOk returns a tuple with the Value field value
+// and a boolean to check if the value has been set.
+func (o *SourcefiltersInner) GetValueOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Value, true
+}
+
+// SetValue sets field value
+func (o *SourcefiltersInner) SetValue(v string) {
+ o.Value = v
+}
+
+func (o SourcefiltersInner) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o SourcefiltersInner) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["value"] = o.Value
+ return toSerialize, nil
+}
+
+type NullableSourcefiltersInner struct {
+ value *SourcefiltersInner
+ isSet bool
+}
+
+func (v NullableSourcefiltersInner) Get() *SourcefiltersInner {
+ return v.value
+}
+
+func (v *NullableSourcefiltersInner) Set(val *SourcefiltersInner) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableSourcefiltersInner) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableSourcefiltersInner) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableSourcefiltersInner(val *SourcefiltersInner) *NullableSourcefiltersInner {
+ return &NullableSourcefiltersInner{value: val, isSet: true}
+}
+
+func (v NullableSourcefiltersInner) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableSourcefiltersInner) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/generated/data_views/model_update_data_view_request_object.go b/generated/data_views/model_update_data_view_request_object.go
new file mode 100644
index 000000000..0ebbb5223
--- /dev/null
+++ b/generated/data_views/model_update_data_view_request_object.go
@@ -0,0 +1,156 @@
+/*
+Data views
+
+OpenAPI schema for data view endpoints
+
+API version: 0.1
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package data_views
+
+import (
+ "encoding/json"
+)
+
+// checks if the UpdateDataViewRequestObject type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &UpdateDataViewRequestObject{}
+
+// UpdateDataViewRequestObject struct for UpdateDataViewRequestObject
+type UpdateDataViewRequestObject struct {
+ DataView UpdateDataViewRequestObjectDataView `json:"data_view"`
+ // Reloads the data view fields after the data view is updated.
+ RefreshFields *bool `json:"refresh_fields,omitempty"`
+}
+
+// NewUpdateDataViewRequestObject instantiates a new UpdateDataViewRequestObject object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewUpdateDataViewRequestObject(dataView UpdateDataViewRequestObjectDataView) *UpdateDataViewRequestObject {
+ this := UpdateDataViewRequestObject{}
+ this.DataView = dataView
+ var refreshFields bool = false
+ this.RefreshFields = &refreshFields
+ return &this
+}
+
+// NewUpdateDataViewRequestObjectWithDefaults instantiates a new UpdateDataViewRequestObject object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewUpdateDataViewRequestObjectWithDefaults() *UpdateDataViewRequestObject {
+ this := UpdateDataViewRequestObject{}
+ var refreshFields bool = false
+ this.RefreshFields = &refreshFields
+ return &this
+}
+
+// GetDataView returns the DataView field value
+func (o *UpdateDataViewRequestObject) GetDataView() UpdateDataViewRequestObjectDataView {
+ if o == nil {
+ var ret UpdateDataViewRequestObjectDataView
+ return ret
+ }
+
+ return o.DataView
+}
+
+// GetDataViewOk returns a tuple with the DataView field value
+// and a boolean to check if the value has been set.
+func (o *UpdateDataViewRequestObject) GetDataViewOk() (*UpdateDataViewRequestObjectDataView, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.DataView, true
+}
+
+// SetDataView sets field value
+func (o *UpdateDataViewRequestObject) SetDataView(v UpdateDataViewRequestObjectDataView) {
+ o.DataView = v
+}
+
+// GetRefreshFields returns the RefreshFields field value if set, zero value otherwise.
+func (o *UpdateDataViewRequestObject) GetRefreshFields() bool {
+ if o == nil || IsNil(o.RefreshFields) {
+ var ret bool
+ return ret
+ }
+ return *o.RefreshFields
+}
+
+// GetRefreshFieldsOk returns a tuple with the RefreshFields field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *UpdateDataViewRequestObject) GetRefreshFieldsOk() (*bool, bool) {
+ if o == nil || IsNil(o.RefreshFields) {
+ return nil, false
+ }
+ return o.RefreshFields, true
+}
+
+// HasRefreshFields returns a boolean if a field has been set.
+func (o *UpdateDataViewRequestObject) HasRefreshFields() bool {
+ if o != nil && !IsNil(o.RefreshFields) {
+ return true
+ }
+
+ return false
+}
+
+// SetRefreshFields gets a reference to the given bool and assigns it to the RefreshFields field.
+func (o *UpdateDataViewRequestObject) SetRefreshFields(v bool) {
+ o.RefreshFields = &v
+}
+
+func (o UpdateDataViewRequestObject) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o UpdateDataViewRequestObject) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["data_view"] = o.DataView
+ if !IsNil(o.RefreshFields) {
+ toSerialize["refresh_fields"] = o.RefreshFields
+ }
+ return toSerialize, nil
+}
+
+type NullableUpdateDataViewRequestObject struct {
+ value *UpdateDataViewRequestObject
+ isSet bool
+}
+
+func (v NullableUpdateDataViewRequestObject) Get() *UpdateDataViewRequestObject {
+ return v.value
+}
+
+func (v *NullableUpdateDataViewRequestObject) Set(val *UpdateDataViewRequestObject) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableUpdateDataViewRequestObject) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableUpdateDataViewRequestObject) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableUpdateDataViewRequestObject(val *UpdateDataViewRequestObject) *NullableUpdateDataViewRequestObject {
+ return &NullableUpdateDataViewRequestObject{value: val, isSet: true}
+}
+
+func (v NullableUpdateDataViewRequestObject) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableUpdateDataViewRequestObject) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/generated/data_views/model_update_data_view_request_object_data_view.go b/generated/data_views/model_update_data_view_request_object_data_view.go
new file mode 100644
index 000000000..04a11b149
--- /dev/null
+++ b/generated/data_views/model_update_data_view_request_object_data_view.go
@@ -0,0 +1,456 @@
+/*
+Data views
+
+OpenAPI schema for data view endpoints
+
+API version: 0.1
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package data_views
+
+import (
+ "encoding/json"
+)
+
+// checks if the UpdateDataViewRequestObjectDataView type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &UpdateDataViewRequestObjectDataView{}
+
+// UpdateDataViewRequestObjectDataView The data view properties you want to update. Only the specified properties are updated in the data view. Unspecified fields stay as they are persisted.
+type UpdateDataViewRequestObjectDataView struct {
+ // Allows the data view saved object to exist before the data is available.
+ AllowNoIndex *bool `json:"allowNoIndex,omitempty"`
+ // A map of field formats by field name.
+ FieldFormats map[string]interface{} `json:"fieldFormats,omitempty"`
+ Fields map[string]interface{} `json:"fields,omitempty"`
+ Name *string `json:"name,omitempty"`
+ // A map of runtime field definitions by field name.
+ RuntimeFieldMap map[string]interface{} `json:"runtimeFieldMap,omitempty"`
+ // The array of field names you want to filter out in Discover.
+ SourceFilters []SourcefiltersInner `json:"sourceFilters,omitempty"`
+ // The timestamp field name, which you use for time-based data views.
+ TimeFieldName *string `json:"timeFieldName,omitempty"`
+ // Comma-separated list of data streams, indices, and aliases that you want to search. Supports wildcards (`*`).
+ Title *string `json:"title,omitempty"`
+ // When set to `rollup`, identifies the rollup data views.
+ Type *string `json:"type,omitempty"`
+ // When you use rollup indices, contains the field list for the rollup data view API endpoints.
+ TypeMeta map[string]interface{} `json:"typeMeta,omitempty"`
+}
+
+// NewUpdateDataViewRequestObjectDataView instantiates a new UpdateDataViewRequestObjectDataView object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewUpdateDataViewRequestObjectDataView() *UpdateDataViewRequestObjectDataView {
+ this := UpdateDataViewRequestObjectDataView{}
+ return &this
+}
+
+// NewUpdateDataViewRequestObjectDataViewWithDefaults instantiates a new UpdateDataViewRequestObjectDataView object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewUpdateDataViewRequestObjectDataViewWithDefaults() *UpdateDataViewRequestObjectDataView {
+ this := UpdateDataViewRequestObjectDataView{}
+ return &this
+}
+
+// GetAllowNoIndex returns the AllowNoIndex field value if set, zero value otherwise.
+func (o *UpdateDataViewRequestObjectDataView) GetAllowNoIndex() bool {
+ if o == nil || IsNil(o.AllowNoIndex) {
+ var ret bool
+ return ret
+ }
+ return *o.AllowNoIndex
+}
+
+// GetAllowNoIndexOk returns a tuple with the AllowNoIndex field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *UpdateDataViewRequestObjectDataView) GetAllowNoIndexOk() (*bool, bool) {
+ if o == nil || IsNil(o.AllowNoIndex) {
+ return nil, false
+ }
+ return o.AllowNoIndex, true
+}
+
+// HasAllowNoIndex returns a boolean if a field has been set.
+func (o *UpdateDataViewRequestObjectDataView) HasAllowNoIndex() bool {
+ if o != nil && !IsNil(o.AllowNoIndex) {
+ return true
+ }
+
+ return false
+}
+
+// SetAllowNoIndex gets a reference to the given bool and assigns it to the AllowNoIndex field.
+func (o *UpdateDataViewRequestObjectDataView) SetAllowNoIndex(v bool) {
+ o.AllowNoIndex = &v
+}
+
+// GetFieldFormats returns the FieldFormats field value if set, zero value otherwise.
+func (o *UpdateDataViewRequestObjectDataView) GetFieldFormats() map[string]interface{} {
+ if o == nil || IsNil(o.FieldFormats) {
+ var ret map[string]interface{}
+ return ret
+ }
+ return o.FieldFormats
+}
+
+// GetFieldFormatsOk returns a tuple with the FieldFormats field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *UpdateDataViewRequestObjectDataView) GetFieldFormatsOk() (map[string]interface{}, bool) {
+ if o == nil || IsNil(o.FieldFormats) {
+ return map[string]interface{}{}, false
+ }
+ return o.FieldFormats, true
+}
+
+// HasFieldFormats returns a boolean if a field has been set.
+func (o *UpdateDataViewRequestObjectDataView) HasFieldFormats() bool {
+ if o != nil && !IsNil(o.FieldFormats) {
+ return true
+ }
+
+ return false
+}
+
+// SetFieldFormats gets a reference to the given map[string]interface{} and assigns it to the FieldFormats field.
+func (o *UpdateDataViewRequestObjectDataView) SetFieldFormats(v map[string]interface{}) {
+ o.FieldFormats = v
+}
+
+// GetFields returns the Fields field value if set, zero value otherwise.
+func (o *UpdateDataViewRequestObjectDataView) GetFields() map[string]interface{} {
+ if o == nil || IsNil(o.Fields) {
+ var ret map[string]interface{}
+ return ret
+ }
+ return o.Fields
+}
+
+// GetFieldsOk returns a tuple with the Fields field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *UpdateDataViewRequestObjectDataView) GetFieldsOk() (map[string]interface{}, bool) {
+ if o == nil || IsNil(o.Fields) {
+ return map[string]interface{}{}, false
+ }
+ return o.Fields, true
+}
+
+// HasFields returns a boolean if a field has been set.
+func (o *UpdateDataViewRequestObjectDataView) HasFields() bool {
+ if o != nil && !IsNil(o.Fields) {
+ return true
+ }
+
+ return false
+}
+
+// SetFields gets a reference to the given map[string]interface{} and assigns it to the Fields field.
+func (o *UpdateDataViewRequestObjectDataView) SetFields(v map[string]interface{}) {
+ o.Fields = v
+}
+
+// GetName returns the Name field value if set, zero value otherwise.
+func (o *UpdateDataViewRequestObjectDataView) GetName() string {
+ if o == nil || IsNil(o.Name) {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *UpdateDataViewRequestObjectDataView) GetNameOk() (*string, bool) {
+ if o == nil || IsNil(o.Name) {
+ return nil, false
+ }
+ return o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *UpdateDataViewRequestObjectDataView) HasName() bool {
+ if o != nil && !IsNil(o.Name) {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *UpdateDataViewRequestObjectDataView) SetName(v string) {
+ o.Name = &v
+}
+
+// GetRuntimeFieldMap returns the RuntimeFieldMap field value if set, zero value otherwise.
+func (o *UpdateDataViewRequestObjectDataView) GetRuntimeFieldMap() map[string]interface{} {
+ if o == nil || IsNil(o.RuntimeFieldMap) {
+ var ret map[string]interface{}
+ return ret
+ }
+ return o.RuntimeFieldMap
+}
+
+// GetRuntimeFieldMapOk returns a tuple with the RuntimeFieldMap field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *UpdateDataViewRequestObjectDataView) GetRuntimeFieldMapOk() (map[string]interface{}, bool) {
+ if o == nil || IsNil(o.RuntimeFieldMap) {
+ return map[string]interface{}{}, false
+ }
+ return o.RuntimeFieldMap, true
+}
+
+// HasRuntimeFieldMap returns a boolean if a field has been set.
+func (o *UpdateDataViewRequestObjectDataView) HasRuntimeFieldMap() bool {
+ if o != nil && !IsNil(o.RuntimeFieldMap) {
+ return true
+ }
+
+ return false
+}
+
+// SetRuntimeFieldMap gets a reference to the given map[string]interface{} and assigns it to the RuntimeFieldMap field.
+func (o *UpdateDataViewRequestObjectDataView) SetRuntimeFieldMap(v map[string]interface{}) {
+ o.RuntimeFieldMap = v
+}
+
+// GetSourceFilters returns the SourceFilters field value if set, zero value otherwise.
+func (o *UpdateDataViewRequestObjectDataView) GetSourceFilters() []SourcefiltersInner {
+ if o == nil || IsNil(o.SourceFilters) {
+ var ret []SourcefiltersInner
+ return ret
+ }
+ return o.SourceFilters
+}
+
+// GetSourceFiltersOk returns a tuple with the SourceFilters field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *UpdateDataViewRequestObjectDataView) GetSourceFiltersOk() ([]SourcefiltersInner, bool) {
+ if o == nil || IsNil(o.SourceFilters) {
+ return nil, false
+ }
+ return o.SourceFilters, true
+}
+
+// HasSourceFilters returns a boolean if a field has been set.
+func (o *UpdateDataViewRequestObjectDataView) HasSourceFilters() bool {
+ if o != nil && !IsNil(o.SourceFilters) {
+ return true
+ }
+
+ return false
+}
+
+// SetSourceFilters gets a reference to the given []SourcefiltersInner and assigns it to the SourceFilters field.
+func (o *UpdateDataViewRequestObjectDataView) SetSourceFilters(v []SourcefiltersInner) {
+ o.SourceFilters = v
+}
+
+// GetTimeFieldName returns the TimeFieldName field value if set, zero value otherwise.
+func (o *UpdateDataViewRequestObjectDataView) GetTimeFieldName() string {
+ if o == nil || IsNil(o.TimeFieldName) {
+ var ret string
+ return ret
+ }
+ return *o.TimeFieldName
+}
+
+// GetTimeFieldNameOk returns a tuple with the TimeFieldName field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *UpdateDataViewRequestObjectDataView) GetTimeFieldNameOk() (*string, bool) {
+ if o == nil || IsNil(o.TimeFieldName) {
+ return nil, false
+ }
+ return o.TimeFieldName, true
+}
+
+// HasTimeFieldName returns a boolean if a field has been set.
+func (o *UpdateDataViewRequestObjectDataView) HasTimeFieldName() bool {
+ if o != nil && !IsNil(o.TimeFieldName) {
+ return true
+ }
+
+ return false
+}
+
+// SetTimeFieldName gets a reference to the given string and assigns it to the TimeFieldName field.
+func (o *UpdateDataViewRequestObjectDataView) SetTimeFieldName(v string) {
+ o.TimeFieldName = &v
+}
+
+// GetTitle returns the Title field value if set, zero value otherwise.
+func (o *UpdateDataViewRequestObjectDataView) GetTitle() string {
+ if o == nil || IsNil(o.Title) {
+ var ret string
+ return ret
+ }
+ return *o.Title
+}
+
+// GetTitleOk returns a tuple with the Title field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *UpdateDataViewRequestObjectDataView) GetTitleOk() (*string, bool) {
+ if o == nil || IsNil(o.Title) {
+ return nil, false
+ }
+ return o.Title, true
+}
+
+// HasTitle returns a boolean if a field has been set.
+func (o *UpdateDataViewRequestObjectDataView) HasTitle() bool {
+ if o != nil && !IsNil(o.Title) {
+ return true
+ }
+
+ return false
+}
+
+// SetTitle gets a reference to the given string and assigns it to the Title field.
+func (o *UpdateDataViewRequestObjectDataView) SetTitle(v string) {
+ o.Title = &v
+}
+
+// GetType returns the Type field value if set, zero value otherwise.
+func (o *UpdateDataViewRequestObjectDataView) GetType() string {
+ if o == nil || IsNil(o.Type) {
+ var ret string
+ return ret
+ }
+ return *o.Type
+}
+
+// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *UpdateDataViewRequestObjectDataView) GetTypeOk() (*string, bool) {
+ if o == nil || IsNil(o.Type) {
+ return nil, false
+ }
+ return o.Type, true
+}
+
+// HasType returns a boolean if a field has been set.
+func (o *UpdateDataViewRequestObjectDataView) HasType() bool {
+ if o != nil && !IsNil(o.Type) {
+ return true
+ }
+
+ return false
+}
+
+// SetType gets a reference to the given string and assigns it to the Type field.
+func (o *UpdateDataViewRequestObjectDataView) SetType(v string) {
+ o.Type = &v
+}
+
+// GetTypeMeta returns the TypeMeta field value if set, zero value otherwise.
+func (o *UpdateDataViewRequestObjectDataView) GetTypeMeta() map[string]interface{} {
+ if o == nil || IsNil(o.TypeMeta) {
+ var ret map[string]interface{}
+ return ret
+ }
+ return o.TypeMeta
+}
+
+// GetTypeMetaOk returns a tuple with the TypeMeta field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *UpdateDataViewRequestObjectDataView) GetTypeMetaOk() (map[string]interface{}, bool) {
+ if o == nil || IsNil(o.TypeMeta) {
+ return map[string]interface{}{}, false
+ }
+ return o.TypeMeta, true
+}
+
+// HasTypeMeta returns a boolean if a field has been set.
+func (o *UpdateDataViewRequestObjectDataView) HasTypeMeta() bool {
+ if o != nil && !IsNil(o.TypeMeta) {
+ return true
+ }
+
+ return false
+}
+
+// SetTypeMeta gets a reference to the given map[string]interface{} and assigns it to the TypeMeta field.
+func (o *UpdateDataViewRequestObjectDataView) SetTypeMeta(v map[string]interface{}) {
+ o.TypeMeta = v
+}
+
+func (o UpdateDataViewRequestObjectDataView) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o UpdateDataViewRequestObjectDataView) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.AllowNoIndex) {
+ toSerialize["allowNoIndex"] = o.AllowNoIndex
+ }
+ if !IsNil(o.FieldFormats) {
+ toSerialize["fieldFormats"] = o.FieldFormats
+ }
+ if !IsNil(o.Fields) {
+ toSerialize["fields"] = o.Fields
+ }
+ if !IsNil(o.Name) {
+ toSerialize["name"] = o.Name
+ }
+ if !IsNil(o.RuntimeFieldMap) {
+ toSerialize["runtimeFieldMap"] = o.RuntimeFieldMap
+ }
+ if !IsNil(o.SourceFilters) {
+ toSerialize["sourceFilters"] = o.SourceFilters
+ }
+ if !IsNil(o.TimeFieldName) {
+ toSerialize["timeFieldName"] = o.TimeFieldName
+ }
+ if !IsNil(o.Title) {
+ toSerialize["title"] = o.Title
+ }
+ if !IsNil(o.Type) {
+ toSerialize["type"] = o.Type
+ }
+ if !IsNil(o.TypeMeta) {
+ toSerialize["typeMeta"] = o.TypeMeta
+ }
+ return toSerialize, nil
+}
+
+type NullableUpdateDataViewRequestObjectDataView struct {
+ value *UpdateDataViewRequestObjectDataView
+ isSet bool
+}
+
+func (v NullableUpdateDataViewRequestObjectDataView) Get() *UpdateDataViewRequestObjectDataView {
+ return v.value
+}
+
+func (v *NullableUpdateDataViewRequestObjectDataView) Set(val *UpdateDataViewRequestObjectDataView) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableUpdateDataViewRequestObjectDataView) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableUpdateDataViewRequestObjectDataView) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableUpdateDataViewRequestObjectDataView(val *UpdateDataViewRequestObjectDataView) *NullableUpdateDataViewRequestObjectDataView {
+ return &NullableUpdateDataViewRequestObjectDataView{value: val, isSet: true}
+}
+
+func (v NullableUpdateDataViewRequestObjectDataView) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableUpdateDataViewRequestObjectDataView) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/generated/data_views/model_update_fields_metadata_200_response.go b/generated/data_views/model_update_fields_metadata_200_response.go
new file mode 100644
index 000000000..a1252dba6
--- /dev/null
+++ b/generated/data_views/model_update_fields_metadata_200_response.go
@@ -0,0 +1,124 @@
+/*
+Data views
+
+OpenAPI schema for data view endpoints
+
+API version: 0.1
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package data_views
+
+import (
+ "encoding/json"
+)
+
+// checks if the UpdateFieldsMetadata200Response type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &UpdateFieldsMetadata200Response{}
+
+// UpdateFieldsMetadata200Response struct for UpdateFieldsMetadata200Response
+type UpdateFieldsMetadata200Response struct {
+ Acknowledged *bool `json:"acknowledged,omitempty"`
+}
+
+// NewUpdateFieldsMetadata200Response instantiates a new UpdateFieldsMetadata200Response object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewUpdateFieldsMetadata200Response() *UpdateFieldsMetadata200Response {
+ this := UpdateFieldsMetadata200Response{}
+ return &this
+}
+
+// NewUpdateFieldsMetadata200ResponseWithDefaults instantiates a new UpdateFieldsMetadata200Response object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewUpdateFieldsMetadata200ResponseWithDefaults() *UpdateFieldsMetadata200Response {
+ this := UpdateFieldsMetadata200Response{}
+ return &this
+}
+
+// GetAcknowledged returns the Acknowledged field value if set, zero value otherwise.
+func (o *UpdateFieldsMetadata200Response) GetAcknowledged() bool {
+ if o == nil || IsNil(o.Acknowledged) {
+ var ret bool
+ return ret
+ }
+ return *o.Acknowledged
+}
+
+// GetAcknowledgedOk returns a tuple with the Acknowledged field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *UpdateFieldsMetadata200Response) GetAcknowledgedOk() (*bool, bool) {
+ if o == nil || IsNil(o.Acknowledged) {
+ return nil, false
+ }
+ return o.Acknowledged, true
+}
+
+// HasAcknowledged returns a boolean if a field has been set.
+func (o *UpdateFieldsMetadata200Response) HasAcknowledged() bool {
+ if o != nil && !IsNil(o.Acknowledged) {
+ return true
+ }
+
+ return false
+}
+
+// SetAcknowledged gets a reference to the given bool and assigns it to the Acknowledged field.
+func (o *UpdateFieldsMetadata200Response) SetAcknowledged(v bool) {
+ o.Acknowledged = &v
+}
+
+func (o UpdateFieldsMetadata200Response) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o UpdateFieldsMetadata200Response) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Acknowledged) {
+ toSerialize["acknowledged"] = o.Acknowledged
+ }
+ return toSerialize, nil
+}
+
+type NullableUpdateFieldsMetadata200Response struct {
+ value *UpdateFieldsMetadata200Response
+ isSet bool
+}
+
+func (v NullableUpdateFieldsMetadata200Response) Get() *UpdateFieldsMetadata200Response {
+ return v.value
+}
+
+func (v *NullableUpdateFieldsMetadata200Response) Set(val *UpdateFieldsMetadata200Response) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableUpdateFieldsMetadata200Response) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableUpdateFieldsMetadata200Response) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableUpdateFieldsMetadata200Response(val *UpdateFieldsMetadata200Response) *NullableUpdateFieldsMetadata200Response {
+ return &NullableUpdateFieldsMetadata200Response{value: val, isSet: true}
+}
+
+func (v NullableUpdateFieldsMetadata200Response) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableUpdateFieldsMetadata200Response) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/generated/data_views/model_update_fields_metadata_request.go b/generated/data_views/model_update_fields_metadata_request.go
new file mode 100644
index 000000000..79afbd099
--- /dev/null
+++ b/generated/data_views/model_update_fields_metadata_request.go
@@ -0,0 +1,116 @@
+/*
+Data views
+
+OpenAPI schema for data view endpoints
+
+API version: 0.1
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package data_views
+
+import (
+ "encoding/json"
+)
+
+// checks if the UpdateFieldsMetadataRequest type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &UpdateFieldsMetadataRequest{}
+
+// UpdateFieldsMetadataRequest struct for UpdateFieldsMetadataRequest
+type UpdateFieldsMetadataRequest struct {
+ // The field object.
+ Fields map[string]interface{} `json:"fields"`
+}
+
+// NewUpdateFieldsMetadataRequest instantiates a new UpdateFieldsMetadataRequest object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewUpdateFieldsMetadataRequest(fields map[string]interface{}) *UpdateFieldsMetadataRequest {
+ this := UpdateFieldsMetadataRequest{}
+ this.Fields = fields
+ return &this
+}
+
+// NewUpdateFieldsMetadataRequestWithDefaults instantiates a new UpdateFieldsMetadataRequest object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewUpdateFieldsMetadataRequestWithDefaults() *UpdateFieldsMetadataRequest {
+ this := UpdateFieldsMetadataRequest{}
+ return &this
+}
+
+// GetFields returns the Fields field value
+func (o *UpdateFieldsMetadataRequest) GetFields() map[string]interface{} {
+ if o == nil {
+ var ret map[string]interface{}
+ return ret
+ }
+
+ return o.Fields
+}
+
+// GetFieldsOk returns a tuple with the Fields field value
+// and a boolean to check if the value has been set.
+func (o *UpdateFieldsMetadataRequest) GetFieldsOk() (map[string]interface{}, bool) {
+ if o == nil {
+ return map[string]interface{}{}, false
+ }
+ return o.Fields, true
+}
+
+// SetFields sets field value
+func (o *UpdateFieldsMetadataRequest) SetFields(v map[string]interface{}) {
+ o.Fields = v
+}
+
+func (o UpdateFieldsMetadataRequest) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o UpdateFieldsMetadataRequest) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["fields"] = o.Fields
+ return toSerialize, nil
+}
+
+type NullableUpdateFieldsMetadataRequest struct {
+ value *UpdateFieldsMetadataRequest
+ isSet bool
+}
+
+func (v NullableUpdateFieldsMetadataRequest) Get() *UpdateFieldsMetadataRequest {
+ return v.value
+}
+
+func (v *NullableUpdateFieldsMetadataRequest) Set(val *UpdateFieldsMetadataRequest) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableUpdateFieldsMetadataRequest) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableUpdateFieldsMetadataRequest) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableUpdateFieldsMetadataRequest(val *UpdateFieldsMetadataRequest) *NullableUpdateFieldsMetadataRequest {
+ return &NullableUpdateFieldsMetadataRequest{value: val, isSet: true}
+}
+
+func (v NullableUpdateFieldsMetadataRequest) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableUpdateFieldsMetadataRequest) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/generated/data_views/model_update_runtime_field_request.go b/generated/data_views/model_update_runtime_field_request.go
new file mode 100644
index 000000000..dba0beb5d
--- /dev/null
+++ b/generated/data_views/model_update_runtime_field_request.go
@@ -0,0 +1,116 @@
+/*
+Data views
+
+OpenAPI schema for data view endpoints
+
+API version: 0.1
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package data_views
+
+import (
+ "encoding/json"
+)
+
+// checks if the UpdateRuntimeFieldRequest type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &UpdateRuntimeFieldRequest{}
+
+// UpdateRuntimeFieldRequest struct for UpdateRuntimeFieldRequest
+type UpdateRuntimeFieldRequest struct {
+ // The runtime field definition object. You can update following fields: - `type` - `script`
+ RuntimeField map[string]interface{} `json:"runtimeField"`
+}
+
+// NewUpdateRuntimeFieldRequest instantiates a new UpdateRuntimeFieldRequest object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewUpdateRuntimeFieldRequest(runtimeField map[string]interface{}) *UpdateRuntimeFieldRequest {
+ this := UpdateRuntimeFieldRequest{}
+ this.RuntimeField = runtimeField
+ return &this
+}
+
+// NewUpdateRuntimeFieldRequestWithDefaults instantiates a new UpdateRuntimeFieldRequest object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewUpdateRuntimeFieldRequestWithDefaults() *UpdateRuntimeFieldRequest {
+ this := UpdateRuntimeFieldRequest{}
+ return &this
+}
+
+// GetRuntimeField returns the RuntimeField field value
+func (o *UpdateRuntimeFieldRequest) GetRuntimeField() map[string]interface{} {
+ if o == nil {
+ var ret map[string]interface{}
+ return ret
+ }
+
+ return o.RuntimeField
+}
+
+// GetRuntimeFieldOk returns a tuple with the RuntimeField field value
+// and a boolean to check if the value has been set.
+func (o *UpdateRuntimeFieldRequest) GetRuntimeFieldOk() (map[string]interface{}, bool) {
+ if o == nil {
+ return map[string]interface{}{}, false
+ }
+ return o.RuntimeField, true
+}
+
+// SetRuntimeField sets field value
+func (o *UpdateRuntimeFieldRequest) SetRuntimeField(v map[string]interface{}) {
+ o.RuntimeField = v
+}
+
+func (o UpdateRuntimeFieldRequest) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o UpdateRuntimeFieldRequest) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["runtimeField"] = o.RuntimeField
+ return toSerialize, nil
+}
+
+type NullableUpdateRuntimeFieldRequest struct {
+ value *UpdateRuntimeFieldRequest
+ isSet bool
+}
+
+func (v NullableUpdateRuntimeFieldRequest) Get() *UpdateRuntimeFieldRequest {
+ return v.value
+}
+
+func (v *NullableUpdateRuntimeFieldRequest) Set(val *UpdateRuntimeFieldRequest) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableUpdateRuntimeFieldRequest) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableUpdateRuntimeFieldRequest) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableUpdateRuntimeFieldRequest(val *UpdateRuntimeFieldRequest) *NullableUpdateRuntimeFieldRequest {
+ return &NullableUpdateRuntimeFieldRequest{value: val, isSet: true}
+}
+
+func (v NullableUpdateRuntimeFieldRequest) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableUpdateRuntimeFieldRequest) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/generated/data_views/response.go b/generated/data_views/response.go
new file mode 100644
index 000000000..e6cf63ca8
--- /dev/null
+++ b/generated/data_views/response.go
@@ -0,0 +1,47 @@
+/*
+Data views
+
+OpenAPI schema for data view endpoints
+
+API version: 0.1
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package data_views
+
+import (
+ "net/http"
+)
+
+// APIResponse stores the API response returned by the server.
+type APIResponse struct {
+ *http.Response `json:"-"`
+ Message string `json:"message,omitempty"`
+ // Operation is the name of the OpenAPI operation.
+ Operation string `json:"operation,omitempty"`
+ // RequestURL is the request URL. This value is always available, even if the
+ // embedded *http.Response is nil.
+ RequestURL string `json:"url,omitempty"`
+ // Method is the HTTP method used for the request. This value is always
+ // available, even if the embedded *http.Response is nil.
+ Method string `json:"method,omitempty"`
+ // Payload holds the contents of the response body (which may be nil or empty).
+ // This is provided here as the raw response.Body() reader will have already
+ // been drained.
+ Payload []byte `json:"-"`
+}
+
+// NewAPIResponse returns a new APIResponse object.
+func NewAPIResponse(r *http.Response) *APIResponse {
+
+ response := &APIResponse{Response: r}
+ return response
+}
+
+// NewAPIResponseWithError returns a new APIResponse object with the provided error message.
+func NewAPIResponseWithError(errorMessage string) *APIResponse {
+
+ response := &APIResponse{Message: errorMessage}
+ return response
+}
diff --git a/generated/data_views/utils.go b/generated/data_views/utils.go
new file mode 100644
index 000000000..d628c9d25
--- /dev/null
+++ b/generated/data_views/utils.go
@@ -0,0 +1,347 @@
+/*
+Data views
+
+OpenAPI schema for data view endpoints
+
+API version: 0.1
+*/
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package data_views
+
+import (
+ "encoding/json"
+ "reflect"
+ "time"
+)
+
+// PtrBool is a helper routine that returns a pointer to given boolean value.
+func PtrBool(v bool) *bool { return &v }
+
+// PtrInt is a helper routine that returns a pointer to given integer value.
+func PtrInt(v int) *int { return &v }
+
+// PtrInt32 is a helper routine that returns a pointer to given integer value.
+func PtrInt32(v int32) *int32 { return &v }
+
+// PtrInt64 is a helper routine that returns a pointer to given integer value.
+func PtrInt64(v int64) *int64 { return &v }
+
+// PtrFloat32 is a helper routine that returns a pointer to given float value.
+func PtrFloat32(v float32) *float32 { return &v }
+
+// PtrFloat64 is a helper routine that returns a pointer to given float value.
+func PtrFloat64(v float64) *float64 { return &v }
+
+// PtrString is a helper routine that returns a pointer to given string value.
+func PtrString(v string) *string { return &v }
+
+// PtrTime is helper routine that returns a pointer to given Time value.
+func PtrTime(v time.Time) *time.Time { return &v }
+
+type NullableBool struct {
+ value *bool
+ isSet bool
+}
+
+func (v NullableBool) Get() *bool {
+ return v.value
+}
+
+func (v *NullableBool) Set(val *bool) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableBool) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableBool) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableBool(val *bool) *NullableBool {
+ return &NullableBool{value: val, isSet: true}
+}
+
+func (v NullableBool) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableBool) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
+
+type NullableInt struct {
+ value *int
+ isSet bool
+}
+
+func (v NullableInt) Get() *int {
+ return v.value
+}
+
+func (v *NullableInt) Set(val *int) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableInt) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableInt) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableInt(val *int) *NullableInt {
+ return &NullableInt{value: val, isSet: true}
+}
+
+func (v NullableInt) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableInt) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
+
+type NullableInt32 struct {
+ value *int32
+ isSet bool
+}
+
+func (v NullableInt32) Get() *int32 {
+ return v.value
+}
+
+func (v *NullableInt32) Set(val *int32) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableInt32) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableInt32) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableInt32(val *int32) *NullableInt32 {
+ return &NullableInt32{value: val, isSet: true}
+}
+
+func (v NullableInt32) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableInt32) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
+
+type NullableInt64 struct {
+ value *int64
+ isSet bool
+}
+
+func (v NullableInt64) Get() *int64 {
+ return v.value
+}
+
+func (v *NullableInt64) Set(val *int64) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableInt64) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableInt64) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableInt64(val *int64) *NullableInt64 {
+ return &NullableInt64{value: val, isSet: true}
+}
+
+func (v NullableInt64) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableInt64) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
+
+type NullableFloat32 struct {
+ value *float32
+ isSet bool
+}
+
+func (v NullableFloat32) Get() *float32 {
+ return v.value
+}
+
+func (v *NullableFloat32) Set(val *float32) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableFloat32) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableFloat32) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableFloat32(val *float32) *NullableFloat32 {
+ return &NullableFloat32{value: val, isSet: true}
+}
+
+func (v NullableFloat32) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableFloat32) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
+
+type NullableFloat64 struct {
+ value *float64
+ isSet bool
+}
+
+func (v NullableFloat64) Get() *float64 {
+ return v.value
+}
+
+func (v *NullableFloat64) Set(val *float64) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableFloat64) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableFloat64) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableFloat64(val *float64) *NullableFloat64 {
+ return &NullableFloat64{value: val, isSet: true}
+}
+
+func (v NullableFloat64) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableFloat64) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
+
+type NullableString struct {
+ value *string
+ isSet bool
+}
+
+func (v NullableString) Get() *string {
+ return v.value
+}
+
+func (v *NullableString) Set(val *string) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableString) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableString) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableString(val *string) *NullableString {
+ return &NullableString{value: val, isSet: true}
+}
+
+func (v NullableString) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableString) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
+
+type NullableTime struct {
+ value *time.Time
+ isSet bool
+}
+
+func (v NullableTime) Get() *time.Time {
+ return v.value
+}
+
+func (v *NullableTime) Set(val *time.Time) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableTime) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableTime) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableTime(val *time.Time) *NullableTime {
+ return &NullableTime{value: val, isSet: true}
+}
+
+func (v NullableTime) MarshalJSON() ([]byte, error) {
+ return v.value.MarshalJSON()
+}
+
+func (v *NullableTime) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
+
+// IsNil checks if an input is nil
+func IsNil(i interface{}) bool {
+ if i == nil {
+ return true
+ }
+ switch reflect.TypeOf(i).Kind() {
+ case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice:
+ return reflect.ValueOf(i).IsNil()
+ case reflect.Array:
+ return reflect.ValueOf(i).IsZero()
+ }
+ return false
+}
+
+type MappedNullable interface {
+ ToMap() (map[string]interface{}, error)
+}
diff --git a/go.mod b/go.mod
index c6c3bbf55..b797d8255 100644
--- a/go.mod
+++ b/go.mod
@@ -15,6 +15,7 @@ require (
github.com/hashicorp/terraform-plugin-log v0.9.0
github.com/hashicorp/terraform-plugin-mux v0.12.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.30.0
+ github.com/hashicorp/terraform-plugin-testing v1.6.0
github.com/mitchellh/mapstructure v1.5.0
github.com/oapi-codegen/runtime v1.1.0
github.com/stretchr/testify v1.8.4
@@ -43,7 +44,7 @@ require (
github.com/hashicorp/hcl/v2 v2.19.1 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-exec v0.19.0 // indirect
- github.com/hashicorp/terraform-json v0.17.1 // indirect
+ github.com/hashicorp/terraform-json v0.18.0 // indirect
github.com/hashicorp/terraform-registry-address v0.2.3 // indirect
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87 // indirect
@@ -62,10 +63,11 @@ require (
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/zclconf/go-cty v1.14.1 // indirect
- golang.org/x/crypto v0.15.0 // indirect
+ golang.org/x/crypto v0.16.0 // indirect
+ golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 // indirect
golang.org/x/mod v0.13.0 // indirect
golang.org/x/net v0.17.0 // indirect
- golang.org/x/sys v0.14.0 // indirect
+ golang.org/x/sys v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
diff --git a/go.sum b/go.sum
index b44994e24..e735222d0 100644
--- a/go.sum
+++ b/go.sum
@@ -77,8 +77,8 @@ github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
github.com/hashicorp/terraform-exec v0.19.0 h1:FpqZ6n50Tk95mItTSS9BjeOVUb4eg81SpgVtZNNtFSM=
github.com/hashicorp/terraform-exec v0.19.0/go.mod h1:tbxUpe3JKruE9Cuf65mycSIT8KiNPZ0FkuTE3H4urQg=
-github.com/hashicorp/terraform-json v0.17.1 h1:eMfvh/uWggKmY7Pmb3T85u86E2EQg6EQHgyRwf3RkyA=
-github.com/hashicorp/terraform-json v0.17.1/go.mod h1:Huy6zt6euxaY9knPAFKjUITn8QxUFIe9VuSzb4zn/0o=
+github.com/hashicorp/terraform-json v0.18.0 h1:pCjgJEqqDESv4y0Tzdqfxr/edOIGkjs8keY42xfNBwU=
+github.com/hashicorp/terraform-json v0.18.0/go.mod h1:qdeBs11ovMzo5puhrRibdD6d2Dq6TyE/28JiU4tIQxk=
github.com/hashicorp/terraform-plugin-framework v1.4.2 h1:P7a7VP1GZbjc4rv921Xy5OckzhoiO3ig6SGxwelD2sI=
github.com/hashicorp/terraform-plugin-framework v1.4.2/go.mod h1:GWl3InPFZi2wVQmdVnINPKys09s9mLmTZr95/ngLnbY=
github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 h1:HOjBuMbOEzl7snOdOoUfE2Jgeto6JOjLVQ39Ls2nksc=
@@ -91,6 +91,8 @@ github.com/hashicorp/terraform-plugin-mux v0.12.0 h1:TJlmeslQ11WlQtIFAfth0vXx+gS
github.com/hashicorp/terraform-plugin-mux v0.12.0/go.mod h1:8MR0AgmV+Q03DIjyrAKxXyYlq2EUnYBQP8gxAAA0zeM=
github.com/hashicorp/terraform-plugin-sdk/v2 v2.30.0 h1:X7vB6vn5tON2b49ILa4W7mFAsndeqJ7bZFOGbVO+0Cc=
github.com/hashicorp/terraform-plugin-sdk/v2 v2.30.0/go.mod h1:ydFcxbdj6klCqYEPkPvdvFKiNGKZLUs+896ODUXCyao=
+github.com/hashicorp/terraform-plugin-testing v1.6.0 h1:Wsnfh+7XSVRfwcr2jZYHsnLOnZl7UeaOBvsx6dl/608=
+github.com/hashicorp/terraform-plugin-testing v1.6.0/go.mod h1:cJGG0/8j9XhHaJZRC+0sXFI4uzqQZ9Az4vh6C4GJpFE=
github.com/hashicorp/terraform-registry-address v0.2.3 h1:2TAiKJ1A3MAkZlH1YI/aTVcLZRu7JseiXNRHbOAyoTI=
github.com/hashicorp/terraform-registry-address v0.2.3/go.mod h1:lFHA76T8jfQteVfT7caREqguFrW3c4MFSPhZB7HHgUM=
github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ=
@@ -168,8 +170,10 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
-golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA=
-golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g=
+golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY=
+golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
+golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 h1:EDuYyU/MkFXllv9QF9819VlI9a4tzGuCbhG0ExK9o1U=
+golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY=
@@ -206,14 +210,14 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q=
-golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
+golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
-golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8=
+golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
diff --git a/internal/clients/api_client.go b/internal/clients/api_client.go
index 993ba8333..5b3d6a4a3 100644
--- a/internal/clients/api_client.go
+++ b/internal/clients/api_client.go
@@ -13,6 +13,7 @@ import (
"github.com/elastic/go-elasticsearch/v7"
"github.com/elastic/terraform-provider-elasticstack/generated/alerting"
"github.com/elastic/terraform-provider-elasticstack/generated/connectors"
+ "github.com/elastic/terraform-provider-elasticstack/generated/data_views"
"github.com/elastic/terraform-provider-elasticstack/generated/slo"
"github.com/elastic/terraform-provider-elasticstack/internal/clients/config"
"github.com/elastic/terraform-provider-elasticstack/internal/clients/fleet"
@@ -65,7 +66,8 @@ type ApiClient struct {
elasticsearch *elasticsearch.Client
elasticsearchClusterInfo *models.ClusterInfo
kibana *kibana.Client
- alerting alerting.AlertingApi
+ alerting alerting.AlertingAPI
+ dataViews data_views.DataViewsAPI
connectors *connectors.Client
slo slo.SloAPI
kibanaConfig kibana.Config
@@ -106,7 +108,8 @@ func NewAcceptanceTestingClient() (*ApiClient, error) {
return &ApiClient{
elasticsearch: es,
kibana: kib,
- alerting: buildAlertingClient(cfg).AlertingApi,
+ alerting: buildAlertingClient(cfg).AlertingAPI,
+ dataViews: buildDataViewsClient(cfg).DataViewsAPI,
slo: buildSloClient(cfg).SloAPI,
connectors: actionConnectors,
kibanaConfig: *cfg.Kibana,
@@ -193,7 +196,7 @@ func (a *ApiClient) GetKibanaClient() (*kibana.Client, error) {
return a.kibana, nil
}
-func (a *ApiClient) GetAlertingClient() (alerting.AlertingApi, error) {
+func (a *ApiClient) GetAlertingClient() (alerting.AlertingAPI, error) {
if a.alerting == nil {
return nil, errors.New("alerting client not found")
}
@@ -201,6 +204,14 @@ func (a *ApiClient) GetAlertingClient() (alerting.AlertingApi, error) {
return a.alerting, nil
}
+func (a *ApiClient) GetDataViewsClient() (data_views.DataViewsAPI, error) {
+ if a.dataViews == nil {
+ return nil, errors.New("data views client not found")
+ }
+
+ return a.dataViews, nil
+}
+
func (a *ApiClient) GetKibanaConnectorsClient(ctx context.Context) (*connectors.Client, error) {
if a.connectors == nil {
return nil, errors.New("kibana action connector client not found")
@@ -255,6 +266,13 @@ func (a *ApiClient) SetAlertingAuthContext(ctx context.Context) context.Context
}
}
+func (a *ApiClient) SetDataviewAuthContext(ctx context.Context) context.Context {
+ return context.WithValue(ctx, data_views.ContextBasicAuth, data_views.BasicAuth{
+ UserName: a.kibanaConfig.Username,
+ Password: a.kibanaConfig.Password,
+ })
+}
+
func (a *ApiClient) ID(ctx context.Context, resourceId string) (*CompositeId, diag.Diagnostics) {
var diags diag.Diagnostics
clusterId, diags := a.ClusterID(ctx)
@@ -372,6 +390,19 @@ func buildAlertingClient(cfg config.Client) *alerting.APIClient {
return alerting.NewAPIClient(&alertingConfig)
}
+func buildDataViewsClient(cfg config.Client) *data_views.APIClient {
+ dvConfig := data_views.Configuration{
+ UserAgent: cfg.UserAgent,
+ Servers: data_views.ServerConfigurations{
+ {
+ URL: cfg.Kibana.Address,
+ },
+ },
+ Debug: logging.IsDebugOrHigher(),
+ }
+ return data_views.NewAPIClient(&dvConfig)
+}
+
func buildConnectorsClient(cfg config.Client) (*connectors.Client, error) {
var authInterceptor connectors.ClientOption
if cfg.Kibana.ApiKey != "" {
@@ -469,7 +500,8 @@ func newApiClientFromConfig(cfg config.Client, version string) (*ApiClient, erro
}
client.kibana = kibanaClient
- client.alerting = buildAlertingClient(cfg).AlertingApi
+ client.alerting = buildAlertingClient(cfg).AlertingAPI
+ client.dataViews = buildDataViewsClient(cfg).DataViewsAPI
client.slo = buildSloClient(cfg).SloAPI
client.connectors = connectorsClient
}
diff --git a/internal/kibana/data_view/acc_test.go b/internal/kibana/data_view/acc_test.go
new file mode 100644
index 000000000..ff0e7f1fa
--- /dev/null
+++ b/internal/kibana/data_view/acc_test.go
@@ -0,0 +1,131 @@
+package data_view_test
+
+import (
+ "fmt"
+ "testing"
+
+ "github.com/elastic/terraform-provider-elasticstack/internal/acctest"
+ "github.com/elastic/terraform-provider-elasticstack/internal/versionutils"
+ "github.com/hashicorp/go-version"
+ sdkacctest "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
+ "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
+)
+
+var minDataViewAPISupport = version.Must(version.NewVersion("8.1.0"))
+var minFullDataviewSupport = version.Must(version.NewVersion("8.8.0"))
+
+func TestAccResourceDataView(t *testing.T) {
+ indexName := "my-index-" + sdkacctest.RandStringFromCharSet(4, sdkacctest.CharSetAlphaNum)
+
+ resource.Test(t, resource.TestCase{
+ PreCheck: func() { acctest.PreCheck(t) },
+ ProtoV6ProviderFactories: acctest.Providers,
+ Steps: []resource.TestStep{
+ {
+ SkipFunc: versionutils.CheckIfVersionIsUnsupported(minDataViewAPISupport),
+ Config: testAccResourceDataViewPre8_8DV(indexName),
+ Check: resource.ComposeTestCheckFunc(
+ resource.TestCheckResourceAttrSet("elasticstack_kibana_data_view.dv", "id"),
+ ),
+ },
+ {
+ SkipFunc: versionutils.CheckIfVersionIsUnsupported(minFullDataviewSupport),
+ Config: testAccResourceDataViewBasicDV(indexName),
+ Check: resource.ComposeTestCheckFunc(
+ resource.TestCheckResourceAttrSet("elasticstack_kibana_data_view.dv", "id"),
+ resource.TestCheckResourceAttr("elasticstack_kibana_data_view.dv", "data_view.name", indexName),
+ resource.TestCheckResourceAttr("elasticstack_kibana_data_view.dv", "data_view.source_filters.#", "2"),
+ resource.TestCheckResourceAttr("elasticstack_kibana_data_view.dv", "data_view.field_formats.event_time.id", "date_nanos"),
+ resource.TestCheckResourceAttr("elasticstack_kibana_data_view.dv", "data_view.field_formats.machine.ram.params.pattern", "0,0.[000] b"),
+ resource.TestCheckResourceAttr("elasticstack_kibana_data_view.dv", "data_view.runtime_field_map.runtime_shape_name.script_source", "emit(doc['shape_name'].value)"),
+ ),
+ },
+ {
+ SkipFunc: versionutils.CheckIfVersionIsUnsupported(minFullDataviewSupport),
+ Config: testAccResourceDataViewBasicDVUpdated(indexName),
+ Check: resource.ComposeTestCheckFunc(
+ resource.TestCheckResourceAttrSet("elasticstack_kibana_data_view.dv", "id"),
+ resource.TestCheckResourceAttr("elasticstack_kibana_data_view.dv", "data_view.name", indexName),
+ resource.TestCheckNoResourceAttr("elasticstack_kibana_data_view.dv", "data_view.source_filters"),
+ resource.TestCheckNoResourceAttr("elasticstack_kibana_data_view.dv", "data_view.field_formats"),
+ resource.TestCheckNoResourceAttr("elasticstack_kibana_data_view.dv", "data_view.runtime_field_map"),
+ ),
+ },
+ },
+ })
+}
+
+func testAccResourceDataViewPre8_8DV(indexName string) string {
+ return `
+provider "elasticstack" {
+ elasticsearch {}
+ kibana {}
+}
+
+resource "elasticstack_kibana_data_view" "dv" {
+ data_view = {}
+}`
+}
+
+func testAccResourceDataViewBasicDV(indexName string) string {
+ return fmt.Sprintf(`
+provider "elasticstack" {
+ elasticsearch {}
+ kibana {}
+}
+
+resource "elasticstack_elasticsearch_index" "my_index" {
+ name = "%s"
+ deletion_protection = false
+}
+
+resource "elasticstack_kibana_data_view" "dv" {
+ data_view = {
+ title = "%s*"
+ name = "%s"
+ time_field_name = "@timestamp"
+ source_filters = ["event_time", "machine.ram"]
+ allow_no_index = true
+ namespaces = ["default", "foo", "bar"]
+ field_formats = {
+ event_time = {
+ id = "date_nanos"
+ }
+ "machine.ram" = {
+ id = "number"
+ params = {
+ pattern = "0,0.[000] b"
+ }
+ }
+ }
+ runtime_field_map = {
+ runtime_shape_name = {
+ type = "keyword"
+ script_source = "emit(doc['shape_name'].value)"
+ }
+ }
+ }
+}`, indexName, indexName, indexName)
+}
+
+func testAccResourceDataViewBasicDVUpdated(indexName string) string {
+ return fmt.Sprintf(`
+provider "elasticstack" {
+ elasticsearch {}
+ kibana {}
+}
+
+resource "elasticstack_elasticsearch_index" "my_index" {
+ name = "%s"
+ deletion_protection = false
+}
+
+resource "elasticstack_kibana_data_view" "dv" {
+ data_view = {
+ title = "%s*"
+ name = "%s"
+ time_field_name = "@timestamp"
+ allow_no_index = true
+ }
+}`, indexName, indexName, indexName)
+}
diff --git a/internal/kibana/data_view/create.go b/internal/kibana/data_view/create.go
new file mode 100644
index 000000000..4243fd528
--- /dev/null
+++ b/internal/kibana/data_view/create.go
@@ -0,0 +1,51 @@
+package data_view
+
+import (
+ "context"
+
+ "github.com/elastic/terraform-provider-elasticstack/internal/utils"
+ "github.com/hashicorp/terraform-plugin-framework/resource"
+ "github.com/hashicorp/terraform-plugin-framework/types"
+)
+
+func (r *Resource) Create(ctx context.Context, request resource.CreateRequest, response *resource.CreateResponse) {
+ if !r.resourceReady(&response.Diagnostics) {
+ return
+ }
+
+ dataviewClient, err := r.client.GetDataViewsClient()
+ if err != nil {
+ response.Diagnostics.AddError("unable to get data view client", err.Error())
+ return
+ }
+
+ var model tfModelV0
+ response.Diagnostics.Append(request.Plan.Get(ctx, &model)...)
+ if response.Diagnostics.HasError() {
+ return
+ }
+
+ apiModel, diags := model.ToCreateRequest(ctx)
+ response.Diagnostics.Append(diags...)
+ authCtx := r.client.SetDataviewAuthContext(ctx)
+ respModel, res, err := dataviewClient.CreateDataView(authCtx).CreateDataViewRequestObject(apiModel).KbnXsrf("true").Execute()
+ if err != nil && res == nil {
+ response.Diagnostics.AddError("Failed to create data view", err.Error())
+ return
+ }
+
+ defer res.Body.Close()
+ response.Diagnostics.Append(utils.CheckHttpErrorFromFW(res, "Unable to create data view")...)
+ if response.Diagnostics.HasError() {
+ return
+ }
+
+ model.ID = types.StringPointerValue(respModel.DataView.Id)
+ readModel, diags := r.read(ctx, model)
+ response.Diagnostics = append(response.Diagnostics, diags...)
+ if response.Diagnostics.HasError() {
+ return
+ }
+
+ response.Diagnostics.Append(response.State.Set(ctx, readModel)...)
+}
diff --git a/internal/kibana/data_view/delete.go b/internal/kibana/data_view/delete.go
new file mode 100644
index 000000000..7404081f5
--- /dev/null
+++ b/internal/kibana/data_view/delete.go
@@ -0,0 +1,35 @@
+package data_view
+
+import (
+ "context"
+
+ "github.com/elastic/terraform-provider-elasticstack/internal/utils"
+ "github.com/hashicorp/terraform-plugin-framework/resource"
+)
+
+func (r *Resource) Delete(ctx context.Context, request resource.DeleteRequest, response *resource.DeleteResponse) {
+ if !r.resourceReady(&response.Diagnostics) {
+ return
+ }
+
+ dataviewClient, err := r.client.GetDataViewsClient()
+ if err != nil {
+ response.Diagnostics.AddError("unable to get data view client", err.Error())
+ return
+ }
+
+ var model tfModelV0
+ response.Diagnostics.Append(request.State.Get(ctx, &model)...)
+ if response.Diagnostics.HasError() {
+ return
+ }
+
+ authCtx := r.client.SetDataviewAuthContext(ctx)
+ res, err := dataviewClient.DeleteDataView(authCtx, model.ID.ValueString()).KbnXsrf("true").Execute()
+ if err != nil && res == nil {
+ response.Diagnostics.AddError("Failed to delete data view", err.Error())
+ }
+
+ defer res.Body.Close()
+ response.Diagnostics.Append(utils.CheckHttpErrorFromFW(res, "Unable to delete data view")...)
+}
diff --git a/internal/kibana/data_view/read.go b/internal/kibana/data_view/read.go
new file mode 100644
index 000000000..fd2355741
--- /dev/null
+++ b/internal/kibana/data_view/read.go
@@ -0,0 +1,67 @@
+package data_view
+
+import (
+ "context"
+
+ "github.com/elastic/terraform-provider-elasticstack/internal/utils"
+ "github.com/hashicorp/terraform-plugin-framework/diag"
+ "github.com/hashicorp/terraform-plugin-framework/resource"
+)
+
+func (r *Resource) Read(ctx context.Context, request resource.ReadRequest, response *resource.ReadResponse) {
+ if !r.resourceReady(&response.Diagnostics) {
+ return
+ }
+
+ var model tfModelV0
+ response.Diagnostics.Append(request.State.Get(ctx, &model)...)
+ if response.Diagnostics.HasError() {
+ return
+ }
+
+ apiModel, diags := r.read(ctx, model)
+ response.Diagnostics = append(response.Diagnostics, diags...)
+ if response.Diagnostics.HasError() {
+ return
+ }
+
+ if apiModel == nil {
+ response.State.RemoveResource(ctx)
+ return
+ }
+
+ response.Diagnostics.Append(response.State.Set(ctx, apiModel)...)
+}
+
+func (r *Resource) read(ctx context.Context, model tfModelV0) (*apiModelV0, diag.Diagnostics) {
+ dataviewClient, err := r.client.GetDataViewsClient()
+ if err != nil {
+ return nil, diag.Diagnostics{
+ diag.NewErrorDiagnostic("unable to get data view client", err.Error()),
+ }
+ }
+
+ authCtx := r.client.SetDataviewAuthContext(ctx)
+ respModel, res, err := dataviewClient.GetDataView(authCtx, model.ID.ValueString()).Execute()
+ if err != nil && res == nil {
+ return nil, diag.Diagnostics{
+ diag.NewErrorDiagnostic("failed to read data view", err.Error()),
+ }
+ }
+
+ defer res.Body.Close()
+ if res.StatusCode == 404 {
+ return nil, nil
+ }
+
+ if diags := utils.CheckHttpErrorFromFW(res, "Unable to read data view"); diags.HasError() {
+ return nil, diags
+ }
+
+ apiModel, diags := model.FromResponse(ctx, respModel)
+ if diags.HasError() {
+ return nil, diags
+ }
+
+ return &apiModel, nil
+}
diff --git a/internal/kibana/data_view/schema.go b/internal/kibana/data_view/schema.go
new file mode 100644
index 000000000..e4b48b915
--- /dev/null
+++ b/internal/kibana/data_view/schema.go
@@ -0,0 +1,635 @@
+package data_view
+
+import (
+ "context"
+
+ "github.com/elastic/terraform-provider-elasticstack/generated/data_views"
+ "github.com/elastic/terraform-provider-elasticstack/internal/clients"
+ "github.com/hashicorp/terraform-plugin-framework/diag"
+ "github.com/hashicorp/terraform-plugin-framework/resource"
+ "github.com/hashicorp/terraform-plugin-framework/resource/schema"
+ "github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault"
+ "github.com/hashicorp/terraform-plugin-framework/resource/schema/boolplanmodifier"
+ "github.com/hashicorp/terraform-plugin-framework/resource/schema/listplanmodifier"
+ "github.com/hashicorp/terraform-plugin-framework/resource/schema/mapplanmodifier"
+ "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
+ "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault"
+ "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
+ "github.com/hashicorp/terraform-plugin-framework/tfsdk"
+ "github.com/hashicorp/terraform-plugin-framework/types"
+ "github.com/hashicorp/terraform-plugin-framework/types/basetypes"
+)
+
+// Ensure provider defined types fully satisfy framework interfaces
+var _ resource.Resource = &Resource{}
+var _ resource.ResourceWithConfigure = &Resource{}
+
+func (r *Resource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) {
+ resp.Schema = getSchema()
+}
+
+func getSchema() schema.Schema {
+ return schema.Schema{
+ Description: "Manages Kibana data views",
+ Attributes: map[string]schema.Attribute{
+ "id": schema.StringAttribute{
+ Computed: true,
+ MarkdownDescription: "Generated ID for the data view.",
+ PlanModifiers: []planmodifier.String{
+ stringplanmodifier.UseStateForUnknown(),
+ },
+ },
+ "space_id": schema.StringAttribute{
+ Description: "An identifier for the space. If space_id is not provided, the default space is used.",
+ Optional: true,
+ Computed: true,
+ Default: stringdefault.StaticString("default"),
+ PlanModifiers: []planmodifier.String{
+ stringplanmodifier.RequiresReplace(),
+ },
+ },
+ "override": schema.BoolAttribute{
+ Description: "Overrides an existing data view if a data view with the provided title already exists.",
+ Optional: true,
+ Computed: true,
+ Default: booldefault.StaticBool(false),
+ },
+ "data_view": schema.SingleNestedAttribute{
+ Required: true,
+ Attributes: map[string]schema.Attribute{
+ "title": schema.StringAttribute{
+ Description: "Comma-separated list of data streams, indices, and aliases that you want to search. Supports wildcards (*).",
+ Optional: true,
+ Computed: true,
+ PlanModifiers: []planmodifier.String{
+ stringplanmodifier.UseStateForUnknown(),
+ },
+ },
+ "name": schema.StringAttribute{
+ Description: "The Data view name.",
+ Optional: true,
+ Computed: true,
+ PlanModifiers: []planmodifier.String{
+ stringplanmodifier.UseStateForUnknown(),
+ },
+ },
+ "id": schema.StringAttribute{
+ Description: "Saved object ID.",
+ Optional: true,
+ Computed: true,
+ PlanModifiers: []planmodifier.String{
+ stringplanmodifier.UseStateForUnknown(),
+ stringplanmodifier.RequiresReplace(),
+ },
+ },
+ "time_field_name": schema.StringAttribute{
+ Description: "Timestamp field name, which you use for time-based Data views.",
+ Optional: true,
+ Computed: true,
+ PlanModifiers: []planmodifier.String{
+ stringplanmodifier.UseStateForUnknown(),
+ },
+ },
+ "source_filters": schema.ListAttribute{
+ Description: "List of field names you want to filter out in Discover.",
+ ElementType: types.StringType,
+ Optional: true,
+ },
+ "field_attrs": schema.MapNestedAttribute{
+ Description: "Map of field attributes by field name.",
+ NestedObject: schema.NestedAttributeObject{
+ Attributes: map[string]schema.Attribute{
+ "custom_label": schema.StringAttribute{
+ Description: "Custom label for the field.",
+ Optional: true,
+ },
+ "count": schema.Int64Attribute{
+ Description: "Popularity count for the field.",
+ Optional: true,
+ },
+ },
+ },
+ Optional: true,
+ PlanModifiers: []planmodifier.Map{
+ mapplanmodifier.RequiresReplace(),
+ },
+ },
+ "runtime_field_map": schema.MapNestedAttribute{
+ Description: "Map of runtime field definitions by field name.",
+ Optional: true,
+ NestedObject: schema.NestedAttributeObject{
+ Attributes: map[string]schema.Attribute{
+ "type": schema.StringAttribute{
+ MarkdownDescription: "Mapping type of the runtime field. For more information, check [Field data types](https://www.elastic.co/guide/en/elasticsearch/reference/8.11/mapping-types.html).",
+ Required: true,
+ },
+ "script_source": schema.StringAttribute{
+ Description: "Script of the runtime field.",
+ Required: true,
+ },
+ },
+ },
+ },
+ "field_formats": schema.MapNestedAttribute{
+ Description: "Map of field formats by field name.",
+ Optional: true,
+ NestedObject: schema.NestedAttributeObject{
+ Attributes: map[string]schema.Attribute{
+ "id": schema.StringAttribute{
+ Required: true,
+ },
+ "params": schema.SingleNestedAttribute{
+ Optional: true,
+ Attributes: map[string]schema.Attribute{
+ "pattern": schema.StringAttribute{
+ Optional: true,
+ },
+ },
+ },
+ },
+ },
+ },
+ "allow_no_index": schema.BoolAttribute{
+ Description: "Allows the Data view saved object to exist before the data is available.",
+ Optional: true,
+ Computed: true,
+ Default: booldefault.StaticBool(false),
+ PlanModifiers: []planmodifier.Bool{
+ boolplanmodifier.RequiresReplace(),
+ },
+ },
+ "namespaces": schema.ListAttribute{
+ Description: "Array of space IDs for sharing the Data view between multiple spaces.",
+ ElementType: types.StringType,
+ Optional: true,
+ PlanModifiers: []planmodifier.List{
+ listplanmodifier.RequiresReplace(),
+ },
+ },
+ },
+ },
+ },
+ }
+}
+
+type Resource struct {
+ client *clients.ApiClient
+}
+
+func (r *Resource) resourceReady(dg *diag.Diagnostics) bool {
+ if r.client == nil {
+ dg.AddError(
+ "Unconfigured Client",
+ "Expected configured client. Please report this issue to the provider developers.",
+ )
+
+ return false
+ }
+ return true
+}
+
+func (r *Resource) Configure(ctx context.Context, request resource.ConfigureRequest, response *resource.ConfigureResponse) {
+ client, diags := clients.ConvertProviderData(request.ProviderData)
+ response.Diagnostics.Append(diags...)
+ r.client = client
+}
+
+func (r *Resource) Metadata(ctx context.Context, request resource.MetadataRequest, response *resource.MetadataResponse) {
+ response.TypeName = request.ProviderTypeName + "_kibana_data_view"
+}
+
+type tfModelV0 struct {
+ ID types.String `tfsdk:"id"`
+ SpaceID types.String `tfsdk:"space_id"`
+ Override types.Bool `tfsdk:"override"`
+ DataView types.Object `tfsdk:"data_view"` //> dataViewV0
+}
+
+type apiModelV0 struct {
+ ID string `tfsdk:"id"`
+ SpaceID string `tfsdk:"space_id"`
+ Override bool `tfsdk:"override"`
+ DataView apiDataViewV0 `tfsdk:"data_view"`
+}
+
+func (m tfModelV0) ToCreateRequest(ctx context.Context) (data_views.CreateDataViewRequestObject, diag.Diagnostics) {
+ apiModel := data_views.CreateDataViewRequestObject{
+ Override: m.Override.ValueBoolPointer(),
+ }
+
+ var dataView tfDataViewV0
+ if diags := m.DataView.As(ctx, &dataView, basetypes.ObjectAsOptions{}); diags.HasError() {
+ return data_views.CreateDataViewRequestObject{}, diags
+ }
+
+ dv, diags := dataView.ToCreateRequest(ctx)
+ if diags.HasError() {
+ return data_views.CreateDataViewRequestObject{}, diags
+ }
+
+ apiModel.DataView = dv
+ return apiModel, nil
+}
+
+func (m tfModelV0) ToUpdateRequest(ctx context.Context) (data_views.UpdateDataViewRequestObject, diag.Diagnostics) {
+ apiModel := data_views.UpdateDataViewRequestObject{}
+
+ var dataView tfDataViewV0
+ if diags := m.DataView.As(ctx, &dataView, basetypes.ObjectAsOptions{}); diags.HasError() {
+ return data_views.UpdateDataViewRequestObject{}, diags
+ }
+
+ dv, diags := dataView.ToUpdateRequest(ctx)
+ if diags.HasError() {
+ return data_views.UpdateDataViewRequestObject{}, diags
+ }
+
+ apiModel.DataView = dv
+ return apiModel, nil
+}
+
+func (m tfModelV0) FromResponse(ctx context.Context, resp *data_views.DataViewResponseObject) (apiModelV0, diag.Diagnostics) {
+ dv := apiDataViewV0{}
+ if resp.HasDataView() {
+ dv = dataViewFromResponse(resp.GetDataView())
+ }
+
+ var dataView tfDataViewV0
+ if diags := m.DataView.As(ctx, &dataView, basetypes.ObjectAsOptions{}); diags.HasError() {
+ return apiModelV0{}, diags
+ }
+
+ namespaces, diags := dataView.getNamespaces(ctx)
+ if diags.HasError() {
+ return apiModelV0{}, diags
+ }
+
+ dv.Namespaces = namespaces
+
+ model := apiModelV0{
+ ID: m.ID.ValueString(),
+ SpaceID: m.SpaceID.ValueString(),
+ DataView: dv,
+ }
+ return model, nil
+}
+
+type tfDataViewV0 struct {
+ Title types.String `tfsdk:"title"`
+ Name types.String `tfsdk:"name"`
+ ID types.String `tfsdk:"id"`
+ TimeFieldName types.String `tfsdk:"time_field_name"`
+ SourceFilters types.List `tfsdk:"source_filters"` //> string
+ FieldAttributes types.Map `tfsdk:"field_attrs"` //> fieldAttrsV0
+ RuntimeFieldMap types.Map `tfsdk:"runtime_field_map"` //> runtimeFieldV0
+ FieldFormats types.Map `tfsdk:"field_formats"` //> fieldFormatV0
+ AllowNoIndex types.Bool `tfsdk:"allow_no_index"`
+ Namespaces types.List `tfsdk:"namespaces"`
+}
+
+type apiDataViewV0 struct {
+ Title *string `tfsdk:"title"`
+ Name *string `tfsdk:"name"`
+ ID string `tfsdk:"id"`
+ TimeFieldName *string `tfsdk:"time_field_name"`
+ SourceFilters []string `tfsdk:"source_filters"`
+ FieldAttributes map[string]apiFieldAttrsV0 `tfsdk:"field_attrs"`
+ RuntimeFieldMap map[string]apiRuntimeFieldV0 `tfsdk:"runtime_field_map"`
+ FieldFormats map[string]apiFieldFormat `tfsdk:"field_formats"`
+ AllowNoIndex bool `tfsdk:"allow_no_index"`
+ Namespaces []string `tfsdk:"namespaces"`
+}
+
+func dataViewFromResponse(resp data_views.DataViewResponseObjectDataView) apiDataViewV0 {
+ dv := apiDataViewV0{
+ Title: resp.Title,
+ Name: resp.Name,
+ ID: resp.GetId(),
+ TimeFieldName: resp.TimeFieldName,
+ AllowNoIndex: resp.GetAllowNoIndex(),
+ }
+
+ if sourceFilters := resp.GetSourceFilters(); len(sourceFilters) > 0 {
+ tfFilters := []string{}
+ for _, filter := range sourceFilters {
+ tfFilters = append(tfFilters, filter.GetValue())
+ }
+
+ dv.SourceFilters = tfFilters
+ }
+
+ fieldFormats := map[string]apiFieldFormat{}
+ for field, format := range resp.GetFieldFormats() {
+ formatMap := format.(map[string]interface{})
+ apiFormat := apiFieldFormat{
+ ID: formatMap["id"].(string),
+ }
+
+ if params, ok := formatMap["params"].(map[string]interface{}); ok {
+ apiFormat.Params = &apiFieldFormatParams{
+ Pattern: params["pattern"].(string),
+ }
+ }
+
+ fieldFormats[field] = apiFormat
+ }
+
+ if len(fieldFormats) > 0 {
+ dv.FieldFormats = fieldFormats
+ }
+
+ fieldAttrs := map[string]apiFieldAttrsV0{}
+ for field, attrs := range resp.GetFieldAttrs() {
+ attrsMap := attrs.(map[string]interface{})
+ apiAttrs := apiFieldAttrsV0{}
+ if label, ok := attrsMap["customLabel"].(string); ok {
+ apiAttrs.CustomLabel = &label
+ }
+
+ if count, ok := attrsMap["count"]; ok {
+ var count64 int64
+ switch c := count.(type) {
+ case float64:
+ count64 = int64(c)
+ case int64:
+ count64 = c
+ }
+ apiAttrs.Count = &count64
+ }
+
+ fieldAttrs[field] = apiAttrs
+ }
+
+ if len(fieldAttrs) > 0 {
+ dv.FieldAttributes = fieldAttrs
+ }
+
+ runtimeFields := map[string]apiRuntimeFieldV0{}
+ for field, runtimeDefn := range resp.GetRuntimeFieldMap() {
+ runtimeMap := runtimeDefn.(map[string]interface{})
+ apiField := apiRuntimeFieldV0{}
+ if t, ok := runtimeMap["type"].(string); ok {
+ apiField.Type = t
+ }
+ if script, ok := runtimeMap["script"].(map[string]interface{}); ok {
+ apiField.ScriptSource = script["source"].(string)
+ }
+
+ runtimeFields[field] = apiField
+ }
+
+ if len(runtimeFields) > 0 {
+ dv.RuntimeFieldMap = runtimeFields
+ }
+
+ return dv
+}
+
+func (m tfDataViewV0) ToCreateRequest(ctx context.Context) (data_views.CreateDataViewRequestObjectDataView, diag.Diagnostics) {
+ apiModel := data_views.CreateDataViewRequestObjectDataView{
+ Title: m.Title.ValueString(),
+ Name: m.Name.ValueStringPointer(),
+ Id: m.ID.ValueStringPointer(),
+ TimeFieldName: m.TimeFieldName.ValueStringPointer(),
+ AllowNoIndex: m.AllowNoIndex.ValueBoolPointer(),
+ }
+
+ // ES versions not supporting name (8.1-8.3) reject requests with this field supplied
+ if m.Name.IsUnknown() {
+ apiModel.Name = nil
+ }
+
+ var sourceFilters []string
+ if diags := m.SourceFilters.ElementsAs(ctx, &sourceFilters, true); diags.HasError() {
+ return data_views.CreateDataViewRequestObjectDataView{}, diags
+ }
+ if sourceFilters != nil {
+ apiFilters := []data_views.SourcefiltersInner{}
+ for _, filter := range sourceFilters {
+ apiFilters = append(apiFilters, data_views.SourcefiltersInner{
+ Value: filter,
+ })
+ }
+ apiModel.SourceFilters = apiFilters
+ }
+
+ fieldFormats, diags := tfFieldFormatsToAPI(ctx, m.FieldFormats)
+ if diags.HasError() {
+ return data_views.CreateDataViewRequestObjectDataView{}, diags
+ }
+
+ if fieldFormats != nil {
+ apiModel.FieldFormats = fieldFormats
+ }
+
+ var tfFieldAttrs map[string]tfFieldAttrsV0
+ if diags := m.FieldAttributes.ElementsAs(ctx, &tfFieldAttrs, true); diags.HasError() {
+ return data_views.CreateDataViewRequestObjectDataView{}, diags
+ }
+
+ apiFieldAttrs := map[string]interface{}{}
+ for field, attrs := range tfFieldAttrs {
+ apiAttrs := fieldAttr{}
+ if !attrs.CustomLabel.IsUnknown() {
+ apiAttrs.CustomLabel = attrs.CustomLabel.ValueStringPointer()
+ }
+
+ if !attrs.Count.IsUnknown() {
+ apiAttrs.Count = attrs.Count.ValueInt64Pointer()
+ }
+
+ apiFieldAttrs[field] = apiAttrs
+ }
+
+ if len(apiFieldAttrs) > 0 {
+ apiModel.FieldAttrs = apiFieldAttrs
+ }
+
+ var runtimeFields map[string]tfRuntimeFieldV0
+ if diags := m.RuntimeFieldMap.ElementsAs(ctx, &runtimeFields, true); diags.HasError() {
+ return data_views.CreateDataViewRequestObjectDataView{}, diags
+ }
+
+ apiRuntimeFields := map[string]interface{}{}
+ for field, defn := range runtimeFields {
+ apiRuntimeFields[field] = runtimeField{
+ Type: defn.Type.ValueString(),
+ Script: runtimeFieldSource{
+ Source: defn.ScriptSource.ValueString(),
+ },
+ }
+ }
+ if len(apiRuntimeFields) > 0 {
+ apiModel.RuntimeFieldMap = apiRuntimeFields
+ }
+
+ namespaces, diags := m.getNamespaces(ctx)
+ if diags.HasError() {
+ return data_views.CreateDataViewRequestObjectDataView{}, diags
+ }
+
+ if len(namespaces) > 0 {
+ apiModel.Namespaces = namespaces
+ }
+
+ return apiModel, nil
+}
+
+func (m tfDataViewV0) getNamespaces(ctx context.Context) ([]string, diag.Diagnostics) {
+ var namespaces []string
+ if diags := m.Namespaces.ElementsAs(ctx, &namespaces, true); diags.HasError() {
+ return nil, diags
+ }
+
+ return namespaces, nil
+}
+
+func (m tfDataViewV0) ToUpdateRequest(ctx context.Context) (data_views.UpdateDataViewRequestObjectDataView, diag.Diagnostics) {
+ apiModel := data_views.UpdateDataViewRequestObjectDataView{
+ Title: m.Title.ValueStringPointer(),
+ Name: m.Name.ValueStringPointer(),
+ TimeFieldName: m.TimeFieldName.ValueStringPointer(),
+ AllowNoIndex: m.AllowNoIndex.ValueBoolPointer(),
+ }
+
+ var sourceFilters []string
+ if diags := m.SourceFilters.ElementsAs(ctx, &sourceFilters, true); diags.HasError() {
+ return data_views.UpdateDataViewRequestObjectDataView{}, diags
+ }
+
+ if len(sourceFilters) > 0 {
+ apiFilters := []data_views.SourcefiltersInner{}
+ for _, filter := range sourceFilters {
+ apiFilters = append(apiFilters, data_views.SourcefiltersInner{
+ Value: filter,
+ })
+ }
+ apiModel.SourceFilters = apiFilters
+ }
+
+ fieldFormats, diags := tfFieldFormatsToAPI(ctx, m.FieldFormats)
+ if diags.HasError() {
+ return data_views.UpdateDataViewRequestObjectDataView{}, diags
+ }
+ if fieldFormats != nil {
+ apiModel.FieldFormats = fieldFormats
+ }
+
+ var tfFieldAttrs map[string]tfFieldAttrsV0
+ if diags := m.FieldAttributes.ElementsAs(ctx, &tfFieldAttrs, true); diags.HasError() {
+ return data_views.UpdateDataViewRequestObjectDataView{}, diags
+ }
+
+ var runtimeFields map[string]tfRuntimeFieldV0
+ if diags := m.RuntimeFieldMap.ElementsAs(ctx, &runtimeFields, true); diags.HasError() {
+ return data_views.UpdateDataViewRequestObjectDataView{}, diags
+ }
+
+ apiRuntimeFields := map[string]interface{}{}
+ for field, defn := range runtimeFields {
+ apiRuntimeFields[field] = runtimeField{
+ Type: defn.Type.ValueString(),
+ Script: runtimeFieldSource{
+ Source: defn.ScriptSource.ValueString(),
+ },
+ }
+ }
+ if len(apiRuntimeFields) > 0 {
+ apiModel.RuntimeFieldMap = apiRuntimeFields
+ }
+
+ return apiModel, nil
+}
+
+func tfFieldFormatsToAPI(ctx context.Context, fieldFormats types.Map) (map[string]interface{}, diag.Diagnostics) {
+ if fieldFormats.IsNull() || fieldFormats.IsUnknown() {
+ return nil, nil
+ }
+ var tfFieldFormats map[string]types.Object
+ if diags := fieldFormats.ElementsAs(ctx, &tfFieldFormats, true); diags.HasError() {
+ return nil, diags
+ }
+ if len(tfFieldFormats) == 0 {
+ return nil, nil
+ }
+
+ result := map[string]interface{}{}
+ for field, format := range tfFieldFormats {
+ var tfFormat tfFieldFormatV0
+ if diags := tfsdk.ValueAs(ctx, format, &tfFormat); diags.HasError() {
+ return nil, diags
+ }
+
+ var apiParams *apiFieldFormatParams
+ if !tfFormat.Params.IsNull() && !tfFormat.Params.IsUnknown() {
+ var tfParams tfFieldFormatParamsV0
+
+ if diags := tfsdk.ValueAs(ctx, tfFormat.Params, &tfParams); diags.HasError() {
+ return nil, diags
+ }
+
+ apiParams = &apiFieldFormatParams{
+ Pattern: tfParams.Pattern.ValueString(),
+ }
+ }
+
+ result[field] = apiFieldFormat{
+ ID: tfFormat.ID.ValueString(),
+ Params: apiParams,
+ }
+ }
+
+ return result, nil
+}
+
+type tfFieldAttrsV0 struct {
+ CustomLabel types.String `tfsdk:"custom_label"`
+ Count types.Int64 `tfsdk:"count"`
+}
+
+type apiFieldAttrsV0 struct {
+ CustomLabel *string `tfsdk:"custom_label"`
+ Count *int64 `tfsdk:"count"`
+}
+
+type tfRuntimeFieldV0 struct {
+ Type types.String `tfsdk:"type"`
+ ScriptSource types.String `tfsdk:"script_source"`
+}
+
+type apiRuntimeFieldV0 struct {
+ Type string `tfsdk:"type"`
+ ScriptSource string `tfsdk:"script_source"`
+}
+
+type fieldAttr struct {
+ CustomLabel *string `tfsdk:"customLabel"`
+ Count *int64 `tfsdk:"count"`
+}
+
+type runtimeField struct {
+ Type string `tfsdk:"type" json:"type"`
+ Script runtimeFieldSource `tfsdk:"script" json:"script"`
+}
+
+type runtimeFieldSource struct {
+ Source string `tfsdk:"source" json:"source"`
+}
+
+type tfFieldFormatV0 struct {
+ ID types.String `tfsdk:"id"`
+ Params types.Object `tfsdk:"params"`
+}
+
+type apiFieldFormat struct {
+ ID string `tfsdk:"id" json:"id"`
+ Params *apiFieldFormatParams `tfsdk:"params" json:"params"`
+}
+
+type tfFieldFormatParamsV0 struct {
+ Pattern types.String `tfsdk:"pattern"`
+}
+
+type apiFieldFormatParams struct {
+ Pattern string `tfsdk:"pattern" json:"pattern"`
+}
diff --git a/internal/kibana/data_view/schema_test.go b/internal/kibana/data_view/schema_test.go
new file mode 100644
index 000000000..b8417b220
--- /dev/null
+++ b/internal/kibana/data_view/schema_test.go
@@ -0,0 +1,329 @@
+package data_view
+
+import (
+ "context"
+ "testing"
+
+ "github.com/elastic/terraform-provider-elasticstack/generated/data_views"
+ "github.com/elastic/terraform-provider-elasticstack/internal/utils"
+ "github.com/hashicorp/terraform-plugin-framework/diag"
+ "github.com/hashicorp/terraform-plugin-framework/tfsdk"
+ "github.com/stretchr/testify/require"
+)
+
+func Test_tfModelV0_ToCreateRequest(t *testing.T) {
+ tests := []struct {
+ name string
+ model apiModelV0
+ expectedRequest data_views.CreateDataViewRequestObject
+ expectedDiags diag.Diagnostics
+ }{
+ {
+ name: "all fields",
+ model: apiModelV0{
+ DataView: apiDataViewV0{
+ Title: utils.Pointer("title"),
+ Name: utils.Pointer("name"),
+ ID: "id",
+ TimeFieldName: utils.Pointer("time_field_name"),
+ SourceFilters: []string{"field1", "field2"},
+ FieldAttributes: map[string]apiFieldAttrsV0{
+ "field1": {
+ CustomLabel: utils.Pointer("custom_label"),
+ Count: utils.Pointer[int64](10),
+ },
+ },
+ RuntimeFieldMap: map[string]apiRuntimeFieldV0{
+ "runtime_field": {
+ Type: "keyword",
+ ScriptSource: "emit(\"hello\")",
+ },
+ },
+ FieldFormats: map[string]apiFieldFormat{
+ "field1": {
+ ID: "field1",
+ Params: &apiFieldFormatParams{
+ Pattern: "0.00",
+ },
+ },
+ },
+ AllowNoIndex: true,
+ Namespaces: []string{"default", "o11y"},
+ },
+ },
+ expectedRequest: data_views.CreateDataViewRequestObject{
+ Override: utils.Pointer(false),
+ DataView: data_views.CreateDataViewRequestObjectDataView{
+ AllowNoIndex: utils.Pointer(true),
+ FieldAttrs: map[string]interface{}{
+ "field1": fieldAttr{
+ CustomLabel: utils.Pointer("custom_label"),
+ Count: utils.Pointer[int64](10),
+ },
+ },
+ FieldFormats: map[string]interface{}{
+ "field1": apiFieldFormat{
+ ID: "field1",
+ Params: &apiFieldFormatParams{
+ Pattern: "0.00",
+ },
+ },
+ },
+ Id: utils.Pointer("id"),
+ Name: utils.Pointer("name"),
+ Namespaces: []string{"default", "o11y"},
+ RuntimeFieldMap: map[string]interface{}{
+ "runtime_field": runtimeField{
+ Type: "keyword",
+ Script: runtimeFieldSource{
+ Source: "emit(\"hello\")",
+ },
+ },
+ },
+ SourceFilters: []data_views.SourcefiltersInner{
+ {Value: "field1"},
+ {Value: "field2"},
+ },
+ TimeFieldName: utils.Pointer("time_field_name"),
+ Title: "title",
+ },
+ },
+ },
+ {
+ name: "nil collections",
+ model: apiModelV0{
+ DataView: apiDataViewV0{
+ Title: utils.Pointer("title"),
+ Name: utils.Pointer("name"),
+ ID: "id",
+ TimeFieldName: utils.Pointer("time_field_name"),
+ AllowNoIndex: true,
+ },
+ },
+ expectedRequest: data_views.CreateDataViewRequestObject{
+ Override: utils.Pointer(false),
+ DataView: data_views.CreateDataViewRequestObjectDataView{
+ AllowNoIndex: utils.Pointer(true),
+ Id: utils.Pointer("id"),
+ Name: utils.Pointer("name"),
+ TimeFieldName: utils.Pointer("time_field_name"),
+ Title: "title",
+ },
+ },
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ var tfModel tfModelV0
+ diags := tfsdk.ValueFrom(context.Background(), tt.model, getSchema().Type(), &tfModel)
+ require.Nil(t, diags)
+
+ req, diags := tfModel.ToCreateRequest(context.Background())
+
+ require.Equal(t, tt.expectedRequest, req)
+ require.Equal(t, tt.expectedDiags, diags)
+ })
+ }
+}
+
+func Test_tfModelV0_ToUpdateRequest(t *testing.T) {
+ tests := []struct {
+ name string
+ model apiModelV0
+ expectedRequest data_views.UpdateDataViewRequestObject
+ expectedDiags diag.Diagnostics
+ }{
+ {
+ name: "all fields",
+ model: apiModelV0{
+ DataView: apiDataViewV0{
+ Title: utils.Pointer("title"),
+ Name: utils.Pointer("name"),
+ ID: "id",
+ TimeFieldName: utils.Pointer("time_field_name"),
+ SourceFilters: []string{"field1", "field2"},
+ FieldAttributes: map[string]apiFieldAttrsV0{
+ "field1": {
+ CustomLabel: utils.Pointer("custom_label"),
+ Count: utils.Pointer[int64](10),
+ },
+ },
+ RuntimeFieldMap: map[string]apiRuntimeFieldV0{
+ "runtime_field": {
+ Type: "keyword",
+ ScriptSource: "emit(\"hello\")",
+ },
+ },
+ FieldFormats: map[string]apiFieldFormat{
+ "field1": {
+ ID: "field1",
+ Params: &apiFieldFormatParams{
+ Pattern: "0.00",
+ },
+ },
+ },
+ AllowNoIndex: true,
+ Namespaces: []string{"default", "o11y"},
+ },
+ },
+ expectedRequest: data_views.UpdateDataViewRequestObject{
+ DataView: data_views.UpdateDataViewRequestObjectDataView{
+ AllowNoIndex: utils.Pointer(true),
+ FieldFormats: map[string]interface{}{
+ "field1": apiFieldFormat{
+ ID: "field1",
+ Params: &apiFieldFormatParams{
+ Pattern: "0.00",
+ },
+ },
+ },
+ Name: utils.Pointer("name"),
+ RuntimeFieldMap: map[string]interface{}{
+ "runtime_field": runtimeField{
+ Type: "keyword",
+ Script: runtimeFieldSource{
+ Source: "emit(\"hello\")",
+ },
+ },
+ },
+ SourceFilters: []data_views.SourcefiltersInner{
+ {Value: "field1"},
+ {Value: "field2"},
+ },
+ TimeFieldName: utils.Pointer("time_field_name"),
+ Title: utils.Pointer("title"),
+ },
+ },
+ },
+ {
+ name: "nil collections",
+ model: apiModelV0{
+ DataView: apiDataViewV0{
+ Title: utils.Pointer("title"),
+ Name: utils.Pointer("name"),
+ ID: "id",
+ TimeFieldName: utils.Pointer("time_field_name"),
+ AllowNoIndex: true,
+ },
+ },
+ expectedRequest: data_views.UpdateDataViewRequestObject{
+ DataView: data_views.UpdateDataViewRequestObjectDataView{
+ AllowNoIndex: utils.Pointer(true),
+ Name: utils.Pointer("name"),
+ TimeFieldName: utils.Pointer("time_field_name"),
+ Title: utils.Pointer("title"),
+ },
+ },
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ var tfModel tfModelV0
+ diags := tfsdk.ValueFrom(context.Background(), tt.model, getSchema().Type(), &tfModel)
+ require.Nil(t, diags)
+
+ req, diags := tfModel.ToUpdateRequest(context.Background())
+
+ require.Equal(t, tt.expectedRequest, req)
+ require.Equal(t, tt.expectedDiags, diags)
+ })
+ }
+}
+
+func Test_tfModelV0_FromResponse(t *testing.T) {
+ tests := []struct {
+ name string
+ response data_views.DataViewResponseObject
+ existingModel apiModelV0
+ expectedModel apiModelV0
+ expectedDiags diag.Diagnostics
+ }{
+ {
+ name: "all fields",
+ existingModel: apiModelV0{
+ ID: "existing-id",
+ SpaceID: "existing-space-id",
+ DataView: apiDataViewV0{
+ Namespaces: []string{"existing-namespace"},
+ },
+ },
+ response: data_views.DataViewResponseObject{
+ DataView: &data_views.DataViewResponseObjectDataView{
+ Title: utils.Pointer("title"),
+ Name: utils.Pointer("name"),
+ Id: utils.Pointer("id"),
+ TimeFieldName: utils.Pointer("time_field_name"),
+ AllowNoIndex: utils.Pointer(true),
+ SourceFilters: []data_views.SourcefiltersInner{
+ {Value: "field1"},
+ {Value: "field2"},
+ },
+ FieldAttrs: map[string]interface{}{
+ "field1": map[string]interface{}{
+ "customLabel": "custom_label",
+ "count": 10.0,
+ },
+ },
+ FieldFormats: map[string]interface{}{
+ "field1": map[string]interface{}{
+ "id": "field1",
+ },
+ },
+ RuntimeFieldMap: map[string]interface{}{
+ "runtime_field": map[string]interface{}{
+ "type": "keyword",
+ "script": map[string]interface{}{
+ "source": "emit('hello')",
+ },
+ },
+ },
+ },
+ },
+ expectedModel: apiModelV0{
+ ID: "existing-id",
+ SpaceID: "existing-space-id",
+ DataView: apiDataViewV0{
+ Title: utils.Pointer("title"),
+ Name: utils.Pointer("name"),
+ ID: "id",
+ TimeFieldName: utils.Pointer("time_field_name"),
+ SourceFilters: []string{"field1", "field2"},
+ FieldAttributes: map[string]apiFieldAttrsV0{
+ "field1": {
+ CustomLabel: utils.Pointer("custom_label"),
+ Count: utils.Pointer[int64](10),
+ },
+ },
+ RuntimeFieldMap: map[string]apiRuntimeFieldV0{
+ "runtime_field": {
+ Type: "keyword",
+ ScriptSource: "emit('hello')",
+ },
+ },
+ FieldFormats: map[string]apiFieldFormat{
+ "field1": {
+ ID: "field1",
+ },
+ },
+ AllowNoIndex: true,
+ Namespaces: []string{"existing-namespace"},
+ },
+ },
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ var tfModel tfModelV0
+ diags := tfsdk.ValueFrom(context.Background(), tt.existingModel, getSchema().Type(), &tfModel)
+ require.Nil(t, diags)
+
+ finalModel, diags := tfModel.FromResponse(context.Background(), &tt.response)
+
+ require.Equal(t, tt.expectedModel, finalModel)
+ require.Equal(t, tt.expectedDiags, diags)
+ })
+ }
+}
diff --git a/internal/kibana/data_view/update.go b/internal/kibana/data_view/update.go
new file mode 100644
index 000000000..4b69f2c05
--- /dev/null
+++ b/internal/kibana/data_view/update.go
@@ -0,0 +1,53 @@
+package data_view
+
+import (
+ "context"
+
+ "github.com/elastic/terraform-provider-elasticstack/internal/utils"
+ "github.com/hashicorp/terraform-plugin-framework/resource"
+)
+
+func (r *Resource) Update(ctx context.Context, request resource.UpdateRequest, response *resource.UpdateResponse) {
+ if !r.resourceReady(&response.Diagnostics) {
+ return
+ }
+
+ dataviewClient, err := r.client.GetDataViewsClient()
+ if err != nil {
+ response.Diagnostics.AddError("unable to get data view client", err.Error())
+ return
+ }
+
+ var model tfModelV0
+ response.Diagnostics.Append(request.Plan.Get(ctx, &model)...)
+ if response.Diagnostics.HasError() {
+ return
+ }
+
+ apiModel, diags := model.ToUpdateRequest(ctx)
+ response.Diagnostics.Append(diags...)
+ if response.Diagnostics.HasError() {
+ return
+ }
+
+ authCtx := r.client.SetDataviewAuthContext(ctx)
+ _, res, err := dataviewClient.UpdateDataView(authCtx, model.ID.ValueString()).UpdateDataViewRequestObject(apiModel).KbnXsrf("true").Execute()
+ if err != nil && res == nil {
+ response.Diagnostics.AddError("Failed to update data view", err.Error())
+ return
+ }
+
+ defer res.Body.Close()
+ response.Diagnostics.Append(utils.CheckHttpErrorFromFW(res, "Unable to update data view")...)
+ if response.Diagnostics.HasError() {
+ return
+ }
+
+ readModel, diags := r.read(ctx, model)
+ response.Diagnostics = append(response.Diagnostics, diags...)
+ if response.Diagnostics.HasError() {
+ return
+ }
+
+ response.Diagnostics.Append(response.State.Set(ctx, readModel)...)
+}
diff --git a/internal/utils/utils.go b/internal/utils/utils.go
index 50c1ff1a9..81a3d977c 100644
--- a/internal/utils/utils.go
+++ b/internal/utils/utils.go
@@ -13,21 +13,22 @@ import (
"github.com/elastic/go-elasticsearch/v7/esapi"
providerSchema "github.com/elastic/terraform-provider-elasticstack/internal/schema"
+ fwdiag "github.com/hashicorp/terraform-plugin-framework/diag"
"github.com/hashicorp/terraform-plugin-log/tflog"
- "github.com/hashicorp/terraform-plugin-sdk/v2/diag"
+ sdkdiag "github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
-func CheckError(res *esapi.Response, errMsg string) diag.Diagnostics {
- var diags diag.Diagnostics
+func CheckError(res *esapi.Response, errMsg string) sdkdiag.Diagnostics {
+ var diags sdkdiag.Diagnostics
if res.IsError() {
body, err := io.ReadAll(res.Body)
if err != nil {
- return diag.FromErr(err)
+ return sdkdiag.FromErr(err)
}
- diags = append(diags, diag.Diagnostic{
- Severity: diag.Error,
+ diags = append(diags, sdkdiag.Diagnostic{
+ Severity: sdkdiag.Error,
Summary: errMsg,
Detail: fmt.Sprintf("Failed with: %s", body),
})
@@ -36,16 +37,16 @@ func CheckError(res *esapi.Response, errMsg string) diag.Diagnostics {
return diags
}
-func CheckHttpError(res *http.Response, errMsg string) diag.Diagnostics {
- var diags diag.Diagnostics
+func CheckHttpError(res *http.Response, errMsg string) sdkdiag.Diagnostics {
+ var diags sdkdiag.Diagnostics
if res.StatusCode >= 400 {
body, err := io.ReadAll(res.Body)
if err != nil {
- return diag.FromErr(err)
+ return sdkdiag.FromErr(err)
}
- diags = append(diags, diag.Diagnostic{
- Severity: diag.Error,
+ diags = append(diags, sdkdiag.Diagnostic{
+ Severity: sdkdiag.Error,
Summary: errMsg,
Detail: fmt.Sprintf("Failed with: %s", body),
})
@@ -54,6 +55,21 @@ func CheckHttpError(res *http.Response, errMsg string) diag.Diagnostics {
return diags
}
+func CheckHttpErrorFromFW(res *http.Response, errMsg string) fwdiag.Diagnostics {
+ var diags fwdiag.Diagnostics
+
+ if res.StatusCode >= 400 {
+ body, err := io.ReadAll(res.Body)
+ if err != nil {
+ diags.AddError(errMsg, err.Error())
+ return diags
+ }
+ diags.AddError(errMsg, fmt.Sprintf("Failed with: %s", body))
+ return diags
+ }
+ return diags
+}
+
// Compares the JSON in two byte slices
func JSONBytesEqual(a, b []byte) (bool, error) {
var j, j2 interface{}
diff --git a/provider/plugin_framework.go b/provider/plugin_framework.go
index 5175a5256..a5a190c6a 100644
--- a/provider/plugin_framework.go
+++ b/provider/plugin_framework.go
@@ -5,6 +5,7 @@ import (
"github.com/elastic/terraform-provider-elasticstack/internal/clients"
"github.com/elastic/terraform-provider-elasticstack/internal/clients/config"
+ "github.com/elastic/terraform-provider-elasticstack/internal/kibana/data_view"
"github.com/elastic/terraform-provider-elasticstack/internal/kibana/import_saved_objects"
"github.com/elastic/terraform-provider-elasticstack/internal/schema"
"github.com/hashicorp/terraform-plugin-framework/datasource"
@@ -64,5 +65,6 @@ func (p *Provider) DataSources(ctx context.Context) []func() datasource.DataSour
func (p *Provider) Resources(ctx context.Context) []func() resource.Resource {
return []func() resource.Resource{
func() resource.Resource { return &import_saved_objects.Resource{} },
+ func() resource.Resource { return &data_view.Resource{} },
}
}