From 9927d9a904b52ffeeeb33e10b73bdfab95c44c99 Mon Sep 17 00:00:00 2001 From: "elastic-renovate-prod[bot]" <174716857+elastic-renovate-prod[bot]@users.noreply.github.com> Date: Tue, 25 Nov 2025 19:16:44 +0000 Subject: [PATCH 1/4] chore(deps): update kibana-openapi-spec digest to c99d51c --- generated/kbapi/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generated/kbapi/Makefile b/generated/kbapi/Makefile index 3a431f910..7082f3194 100644 --- a/generated/kbapi/Makefile +++ b/generated/kbapi/Makefile @@ -2,7 +2,7 @@ SHELL := /bin/bash ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) -github_ref ?= f1d0789f0c7b9a46dc35e6dfc72dba2216edb3ae +github_ref ?= c99d51cf47585e53277092f7678cf33c8e279ef7 oas_url := https://raw.githubusercontent.com/elastic/kibana/$(github_ref)/oas_docs/output/kibana.yaml .PHONY: all From c34e8b6c0dffe1f9e03b31a37a6bcba5d34b2bde Mon Sep 17 00:00:00 2001 From: Toby Brain Date: Wed, 26 Nov 2025 09:41:28 +1100 Subject: [PATCH 2/4] Remove broken discriminator --- generated/kbapi/kibana.gen.go | 1086 +++++++++++++++++++++------ generated/kbapi/transform_schema.go | 1 + 2 files changed, 840 insertions(+), 247 deletions(-) diff --git a/generated/kbapi/kibana.gen.go b/generated/kbapi/kibana.gen.go index 599f2bdc3..f6cbf6079 100644 --- a/generated/kbapi/kibana.gen.go +++ b/generated/kbapi/kibana.gen.go @@ -3880,6 +3880,36 @@ const ( System PostStreamsNameSignificantEventsGenerateJSONBodyFeatureType = "system" ) +// Defines values for GetStreamsStreamnameAttachmentsParamsAttachmentType. +const ( + GetStreamsStreamnameAttachmentsParamsAttachmentTypeDashboard GetStreamsStreamnameAttachmentsParamsAttachmentType = "dashboard" + GetStreamsStreamnameAttachmentsParamsAttachmentTypeRule GetStreamsStreamnameAttachmentsParamsAttachmentType = "rule" +) + +// Defines values for PostStreamsStreamnameAttachmentsBulkJSONBodyOperations0IndexType. +const ( + PostStreamsStreamnameAttachmentsBulkJSONBodyOperations0IndexTypeDashboard PostStreamsStreamnameAttachmentsBulkJSONBodyOperations0IndexType = "dashboard" + PostStreamsStreamnameAttachmentsBulkJSONBodyOperations0IndexTypeRule PostStreamsStreamnameAttachmentsBulkJSONBodyOperations0IndexType = "rule" +) + +// Defines values for PostStreamsStreamnameAttachmentsBulkJSONBodyOperations1DeleteType. +const ( + PostStreamsStreamnameAttachmentsBulkJSONBodyOperations1DeleteTypeDashboard PostStreamsStreamnameAttachmentsBulkJSONBodyOperations1DeleteType = "dashboard" + PostStreamsStreamnameAttachmentsBulkJSONBodyOperations1DeleteTypeRule PostStreamsStreamnameAttachmentsBulkJSONBodyOperations1DeleteType = "rule" +) + +// Defines values for DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentType. +const ( + DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentTypeDashboard DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentType = "dashboard" + DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentTypeRule DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentType = "rule" +) + +// Defines values for PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentType. +const ( + Dashboard PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentType = "dashboard" + Rule PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentType = "rule" +) + // Defines values for GetSyntheticMonitorsParamsMonitorTypes0. const ( GetSyntheticMonitorsParamsMonitorTypes0Browser GetSyntheticMonitorsParamsMonitorTypes0 = "browser" @@ -9614,7 +9644,7 @@ type SecurityDetectionsAPIEqlRule struct { From SecurityDetectionsAPIRuleIntervalFrom `json:"from"` // Id A universally unique identifier - Id SecurityDetectionsAPIRuleObjectId `json:"id"` + Id SecurityDetectionsAPIUUID `json:"id"` // Immutable This field determines whether the rule is a prebuilt Elastic rule. It will be replaced with the `rule_source` field. // Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set @@ -10031,7 +10061,7 @@ type SecurityDetectionsAPIEqlRulePatchProps struct { From *SecurityDetectionsAPIRuleIntervalFrom `json:"from,omitempty"` // Id A universally unique identifier - Id *SecurityDetectionsAPIRuleObjectId `json:"id,omitempty"` + Id *SecurityDetectionsAPIUUID `json:"id,omitempty"` // Index Indices on which the rule functions. Defaults to the Security Solution indices defined on the Kibana Advanced Settings page (Kibana → Stack Management → Advanced Settings → `securitySolution:defaultIndex`). // > info @@ -10235,7 +10265,7 @@ type SecurityDetectionsAPIEqlRuleUpdateProps struct { From *SecurityDetectionsAPIRuleIntervalFrom `json:"from,omitempty"` // Id A universally unique identifier - Id *SecurityDetectionsAPIRuleObjectId `json:"id,omitempty"` + Id *SecurityDetectionsAPIUUID `json:"id,omitempty"` // Index Indices on which the rule functions. Defaults to the Security Solution indices defined on the Kibana Advanced Settings page (Kibana → Stack Management → Advanced Settings → `securitySolution:defaultIndex`). // > info @@ -10419,7 +10449,7 @@ type SecurityDetectionsAPIEsqlRule struct { From SecurityDetectionsAPIRuleIntervalFrom `json:"from"` // Id A universally unique identifier - Id SecurityDetectionsAPIRuleObjectId `json:"id"` + Id SecurityDetectionsAPIUUID `json:"id"` // Immutable This field determines whether the rule is a prebuilt Elastic rule. It will be replaced with the `rule_source` field. // Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set @@ -10751,7 +10781,7 @@ type SecurityDetectionsAPIEsqlRulePatchProps struct { From *SecurityDetectionsAPIRuleIntervalFrom `json:"from,omitempty"` // Id A universally unique identifier - Id *SecurityDetectionsAPIRuleObjectId `json:"id,omitempty"` + Id *SecurityDetectionsAPIUUID `json:"id,omitempty"` // Interval Frequency of rule execution, using a date math range. For example, "1h" means the rule runs every hour. Defaults to 5m (5 minutes). Interval *SecurityDetectionsAPIRuleInterval `json:"interval,omitempty"` @@ -10936,7 +10966,7 @@ type SecurityDetectionsAPIEsqlRuleUpdateProps struct { From *SecurityDetectionsAPIRuleIntervalFrom `json:"from,omitempty"` // Id A universally unique identifier - Id *SecurityDetectionsAPIRuleObjectId `json:"id,omitempty"` + Id *SecurityDetectionsAPIUUID `json:"id,omitempty"` // Interval Frequency of rule execution, using a date math range. For example, "1h" means the rule runs every hour. Defaults to 5m (5 minutes). Interval *SecurityDetectionsAPIRuleInterval `json:"interval,omitempty"` @@ -11190,7 +11220,7 @@ type SecurityDetectionsAPIMachineLearningRule struct { From SecurityDetectionsAPIRuleIntervalFrom `json:"from"` // Id A universally unique identifier - Id SecurityDetectionsAPIRuleObjectId `json:"id"` + Id SecurityDetectionsAPIUUID `json:"id"` // Immutable This field determines whether the rule is a prebuilt Elastic rule. It will be replaced with the `rule_source` field. // Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set @@ -11537,7 +11567,7 @@ type SecurityDetectionsAPIMachineLearningRulePatchProps struct { From *SecurityDetectionsAPIRuleIntervalFrom `json:"from,omitempty"` // Id A universally unique identifier - Id *SecurityDetectionsAPIRuleObjectId `json:"id,omitempty"` + Id *SecurityDetectionsAPIUUID `json:"id,omitempty"` // Interval Frequency of rule execution, using a date math range. For example, "1h" means the rule runs every hour. Defaults to 5m (5 minutes). Interval *SecurityDetectionsAPIRuleInterval `json:"interval,omitempty"` @@ -11718,7 +11748,7 @@ type SecurityDetectionsAPIMachineLearningRuleUpdateProps struct { From *SecurityDetectionsAPIRuleIntervalFrom `json:"from,omitempty"` // Id A universally unique identifier - Id *SecurityDetectionsAPIRuleObjectId `json:"id,omitempty"` + Id *SecurityDetectionsAPIUUID `json:"id,omitempty"` // Interval Frequency of rule execution, using a date math range. For example, "1h" means the rule runs every hour. Defaults to 5m (5 minutes). Interval *SecurityDetectionsAPIRuleInterval `json:"interval,omitempty"` @@ -11934,7 +11964,7 @@ type SecurityDetectionsAPINewTermsRule struct { HistoryWindowStart SecurityDetectionsAPIHistoryWindowStart `json:"history_window_start"` // Id A universally unique identifier - Id SecurityDetectionsAPIRuleObjectId `json:"id"` + Id SecurityDetectionsAPIUUID `json:"id"` // Immutable This field determines whether the rule is a prebuilt Elastic rule. It will be replaced with the `rule_source` field. // Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set @@ -12369,7 +12399,7 @@ type SecurityDetectionsAPINewTermsRulePatchProps struct { HistoryWindowStart *SecurityDetectionsAPIHistoryWindowStart `json:"history_window_start,omitempty"` // Id A universally unique identifier - Id *SecurityDetectionsAPIRuleObjectId `json:"id,omitempty"` + Id *SecurityDetectionsAPIUUID `json:"id,omitempty"` // Index Indices on which the rule functions. Defaults to the Security Solution indices defined on the Kibana Advanced Settings page (Kibana → Stack Management → Advanced Settings → `securitySolution:defaultIndex`). // > info @@ -12592,7 +12622,7 @@ type SecurityDetectionsAPINewTermsRuleUpdateProps struct { HistoryWindowStart SecurityDetectionsAPIHistoryWindowStart `json:"history_window_start"` // Id A universally unique identifier - Id *SecurityDetectionsAPIRuleObjectId `json:"id,omitempty"` + Id *SecurityDetectionsAPIUUID `json:"id,omitempty"` // Index Indices on which the rule functions. Defaults to the Security Solution indices defined on the Kibana Advanced Settings page (Kibana → Stack Management → Advanced Settings → `securitySolution:defaultIndex`). // > info @@ -12899,7 +12929,7 @@ type SecurityDetectionsAPIQueryRule struct { From SecurityDetectionsAPIRuleIntervalFrom `json:"from"` // Id A universally unique identifier - Id SecurityDetectionsAPIRuleObjectId `json:"id"` + Id SecurityDetectionsAPIUUID `json:"id"` // Immutable This field determines whether the rule is a prebuilt Elastic rule. It will be replaced with the `rule_source` field. // Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set @@ -13331,7 +13361,7 @@ type SecurityDetectionsAPIQueryRulePatchProps struct { From *SecurityDetectionsAPIRuleIntervalFrom `json:"from,omitempty"` // Id A universally unique identifier - Id *SecurityDetectionsAPIRuleObjectId `json:"id,omitempty"` + Id *SecurityDetectionsAPIUUID `json:"id,omitempty"` // Index Indices on which the rule functions. Defaults to the Security Solution indices defined on the Kibana Advanced Settings page (Kibana → Stack Management → Advanced Settings → `securitySolution:defaultIndex`). // > info @@ -13536,7 +13566,7 @@ type SecurityDetectionsAPIQueryRuleUpdateProps struct { From *SecurityDetectionsAPIRuleIntervalFrom `json:"from,omitempty"` // Id A universally unique identifier - Id *SecurityDetectionsAPIRuleObjectId `json:"id,omitempty"` + Id *SecurityDetectionsAPIUUID `json:"id,omitempty"` // Index Indices on which the rule functions. Defaults to the Security Solution indices defined on the Kibana Advanced Settings page (Kibana → Stack Management → Advanced Settings → `securitySolution:defaultIndex`). // > info @@ -13757,7 +13787,7 @@ type SecurityDetectionsAPIResponseFields struct { ExecutionSummary *SecurityDetectionsAPIRuleExecutionSummary `json:"execution_summary,omitempty"` // Id A universally unique identifier - Id SecurityDetectionsAPIRuleObjectId `json:"id"` + Id SecurityDetectionsAPIUUID `json:"id"` // Immutable This field determines whether the rule is a prebuilt Elastic rule. It will be replaced with the `rule_source` field. // Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set @@ -14083,9 +14113,6 @@ type SecurityDetectionsAPIRuleName = string // SecurityDetectionsAPIRuleNameOverride Sets which field in the source event is used to populate the alert's `signal.rule.name` value (in the UI, this value is displayed on the Rules page in the Rule column). When unspecified, the rule’s `name` value is used. The source field must be a string data type. type SecurityDetectionsAPIRuleNameOverride = string -// SecurityDetectionsAPIRuleObjectId A universally unique identifier -type SecurityDetectionsAPIRuleObjectId = SecurityDetectionsAPIUUID - // SecurityDetectionsAPIRulePatchProps defines model for Security_Detections_API_RulePatchProps. type SecurityDetectionsAPIRulePatchProps struct { union json.RawMessage @@ -14224,7 +14251,7 @@ type SecurityDetectionsAPISavedQueryRule struct { From SecurityDetectionsAPIRuleIntervalFrom `json:"from"` // Id A universally unique identifier - Id SecurityDetectionsAPIRuleObjectId `json:"id"` + Id SecurityDetectionsAPIUUID `json:"id"` // Immutable This field determines whether the rule is a prebuilt Elastic rule. It will be replaced with the `rule_source` field. // Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set @@ -14653,7 +14680,7 @@ type SecurityDetectionsAPISavedQueryRulePatchProps struct { From *SecurityDetectionsAPIRuleIntervalFrom `json:"from,omitempty"` // Id A universally unique identifier - Id *SecurityDetectionsAPIRuleObjectId `json:"id,omitempty"` + Id *SecurityDetectionsAPIUUID `json:"id,omitempty"` // Index Indices on which the rule functions. Defaults to the Security Solution indices defined on the Kibana Advanced Settings page (Kibana → Stack Management → Advanced Settings → `securitySolution:defaultIndex`). // > info @@ -14861,7 +14888,7 @@ type SecurityDetectionsAPISavedQueryRuleUpdateProps struct { From *SecurityDetectionsAPIRuleIntervalFrom `json:"from,omitempty"` // Id A universally unique identifier - Id *SecurityDetectionsAPIRuleObjectId `json:"id,omitempty"` + Id *SecurityDetectionsAPIUUID `json:"id,omitempty"` // Index Indices on which the rule functions. Defaults to the Security Solution indices defined on the Kibana Advanced Settings page (Kibana → Stack Management → Advanced Settings → `securitySolution:defaultIndex`). // > info @@ -15164,7 +15191,7 @@ type SecurityDetectionsAPIThreatMatchRule struct { From SecurityDetectionsAPIRuleIntervalFrom `json:"from"` // Id A universally unique identifier - Id SecurityDetectionsAPIRuleObjectId `json:"id"` + Id SecurityDetectionsAPIUUID `json:"id"` // Immutable This field determines whether the rule is a prebuilt Elastic rule. It will be replaced with the `rule_source` field. // Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set @@ -15685,7 +15712,7 @@ type SecurityDetectionsAPIThreatMatchRulePatchProps struct { From *SecurityDetectionsAPIRuleIntervalFrom `json:"from,omitempty"` // Id A universally unique identifier - Id *SecurityDetectionsAPIRuleObjectId `json:"id,omitempty"` + Id *SecurityDetectionsAPIUUID `json:"id,omitempty"` // Index Indices on which the rule functions. Defaults to the Security Solution indices defined on the Kibana Advanced Settings page (Kibana → Stack Management → Advanced Settings → `securitySolution:defaultIndex`). // > info @@ -15955,7 +15982,7 @@ type SecurityDetectionsAPIThreatMatchRuleUpdateProps struct { From *SecurityDetectionsAPIRuleIntervalFrom `json:"from,omitempty"` // Id A universally unique identifier - Id *SecurityDetectionsAPIRuleObjectId `json:"id,omitempty"` + Id *SecurityDetectionsAPIUUID `json:"id,omitempty"` // Index Indices on which the rule functions. Defaults to the Security Solution indices defined on the Kibana Advanced Settings page (Kibana → Stack Management → Advanced Settings → `securitySolution:defaultIndex`). // > info @@ -16225,7 +16252,7 @@ type SecurityDetectionsAPIThresholdRule struct { From SecurityDetectionsAPIRuleIntervalFrom `json:"from"` // Id A universally unique identifier - Id SecurityDetectionsAPIRuleObjectId `json:"id"` + Id SecurityDetectionsAPIUUID `json:"id"` // Immutable This field determines whether the rule is a prebuilt Elastic rule. It will be replaced with the `rule_source` field. // Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set @@ -16655,7 +16682,7 @@ type SecurityDetectionsAPIThresholdRulePatchProps struct { From *SecurityDetectionsAPIRuleIntervalFrom `json:"from,omitempty"` // Id A universally unique identifier - Id *SecurityDetectionsAPIRuleObjectId `json:"id,omitempty"` + Id *SecurityDetectionsAPIUUID `json:"id,omitempty"` // Index Indices on which the rule functions. Defaults to the Security Solution indices defined on the Kibana Advanced Settings page (Kibana → Stack Management → Advanced Settings → `securitySolution:defaultIndex`). // > info @@ -16869,7 +16896,7 @@ type SecurityDetectionsAPIThresholdRuleUpdateProps struct { From *SecurityDetectionsAPIRuleIntervalFrom `json:"from,omitempty"` // Id A universally unique identifier - Id *SecurityDetectionsAPIRuleObjectId `json:"id,omitempty"` + Id *SecurityDetectionsAPIUUID `json:"id,omitempty"` // Index Indices on which the rule functions. Defaults to the Security Solution indices defined on the Kibana Advanced Settings page (Kibana → Stack Management → Advanced Settings → `securitySolution:defaultIndex`). // > info @@ -17041,9 +17068,6 @@ type SecurityEndpointExceptionsAPIEndpointList struct { // SecurityEndpointExceptionsAPIEndpointList1 defines model for . type SecurityEndpointExceptionsAPIEndpointList1 = map[string]interface{} -// SecurityEndpointExceptionsAPIEndpointListItem defines model for Security_Endpoint_Exceptions_API_EndpointListItem. -type SecurityEndpointExceptionsAPIEndpointListItem = SecurityEndpointExceptionsAPIExceptionListItem - // SecurityEndpointExceptionsAPIExceptionList defines model for Security_Endpoint_Exceptions_API_ExceptionList. type SecurityEndpointExceptionsAPIExceptionList struct { // UnderscoreVersion The version id, normally returned by the API when the item was retrieved. Use it ensure updates are done against the latest version. @@ -17347,9 +17371,6 @@ type SecurityEndpointExceptionsAPIExceptionListVersion = int // - `agnostic`: Available in all Kibana spaces. type SecurityEndpointExceptionsAPIExceptionNamespaceType string -// SecurityEndpointExceptionsAPIFindEndpointListItemsFilter A string that does not contain only whitespace characters -type SecurityEndpointExceptionsAPIFindEndpointListItemsFilter = SecurityEndpointExceptionsAPINonEmptyString - // SecurityEndpointExceptionsAPIListId Value list's identifier. type SecurityEndpointExceptionsAPIListId = string @@ -17783,9 +17804,6 @@ type SecurityEndpointManagementAPIHostPathScriptParameters struct { // SecurityEndpointManagementAPIHostStatuses A set of agent health statuses to filter by. type SecurityEndpointManagementAPIHostStatuses = []string -// SecurityEndpointManagementAPIIsolate defines model for Security_Endpoint_Management_API_Isolate. -type SecurityEndpointManagementAPIIsolate = SecurityEndpointManagementAPIResponseActionDetails - // SecurityEndpointManagementAPIIsolateRouteResponse defines model for Security_Endpoint_Management_API_IsolateRouteResponse. type SecurityEndpointManagementAPIIsolateRouteResponse = map[string]interface{} @@ -18543,9 +18561,6 @@ type SecurityEndpointManagementAPIType string // SecurityEndpointManagementAPITypes List of types of response actions type SecurityEndpointManagementAPITypes = []SecurityEndpointManagementAPIType -// SecurityEndpointManagementAPIUnisolate defines model for Security_Endpoint_Management_API_Unisolate. -type SecurityEndpointManagementAPIUnisolate = SecurityEndpointManagementAPIResponseActionDetails - // SecurityEndpointManagementAPIUnisolateRouteResponse defines model for Security_Endpoint_Management_API_UnisolateRouteResponse. type SecurityEndpointManagementAPIUnisolateRouteResponse = map[string]interface{} @@ -18832,7 +18847,7 @@ type SecurityEntityAnalyticsAPIEngineComponentStatus struct { Health *SecurityEntityAnalyticsAPIEngineComponentStatusHealth `json:"health,omitempty"` Id string `json:"id"` Installed bool `json:"installed"` - Metadata *SecurityEntityAnalyticsAPIMetadata `json:"metadata,omitempty"` + Metadata *SecurityEntityAnalyticsAPITransformStatsMetadata `json:"metadata,omitempty"` Resource SecurityEntityAnalyticsAPIEngineComponentResource `json:"resource"` } @@ -19037,9 +19052,6 @@ type SecurityEntityAnalyticsAPIInspectQuery struct { // SecurityEntityAnalyticsAPIInterval Interval in which enrich policy runs. For example, `"1h"` means the rule runs every hour. Must be less than or equal to half the duration of the lookback period, type SecurityEntityAnalyticsAPIInterval = string -// SecurityEntityAnalyticsAPIMetadata defines model for Security_Entity_Analytics_API_Metadata. -type SecurityEntityAnalyticsAPIMetadata = SecurityEntityAnalyticsAPITransformStatsMetadata - // SecurityEntityAnalyticsAPIMonitoredUserDoc defines model for Security_Entity_Analytics_API_MonitoredUserDoc. type SecurityEntityAnalyticsAPIMonitoredUserDoc struct { Timestamp *time.Time `json:"@timestamp,omitempty"` @@ -19596,9 +19608,6 @@ type SecurityExceptionsAPIExceptionListsImportBulkErrorArray = []SecurityExcepti // - `agnostic`: Available in all Kibana spaces. type SecurityExceptionsAPIExceptionNamespaceType string -// SecurityExceptionsAPIFindExceptionListItemsFilter A string that does not contain only whitespace characters -type SecurityExceptionsAPIFindExceptionListItemsFilter = SecurityExceptionsAPINonEmptyString - // SecurityExceptionsAPIFindExceptionListsFilter defines model for Security_Exceptions_API_FindExceptionListsFilter. type SecurityExceptionsAPIFindExceptionListsFilter = string @@ -19622,9 +19631,6 @@ type SecurityExceptionsAPIPlatformErrorResponse struct { StatusCode int `json:"statusCode"` } -// SecurityExceptionsAPIRuleId A universally unique identifier -type SecurityExceptionsAPIRuleId = SecurityExceptionsAPIUUID - // SecurityExceptionsAPISiemErrorResponse defines model for Security_Exceptions_API_SiemErrorResponse. type SecurityExceptionsAPISiemErrorResponse struct { Message string `json:"message"` @@ -19856,25 +19862,25 @@ type SecurityOsqueryAPIArrayQueries = []SecurityOsqueryAPIArrayQueriesItem // SecurityOsqueryAPIArrayQueriesItem defines model for Security_Osquery_API_ArrayQueriesItem. type SecurityOsqueryAPIArrayQueriesItem struct { // EcsMapping Map osquery results columns or static values to Elastic Common Schema (ECS) fields - EcsMapping *SecurityOsqueryAPIECSMappingOrUndefined `json:"ecs_mapping,omitempty"` + EcsMapping *SecurityOsqueryAPIECSMapping `json:"ecs_mapping,omitempty"` // Id The ID of the query. Id *SecurityOsqueryAPIQueryId `json:"id,omitempty"` // Platform Restricts the query to a specified platform. The default is all platforms. To specify multiple platforms, use commas. For example, `linux,darwin`. - Platform *SecurityOsqueryAPIPlatformOrUndefined `json:"platform,omitempty"` + Platform *SecurityOsqueryAPIPlatform `json:"platform,omitempty"` // Query The SQL query you want to run. Query *SecurityOsqueryAPIQuery `json:"query,omitempty"` // Removed Indicates whether the query is removed. - Removed *SecurityOsqueryAPIRemovedOrUndefined `json:"removed,omitempty"` + Removed *SecurityOsqueryAPIRemoved `json:"removed,omitempty"` // Snapshot Indicates whether the query is a snapshot. - Snapshot *SecurityOsqueryAPISnapshotOrUndefined `json:"snapshot,omitempty"` + Snapshot *SecurityOsqueryAPISnapshot `json:"snapshot,omitempty"` // Version Uses the Osquery versions greater than or equal to the specified version string. - Version *SecurityOsqueryAPIVersionOrUndefined `json:"version,omitempty"` + Version *SecurityOsqueryAPIVersion `json:"version,omitempty"` } // SecurityOsqueryAPICreateLiveQueryRequestBody defines model for Security_Osquery_API_CreateLiveQueryRequestBody. @@ -19898,7 +19904,7 @@ type SecurityOsqueryAPICreateLiveQueryRequestBody struct { CaseIds *[]string `json:"case_ids,omitempty"` // EcsMapping Map osquery results columns or static values to Elastic Common Schema (ECS) fields - EcsMapping *SecurityOsqueryAPIECSMappingOrUndefined `json:"ecs_mapping,omitempty"` + EcsMapping *SecurityOsqueryAPIECSMapping `json:"ecs_mapping,omitempty"` // EventIds A list of event IDs associated with the live query. EventIds *[]string `json:"event_ids,omitempty"` @@ -19907,16 +19913,16 @@ type SecurityOsqueryAPICreateLiveQueryRequestBody struct { Metadata *map[string]interface{} `json:"metadata,omitempty"` // PackId The ID of the pack you want to run, retrieve, update, or delete. - PackId *SecurityOsqueryAPIPackIdOrUndefined `json:"pack_id,omitempty"` + PackId *SecurityOsqueryAPIPackId `json:"pack_id,omitempty"` // Queries An array of queries to run. Queries *SecurityOsqueryAPIArrayQueries `json:"queries,omitempty"` // Query The SQL query you want to run. - Query *SecurityOsqueryAPIQueryOrUndefined `json:"query,omitempty"` + Query *SecurityOsqueryAPIQuery `json:"query,omitempty"` // SavedQueryId The ID of a saved query. - SavedQueryId *SecurityOsqueryAPISavedQueryIdOrUndefined `json:"saved_query_id,omitempty"` + SavedQueryId *SecurityOsqueryAPISavedQueryId `json:"saved_query_id,omitempty"` } // SecurityOsqueryAPICreateLiveQueryResponse defines model for Security_Osquery_API_CreateLiveQueryResponse. @@ -19925,16 +19931,16 @@ type SecurityOsqueryAPICreateLiveQueryResponse = map[string]interface{} // SecurityOsqueryAPICreatePacksRequestBody defines model for Security_Osquery_API_CreatePacksRequestBody. type SecurityOsqueryAPICreatePacksRequestBody struct { // Description The pack description. - Description *SecurityOsqueryAPIPackDescriptionOrUndefined `json:"description,omitempty"` + Description *SecurityOsqueryAPIPackDescription `json:"description,omitempty"` // Enabled Enables the pack. - Enabled *SecurityOsqueryAPIEnabledOrUndefined `json:"enabled,omitempty"` + Enabled *SecurityOsqueryAPIEnabled `json:"enabled,omitempty"` // Name The pack name. Name *SecurityOsqueryAPIPackName `json:"name,omitempty"` // PolicyIds A list of agents policy IDs. - PolicyIds *SecurityOsqueryAPIPolicyIdsOrUndefined `json:"policy_ids,omitempty"` + PolicyIds *SecurityOsqueryAPIPolicyIds `json:"policy_ids,omitempty"` // Queries An object of queries. Queries *SecurityOsqueryAPIObjectQueries `json:"queries,omitempty"` @@ -19949,10 +19955,10 @@ type SecurityOsqueryAPICreatePacksResponse = map[string]interface{} // SecurityOsqueryAPICreateSavedQueryRequestBody defines model for Security_Osquery_API_CreateSavedQueryRequestBody. type SecurityOsqueryAPICreateSavedQueryRequestBody struct { // Description The saved query description. - Description *SecurityOsqueryAPISavedQueryDescriptionOrUndefined `json:"description,omitempty"` + Description *SecurityOsqueryAPISavedQueryDescription `json:"description,omitempty"` // EcsMapping Map osquery results columns or static values to Elastic Common Schema (ECS) fields - EcsMapping *SecurityOsqueryAPIECSMappingOrUndefined `json:"ecs_mapping,omitempty"` + EcsMapping *SecurityOsqueryAPIECSMapping `json:"ecs_mapping,omitempty"` // Id The ID of a saved query. Id *SecurityOsqueryAPISavedQueryId `json:"id,omitempty"` @@ -19961,19 +19967,19 @@ type SecurityOsqueryAPICreateSavedQueryRequestBody struct { Interval *SecurityOsqueryAPIInterval `json:"interval,omitempty"` // Platform Restricts the query to a specified platform. The default is all platforms. To specify multiple platforms, use commas. For example, `linux,darwin`. - Platform *SecurityOsqueryAPIPlatformOrUndefined `json:"platform,omitempty"` + Platform *SecurityOsqueryAPIPlatform `json:"platform,omitempty"` // Query The SQL query you want to run. - Query *SecurityOsqueryAPIQueryOrUndefined `json:"query,omitempty"` + Query *SecurityOsqueryAPIQuery `json:"query,omitempty"` // Removed Indicates whether the query is removed. - Removed *SecurityOsqueryAPIRemovedOrUndefined `json:"removed,omitempty"` + Removed *SecurityOsqueryAPIRemoved `json:"removed,omitempty"` // Snapshot Indicates whether the query is a snapshot. - Snapshot *SecurityOsqueryAPISnapshotOrUndefined `json:"snapshot,omitempty"` + Snapshot *SecurityOsqueryAPISnapshot `json:"snapshot,omitempty"` // Version Uses the Osquery versions greater than or equal to the specified version string. - Version *SecurityOsqueryAPIVersionOrUndefined `json:"version,omitempty"` + Version *SecurityOsqueryAPIVersion `json:"version,omitempty"` } // SecurityOsqueryAPICreateSavedQueryResponse defines model for Security_Osquery_API_CreateSavedQueryResponse. @@ -20005,15 +20011,9 @@ type SecurityOsqueryAPIECSMappingItem_Value struct { union json.RawMessage } -// SecurityOsqueryAPIECSMappingOrUndefined Map osquery results columns or static values to Elastic Common Schema (ECS) fields -type SecurityOsqueryAPIECSMappingOrUndefined = SecurityOsqueryAPIECSMapping - // SecurityOsqueryAPIEnabled Enables the pack. type SecurityOsqueryAPIEnabled = bool -// SecurityOsqueryAPIEnabledOrUndefined Enables the pack. -type SecurityOsqueryAPIEnabledOrUndefined = SecurityOsqueryAPIEnabled - // SecurityOsqueryAPIFindLiveQueryDetailsResponse defines model for Security_Osquery_API_FindLiveQueryDetailsResponse. type SecurityOsqueryAPIFindLiveQueryDetailsResponse = map[string]interface{} @@ -20038,9 +20038,6 @@ type SecurityOsqueryAPIGetLiveQueryResultsResponse = map[string]interface{} // SecurityOsqueryAPIInterval An interval, in seconds, on which to run the query. type SecurityOsqueryAPIInterval = string -// SecurityOsqueryAPIIntervalOrUndefined An interval, in seconds, on which to run the query. -type SecurityOsqueryAPIIntervalOrUndefined = SecurityOsqueryAPIInterval - // SecurityOsqueryAPIKueryOrUndefined The kuery to filter the results by. type SecurityOsqueryAPIKueryOrUndefined = string @@ -20050,42 +20047,36 @@ type SecurityOsqueryAPIObjectQueries map[string]SecurityOsqueryAPIObjectQueriesI // SecurityOsqueryAPIObjectQueriesItem defines model for Security_Osquery_API_ObjectQueriesItem. type SecurityOsqueryAPIObjectQueriesItem struct { // EcsMapping Map osquery results columns or static values to Elastic Common Schema (ECS) fields - EcsMapping *SecurityOsqueryAPIECSMappingOrUndefined `json:"ecs_mapping,omitempty"` + EcsMapping *SecurityOsqueryAPIECSMapping `json:"ecs_mapping,omitempty"` // Id The ID of the query. Id *SecurityOsqueryAPIQueryId `json:"id,omitempty"` // Platform Restricts the query to a specified platform. The default is all platforms. To specify multiple platforms, use commas. For example, `linux,darwin`. - Platform *SecurityOsqueryAPIPlatformOrUndefined `json:"platform,omitempty"` + Platform *SecurityOsqueryAPIPlatform `json:"platform,omitempty"` // Query The SQL query you want to run. Query *SecurityOsqueryAPIQuery `json:"query,omitempty"` // Removed Indicates whether the query is removed. - Removed *SecurityOsqueryAPIRemovedOrUndefined `json:"removed,omitempty"` + Removed *SecurityOsqueryAPIRemoved `json:"removed,omitempty"` // SavedQueryId The ID of a saved query. - SavedQueryId *SecurityOsqueryAPISavedQueryIdOrUndefined `json:"saved_query_id,omitempty"` + SavedQueryId *SecurityOsqueryAPISavedQueryId `json:"saved_query_id,omitempty"` // Snapshot Indicates whether the query is a snapshot. - Snapshot *SecurityOsqueryAPISnapshotOrUndefined `json:"snapshot,omitempty"` + Snapshot *SecurityOsqueryAPISnapshot `json:"snapshot,omitempty"` // Version Uses the Osquery versions greater than or equal to the specified version string. - Version *SecurityOsqueryAPIVersionOrUndefined `json:"version,omitempty"` + Version *SecurityOsqueryAPIVersion `json:"version,omitempty"` } // SecurityOsqueryAPIPackDescription The pack description. type SecurityOsqueryAPIPackDescription = string -// SecurityOsqueryAPIPackDescriptionOrUndefined The pack description. -type SecurityOsqueryAPIPackDescriptionOrUndefined = SecurityOsqueryAPIPackDescription - // SecurityOsqueryAPIPackId The ID of the pack you want to run, retrieve, update, or delete. type SecurityOsqueryAPIPackId = string -// SecurityOsqueryAPIPackIdOrUndefined The ID of the pack you want to run, retrieve, update, or delete. -type SecurityOsqueryAPIPackIdOrUndefined = SecurityOsqueryAPIPackId - // SecurityOsqueryAPIPackName The pack name. type SecurityOsqueryAPIPackName = string @@ -20098,51 +20089,30 @@ type SecurityOsqueryAPIPageSizeOrUndefined = int // SecurityOsqueryAPIPlatform Restricts the query to a specified platform. The default is all platforms. To specify multiple platforms, use commas. For example, `linux,darwin`. type SecurityOsqueryAPIPlatform = string -// SecurityOsqueryAPIPlatformOrUndefined Restricts the query to a specified platform. The default is all platforms. To specify multiple platforms, use commas. For example, `linux,darwin`. -type SecurityOsqueryAPIPlatformOrUndefined = SecurityOsqueryAPIPlatform - // SecurityOsqueryAPIPolicyIds A list of agents policy IDs. type SecurityOsqueryAPIPolicyIds = []string -// SecurityOsqueryAPIPolicyIdsOrUndefined A list of agents policy IDs. -type SecurityOsqueryAPIPolicyIdsOrUndefined = SecurityOsqueryAPIPolicyIds - // SecurityOsqueryAPIQuery The SQL query you want to run. type SecurityOsqueryAPIQuery = string // SecurityOsqueryAPIQueryId The ID of the query. type SecurityOsqueryAPIQueryId = string -// SecurityOsqueryAPIQueryOrUndefined The SQL query you want to run. -type SecurityOsqueryAPIQueryOrUndefined = SecurityOsqueryAPIQuery - // SecurityOsqueryAPIRemoved Indicates whether the query is removed. type SecurityOsqueryAPIRemoved = bool -// SecurityOsqueryAPIRemovedOrUndefined Indicates whether the query is removed. -type SecurityOsqueryAPIRemovedOrUndefined = SecurityOsqueryAPIRemoved - // SecurityOsqueryAPISavedQueryDescription The saved query description. type SecurityOsqueryAPISavedQueryDescription = string -// SecurityOsqueryAPISavedQueryDescriptionOrUndefined The saved query description. -type SecurityOsqueryAPISavedQueryDescriptionOrUndefined = SecurityOsqueryAPISavedQueryDescription - // SecurityOsqueryAPISavedQueryId The ID of a saved query. type SecurityOsqueryAPISavedQueryId = string -// SecurityOsqueryAPISavedQueryIdOrUndefined The ID of a saved query. -type SecurityOsqueryAPISavedQueryIdOrUndefined = SecurityOsqueryAPISavedQueryId - // SecurityOsqueryAPIShards An object with shard configuration for policies included in the pack. For each policy, set the shard configuration to a percentage (1–100) of target hosts. type SecurityOsqueryAPIShards map[string]float32 // SecurityOsqueryAPISnapshot Indicates whether the query is a snapshot. type SecurityOsqueryAPISnapshot = bool -// SecurityOsqueryAPISnapshotOrUndefined Indicates whether the query is a snapshot. -type SecurityOsqueryAPISnapshotOrUndefined = SecurityOsqueryAPISnapshot - // SecurityOsqueryAPISortOrUndefined The field that is used to sort the results. type SecurityOsqueryAPISortOrUndefined = string @@ -20152,16 +20122,16 @@ type SecurityOsqueryAPISortOrderOrUndefined string // SecurityOsqueryAPIUpdatePacksRequestBody defines model for Security_Osquery_API_UpdatePacksRequestBody. type SecurityOsqueryAPIUpdatePacksRequestBody struct { // Description The pack description. - Description *SecurityOsqueryAPIPackDescriptionOrUndefined `json:"description,omitempty"` + Description *SecurityOsqueryAPIPackDescription `json:"description,omitempty"` // Enabled Enables the pack. - Enabled *SecurityOsqueryAPIEnabledOrUndefined `json:"enabled,omitempty"` + Enabled *SecurityOsqueryAPIEnabled `json:"enabled,omitempty"` // Name The pack name. Name *SecurityOsqueryAPIPackName `json:"name,omitempty"` // PolicyIds A list of agents policy IDs. - PolicyIds *SecurityOsqueryAPIPolicyIdsOrUndefined `json:"policy_ids,omitempty"` + PolicyIds *SecurityOsqueryAPIPolicyIds `json:"policy_ids,omitempty"` // Queries An object of queries. Queries *SecurityOsqueryAPIObjectQueries `json:"queries,omitempty"` @@ -20176,31 +20146,31 @@ type SecurityOsqueryAPIUpdatePacksResponse = map[string]interface{} // SecurityOsqueryAPIUpdateSavedQueryRequestBody defines model for Security_Osquery_API_UpdateSavedQueryRequestBody. type SecurityOsqueryAPIUpdateSavedQueryRequestBody struct { // Description The saved query description. - Description *SecurityOsqueryAPISavedQueryDescriptionOrUndefined `json:"description,omitempty"` + Description *SecurityOsqueryAPISavedQueryDescription `json:"description,omitempty"` // EcsMapping Map osquery results columns or static values to Elastic Common Schema (ECS) fields - EcsMapping *SecurityOsqueryAPIECSMappingOrUndefined `json:"ecs_mapping,omitempty"` + EcsMapping *SecurityOsqueryAPIECSMapping `json:"ecs_mapping,omitempty"` // Id The ID of a saved query. Id *SecurityOsqueryAPISavedQueryId `json:"id,omitempty"` // Interval An interval, in seconds, on which to run the query. - Interval *SecurityOsqueryAPIIntervalOrUndefined `json:"interval,omitempty"` + Interval *SecurityOsqueryAPIInterval `json:"interval,omitempty"` // Platform Restricts the query to a specified platform. The default is all platforms. To specify multiple platforms, use commas. For example, `linux,darwin`. - Platform *SecurityOsqueryAPIPlatformOrUndefined `json:"platform,omitempty"` + Platform *SecurityOsqueryAPIPlatform `json:"platform,omitempty"` // Query The SQL query you want to run. - Query *SecurityOsqueryAPIQueryOrUndefined `json:"query,omitempty"` + Query *SecurityOsqueryAPIQuery `json:"query,omitempty"` // Removed Indicates whether the query is removed. - Removed *SecurityOsqueryAPIRemovedOrUndefined `json:"removed,omitempty"` + Removed *SecurityOsqueryAPIRemoved `json:"removed,omitempty"` // Snapshot Indicates whether the query is a snapshot. - Snapshot *SecurityOsqueryAPISnapshotOrUndefined `json:"snapshot,omitempty"` + Snapshot *SecurityOsqueryAPISnapshot `json:"snapshot,omitempty"` // Version Uses the Osquery versions greater than or equal to the specified version string. - Version *SecurityOsqueryAPIVersionOrUndefined `json:"version,omitempty"` + Version *SecurityOsqueryAPIVersion `json:"version,omitempty"` } // SecurityOsqueryAPIUpdateSavedQueryResponse defines model for Security_Osquery_API_UpdateSavedQueryResponse. @@ -20209,9 +20179,6 @@ type SecurityOsqueryAPIUpdateSavedQueryResponse = map[string]interface{} // SecurityOsqueryAPIVersion Uses the Osquery versions greater than or equal to the specified version string. type SecurityOsqueryAPIVersion = string -// SecurityOsqueryAPIVersionOrUndefined Uses the Osquery versions greater than or equal to the specified version string. -type SecurityOsqueryAPIVersionOrUndefined = SecurityOsqueryAPIVersion - // SecurityTimelineAPIAssociatedFilterType Filter notes based on their association with a document or saved object. type SecurityTimelineAPIAssociatedFilterType string @@ -20573,9 +20540,6 @@ type SecurityTimelineAPIPersistPinnedEventResponse1 struct { Unpinned bool `json:"unpinned"` } -// SecurityTimelineAPIPersistTimelineResponse defines model for Security_Timeline_API_PersistTimelineResponse. -type SecurityTimelineAPIPersistTimelineResponse = SecurityTimelineAPITimelineResponse - // SecurityTimelineAPIPinnedEvent defines model for Security_Timeline_API_PinnedEvent. type SecurityTimelineAPIPinnedEvent struct { // Created The time the pinned event was created, using a 13-digit Epoch timestamp. @@ -28906,7 +28870,7 @@ type UpdateEndpointListItemJSONBody struct { type FindEndpointListItemsParams struct { // Filter Filters the returned results according to the value of the specified field, // using the `:` syntax. - Filter *SecurityEndpointExceptionsAPIFindEndpointListItemsFilter `form:"filter,omitempty" json:"filter,omitempty"` + Filter *SecurityEndpointExceptionsAPINonEmptyString `form:"filter,omitempty" json:"filter,omitempty"` // Page The page number to return Page *int `form:"page,omitempty" json:"page,omitempty"` @@ -29325,7 +29289,7 @@ type FindExceptionListItemsParams struct { // Filter Filters the returned results according to the value of the specified field, // using the `:` syntax. - Filter *[]SecurityExceptionsAPIFindExceptionListItemsFilter `form:"filter,omitempty" json:"filter,omitempty"` + Filter *[]SecurityExceptionsAPINonEmptyString `form:"filter,omitempty" json:"filter,omitempty"` // NamespaceType Determines whether the returned containers are Kibana associated with a Kibana space // or available in all spaces (`agnostic` or `single`) @@ -46954,6 +46918,95 @@ type PostStreamsNameSignificantEventsPreviewJSONBody_Query_Feature_Filter struct union json.RawMessage } +// GetStreamsStreamnameAttachmentsJSONBody defines parameters for GetStreamsStreamnameAttachments. +type GetStreamsStreamnameAttachmentsJSONBody struct { + union json.RawMessage +} + +// GetStreamsStreamnameAttachmentsParams defines parameters for GetStreamsStreamnameAttachments. +type GetStreamsStreamnameAttachmentsParams struct { + // AttachmentType Filter by attachment type + AttachmentType *GetStreamsStreamnameAttachmentsParamsAttachmentType `form:"attachmentType,omitempty" json:"attachmentType,omitempty"` +} + +// GetStreamsStreamnameAttachmentsParamsAttachmentType defines parameters for GetStreamsStreamnameAttachments. +type GetStreamsStreamnameAttachmentsParamsAttachmentType string + +// GetStreamsStreamnameAttachmentsJSONBody0 defines parameters for GetStreamsStreamnameAttachments. +type GetStreamsStreamnameAttachmentsJSONBody0 = map[string]interface{} + +// GetStreamsStreamnameAttachmentsJSONBody1 defines parameters for GetStreamsStreamnameAttachments. +type GetStreamsStreamnameAttachmentsJSONBody1 = interface{} + +// GetStreamsStreamnameAttachmentsJSONBody2 defines parameters for GetStreamsStreamnameAttachments. +type GetStreamsStreamnameAttachmentsJSONBody2 = interface{} + +// PostStreamsStreamnameAttachmentsBulkJSONBody defines parameters for PostStreamsStreamnameAttachmentsBulk. +type PostStreamsStreamnameAttachmentsBulkJSONBody struct { + Operations []PostStreamsStreamnameAttachmentsBulkJSONBody_Operations_Item `json:"operations"` +} + +// PostStreamsStreamnameAttachmentsBulkJSONBodyOperations0 defines parameters for PostStreamsStreamnameAttachmentsBulk. +type PostStreamsStreamnameAttachmentsBulkJSONBodyOperations0 struct { + Index struct { + Id string `json:"id"` + Type PostStreamsStreamnameAttachmentsBulkJSONBodyOperations0IndexType `json:"type"` + } `json:"index"` +} + +// PostStreamsStreamnameAttachmentsBulkJSONBodyOperations0IndexType defines parameters for PostStreamsStreamnameAttachmentsBulk. +type PostStreamsStreamnameAttachmentsBulkJSONBodyOperations0IndexType string + +// PostStreamsStreamnameAttachmentsBulkJSONBodyOperations1 defines parameters for PostStreamsStreamnameAttachmentsBulk. +type PostStreamsStreamnameAttachmentsBulkJSONBodyOperations1 struct { + Delete struct { + Id string `json:"id"` + Type PostStreamsStreamnameAttachmentsBulkJSONBodyOperations1DeleteType `json:"type"` + } `json:"delete"` +} + +// PostStreamsStreamnameAttachmentsBulkJSONBodyOperations1DeleteType defines parameters for PostStreamsStreamnameAttachmentsBulk. +type PostStreamsStreamnameAttachmentsBulkJSONBodyOperations1DeleteType string + +// PostStreamsStreamnameAttachmentsBulkJSONBody_Operations_Item defines parameters for PostStreamsStreamnameAttachmentsBulk. +type PostStreamsStreamnameAttachmentsBulkJSONBody_Operations_Item struct { + union json.RawMessage +} + +// DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONBody defines parameters for DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentid. +type DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONBody struct { + union json.RawMessage +} + +// DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentType defines parameters for DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentid. +type DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentType string + +// DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONBody0 defines parameters for DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentid. +type DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONBody0 = map[string]interface{} + +// DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONBody1 defines parameters for DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentid. +type DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONBody1 = interface{} + +// DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONBody2 defines parameters for DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentid. +type DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONBody2 = interface{} + +// PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONBody defines parameters for PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentid. +type PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONBody struct { + union json.RawMessage +} + +// PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentType defines parameters for PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentid. +type PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentType string + +// PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONBody0 defines parameters for PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentid. +type PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONBody0 = map[string]interface{} + +// PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONBody1 defines parameters for PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentid. +type PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONBody1 = interface{} + +// PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONBody2 defines parameters for PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentid. +type PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONBody2 = interface{} + // GetSyntheticMonitorsParams defines parameters for GetSyntheticMonitors. type GetSyntheticMonitorsParams struct { // Filter Additional filtering criteria. @@ -47317,7 +47370,7 @@ type PutActionsConnectorIdJSONBody struct { // DeleteRuleParams defines parameters for DeleteRule. type DeleteRuleParams struct { // Id The rule's `id` value. - Id *SecurityDetectionsAPIRuleObjectId `form:"id,omitempty" json:"id,omitempty"` + Id *SecurityDetectionsAPIUUID `form:"id,omitempty" json:"id,omitempty"` // RuleId The rule's `rule_id` value. RuleId *SecurityDetectionsAPIRuleSignatureId `form:"rule_id,omitempty" json:"rule_id,omitempty"` @@ -47326,7 +47379,7 @@ type DeleteRuleParams struct { // ReadRuleParams defines parameters for ReadRule. type ReadRuleParams struct { // Id The rule's `id` value. - Id *SecurityDetectionsAPIRuleObjectId `form:"id,omitempty" json:"id,omitempty"` + Id *SecurityDetectionsAPIUUID `form:"id,omitempty" json:"id,omitempty"` // RuleId The rule's `rule_id` value. RuleId *SecurityDetectionsAPIRuleSignatureId `form:"rule_id,omitempty" json:"rule_id,omitempty"` @@ -48133,6 +48186,18 @@ type PostStreamsNameSignificantEventsGenerateJSONRequestBody PostStreamsNameSign // PostStreamsNameSignificantEventsPreviewJSONRequestBody defines body for PostStreamsNameSignificantEventsPreview for application/json ContentType. type PostStreamsNameSignificantEventsPreviewJSONRequestBody PostStreamsNameSignificantEventsPreviewJSONBody +// GetStreamsStreamnameAttachmentsJSONRequestBody defines body for GetStreamsStreamnameAttachments for application/json ContentType. +type GetStreamsStreamnameAttachmentsJSONRequestBody GetStreamsStreamnameAttachmentsJSONBody + +// PostStreamsStreamnameAttachmentsBulkJSONRequestBody defines body for PostStreamsStreamnameAttachmentsBulk for application/json ContentType. +type PostStreamsStreamnameAttachmentsBulkJSONRequestBody PostStreamsStreamnameAttachmentsBulkJSONBody + +// DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONRequestBody defines body for DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentid for application/json ContentType. +type DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONRequestBody DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONBody + +// PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONRequestBody defines body for PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentid for application/json ContentType. +type PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONRequestBody PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONBody + // PostSyntheticMonitorsJSONRequestBody defines body for PostSyntheticMonitors for application/json ContentType. type PostSyntheticMonitorsJSONRequestBody PostSyntheticMonitorsJSONBody @@ -64717,7 +64782,6 @@ func (t SecurityEndpointManagementAPIActionDetailsResponse) AsSecurityEndpointMa // FromSecurityEndpointManagementAPIKillProcess overwrites any union data inside the SecurityEndpointManagementAPIActionDetailsResponse as the provided SecurityEndpointManagementAPIKillProcess func (t *SecurityEndpointManagementAPIActionDetailsResponse) FromSecurityEndpointManagementAPIKillProcess(v SecurityEndpointManagementAPIKillProcess) error { - v.Command = "kill-process" b, err := json.Marshal(v) t.union = b return err @@ -64725,7 +64789,6 @@ func (t *SecurityEndpointManagementAPIActionDetailsResponse) FromSecurityEndpoin // MergeSecurityEndpointManagementAPIKillProcess performs a merge with any union data inside the SecurityEndpointManagementAPIActionDetailsResponse, using the provided SecurityEndpointManagementAPIKillProcess func (t *SecurityEndpointManagementAPIActionDetailsResponse) MergeSecurityEndpointManagementAPIKillProcess(v SecurityEndpointManagementAPIKillProcess) error { - v.Command = "kill-process" b, err := json.Marshal(v) if err != nil { return err @@ -64745,7 +64808,6 @@ func (t SecurityEndpointManagementAPIActionDetailsResponse) AsSecurityEndpointMa // FromSecurityEndpointManagementAPIGetFile overwrites any union data inside the SecurityEndpointManagementAPIActionDetailsResponse as the provided SecurityEndpointManagementAPIGetFile func (t *SecurityEndpointManagementAPIActionDetailsResponse) FromSecurityEndpointManagementAPIGetFile(v SecurityEndpointManagementAPIGetFile) error { - v.Command = "get-file" b, err := json.Marshal(v) t.union = b return err @@ -64753,7 +64815,6 @@ func (t *SecurityEndpointManagementAPIActionDetailsResponse) FromSecurityEndpoin // MergeSecurityEndpointManagementAPIGetFile performs a merge with any union data inside the SecurityEndpointManagementAPIActionDetailsResponse, using the provided SecurityEndpointManagementAPIGetFile func (t *SecurityEndpointManagementAPIActionDetailsResponse) MergeSecurityEndpointManagementAPIGetFile(v SecurityEndpointManagementAPIGetFile) error { - v.Command = "get-file" b, err := json.Marshal(v) if err != nil { return err @@ -64773,7 +64834,6 @@ func (t SecurityEndpointManagementAPIActionDetailsResponse) AsSecurityEndpointMa // FromSecurityEndpointManagementAPIExecute overwrites any union data inside the SecurityEndpointManagementAPIActionDetailsResponse as the provided SecurityEndpointManagementAPIExecute func (t *SecurityEndpointManagementAPIActionDetailsResponse) FromSecurityEndpointManagementAPIExecute(v SecurityEndpointManagementAPIExecute) error { - v.Command = "execute" b, err := json.Marshal(v) t.union = b return err @@ -64781,7 +64841,6 @@ func (t *SecurityEndpointManagementAPIActionDetailsResponse) FromSecurityEndpoin // MergeSecurityEndpointManagementAPIExecute performs a merge with any union data inside the SecurityEndpointManagementAPIActionDetailsResponse, using the provided SecurityEndpointManagementAPIExecute func (t *SecurityEndpointManagementAPIActionDetailsResponse) MergeSecurityEndpointManagementAPIExecute(v SecurityEndpointManagementAPIExecute) error { - v.Command = "execute" b, err := json.Marshal(v) if err != nil { return err @@ -64801,7 +64860,6 @@ func (t SecurityEndpointManagementAPIActionDetailsResponse) AsSecurityEndpointMa // FromSecurityEndpointManagementAPIRunscript overwrites any union data inside the SecurityEndpointManagementAPIActionDetailsResponse as the provided SecurityEndpointManagementAPIRunscript func (t *SecurityEndpointManagementAPIActionDetailsResponse) FromSecurityEndpointManagementAPIRunscript(v SecurityEndpointManagementAPIRunscript) error { - v.Command = "runscript" b, err := json.Marshal(v) t.union = b return err @@ -64809,7 +64867,6 @@ func (t *SecurityEndpointManagementAPIActionDetailsResponse) FromSecurityEndpoin // MergeSecurityEndpointManagementAPIRunscript performs a merge with any union data inside the SecurityEndpointManagementAPIActionDetailsResponse, using the provided SecurityEndpointManagementAPIRunscript func (t *SecurityEndpointManagementAPIActionDetailsResponse) MergeSecurityEndpointManagementAPIRunscript(v SecurityEndpointManagementAPIRunscript) error { - v.Command = "runscript" b, err := json.Marshal(v) if err != nil { return err @@ -64829,7 +64886,6 @@ func (t SecurityEndpointManagementAPIActionDetailsResponse) AsSecurityEndpointMa // FromSecurityEndpointManagementAPIUpload overwrites any union data inside the SecurityEndpointManagementAPIActionDetailsResponse as the provided SecurityEndpointManagementAPIUpload func (t *SecurityEndpointManagementAPIActionDetailsResponse) FromSecurityEndpointManagementAPIUpload(v SecurityEndpointManagementAPIUpload) error { - v.Command = "upload" b, err := json.Marshal(v) t.union = b return err @@ -64837,7 +64893,6 @@ func (t *SecurityEndpointManagementAPIActionDetailsResponse) FromSecurityEndpoin // MergeSecurityEndpointManagementAPIUpload performs a merge with any union data inside the SecurityEndpointManagementAPIActionDetailsResponse, using the provided SecurityEndpointManagementAPIUpload func (t *SecurityEndpointManagementAPIActionDetailsResponse) MergeSecurityEndpointManagementAPIUpload(v SecurityEndpointManagementAPIUpload) error { - v.Command = "upload" b, err := json.Marshal(v) if err != nil { return err @@ -64857,7 +64912,6 @@ func (t SecurityEndpointManagementAPIActionDetailsResponse) AsSecurityEndpointMa // FromSecurityEndpointManagementAPIScan overwrites any union data inside the SecurityEndpointManagementAPIActionDetailsResponse as the provided SecurityEndpointManagementAPIScan func (t *SecurityEndpointManagementAPIActionDetailsResponse) FromSecurityEndpointManagementAPIScan(v SecurityEndpointManagementAPIScan) error { - v.Command = "scan" b, err := json.Marshal(v) t.union = b return err @@ -64865,7 +64919,6 @@ func (t *SecurityEndpointManagementAPIActionDetailsResponse) FromSecurityEndpoin // MergeSecurityEndpointManagementAPIScan performs a merge with any union data inside the SecurityEndpointManagementAPIActionDetailsResponse, using the provided SecurityEndpointManagementAPIScan func (t *SecurityEndpointManagementAPIActionDetailsResponse) MergeSecurityEndpointManagementAPIScan(v SecurityEndpointManagementAPIScan) error { - v.Command = "scan" b, err := json.Marshal(v) if err != nil { return err @@ -64885,7 +64938,6 @@ func (t SecurityEndpointManagementAPIActionDetailsResponse) AsSecurityEndpointMa // FromSecurityEndpointManagementAPICancel overwrites any union data inside the SecurityEndpointManagementAPIActionDetailsResponse as the provided SecurityEndpointManagementAPICancel func (t *SecurityEndpointManagementAPIActionDetailsResponse) FromSecurityEndpointManagementAPICancel(v SecurityEndpointManagementAPICancel) error { - v.Command = "cancel" b, err := json.Marshal(v) t.union = b return err @@ -64893,7 +64945,6 @@ func (t *SecurityEndpointManagementAPIActionDetailsResponse) FromSecurityEndpoin // MergeSecurityEndpointManagementAPICancel performs a merge with any union data inside the SecurityEndpointManagementAPIActionDetailsResponse, using the provided SecurityEndpointManagementAPICancel func (t *SecurityEndpointManagementAPIActionDetailsResponse) MergeSecurityEndpointManagementAPICancel(v SecurityEndpointManagementAPICancel) error { - v.Command = "cancel" b, err := json.Marshal(v) if err != nil { return err @@ -64904,24 +64955,22 @@ func (t *SecurityEndpointManagementAPIActionDetailsResponse) MergeSecurityEndpoi return err } -// AsSecurityEndpointManagementAPIIsolate returns the union data inside the SecurityEndpointManagementAPIActionDetailsResponse as a SecurityEndpointManagementAPIIsolate -func (t SecurityEndpointManagementAPIActionDetailsResponse) AsSecurityEndpointManagementAPIIsolate() (SecurityEndpointManagementAPIIsolate, error) { - var body SecurityEndpointManagementAPIIsolate +// AsSecurityEndpointManagementAPIResponseActionDetails returns the union data inside the SecurityEndpointManagementAPIActionDetailsResponse as a SecurityEndpointManagementAPIResponseActionDetails +func (t SecurityEndpointManagementAPIActionDetailsResponse) AsSecurityEndpointManagementAPIResponseActionDetails() (SecurityEndpointManagementAPIResponseActionDetails, error) { + var body SecurityEndpointManagementAPIResponseActionDetails err := json.Unmarshal(t.union, &body) return body, err } -// FromSecurityEndpointManagementAPIIsolate overwrites any union data inside the SecurityEndpointManagementAPIActionDetailsResponse as the provided SecurityEndpointManagementAPIIsolate -func (t *SecurityEndpointManagementAPIActionDetailsResponse) FromSecurityEndpointManagementAPIIsolate(v SecurityEndpointManagementAPIIsolate) error { - v.Command = "Security_Endpoint_Management_API_Isolate" +// FromSecurityEndpointManagementAPIResponseActionDetails overwrites any union data inside the SecurityEndpointManagementAPIActionDetailsResponse as the provided SecurityEndpointManagementAPIResponseActionDetails +func (t *SecurityEndpointManagementAPIActionDetailsResponse) FromSecurityEndpointManagementAPIResponseActionDetails(v SecurityEndpointManagementAPIResponseActionDetails) error { b, err := json.Marshal(v) t.union = b return err } -// MergeSecurityEndpointManagementAPIIsolate performs a merge with any union data inside the SecurityEndpointManagementAPIActionDetailsResponse, using the provided SecurityEndpointManagementAPIIsolate -func (t *SecurityEndpointManagementAPIActionDetailsResponse) MergeSecurityEndpointManagementAPIIsolate(v SecurityEndpointManagementAPIIsolate) error { - v.Command = "Security_Endpoint_Management_API_Isolate" +// MergeSecurityEndpointManagementAPIResponseActionDetails performs a merge with any union data inside the SecurityEndpointManagementAPIActionDetailsResponse, using the provided SecurityEndpointManagementAPIResponseActionDetails +func (t *SecurityEndpointManagementAPIActionDetailsResponse) MergeSecurityEndpointManagementAPIResponseActionDetails(v SecurityEndpointManagementAPIResponseActionDetails) error { b, err := json.Marshal(v) if err != nil { return err @@ -64932,24 +64981,22 @@ func (t *SecurityEndpointManagementAPIActionDetailsResponse) MergeSecurityEndpoi return err } -// AsSecurityEndpointManagementAPIUnisolate returns the union data inside the SecurityEndpointManagementAPIActionDetailsResponse as a SecurityEndpointManagementAPIUnisolate -func (t SecurityEndpointManagementAPIActionDetailsResponse) AsSecurityEndpointManagementAPIUnisolate() (SecurityEndpointManagementAPIUnisolate, error) { - var body SecurityEndpointManagementAPIUnisolate +// AsSecurityEndpointManagementAPIResponseActionDetails returns the union data inside the SecurityEndpointManagementAPIActionDetailsResponse as a SecurityEndpointManagementAPIResponseActionDetails +func (t SecurityEndpointManagementAPIActionDetailsResponse) AsSecurityEndpointManagementAPIResponseActionDetails() (SecurityEndpointManagementAPIResponseActionDetails, error) { + var body SecurityEndpointManagementAPIResponseActionDetails err := json.Unmarshal(t.union, &body) return body, err } -// FromSecurityEndpointManagementAPIUnisolate overwrites any union data inside the SecurityEndpointManagementAPIActionDetailsResponse as the provided SecurityEndpointManagementAPIUnisolate -func (t *SecurityEndpointManagementAPIActionDetailsResponse) FromSecurityEndpointManagementAPIUnisolate(v SecurityEndpointManagementAPIUnisolate) error { - v.Command = "Security_Endpoint_Management_API_Unisolate" +// FromSecurityEndpointManagementAPIResponseActionDetails overwrites any union data inside the SecurityEndpointManagementAPIActionDetailsResponse as the provided SecurityEndpointManagementAPIResponseActionDetails +func (t *SecurityEndpointManagementAPIActionDetailsResponse) FromSecurityEndpointManagementAPIResponseActionDetails(v SecurityEndpointManagementAPIResponseActionDetails) error { b, err := json.Marshal(v) t.union = b return err } -// MergeSecurityEndpointManagementAPIUnisolate performs a merge with any union data inside the SecurityEndpointManagementAPIActionDetailsResponse, using the provided SecurityEndpointManagementAPIUnisolate -func (t *SecurityEndpointManagementAPIActionDetailsResponse) MergeSecurityEndpointManagementAPIUnisolate(v SecurityEndpointManagementAPIUnisolate) error { - v.Command = "Security_Endpoint_Management_API_Unisolate" +// MergeSecurityEndpointManagementAPIResponseActionDetails performs a merge with any union data inside the SecurityEndpointManagementAPIActionDetailsResponse, using the provided SecurityEndpointManagementAPIResponseActionDetails +func (t *SecurityEndpointManagementAPIActionDetailsResponse) MergeSecurityEndpointManagementAPIResponseActionDetails(v SecurityEndpointManagementAPIResponseActionDetails) error { b, err := json.Marshal(v) if err != nil { return err @@ -64969,7 +65016,6 @@ func (t SecurityEndpointManagementAPIActionDetailsResponse) AsSecurityEndpointMa // FromSecurityEndpointManagementAPISuspendProcess overwrites any union data inside the SecurityEndpointManagementAPIActionDetailsResponse as the provided SecurityEndpointManagementAPISuspendProcess func (t *SecurityEndpointManagementAPIActionDetailsResponse) FromSecurityEndpointManagementAPISuspendProcess(v SecurityEndpointManagementAPISuspendProcess) error { - v.Command = "suspend-process" b, err := json.Marshal(v) t.union = b return err @@ -64977,7 +65023,6 @@ func (t *SecurityEndpointManagementAPIActionDetailsResponse) FromSecurityEndpoin // MergeSecurityEndpointManagementAPISuspendProcess performs a merge with any union data inside the SecurityEndpointManagementAPIActionDetailsResponse, using the provided SecurityEndpointManagementAPISuspendProcess func (t *SecurityEndpointManagementAPIActionDetailsResponse) MergeSecurityEndpointManagementAPISuspendProcess(v SecurityEndpointManagementAPISuspendProcess) error { - v.Command = "suspend-process" b, err := json.Marshal(v) if err != nil { return err @@ -64997,7 +65042,6 @@ func (t SecurityEndpointManagementAPIActionDetailsResponse) AsSecurityEndpointMa // FromSecurityEndpointManagementAPIRunningProcesses overwrites any union data inside the SecurityEndpointManagementAPIActionDetailsResponse as the provided SecurityEndpointManagementAPIRunningProcesses func (t *SecurityEndpointManagementAPIActionDetailsResponse) FromSecurityEndpointManagementAPIRunningProcesses(v SecurityEndpointManagementAPIRunningProcesses) error { - v.Command = "running-processes" b, err := json.Marshal(v) t.union = b return err @@ -65005,7 +65049,6 @@ func (t *SecurityEndpointManagementAPIActionDetailsResponse) FromSecurityEndpoin // MergeSecurityEndpointManagementAPIRunningProcesses performs a merge with any union data inside the SecurityEndpointManagementAPIActionDetailsResponse, using the provided SecurityEndpointManagementAPIRunningProcesses func (t *SecurityEndpointManagementAPIActionDetailsResponse) MergeSecurityEndpointManagementAPIRunningProcesses(v SecurityEndpointManagementAPIRunningProcesses) error { - v.Command = "running-processes" b, err := json.Marshal(v) if err != nil { return err @@ -65016,47 +65059,6 @@ func (t *SecurityEndpointManagementAPIActionDetailsResponse) MergeSecurityEndpoi return err } -func (t SecurityEndpointManagementAPIActionDetailsResponse) Discriminator() (string, error) { - var discriminator struct { - Discriminator string `json:"command"` - } - err := json.Unmarshal(t.union, &discriminator) - return discriminator.Discriminator, err -} - -func (t SecurityEndpointManagementAPIActionDetailsResponse) ValueByDiscriminator() (interface{}, error) { - discriminator, err := t.Discriminator() - if err != nil { - return nil, err - } - switch discriminator { - case "Security_Endpoint_Management_API_Isolate": - return t.AsSecurityEndpointManagementAPIIsolate() - case "Security_Endpoint_Management_API_Unisolate": - return t.AsSecurityEndpointManagementAPIUnisolate() - case "cancel": - return t.AsSecurityEndpointManagementAPICancel() - case "execute": - return t.AsSecurityEndpointManagementAPIExecute() - case "get-file": - return t.AsSecurityEndpointManagementAPIGetFile() - case "kill-process": - return t.AsSecurityEndpointManagementAPIKillProcess() - case "running-processes": - return t.AsSecurityEndpointManagementAPIRunningProcesses() - case "runscript": - return t.AsSecurityEndpointManagementAPIRunscript() - case "scan": - return t.AsSecurityEndpointManagementAPIScan() - case "suspend-process": - return t.AsSecurityEndpointManagementAPISuspendProcess() - case "upload": - return t.AsSecurityEndpointManagementAPIUpload() - default: - return nil, errors.New("unknown discriminator value: " + discriminator) - } -} - func (t SecurityEndpointManagementAPIActionDetailsResponse) MarshalJSON() ([]byte, error) { b, err := t.union.MarshalJSON() return b, err @@ -75126,9 +75128,9 @@ type ClientInterface interface { RulePreview(ctx context.Context, params *RulePreviewParams, body RulePreviewJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // CreateRuleExceptionListItemsWithBody request with any body - CreateRuleExceptionListItemsWithBody(ctx context.Context, id SecurityExceptionsAPIRuleId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + CreateRuleExceptionListItemsWithBody(ctx context.Context, id SecurityExceptionsAPIUUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - CreateRuleExceptionListItems(ctx context.Context, id SecurityExceptionsAPIRuleId, body CreateRuleExceptionListItemsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + CreateRuleExceptionListItems(ctx context.Context, id SecurityExceptionsAPIUUID, body CreateRuleExceptionListItemsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // SetAlertAssigneesWithBody request with any body SetAlertAssigneesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -76478,6 +76480,26 @@ type ClientInterface interface { PostStreamsNameSignificantEventsPreview(ctx context.Context, name string, params *PostStreamsNameSignificantEventsPreviewParams, body PostStreamsNameSignificantEventsPreviewJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetStreamsStreamnameAttachmentsWithBody request with any body + GetStreamsStreamnameAttachmentsWithBody(ctx context.Context, streamName string, params *GetStreamsStreamnameAttachmentsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + GetStreamsStreamnameAttachments(ctx context.Context, streamName string, params *GetStreamsStreamnameAttachmentsParams, body GetStreamsStreamnameAttachmentsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostStreamsStreamnameAttachmentsBulkWithBody request with any body + PostStreamsStreamnameAttachmentsBulkWithBody(ctx context.Context, streamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostStreamsStreamnameAttachmentsBulk(ctx context.Context, streamName string, body PostStreamsStreamnameAttachmentsBulkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidWithBody request with any body + DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidWithBody(ctx context.Context, streamName string, attachmentType DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentType, attachmentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentid(ctx context.Context, streamName string, attachmentType DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentType, attachmentId string, body DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidWithBody request with any body + PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidWithBody(ctx context.Context, streamName string, attachmentType PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentType, attachmentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentid(ctx context.Context, streamName string, attachmentType PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentType, attachmentId string, body PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // PostSyntheticsMonitorTest request PostSyntheticsMonitorTest(ctx context.Context, monitorId string, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -78604,7 +78626,7 @@ func (c *Client) RulePreview(ctx context.Context, params *RulePreviewParams, bod return c.Client.Do(req) } -func (c *Client) CreateRuleExceptionListItemsWithBody(ctx context.Context, id SecurityExceptionsAPIRuleId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { +func (c *Client) CreateRuleExceptionListItemsWithBody(ctx context.Context, id SecurityExceptionsAPIUUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewCreateRuleExceptionListItemsRequestWithBody(c.Server, id, contentType, body) if err != nil { return nil, err @@ -78616,7 +78638,7 @@ func (c *Client) CreateRuleExceptionListItemsWithBody(ctx context.Context, id Se return c.Client.Do(req) } -func (c *Client) CreateRuleExceptionListItems(ctx context.Context, id SecurityExceptionsAPIRuleId, body CreateRuleExceptionListItemsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { +func (c *Client) CreateRuleExceptionListItems(ctx context.Context, id SecurityExceptionsAPIUUID, body CreateRuleExceptionListItemsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewCreateRuleExceptionListItemsRequest(c.Server, id, body) if err != nil { return nil, err @@ -84664,6 +84686,102 @@ func (c *Client) PostStreamsNameSignificantEventsPreview(ctx context.Context, na return c.Client.Do(req) } +func (c *Client) GetStreamsStreamnameAttachmentsWithBody(ctx context.Context, streamName string, params *GetStreamsStreamnameAttachmentsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetStreamsStreamnameAttachmentsRequestWithBody(c.Server, streamName, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetStreamsStreamnameAttachments(ctx context.Context, streamName string, params *GetStreamsStreamnameAttachmentsParams, body GetStreamsStreamnameAttachmentsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetStreamsStreamnameAttachmentsRequest(c.Server, streamName, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostStreamsStreamnameAttachmentsBulkWithBody(ctx context.Context, streamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostStreamsStreamnameAttachmentsBulkRequestWithBody(c.Server, streamName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostStreamsStreamnameAttachmentsBulk(ctx context.Context, streamName string, body PostStreamsStreamnameAttachmentsBulkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostStreamsStreamnameAttachmentsBulkRequest(c.Server, streamName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidWithBody(ctx context.Context, streamName string, attachmentType DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentType, attachmentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidRequestWithBody(c.Server, streamName, attachmentType, attachmentId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentid(ctx context.Context, streamName string, attachmentType DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentType, attachmentId string, body DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidRequest(c.Server, streamName, attachmentType, attachmentId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidWithBody(ctx context.Context, streamName string, attachmentType PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentType, attachmentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidRequestWithBody(c.Server, streamName, attachmentType, attachmentId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentid(ctx context.Context, streamName string, attachmentType PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentType, attachmentId string, body PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidRequest(c.Server, streamName, attachmentType, attachmentId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) PostSyntheticsMonitorTest(ctx context.Context, monitorId string, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewPostSyntheticsMonitorTestRequest(c.Server, monitorId) if err != nil { @@ -91824,7 +91942,7 @@ func NewRulePreviewRequestWithBody(server string, params *RulePreviewParams, con } // NewCreateRuleExceptionListItemsRequest calls the generic CreateRuleExceptionListItems builder with application/json body -func NewCreateRuleExceptionListItemsRequest(server string, id SecurityExceptionsAPIRuleId, body CreateRuleExceptionListItemsJSONRequestBody) (*http.Request, error) { +func NewCreateRuleExceptionListItemsRequest(server string, id SecurityExceptionsAPIUUID, body CreateRuleExceptionListItemsJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { @@ -91835,7 +91953,7 @@ func NewCreateRuleExceptionListItemsRequest(server string, id SecurityExceptions } // NewCreateRuleExceptionListItemsRequestWithBody generates requests for CreateRuleExceptionListItems with any type of body -func NewCreateRuleExceptionListItemsRequestWithBody(server string, id SecurityExceptionsAPIRuleId, contentType string, body io.Reader) (*http.Request, error) { +func NewCreateRuleExceptionListItemsRequestWithBody(server string, id SecurityExceptionsAPIUUID, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -110216,6 +110334,244 @@ func NewPostStreamsNameSignificantEventsPreviewRequestWithBody(server string, na return req, nil } +// NewGetStreamsStreamnameAttachmentsRequest calls the generic GetStreamsStreamnameAttachments builder with application/json body +func NewGetStreamsStreamnameAttachmentsRequest(server string, streamName string, params *GetStreamsStreamnameAttachmentsParams, body GetStreamsStreamnameAttachmentsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewGetStreamsStreamnameAttachmentsRequestWithBody(server, streamName, params, "application/json", bodyReader) +} + +// NewGetStreamsStreamnameAttachmentsRequestWithBody generates requests for GetStreamsStreamnameAttachments with any type of body +func NewGetStreamsStreamnameAttachmentsRequestWithBody(server string, streamName string, params *GetStreamsStreamnameAttachmentsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "streamName", runtime.ParamLocationPath, streamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/streams/%s/attachments", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.AttachmentType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "attachmentType", runtime.ParamLocationQuery, *params.AttachmentType); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewPostStreamsStreamnameAttachmentsBulkRequest calls the generic PostStreamsStreamnameAttachmentsBulk builder with application/json body +func NewPostStreamsStreamnameAttachmentsBulkRequest(server string, streamName string, body PostStreamsStreamnameAttachmentsBulkJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostStreamsStreamnameAttachmentsBulkRequestWithBody(server, streamName, "application/json", bodyReader) +} + +// NewPostStreamsStreamnameAttachmentsBulkRequestWithBody generates requests for PostStreamsStreamnameAttachmentsBulk with any type of body +func NewPostStreamsStreamnameAttachmentsBulkRequestWithBody(server string, streamName string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "streamName", runtime.ParamLocationPath, streamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/streams/%s/attachments/_bulk", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidRequest calls the generic DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentid builder with application/json body +func NewDeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidRequest(server string, streamName string, attachmentType DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentType, attachmentId string, body DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewDeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidRequestWithBody(server, streamName, attachmentType, attachmentId, "application/json", bodyReader) +} + +// NewDeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidRequestWithBody generates requests for DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentid with any type of body +func NewDeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidRequestWithBody(server string, streamName string, attachmentType DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentType, attachmentId string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "streamName", runtime.ParamLocationPath, streamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "attachmentType", runtime.ParamLocationPath, attachmentType) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "attachmentId", runtime.ParamLocationPath, attachmentId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/streams/%s/attachments/%s/%s", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewPutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidRequest calls the generic PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentid builder with application/json body +func NewPutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidRequest(server string, streamName string, attachmentType PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentType, attachmentId string, body PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidRequestWithBody(server, streamName, attachmentType, attachmentId, "application/json", bodyReader) +} + +// NewPutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidRequestWithBody generates requests for PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentid with any type of body +func NewPutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidRequestWithBody(server string, streamName string, attachmentType PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentType, attachmentId string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "streamName", runtime.ParamLocationPath, streamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "attachmentType", runtime.ParamLocationPath, attachmentType) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "attachmentId", runtime.ParamLocationPath, attachmentId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/streams/%s/attachments/%s/%s", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewPostSyntheticsMonitorTestRequest generates requests for PostSyntheticsMonitorTest func NewPostSyntheticsMonitorTestRequest(server string, monitorId string) (*http.Request, error) { var err error @@ -114114,9 +114470,9 @@ type ClientWithResponsesInterface interface { RulePreviewWithResponse(ctx context.Context, params *RulePreviewParams, body RulePreviewJSONRequestBody, reqEditors ...RequestEditorFn) (*RulePreviewResponse, error) // CreateRuleExceptionListItemsWithBodyWithResponse request with any body - CreateRuleExceptionListItemsWithBodyWithResponse(ctx context.Context, id SecurityExceptionsAPIRuleId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateRuleExceptionListItemsResponse, error) + CreateRuleExceptionListItemsWithBodyWithResponse(ctx context.Context, id SecurityExceptionsAPIUUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateRuleExceptionListItemsResponse, error) - CreateRuleExceptionListItemsWithResponse(ctx context.Context, id SecurityExceptionsAPIRuleId, body CreateRuleExceptionListItemsJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateRuleExceptionListItemsResponse, error) + CreateRuleExceptionListItemsWithResponse(ctx context.Context, id SecurityExceptionsAPIUUID, body CreateRuleExceptionListItemsJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateRuleExceptionListItemsResponse, error) // SetAlertAssigneesWithBodyWithResponse request with any body SetAlertAssigneesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetAlertAssigneesResponse, error) @@ -115466,6 +115822,26 @@ type ClientWithResponsesInterface interface { PostStreamsNameSignificantEventsPreviewWithResponse(ctx context.Context, name string, params *PostStreamsNameSignificantEventsPreviewParams, body PostStreamsNameSignificantEventsPreviewJSONRequestBody, reqEditors ...RequestEditorFn) (*PostStreamsNameSignificantEventsPreviewResponse, error) + // GetStreamsStreamnameAttachmentsWithBodyWithResponse request with any body + GetStreamsStreamnameAttachmentsWithBodyWithResponse(ctx context.Context, streamName string, params *GetStreamsStreamnameAttachmentsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetStreamsStreamnameAttachmentsResponse, error) + + GetStreamsStreamnameAttachmentsWithResponse(ctx context.Context, streamName string, params *GetStreamsStreamnameAttachmentsParams, body GetStreamsStreamnameAttachmentsJSONRequestBody, reqEditors ...RequestEditorFn) (*GetStreamsStreamnameAttachmentsResponse, error) + + // PostStreamsStreamnameAttachmentsBulkWithBodyWithResponse request with any body + PostStreamsStreamnameAttachmentsBulkWithBodyWithResponse(ctx context.Context, streamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostStreamsStreamnameAttachmentsBulkResponse, error) + + PostStreamsStreamnameAttachmentsBulkWithResponse(ctx context.Context, streamName string, body PostStreamsStreamnameAttachmentsBulkJSONRequestBody, reqEditors ...RequestEditorFn) (*PostStreamsStreamnameAttachmentsBulkResponse, error) + + // DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidWithBodyWithResponse request with any body + DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidWithBodyWithResponse(ctx context.Context, streamName string, attachmentType DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentType, attachmentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidResponse, error) + + DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidWithResponse(ctx context.Context, streamName string, attachmentType DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentType, attachmentId string, body DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidResponse, error) + + // PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidWithBodyWithResponse request with any body + PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidWithBodyWithResponse(ctx context.Context, streamName string, attachmentType PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentType, attachmentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidResponse, error) + + PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidWithResponse(ctx context.Context, streamName string, attachmentType PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentType, attachmentId string, body PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONRequestBody, reqEditors ...RequestEditorFn) (*PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidResponse, error) + // PostSyntheticsMonitorTestWithResponse request PostSyntheticsMonitorTestWithResponse(ctx context.Context, monitorId string, reqEditors ...RequestEditorFn) (*PostSyntheticsMonitorTestResponse, error) @@ -121153,7 +121529,7 @@ func (r CreateEndpointListResponse) StatusCode() int { type DeleteEndpointListItemResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SecurityEndpointExceptionsAPIEndpointListItem + JSON200 *SecurityEndpointExceptionsAPIExceptionListItem JSON400 *struct { union json.RawMessage } @@ -121182,7 +121558,7 @@ func (r DeleteEndpointListItemResponse) StatusCode() int { type ReadEndpointListItemResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *[]SecurityEndpointExceptionsAPIEndpointListItem + JSON200 *[]SecurityEndpointExceptionsAPIExceptionListItem JSON400 *struct { union json.RawMessage } @@ -121211,7 +121587,7 @@ func (r ReadEndpointListItemResponse) StatusCode() int { type CreateEndpointListItemResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SecurityEndpointExceptionsAPIEndpointListItem + JSON200 *SecurityEndpointExceptionsAPIExceptionListItem JSON400 *struct { union json.RawMessage } @@ -121240,7 +121616,7 @@ func (r CreateEndpointListItemResponse) StatusCode() int { type UpdateEndpointListItemResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SecurityEndpointExceptionsAPIEndpointListItem + JSON200 *SecurityEndpointExceptionsAPIExceptionListItem JSON400 *struct { union json.RawMessage } @@ -121270,11 +121646,11 @@ type FindEndpointListItemsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - Data []SecurityEndpointExceptionsAPIEndpointListItem `json:"data"` - Page int `json:"page"` - PerPage int `json:"per_page"` - Pit *string `json:"pit,omitempty"` - Total int `json:"total"` + Data []SecurityEndpointExceptionsAPIExceptionListItem `json:"data"` + Page int `json:"page"` + PerPage int `json:"per_page"` + Pit *string `json:"pit,omitempty"` + Total int `json:"total"` } JSON400 *struct { union json.RawMessage @@ -132973,6 +133349,90 @@ func (r PostStreamsNameSignificantEventsPreviewResponse) StatusCode() int { return 0 } +type GetStreamsStreamnameAttachmentsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r GetStreamsStreamnameAttachmentsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetStreamsStreamnameAttachmentsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostStreamsStreamnameAttachmentsBulkResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PostStreamsStreamnameAttachmentsBulkResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostStreamsStreamnameAttachmentsBulkResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type PostSyntheticsMonitorTestResponse struct { Body []byte HTTPResponse *http.Response @@ -133464,7 +133924,7 @@ func (r GetTimelineResponse) StatusCode() int { type PatchTimelineResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SecurityTimelineAPIPersistTimelineResponse + JSON200 *SecurityTimelineAPITimelineResponse JSON405 *struct { // Body The error message Body *string `json:"body,omitempty"` @@ -133491,7 +133951,7 @@ func (r PatchTimelineResponse) StatusCode() int { type CreateTimelinesResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SecurityTimelineAPIPersistTimelineResponse + JSON200 *SecurityTimelineAPITimelineResponse JSON405 *struct { // Body The error message Body *string `json:"body,omitempty"` @@ -133518,7 +133978,7 @@ func (r CreateTimelinesResponse) StatusCode() int { type CopyTimelineResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SecurityTimelineAPIPersistTimelineResponse + JSON200 *SecurityTimelineAPITimelineResponse } // Status returns HTTPResponse.Status @@ -133540,7 +134000,7 @@ func (r CopyTimelineResponse) StatusCode() int { type GetDraftTimelinesResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SecurityTimelineAPIPersistTimelineResponse + JSON200 *SecurityTimelineAPITimelineResponse JSON403 *struct { Message *string `json:"message,omitempty"` StatusCode *float32 `json:"status_code,omitempty"` @@ -133570,7 +134030,7 @@ func (r GetDraftTimelinesResponse) StatusCode() int { type CleanDraftTimelinesResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SecurityTimelineAPIPersistTimelineResponse + JSON200 *SecurityTimelineAPITimelineResponse JSON403 *struct { Message *string `json:"message,omitempty"` StatusCode *float32 `json:"status_code,omitempty"` @@ -136182,7 +136642,7 @@ func (c *ClientWithResponses) RulePreviewWithResponse(ctx context.Context, param } // CreateRuleExceptionListItemsWithBodyWithResponse request with arbitrary body returning *CreateRuleExceptionListItemsResponse -func (c *ClientWithResponses) CreateRuleExceptionListItemsWithBodyWithResponse(ctx context.Context, id SecurityExceptionsAPIRuleId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateRuleExceptionListItemsResponse, error) { +func (c *ClientWithResponses) CreateRuleExceptionListItemsWithBodyWithResponse(ctx context.Context, id SecurityExceptionsAPIUUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateRuleExceptionListItemsResponse, error) { rsp, err := c.CreateRuleExceptionListItemsWithBody(ctx, id, contentType, body, reqEditors...) if err != nil { return nil, err @@ -136190,7 +136650,7 @@ func (c *ClientWithResponses) CreateRuleExceptionListItemsWithBodyWithResponse(c return ParseCreateRuleExceptionListItemsResponse(rsp) } -func (c *ClientWithResponses) CreateRuleExceptionListItemsWithResponse(ctx context.Context, id SecurityExceptionsAPIRuleId, body CreateRuleExceptionListItemsJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateRuleExceptionListItemsResponse, error) { +func (c *ClientWithResponses) CreateRuleExceptionListItemsWithResponse(ctx context.Context, id SecurityExceptionsAPIUUID, body CreateRuleExceptionListItemsJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateRuleExceptionListItemsResponse, error) { rsp, err := c.CreateRuleExceptionListItems(ctx, id, body, reqEditors...) if err != nil { return nil, err @@ -140564,6 +141024,74 @@ func (c *ClientWithResponses) PostStreamsNameSignificantEventsPreviewWithRespons return ParsePostStreamsNameSignificantEventsPreviewResponse(rsp) } +// GetStreamsStreamnameAttachmentsWithBodyWithResponse request with arbitrary body returning *GetStreamsStreamnameAttachmentsResponse +func (c *ClientWithResponses) GetStreamsStreamnameAttachmentsWithBodyWithResponse(ctx context.Context, streamName string, params *GetStreamsStreamnameAttachmentsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetStreamsStreamnameAttachmentsResponse, error) { + rsp, err := c.GetStreamsStreamnameAttachmentsWithBody(ctx, streamName, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetStreamsStreamnameAttachmentsResponse(rsp) +} + +func (c *ClientWithResponses) GetStreamsStreamnameAttachmentsWithResponse(ctx context.Context, streamName string, params *GetStreamsStreamnameAttachmentsParams, body GetStreamsStreamnameAttachmentsJSONRequestBody, reqEditors ...RequestEditorFn) (*GetStreamsStreamnameAttachmentsResponse, error) { + rsp, err := c.GetStreamsStreamnameAttachments(ctx, streamName, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetStreamsStreamnameAttachmentsResponse(rsp) +} + +// PostStreamsStreamnameAttachmentsBulkWithBodyWithResponse request with arbitrary body returning *PostStreamsStreamnameAttachmentsBulkResponse +func (c *ClientWithResponses) PostStreamsStreamnameAttachmentsBulkWithBodyWithResponse(ctx context.Context, streamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostStreamsStreamnameAttachmentsBulkResponse, error) { + rsp, err := c.PostStreamsStreamnameAttachmentsBulkWithBody(ctx, streamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostStreamsStreamnameAttachmentsBulkResponse(rsp) +} + +func (c *ClientWithResponses) PostStreamsStreamnameAttachmentsBulkWithResponse(ctx context.Context, streamName string, body PostStreamsStreamnameAttachmentsBulkJSONRequestBody, reqEditors ...RequestEditorFn) (*PostStreamsStreamnameAttachmentsBulkResponse, error) { + rsp, err := c.PostStreamsStreamnameAttachmentsBulk(ctx, streamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostStreamsStreamnameAttachmentsBulkResponse(rsp) +} + +// DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidWithBodyWithResponse request with arbitrary body returning *DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidResponse +func (c *ClientWithResponses) DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidWithBodyWithResponse(ctx context.Context, streamName string, attachmentType DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentType, attachmentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidResponse, error) { + rsp, err := c.DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidWithBody(ctx, streamName, attachmentType, attachmentId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidResponse(rsp) +} + +func (c *ClientWithResponses) DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidWithResponse(ctx context.Context, streamName string, attachmentType DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentType, attachmentId string, body DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidResponse, error) { + rsp, err := c.DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentid(ctx, streamName, attachmentType, attachmentId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidResponse(rsp) +} + +// PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidWithBodyWithResponse request with arbitrary body returning *PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidResponse +func (c *ClientWithResponses) PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidWithBodyWithResponse(ctx context.Context, streamName string, attachmentType PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentType, attachmentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidResponse, error) { + rsp, err := c.PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidWithBody(ctx, streamName, attachmentType, attachmentId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidResponse(rsp) +} + +func (c *ClientWithResponses) PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidWithResponse(ctx context.Context, streamName string, attachmentType PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidParamsAttachmentType, attachmentId string, body PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidJSONRequestBody, reqEditors ...RequestEditorFn) (*PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidResponse, error) { + rsp, err := c.PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentid(ctx, streamName, attachmentType, attachmentId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidResponse(rsp) +} + // PostSyntheticsMonitorTestWithResponse request returning *PostSyntheticsMonitorTestResponse func (c *ClientWithResponses) PostSyntheticsMonitorTestWithResponse(ctx context.Context, monitorId string, reqEditors ...RequestEditorFn) (*PostSyntheticsMonitorTestResponse, error) { rsp, err := c.PostSyntheticsMonitorTest(ctx, monitorId, reqEditors...) @@ -147884,7 +148412,7 @@ func ParseDeleteEndpointListItemResponse(rsp *http.Response) (*DeleteEndpointLis switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SecurityEndpointExceptionsAPIEndpointListItem + var dest SecurityEndpointExceptionsAPIExceptionListItem if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -147947,7 +148475,7 @@ func ParseReadEndpointListItemResponse(rsp *http.Response) (*ReadEndpointListIte switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest []SecurityEndpointExceptionsAPIEndpointListItem + var dest []SecurityEndpointExceptionsAPIExceptionListItem if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -148010,7 +148538,7 @@ func ParseCreateEndpointListItemResponse(rsp *http.Response) (*CreateEndpointLis switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SecurityEndpointExceptionsAPIEndpointListItem + var dest SecurityEndpointExceptionsAPIExceptionListItem if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -148073,7 +148601,7 @@ func ParseUpdateEndpointListItemResponse(rsp *http.Response) (*UpdateEndpointLis switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SecurityEndpointExceptionsAPIEndpointListItem + var dest SecurityEndpointExceptionsAPIExceptionListItem if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -148137,11 +148665,11 @@ func ParseFindEndpointListItemsResponse(rsp *http.Response) (*FindEndpointListIt switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Data []SecurityEndpointExceptionsAPIEndpointListItem `json:"data"` - Page int `json:"page"` - PerPage int `json:"per_page"` - Pit *string `json:"pit,omitempty"` - Total int `json:"total"` + Data []SecurityEndpointExceptionsAPIExceptionListItem `json:"data"` + Page int `json:"page"` + PerPage int `json:"per_page"` + Pit *string `json:"pit,omitempty"` + Total int `json:"total"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -160894,6 +161422,70 @@ func ParsePostStreamsNameSignificantEventsPreviewResponse(rsp *http.Response) (* return response, nil } +// ParseGetStreamsStreamnameAttachmentsResponse parses an HTTP response from a GetStreamsStreamnameAttachmentsWithResponse call +func ParseGetStreamsStreamnameAttachmentsResponse(rsp *http.Response) (*GetStreamsStreamnameAttachmentsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetStreamsStreamnameAttachmentsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePostStreamsStreamnameAttachmentsBulkResponse parses an HTTP response from a PostStreamsStreamnameAttachmentsBulkWithResponse call +func ParsePostStreamsStreamnameAttachmentsBulkResponse(rsp *http.Response) (*PostStreamsStreamnameAttachmentsBulkResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostStreamsStreamnameAttachmentsBulkResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseDeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidResponse parses an HTTP response from a DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidWithResponse call +func ParseDeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidResponse(rsp *http.Response) (*DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteStreamsStreamnameAttachmentsAttachmenttypeAttachmentidResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParsePutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidResponse parses an HTTP response from a PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidWithResponse call +func ParsePutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidResponse(rsp *http.Response) (*PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PutStreamsStreamnameAttachmentsAttachmenttypeAttachmentidResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + // ParsePostSyntheticsMonitorTestResponse parses an HTTP response from a PostSyntheticsMonitorTestWithResponse call func ParsePostSyntheticsMonitorTestResponse(rsp *http.Response) (*PostSyntheticsMonitorTestResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -161427,7 +162019,7 @@ func ParsePatchTimelineResponse(rsp *http.Response) (*PatchTimelineResponse, err switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SecurityTimelineAPIPersistTimelineResponse + var dest SecurityTimelineAPITimelineResponse if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -161464,7 +162056,7 @@ func ParseCreateTimelinesResponse(rsp *http.Response) (*CreateTimelinesResponse, switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SecurityTimelineAPIPersistTimelineResponse + var dest SecurityTimelineAPITimelineResponse if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -161501,7 +162093,7 @@ func ParseCopyTimelineResponse(rsp *http.Response) (*CopyTimelineResponse, error switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SecurityTimelineAPIPersistTimelineResponse + var dest SecurityTimelineAPITimelineResponse if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -161527,7 +162119,7 @@ func ParseGetDraftTimelinesResponse(rsp *http.Response) (*GetDraftTimelinesRespo switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SecurityTimelineAPIPersistTimelineResponse + var dest SecurityTimelineAPITimelineResponse if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -161573,7 +162165,7 @@ func ParseCleanDraftTimelinesResponse(rsp *http.Response) (*CleanDraftTimelinesR switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SecurityTimelineAPIPersistTimelineResponse + var dest SecurityTimelineAPITimelineResponse if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } diff --git a/generated/kbapi/transform_schema.go b/generated/kbapi/transform_schema.go index a377cfe9b..e7ee4fff8 100644 --- a/generated/kbapi/transform_schema.go +++ b/generated/kbapi/transform_schema.go @@ -881,6 +881,7 @@ func removeBrokenDiscriminator(schema *Schema) { "Security_Detections_API_RuleSource", "Security_Endpoint_Exceptions_API_ExceptionListItemEntry", "Security_Exceptions_API_ExceptionListItemEntry", + "Security_Endpoint_Management_API_ActionDetailsResponse", } for _, component := range brokenDiscriminatorComponents { From 73286d2f701830821ff958666fd11ca6304a83d3 Mon Sep 17 00:00:00 2001 From: Toby Brain Date: Wed, 26 Nov 2025 11:41:41 +1100 Subject: [PATCH 3/4] Fix build --- generated/kbapi/kibana.gen.go | 26 -- generated/kbapi/transform_schema.go | 45 +++ generated/kbapi/transform_schema_test.go | 345 ++++++++++++++++++ .../security_detection_rule/acc_test.go | 2 +- .../kibana/security_detection_rule/delete.go | 2 +- .../security_detection_rule/models_eql.go | 2 +- .../security_detection_rule/models_esql.go | 2 +- .../models_machine_learning.go | 2 +- .../models_new_terms.go | 2 +- .../security_detection_rule/models_query.go | 2 +- .../models_saved_query.go | 2 +- .../models_threat_match.go | 2 +- .../models_threshold.go | 2 +- .../kibana/security_detection_rule/read.go | 2 +- 14 files changed, 401 insertions(+), 37 deletions(-) create mode 100644 generated/kbapi/transform_schema_test.go diff --git a/generated/kbapi/kibana.gen.go b/generated/kbapi/kibana.gen.go index f6cbf6079..29df3268d 100644 --- a/generated/kbapi/kibana.gen.go +++ b/generated/kbapi/kibana.gen.go @@ -64981,32 +64981,6 @@ func (t *SecurityEndpointManagementAPIActionDetailsResponse) MergeSecurityEndpoi return err } -// AsSecurityEndpointManagementAPIResponseActionDetails returns the union data inside the SecurityEndpointManagementAPIActionDetailsResponse as a SecurityEndpointManagementAPIResponseActionDetails -func (t SecurityEndpointManagementAPIActionDetailsResponse) AsSecurityEndpointManagementAPIResponseActionDetails() (SecurityEndpointManagementAPIResponseActionDetails, error) { - var body SecurityEndpointManagementAPIResponseActionDetails - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromSecurityEndpointManagementAPIResponseActionDetails overwrites any union data inside the SecurityEndpointManagementAPIActionDetailsResponse as the provided SecurityEndpointManagementAPIResponseActionDetails -func (t *SecurityEndpointManagementAPIActionDetailsResponse) FromSecurityEndpointManagementAPIResponseActionDetails(v SecurityEndpointManagementAPIResponseActionDetails) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeSecurityEndpointManagementAPIResponseActionDetails performs a merge with any union data inside the SecurityEndpointManagementAPIActionDetailsResponse, using the provided SecurityEndpointManagementAPIResponseActionDetails -func (t *SecurityEndpointManagementAPIActionDetailsResponse) MergeSecurityEndpointManagementAPIResponseActionDetails(v SecurityEndpointManagementAPIResponseActionDetails) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - // AsSecurityEndpointManagementAPISuspendProcess returns the union data inside the SecurityEndpointManagementAPIActionDetailsResponse as a SecurityEndpointManagementAPISuspendProcess func (t SecurityEndpointManagementAPIActionDetailsResponse) AsSecurityEndpointManagementAPISuspendProcess() (SecurityEndpointManagementAPISuspendProcess, error) { var body SecurityEndpointManagementAPISuspendProcess diff --git a/generated/kbapi/transform_schema.go b/generated/kbapi/transform_schema.go index e7ee4fff8..134c512fd 100644 --- a/generated/kbapi/transform_schema.go +++ b/generated/kbapi/transform_schema.go @@ -567,6 +567,7 @@ var transformers = []TransformFunc{ fixGetSpacesParams, fixGetSyntheticsMonitorsParams, fixGetMaintenanceWindowFindParams, + removeDuplicateOneOfRefs, transformRemoveExamples, transformRemoveUnusedComponents, transformOmitEmptyNullable, @@ -916,6 +917,50 @@ func fixGetMaintenanceWindowFindParams(schema *Schema) { schema.MustGetPath("/api/maintenance_window/_find").MustGetEndpoint("get").Move("parameters.2.schema.anyOf.1", "parameters.2.schema") } +func removeDuplicateOneOfRefs(schema *Schema) { + componentSchemas := schema.Components.MustGetMap("schemas") + componentSchemas.Iterate(removeDuplicateOneOfRefsFromNode) +} + +// https://github.com/elastic/kibana/issues/244264 +func removeDuplicateOneOfRefsFromNode(key string, node Map) { + maybeOneOf, hasOneOf := node.GetSlice("oneOf") + if hasOneOf { + // Check for duplicate $ref entries + seenRefs := map[string]bool{} + newOneOf := Slice{} + for _, item := range maybeOneOf { + itemMap, ok := item.(Map) + if !ok { + newOneOf = append(newOneOf, item) + continue + } + refValue, hasRef := itemMap["$ref"] + if hasRef { + refStr, ok := refValue.(string) + if !ok { + newOneOf = append(newOneOf, item) + continue + } + if _, seen := seenRefs[refStr]; seen { + // Duplicate found, skip it + continue + } + seenRefs[refStr] = true + } + newOneOf = append(newOneOf, item) + } + node["oneOf"] = newOneOf + } + + properties, hasProperties := node.GetMap("properties") + if !hasProperties { + return + } + + properties.Iterate(removeDuplicateOneOfRefsFromNode) +} + // transformFleetPaths fixes the fleet paths. func transformFleetPaths(schema *Schema) { // Agent policies diff --git a/generated/kbapi/transform_schema_test.go b/generated/kbapi/transform_schema_test.go new file mode 100644 index 000000000..6bafe491b --- /dev/null +++ b/generated/kbapi/transform_schema_test.go @@ -0,0 +1,345 @@ +//go:build ignore +// +build ignore + +package main + +import ( + "reflect" + "testing" +) + +func TestRemoveDuplicateOneOfRefsFromNode(t *testing.T) { + tests := []struct { + name string + input Map + expected Map + }{ + { + name: "no oneOf field", + input: Map{ + "type": "object", + "properties": Map{ + "field1": Map{"type": "string"}, + }, + }, + expected: Map{ + "type": "object", + "properties": Map{ + "field1": Map{"type": "string"}, + }, + }, + }, + { + name: "oneOf with no duplicates", + input: Map{ + "oneOf": Slice{ + Map{"$ref": "#/components/schemas/Schema1"}, + Map{"$ref": "#/components/schemas/Schema2"}, + Map{"$ref": "#/components/schemas/Schema3"}, + }, + }, + expected: Map{ + "oneOf": Slice{ + Map{"$ref": "#/components/schemas/Schema1"}, + Map{"$ref": "#/components/schemas/Schema2"}, + Map{"$ref": "#/components/schemas/Schema3"}, + }, + }, + }, + { + name: "oneOf with duplicate refs", + input: Map{ + "oneOf": Slice{ + Map{"$ref": "#/components/schemas/Schema1"}, + Map{"$ref": "#/components/schemas/Schema2"}, + Map{"$ref": "#/components/schemas/Schema1"}, + Map{"$ref": "#/components/schemas/Schema3"}, + Map{"$ref": "#/components/schemas/Schema2"}, + }, + }, + expected: Map{ + "oneOf": Slice{ + Map{"$ref": "#/components/schemas/Schema1"}, + Map{"$ref": "#/components/schemas/Schema2"}, + Map{"$ref": "#/components/schemas/Schema3"}, + }, + }, + }, + { + name: "oneOf with all duplicates", + input: Map{ + "oneOf": Slice{ + Map{"$ref": "#/components/schemas/Schema1"}, + Map{"$ref": "#/components/schemas/Schema1"}, + Map{"$ref": "#/components/schemas/Schema1"}, + }, + }, + expected: Map{ + "oneOf": Slice{ + Map{"$ref": "#/components/schemas/Schema1"}, + }, + }, + }, + { + name: "oneOf with non-ref items", + input: Map{ + "oneOf": Slice{ + Map{"type": "string"}, + Map{"$ref": "#/components/schemas/Schema1"}, + Map{"type": "number"}, + Map{"$ref": "#/components/schemas/Schema1"}, + }, + }, + expected: Map{ + "oneOf": Slice{ + Map{"type": "string"}, + Map{"$ref": "#/components/schemas/Schema1"}, + Map{"type": "number"}, + }, + }, + }, + { + name: "oneOf with mixed items including duplicates", + input: Map{ + "oneOf": Slice{ + Map{"$ref": "#/components/schemas/Schema1"}, + Map{"type": "string"}, + Map{"$ref": "#/components/schemas/Schema2"}, + Map{"type": "number"}, + Map{"$ref": "#/components/schemas/Schema1"}, + Map{"$ref": "#/components/schemas/Schema3"}, + }, + }, + expected: Map{ + "oneOf": Slice{ + Map{"$ref": "#/components/schemas/Schema1"}, + Map{"type": "string"}, + Map{"$ref": "#/components/schemas/Schema2"}, + Map{"type": "number"}, + Map{"$ref": "#/components/schemas/Schema3"}, + }, + }, + }, + { + name: "oneOf with non-string ref value", + input: Map{ + "oneOf": Slice{ + Map{"$ref": 123}, + Map{"$ref": "#/components/schemas/Schema1"}, + }, + }, + expected: Map{ + "oneOf": Slice{ + Map{"$ref": 123}, + Map{"$ref": "#/components/schemas/Schema1"}, + }, + }, + }, + { + name: "oneOf with non-map items", + input: Map{ + "oneOf": Slice{ + "string-item", + Map{"$ref": "#/components/schemas/Schema1"}, + 42, + }, + }, + expected: Map{ + "oneOf": Slice{ + "string-item", + Map{"$ref": "#/components/schemas/Schema1"}, + 42, + }, + }, + }, + { + name: "nested properties with oneOf and duplicates", + input: Map{ + "type": "object", + "properties": Map{ + "field1": Map{ + "oneOf": Slice{ + Map{"$ref": "#/components/schemas/Schema1"}, + Map{"$ref": "#/components/schemas/Schema1"}, + }, + }, + "field2": Map{ + "type": "string", + }, + }, + }, + expected: Map{ + "type": "object", + "properties": Map{ + "field1": Map{ + "oneOf": Slice{ + Map{"$ref": "#/components/schemas/Schema1"}, + }, + }, + "field2": Map{ + "type": "string", + }, + }, + }, + }, + { + name: "deeply nested properties with duplicates", + input: Map{ + "type": "object", + "properties": Map{ + "level1": Map{ + "type": "object", + "properties": Map{ + "level2": Map{ + "oneOf": Slice{ + Map{"$ref": "#/components/schemas/Schema1"}, + Map{"$ref": "#/components/schemas/Schema2"}, + Map{"$ref": "#/components/schemas/Schema1"}, + }, + }, + }, + }, + }, + }, + expected: Map{ + "type": "object", + "properties": Map{ + "level1": Map{ + "type": "object", + "properties": Map{ + "level2": Map{ + "oneOf": Slice{ + Map{"$ref": "#/components/schemas/Schema1"}, + Map{"$ref": "#/components/schemas/Schema2"}, + }, + }, + }, + }, + }, + }, + }, + { + name: "empty oneOf slice", + input: Map{ + "oneOf": Slice{}, + }, + expected: Map{ + "oneOf": Slice{}, + }, + }, + { + name: "properties without oneOf", + input: Map{ + "type": "object", + "properties": Map{ + "field1": Map{"type": "string"}, + "field2": Map{"type": "number"}, + }, + }, + expected: Map{ + "type": "object", + "properties": Map{ + "field1": Map{"type": "string"}, + "field2": Map{"type": "number"}, + }, + }, + }, + { + name: "multiple levels with multiple oneOf duplicates", + input: Map{ + "oneOf": Slice{ + Map{"$ref": "#/components/schemas/Schema1"}, + Map{"$ref": "#/components/schemas/Schema1"}, + }, + "properties": Map{ + "prop1": Map{ + "oneOf": Slice{ + Map{"$ref": "#/components/schemas/Schema2"}, + Map{"$ref": "#/components/schemas/Schema3"}, + Map{"$ref": "#/components/schemas/Schema2"}, + }, + }, + "prop2": Map{ + "properties": Map{ + "nested": Map{ + "oneOf": Slice{ + Map{"$ref": "#/components/schemas/Schema4"}, + Map{"$ref": "#/components/schemas/Schema4"}, + Map{"$ref": "#/components/schemas/Schema4"}, + }, + }, + }, + }, + }, + }, + expected: Map{ + "oneOf": Slice{ + Map{"$ref": "#/components/schemas/Schema1"}, + }, + "properties": Map{ + "prop1": Map{ + "oneOf": Slice{ + Map{"$ref": "#/components/schemas/Schema2"}, + Map{"$ref": "#/components/schemas/Schema3"}, + }, + }, + "prop2": Map{ + "properties": Map{ + "nested": Map{ + "oneOf": Slice{ + Map{"$ref": "#/components/schemas/Schema4"}, + }, + }, + }, + }, + }, + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + // Make a deep copy of input to ensure function modifies in place + inputCopy := deepCopyMap(tt.input) + + removeDuplicateOneOfRefsFromNode("", inputCopy) + + if !reflect.DeepEqual(inputCopy, tt.expected) { + t.Errorf("removeDuplicateOneOfRefsFromNode() =\n%+v\nwant:\n%+v", inputCopy, tt.expected) + } + }) + } +} + +// deepCopyMap creates a deep copy of a Map for testing purposes +func deepCopyMap(m Map) Map { + result := make(Map) + for k, v := range m { + result[k] = deepCopyValue(v) + } + return result +} + +func deepCopyValue(v any) any { + switch val := v.(type) { + case Map: + return deepCopyMap(val) + case map[string]any: + return deepCopyMap(Map(val)) + case Slice: + result := make(Slice, len(val)) + for i, item := range val { + result[i] = deepCopyValue(item) + } + return result + case []any: + result := make(Slice, len(val)) + for i, item := range val { + result[i] = deepCopyValue(item) + } + return result + default: + // For primitive types, return as-is + return v + } +} diff --git a/internal/kibana/security_detection_rule/acc_test.go b/internal/kibana/security_detection_rule/acc_test.go index 2e8515e35..44a12fb8a 100644 --- a/internal/kibana/security_detection_rule/acc_test.go +++ b/internal/kibana/security_detection_rule/acc_test.go @@ -1368,7 +1368,7 @@ func testAccCheckSecurityDetectionRuleDestroy(s *terraform.State) error { ruleId := parts[1] // Check if the rule still exists - ruleObjectId := kbapi.SecurityDetectionsAPIRuleObjectId(uuid.MustParse(ruleId)) + ruleObjectId := kbapi.SecurityDetectionsAPIUUID(uuid.MustParse(ruleId)) params := &kbapi.ReadRuleParams{ Id: &ruleObjectId, } diff --git a/internal/kibana/security_detection_rule/delete.go b/internal/kibana/security_detection_rule/delete.go index 2143a0676..2a2a5e303 100644 --- a/internal/kibana/security_detection_rule/delete.go +++ b/internal/kibana/security_detection_rule/delete.go @@ -41,7 +41,7 @@ func (r *securityDetectionRuleResource) Delete(ctx context.Context, req resource resp.Diagnostics.AddError("ID was not a valid UUID", err.Error()) return } - ruleObjectId := kbapi.SecurityDetectionsAPIRuleObjectId(uid) + ruleObjectId := kbapi.SecurityDetectionsAPIUUID(uid) params := &kbapi.DeleteRuleParams{ Id: &ruleObjectId, } diff --git a/internal/kibana/security_detection_rule/models_eql.go b/internal/kibana/security_detection_rule/models_eql.go index 795a9fe85..ab11f66b5 100644 --- a/internal/kibana/security_detection_rule/models_eql.go +++ b/internal/kibana/security_detection_rule/models_eql.go @@ -138,7 +138,7 @@ func toEqlRuleUpdateProps(ctx context.Context, client clients.MinVersionEnforcea diags.AddError("ID was not a valid UUID", err.Error()) return updateProps, diags } - var id = kbapi.SecurityDetectionsAPIRuleObjectId(uid) + var id = kbapi.SecurityDetectionsAPIUUID(uid) eqlRule := kbapi.SecurityDetectionsAPIEqlRuleUpdateProps{ Id: &id, diff --git a/internal/kibana/security_detection_rule/models_esql.go b/internal/kibana/security_detection_rule/models_esql.go index aa51a7997..4249e5396 100644 --- a/internal/kibana/security_detection_rule/models_esql.go +++ b/internal/kibana/security_detection_rule/models_esql.go @@ -136,7 +136,7 @@ func (d SecurityDetectionRuleData) toEsqlRuleUpdateProps(ctx context.Context, cl diags.AddError("ID was not a valid UUID", err.Error()) return updateProps, diags } - var id = kbapi.SecurityDetectionsAPIRuleObjectId(uid) + var id = kbapi.SecurityDetectionsAPIUUID(uid) esqlRule := kbapi.SecurityDetectionsAPIEsqlRuleUpdateProps{ Id: &id, diff --git a/internal/kibana/security_detection_rule/models_machine_learning.go b/internal/kibana/security_detection_rule/models_machine_learning.go index 7b3cf5c21..041bb17d7 100644 --- a/internal/kibana/security_detection_rule/models_machine_learning.go +++ b/internal/kibana/security_detection_rule/models_machine_learning.go @@ -149,7 +149,7 @@ func (d SecurityDetectionRuleData) toMachineLearningRuleUpdateProps(ctx context. diags.AddError("ID was not a valid UUID", err.Error()) return updateProps, diags } - var id = kbapi.SecurityDetectionsAPIRuleObjectId(uid) + var id = kbapi.SecurityDetectionsAPIUUID(uid) mlRule := kbapi.SecurityDetectionsAPIMachineLearningRuleUpdateProps{ Id: &id, diff --git a/internal/kibana/security_detection_rule/models_new_terms.go b/internal/kibana/security_detection_rule/models_new_terms.go index 989d07136..d619795a3 100644 --- a/internal/kibana/security_detection_rule/models_new_terms.go +++ b/internal/kibana/security_detection_rule/models_new_terms.go @@ -145,7 +145,7 @@ func (d SecurityDetectionRuleData) toNewTermsRuleUpdateProps(ctx context.Context diags.AddError("ID was not a valid UUID", err.Error()) return updateProps, diags } - var id = kbapi.SecurityDetectionsAPIRuleObjectId(uid) + var id = kbapi.SecurityDetectionsAPIUUID(uid) newTermsRule := kbapi.SecurityDetectionsAPINewTermsRuleUpdateProps{ Id: &id, diff --git a/internal/kibana/security_detection_rule/models_query.go b/internal/kibana/security_detection_rule/models_query.go index d5c4235d8..a056e3a6b 100644 --- a/internal/kibana/security_detection_rule/models_query.go +++ b/internal/kibana/security_detection_rule/models_query.go @@ -143,7 +143,7 @@ func toQueryRuleUpdateProps(ctx context.Context, client clients.MinVersionEnforc diags.AddError("ID was not a valid UUID", err.Error()) return updateProps, diags } - var id = kbapi.SecurityDetectionsAPIRuleObjectId(uid) + var id = kbapi.SecurityDetectionsAPIUUID(uid) queryRule := kbapi.SecurityDetectionsAPIQueryRuleUpdateProps{ Id: &id, diff --git a/internal/kibana/security_detection_rule/models_saved_query.go b/internal/kibana/security_detection_rule/models_saved_query.go index 2e703312c..d71feccaa 100644 --- a/internal/kibana/security_detection_rule/models_saved_query.go +++ b/internal/kibana/security_detection_rule/models_saved_query.go @@ -140,7 +140,7 @@ func (d SecurityDetectionRuleData) toSavedQueryRuleUpdateProps(ctx context.Conte diags.AddError("ID was not a valid UUID", err.Error()) return updateProps, diags } - var id = kbapi.SecurityDetectionsAPIRuleObjectId(uid) + var id = kbapi.SecurityDetectionsAPIUUID(uid) savedQueryRule := kbapi.SecurityDetectionsAPISavedQueryRuleUpdateProps{ Id: &id, diff --git a/internal/kibana/security_detection_rule/models_threat_match.go b/internal/kibana/security_detection_rule/models_threat_match.go index 911bfe43d..c75c39659 100644 --- a/internal/kibana/security_detection_rule/models_threat_match.go +++ b/internal/kibana/security_detection_rule/models_threat_match.go @@ -177,7 +177,7 @@ func (d SecurityDetectionRuleData) toThreatMatchRuleUpdateProps(ctx context.Cont diags.AddError("ID was not a valid UUID", err.Error()) return updateProps, diags } - var id = kbapi.SecurityDetectionsAPIRuleObjectId(uid) + var id = kbapi.SecurityDetectionsAPIUUID(uid) threatMatchRule := kbapi.SecurityDetectionsAPIThreatMatchRuleUpdateProps{ Id: &id, diff --git a/internal/kibana/security_detection_rule/models_threshold.go b/internal/kibana/security_detection_rule/models_threshold.go index df74d5641..64711261d 100644 --- a/internal/kibana/security_detection_rule/models_threshold.go +++ b/internal/kibana/security_detection_rule/models_threshold.go @@ -153,7 +153,7 @@ func (d SecurityDetectionRuleData) toThresholdRuleUpdateProps(ctx context.Contex diags.AddError("ID was not a valid UUID", err.Error()) return updateProps, diags } - var id = kbapi.SecurityDetectionsAPIRuleObjectId(uid) + var id = kbapi.SecurityDetectionsAPIUUID(uid) thresholdRule := kbapi.SecurityDetectionsAPIThresholdRuleUpdateProps{ Id: &id, diff --git a/internal/kibana/security_detection_rule/read.go b/internal/kibana/security_detection_rule/read.go index 5894dc7e7..43e00c739 100644 --- a/internal/kibana/security_detection_rule/read.go +++ b/internal/kibana/security_detection_rule/read.go @@ -69,7 +69,7 @@ func (r *securityDetectionRuleResource) read(ctx context.Context, resourceId, sp diags.AddError("ID was not a valid UUID", err.Error()) return nil, diags } - ruleObjectId := kbapi.SecurityDetectionsAPIRuleObjectId(uid) + ruleObjectId := kbapi.SecurityDetectionsAPIUUID(uid) params := &kbapi.ReadRuleParams{ Id: &ruleObjectId, } From 14ce41cb2e01b763a4bf4ac98f9e3203724c5038 Mon Sep 17 00:00:00 2001 From: Toby Brain Date: Wed, 26 Nov 2025 11:45:00 +1100 Subject: [PATCH 4/4] Remove unnecessary cast --- internal/kibana/security_detection_rule/acc_test.go | 2 +- internal/kibana/security_detection_rule/delete.go | 3 +-- internal/kibana/security_detection_rule/models_eql.go | 3 +-- internal/kibana/security_detection_rule/models_esql.go | 3 +-- .../kibana/security_detection_rule/models_machine_learning.go | 3 +-- internal/kibana/security_detection_rule/models_new_terms.go | 3 +-- internal/kibana/security_detection_rule/models_query.go | 3 +-- internal/kibana/security_detection_rule/models_saved_query.go | 3 +-- internal/kibana/security_detection_rule/models_threat_match.go | 3 +-- internal/kibana/security_detection_rule/models_threshold.go | 3 +-- internal/kibana/security_detection_rule/read.go | 3 +-- 11 files changed, 11 insertions(+), 21 deletions(-) diff --git a/internal/kibana/security_detection_rule/acc_test.go b/internal/kibana/security_detection_rule/acc_test.go index 44a12fb8a..41bb5fb27 100644 --- a/internal/kibana/security_detection_rule/acc_test.go +++ b/internal/kibana/security_detection_rule/acc_test.go @@ -1368,7 +1368,7 @@ func testAccCheckSecurityDetectionRuleDestroy(s *terraform.State) error { ruleId := parts[1] // Check if the rule still exists - ruleObjectId := kbapi.SecurityDetectionsAPIUUID(uuid.MustParse(ruleId)) + ruleObjectId := uuid.MustParse(ruleId) params := &kbapi.ReadRuleParams{ Id: &ruleObjectId, } diff --git a/internal/kibana/security_detection_rule/delete.go b/internal/kibana/security_detection_rule/delete.go index 2a2a5e303..aa72842c2 100644 --- a/internal/kibana/security_detection_rule/delete.go +++ b/internal/kibana/security_detection_rule/delete.go @@ -41,9 +41,8 @@ func (r *securityDetectionRuleResource) Delete(ctx context.Context, req resource resp.Diagnostics.AddError("ID was not a valid UUID", err.Error()) return } - ruleObjectId := kbapi.SecurityDetectionsAPIUUID(uid) params := &kbapi.DeleteRuleParams{ - Id: &ruleObjectId, + Id: &uid, } response, err := kbClient.API.DeleteRuleWithResponse(ctx, data.SpaceId.ValueString(), params) diff --git a/internal/kibana/security_detection_rule/models_eql.go b/internal/kibana/security_detection_rule/models_eql.go index ab11f66b5..79cef9859 100644 --- a/internal/kibana/security_detection_rule/models_eql.go +++ b/internal/kibana/security_detection_rule/models_eql.go @@ -138,10 +138,9 @@ func toEqlRuleUpdateProps(ctx context.Context, client clients.MinVersionEnforcea diags.AddError("ID was not a valid UUID", err.Error()) return updateProps, diags } - var id = kbapi.SecurityDetectionsAPIUUID(uid) eqlRule := kbapi.SecurityDetectionsAPIEqlRuleUpdateProps{ - Id: &id, + Id: &uid, Name: kbapi.SecurityDetectionsAPIRuleName(d.Name.ValueString()), Description: kbapi.SecurityDetectionsAPIRuleDescription(d.Description.ValueString()), Type: kbapi.SecurityDetectionsAPIEqlRuleUpdatePropsType("eql"), diff --git a/internal/kibana/security_detection_rule/models_esql.go b/internal/kibana/security_detection_rule/models_esql.go index 4249e5396..d6e4ab6d7 100644 --- a/internal/kibana/security_detection_rule/models_esql.go +++ b/internal/kibana/security_detection_rule/models_esql.go @@ -136,10 +136,9 @@ func (d SecurityDetectionRuleData) toEsqlRuleUpdateProps(ctx context.Context, cl diags.AddError("ID was not a valid UUID", err.Error()) return updateProps, diags } - var id = kbapi.SecurityDetectionsAPIUUID(uid) esqlRule := kbapi.SecurityDetectionsAPIEsqlRuleUpdateProps{ - Id: &id, + Id: &uid, Name: kbapi.SecurityDetectionsAPIRuleName(d.Name.ValueString()), Description: kbapi.SecurityDetectionsAPIRuleDescription(d.Description.ValueString()), Type: kbapi.SecurityDetectionsAPIEsqlRuleUpdatePropsType("esql"), diff --git a/internal/kibana/security_detection_rule/models_machine_learning.go b/internal/kibana/security_detection_rule/models_machine_learning.go index 041bb17d7..d770c9082 100644 --- a/internal/kibana/security_detection_rule/models_machine_learning.go +++ b/internal/kibana/security_detection_rule/models_machine_learning.go @@ -149,10 +149,9 @@ func (d SecurityDetectionRuleData) toMachineLearningRuleUpdateProps(ctx context. diags.AddError("ID was not a valid UUID", err.Error()) return updateProps, diags } - var id = kbapi.SecurityDetectionsAPIUUID(uid) mlRule := kbapi.SecurityDetectionsAPIMachineLearningRuleUpdateProps{ - Id: &id, + Id: &uid, Name: kbapi.SecurityDetectionsAPIRuleName(d.Name.ValueString()), Description: kbapi.SecurityDetectionsAPIRuleDescription(d.Description.ValueString()), Type: kbapi.SecurityDetectionsAPIMachineLearningRuleUpdatePropsType("machine_learning"), diff --git a/internal/kibana/security_detection_rule/models_new_terms.go b/internal/kibana/security_detection_rule/models_new_terms.go index d619795a3..805beecf6 100644 --- a/internal/kibana/security_detection_rule/models_new_terms.go +++ b/internal/kibana/security_detection_rule/models_new_terms.go @@ -145,10 +145,9 @@ func (d SecurityDetectionRuleData) toNewTermsRuleUpdateProps(ctx context.Context diags.AddError("ID was not a valid UUID", err.Error()) return updateProps, diags } - var id = kbapi.SecurityDetectionsAPIUUID(uid) newTermsRule := kbapi.SecurityDetectionsAPINewTermsRuleUpdateProps{ - Id: &id, + Id: &uid, Name: kbapi.SecurityDetectionsAPIRuleName(d.Name.ValueString()), Description: kbapi.SecurityDetectionsAPIRuleDescription(d.Description.ValueString()), Type: kbapi.SecurityDetectionsAPINewTermsRuleUpdatePropsType("new_terms"), diff --git a/internal/kibana/security_detection_rule/models_query.go b/internal/kibana/security_detection_rule/models_query.go index a056e3a6b..8ab40cb0e 100644 --- a/internal/kibana/security_detection_rule/models_query.go +++ b/internal/kibana/security_detection_rule/models_query.go @@ -143,10 +143,9 @@ func toQueryRuleUpdateProps(ctx context.Context, client clients.MinVersionEnforc diags.AddError("ID was not a valid UUID", err.Error()) return updateProps, diags } - var id = kbapi.SecurityDetectionsAPIUUID(uid) queryRule := kbapi.SecurityDetectionsAPIQueryRuleUpdateProps{ - Id: &id, + Id: &uid, Name: kbapi.SecurityDetectionsAPIRuleName(d.Name.ValueString()), Description: kbapi.SecurityDetectionsAPIRuleDescription(d.Description.ValueString()), Type: kbapi.SecurityDetectionsAPIQueryRuleUpdatePropsType("query"), diff --git a/internal/kibana/security_detection_rule/models_saved_query.go b/internal/kibana/security_detection_rule/models_saved_query.go index d71feccaa..48ee86c9f 100644 --- a/internal/kibana/security_detection_rule/models_saved_query.go +++ b/internal/kibana/security_detection_rule/models_saved_query.go @@ -140,10 +140,9 @@ func (d SecurityDetectionRuleData) toSavedQueryRuleUpdateProps(ctx context.Conte diags.AddError("ID was not a valid UUID", err.Error()) return updateProps, diags } - var id = kbapi.SecurityDetectionsAPIUUID(uid) savedQueryRule := kbapi.SecurityDetectionsAPISavedQueryRuleUpdateProps{ - Id: &id, + Id: &uid, Name: kbapi.SecurityDetectionsAPIRuleName(d.Name.ValueString()), Description: kbapi.SecurityDetectionsAPIRuleDescription(d.Description.ValueString()), Type: kbapi.SecurityDetectionsAPISavedQueryRuleUpdatePropsType("saved_query"), diff --git a/internal/kibana/security_detection_rule/models_threat_match.go b/internal/kibana/security_detection_rule/models_threat_match.go index c75c39659..e27ed56a8 100644 --- a/internal/kibana/security_detection_rule/models_threat_match.go +++ b/internal/kibana/security_detection_rule/models_threat_match.go @@ -177,10 +177,9 @@ func (d SecurityDetectionRuleData) toThreatMatchRuleUpdateProps(ctx context.Cont diags.AddError("ID was not a valid UUID", err.Error()) return updateProps, diags } - var id = kbapi.SecurityDetectionsAPIUUID(uid) threatMatchRule := kbapi.SecurityDetectionsAPIThreatMatchRuleUpdateProps{ - Id: &id, + Id: &uid, Name: kbapi.SecurityDetectionsAPIRuleName(d.Name.ValueString()), Description: kbapi.SecurityDetectionsAPIRuleDescription(d.Description.ValueString()), Type: kbapi.SecurityDetectionsAPIThreatMatchRuleUpdatePropsType("threat_match"), diff --git a/internal/kibana/security_detection_rule/models_threshold.go b/internal/kibana/security_detection_rule/models_threshold.go index 64711261d..0d3bf7678 100644 --- a/internal/kibana/security_detection_rule/models_threshold.go +++ b/internal/kibana/security_detection_rule/models_threshold.go @@ -153,10 +153,9 @@ func (d SecurityDetectionRuleData) toThresholdRuleUpdateProps(ctx context.Contex diags.AddError("ID was not a valid UUID", err.Error()) return updateProps, diags } - var id = kbapi.SecurityDetectionsAPIUUID(uid) thresholdRule := kbapi.SecurityDetectionsAPIThresholdRuleUpdateProps{ - Id: &id, + Id: &uid, Name: kbapi.SecurityDetectionsAPIRuleName(d.Name.ValueString()), Description: kbapi.SecurityDetectionsAPIRuleDescription(d.Description.ValueString()), Type: kbapi.SecurityDetectionsAPIThresholdRuleUpdatePropsType("threshold"), diff --git a/internal/kibana/security_detection_rule/read.go b/internal/kibana/security_detection_rule/read.go index 43e00c739..84d5b3707 100644 --- a/internal/kibana/security_detection_rule/read.go +++ b/internal/kibana/security_detection_rule/read.go @@ -69,9 +69,8 @@ func (r *securityDetectionRuleResource) read(ctx context.Context, resourceId, sp diags.AddError("ID was not a valid UUID", err.Error()) return nil, diags } - ruleObjectId := kbapi.SecurityDetectionsAPIUUID(uid) params := &kbapi.ReadRuleParams{ - Id: &ruleObjectId, + Id: &uid, } response, err := kbClient.API.ReadRuleWithResponse(ctx, spaceId, params)