From 98dc65075c3eda9f2bc7296f7c66f079437cf573 Mon Sep 17 00:00:00 2001 From: Nick Benoit Date: Tue, 25 Nov 2025 12:37:20 -0700 Subject: [PATCH 01/14] Add security list resource --- .../resource.tf | 6 + .../resource_keyword.tf | 7 + .../clients/kibana_oapi/security_lists.go | 154 ++++++++++++++++++ internal/kibana/security_list/acc_test.go | 153 +++++++++++++++++ internal/kibana/security_list/create.go | 69 ++++++++ internal/kibana/security_list/delete.go | 33 ++++ internal/kibana/security_list/models.go | 154 ++++++++++++++++++ internal/kibana/security_list/read.go | 50 ++++++ .../security_list/resource-description.md | 27 +++ internal/kibana/security_list/resource.go | 38 +++++ internal/kibana/security_list/schema.go | 122 ++++++++++++++ .../create/main.tf | 22 +++ .../update/main.tf | 22 +++ .../keyword_type/main.tf | 22 +++ .../create/main.tf | 32 ++++ .../update/main.tf | 32 ++++ internal/kibana/security_list/update.go | 80 +++++++++ provider/plugin_framework.go | 5 +- 18 files changed, 1027 insertions(+), 1 deletion(-) create mode 100644 examples/resources/elasticstack_kibana_security_list/resource.tf create mode 100644 examples/resources/elasticstack_kibana_security_list/resource_keyword.tf create mode 100644 internal/clients/kibana_oapi/security_lists.go create mode 100644 internal/kibana/security_list/acc_test.go create mode 100644 internal/kibana/security_list/create.go create mode 100644 internal/kibana/security_list/delete.go create mode 100644 internal/kibana/security_list/models.go create mode 100644 internal/kibana/security_list/read.go create mode 100644 internal/kibana/security_list/resource-description.md create mode 100644 internal/kibana/security_list/resource.go create mode 100644 internal/kibana/security_list/schema.go create mode 100644 internal/kibana/security_list/testdata/TestAccResourceSecurityList/create/main.tf create mode 100644 internal/kibana/security_list/testdata/TestAccResourceSecurityList/update/main.tf create mode 100644 internal/kibana/security_list/testdata/TestAccResourceSecurityList_KeywordType/keyword_type/main.tf create mode 100644 internal/kibana/security_list/testdata/TestAccResourceSecurityList_SerializerDeserializer/create/main.tf create mode 100644 internal/kibana/security_list/testdata/TestAccResourceSecurityList_SerializerDeserializer/update/main.tf create mode 100644 internal/kibana/security_list/update.go diff --git a/examples/resources/elasticstack_kibana_security_list/resource.tf b/examples/resources/elasticstack_kibana_security_list/resource.tf new file mode 100644 index 000000000..b8d89eb50 --- /dev/null +++ b/examples/resources/elasticstack_kibana_security_list/resource.tf @@ -0,0 +1,6 @@ +resource "elasticstack_kibana_security_list" "ip_list" { + space_id = "default" + name = "Trusted IP Addresses" + description = "List of trusted IP addresses for security rules" + type = "ip" +} diff --git a/examples/resources/elasticstack_kibana_security_list/resource_keyword.tf b/examples/resources/elasticstack_kibana_security_list/resource_keyword.tf new file mode 100644 index 000000000..e8aa1e811 --- /dev/null +++ b/examples/resources/elasticstack_kibana_security_list/resource_keyword.tf @@ -0,0 +1,7 @@ +resource "elasticstack_kibana_security_list" "keyword_list" { + space_id = "security" + list_id = "custom-keywords" + name = "Custom Keywords" + description = "Custom keyword list for detection rules" + type = "keyword" +} diff --git a/internal/clients/kibana_oapi/security_lists.go b/internal/clients/kibana_oapi/security_lists.go new file mode 100644 index 000000000..454e44d89 --- /dev/null +++ b/internal/clients/kibana_oapi/security_lists.go @@ -0,0 +1,154 @@ +package kibana_oapi + +import ( + "context" + "net/http" + + "github.com/elastic/terraform-provider-elasticstack/generated/kbapi" + "github.com/elastic/terraform-provider-elasticstack/internal/diagutil" + "github.com/hashicorp/terraform-plugin-framework/diag" +) + +// CreateListIndex creates the .lists and .items data streams for a space if they don't exist. +// This is required before any list operations can be performed. +func CreateListIndex(ctx context.Context, client *Client, spaceId string) diag.Diagnostics { + resp, err := client.API.CreateListIndexWithResponse(ctx, kbapi.SpaceId(spaceId)) + if err != nil { + return diagutil.FrameworkDiagFromError(err) + } + + switch resp.StatusCode() { + case http.StatusOK: + return nil + default: + return reportUnknownError(resp.StatusCode(), resp.Body) + } +} + +// GetList reads a security list from the API by ID +func GetList(ctx context.Context, client *Client, spaceId string, params *kbapi.ReadListParams) (*kbapi.ReadListResponse, diag.Diagnostics) { + resp, err := client.API.ReadListWithResponse(ctx, kbapi.SpaceId(spaceId), params) + if err != nil { + return nil, diagutil.FrameworkDiagFromError(err) + } + + switch resp.StatusCode() { + case http.StatusOK: + return resp, nil + case http.StatusNotFound: + return nil, nil + default: + return nil, reportUnknownError(resp.StatusCode(), resp.Body) + } +} + +// CreateList creates a new security list. +func CreateList(ctx context.Context, client *Client, spaceId string, body kbapi.CreateListJSONRequestBody) (*kbapi.CreateListResponse, diag.Diagnostics) { + resp, err := client.API.CreateListWithResponse(ctx, kbapi.SpaceId(spaceId), body) + if err != nil { + return nil, diagutil.FrameworkDiagFromError(err) + } + + switch resp.StatusCode() { + case http.StatusOK: + return resp, nil + default: + return nil, reportUnknownError(resp.StatusCode(), resp.Body) + } +} + +// UpdateList updates an existing security list. +func UpdateList(ctx context.Context, client *Client, spaceId string, body kbapi.UpdateListJSONRequestBody) (*kbapi.UpdateListResponse, diag.Diagnostics) { + resp, err := client.API.UpdateListWithResponse(ctx, kbapi.SpaceId(spaceId), body) + if err != nil { + return nil, diagutil.FrameworkDiagFromError(err) + } + + switch resp.StatusCode() { + case http.StatusOK: + return resp, nil + default: + return nil, reportUnknownError(resp.StatusCode(), resp.Body) + } +} + +// DeleteList deletes an existing security list. +func DeleteList(ctx context.Context, client *Client, spaceId string, params *kbapi.DeleteListParams) diag.Diagnostics { + resp, err := client.API.DeleteListWithResponse(ctx, kbapi.SpaceId(spaceId), params) + if err != nil { + return diagutil.FrameworkDiagFromError(err) + } + + switch resp.StatusCode() { + case http.StatusOK: + return nil + case http.StatusNotFound: + return nil + default: + return reportUnknownError(resp.StatusCode(), resp.Body) + } +} + +// GetListItem reads a security list item from the API by ID or list_id and value +func GetListItem(ctx context.Context, client *Client, spaceId string, params *kbapi.ReadListItemParams) (*kbapi.ReadListItemResponse, diag.Diagnostics) { + resp, err := client.API.ReadListItemWithResponse(ctx, kbapi.SpaceId(spaceId), params) + if err != nil { + return nil, diagutil.FrameworkDiagFromError(err) + } + + switch resp.StatusCode() { + case http.StatusOK: + return resp, nil + case http.StatusNotFound: + return nil, nil + default: + return nil, reportUnknownError(resp.StatusCode(), resp.Body) + } +} + +// CreateListItem creates a new security list item. +func CreateListItem(ctx context.Context, client *Client, spaceId string, body kbapi.CreateListItemJSONRequestBody) (*kbapi.CreateListItemResponse, diag.Diagnostics) { + resp, err := client.API.CreateListItemWithResponse(ctx, kbapi.SpaceId(spaceId), body) + if err != nil { + return nil, diagutil.FrameworkDiagFromError(err) + } + + switch resp.StatusCode() { + case http.StatusOK: + return resp, nil + default: + return nil, reportUnknownError(resp.StatusCode(), resp.Body) + } +} + +// UpdateListItem updates an existing security list item. +func UpdateListItem(ctx context.Context, client *Client, spaceId string, body kbapi.UpdateListItemJSONRequestBody) (*kbapi.UpdateListItemResponse, diag.Diagnostics) { + resp, err := client.API.UpdateListItemWithResponse(ctx, kbapi.SpaceId(spaceId), body) + if err != nil { + return nil, diagutil.FrameworkDiagFromError(err) + } + + switch resp.StatusCode() { + case http.StatusOK: + return resp, nil + default: + return nil, reportUnknownError(resp.StatusCode(), resp.Body) + } +} + +// DeleteListItem deletes an existing security list item. +func DeleteListItem(ctx context.Context, client *Client, spaceId string, params *kbapi.DeleteListItemParams) diag.Diagnostics { + resp, err := client.API.DeleteListItemWithResponse(ctx, kbapi.SpaceId(spaceId), params) + if err != nil { + return diagutil.FrameworkDiagFromError(err) + } + + switch resp.StatusCode() { + case http.StatusOK: + return nil + case http.StatusNotFound: + return nil + default: + return reportUnknownError(resp.StatusCode(), resp.Body) + } +} diff --git a/internal/kibana/security_list/acc_test.go b/internal/kibana/security_list/acc_test.go new file mode 100644 index 000000000..b70d71610 --- /dev/null +++ b/internal/kibana/security_list/acc_test.go @@ -0,0 +1,153 @@ +package security_list_test + +import ( + "context" + "testing" + + "github.com/elastic/terraform-provider-elasticstack/internal/acctest" + "github.com/elastic/terraform-provider-elasticstack/internal/clients" + "github.com/elastic/terraform-provider-elasticstack/internal/clients/kibana_oapi" + "github.com/google/uuid" + "github.com/hashicorp/terraform-plugin-testing/config" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" +) + +func ensureListIndexExists(t *testing.T) { + client, err := clients.NewAcceptanceTestingClient() + if err != nil { + t.Fatalf("Failed to create client: %v", err) + } + + kibanaClient, err := client.GetKibanaOapiClient() + if err != nil { + t.Fatalf("Failed to get Kibana client: %v", err) + } + + diags := kibana_oapi.CreateListIndex(context.Background(), kibanaClient, "default") + if diags.HasError() { + // It's OK if it already exists, we'll only fail on other errors + for _, d := range diags { + if d.Summary() != "Unexpected status code from server: got HTTP 409" { + t.Fatalf("Failed to create list index: %v", d.Detail()) + } + } + } +} + +func TestAccResourceSecurityList(t *testing.T) { + listID := "test-list-" + uuid.New().String() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(t) + ensureListIndexExists(t) + }, + ProtoV6ProviderFactories: acctest.Providers, + Steps: []resource.TestStep{ + { // Create + ConfigDirectory: acctest.NamedTestCaseDirectory("create"), + ConfigVariables: config.Variables{ + "list_id": config.StringVariable(listID), + "name": config.StringVariable("Test Security List"), + "description": config.StringVariable("A test security list for IP addresses"), + "type": config.StringVariable("ip"), + }, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet("elasticstack_kibana_security_list.test", "id"), + resource.TestCheckResourceAttr("elasticstack_kibana_security_list.test", "name", "Test Security List"), + resource.TestCheckResourceAttr("elasticstack_kibana_security_list.test", "description", "A test security list for IP addresses"), + resource.TestCheckResourceAttr("elasticstack_kibana_security_list.test", "type", "ip"), + resource.TestCheckResourceAttrSet("elasticstack_kibana_security_list.test", "created_at"), + resource.TestCheckResourceAttrSet("elasticstack_kibana_security_list.test", "created_by"), + resource.TestCheckResourceAttrSet("elasticstack_kibana_security_list.test", "updated_at"), + resource.TestCheckResourceAttrSet("elasticstack_kibana_security_list.test", "updated_by"), + ), + }, + { // Update + ConfigDirectory: acctest.NamedTestCaseDirectory("update"), + ConfigVariables: config.Variables{ + "list_id": config.StringVariable(listID), + "name": config.StringVariable("Updated Security List"), + "description": config.StringVariable("An updated test security list"), + "type": config.StringVariable("ip"), + }, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("elasticstack_kibana_security_list.test", "name", "Updated Security List"), + resource.TestCheckResourceAttr("elasticstack_kibana_security_list.test", "description", "An updated test security list"), + ), + }, + }, + }) +} + +func TestAccResourceSecurityList_KeywordType(t *testing.T) { + listID := "keyword-list-" + uuid.New().String() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(t) + ensureListIndexExists(t) + }, + ProtoV6ProviderFactories: acctest.Providers, + Steps: []resource.TestStep{ + { + ConfigDirectory: acctest.NamedTestCaseDirectory("keyword_type"), + ConfigVariables: config.Variables{ + "list_id": config.StringVariable(listID), + "name": config.StringVariable("Keyword Security List"), + "description": config.StringVariable("A test security list for keywords"), + "type": config.StringVariable("keyword"), + }, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("elasticstack_kibana_security_list.test", "type", "keyword"), + ), + }, + }, + }) +} + +func TestAccResourceSecurityList_SerializerDeserializer(t *testing.T) { + listID := "serializer-list-" + uuid.New().String() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(t) + ensureListIndexExists(t) + }, + ProtoV6ProviderFactories: acctest.Providers, + Steps: []resource.TestStep{ + { // Create with serializer and deserializer + ConfigDirectory: acctest.NamedTestCaseDirectory("create"), + ConfigVariables: config.Variables{ + "list_id": config.StringVariable(listID), + "name": config.StringVariable("Custom Serializer List"), + "description": config.StringVariable("A test list with custom serializer and deserializer"), + "type": config.StringVariable("ip"), + "serializer": config.StringVariable("{{ip}}"), + "deserializer": config.StringVariable("{{ip}}"), + }, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet("elasticstack_kibana_security_list.test", "id"), + resource.TestCheckResourceAttr("elasticstack_kibana_security_list.test", "name", "Custom Serializer List"), + resource.TestCheckResourceAttr("elasticstack_kibana_security_list.test", "type", "ip"), + resource.TestCheckResourceAttr("elasticstack_kibana_security_list.test", "serializer", "{{ip}}"), + resource.TestCheckResourceAttr("elasticstack_kibana_security_list.test", "deserializer", "{{ip}}"), + ), + }, + { // Update name and description (serializer/deserializer are immutable) + ConfigDirectory: acctest.NamedTestCaseDirectory("update"), + ConfigVariables: config.Variables{ + "list_id": config.StringVariable(listID), + "name": config.StringVariable("Updated Serializer List"), + "description": config.StringVariable("Updated test list description"), + "type": config.StringVariable("ip"), + "serializer": config.StringVariable("{{ip}}"), + "deserializer": config.StringVariable("{{ip}}"), + }, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("elasticstack_kibana_security_list.test", "name", "Updated Serializer List"), + resource.TestCheckResourceAttr("elasticstack_kibana_security_list.test", "description", "Updated test list description"), + resource.TestCheckResourceAttr("elasticstack_kibana_security_list.test", "serializer", "{{ip}}"), + resource.TestCheckResourceAttr("elasticstack_kibana_security_list.test", "deserializer", "{{ip}}"), + ), + }, + }, + }) +} diff --git a/internal/kibana/security_list/create.go b/internal/kibana/security_list/create.go new file mode 100644 index 000000000..969e09567 --- /dev/null +++ b/internal/kibana/security_list/create.go @@ -0,0 +1,69 @@ +package security_list + +import ( + "context" + + "github.com/elastic/terraform-provider-elasticstack/generated/kbapi" + "github.com/elastic/terraform-provider-elasticstack/internal/clients/kibana_oapi" + "github.com/hashicorp/terraform-plugin-framework/resource" +) + +func (r *securityListResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { + var plan SecurityListModel + resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) + if resp.Diagnostics.HasError() { + return + } + + // Get Kibana client + client, err := r.client.GetKibanaOapiClient() + if err != nil { + resp.Diagnostics.AddError("Failed to get Kibana client", err.Error()) + return + } + + // Convert plan to API request + createReq, diags := plan.toCreateRequest() + resp.Diagnostics.Append(diags...) + if resp.Diagnostics.HasError() { + return + } + + // Create the list + spaceID := plan.SpaceID.ValueString() + createResp, diags := kibana_oapi.CreateList(ctx, client, spaceID, *createReq) + resp.Diagnostics.Append(diags...) + if resp.Diagnostics.HasError() { + return + } + + if createResp == nil || createResp.JSON200 == nil { + resp.Diagnostics.AddError("Failed to create security list", "API returned empty response") + return + } + + // Read the created list to populate state + readParams := &kbapi.ReadListParams{ + Id: createResp.JSON200.Id, + } + + readResp, diags := kibana_oapi.GetList(ctx, client, spaceID, readParams) + resp.Diagnostics.Append(diags...) + if resp.Diagnostics.HasError() { + return + } + + if readResp == nil || readResp.JSON200 == nil { + resp.State.RemoveResource(ctx) + return + } + + // Update state with read response + diags = plan.fromAPI(ctx, readResp.JSON200) + resp.Diagnostics.Append(diags...) + if resp.Diagnostics.HasError() { + return + } + + resp.Diagnostics.Append(resp.State.Set(ctx, plan)...) +} diff --git a/internal/kibana/security_list/delete.go b/internal/kibana/security_list/delete.go new file mode 100644 index 000000000..a532b38f3 --- /dev/null +++ b/internal/kibana/security_list/delete.go @@ -0,0 +1,33 @@ +package security_list + +import ( + "context" + + "github.com/elastic/terraform-provider-elasticstack/generated/kbapi" + "github.com/elastic/terraform-provider-elasticstack/internal/clients/kibana_oapi" + "github.com/hashicorp/terraform-plugin-framework/resource" +) + +func (r *securityListResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { + var state SecurityListModel + resp.Diagnostics.Append(req.State.Get(ctx, &state)...) + if resp.Diagnostics.HasError() { + return + } + + client, err := r.client.GetKibanaOapiClient() + if err != nil { + resp.Diagnostics.AddError("Failed to get Kibana client", err.Error()) + return + } + + spaceID := state.SpaceID.ValueString() + listID := state.ListID.ValueString() + + params := &kbapi.DeleteListParams{ + Id: kbapi.SecurityListsAPIListId(listID), + } + + diags := kibana_oapi.DeleteList(ctx, client, spaceID, params) + resp.Diagnostics.Append(diags...) +} diff --git a/internal/kibana/security_list/models.go b/internal/kibana/security_list/models.go new file mode 100644 index 000000000..f2524bd3c --- /dev/null +++ b/internal/kibana/security_list/models.go @@ -0,0 +1,154 @@ +package security_list + +import ( + "context" + "encoding/json" + + "github.com/elastic/terraform-provider-elasticstack/generated/kbapi" + "github.com/hashicorp/terraform-plugin-framework/diag" + "github.com/hashicorp/terraform-plugin-framework/types" +) + +type SecurityListModel struct { + ID types.String `tfsdk:"id"` + SpaceID types.String `tfsdk:"space_id"` + ListID types.String `tfsdk:"list_id"` + Name types.String `tfsdk:"name"` + Description types.String `tfsdk:"description"` + Type types.String `tfsdk:"type"` + Deserializer types.String `tfsdk:"deserializer"` + Serializer types.String `tfsdk:"serializer"` + Meta types.String `tfsdk:"meta"` + Version types.Int64 `tfsdk:"version"` + VersionID types.String `tfsdk:"version_id"` + Immutable types.Bool `tfsdk:"immutable"` + CreatedAt types.String `tfsdk:"created_at"` + CreatedBy types.String `tfsdk:"created_by"` + UpdatedAt types.String `tfsdk:"updated_at"` + UpdatedBy types.String `tfsdk:"updated_by"` + TieBreakerID types.String `tfsdk:"tie_breaker_id"` +} + +// toCreateRequest converts the Terraform model to API create request +func (m *SecurityListModel) toCreateRequest() (*kbapi.CreateListJSONRequestBody, diag.Diagnostics) { + var diags diag.Diagnostics + req := &kbapi.CreateListJSONRequestBody{ + Name: kbapi.SecurityListsAPIListName(m.Name.ValueString()), + Description: kbapi.SecurityListsAPIListDescription(m.Description.ValueString()), + Type: kbapi.SecurityListsAPIListType(m.Type.ValueString()), + } + + // Set optional fields + if !m.ListID.IsNull() && !m.ListID.IsUnknown() { + id := kbapi.SecurityListsAPIListId(m.ListID.ValueString()) + req.Id = &id + } + + if !m.Deserializer.IsNull() && !m.Deserializer.IsUnknown() { + deserializer := kbapi.SecurityListsAPIListDeserializer(m.Deserializer.ValueString()) + req.Deserializer = &deserializer + } + + if !m.Serializer.IsNull() && !m.Serializer.IsUnknown() { + serializer := kbapi.SecurityListsAPIListSerializer(m.Serializer.ValueString()) + req.Serializer = &serializer + } + + if !m.Meta.IsNull() && !m.Meta.IsUnknown() { + var metaMap kbapi.SecurityListsAPIListMetadata + if err := json.Unmarshal([]byte(m.Meta.ValueString()), &metaMap); err != nil { + diags.AddError("Invalid meta JSON", err.Error()) + return nil, diags + } + req.Meta = &metaMap + } + + if !m.Version.IsNull() && !m.Version.IsUnknown() { + version := int(m.Version.ValueInt64()) + req.Version = &version + } + + return req, diags +} + +// toUpdateRequest converts the Terraform model to API update request +func (m *SecurityListModel) toUpdateRequest() (*kbapi.UpdateListJSONRequestBody, diag.Diagnostics) { + var diags diag.Diagnostics + req := &kbapi.UpdateListJSONRequestBody{ + Id: kbapi.SecurityListsAPIListId(m.ListID.ValueString()), + Name: kbapi.SecurityListsAPIListName(m.Name.ValueString()), + Description: kbapi.SecurityListsAPIListDescription(m.Description.ValueString()), + } + + // Set optional fields + if !m.VersionID.IsNull() && !m.VersionID.IsUnknown() { + versionID := kbapi.SecurityListsAPIListVersionId(m.VersionID.ValueString()) + req.UnderscoreVersion = &versionID + } + + if !m.Meta.IsNull() && !m.Meta.IsUnknown() { + var metaMap kbapi.SecurityListsAPIListMetadata + if err := json.Unmarshal([]byte(m.Meta.ValueString()), &metaMap); err != nil { + diags.AddError("Invalid meta JSON", err.Error()) + return nil, diags + } + req.Meta = &metaMap + } + + if !m.Version.IsNull() && !m.Version.IsUnknown() { + version := kbapi.SecurityListsAPIListVersion(m.Version.ValueInt64()) + req.Version = &version + } + + return req, diags +} + +// fromAPI converts the API response to Terraform model +func (m *SecurityListModel) fromAPI(ctx context.Context, apiList *kbapi.SecurityListsAPIList) diag.Diagnostics { + var diags diag.Diagnostics + + m.ID = types.StringValue(string(apiList.Id)) + m.ListID = types.StringValue(string(apiList.Id)) + m.Name = types.StringValue(string(apiList.Name)) + m.Description = types.StringValue(string(apiList.Description)) + m.Type = types.StringValue(string(apiList.Type)) + m.Immutable = types.BoolValue(apiList.Immutable) + m.Version = types.Int64Value(int64(apiList.Version)) + m.TieBreakerID = types.StringValue(apiList.TieBreakerId) + m.CreatedAt = types.StringValue(apiList.CreatedAt.String()) + m.CreatedBy = types.StringValue(apiList.CreatedBy) + m.UpdatedAt = types.StringValue(apiList.UpdatedAt.String()) + m.UpdatedBy = types.StringValue(apiList.UpdatedBy) + + // Set optional _version field + if apiList.UnderscoreVersion != nil { + m.VersionID = types.StringValue(string(*apiList.UnderscoreVersion)) + } else { + m.VersionID = types.StringNull() + } + + if apiList.Deserializer != nil { + m.Deserializer = types.StringValue(string(*apiList.Deserializer)) + } else { + m.Deserializer = types.StringNull() + } + + if apiList.Serializer != nil { + m.Serializer = types.StringValue(string(*apiList.Serializer)) + } else { + m.Serializer = types.StringNull() + } + + if apiList.Meta != nil { + metaBytes, err := json.Marshal(apiList.Meta) + if err != nil { + diags.AddError("Failed to marshal meta", err.Error()) + return diags + } + m.Meta = types.StringValue(string(metaBytes)) + } else { + m.Meta = types.StringNull() + } + + return diags +} diff --git a/internal/kibana/security_list/read.go b/internal/kibana/security_list/read.go new file mode 100644 index 000000000..b5027401e --- /dev/null +++ b/internal/kibana/security_list/read.go @@ -0,0 +1,50 @@ +package security_list + +import ( + "context" + + "github.com/elastic/terraform-provider-elasticstack/generated/kbapi" + "github.com/elastic/terraform-provider-elasticstack/internal/clients/kibana_oapi" + "github.com/hashicorp/terraform-plugin-framework/resource" +) + +func (r *securityListResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { + var state SecurityListModel + resp.Diagnostics.Append(req.State.Get(ctx, &state)...) + if resp.Diagnostics.HasError() { + return + } + + client, err := r.client.GetKibanaOapiClient() + if err != nil { + resp.Diagnostics.AddError("Failed to get Kibana client", err.Error()) + return + } + + spaceID := state.SpaceID.ValueString() + listID := state.ListID.ValueString() + + params := &kbapi.ReadListParams{ + Id: kbapi.SecurityListsAPIListId(listID), + } + + readResp, diags := kibana_oapi.GetList(ctx, client, spaceID, params) + resp.Diagnostics.Append(diags...) + if resp.Diagnostics.HasError() { + return + } + + if readResp == nil || readResp.JSON200 == nil { + resp.State.RemoveResource(ctx) + return + } + + // Convert API response to model + diags = state.fromAPI(ctx, readResp.JSON200) + resp.Diagnostics.Append(diags...) + if resp.Diagnostics.HasError() { + return + } + + resp.Diagnostics.Append(resp.State.Set(ctx, state)...) +} diff --git a/internal/kibana/security_list/resource-description.md b/internal/kibana/security_list/resource-description.md new file mode 100644 index 000000000..9b67b4e12 --- /dev/null +++ b/internal/kibana/security_list/resource-description.md @@ -0,0 +1,27 @@ +Manages Kibana security lists (also known as value lists). Security lists are used by exception items to define sets of values for matching or excluding in security rules. + +## Example Usage + +```terraform +resource "elasticstack_kibana_security_list" "ip_list" { + space_id = "default" + name = "Trusted IP Addresses" + description = "List of trusted IP addresses for security rules" + type = "ip" +} + +resource "elasticstack_kibana_security_list" "keyword_list" { + space_id = "security" + list_id = "custom-keywords" + name = "Custom Keywords" + description = "Custom keyword list for detection rules" + type = "keyword" +} +``` + +## Notes + +- Security lists define the type of data they can contain via the `type` attribute +- Once created, the `type` of a list cannot be changed +- Lists can be referenced by exception items to create more sophisticated matching rules +- The `list_id` is auto-generated if not provided diff --git a/internal/kibana/security_list/resource.go b/internal/kibana/security_list/resource.go new file mode 100644 index 000000000..51d6ad1a6 --- /dev/null +++ b/internal/kibana/security_list/resource.go @@ -0,0 +1,38 @@ +package security_list + +import ( + "context" + + "github.com/elastic/terraform-provider-elasticstack/internal/clients" + "github.com/hashicorp/terraform-plugin-framework/path" + "github.com/hashicorp/terraform-plugin-framework/resource" +) + +// Ensure provider defined types fully satisfy framework interfaces +var ( + _ resource.Resource = &securityListResource{} + _ resource.ResourceWithConfigure = &securityListResource{} + _ resource.ResourceWithImportState = &securityListResource{} +) + +func NewResource() resource.Resource { + return &securityListResource{} +} + +type securityListResource struct { + client *clients.ApiClient +} + +func (r *securityListResource) Metadata(_ context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) { + resp.TypeName = req.ProviderTypeName + "_kibana_security_list" +} + +func (r *securityListResource) Configure(_ context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) { + client, diags := clients.ConvertProviderData(req.ProviderData) + resp.Diagnostics.Append(diags...) + r.client = client +} + +func (r *securityListResource) ImportState(ctx context.Context, request resource.ImportStateRequest, response *resource.ImportStateResponse) { + resource.ImportStatePassthroughID(ctx, path.Root("id"), request, response) +} diff --git a/internal/kibana/security_list/schema.go b/internal/kibana/security_list/schema.go new file mode 100644 index 000000000..bafe69e46 --- /dev/null +++ b/internal/kibana/security_list/schema.go @@ -0,0 +1,122 @@ +package security_list + +import ( + "context" + _ "embed" + + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" +) + +//go:embed resource-description.md +var securityListResourceDescription string + +func (r *securityListResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) { + resp.Schema = schema.Schema{ + MarkdownDescription: securityListResourceDescription, + Attributes: map[string]schema.Attribute{ + "id": schema.StringAttribute{ + MarkdownDescription: "The unique identifier of the security list (auto-generated by Kibana if not specified).", + Computed: true, + Optional: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + stringplanmodifier.UseStateForUnknown(), + }, + }, + "space_id": schema.StringAttribute{ + MarkdownDescription: "An identifier for the space. If space_id is not provided, the default space is used.", + Optional: true, + Computed: true, + Default: stringdefault.StaticString("default"), + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + }, + }, + "list_id": schema.StringAttribute{ + MarkdownDescription: "The value list's human-readable identifier.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + stringplanmodifier.UseStateForUnknown(), + }, + }, + "name": schema.StringAttribute{ + MarkdownDescription: "The name of the security list.", + Required: true, + }, + "description": schema.StringAttribute{ + MarkdownDescription: "Describes the security list.", + Required: true, + }, + "type": schema.StringAttribute{ + MarkdownDescription: "Specifies the Elasticsearch data type of values the list contains. Valid values include: `binary`, `boolean`, `byte`, `date`, `date_nanos`, `date_range`, `double`, `double_range`, `float`, `float_range`, `geo_point`, `geo_shape`, `half_float`, `integer`, `integer_range`, `ip`, `ip_range`, `keyword`, `long`, `long_range`, `shape`, `short`, `text`.", + Required: true, + Validators: []validator.String{ + stringvalidator.OneOf( + "binary", "boolean", "byte", "date", "date_nanos", "date_range", + "double", "double_range", "float", "float_range", "geo_point", "geo_shape", + "half_float", "integer", "integer_range", "ip", "ip_range", "keyword", + "long", "long_range", "shape", "short", "text", + ), + }, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + }, + }, + "deserializer": schema.StringAttribute{ + MarkdownDescription: "Determines how retrieved list item values are presented. By default, list items are presented using Handlebars expressions based on the type.", + Optional: true, + Computed: true, + }, + "serializer": schema.StringAttribute{ + MarkdownDescription: "Determines how uploaded list item values are parsed. By default, list items are parsed using named regex groups based on the type.", + Optional: true, + Computed: true, + }, + "meta": schema.StringAttribute{ + MarkdownDescription: "Placeholder for metadata about the value list as JSON string.", + Optional: true, + }, + "version": schema.Int64Attribute{ + MarkdownDescription: "The document version number.", + Optional: true, + Computed: true, + }, + "version_id": schema.StringAttribute{ + MarkdownDescription: "The version id, normally returned by the API when the document is retrieved. Use it ensure updates are done against the latest version.", + Computed: true, + }, + "immutable": schema.BoolAttribute{ + MarkdownDescription: "Whether the list is immutable.", + Computed: true, + }, + "created_at": schema.StringAttribute{ + MarkdownDescription: "The timestamp of when the list was created.", + Computed: true, + }, + "created_by": schema.StringAttribute{ + MarkdownDescription: "The user who created the list.", + Computed: true, + }, + "updated_at": schema.StringAttribute{ + MarkdownDescription: "The timestamp of when the list was last updated.", + Computed: true, + }, + "updated_by": schema.StringAttribute{ + MarkdownDescription: "The user who last updated the list.", + Computed: true, + }, + "tie_breaker_id": schema.StringAttribute{ + MarkdownDescription: "Field used in search to ensure all containers are sorted and returned correctly.", + Computed: true, + }, + }, + } +} diff --git a/internal/kibana/security_list/testdata/TestAccResourceSecurityList/create/main.tf b/internal/kibana/security_list/testdata/TestAccResourceSecurityList/create/main.tf new file mode 100644 index 000000000..8d7acc2eb --- /dev/null +++ b/internal/kibana/security_list/testdata/TestAccResourceSecurityList/create/main.tf @@ -0,0 +1,22 @@ +variable "list_id" { + type = string +} + +variable "name" { + type = string +} + +variable "description" { + type = string +} + +variable "type" { + type = string +} + +resource "elasticstack_kibana_security_list" "test" { + list_id = var.list_id + name = var.name + description = var.description + type = var.type +} diff --git a/internal/kibana/security_list/testdata/TestAccResourceSecurityList/update/main.tf b/internal/kibana/security_list/testdata/TestAccResourceSecurityList/update/main.tf new file mode 100644 index 000000000..8d7acc2eb --- /dev/null +++ b/internal/kibana/security_list/testdata/TestAccResourceSecurityList/update/main.tf @@ -0,0 +1,22 @@ +variable "list_id" { + type = string +} + +variable "name" { + type = string +} + +variable "description" { + type = string +} + +variable "type" { + type = string +} + +resource "elasticstack_kibana_security_list" "test" { + list_id = var.list_id + name = var.name + description = var.description + type = var.type +} diff --git a/internal/kibana/security_list/testdata/TestAccResourceSecurityList_KeywordType/keyword_type/main.tf b/internal/kibana/security_list/testdata/TestAccResourceSecurityList_KeywordType/keyword_type/main.tf new file mode 100644 index 000000000..8d7acc2eb --- /dev/null +++ b/internal/kibana/security_list/testdata/TestAccResourceSecurityList_KeywordType/keyword_type/main.tf @@ -0,0 +1,22 @@ +variable "list_id" { + type = string +} + +variable "name" { + type = string +} + +variable "description" { + type = string +} + +variable "type" { + type = string +} + +resource "elasticstack_kibana_security_list" "test" { + list_id = var.list_id + name = var.name + description = var.description + type = var.type +} diff --git a/internal/kibana/security_list/testdata/TestAccResourceSecurityList_SerializerDeserializer/create/main.tf b/internal/kibana/security_list/testdata/TestAccResourceSecurityList_SerializerDeserializer/create/main.tf new file mode 100644 index 000000000..b3e734461 --- /dev/null +++ b/internal/kibana/security_list/testdata/TestAccResourceSecurityList_SerializerDeserializer/create/main.tf @@ -0,0 +1,32 @@ +variable "list_id" { + type = string +} + +variable "name" { + type = string +} + +variable "description" { + type = string +} + +variable "type" { + type = string +} + +variable "serializer" { + type = string +} + +variable "deserializer" { + type = string +} + +resource "elasticstack_kibana_security_list" "test" { + list_id = var.list_id + name = var.name + description = var.description + type = var.type + serializer = var.serializer + deserializer = var.deserializer +} diff --git a/internal/kibana/security_list/testdata/TestAccResourceSecurityList_SerializerDeserializer/update/main.tf b/internal/kibana/security_list/testdata/TestAccResourceSecurityList_SerializerDeserializer/update/main.tf new file mode 100644 index 000000000..b3e734461 --- /dev/null +++ b/internal/kibana/security_list/testdata/TestAccResourceSecurityList_SerializerDeserializer/update/main.tf @@ -0,0 +1,32 @@ +variable "list_id" { + type = string +} + +variable "name" { + type = string +} + +variable "description" { + type = string +} + +variable "type" { + type = string +} + +variable "serializer" { + type = string +} + +variable "deserializer" { + type = string +} + +resource "elasticstack_kibana_security_list" "test" { + list_id = var.list_id + name = var.name + description = var.description + type = var.type + serializer = var.serializer + deserializer = var.deserializer +} diff --git a/internal/kibana/security_list/update.go b/internal/kibana/security_list/update.go new file mode 100644 index 000000000..d545d92da --- /dev/null +++ b/internal/kibana/security_list/update.go @@ -0,0 +1,80 @@ +package security_list + +import ( + "context" + + "github.com/elastic/terraform-provider-elasticstack/generated/kbapi" + "github.com/elastic/terraform-provider-elasticstack/internal/clients/kibana_oapi" + "github.com/hashicorp/terraform-plugin-framework/resource" +) + +func (r *securityListResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { + var plan SecurityListModel + resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) + if resp.Diagnostics.HasError() { + return + } + + var state SecurityListModel + resp.Diagnostics.Append(req.State.Get(ctx, &state)...) + if resp.Diagnostics.HasError() { + return + } + + // Preserve version_id from state for optimistic locking + if state.VersionID.ValueString() != "" { + plan.VersionID = state.VersionID + } + + // Convert plan to API request + updateReq, diags := plan.toUpdateRequest() + resp.Diagnostics.Append(diags...) + if resp.Diagnostics.HasError() { + return + } + + // Get Kibana client + client, err := r.client.GetKibanaOapiClient() + if err != nil { + resp.Diagnostics.AddError("Failed to get Kibana client", err.Error()) + return + } + + // Update the list + spaceID := plan.SpaceID.ValueString() + updateResp, diags := kibana_oapi.UpdateList(ctx, client, spaceID, *updateReq) + resp.Diagnostics.Append(diags...) + if resp.Diagnostics.HasError() { + return + } + + if updateResp == nil || updateResp.JSON200 == nil { + resp.Diagnostics.AddError("Failed to update security list", "API returned empty response") + return + } + + // Read the updated list to populate state + readParams := &kbapi.ReadListParams{ + Id: updateResp.JSON200.Id, + } + + readResp, diags := kibana_oapi.GetList(ctx, client, spaceID, readParams) + resp.Diagnostics.Append(diags...) + if resp.Diagnostics.HasError() { + return + } + + if readResp == nil || readResp.JSON200 == nil { + resp.State.RemoveResource(ctx) + return + } + + // Update state with read response + diags = plan.fromAPI(ctx, readResp.JSON200) + resp.Diagnostics.Append(diags...) + if resp.Diagnostics.HasError() { + return + } + + resp.Diagnostics.Append(resp.State.Set(ctx, plan)...) +} diff --git a/provider/plugin_framework.go b/provider/plugin_framework.go index 7d237654b..3ac35620a 100644 --- a/provider/plugin_framework.go +++ b/provider/plugin_framework.go @@ -32,6 +32,7 @@ import ( "github.com/elastic/terraform-provider-elasticstack/internal/kibana/import_saved_objects" "github.com/elastic/terraform-provider-elasticstack/internal/kibana/maintenance_window" "github.com/elastic/terraform-provider-elasticstack/internal/kibana/security_detection_rule" + "github.com/elastic/terraform-provider-elasticstack/internal/kibana/security_list" "github.com/elastic/terraform-provider-elasticstack/internal/kibana/spaces" "github.com/elastic/terraform-provider-elasticstack/internal/kibana/synthetics/monitor" "github.com/elastic/terraform-provider-elasticstack/internal/kibana/synthetics/parameter" @@ -145,7 +146,9 @@ func (p *Provider) resources(ctx context.Context) []func() resource.Resource { } func (p *Provider) experimentalResources(ctx context.Context) []func() resource.Resource { - return []func() resource.Resource{} + return []func() resource.Resource{ + security_list.NewResource, + } } func (p *Provider) dataSources(ctx context.Context) []func() datasource.DataSource { From 9315d91ad84937788bd5f80e42281b381362759f Mon Sep 17 00:00:00 2001 From: Nick Benoit Date: Tue, 25 Nov 2025 17:53:39 -0700 Subject: [PATCH 02/14] Add security list resource --- internal/kibana/security_list/models.go | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/internal/kibana/security_list/models.go b/internal/kibana/security_list/models.go index f2524bd3c..0adc3061d 100644 --- a/internal/kibana/security_list/models.go +++ b/internal/kibana/security_list/models.go @@ -5,6 +5,7 @@ import ( "encoding/json" "github.com/elastic/terraform-provider-elasticstack/generated/kbapi" + "github.com/elastic/terraform-provider-elasticstack/internal/utils" "github.com/hashicorp/terraform-plugin-framework/diag" "github.com/hashicorp/terraform-plugin-framework/types" ) @@ -39,22 +40,22 @@ func (m *SecurityListModel) toCreateRequest() (*kbapi.CreateListJSONRequestBody, } // Set optional fields - if !m.ListID.IsNull() && !m.ListID.IsUnknown() { + if utils.IsKnown(m.ListID) { id := kbapi.SecurityListsAPIListId(m.ListID.ValueString()) req.Id = &id } - if !m.Deserializer.IsNull() && !m.Deserializer.IsUnknown() { + if utils.IsKnown(m.Deserializer) { deserializer := kbapi.SecurityListsAPIListDeserializer(m.Deserializer.ValueString()) req.Deserializer = &deserializer } - if !m.Serializer.IsNull() && !m.Serializer.IsUnknown() { + if utils.IsKnown(m.Serializer) { serializer := kbapi.SecurityListsAPIListSerializer(m.Serializer.ValueString()) req.Serializer = &serializer } - if !m.Meta.IsNull() && !m.Meta.IsUnknown() { + if utils.IsKnown(m.Meta) { var metaMap kbapi.SecurityListsAPIListMetadata if err := json.Unmarshal([]byte(m.Meta.ValueString()), &metaMap); err != nil { diags.AddError("Invalid meta JSON", err.Error()) @@ -63,7 +64,7 @@ func (m *SecurityListModel) toCreateRequest() (*kbapi.CreateListJSONRequestBody, req.Meta = &metaMap } - if !m.Version.IsNull() && !m.Version.IsUnknown() { + if utils.IsKnown(m.Version) { version := int(m.Version.ValueInt64()) req.Version = &version } @@ -81,12 +82,12 @@ func (m *SecurityListModel) toUpdateRequest() (*kbapi.UpdateListJSONRequestBody, } // Set optional fields - if !m.VersionID.IsNull() && !m.VersionID.IsUnknown() { + if utils.IsKnown(m.VersionID) { versionID := kbapi.SecurityListsAPIListVersionId(m.VersionID.ValueString()) req.UnderscoreVersion = &versionID } - if !m.Meta.IsNull() && !m.Meta.IsUnknown() { + if utils.IsKnown(m.Meta) { var metaMap kbapi.SecurityListsAPIListMetadata if err := json.Unmarshal([]byte(m.Meta.ValueString()), &metaMap); err != nil { diags.AddError("Invalid meta JSON", err.Error()) @@ -95,8 +96,8 @@ func (m *SecurityListModel) toUpdateRequest() (*kbapi.UpdateListJSONRequestBody, req.Meta = &metaMap } - if !m.Version.IsNull() && !m.Version.IsUnknown() { - version := kbapi.SecurityListsAPIListVersion(m.Version.ValueInt64()) + if utils.IsKnown(m.Version) { + version := kbapi.SecurityListsAPIListVersion(int(m.Version.ValueInt64())) req.Version = &version } From 56dfc30a6e6f2c2810ffb8f2c48756d619d37115 Mon Sep 17 00:00:00 2001 From: Nick Benoit Date: Tue, 25 Nov 2025 12:46:53 -0700 Subject: [PATCH 03/14] Update generated client --- generated/kbapi/kibana.gen.go | 9211 ++++++++++++++------------- generated/kbapi/transform_schema.go | 5 + 2 files changed, 4684 insertions(+), 4532 deletions(-) diff --git a/generated/kbapi/kibana.gen.go b/generated/kbapi/kibana.gen.go index 599f2bdc3..d43381283 100644 --- a/generated/kbapi/kibana.gen.go +++ b/generated/kbapi/kibana.gen.go @@ -3477,27 +3477,6 @@ const ( FindListsParamsSortOrderDesc FindListsParamsSortOrder = "desc" ) -// Defines values for DeleteListItemParamsRefresh. -const ( - DeleteListItemParamsRefreshFalse DeleteListItemParamsRefresh = "false" - DeleteListItemParamsRefreshTrue DeleteListItemParamsRefresh = "true" - DeleteListItemParamsRefreshWaitFor DeleteListItemParamsRefresh = "wait_for" -) - -// Defines values for PatchListItemJSONBodyRefresh. -const ( - PatchListItemJSONBodyRefreshFalse PatchListItemJSONBodyRefresh = "false" - PatchListItemJSONBodyRefreshTrue PatchListItemJSONBodyRefresh = "true" - PatchListItemJSONBodyRefreshWaitFor PatchListItemJSONBodyRefresh = "wait_for" -) - -// Defines values for CreateListItemJSONBodyRefresh. -const ( - CreateListItemJSONBodyRefreshFalse CreateListItemJSONBodyRefresh = "false" - CreateListItemJSONBodyRefreshTrue CreateListItemJSONBodyRefresh = "true" - CreateListItemJSONBodyRefreshWaitFor CreateListItemJSONBodyRefresh = "wait_for" -) - // Defines values for FindListItemsParamsSortOrder. const ( FindListItemsParamsSortOrderAsc FindListItemsParamsSortOrder = "asc" @@ -3916,8 +3895,8 @@ const ( // Defines values for GetTimelinesParamsOnlyUserFavorite. const ( - False GetTimelinesParamsOnlyUserFavorite = "false" - True GetTimelinesParamsOnlyUserFavorite = "true" + GetTimelinesParamsOnlyUserFavoriteFalse GetTimelinesParamsOnlyUserFavorite = "false" + GetTimelinesParamsOnlyUserFavoriteTrue GetTimelinesParamsOnlyUserFavorite = "true" ) // Defines values for GetTimelinesParamsSortOrder. @@ -3926,6 +3905,27 @@ const ( GetTimelinesParamsSortOrderDesc GetTimelinesParamsSortOrder = "desc" ) +// Defines values for DeleteListItemParamsRefresh. +const ( + DeleteListItemParamsRefreshFalse DeleteListItemParamsRefresh = "false" + DeleteListItemParamsRefreshTrue DeleteListItemParamsRefresh = "true" + DeleteListItemParamsRefreshWaitFor DeleteListItemParamsRefresh = "wait_for" +) + +// Defines values for PatchListItemJSONBodyRefresh. +const ( + PatchListItemJSONBodyRefreshFalse PatchListItemJSONBodyRefresh = "false" + PatchListItemJSONBodyRefreshTrue PatchListItemJSONBodyRefresh = "true" + PatchListItemJSONBodyRefreshWaitFor PatchListItemJSONBodyRefresh = "wait_for" +) + +// Defines values for CreateListItemJSONBodyRefresh. +const ( + False CreateListItemJSONBodyRefresh = "false" + True CreateListItemJSONBodyRefresh = "true" + WaitFor CreateListItemJSONBodyRefresh = "wait_for" +) + // Defines values for FindSlosOpParamsSortBy. const ( FindSlosOpParamsSortByErrorBudgetConsumed FindSlosOpParamsSortBy = "error_budget_consumed" @@ -29062,100 +29062,6 @@ type GetEntityStoreStatusParams struct { IncludeComponents *bool `form:"include_components,omitempty" json:"include_components,omitempty"` } -// DeleteExceptionListParams defines parameters for DeleteExceptionList. -type DeleteExceptionListParams struct { - // Id Exception list's identifier. Either `id` or `list_id` must be specified. - Id *SecurityExceptionsAPIExceptionListId `form:"id,omitempty" json:"id,omitempty"` - - // ListId Human readable exception list string identifier, e.g. `trusted-linux-processes`. Either `id` or `list_id` must be specified. - ListId *SecurityExceptionsAPIExceptionListHumanId `form:"list_id,omitempty" json:"list_id,omitempty"` - NamespaceType *SecurityExceptionsAPIExceptionNamespaceType `form:"namespace_type,omitempty" json:"namespace_type,omitempty"` -} - -// ReadExceptionListParams defines parameters for ReadExceptionList. -type ReadExceptionListParams struct { - // Id Exception list's identifier. Either `id` or `list_id` must be specified. - Id *SecurityExceptionsAPIExceptionListId `form:"id,omitempty" json:"id,omitempty"` - - // ListId Human readable exception list string identifier, e.g. `trusted-linux-processes`. Either `id` or `list_id` must be specified. - ListId *SecurityExceptionsAPIExceptionListHumanId `form:"list_id,omitempty" json:"list_id,omitempty"` - NamespaceType *SecurityExceptionsAPIExceptionNamespaceType `form:"namespace_type,omitempty" json:"namespace_type,omitempty"` -} - -// CreateExceptionListJSONBody defines parameters for CreateExceptionList. -type CreateExceptionListJSONBody struct { - // Description Describes the exception list. - Description SecurityExceptionsAPIExceptionListDescription `json:"description"` - - // ListId The exception list's human readable string identifier, `endpoint_list`. - ListId *SecurityExceptionsAPIExceptionListHumanId `json:"list_id,omitempty"` - - // Meta Placeholder for metadata about the list container. - Meta *SecurityExceptionsAPIExceptionListMeta `json:"meta,omitempty"` - - // Name The name of the exception list. - Name SecurityExceptionsAPIExceptionListName `json:"name"` - - // NamespaceType Determines whether the exception container is available in all Kibana spaces or just the space - // in which it is created, where: - // - // - `single`: Only available in the Kibana space in which it is created. - // - `agnostic`: Available in all Kibana spaces. - NamespaceType *SecurityExceptionsAPIExceptionNamespaceType `json:"namespace_type,omitempty"` - - // OsTypes Use this field to specify the operating system. Only enter one value. - OsTypes *SecurityExceptionsAPIExceptionListOsTypeArray `json:"os_types,omitempty"` - - // Tags String array containing words and phrases to help categorize exception containers. - Tags *SecurityExceptionsAPIExceptionListTags `json:"tags,omitempty"` - - // Type The type of exception list to be created. Different list types may denote where they can be utilized. - Type SecurityExceptionsAPIExceptionListType `json:"type"` - - // Version The document version, automatically increasd on updates. - Version *SecurityExceptionsAPIExceptionListVersion `json:"version,omitempty"` -} - -// UpdateExceptionListJSONBody defines parameters for UpdateExceptionList. -type UpdateExceptionListJSONBody 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. - UnderscoreVersion *string `json:"_version,omitempty"` - - // Description Describes the exception list. - Description SecurityExceptionsAPIExceptionListDescription `json:"description"` - - // Id Exception list's identifier. - Id *SecurityExceptionsAPIExceptionListId `json:"id,omitempty"` - - // ListId The exception list's human readable string identifier, `endpoint_list`. - ListId *SecurityExceptionsAPIExceptionListHumanId `json:"list_id,omitempty"` - - // Meta Placeholder for metadata about the list container. - Meta *SecurityExceptionsAPIExceptionListMeta `json:"meta,omitempty"` - - // Name The name of the exception list. - Name SecurityExceptionsAPIExceptionListName `json:"name"` - - // NamespaceType Determines whether the exception container is available in all Kibana spaces or just the space - // in which it is created, where: - // - // - `single`: Only available in the Kibana space in which it is created. - // - `agnostic`: Available in all Kibana spaces. - NamespaceType *SecurityExceptionsAPIExceptionNamespaceType `json:"namespace_type,omitempty"` - - // OsTypes Use this field to specify the operating system. Only enter one value. - OsTypes *SecurityExceptionsAPIExceptionListOsTypeArray `json:"os_types,omitempty"` - - // Tags String array containing words and phrases to help categorize exception containers. - Tags *SecurityExceptionsAPIExceptionListTags `json:"tags,omitempty"` - - // Type The type of exception list to be created. Different list types may denote where they can be utilized. - Type SecurityExceptionsAPIExceptionListType `json:"type"` - - // Version The document version, automatically increasd on updates. - Version *SecurityExceptionsAPIExceptionListVersion `json:"version,omitempty"` -} - // DuplicateExceptionListParams defines parameters for DuplicateExceptionList. type DuplicateExceptionListParams struct { ListId SecurityExceptionsAPIExceptionListHumanId `form:"list_id" json:"list_id"` @@ -29229,95 +29135,6 @@ type ImportExceptionListParams struct { AsNewList *bool `form:"as_new_list,omitempty" json:"as_new_list,omitempty"` } -// DeleteExceptionListItemParams defines parameters for DeleteExceptionListItem. -type DeleteExceptionListItemParams struct { - // Id Exception item's identifier. Either `id` or `item_id` must be specified - Id *SecurityExceptionsAPIExceptionListItemId `form:"id,omitempty" json:"id,omitempty"` - - // ItemId Human readable exception item string identifier, e.g. `trusted-linux-processes`. Either `id` or `item_id` must be specified - ItemId *SecurityExceptionsAPIExceptionListItemHumanId `form:"item_id,omitempty" json:"item_id,omitempty"` - NamespaceType *SecurityExceptionsAPIExceptionNamespaceType `form:"namespace_type,omitempty" json:"namespace_type,omitempty"` -} - -// ReadExceptionListItemParams defines parameters for ReadExceptionListItem. -type ReadExceptionListItemParams struct { - // Id Exception list item's identifier. Either `id` or `item_id` must be specified. - Id *SecurityExceptionsAPIExceptionListItemId `form:"id,omitempty" json:"id,omitempty"` - - // ItemId Human readable exception item string identifier, e.g. `trusted-linux-processes`. Either `id` or `item_id` must be specified. - ItemId *SecurityExceptionsAPIExceptionListItemHumanId `form:"item_id,omitempty" json:"item_id,omitempty"` - NamespaceType *SecurityExceptionsAPIExceptionNamespaceType `form:"namespace_type,omitempty" json:"namespace_type,omitempty"` -} - -// CreateExceptionListItemJSONBody defines parameters for CreateExceptionListItem. -type CreateExceptionListItemJSONBody struct { - Comments *SecurityExceptionsAPICreateExceptionListItemCommentArray `json:"comments,omitempty"` - - // Description Describes the exception list. - Description SecurityExceptionsAPIExceptionListItemDescription `json:"description"` - Entries SecurityExceptionsAPIExceptionListItemEntryArray `json:"entries"` - - // ExpireTime The exception item’s expiration date, in ISO format. This field is only available for regular exception items, not endpoint exceptions. - ExpireTime *SecurityExceptionsAPIExceptionListItemExpireTime `json:"expire_time,omitempty"` - - // ItemId Human readable string identifier, e.g. `trusted-linux-processes` - ItemId *SecurityExceptionsAPIExceptionListItemHumanId `json:"item_id,omitempty"` - - // ListId The exception list's human readable string identifier, `endpoint_list`. - ListId SecurityExceptionsAPIExceptionListHumanId `json:"list_id"` - Meta *SecurityExceptionsAPIExceptionListItemMeta `json:"meta,omitempty"` - - // Name Exception list name. - Name SecurityExceptionsAPIExceptionListItemName `json:"name"` - - // NamespaceType Determines whether the exception container is available in all Kibana spaces or just the space - // in which it is created, where: - // - // - `single`: Only available in the Kibana space in which it is created. - // - `agnostic`: Available in all Kibana spaces. - NamespaceType *SecurityExceptionsAPIExceptionNamespaceType `json:"namespace_type,omitempty"` - OsTypes *SecurityExceptionsAPIExceptionListItemOsTypeArray `json:"os_types,omitempty"` - Tags *SecurityExceptionsAPIExceptionListItemTags `json:"tags,omitempty"` - Type SecurityExceptionsAPIExceptionListItemType `json:"type"` -} - -// UpdateExceptionListItemJSONBody defines parameters for UpdateExceptionListItem. -type UpdateExceptionListItemJSONBody 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. - UnderscoreVersion *string `json:"_version,omitempty"` - Comments *SecurityExceptionsAPIUpdateExceptionListItemCommentArray `json:"comments,omitempty"` - - // Description Describes the exception list. - Description SecurityExceptionsAPIExceptionListItemDescription `json:"description"` - Entries SecurityExceptionsAPIExceptionListItemEntryArray `json:"entries"` - - // ExpireTime The exception item’s expiration date, in ISO format. This field is only available for regular exception items, not endpoint exceptions. - ExpireTime *SecurityExceptionsAPIExceptionListItemExpireTime `json:"expire_time,omitempty"` - - // Id Exception's identifier. - Id *SecurityExceptionsAPIExceptionListItemId `json:"id,omitempty"` - - // ItemId Human readable string identifier, e.g. `trusted-linux-processes` - ItemId *SecurityExceptionsAPIExceptionListItemHumanId `json:"item_id,omitempty"` - - // ListId The exception list's human readable string identifier, `endpoint_list`. - ListId *SecurityExceptionsAPIExceptionListHumanId `json:"list_id,omitempty"` - Meta *SecurityExceptionsAPIExceptionListItemMeta `json:"meta,omitempty"` - - // Name Exception list name. - Name SecurityExceptionsAPIExceptionListItemName `json:"name"` - - // NamespaceType Determines whether the exception container is available in all Kibana spaces or just the space - // in which it is created, where: - // - // - `single`: Only available in the Kibana space in which it is created. - // - `agnostic`: Available in all Kibana spaces. - NamespaceType *SecurityExceptionsAPIExceptionNamespaceType `json:"namespace_type,omitempty"` - OsTypes *SecurityExceptionsAPIExceptionListItemOsTypeArray `json:"os_types,omitempty"` - Tags *SecurityExceptionsAPIExceptionListItemTags `json:"tags,omitempty"` - Type SecurityExceptionsAPIExceptionListItemType `json:"type"` -} - // FindExceptionListItemsParams defines parameters for FindExceptionListItems. type FindExceptionListItemsParams struct { // ListId The `list_id`s of the items to fetch. @@ -30866,100 +30683,6 @@ type GetFleetUninstallTokensParams struct { Page *float32 `form:"page,omitempty" json:"page,omitempty"` } -// DeleteListParams defines parameters for DeleteList. -type DeleteListParams struct { - Id SecurityListsAPIListId `form:"id" json:"id"` - - // DeleteReferences Determines whether exception items referencing this value list should be deleted. - DeleteReferences *bool `form:"deleteReferences,omitempty" json:"deleteReferences,omitempty"` - - // IgnoreReferences Determines whether to delete value list without performing any additional checks of where this list may be utilized. - IgnoreReferences *bool `form:"ignoreReferences,omitempty" json:"ignoreReferences,omitempty"` -} - -// ReadListParams defines parameters for ReadList. -type ReadListParams struct { - Id SecurityListsAPIListId `form:"id" json:"id"` -} - -// PatchListJSONBody defines parameters for PatchList. -type PatchListJSONBody struct { - // UnderscoreVersion The version id, normally returned by the API when the document is retrieved. Use it ensure updates are done against the latest version. - UnderscoreVersion *SecurityListsAPIListVersionId `json:"_version,omitempty"` - - // Description Describes the value list. - Description *SecurityListsAPIListDescription `json:"description,omitempty"` - - // Id Value list's identifier. - Id SecurityListsAPIListId `json:"id"` - - // Meta Placeholder for metadata about the value list. - Meta *SecurityListsAPIListMetadata `json:"meta,omitempty"` - - // Name Value list's name. - Name *SecurityListsAPIListName `json:"name,omitempty"` - - // Version The document version number. - Version *SecurityListsAPIListVersion `json:"version,omitempty"` -} - -// CreateListJSONBody defines parameters for CreateList. -type CreateListJSONBody struct { - // Description Describes the value list. - Description SecurityListsAPIListDescription `json:"description"` - - // Deserializer Determines how retrieved list item values are presented. By default list items are presented using these Handelbar expressions: - // - // - `{{{value}}}` - Single value item types, such as `ip`, `long`, `date`, `keyword`, and `text`. - // - `{{{gte}}}-{{{lte}}}` - Range value item types, such as `ip_range`, `double_range`, `float_range`, `integer_range`, and `long_range`. - // - `{{{gte}}},{{{lte}}}` - Date range values. - Deserializer *SecurityListsAPIListDeserializer `json:"deserializer,omitempty"` - - // Id Value list's identifier. - Id *SecurityListsAPIListId `json:"id,omitempty"` - - // Meta Placeholder for metadata about the value list. - Meta *SecurityListsAPIListMetadata `json:"meta,omitempty"` - - // Name Value list's name. - Name SecurityListsAPIListName `json:"name"` - - // Serializer Determines how uploaded list item values are parsed. By default, list items are parsed using these named regex groups: - // - // - `(?.+)` - Single value item types, such as ip, long, date, keyword, and text. - // - `(?.+)-(?.+)|(?.+)` - Range value item types, such as `date_range`, `ip_range`, `double_range`, `float_range`, `integer_range`, and `long_range`. - Serializer *SecurityListsAPIListSerializer `json:"serializer,omitempty"` - - // Type Specifies the Elasticsearch data type of excludes the list container holds. Some common examples: - // - // - `keyword`: Many ECS fields are Elasticsearch keywords - // - `ip`: IP addresses - // - `ip_range`: Range of IP addresses (supports IPv4, IPv6, and CIDR notation) - Type SecurityListsAPIListType `json:"type"` - Version *int `json:"version,omitempty"` -} - -// UpdateListJSONBody defines parameters for UpdateList. -type UpdateListJSONBody struct { - // UnderscoreVersion The version id, normally returned by the API when the document is retrieved. Use it ensure updates are done against the latest version. - UnderscoreVersion *SecurityListsAPIListVersionId `json:"_version,omitempty"` - - // Description Describes the value list. - Description SecurityListsAPIListDescription `json:"description"` - - // Id Value list's identifier. - Id SecurityListsAPIListId `json:"id"` - - // Meta Placeholder for metadata about the value list. - Meta *SecurityListsAPIListMetadata `json:"meta,omitempty"` - - // Name Value list's name. - Name SecurityListsAPIListName `json:"name"` - - // Version The document version number. - Version *SecurityListsAPIListVersion `json:"version,omitempty"` -} - // FindListsParams defines parameters for FindLists. type FindListsParams struct { // Page The page number to return. @@ -30985,93 +30708,6 @@ type FindListsParams struct { // FindListsParamsSortOrder defines parameters for FindLists. type FindListsParamsSortOrder string -// DeleteListItemParams defines parameters for DeleteListItem. -type DeleteListItemParams struct { - // Id Value list item's identifier. Required if `list_id` and `value` are not specified. - Id *SecurityListsAPIListItemId `form:"id,omitempty" json:"id,omitempty"` - - // ListId Value list's identifier. Required if `id` is not specified. - ListId *SecurityListsAPIListId `form:"list_id,omitempty" json:"list_id,omitempty"` - - // Value The value used to evaluate exceptions. Required if `id` is not specified. - Value *string `form:"value,omitempty" json:"value,omitempty"` - - // Refresh Determines when changes made by the request are made visible to search. - Refresh *DeleteListItemParamsRefresh `form:"refresh,omitempty" json:"refresh,omitempty"` -} - -// DeleteListItemParamsRefresh defines parameters for DeleteListItem. -type DeleteListItemParamsRefresh string - -// ReadListItemParams defines parameters for ReadListItem. -type ReadListItemParams struct { - // Id Value list item identifier. Required if `list_id` and `value` are not specified. - Id *SecurityListsAPIListId `form:"id,omitempty" json:"id,omitempty"` - - // ListId Value list item list's `id` identfier. Required if `id` is not specified. - ListId *SecurityListsAPIListId `form:"list_id,omitempty" json:"list_id,omitempty"` - - // Value The value used to evaluate exceptions. Required if `id` is not specified. - Value *string `form:"value,omitempty" json:"value,omitempty"` -} - -// PatchListItemJSONBody defines parameters for PatchListItem. -type PatchListItemJSONBody struct { - // UnderscoreVersion The version id, normally returned by the API when the document is retrieved. Use it ensure updates are done against the latest version. - UnderscoreVersion *SecurityListsAPIListVersionId `json:"_version,omitempty"` - - // Id Value list item's identifier. - Id SecurityListsAPIListItemId `json:"id"` - - // Meta Placeholder for metadata about the value list item. - Meta *SecurityListsAPIListItemMetadata `json:"meta,omitempty"` - - // Refresh Determines when changes made by the request are made visible to search. - Refresh *PatchListItemJSONBodyRefresh `json:"refresh,omitempty"` - - // Value The value used to evaluate exceptions. - Value *SecurityListsAPIListItemValue `json:"value,omitempty"` -} - -// PatchListItemJSONBodyRefresh defines parameters for PatchListItem. -type PatchListItemJSONBodyRefresh string - -// CreateListItemJSONBody defines parameters for CreateListItem. -type CreateListItemJSONBody struct { - // Id Value list item's identifier. - Id *SecurityListsAPIListItemId `json:"id,omitempty"` - - // ListId Value list's identifier. - ListId SecurityListsAPIListId `json:"list_id"` - - // Meta Placeholder for metadata about the value list item. - Meta *SecurityListsAPIListItemMetadata `json:"meta,omitempty"` - - // Refresh Determines when changes made by the request are made visible to search. - Refresh *CreateListItemJSONBodyRefresh `json:"refresh,omitempty"` - - // Value The value used to evaluate exceptions. - Value SecurityListsAPIListItemValue `json:"value"` -} - -// CreateListItemJSONBodyRefresh defines parameters for CreateListItem. -type CreateListItemJSONBodyRefresh string - -// UpdateListItemJSONBody defines parameters for UpdateListItem. -type UpdateListItemJSONBody struct { - // UnderscoreVersion The version id, normally returned by the API when the document is retrieved. Use it ensure updates are done against the latest version. - UnderscoreVersion *SecurityListsAPIListVersionId `json:"_version,omitempty"` - - // Id Value list item's identifier. - Id SecurityListsAPIListItemId `json:"id"` - - // Meta Placeholder for metadata about the value list item. - Meta *SecurityListsAPIListItemMetadata `json:"meta,omitempty"` - - // Value The value used to evaluate exceptions. - Value SecurityListsAPIListItemValue `json:"value"` -} - // ExportListItemsParams defines parameters for ExportListItems. type ExportListItemsParams struct { // ListId Value list's `id` to export. @@ -47332,6 +46968,370 @@ type ReadRuleParams struct { RuleId *SecurityDetectionsAPIRuleSignatureId `form:"rule_id,omitempty" json:"rule_id,omitempty"` } +// DeleteExceptionListParams defines parameters for DeleteExceptionList. +type DeleteExceptionListParams struct { + // Id Exception list's identifier. Either `id` or `list_id` must be specified. + Id *SecurityExceptionsAPIExceptionListId `form:"id,omitempty" json:"id,omitempty"` + + // ListId Human readable exception list string identifier, e.g. `trusted-linux-processes`. Either `id` or `list_id` must be specified. + ListId *SecurityExceptionsAPIExceptionListHumanId `form:"list_id,omitempty" json:"list_id,omitempty"` + NamespaceType *SecurityExceptionsAPIExceptionNamespaceType `form:"namespace_type,omitempty" json:"namespace_type,omitempty"` +} + +// ReadExceptionListParams defines parameters for ReadExceptionList. +type ReadExceptionListParams struct { + // Id Exception list's identifier. Either `id` or `list_id` must be specified. + Id *SecurityExceptionsAPIExceptionListId `form:"id,omitempty" json:"id,omitempty"` + + // ListId Human readable exception list string identifier, e.g. `trusted-linux-processes`. Either `id` or `list_id` must be specified. + ListId *SecurityExceptionsAPIExceptionListHumanId `form:"list_id,omitempty" json:"list_id,omitempty"` + NamespaceType *SecurityExceptionsAPIExceptionNamespaceType `form:"namespace_type,omitempty" json:"namespace_type,omitempty"` +} + +// CreateExceptionListJSONBody defines parameters for CreateExceptionList. +type CreateExceptionListJSONBody struct { + // Description Describes the exception list. + Description SecurityExceptionsAPIExceptionListDescription `json:"description"` + + // ListId The exception list's human readable string identifier, `endpoint_list`. + ListId *SecurityExceptionsAPIExceptionListHumanId `json:"list_id,omitempty"` + + // Meta Placeholder for metadata about the list container. + Meta *SecurityExceptionsAPIExceptionListMeta `json:"meta,omitempty"` + + // Name The name of the exception list. + Name SecurityExceptionsAPIExceptionListName `json:"name"` + + // NamespaceType Determines whether the exception container is available in all Kibana spaces or just the space + // in which it is created, where: + // + // - `single`: Only available in the Kibana space in which it is created. + // - `agnostic`: Available in all Kibana spaces. + NamespaceType *SecurityExceptionsAPIExceptionNamespaceType `json:"namespace_type,omitempty"` + + // OsTypes Use this field to specify the operating system. Only enter one value. + OsTypes *SecurityExceptionsAPIExceptionListOsTypeArray `json:"os_types,omitempty"` + + // Tags String array containing words and phrases to help categorize exception containers. + Tags *SecurityExceptionsAPIExceptionListTags `json:"tags,omitempty"` + + // Type The type of exception list to be created. Different list types may denote where they can be utilized. + Type SecurityExceptionsAPIExceptionListType `json:"type"` + + // Version The document version, automatically increasd on updates. + Version *SecurityExceptionsAPIExceptionListVersion `json:"version,omitempty"` +} + +// UpdateExceptionListJSONBody defines parameters for UpdateExceptionList. +type UpdateExceptionListJSONBody 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. + UnderscoreVersion *string `json:"_version,omitempty"` + + // Description Describes the exception list. + Description SecurityExceptionsAPIExceptionListDescription `json:"description"` + + // Id Exception list's identifier. + Id *SecurityExceptionsAPIExceptionListId `json:"id,omitempty"` + + // ListId The exception list's human readable string identifier, `endpoint_list`. + ListId *SecurityExceptionsAPIExceptionListHumanId `json:"list_id,omitempty"` + + // Meta Placeholder for metadata about the list container. + Meta *SecurityExceptionsAPIExceptionListMeta `json:"meta,omitempty"` + + // Name The name of the exception list. + Name SecurityExceptionsAPIExceptionListName `json:"name"` + + // NamespaceType Determines whether the exception container is available in all Kibana spaces or just the space + // in which it is created, where: + // + // - `single`: Only available in the Kibana space in which it is created. + // - `agnostic`: Available in all Kibana spaces. + NamespaceType *SecurityExceptionsAPIExceptionNamespaceType `json:"namespace_type,omitempty"` + + // OsTypes Use this field to specify the operating system. Only enter one value. + OsTypes *SecurityExceptionsAPIExceptionListOsTypeArray `json:"os_types,omitempty"` + + // Tags String array containing words and phrases to help categorize exception containers. + Tags *SecurityExceptionsAPIExceptionListTags `json:"tags,omitempty"` + + // Type The type of exception list to be created. Different list types may denote where they can be utilized. + Type SecurityExceptionsAPIExceptionListType `json:"type"` + + // Version The document version, automatically increasd on updates. + Version *SecurityExceptionsAPIExceptionListVersion `json:"version,omitempty"` +} + +// DeleteExceptionListItemParams defines parameters for DeleteExceptionListItem. +type DeleteExceptionListItemParams struct { + // Id Exception item's identifier. Either `id` or `item_id` must be specified + Id *SecurityExceptionsAPIExceptionListItemId `form:"id,omitempty" json:"id,omitempty"` + + // ItemId Human readable exception item string identifier, e.g. `trusted-linux-processes`. Either `id` or `item_id` must be specified + ItemId *SecurityExceptionsAPIExceptionListItemHumanId `form:"item_id,omitempty" json:"item_id,omitempty"` + NamespaceType *SecurityExceptionsAPIExceptionNamespaceType `form:"namespace_type,omitempty" json:"namespace_type,omitempty"` +} + +// ReadExceptionListItemParams defines parameters for ReadExceptionListItem. +type ReadExceptionListItemParams struct { + // Id Exception list item's identifier. Either `id` or `item_id` must be specified. + Id *SecurityExceptionsAPIExceptionListItemId `form:"id,omitempty" json:"id,omitempty"` + + // ItemId Human readable exception item string identifier, e.g. `trusted-linux-processes`. Either `id` or `item_id` must be specified. + ItemId *SecurityExceptionsAPIExceptionListItemHumanId `form:"item_id,omitempty" json:"item_id,omitempty"` + NamespaceType *SecurityExceptionsAPIExceptionNamespaceType `form:"namespace_type,omitempty" json:"namespace_type,omitempty"` +} + +// CreateExceptionListItemJSONBody defines parameters for CreateExceptionListItem. +type CreateExceptionListItemJSONBody struct { + Comments *SecurityExceptionsAPICreateExceptionListItemCommentArray `json:"comments,omitempty"` + + // Description Describes the exception list. + Description SecurityExceptionsAPIExceptionListItemDescription `json:"description"` + Entries SecurityExceptionsAPIExceptionListItemEntryArray `json:"entries"` + + // ExpireTime The exception item’s expiration date, in ISO format. This field is only available for regular exception items, not endpoint exceptions. + ExpireTime *SecurityExceptionsAPIExceptionListItemExpireTime `json:"expire_time,omitempty"` + + // ItemId Human readable string identifier, e.g. `trusted-linux-processes` + ItemId *SecurityExceptionsAPIExceptionListItemHumanId `json:"item_id,omitempty"` + + // ListId The exception list's human readable string identifier, `endpoint_list`. + ListId SecurityExceptionsAPIExceptionListHumanId `json:"list_id"` + Meta *SecurityExceptionsAPIExceptionListItemMeta `json:"meta,omitempty"` + + // Name Exception list name. + Name SecurityExceptionsAPIExceptionListItemName `json:"name"` + + // NamespaceType Determines whether the exception container is available in all Kibana spaces or just the space + // in which it is created, where: + // + // - `single`: Only available in the Kibana space in which it is created. + // - `agnostic`: Available in all Kibana spaces. + NamespaceType *SecurityExceptionsAPIExceptionNamespaceType `json:"namespace_type,omitempty"` + OsTypes *SecurityExceptionsAPIExceptionListItemOsTypeArray `json:"os_types,omitempty"` + Tags *SecurityExceptionsAPIExceptionListItemTags `json:"tags,omitempty"` + Type SecurityExceptionsAPIExceptionListItemType `json:"type"` +} + +// UpdateExceptionListItemJSONBody defines parameters for UpdateExceptionListItem. +type UpdateExceptionListItemJSONBody 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. + UnderscoreVersion *string `json:"_version,omitempty"` + Comments *SecurityExceptionsAPIUpdateExceptionListItemCommentArray `json:"comments,omitempty"` + + // Description Describes the exception list. + Description SecurityExceptionsAPIExceptionListItemDescription `json:"description"` + Entries SecurityExceptionsAPIExceptionListItemEntryArray `json:"entries"` + + // ExpireTime The exception item’s expiration date, in ISO format. This field is only available for regular exception items, not endpoint exceptions. + ExpireTime *SecurityExceptionsAPIExceptionListItemExpireTime `json:"expire_time,omitempty"` + + // Id Exception's identifier. + Id *SecurityExceptionsAPIExceptionListItemId `json:"id,omitempty"` + + // ItemId Human readable string identifier, e.g. `trusted-linux-processes` + ItemId *SecurityExceptionsAPIExceptionListItemHumanId `json:"item_id,omitempty"` + + // ListId The exception list's human readable string identifier, `endpoint_list`. + ListId *SecurityExceptionsAPIExceptionListHumanId `json:"list_id,omitempty"` + Meta *SecurityExceptionsAPIExceptionListItemMeta `json:"meta,omitempty"` + + // Name Exception list name. + Name SecurityExceptionsAPIExceptionListItemName `json:"name"` + + // NamespaceType Determines whether the exception container is available in all Kibana spaces or just the space + // in which it is created, where: + // + // - `single`: Only available in the Kibana space in which it is created. + // - `agnostic`: Available in all Kibana spaces. + NamespaceType *SecurityExceptionsAPIExceptionNamespaceType `json:"namespace_type,omitempty"` + OsTypes *SecurityExceptionsAPIExceptionListItemOsTypeArray `json:"os_types,omitempty"` + Tags *SecurityExceptionsAPIExceptionListItemTags `json:"tags,omitempty"` + Type SecurityExceptionsAPIExceptionListItemType `json:"type"` +} + +// DeleteListParams defines parameters for DeleteList. +type DeleteListParams struct { + Id SecurityListsAPIListId `form:"id" json:"id"` + + // DeleteReferences Determines whether exception items referencing this value list should be deleted. + DeleteReferences *bool `form:"deleteReferences,omitempty" json:"deleteReferences,omitempty"` + + // IgnoreReferences Determines whether to delete value list without performing any additional checks of where this list may be utilized. + IgnoreReferences *bool `form:"ignoreReferences,omitempty" json:"ignoreReferences,omitempty"` +} + +// ReadListParams defines parameters for ReadList. +type ReadListParams struct { + Id SecurityListsAPIListId `form:"id" json:"id"` +} + +// PatchListJSONBody defines parameters for PatchList. +type PatchListJSONBody struct { + // UnderscoreVersion The version id, normally returned by the API when the document is retrieved. Use it ensure updates are done against the latest version. + UnderscoreVersion *SecurityListsAPIListVersionId `json:"_version,omitempty"` + + // Description Describes the value list. + Description *SecurityListsAPIListDescription `json:"description,omitempty"` + + // Id Value list's identifier. + Id SecurityListsAPIListId `json:"id"` + + // Meta Placeholder for metadata about the value list. + Meta *SecurityListsAPIListMetadata `json:"meta,omitempty"` + + // Name Value list's name. + Name *SecurityListsAPIListName `json:"name,omitempty"` + + // Version The document version number. + Version *SecurityListsAPIListVersion `json:"version,omitempty"` +} + +// CreateListJSONBody defines parameters for CreateList. +type CreateListJSONBody struct { + // Description Describes the value list. + Description SecurityListsAPIListDescription `json:"description"` + + // Deserializer Determines how retrieved list item values are presented. By default list items are presented using these Handelbar expressions: + // + // - `{{{value}}}` - Single value item types, such as `ip`, `long`, `date`, `keyword`, and `text`. + // - `{{{gte}}}-{{{lte}}}` - Range value item types, such as `ip_range`, `double_range`, `float_range`, `integer_range`, and `long_range`. + // - `{{{gte}}},{{{lte}}}` - Date range values. + Deserializer *SecurityListsAPIListDeserializer `json:"deserializer,omitempty"` + + // Id Value list's identifier. + Id *SecurityListsAPIListId `json:"id,omitempty"` + + // Meta Placeholder for metadata about the value list. + Meta *SecurityListsAPIListMetadata `json:"meta,omitempty"` + + // Name Value list's name. + Name SecurityListsAPIListName `json:"name"` + + // Serializer Determines how uploaded list item values are parsed. By default, list items are parsed using these named regex groups: + // + // - `(?.+)` - Single value item types, such as ip, long, date, keyword, and text. + // - `(?.+)-(?.+)|(?.+)` - Range value item types, such as `date_range`, `ip_range`, `double_range`, `float_range`, `integer_range`, and `long_range`. + Serializer *SecurityListsAPIListSerializer `json:"serializer,omitempty"` + + // Type Specifies the Elasticsearch data type of excludes the list container holds. Some common examples: + // + // - `keyword`: Many ECS fields are Elasticsearch keywords + // - `ip`: IP addresses + // - `ip_range`: Range of IP addresses (supports IPv4, IPv6, and CIDR notation) + Type SecurityListsAPIListType `json:"type"` + Version *int `json:"version,omitempty"` +} + +// UpdateListJSONBody defines parameters for UpdateList. +type UpdateListJSONBody struct { + // UnderscoreVersion The version id, normally returned by the API when the document is retrieved. Use it ensure updates are done against the latest version. + UnderscoreVersion *SecurityListsAPIListVersionId `json:"_version,omitempty"` + + // Description Describes the value list. + Description SecurityListsAPIListDescription `json:"description"` + + // Id Value list's identifier. + Id SecurityListsAPIListId `json:"id"` + + // Meta Placeholder for metadata about the value list. + Meta *SecurityListsAPIListMetadata `json:"meta,omitempty"` + + // Name Value list's name. + Name SecurityListsAPIListName `json:"name"` + + // Version The document version number. + Version *SecurityListsAPIListVersion `json:"version,omitempty"` +} + +// DeleteListItemParams defines parameters for DeleteListItem. +type DeleteListItemParams struct { + // Id Value list item's identifier. Required if `list_id` and `value` are not specified. + Id *SecurityListsAPIListItemId `form:"id,omitempty" json:"id,omitempty"` + + // ListId Value list's identifier. Required if `id` is not specified. + ListId *SecurityListsAPIListId `form:"list_id,omitempty" json:"list_id,omitempty"` + + // Value The value used to evaluate exceptions. Required if `id` is not specified. + Value *string `form:"value,omitempty" json:"value,omitempty"` + + // Refresh Determines when changes made by the request are made visible to search. + Refresh *DeleteListItemParamsRefresh `form:"refresh,omitempty" json:"refresh,omitempty"` +} + +// DeleteListItemParamsRefresh defines parameters for DeleteListItem. +type DeleteListItemParamsRefresh string + +// ReadListItemParams defines parameters for ReadListItem. +type ReadListItemParams struct { + // Id Value list item identifier. Required if `list_id` and `value` are not specified. + Id *SecurityListsAPIListId `form:"id,omitempty" json:"id,omitempty"` + + // ListId Value list item list's `id` identfier. Required if `id` is not specified. + ListId *SecurityListsAPIListId `form:"list_id,omitempty" json:"list_id,omitempty"` + + // Value The value used to evaluate exceptions. Required if `id` is not specified. + Value *string `form:"value,omitempty" json:"value,omitempty"` +} + +// PatchListItemJSONBody defines parameters for PatchListItem. +type PatchListItemJSONBody struct { + // UnderscoreVersion The version id, normally returned by the API when the document is retrieved. Use it ensure updates are done against the latest version. + UnderscoreVersion *SecurityListsAPIListVersionId `json:"_version,omitempty"` + + // Id Value list item's identifier. + Id SecurityListsAPIListItemId `json:"id"` + + // Meta Placeholder for metadata about the value list item. + Meta *SecurityListsAPIListItemMetadata `json:"meta,omitempty"` + + // Refresh Determines when changes made by the request are made visible to search. + Refresh *PatchListItemJSONBodyRefresh `json:"refresh,omitempty"` + + // Value The value used to evaluate exceptions. + Value *SecurityListsAPIListItemValue `json:"value,omitempty"` +} + +// PatchListItemJSONBodyRefresh defines parameters for PatchListItem. +type PatchListItemJSONBodyRefresh string + +// CreateListItemJSONBody defines parameters for CreateListItem. +type CreateListItemJSONBody struct { + // Id Value list item's identifier. + Id *SecurityListsAPIListItemId `json:"id,omitempty"` + + // ListId Value list's identifier. + ListId SecurityListsAPIListId `json:"list_id"` + + // Meta Placeholder for metadata about the value list item. + Meta *SecurityListsAPIListItemMetadata `json:"meta,omitempty"` + + // Refresh Determines when changes made by the request are made visible to search. + Refresh *CreateListItemJSONBodyRefresh `json:"refresh,omitempty"` + + // Value The value used to evaluate exceptions. + Value SecurityListsAPIListItemValue `json:"value"` +} + +// CreateListItemJSONBodyRefresh defines parameters for CreateListItem. +type CreateListItemJSONBodyRefresh string + +// UpdateListItemJSONBody defines parameters for UpdateListItem. +type UpdateListItemJSONBody struct { + // UnderscoreVersion The version id, normally returned by the API when the document is retrieved. Use it ensure updates are done against the latest version. + UnderscoreVersion *SecurityListsAPIListVersionId `json:"_version,omitempty"` + + // Id Value list item's identifier. + Id SecurityListsAPIListItemId `json:"id"` + + // Meta Placeholder for metadata about the value list item. + Meta *SecurityListsAPIListItemMetadata `json:"meta,omitempty"` + + // Value The value used to evaluate exceptions. + Value SecurityListsAPIListItemValue `json:"value"` +} + // PostMaintenanceWindowJSONBody defines parameters for PostMaintenanceWindow. type PostMaintenanceWindowJSONBody struct { // Enabled Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications. @@ -47716,21 +47716,9 @@ type DeleteSingleEntityJSONRequestBody DeleteSingleEntityJSONBody // UpsertEntityJSONRequestBody defines body for UpsertEntity for application/json ContentType. type UpsertEntityJSONRequestBody = SecurityEntityAnalyticsAPIEntity -// CreateExceptionListJSONRequestBody defines body for CreateExceptionList for application/json ContentType. -type CreateExceptionListJSONRequestBody CreateExceptionListJSONBody - -// UpdateExceptionListJSONRequestBody defines body for UpdateExceptionList for application/json ContentType. -type UpdateExceptionListJSONRequestBody UpdateExceptionListJSONBody - // ImportExceptionListMultipartRequestBody defines body for ImportExceptionList for multipart/form-data ContentType. type ImportExceptionListMultipartRequestBody ImportExceptionListMultipartBody -// CreateExceptionListItemJSONRequestBody defines body for CreateExceptionListItem for application/json ContentType. -type CreateExceptionListItemJSONRequestBody CreateExceptionListItemJSONBody - -// UpdateExceptionListItemJSONRequestBody defines body for UpdateExceptionListItem for application/json ContentType. -type UpdateExceptionListItemJSONRequestBody UpdateExceptionListItemJSONBody - // CreateSharedExceptionListJSONRequestBody defines body for CreateSharedExceptionList for application/json ContentType. type CreateSharedExceptionListJSONRequestBody CreateSharedExceptionListJSONBody @@ -47896,24 +47884,6 @@ type PutFleetSettingsJSONRequestBody PutFleetSettingsJSONBody // PutFleetSpaceSettingsJSONRequestBody defines body for PutFleetSpaceSettings for application/json ContentType. type PutFleetSpaceSettingsJSONRequestBody PutFleetSpaceSettingsJSONBody -// PatchListJSONRequestBody defines body for PatchList for application/json ContentType. -type PatchListJSONRequestBody PatchListJSONBody - -// CreateListJSONRequestBody defines body for CreateList for application/json ContentType. -type CreateListJSONRequestBody CreateListJSONBody - -// UpdateListJSONRequestBody defines body for UpdateList for application/json ContentType. -type UpdateListJSONRequestBody UpdateListJSONBody - -// PatchListItemJSONRequestBody defines body for PatchListItem for application/json ContentType. -type PatchListItemJSONRequestBody PatchListItemJSONBody - -// CreateListItemJSONRequestBody defines body for CreateListItem for application/json ContentType. -type CreateListItemJSONRequestBody CreateListItemJSONBody - -// UpdateListItemJSONRequestBody defines body for UpdateListItem for application/json ContentType. -type UpdateListItemJSONRequestBody UpdateListItemJSONBody - // ImportListItemsMultipartRequestBody defines body for ImportListItems for multipart/form-data ContentType. type ImportListItemsMultipartRequestBody ImportListItemsMultipartBody @@ -48208,6 +48178,36 @@ type CreateRuleJSONRequestBody = SecurityDetectionsAPIRuleCreateProps // UpdateRuleJSONRequestBody defines body for UpdateRule for application/json ContentType. type UpdateRuleJSONRequestBody = SecurityDetectionsAPIRuleUpdateProps +// CreateExceptionListJSONRequestBody defines body for CreateExceptionList for application/json ContentType. +type CreateExceptionListJSONRequestBody CreateExceptionListJSONBody + +// UpdateExceptionListJSONRequestBody defines body for UpdateExceptionList for application/json ContentType. +type UpdateExceptionListJSONRequestBody UpdateExceptionListJSONBody + +// CreateExceptionListItemJSONRequestBody defines body for CreateExceptionListItem for application/json ContentType. +type CreateExceptionListItemJSONRequestBody CreateExceptionListItemJSONBody + +// UpdateExceptionListItemJSONRequestBody defines body for UpdateExceptionListItem for application/json ContentType. +type UpdateExceptionListItemJSONRequestBody UpdateExceptionListItemJSONBody + +// PatchListJSONRequestBody defines body for PatchList for application/json ContentType. +type PatchListJSONRequestBody PatchListJSONBody + +// CreateListJSONRequestBody defines body for CreateList for application/json ContentType. +type CreateListJSONRequestBody CreateListJSONBody + +// UpdateListJSONRequestBody defines body for UpdateList for application/json ContentType. +type UpdateListJSONRequestBody UpdateListJSONBody + +// PatchListItemJSONRequestBody defines body for PatchListItem for application/json ContentType. +type PatchListItemJSONRequestBody PatchListItemJSONBody + +// CreateListItemJSONRequestBody defines body for CreateListItem for application/json ContentType. +type CreateListItemJSONRequestBody CreateListItemJSONBody + +// UpdateListItemJSONRequestBody defines body for UpdateListItem for application/json ContentType. +type UpdateListItemJSONRequestBody UpdateListItemJSONBody + // PostMaintenanceWindowJSONRequestBody defines body for PostMaintenanceWindow for application/json ContentType. type PostMaintenanceWindowJSONRequestBody PostMaintenanceWindowJSONBody @@ -60720,7 +60720,7 @@ func (t SLOsIndicatorPropertiesTimesliceMetric_Params_Metric_Metrics_Item) AsSLO // FromSLOsTimesliceMetricBasicMetricWithField overwrites any union data inside the SLOsIndicatorPropertiesTimesliceMetric_Params_Metric_Metrics_Item as the provided SLOsTimesliceMetricBasicMetricWithField func (t *SLOsIndicatorPropertiesTimesliceMetric_Params_Metric_Metrics_Item) FromSLOsTimesliceMetricBasicMetricWithField(v SLOsTimesliceMetricBasicMetricWithField) error { - v.Aggregation = "avg" + v.Aggregation = "cardinality" b, err := json.Marshal(v) t.union = b return err @@ -60728,7 +60728,7 @@ func (t *SLOsIndicatorPropertiesTimesliceMetric_Params_Metric_Metrics_Item) From // MergeSLOsTimesliceMetricBasicMetricWithField performs a merge with any union data inside the SLOsIndicatorPropertiesTimesliceMetric_Params_Metric_Metrics_Item, using the provided SLOsTimesliceMetricBasicMetricWithField func (t *SLOsIndicatorPropertiesTimesliceMetric_Params_Metric_Metrics_Item) MergeSLOsTimesliceMetricBasicMetricWithField(v SLOsTimesliceMetricBasicMetricWithField) error { - v.Aggregation = "avg" + v.Aggregation = "cardinality" b, err := json.Marshal(v) if err != nil { return err @@ -60809,7 +60809,7 @@ func (t SLOsIndicatorPropertiesTimesliceMetric_Params_Metric_Metrics_Item) Value return nil, err } switch discriminator { - case "avg": + case "cardinality": return t.AsSLOsTimesliceMetricBasicMetricWithField() case "doc_count": return t.AsSLOsTimesliceMetricDocCountMetric() @@ -75379,22 +75379,6 @@ type ClientInterface interface { // GetEntityStoreStatus request GetEntityStoreStatus(ctx context.Context, params *GetEntityStoreStatusParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeleteExceptionList request - DeleteExceptionList(ctx context.Context, params *DeleteExceptionListParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // ReadExceptionList request - ReadExceptionList(ctx context.Context, params *ReadExceptionListParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // CreateExceptionListWithBody request with any body - CreateExceptionListWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreateExceptionList(ctx context.Context, body CreateExceptionListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // UpdateExceptionListWithBody request with any body - UpdateExceptionListWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - UpdateExceptionList(ctx context.Context, body UpdateExceptionListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // DuplicateExceptionList request DuplicateExceptionList(ctx context.Context, params *DuplicateExceptionListParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -75407,22 +75391,6 @@ type ClientInterface interface { // ImportExceptionListWithBody request with any body ImportExceptionListWithBody(ctx context.Context, params *ImportExceptionListParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeleteExceptionListItem request - DeleteExceptionListItem(ctx context.Context, params *DeleteExceptionListItemParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // ReadExceptionListItem request - ReadExceptionListItem(ctx context.Context, params *ReadExceptionListItemParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // CreateExceptionListItemWithBody request with any body - CreateExceptionListItemWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreateExceptionListItem(ctx context.Context, body CreateExceptionListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // UpdateExceptionListItemWithBody request with any body - UpdateExceptionListItemWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - UpdateExceptionListItem(ctx context.Context, body UpdateExceptionListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // FindExceptionListItems request FindExceptionListItems(ctx context.Context, params *FindExceptionListItemsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -75929,60 +75897,9 @@ type ClientInterface interface { // GetFleetUninstallTokensUninstalltokenid request GetFleetUninstallTokensUninstalltokenid(ctx context.Context, uninstallTokenId string, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeleteList request - DeleteList(ctx context.Context, params *DeleteListParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // ReadList request - ReadList(ctx context.Context, params *ReadListParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchListWithBody request with any body - PatchListWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchList(ctx context.Context, body PatchListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // CreateListWithBody request with any body - CreateListWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreateList(ctx context.Context, body CreateListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // UpdateListWithBody request with any body - UpdateListWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - UpdateList(ctx context.Context, body UpdateListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // FindLists request FindLists(ctx context.Context, params *FindListsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeleteListIndex request - DeleteListIndex(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // ReadListIndex request - ReadListIndex(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // CreateListIndex request - CreateListIndex(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteListItem request - DeleteListItem(ctx context.Context, params *DeleteListItemParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // ReadListItem request - ReadListItem(ctx context.Context, params *ReadListItemParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchListItemWithBody request with any body - PatchListItemWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchListItem(ctx context.Context, body PatchListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // CreateListItemWithBody request with any body - CreateListItemWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - CreateListItem(ctx context.Context, body CreateListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // UpdateListItemWithBody request with any body - UpdateListItemWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - UpdateListItem(ctx context.Context, body UpdateListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // ExportListItems request ExportListItems(ctx context.Context, params *ExportListItemsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -76678,6 +76595,89 @@ type ClientInterface interface { UpdateRule(ctx context.Context, spaceId SpaceId, body UpdateRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteExceptionList request + DeleteExceptionList(ctx context.Context, spaceId SpaceId, params *DeleteExceptionListParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ReadExceptionList request + ReadExceptionList(ctx context.Context, spaceId SpaceId, params *ReadExceptionListParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateExceptionListWithBody request with any body + CreateExceptionListWithBody(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateExceptionList(ctx context.Context, spaceId SpaceId, body CreateExceptionListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateExceptionListWithBody request with any body + UpdateExceptionListWithBody(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateExceptionList(ctx context.Context, spaceId SpaceId, body UpdateExceptionListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteExceptionListItem request + DeleteExceptionListItem(ctx context.Context, spaceId SpaceId, params *DeleteExceptionListItemParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ReadExceptionListItem request + ReadExceptionListItem(ctx context.Context, spaceId SpaceId, params *ReadExceptionListItemParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateExceptionListItemWithBody request with any body + CreateExceptionListItemWithBody(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateExceptionListItem(ctx context.Context, spaceId SpaceId, body CreateExceptionListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateExceptionListItemWithBody request with any body + UpdateExceptionListItemWithBody(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateExceptionListItem(ctx context.Context, spaceId SpaceId, body UpdateExceptionListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteList request + DeleteList(ctx context.Context, spaceId SpaceId, params *DeleteListParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ReadList request + ReadList(ctx context.Context, spaceId SpaceId, params *ReadListParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchListWithBody request with any body + PatchListWithBody(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchList(ctx context.Context, spaceId SpaceId, body PatchListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateListWithBody request with any body + CreateListWithBody(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateList(ctx context.Context, spaceId SpaceId, body CreateListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateListWithBody request with any body + UpdateListWithBody(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateList(ctx context.Context, spaceId SpaceId, body UpdateListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteListIndex request + DeleteListIndex(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ReadListIndex request + ReadListIndex(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateListIndex request + CreateListIndex(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteListItem request + DeleteListItem(ctx context.Context, spaceId SpaceId, params *DeleteListItemParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ReadListItem request + ReadListItem(ctx context.Context, spaceId SpaceId, params *ReadListItemParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchListItemWithBody request with any body + PatchListItemWithBody(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchListItem(ctx context.Context, spaceId SpaceId, body PatchListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateListItemWithBody request with any body + CreateListItemWithBody(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateListItem(ctx context.Context, spaceId SpaceId, body CreateListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateListItemWithBody request with any body + UpdateListItemWithBody(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateListItem(ctx context.Context, spaceId SpaceId, body UpdateListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // PostMaintenanceWindowWithBody request with any body PostMaintenanceWindowWithBody(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -79732,78 +79732,6 @@ func (c *Client) GetEntityStoreStatus(ctx context.Context, params *GetEntityStor return c.Client.Do(req) } -func (c *Client) DeleteExceptionList(ctx context.Context, params *DeleteExceptionListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteExceptionListRequest(c.Server, params) - 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) ReadExceptionList(ctx context.Context, params *ReadExceptionListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewReadExceptionListRequest(c.Server, params) - 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) CreateExceptionListWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateExceptionListRequestWithBody(c.Server, 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) CreateExceptionList(ctx context.Context, body CreateExceptionListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateExceptionListRequest(c.Server, 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) UpdateExceptionListWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateExceptionListRequestWithBody(c.Server, 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) UpdateExceptionList(ctx context.Context, body UpdateExceptionListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateExceptionListRequest(c.Server, 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) DuplicateExceptionList(ctx context.Context, params *DuplicateExceptionListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewDuplicateExceptionListRequest(c.Server, params) if err != nil { @@ -79852,78 +79780,6 @@ func (c *Client) ImportExceptionListWithBody(ctx context.Context, params *Import return c.Client.Do(req) } -func (c *Client) DeleteExceptionListItem(ctx context.Context, params *DeleteExceptionListItemParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteExceptionListItemRequest(c.Server, params) - 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) ReadExceptionListItem(ctx context.Context, params *ReadExceptionListItemParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewReadExceptionListItemRequest(c.Server, params) - 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) CreateExceptionListItemWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateExceptionListItemRequestWithBody(c.Server, 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) CreateExceptionListItem(ctx context.Context, body CreateExceptionListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateExceptionListItemRequest(c.Server, 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) UpdateExceptionListItemWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateExceptionListItemRequestWithBody(c.Server, 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) UpdateExceptionListItem(ctx context.Context, body UpdateExceptionListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateExceptionListItemRequest(c.Server, 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) FindExceptionListItems(ctx context.Context, params *FindExceptionListItemsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewFindExceptionListItemsRequest(c.Server, params) if err != nil { @@ -82168,102 +82024,6 @@ func (c *Client) GetFleetUninstallTokensUninstalltokenid(ctx context.Context, un return c.Client.Do(req) } -func (c *Client) DeleteList(ctx context.Context, params *DeleteListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteListRequest(c.Server, params) - 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) ReadList(ctx context.Context, params *ReadListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewReadListRequest(c.Server, params) - 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) PatchListWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchListRequestWithBody(c.Server, 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) PatchList(ctx context.Context, body PatchListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchListRequest(c.Server, 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) CreateListWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateListRequestWithBody(c.Server, 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) CreateList(ctx context.Context, body CreateListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateListRequest(c.Server, 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) UpdateListWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateListRequestWithBody(c.Server, 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) UpdateList(ctx context.Context, body UpdateListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateListRequest(c.Server, 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) FindLists(ctx context.Context, params *FindListsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewFindListsRequest(c.Server, params) if err != nil { @@ -82276,138 +82036,6 @@ func (c *Client) FindLists(ctx context.Context, params *FindListsParams, reqEdit return c.Client.Do(req) } -func (c *Client) DeleteListIndex(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteListIndexRequest(c.Server) - 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) ReadListIndex(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewReadListIndexRequest(c.Server) - 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) CreateListIndex(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateListIndexRequest(c.Server) - 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) DeleteListItem(ctx context.Context, params *DeleteListItemParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteListItemRequest(c.Server, params) - 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) ReadListItem(ctx context.Context, params *ReadListItemParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewReadListItemRequest(c.Server, params) - 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) PatchListItemWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchListItemRequestWithBody(c.Server, 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) PatchListItem(ctx context.Context, body PatchListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchListItemRequest(c.Server, 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) CreateListItemWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateListItemRequestWithBody(c.Server, 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) CreateListItem(ctx context.Context, body CreateListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateListItemRequest(c.Server, 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) UpdateListItemWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateListItemRequestWithBody(c.Server, 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) UpdateListItem(ctx context.Context, body UpdateListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateListItemRequest(c.Server, 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) ExportListItems(ctx context.Context, params *ExportListItemsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewExportListItemsRequest(c.Server, params) if err != nil { @@ -85564,6 +85192,378 @@ func (c *Client) UpdateRule(ctx context.Context, spaceId SpaceId, body UpdateRul return c.Client.Do(req) } +func (c *Client) DeleteExceptionList(ctx context.Context, spaceId SpaceId, params *DeleteExceptionListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteExceptionListRequest(c.Server, spaceId, params) + 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) ReadExceptionList(ctx context.Context, spaceId SpaceId, params *ReadExceptionListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewReadExceptionListRequest(c.Server, spaceId, params) + 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) CreateExceptionListWithBody(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateExceptionListRequestWithBody(c.Server, spaceId, 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) CreateExceptionList(ctx context.Context, spaceId SpaceId, body CreateExceptionListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateExceptionListRequest(c.Server, spaceId, 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) UpdateExceptionListWithBody(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateExceptionListRequestWithBody(c.Server, spaceId, 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) UpdateExceptionList(ctx context.Context, spaceId SpaceId, body UpdateExceptionListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateExceptionListRequest(c.Server, spaceId, 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) DeleteExceptionListItem(ctx context.Context, spaceId SpaceId, params *DeleteExceptionListItemParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteExceptionListItemRequest(c.Server, spaceId, params) + 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) ReadExceptionListItem(ctx context.Context, spaceId SpaceId, params *ReadExceptionListItemParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewReadExceptionListItemRequest(c.Server, spaceId, params) + 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) CreateExceptionListItemWithBody(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateExceptionListItemRequestWithBody(c.Server, spaceId, 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) CreateExceptionListItem(ctx context.Context, spaceId SpaceId, body CreateExceptionListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateExceptionListItemRequest(c.Server, spaceId, 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) UpdateExceptionListItemWithBody(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateExceptionListItemRequestWithBody(c.Server, spaceId, 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) UpdateExceptionListItem(ctx context.Context, spaceId SpaceId, body UpdateExceptionListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateExceptionListItemRequest(c.Server, spaceId, 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) DeleteList(ctx context.Context, spaceId SpaceId, params *DeleteListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteListRequest(c.Server, spaceId, params) + 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) ReadList(ctx context.Context, spaceId SpaceId, params *ReadListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewReadListRequest(c.Server, spaceId, params) + 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) PatchListWithBody(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchListRequestWithBody(c.Server, spaceId, 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) PatchList(ctx context.Context, spaceId SpaceId, body PatchListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchListRequest(c.Server, spaceId, 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) CreateListWithBody(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateListRequestWithBody(c.Server, spaceId, 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) CreateList(ctx context.Context, spaceId SpaceId, body CreateListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateListRequest(c.Server, spaceId, 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) UpdateListWithBody(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateListRequestWithBody(c.Server, spaceId, 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) UpdateList(ctx context.Context, spaceId SpaceId, body UpdateListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateListRequest(c.Server, spaceId, 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) DeleteListIndex(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteListIndexRequest(c.Server, spaceId) + 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) ReadListIndex(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewReadListIndexRequest(c.Server, spaceId) + 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) CreateListIndex(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateListIndexRequest(c.Server, spaceId) + 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) DeleteListItem(ctx context.Context, spaceId SpaceId, params *DeleteListItemParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteListItemRequest(c.Server, spaceId, params) + 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) ReadListItem(ctx context.Context, spaceId SpaceId, params *ReadListItemParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewReadListItemRequest(c.Server, spaceId, params) + 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) PatchListItemWithBody(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchListItemRequestWithBody(c.Server, spaceId, 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) PatchListItem(ctx context.Context, spaceId SpaceId, body PatchListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchListItemRequest(c.Server, spaceId, 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) CreateListItemWithBody(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateListItemRequestWithBody(c.Server, spaceId, 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) CreateListItem(ctx context.Context, spaceId SpaceId, body CreateListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateListItemRequest(c.Server, spaceId, 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) UpdateListItemWithBody(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateListItemRequestWithBody(c.Server, spaceId, 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) UpdateListItem(ctx context.Context, spaceId SpaceId, body UpdateListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateListItemRequest(c.Server, spaceId, 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) PostMaintenanceWindowWithBody(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewPostMaintenanceWindowRequestWithBody(c.Server, spaceId, contentType, body) if err != nil { @@ -94901,248 +94901,6 @@ func NewGetEntityStoreStatusRequest(server string, params *GetEntityStoreStatusP return req, nil } -// NewDeleteExceptionListRequest generates requests for DeleteExceptionList -func NewDeleteExceptionListRequest(server string, params *DeleteExceptionListParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/exception_lists") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Id != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); 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) - } - } - } - - } - - if params.ListId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "list_id", runtime.ParamLocationQuery, *params.ListId); 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) - } - } - } - - } - - if params.NamespaceType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "namespace_type", runtime.ParamLocationQuery, *params.NamespaceType); 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("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewReadExceptionListRequest generates requests for ReadExceptionList -func NewReadExceptionListRequest(server string, params *ReadExceptionListParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/exception_lists") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Id != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); 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) - } - } - } - - } - - if params.ListId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "list_id", runtime.ParamLocationQuery, *params.ListId); 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) - } - } - } - - } - - if params.NamespaceType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "namespace_type", runtime.ParamLocationQuery, *params.NamespaceType); 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(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewCreateExceptionListRequest calls the generic CreateExceptionList builder with application/json body -func NewCreateExceptionListRequest(server string, body CreateExceptionListJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateExceptionListRequestWithBody(server, "application/json", bodyReader) -} - -// NewCreateExceptionListRequestWithBody generates requests for CreateExceptionList with any type of body -func NewCreateExceptionListRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/exception_lists") - 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 -} - -// NewUpdateExceptionListRequest calls the generic UpdateExceptionList builder with application/json body -func NewUpdateExceptionListRequest(server string, body UpdateExceptionListJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUpdateExceptionListRequestWithBody(server, "application/json", bodyReader) -} - -// NewUpdateExceptionListRequestWithBody generates requests for UpdateExceptionList with any type of body -func NewUpdateExceptionListRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/exception_lists") - 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 -} - // NewDuplicateExceptionListRequest generates requests for DuplicateExceptionList func NewDuplicateExceptionListRequest(server string, params *DuplicateExceptionListParams) (*http.Request, error) { var err error @@ -95489,248 +95247,6 @@ func NewImportExceptionListRequestWithBody(server string, params *ImportExceptio return req, nil } -// NewDeleteExceptionListItemRequest generates requests for DeleteExceptionListItem -func NewDeleteExceptionListItemRequest(server string, params *DeleteExceptionListItemParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/exception_lists/items") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Id != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); 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) - } - } - } - - } - - if params.ItemId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "item_id", runtime.ParamLocationQuery, *params.ItemId); 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) - } - } - } - - } - - if params.NamespaceType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "namespace_type", runtime.ParamLocationQuery, *params.NamespaceType); 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("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewReadExceptionListItemRequest generates requests for ReadExceptionListItem -func NewReadExceptionListItemRequest(server string, params *ReadExceptionListItemParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/exception_lists/items") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Id != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); 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) - } - } - } - - } - - if params.ItemId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "item_id", runtime.ParamLocationQuery, *params.ItemId); 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) - } - } - } - - } - - if params.NamespaceType != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "namespace_type", runtime.ParamLocationQuery, *params.NamespaceType); 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(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewCreateExceptionListItemRequest calls the generic CreateExceptionListItem builder with application/json body -func NewCreateExceptionListItemRequest(server string, body CreateExceptionListItemJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateExceptionListItemRequestWithBody(server, "application/json", bodyReader) -} - -// NewCreateExceptionListItemRequestWithBody generates requests for CreateExceptionListItem with any type of body -func NewCreateExceptionListItemRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/exception_lists/items") - 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 -} - -// NewUpdateExceptionListItemRequest calls the generic UpdateExceptionListItem builder with application/json body -func NewUpdateExceptionListItemRequest(server string, body UpdateExceptionListItemJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUpdateExceptionListItemRequestWithBody(server, "application/json", bodyReader) -} - -// NewUpdateExceptionListItemRequestWithBody generates requests for UpdateExceptionListItem with any type of body -func NewUpdateExceptionListItemRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/exception_lists/items") - 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 -} - // NewFindExceptionListItemsRequest generates requests for FindExceptionListItems func NewFindExceptionListItemsRequest(server string, params *FindExceptionListItemsParams) (*http.Request, error) { var err error @@ -102830,248 +102346,6 @@ func NewGetFleetUninstallTokensUninstalltokenidRequest(server string, uninstallT return req, nil } -// NewDeleteListRequest generates requests for DeleteList -func NewDeleteListRequest(server string, params *DeleteListParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/lists") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, params.Id); 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) - } - } - } - - if params.DeleteReferences != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleteReferences", runtime.ParamLocationQuery, *params.DeleteReferences); 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) - } - } - } - - } - - if params.IgnoreReferences != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "ignoreReferences", runtime.ParamLocationQuery, *params.IgnoreReferences); 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("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewReadListRequest generates requests for ReadList -func NewReadListRequest(server string, params *ReadListParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/lists") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, params.Id); 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(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPatchListRequest calls the generic PatchList builder with application/json body -func NewPatchListRequest(server string, body PatchListJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchListRequestWithBody(server, "application/json", bodyReader) -} - -// NewPatchListRequestWithBody generates requests for PatchList with any type of body -func NewPatchListRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/lists") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewCreateListRequest calls the generic CreateList builder with application/json body -func NewCreateListRequest(server string, body CreateListJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateListRequestWithBody(server, "application/json", bodyReader) -} - -// NewCreateListRequestWithBody generates requests for CreateList with any type of body -func NewCreateListRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/lists") - 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 -} - -// NewUpdateListRequest calls the generic UpdateList builder with application/json body -func NewUpdateListRequest(server string, body UpdateListJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUpdateListRequestWithBody(server, "application/json", bodyReader) -} - -// NewUpdateListRequestWithBody generates requests for UpdateList with any type of body -func NewUpdateListRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/lists") - 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 -} - // NewFindListsRequest generates requests for FindLists func NewFindListsRequest(server string, params *FindListsParams) (*http.Request, error) { var err error @@ -103201,385 +102475,6 @@ func NewFindListsRequest(server string, params *FindListsParams) (*http.Request, return req, nil } -// NewDeleteListIndexRequest generates requests for DeleteListIndex -func NewDeleteListIndexRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/lists/index") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewReadListIndexRequest generates requests for ReadListIndex -func NewReadListIndexRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/lists/index") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewCreateListIndexRequest generates requests for CreateListIndex -func NewCreateListIndexRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/lists/index") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewDeleteListItemRequest generates requests for DeleteListItem -func NewDeleteListItemRequest(server string, params *DeleteListItemParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/lists/items") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Id != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); 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) - } - } - } - - } - - if params.ListId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "list_id", runtime.ParamLocationQuery, *params.ListId); 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) - } - } - } - - } - - if params.Value != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "value", runtime.ParamLocationQuery, *params.Value); 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) - } - } - } - - } - - if params.Refresh != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "refresh", runtime.ParamLocationQuery, *params.Refresh); 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("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewReadListItemRequest generates requests for ReadListItem -func NewReadListItemRequest(server string, params *ReadListItemParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/lists/items") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Id != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); 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) - } - } - } - - } - - if params.ListId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "list_id", runtime.ParamLocationQuery, *params.ListId); 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) - } - } - } - - } - - if params.Value != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "value", runtime.ParamLocationQuery, *params.Value); 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(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPatchListItemRequest calls the generic PatchListItem builder with application/json body -func NewPatchListItemRequest(server string, body PatchListItemJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchListItemRequestWithBody(server, "application/json", bodyReader) -} - -// NewPatchListItemRequestWithBody generates requests for PatchListItem with any type of body -func NewPatchListItemRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/lists/items") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewCreateListItemRequest calls the generic CreateListItem builder with application/json body -func NewCreateListItemRequest(server string, body CreateListItemJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateListItemRequestWithBody(server, "application/json", bodyReader) -} - -// NewCreateListItemRequestWithBody generates requests for CreateListItem with any type of body -func NewCreateListItemRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/lists/items") - 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 -} - -// NewUpdateListItemRequest calls the generic UpdateListItem builder with application/json body -func NewUpdateListItemRequest(server string, body UpdateListItemJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUpdateListItemRequestWithBody(server, "application/json", bodyReader) -} - -// NewUpdateListItemRequestWithBody generates requests for UpdateListItem with any type of body -func NewUpdateListItemRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/lists/items") - 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 -} - // NewExportListItemsRequest generates requests for ExportListItems func NewExportListItemsRequest(server string, params *ExportListItemsParams) (*http.Request, error) { var err error @@ -112651,19 +111546,8 @@ func NewUpdateRuleRequestWithBody(server string, spaceId SpaceId, contentType st return req, nil } -// NewPostMaintenanceWindowRequest calls the generic PostMaintenanceWindow builder with application/json body -func NewPostMaintenanceWindowRequest(server string, spaceId SpaceId, body PostMaintenanceWindowJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostMaintenanceWindowRequestWithBody(server, spaceId, "application/json", bodyReader) -} - -// NewPostMaintenanceWindowRequestWithBody generates requests for PostMaintenanceWindow with any type of body -func NewPostMaintenanceWindowRequestWithBody(server string, spaceId SpaceId, contentType string, body io.Reader) (*http.Request, error) { +// NewDeleteExceptionListRequest generates requests for DeleteExceptionList +func NewDeleteExceptionListRequest(server string, spaceId SpaceId, params *DeleteExceptionListParams) (*http.Request, error) { var err error var pathParam0 string @@ -112678,7 +111562,7 @@ func NewPostMaintenanceWindowRequestWithBody(server string, spaceId SpaceId, con return nil, err } - operationPath := fmt.Sprintf("/s/%s/api/maintenance_window", pathParam0) + operationPath := fmt.Sprintf("/s/%s/api/exception_lists", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -112688,18 +111572,70 @@ func NewPostMaintenanceWindowRequestWithBody(server string, spaceId SpaceId, con return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + if params != nil { + queryValues := queryURL.Query() + + if params.Id != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); 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) + } + } + } + + } + + if params.ListId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "list_id", runtime.ParamLocationQuery, *params.ListId); 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) + } + } + } + + } + + if params.NamespaceType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "namespace_type", runtime.ParamLocationQuery, *params.NamespaceType); 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("DELETE", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewDeleteMaintenanceWindowIdRequest generates requests for DeleteMaintenanceWindowId -func NewDeleteMaintenanceWindowIdRequest(server string, spaceId SpaceId, id string) (*http.Request, error) { +// NewReadExceptionListRequest generates requests for ReadExceptionList +func NewReadExceptionListRequest(server string, spaceId SpaceId, params *ReadExceptionListParams) (*http.Request, error) { var err error var pathParam0 string @@ -112709,19 +111645,12 @@ func NewDeleteMaintenanceWindowIdRequest(server string, spaceId SpaceId, id stri return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/s/%s/api/maintenance_window/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/s/%s/api/exception_lists", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -112731,7 +111660,61 @@ func NewDeleteMaintenanceWindowIdRequest(server string, spaceId SpaceId, id stri return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if params != nil { + queryValues := queryURL.Query() + + if params.Id != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); 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) + } + } + } + + } + + if params.ListId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "list_id", runtime.ParamLocationQuery, *params.ListId); 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) + } + } + } + + } + + if params.NamespaceType != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "namespace_type", runtime.ParamLocationQuery, *params.NamespaceType); 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(), nil) if err != nil { return nil, err } @@ -112739,20 +111722,24 @@ func NewDeleteMaintenanceWindowIdRequest(server string, spaceId SpaceId, id stri return req, nil } -// NewGetMaintenanceWindowIdRequest generates requests for GetMaintenanceWindowId -func NewGetMaintenanceWindowIdRequest(server string, spaceId SpaceId, id string) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) +// NewCreateExceptionListRequest calls the generic CreateExceptionList builder with application/json body +func NewCreateExceptionListRequest(server string, spaceId SpaceId, body CreateExceptionListJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } + bodyReader = bytes.NewReader(buf) + return NewCreateExceptionListRequestWithBody(server, spaceId, "application/json", bodyReader) +} - var pathParam1 string +// NewCreateExceptionListRequestWithBody generates requests for CreateExceptionList with any type of body +func NewCreateExceptionListRequestWithBody(server string, spaceId SpaceId, contentType string, body io.Reader) (*http.Request, error) { + var err error - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) if err != nil { return nil, err } @@ -112762,7 +111749,7 @@ func NewGetMaintenanceWindowIdRequest(server string, spaceId SpaceId, id string) return nil, err } - operationPath := fmt.Sprintf("/s/%s/api/maintenance_window/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/s/%s/api/exception_lists", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -112772,27 +111759,29 @@ func NewGetMaintenanceWindowIdRequest(server string, spaceId SpaceId, id string) return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewPatchMaintenanceWindowIdRequest calls the generic PatchMaintenanceWindowId builder with application/json body -func NewPatchMaintenanceWindowIdRequest(server string, spaceId SpaceId, id string, body PatchMaintenanceWindowIdJSONRequestBody) (*http.Request, error) { +// NewUpdateExceptionListRequest calls the generic UpdateExceptionList builder with application/json body +func NewUpdateExceptionListRequest(server string, spaceId SpaceId, body UpdateExceptionListJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPatchMaintenanceWindowIdRequestWithBody(server, spaceId, id, "application/json", bodyReader) + return NewUpdateExceptionListRequestWithBody(server, spaceId, "application/json", bodyReader) } -// NewPatchMaintenanceWindowIdRequestWithBody generates requests for PatchMaintenanceWindowId with any type of body -func NewPatchMaintenanceWindowIdRequestWithBody(server string, spaceId SpaceId, id string, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdateExceptionListRequestWithBody generates requests for UpdateExceptionList with any type of body +func NewUpdateExceptionListRequestWithBody(server string, spaceId SpaceId, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -112802,19 +111791,12 @@ func NewPatchMaintenanceWindowIdRequestWithBody(server string, spaceId SpaceId, return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/s/%s/api/maintenance_window/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/s/%s/api/exception_lists", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -112824,7 +111806,7 @@ func NewPatchMaintenanceWindowIdRequestWithBody(server string, spaceId SpaceId, return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest("PUT", queryURL.String(), body) if err != nil { return nil, err } @@ -112834,8 +111816,8 @@ func NewPatchMaintenanceWindowIdRequestWithBody(server string, spaceId SpaceId, return req, nil } -// NewFindSlosOpRequest generates requests for FindSlosOp -func NewFindSlosOpRequest(server string, spaceId SLOsSpaceId, params *FindSlosOpParams) (*http.Request, error) { +// NewDeleteExceptionListItemRequest generates requests for DeleteExceptionListItem +func NewDeleteExceptionListItemRequest(server string, spaceId SpaceId, params *DeleteExceptionListItemParams) (*http.Request, error) { var err error var pathParam0 string @@ -112850,7 +111832,7 @@ func NewFindSlosOpRequest(server string, spaceId SLOsSpaceId, params *FindSlosOp return nil, err } - operationPath := fmt.Sprintf("/s/%s/api/observability/slos", pathParam0) + operationPath := fmt.Sprintf("/s/%s/api/exception_lists/items", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -112863,9 +111845,9 @@ func NewFindSlosOpRequest(server string, spaceId SLOsSpaceId, params *FindSlosOp if params != nil { queryValues := queryURL.Query() - if params.KqlQuery != nil { + if params.Id != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "kqlQuery", runtime.ParamLocationQuery, *params.KqlQuery); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -112879,9 +111861,9 @@ func NewFindSlosOpRequest(server string, spaceId SLOsSpaceId, params *FindSlosOp } - if params.Size != nil { + if params.ItemId != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "size", runtime.ParamLocationQuery, *params.Size); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "item_id", runtime.ParamLocationQuery, *params.ItemId); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -112895,9 +111877,9 @@ func NewFindSlosOpRequest(server string, spaceId SLOsSpaceId, params *FindSlosOp } - if params.SearchAfter != nil { + if params.NamespaceType != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "searchAfter", runtime.ParamLocationQuery, *params.SearchAfter); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "namespace_type", runtime.ParamLocationQuery, *params.NamespaceType); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -112911,41 +111893,49 @@ func NewFindSlosOpRequest(server string, spaceId SLOsSpaceId, params *FindSlosOp } - if params.Page != nil { + queryURL.RawQuery = queryValues.Encode() + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); 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) - } - } - } + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } - } + return req, nil +} - if params.PerPage != nil { +// NewReadExceptionListItemRequest generates requests for ReadExceptionListItem +func NewReadExceptionListItemRequest(server string, spaceId SpaceId, params *ReadExceptionListItemParams) (*http.Request, error) { + var err error - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "perPage", runtime.ParamLocationQuery, *params.PerPage); 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) - } - } - } + var pathParam0 string - } + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) + if err != nil { + return nil, err + } - if params.SortBy != nil { + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sortBy", runtime.ParamLocationQuery, *params.SortBy); err != nil { + operationPath := fmt.Sprintf("/s/%s/api/exception_lists/items", 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.Id != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -112959,9 +111949,9 @@ func NewFindSlosOpRequest(server string, spaceId SLOsSpaceId, params *FindSlosOp } - if params.SortDirection != nil { + if params.ItemId != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sortDirection", runtime.ParamLocationQuery, *params.SortDirection); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "item_id", runtime.ParamLocationQuery, *params.ItemId); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -112975,9 +111965,9 @@ func NewFindSlosOpRequest(server string, spaceId SLOsSpaceId, params *FindSlosOp } - if params.HideStale != nil { + if params.NamespaceType != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "hideStale", runtime.ParamLocationQuery, *params.HideStale); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "namespace_type", runtime.ParamLocationQuery, *params.NamespaceType); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -113002,19 +111992,19 @@ func NewFindSlosOpRequest(server string, spaceId SLOsSpaceId, params *FindSlosOp return req, nil } -// NewCreateSloOpRequest calls the generic CreateSloOp builder with application/json body -func NewCreateSloOpRequest(server string, spaceId SLOsSpaceId, body CreateSloOpJSONRequestBody) (*http.Request, error) { +// NewCreateExceptionListItemRequest calls the generic CreateExceptionListItem builder with application/json body +func NewCreateExceptionListItemRequest(server string, spaceId SpaceId, body CreateExceptionListItemJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateSloOpRequestWithBody(server, spaceId, "application/json", bodyReader) + return NewCreateExceptionListItemRequestWithBody(server, spaceId, "application/json", bodyReader) } -// NewCreateSloOpRequestWithBody generates requests for CreateSloOp with any type of body -func NewCreateSloOpRequestWithBody(server string, spaceId SLOsSpaceId, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateExceptionListItemRequestWithBody generates requests for CreateExceptionListItem with any type of body +func NewCreateExceptionListItemRequestWithBody(server string, spaceId SpaceId, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -113029,7 +112019,7 @@ func NewCreateSloOpRequestWithBody(server string, spaceId SLOsSpaceId, contentTy return nil, err } - operationPath := fmt.Sprintf("/s/%s/api/observability/slos", pathParam0) + operationPath := fmt.Sprintf("/s/%s/api/exception_lists/items", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -113049,19 +112039,19 @@ func NewCreateSloOpRequestWithBody(server string, spaceId SLOsSpaceId, contentTy return req, nil } -// NewBulkDeleteOpRequest calls the generic BulkDeleteOp builder with application/json body -func NewBulkDeleteOpRequest(server string, spaceId SLOsSpaceId, body BulkDeleteOpJSONRequestBody) (*http.Request, error) { +// NewUpdateExceptionListItemRequest calls the generic UpdateExceptionListItem builder with application/json body +func NewUpdateExceptionListItemRequest(server string, spaceId SpaceId, body UpdateExceptionListItemJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewBulkDeleteOpRequestWithBody(server, spaceId, "application/json", bodyReader) + return NewUpdateExceptionListItemRequestWithBody(server, spaceId, "application/json", bodyReader) } -// NewBulkDeleteOpRequestWithBody generates requests for BulkDeleteOp with any type of body -func NewBulkDeleteOpRequestWithBody(server string, spaceId SLOsSpaceId, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdateExceptionListItemRequestWithBody generates requests for UpdateExceptionListItem with any type of body +func NewUpdateExceptionListItemRequestWithBody(server string, spaceId SpaceId, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -113076,7 +112066,7 @@ func NewBulkDeleteOpRequestWithBody(server string, spaceId SLOsSpaceId, contentT return nil, err } - operationPath := fmt.Sprintf("/s/%s/api/observability/slos/_bulk_delete", pathParam0) + operationPath := fmt.Sprintf("/s/%s/api/exception_lists/items", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -113086,7 +112076,7 @@ func NewBulkDeleteOpRequestWithBody(server string, spaceId SLOsSpaceId, contentT return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("PUT", queryURL.String(), body) if err != nil { return nil, err } @@ -113096,8 +112086,8 @@ func NewBulkDeleteOpRequestWithBody(server string, spaceId SLOsSpaceId, contentT return req, nil } -// NewBulkDeleteStatusOpRequest generates requests for BulkDeleteStatusOp -func NewBulkDeleteStatusOpRequest(server string, spaceId SLOsSpaceId, taskId string) (*http.Request, error) { +// NewDeleteListRequest generates requests for DeleteList +func NewDeleteListRequest(server string, spaceId SpaceId, params *DeleteListParams) (*http.Request, error) { var err error var pathParam0 string @@ -113107,9 +112097,86 @@ func NewBulkDeleteStatusOpRequest(server string, spaceId SLOsSpaceId, taskId str return nil, err } - var pathParam1 string + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "taskId", runtime.ParamLocationPath, taskId) + operationPath := fmt.Sprintf("/s/%s/api/lists", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, params.Id); 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) + } + } + } + + if params.DeleteReferences != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "deleteReferences", runtime.ParamLocationQuery, *params.DeleteReferences); 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) + } + } + } + + } + + if params.IgnoreReferences != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "ignoreReferences", runtime.ParamLocationQuery, *params.IgnoreReferences); 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("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewReadListRequest generates requests for ReadList +func NewReadListRequest(server string, spaceId SpaceId, params *ReadListParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) if err != nil { return nil, err } @@ -113119,7 +112186,7 @@ func NewBulkDeleteStatusOpRequest(server string, spaceId SLOsSpaceId, taskId str return nil, err } - operationPath := fmt.Sprintf("/s/%s/api/observability/slos/_bulk_delete/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/s/%s/api/lists", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -113129,6 +112196,24 @@ func NewBulkDeleteStatusOpRequest(server string, spaceId SLOsSpaceId, taskId str return nil, err } + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, params.Id); 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(), nil) if err != nil { return nil, err @@ -113137,19 +112222,19 @@ func NewBulkDeleteStatusOpRequest(server string, spaceId SLOsSpaceId, taskId str return req, nil } -// NewDeleteRollupDataOpRequest calls the generic DeleteRollupDataOp builder with application/json body -func NewDeleteRollupDataOpRequest(server string, spaceId SLOsSpaceId, body DeleteRollupDataOpJSONRequestBody) (*http.Request, error) { +// NewPatchListRequest calls the generic PatchList builder with application/json body +func NewPatchListRequest(server string, spaceId SpaceId, body PatchListJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewDeleteRollupDataOpRequestWithBody(server, spaceId, "application/json", bodyReader) + return NewPatchListRequestWithBody(server, spaceId, "application/json", bodyReader) } -// NewDeleteRollupDataOpRequestWithBody generates requests for DeleteRollupDataOp with any type of body -func NewDeleteRollupDataOpRequestWithBody(server string, spaceId SLOsSpaceId, contentType string, body io.Reader) (*http.Request, error) { +// NewPatchListRequestWithBody generates requests for PatchList with any type of body +func NewPatchListRequestWithBody(server string, spaceId SpaceId, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -113164,7 +112249,7 @@ func NewDeleteRollupDataOpRequestWithBody(server string, spaceId SLOsSpaceId, co return nil, err } - operationPath := fmt.Sprintf("/s/%s/api/observability/slos/_bulk_purge_rollup", pathParam0) + operationPath := fmt.Sprintf("/s/%s/api/lists", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -113174,7 +112259,7 @@ func NewDeleteRollupDataOpRequestWithBody(server string, spaceId SLOsSpaceId, co return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("PATCH", queryURL.String(), body) if err != nil { return nil, err } @@ -113184,19 +112269,19 @@ func NewDeleteRollupDataOpRequestWithBody(server string, spaceId SLOsSpaceId, co return req, nil } -// NewDeleteSloInstancesOpRequest calls the generic DeleteSloInstancesOp builder with application/json body -func NewDeleteSloInstancesOpRequest(server string, spaceId SLOsSpaceId, body DeleteSloInstancesOpJSONRequestBody) (*http.Request, error) { +// NewCreateListRequest calls the generic CreateList builder with application/json body +func NewCreateListRequest(server string, spaceId SpaceId, body CreateListJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewDeleteSloInstancesOpRequestWithBody(server, spaceId, "application/json", bodyReader) + return NewCreateListRequestWithBody(server, spaceId, "application/json", bodyReader) } -// NewDeleteSloInstancesOpRequestWithBody generates requests for DeleteSloInstancesOp with any type of body -func NewDeleteSloInstancesOpRequestWithBody(server string, spaceId SLOsSpaceId, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateListRequestWithBody generates requests for CreateList with any type of body +func NewCreateListRequestWithBody(server string, spaceId SpaceId, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -113211,7 +112296,7 @@ func NewDeleteSloInstancesOpRequestWithBody(server string, spaceId SLOsSpaceId, return nil, err } - operationPath := fmt.Sprintf("/s/%s/api/observability/slos/_delete_instances", pathParam0) + operationPath := fmt.Sprintf("/s/%s/api/lists", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -113231,8 +112316,19 @@ func NewDeleteSloInstancesOpRequestWithBody(server string, spaceId SLOsSpaceId, return req, nil } -// NewDeleteSloOpRequest generates requests for DeleteSloOp -func NewDeleteSloOpRequest(server string, spaceId SLOsSpaceId, sloId SLOsSloId) (*http.Request, error) { +// NewUpdateListRequest calls the generic UpdateList builder with application/json body +func NewUpdateListRequest(server string, spaceId SpaceId, body UpdateListJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateListRequestWithBody(server, spaceId, "application/json", bodyReader) +} + +// NewUpdateListRequestWithBody generates requests for UpdateList with any type of body +func NewUpdateListRequestWithBody(server string, spaceId SpaceId, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -113242,9 +112338,38 @@ func NewDeleteSloOpRequest(server string, spaceId SLOsSpaceId, sloId SLOsSloId) return nil, err } - var pathParam1 string + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sloId", runtime.ParamLocationPath, sloId) + operationPath := fmt.Sprintf("/s/%s/api/lists", pathParam0) + 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 +} + +// NewDeleteListIndexRequest generates requests for DeleteListIndex +func NewDeleteListIndexRequest(server string, spaceId SpaceId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) if err != nil { return nil, err } @@ -113254,7 +112379,7 @@ func NewDeleteSloOpRequest(server string, spaceId SLOsSpaceId, sloId SLOsSloId) return nil, err } - operationPath := fmt.Sprintf("/s/%s/api/observability/slos/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/s/%s/api/lists/index", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -113272,8 +112397,8 @@ func NewDeleteSloOpRequest(server string, spaceId SLOsSpaceId, sloId SLOsSloId) return req, nil } -// NewGetSloOpRequest generates requests for GetSloOp -func NewGetSloOpRequest(server string, spaceId SLOsSpaceId, sloId SLOsSloId, params *GetSloOpParams) (*http.Request, error) { +// NewReadListIndexRequest generates requests for ReadListIndex +func NewReadListIndexRequest(server string, spaceId SpaceId) (*http.Request, error) { var err error var pathParam0 string @@ -113283,9 +112408,36 @@ func NewGetSloOpRequest(server string, spaceId SLOsSpaceId, sloId SLOsSloId, par return nil, err } - var pathParam1 string + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sloId", runtime.ParamLocationPath, sloId) + operationPath := fmt.Sprintf("/s/%s/api/lists/index", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateListIndexRequest generates requests for CreateListIndex +func NewCreateListIndexRequest(server string, spaceId SpaceId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) if err != nil { return nil, err } @@ -113295,7 +112447,41 @@ func NewGetSloOpRequest(server string, spaceId SLOsSpaceId, sloId SLOsSloId, par return nil, err } - operationPath := fmt.Sprintf("/s/%s/api/observability/slos/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/s/%s/api/lists/index", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewDeleteListItemRequest generates requests for DeleteListItem +func NewDeleteListItemRequest(server string, spaceId SpaceId, params *DeleteListItemParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/s/%s/api/lists/items", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -113308,9 +112494,145 @@ func NewGetSloOpRequest(server string, spaceId SLOsSpaceId, sloId SLOsSloId, par if params != nil { queryValues := queryURL.Query() - if params.InstanceId != nil { + if params.Id != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "instanceId", runtime.ParamLocationQuery, *params.InstanceId); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); 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) + } + } + } + + } + + if params.ListId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "list_id", runtime.ParamLocationQuery, *params.ListId); 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) + } + } + } + + } + + if params.Value != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "value", runtime.ParamLocationQuery, *params.Value); 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) + } + } + } + + } + + if params.Refresh != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "refresh", runtime.ParamLocationQuery, *params.Refresh); 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("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewReadListItemRequest generates requests for ReadListItem +func NewReadListItemRequest(server string, spaceId SpaceId, params *ReadListItemParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/s/%s/api/lists/items", 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.Id != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "id", runtime.ParamLocationQuery, *params.Id); 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) + } + } + } + + } + + if params.ListId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "list_id", runtime.ParamLocationQuery, *params.ListId); 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) + } + } + } + + } + + if params.Value != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "value", runtime.ParamLocationQuery, *params.Value); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -113335,19 +112657,19 @@ func NewGetSloOpRequest(server string, spaceId SLOsSpaceId, sloId SLOsSloId, par return req, nil } -// NewUpdateSloOpRequest calls the generic UpdateSloOp builder with application/json body -func NewUpdateSloOpRequest(server string, spaceId SLOsSpaceId, sloId SLOsSloId, body UpdateSloOpJSONRequestBody) (*http.Request, error) { +// NewPatchListItemRequest calls the generic PatchListItem builder with application/json body +func NewPatchListItemRequest(server string, spaceId SpaceId, body PatchListItemJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdateSloOpRequestWithBody(server, spaceId, sloId, "application/json", bodyReader) + return NewPatchListItemRequestWithBody(server, spaceId, "application/json", bodyReader) } -// NewUpdateSloOpRequestWithBody generates requests for UpdateSloOp with any type of body -func NewUpdateSloOpRequestWithBody(server string, spaceId SLOsSpaceId, sloId SLOsSloId, contentType string, body io.Reader) (*http.Request, error) { +// NewPatchListItemRequestWithBody generates requests for PatchListItem with any type of body +func NewPatchListItemRequestWithBody(server string, spaceId SpaceId, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -113357,9 +112679,49 @@ func NewUpdateSloOpRequestWithBody(server string, spaceId SLOsSpaceId, sloId SLO return nil, err } - var pathParam1 string + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sloId", runtime.ParamLocationPath, sloId) + operationPath := fmt.Sprintf("/s/%s/api/lists/items", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewCreateListItemRequest calls the generic CreateListItem builder with application/json body +func NewCreateListItemRequest(server string, spaceId SpaceId, body CreateListItemJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateListItemRequestWithBody(server, spaceId, "application/json", bodyReader) +} + +// NewCreateListItemRequestWithBody generates requests for CreateListItem with any type of body +func NewCreateListItemRequestWithBody(server string, spaceId SpaceId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) if err != nil { return nil, err } @@ -113369,7 +112731,54 @@ func NewUpdateSloOpRequestWithBody(server string, spaceId SLOsSpaceId, sloId SLO return nil, err } - operationPath := fmt.Sprintf("/s/%s/api/observability/slos/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/s/%s/api/lists/items", 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 +} + +// NewUpdateListItemRequest calls the generic UpdateListItem builder with application/json body +func NewUpdateListItemRequest(server string, spaceId SpaceId, body UpdateListItemJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateListItemRequestWithBody(server, spaceId, "application/json", bodyReader) +} + +// NewUpdateListItemRequestWithBody generates requests for UpdateListItem with any type of body +func NewUpdateListItemRequestWithBody(server string, spaceId SpaceId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/s/%s/api/lists/items", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -113389,8 +112798,55 @@ func NewUpdateSloOpRequestWithBody(server string, spaceId SLOsSpaceId, sloId SLO return req, nil } -// NewResetSloOpRequest generates requests for ResetSloOp -func NewResetSloOpRequest(server string, spaceId SLOsSpaceId, sloId SLOsSloId) (*http.Request, error) { +// NewPostMaintenanceWindowRequest calls the generic PostMaintenanceWindow builder with application/json body +func NewPostMaintenanceWindowRequest(server string, spaceId SpaceId, body PostMaintenanceWindowJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostMaintenanceWindowRequestWithBody(server, spaceId, "application/json", bodyReader) +} + +// NewPostMaintenanceWindowRequestWithBody generates requests for PostMaintenanceWindow with any type of body +func NewPostMaintenanceWindowRequestWithBody(server string, spaceId SpaceId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/s/%s/api/maintenance_window", 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 +} + +// NewDeleteMaintenanceWindowIdRequest generates requests for DeleteMaintenanceWindowId +func NewDeleteMaintenanceWindowIdRequest(server string, spaceId SpaceId, id string) (*http.Request, error) { var err error var pathParam0 string @@ -113402,7 +112858,7 @@ func NewResetSloOpRequest(server string, spaceId SLOsSpaceId, sloId SLOsSloId) ( var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sloId", runtime.ParamLocationPath, sloId) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) if err != nil { return nil, err } @@ -113412,7 +112868,7 @@ func NewResetSloOpRequest(server string, spaceId SLOsSpaceId, sloId SLOsSloId) ( return nil, err } - operationPath := fmt.Sprintf("/s/%s/api/observability/slos/%s/_reset", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/s/%s/api/maintenance_window/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -113422,7 +112878,7 @@ func NewResetSloOpRequest(server string, spaceId SLOsSpaceId, sloId SLOsSloId) ( return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } @@ -113430,8 +112886,8 @@ func NewResetSloOpRequest(server string, spaceId SLOsSpaceId, sloId SLOsSloId) ( return req, nil } -// NewDisableSloOpRequest generates requests for DisableSloOp -func NewDisableSloOpRequest(server string, spaceId SLOsSpaceId, sloId SLOsSloId) (*http.Request, error) { +// NewGetMaintenanceWindowIdRequest generates requests for GetMaintenanceWindowId +func NewGetMaintenanceWindowIdRequest(server string, spaceId SpaceId, id string) (*http.Request, error) { var err error var pathParam0 string @@ -113443,7 +112899,7 @@ func NewDisableSloOpRequest(server string, spaceId SLOsSpaceId, sloId SLOsSloId) var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sloId", runtime.ParamLocationPath, sloId) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) if err != nil { return nil, err } @@ -113453,7 +112909,7 @@ func NewDisableSloOpRequest(server string, spaceId SLOsSpaceId, sloId SLOsSloId) return nil, err } - operationPath := fmt.Sprintf("/s/%s/api/observability/slos/%s/disable", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/s/%s/api/maintenance_window/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -113463,7 +112919,7 @@ func NewDisableSloOpRequest(server string, spaceId SLOsSpaceId, sloId SLOsSloId) return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } @@ -113471,8 +112927,19 @@ func NewDisableSloOpRequest(server string, spaceId SLOsSpaceId, sloId SLOsSloId) return req, nil } -// NewEnableSloOpRequest generates requests for EnableSloOp -func NewEnableSloOpRequest(server string, spaceId SLOsSpaceId, sloId SLOsSloId) (*http.Request, error) { +// NewPatchMaintenanceWindowIdRequest calls the generic PatchMaintenanceWindowId builder with application/json body +func NewPatchMaintenanceWindowIdRequest(server string, spaceId SpaceId, id string, body PatchMaintenanceWindowIdJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchMaintenanceWindowIdRequestWithBody(server, spaceId, id, "application/json", bodyReader) +} + +// NewPatchMaintenanceWindowIdRequestWithBody generates requests for PatchMaintenanceWindowId with any type of body +func NewPatchMaintenanceWindowIdRequestWithBody(server string, spaceId SpaceId, id string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -113484,7 +112951,7 @@ func NewEnableSloOpRequest(server string, spaceId SLOsSpaceId, sloId SLOsSloId) var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sloId", runtime.ParamLocationPath, sloId) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) if err != nil { return nil, err } @@ -113494,7 +112961,7 @@ func NewEnableSloOpRequest(server string, spaceId SLOsSpaceId, sloId SLOsSloId) return nil, err } - operationPath := fmt.Sprintf("/s/%s/api/observability/slos/%s/enable", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/s/%s/api/maintenance_window/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -113504,16 +112971,18 @@ func NewEnableSloOpRequest(server string, spaceId SLOsSpaceId, sloId SLOsSloId) return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + req, err := http.NewRequest("PATCH", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewGetDefinitionsOpRequest generates requests for GetDefinitionsOp -func NewGetDefinitionsOpRequest(server string, spaceId SLOsSpaceId, params *GetDefinitionsOpParams) (*http.Request, error) { +// NewFindSlosOpRequest generates requests for FindSlosOp +func NewFindSlosOpRequest(server string, spaceId SLOsSpaceId, params *FindSlosOpParams) (*http.Request, error) { var err error var pathParam0 string @@ -113528,7 +112997,7 @@ func NewGetDefinitionsOpRequest(server string, spaceId SLOsSpaceId, params *GetD return nil, err } - operationPath := fmt.Sprintf("/s/%s/internal/observability/slos/_definitions", pathParam0) + operationPath := fmt.Sprintf("/s/%s/api/observability/slos", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -113541,9 +113010,9 @@ func NewGetDefinitionsOpRequest(server string, spaceId SLOsSpaceId, params *GetD if params != nil { queryValues := queryURL.Query() - if params.IncludeOutdatedOnly != nil { + if params.KqlQuery != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "includeOutdatedOnly", runtime.ParamLocationQuery, *params.IncludeOutdatedOnly); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "kqlQuery", runtime.ParamLocationQuery, *params.KqlQuery); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -113557,9 +113026,9 @@ func NewGetDefinitionsOpRequest(server string, spaceId SLOsSpaceId, params *GetD } - if params.IncludeHealth != nil { + if params.Size != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "includeHealth", runtime.ParamLocationQuery, *params.IncludeHealth); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "size", runtime.ParamLocationQuery, *params.Size); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -113573,9 +113042,9 @@ func NewGetDefinitionsOpRequest(server string, spaceId SLOsSpaceId, params *GetD } - if params.Tags != nil { + if params.SearchAfter != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "tags", runtime.ParamLocationQuery, *params.Tags); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "searchAfter", runtime.ParamLocationQuery, *params.SearchAfter); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -113589,9 +113058,9 @@ func NewGetDefinitionsOpRequest(server string, spaceId SLOsSpaceId, params *GetD } - if params.Search != nil { + if params.Page != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -113605,9 +113074,9 @@ func NewGetDefinitionsOpRequest(server string, spaceId SLOsSpaceId, params *GetD } - if params.Page != nil { + if params.PerPage != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "perPage", runtime.ParamLocationQuery, *params.PerPage); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -113621,9 +113090,41 @@ func NewGetDefinitionsOpRequest(server string, spaceId SLOsSpaceId, params *GetD } - if params.PerPage != nil { + if params.SortBy != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "perPage", runtime.ParamLocationQuery, *params.PerPage); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sortBy", runtime.ParamLocationQuery, *params.SortBy); 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) + } + } + } + + } + + if params.SortDirection != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sortDirection", runtime.ParamLocationQuery, *params.SortDirection); 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) + } + } + } + + } + + if params.HideStale != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "hideStale", runtime.ParamLocationQuery, *params.HideStale); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -113648,92 +113149,738 @@ func NewGetDefinitionsOpRequest(server string, spaceId SLOsSpaceId, params *GetD return req, nil } -func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { - for _, r := range c.RequestEditors { - if err := r(ctx, req); err != nil { - return err - } - } - for _, r := range additionalEditors { - if err := r(ctx, req); err != nil { - return err - } +// NewCreateSloOpRequest calls the generic CreateSloOp builder with application/json body +func NewCreateSloOpRequest(server string, spaceId SLOsSpaceId, body CreateSloOpJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err } - return nil + bodyReader = bytes.NewReader(buf) + return NewCreateSloOpRequestWithBody(server, spaceId, "application/json", bodyReader) } -// ClientWithResponses builds on ClientInterface to offer response payloads -type ClientWithResponses struct { - ClientInterface -} +// NewCreateSloOpRequestWithBody generates requests for CreateSloOp with any type of body +func NewCreateSloOpRequestWithBody(server string, spaceId SLOsSpaceId, contentType string, body io.Reader) (*http.Request, error) { + var err error -// NewClientWithResponses creates a new ClientWithResponses, which wraps -// Client with return type handling -func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { - client, err := NewClient(server, opts...) + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) if err != nil { return nil, err } - return &ClientWithResponses{client}, nil -} -// WithBaseURL overrides the baseURL. -func WithBaseURL(baseURL string) ClientOption { - return func(c *Client) error { - newBaseURL, err := url.Parse(baseURL) - if err != nil { - return err - } - c.Server = newBaseURL.String() - return nil + serverURL, err := url.Parse(server) + if err != nil { + return nil, err } -} -// ClientWithResponsesInterface is the interface specification for the client with responses above. -type ClientWithResponsesInterface interface { - // PostActionsConnectorIdExecuteWithBodyWithResponse request with any body - PostActionsConnectorIdExecuteWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostActionsConnectorIdExecuteResponse, error) + operationPath := fmt.Sprintf("/s/%s/api/observability/slos", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - PostActionsConnectorIdExecuteWithResponse(ctx context.Context, id string, body PostActionsConnectorIdExecuteJSONRequestBody, reqEditors ...RequestEditorFn) (*PostActionsConnectorIdExecuteResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // GetActionsConnectorTypesWithResponse request - GetActionsConnectorTypesWithResponse(ctx context.Context, params *GetActionsConnectorTypesParams, reqEditors ...RequestEditorFn) (*GetActionsConnectorTypesResponse, error) + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } - // PostAgentBuilderA2aAgentidWithBodyWithResponse request with any body - PostAgentBuilderA2aAgentidWithBodyWithResponse(ctx context.Context, agentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostAgentBuilderA2aAgentidResponse, error) + req.Header.Add("Content-Type", contentType) - PostAgentBuilderA2aAgentidWithResponse(ctx context.Context, agentId string, body PostAgentBuilderA2aAgentidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostAgentBuilderA2aAgentidResponse, error) + return req, nil +} - // GetAgentBuilderA2aAgentidJsonWithResponse request - GetAgentBuilderA2aAgentidJsonWithResponse(ctx context.Context, agentId string, reqEditors ...RequestEditorFn) (*GetAgentBuilderA2aAgentidJsonResponse, error) +// NewBulkDeleteOpRequest calls the generic BulkDeleteOp builder with application/json body +func NewBulkDeleteOpRequest(server string, spaceId SLOsSpaceId, body BulkDeleteOpJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewBulkDeleteOpRequestWithBody(server, spaceId, "application/json", bodyReader) +} - // GetAgentBuilderAgentsWithResponse request - GetAgentBuilderAgentsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAgentBuilderAgentsResponse, error) +// NewBulkDeleteOpRequestWithBody generates requests for BulkDeleteOp with any type of body +func NewBulkDeleteOpRequestWithBody(server string, spaceId SLOsSpaceId, contentType string, body io.Reader) (*http.Request, error) { + var err error - // PostAgentBuilderAgentsWithBodyWithResponse request with any body - PostAgentBuilderAgentsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostAgentBuilderAgentsResponse, error) + var pathParam0 string - PostAgentBuilderAgentsWithResponse(ctx context.Context, body PostAgentBuilderAgentsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostAgentBuilderAgentsResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) + if err != nil { + return nil, err + } - // DeleteAgentBuilderAgentsIdWithResponse request - DeleteAgentBuilderAgentsIdWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteAgentBuilderAgentsIdResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // GetAgentBuilderAgentsIdWithResponse request - GetAgentBuilderAgentsIdWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetAgentBuilderAgentsIdResponse, error) + operationPath := fmt.Sprintf("/s/%s/api/observability/slos/_bulk_delete", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // PutAgentBuilderAgentsIdWithBodyWithResponse request with any body - PutAgentBuilderAgentsIdWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutAgentBuilderAgentsIdResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - PutAgentBuilderAgentsIdWithResponse(ctx context.Context, id string, body PutAgentBuilderAgentsIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PutAgentBuilderAgentsIdResponse, error) + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } - // GetAgentBuilderConversationsWithResponse request - GetAgentBuilderConversationsWithResponse(ctx context.Context, params *GetAgentBuilderConversationsParams, reqEditors ...RequestEditorFn) (*GetAgentBuilderConversationsResponse, error) + req.Header.Add("Content-Type", contentType) - // DeleteAgentBuilderConversationsConversationIdWithResponse request - DeleteAgentBuilderConversationsConversationIdWithResponse(ctx context.Context, conversationId string, reqEditors ...RequestEditorFn) (*DeleteAgentBuilderConversationsConversationIdResponse, error) + return req, nil +} - // GetAgentBuilderConversationsConversationIdWithResponse request - GetAgentBuilderConversationsConversationIdWithResponse(ctx context.Context, conversationId string, reqEditors ...RequestEditorFn) (*GetAgentBuilderConversationsConversationIdResponse, error) +// NewBulkDeleteStatusOpRequest generates requests for BulkDeleteStatusOp +func NewBulkDeleteStatusOpRequest(server string, spaceId SLOsSpaceId, taskId string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "taskId", runtime.ParamLocationPath, taskId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/s/%s/api/observability/slos/_bulk_delete/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewDeleteRollupDataOpRequest calls the generic DeleteRollupDataOp builder with application/json body +func NewDeleteRollupDataOpRequest(server string, spaceId SLOsSpaceId, body DeleteRollupDataOpJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewDeleteRollupDataOpRequestWithBody(server, spaceId, "application/json", bodyReader) +} + +// NewDeleteRollupDataOpRequestWithBody generates requests for DeleteRollupDataOp with any type of body +func NewDeleteRollupDataOpRequestWithBody(server string, spaceId SLOsSpaceId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/s/%s/api/observability/slos/_bulk_purge_rollup", 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 +} + +// NewDeleteSloInstancesOpRequest calls the generic DeleteSloInstancesOp builder with application/json body +func NewDeleteSloInstancesOpRequest(server string, spaceId SLOsSpaceId, body DeleteSloInstancesOpJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewDeleteSloInstancesOpRequestWithBody(server, spaceId, "application/json", bodyReader) +} + +// NewDeleteSloInstancesOpRequestWithBody generates requests for DeleteSloInstancesOp with any type of body +func NewDeleteSloInstancesOpRequestWithBody(server string, spaceId SLOsSpaceId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/s/%s/api/observability/slos/_delete_instances", 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 +} + +// NewDeleteSloOpRequest generates requests for DeleteSloOp +func NewDeleteSloOpRequest(server string, spaceId SLOsSpaceId, sloId SLOsSloId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sloId", runtime.ParamLocationPath, sloId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/s/%s/api/observability/slos/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetSloOpRequest generates requests for GetSloOp +func NewGetSloOpRequest(server string, spaceId SLOsSpaceId, sloId SLOsSloId, params *GetSloOpParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sloId", runtime.ParamLocationPath, sloId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/s/%s/api/observability/slos/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.InstanceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "instanceId", runtime.ParamLocationQuery, *params.InstanceId); 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(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUpdateSloOpRequest calls the generic UpdateSloOp builder with application/json body +func NewUpdateSloOpRequest(server string, spaceId SLOsSpaceId, sloId SLOsSloId, body UpdateSloOpJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateSloOpRequestWithBody(server, spaceId, sloId, "application/json", bodyReader) +} + +// NewUpdateSloOpRequestWithBody generates requests for UpdateSloOp with any type of body +func NewUpdateSloOpRequestWithBody(server string, spaceId SLOsSpaceId, sloId SLOsSloId, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sloId", runtime.ParamLocationPath, sloId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/s/%s/api/observability/slos/%s", pathParam0, pathParam1) + 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 +} + +// NewResetSloOpRequest generates requests for ResetSloOp +func NewResetSloOpRequest(server string, spaceId SLOsSpaceId, sloId SLOsSloId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sloId", runtime.ParamLocationPath, sloId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/s/%s/api/observability/slos/%s/_reset", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewDisableSloOpRequest generates requests for DisableSloOp +func NewDisableSloOpRequest(server string, spaceId SLOsSpaceId, sloId SLOsSloId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sloId", runtime.ParamLocationPath, sloId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/s/%s/api/observability/slos/%s/disable", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewEnableSloOpRequest generates requests for EnableSloOp +func NewEnableSloOpRequest(server string, spaceId SLOsSpaceId, sloId SLOsSloId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sloId", runtime.ParamLocationPath, sloId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/s/%s/api/observability/slos/%s/enable", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetDefinitionsOpRequest generates requests for GetDefinitionsOp +func NewGetDefinitionsOpRequest(server string, spaceId SLOsSpaceId, params *GetDefinitionsOpParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/s/%s/internal/observability/slos/_definitions", 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.IncludeOutdatedOnly != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "includeOutdatedOnly", runtime.ParamLocationQuery, *params.IncludeOutdatedOnly); 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) + } + } + } + + } + + if params.IncludeHealth != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "includeHealth", runtime.ParamLocationQuery, *params.IncludeHealth); 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) + } + } + } + + } + + if params.Tags != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "tags", runtime.ParamLocationQuery, *params.Tags); 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) + } + } + } + + } + + if params.Search != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); 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) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); 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) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "perPage", runtime.ParamLocationQuery, *params.PerPage); 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(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +} + +// ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface +} + +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, opts...) + if err != nil { + return nil, err + } + return &ClientWithResponses{client}, nil +} + +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil + } +} + +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + // PostActionsConnectorIdExecuteWithBodyWithResponse request with any body + PostActionsConnectorIdExecuteWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostActionsConnectorIdExecuteResponse, error) + + PostActionsConnectorIdExecuteWithResponse(ctx context.Context, id string, body PostActionsConnectorIdExecuteJSONRequestBody, reqEditors ...RequestEditorFn) (*PostActionsConnectorIdExecuteResponse, error) + + // GetActionsConnectorTypesWithResponse request + GetActionsConnectorTypesWithResponse(ctx context.Context, params *GetActionsConnectorTypesParams, reqEditors ...RequestEditorFn) (*GetActionsConnectorTypesResponse, error) + + // PostAgentBuilderA2aAgentidWithBodyWithResponse request with any body + PostAgentBuilderA2aAgentidWithBodyWithResponse(ctx context.Context, agentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostAgentBuilderA2aAgentidResponse, error) + + PostAgentBuilderA2aAgentidWithResponse(ctx context.Context, agentId string, body PostAgentBuilderA2aAgentidJSONRequestBody, reqEditors ...RequestEditorFn) (*PostAgentBuilderA2aAgentidResponse, error) + + // GetAgentBuilderA2aAgentidJsonWithResponse request + GetAgentBuilderA2aAgentidJsonWithResponse(ctx context.Context, agentId string, reqEditors ...RequestEditorFn) (*GetAgentBuilderA2aAgentidJsonResponse, error) + + // GetAgentBuilderAgentsWithResponse request + GetAgentBuilderAgentsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAgentBuilderAgentsResponse, error) + + // PostAgentBuilderAgentsWithBodyWithResponse request with any body + PostAgentBuilderAgentsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostAgentBuilderAgentsResponse, error) + + PostAgentBuilderAgentsWithResponse(ctx context.Context, body PostAgentBuilderAgentsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostAgentBuilderAgentsResponse, error) + + // DeleteAgentBuilderAgentsIdWithResponse request + DeleteAgentBuilderAgentsIdWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteAgentBuilderAgentsIdResponse, error) + + // GetAgentBuilderAgentsIdWithResponse request + GetAgentBuilderAgentsIdWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetAgentBuilderAgentsIdResponse, error) + + // PutAgentBuilderAgentsIdWithBodyWithResponse request with any body + PutAgentBuilderAgentsIdWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutAgentBuilderAgentsIdResponse, error) + + PutAgentBuilderAgentsIdWithResponse(ctx context.Context, id string, body PutAgentBuilderAgentsIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PutAgentBuilderAgentsIdResponse, error) + + // GetAgentBuilderConversationsWithResponse request + GetAgentBuilderConversationsWithResponse(ctx context.Context, params *GetAgentBuilderConversationsParams, reqEditors ...RequestEditorFn) (*GetAgentBuilderConversationsResponse, error) + + // DeleteAgentBuilderConversationsConversationIdWithResponse request + DeleteAgentBuilderConversationsConversationIdWithResponse(ctx context.Context, conversationId string, reqEditors ...RequestEditorFn) (*DeleteAgentBuilderConversationsConversationIdResponse, error) + + // GetAgentBuilderConversationsConversationIdWithResponse request + GetAgentBuilderConversationsConversationIdWithResponse(ctx context.Context, conversationId string, reqEditors ...RequestEditorFn) (*GetAgentBuilderConversationsConversationIdResponse, error) // PostAgentBuilderConverseWithBodyWithResponse request with any body PostAgentBuilderConverseWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostAgentBuilderConverseResponse, error) @@ -114367,22 +114514,6 @@ type ClientWithResponsesInterface interface { // GetEntityStoreStatusWithResponse request GetEntityStoreStatusWithResponse(ctx context.Context, params *GetEntityStoreStatusParams, reqEditors ...RequestEditorFn) (*GetEntityStoreStatusResponse, error) - // DeleteExceptionListWithResponse request - DeleteExceptionListWithResponse(ctx context.Context, params *DeleteExceptionListParams, reqEditors ...RequestEditorFn) (*DeleteExceptionListResponse, error) - - // ReadExceptionListWithResponse request - ReadExceptionListWithResponse(ctx context.Context, params *ReadExceptionListParams, reqEditors ...RequestEditorFn) (*ReadExceptionListResponse, error) - - // CreateExceptionListWithBodyWithResponse request with any body - CreateExceptionListWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateExceptionListResponse, error) - - CreateExceptionListWithResponse(ctx context.Context, body CreateExceptionListJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateExceptionListResponse, error) - - // UpdateExceptionListWithBodyWithResponse request with any body - UpdateExceptionListWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateExceptionListResponse, error) - - UpdateExceptionListWithResponse(ctx context.Context, body UpdateExceptionListJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateExceptionListResponse, error) - // DuplicateExceptionListWithResponse request DuplicateExceptionListWithResponse(ctx context.Context, params *DuplicateExceptionListParams, reqEditors ...RequestEditorFn) (*DuplicateExceptionListResponse, error) @@ -114395,22 +114526,6 @@ type ClientWithResponsesInterface interface { // ImportExceptionListWithBodyWithResponse request with any body ImportExceptionListWithBodyWithResponse(ctx context.Context, params *ImportExceptionListParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ImportExceptionListResponse, error) - // DeleteExceptionListItemWithResponse request - DeleteExceptionListItemWithResponse(ctx context.Context, params *DeleteExceptionListItemParams, reqEditors ...RequestEditorFn) (*DeleteExceptionListItemResponse, error) - - // ReadExceptionListItemWithResponse request - ReadExceptionListItemWithResponse(ctx context.Context, params *ReadExceptionListItemParams, reqEditors ...RequestEditorFn) (*ReadExceptionListItemResponse, error) - - // CreateExceptionListItemWithBodyWithResponse request with any body - CreateExceptionListItemWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateExceptionListItemResponse, error) - - CreateExceptionListItemWithResponse(ctx context.Context, body CreateExceptionListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateExceptionListItemResponse, error) - - // UpdateExceptionListItemWithBodyWithResponse request with any body - UpdateExceptionListItemWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateExceptionListItemResponse, error) - - UpdateExceptionListItemWithResponse(ctx context.Context, body UpdateExceptionListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateExceptionListItemResponse, error) - // FindExceptionListItemsWithResponse request FindExceptionListItemsWithResponse(ctx context.Context, params *FindExceptionListItemsParams, reqEditors ...RequestEditorFn) (*FindExceptionListItemsResponse, error) @@ -114917,60 +115032,9 @@ type ClientWithResponsesInterface interface { // GetFleetUninstallTokensUninstalltokenidWithResponse request GetFleetUninstallTokensUninstalltokenidWithResponse(ctx context.Context, uninstallTokenId string, reqEditors ...RequestEditorFn) (*GetFleetUninstallTokensUninstalltokenidResponse, error) - // DeleteListWithResponse request - DeleteListWithResponse(ctx context.Context, params *DeleteListParams, reqEditors ...RequestEditorFn) (*DeleteListResponse, error) - - // ReadListWithResponse request - ReadListWithResponse(ctx context.Context, params *ReadListParams, reqEditors ...RequestEditorFn) (*ReadListResponse, error) - - // PatchListWithBodyWithResponse request with any body - PatchListWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchListResponse, error) - - PatchListWithResponse(ctx context.Context, body PatchListJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchListResponse, error) - - // CreateListWithBodyWithResponse request with any body - CreateListWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateListResponse, error) - - CreateListWithResponse(ctx context.Context, body CreateListJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateListResponse, error) - - // UpdateListWithBodyWithResponse request with any body - UpdateListWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateListResponse, error) - - UpdateListWithResponse(ctx context.Context, body UpdateListJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateListResponse, error) - // FindListsWithResponse request FindListsWithResponse(ctx context.Context, params *FindListsParams, reqEditors ...RequestEditorFn) (*FindListsResponse, error) - // DeleteListIndexWithResponse request - DeleteListIndexWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*DeleteListIndexResponse, error) - - // ReadListIndexWithResponse request - ReadListIndexWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ReadListIndexResponse, error) - - // CreateListIndexWithResponse request - CreateListIndexWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CreateListIndexResponse, error) - - // DeleteListItemWithResponse request - DeleteListItemWithResponse(ctx context.Context, params *DeleteListItemParams, reqEditors ...RequestEditorFn) (*DeleteListItemResponse, error) - - // ReadListItemWithResponse request - ReadListItemWithResponse(ctx context.Context, params *ReadListItemParams, reqEditors ...RequestEditorFn) (*ReadListItemResponse, error) - - // PatchListItemWithBodyWithResponse request with any body - PatchListItemWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchListItemResponse, error) - - PatchListItemWithResponse(ctx context.Context, body PatchListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchListItemResponse, error) - - // CreateListItemWithBodyWithResponse request with any body - CreateListItemWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateListItemResponse, error) - - CreateListItemWithResponse(ctx context.Context, body CreateListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateListItemResponse, error) - - // UpdateListItemWithBodyWithResponse request with any body - UpdateListItemWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateListItemResponse, error) - - UpdateListItemWithResponse(ctx context.Context, body UpdateListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateListItemResponse, error) - // ExportListItemsWithResponse request ExportListItemsWithResponse(ctx context.Context, params *ExportListItemsParams, reqEditors ...RequestEditorFn) (*ExportListItemsResponse, error) @@ -115666,6 +115730,89 @@ type ClientWithResponsesInterface interface { UpdateRuleWithResponse(ctx context.Context, spaceId SpaceId, body UpdateRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateRuleResponse, error) + // DeleteExceptionListWithResponse request + DeleteExceptionListWithResponse(ctx context.Context, spaceId SpaceId, params *DeleteExceptionListParams, reqEditors ...RequestEditorFn) (*DeleteExceptionListResponse, error) + + // ReadExceptionListWithResponse request + ReadExceptionListWithResponse(ctx context.Context, spaceId SpaceId, params *ReadExceptionListParams, reqEditors ...RequestEditorFn) (*ReadExceptionListResponse, error) + + // CreateExceptionListWithBodyWithResponse request with any body + CreateExceptionListWithBodyWithResponse(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateExceptionListResponse, error) + + CreateExceptionListWithResponse(ctx context.Context, spaceId SpaceId, body CreateExceptionListJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateExceptionListResponse, error) + + // UpdateExceptionListWithBodyWithResponse request with any body + UpdateExceptionListWithBodyWithResponse(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateExceptionListResponse, error) + + UpdateExceptionListWithResponse(ctx context.Context, spaceId SpaceId, body UpdateExceptionListJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateExceptionListResponse, error) + + // DeleteExceptionListItemWithResponse request + DeleteExceptionListItemWithResponse(ctx context.Context, spaceId SpaceId, params *DeleteExceptionListItemParams, reqEditors ...RequestEditorFn) (*DeleteExceptionListItemResponse, error) + + // ReadExceptionListItemWithResponse request + ReadExceptionListItemWithResponse(ctx context.Context, spaceId SpaceId, params *ReadExceptionListItemParams, reqEditors ...RequestEditorFn) (*ReadExceptionListItemResponse, error) + + // CreateExceptionListItemWithBodyWithResponse request with any body + CreateExceptionListItemWithBodyWithResponse(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateExceptionListItemResponse, error) + + CreateExceptionListItemWithResponse(ctx context.Context, spaceId SpaceId, body CreateExceptionListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateExceptionListItemResponse, error) + + // UpdateExceptionListItemWithBodyWithResponse request with any body + UpdateExceptionListItemWithBodyWithResponse(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateExceptionListItemResponse, error) + + UpdateExceptionListItemWithResponse(ctx context.Context, spaceId SpaceId, body UpdateExceptionListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateExceptionListItemResponse, error) + + // DeleteListWithResponse request + DeleteListWithResponse(ctx context.Context, spaceId SpaceId, params *DeleteListParams, reqEditors ...RequestEditorFn) (*DeleteListResponse, error) + + // ReadListWithResponse request + ReadListWithResponse(ctx context.Context, spaceId SpaceId, params *ReadListParams, reqEditors ...RequestEditorFn) (*ReadListResponse, error) + + // PatchListWithBodyWithResponse request with any body + PatchListWithBodyWithResponse(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchListResponse, error) + + PatchListWithResponse(ctx context.Context, spaceId SpaceId, body PatchListJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchListResponse, error) + + // CreateListWithBodyWithResponse request with any body + CreateListWithBodyWithResponse(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateListResponse, error) + + CreateListWithResponse(ctx context.Context, spaceId SpaceId, body CreateListJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateListResponse, error) + + // UpdateListWithBodyWithResponse request with any body + UpdateListWithBodyWithResponse(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateListResponse, error) + + UpdateListWithResponse(ctx context.Context, spaceId SpaceId, body UpdateListJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateListResponse, error) + + // DeleteListIndexWithResponse request + DeleteListIndexWithResponse(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*DeleteListIndexResponse, error) + + // ReadListIndexWithResponse request + ReadListIndexWithResponse(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*ReadListIndexResponse, error) + + // CreateListIndexWithResponse request + CreateListIndexWithResponse(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*CreateListIndexResponse, error) + + // DeleteListItemWithResponse request + DeleteListItemWithResponse(ctx context.Context, spaceId SpaceId, params *DeleteListItemParams, reqEditors ...RequestEditorFn) (*DeleteListItemResponse, error) + + // ReadListItemWithResponse request + ReadListItemWithResponse(ctx context.Context, spaceId SpaceId, params *ReadListItemParams, reqEditors ...RequestEditorFn) (*ReadListItemResponse, error) + + // PatchListItemWithBodyWithResponse request with any body + PatchListItemWithBodyWithResponse(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchListItemResponse, error) + + PatchListItemWithResponse(ctx context.Context, spaceId SpaceId, body PatchListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchListItemResponse, error) + + // CreateListItemWithBodyWithResponse request with any body + CreateListItemWithBodyWithResponse(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateListItemResponse, error) + + CreateListItemWithResponse(ctx context.Context, spaceId SpaceId, body CreateListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateListItemResponse, error) + + // UpdateListItemWithBodyWithResponse request with any body + UpdateListItemWithBodyWithResponse(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateListItemResponse, error) + + UpdateListItemWithResponse(ctx context.Context, spaceId SpaceId, body UpdateListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateListItemResponse, error) + // PostMaintenanceWindowWithBodyWithResponse request with any body PostMaintenanceWindowWithBodyWithResponse(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostMaintenanceWindowResponse, error) @@ -121998,122 +122145,6 @@ func (r GetEntityStoreStatusResponse) StatusCode() int { return 0 } -type DeleteExceptionListResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SecurityExceptionsAPIExceptionList - JSON400 *struct { - union json.RawMessage - } - JSON401 *SecurityExceptionsAPIPlatformErrorResponse - JSON403 *SecurityExceptionsAPIPlatformErrorResponse - JSON404 *SecurityExceptionsAPISiemErrorResponse - JSON500 *SecurityExceptionsAPISiemErrorResponse -} - -// Status returns HTTPResponse.Status -func (r DeleteExceptionListResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteExceptionListResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ReadExceptionListResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SecurityExceptionsAPIExceptionList - JSON400 *struct { - union json.RawMessage - } - JSON401 *SecurityExceptionsAPIPlatformErrorResponse - JSON403 *SecurityExceptionsAPIPlatformErrorResponse - JSON404 *SecurityExceptionsAPISiemErrorResponse - JSON500 *SecurityExceptionsAPISiemErrorResponse -} - -// Status returns HTTPResponse.Status -func (r ReadExceptionListResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ReadExceptionListResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreateExceptionListResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SecurityExceptionsAPIExceptionList - JSON400 *struct { - union json.RawMessage - } - JSON401 *SecurityExceptionsAPIPlatformErrorResponse - JSON403 *SecurityExceptionsAPIPlatformErrorResponse - JSON409 *SecurityExceptionsAPISiemErrorResponse - JSON500 *SecurityExceptionsAPISiemErrorResponse -} - -// Status returns HTTPResponse.Status -func (r CreateExceptionListResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateExceptionListResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type UpdateExceptionListResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SecurityExceptionsAPIExceptionList - JSON400 *struct { - union json.RawMessage - } - JSON401 *SecurityExceptionsAPIPlatformErrorResponse - JSON403 *SecurityExceptionsAPIPlatformErrorResponse - JSON404 *SecurityExceptionsAPISiemErrorResponse - JSON500 *SecurityExceptionsAPISiemErrorResponse -} - -// Status returns HTTPResponse.Status -func (r UpdateExceptionListResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UpdateExceptionListResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - type DuplicateExceptionListResponse struct { Body []byte HTTPResponse *http.Response @@ -122241,122 +122272,6 @@ func (r ImportExceptionListResponse) StatusCode() int { return 0 } -type DeleteExceptionListItemResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SecurityExceptionsAPIExceptionListItem - JSON400 *struct { - union json.RawMessage - } - JSON401 *SecurityExceptionsAPIPlatformErrorResponse - JSON403 *SecurityExceptionsAPIPlatformErrorResponse - JSON404 *SecurityExceptionsAPISiemErrorResponse - JSON500 *SecurityExceptionsAPISiemErrorResponse -} - -// Status returns HTTPResponse.Status -func (r DeleteExceptionListItemResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteExceptionListItemResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ReadExceptionListItemResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SecurityExceptionsAPIExceptionListItem - JSON400 *struct { - union json.RawMessage - } - JSON401 *SecurityExceptionsAPIPlatformErrorResponse - JSON403 *SecurityExceptionsAPIPlatformErrorResponse - JSON404 *SecurityExceptionsAPISiemErrorResponse - JSON500 *SecurityExceptionsAPISiemErrorResponse -} - -// Status returns HTTPResponse.Status -func (r ReadExceptionListItemResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ReadExceptionListItemResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreateExceptionListItemResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SecurityExceptionsAPIExceptionListItem - JSON400 *struct { - union json.RawMessage - } - JSON401 *SecurityExceptionsAPIPlatformErrorResponse - JSON403 *SecurityExceptionsAPIPlatformErrorResponse - JSON409 *SecurityExceptionsAPISiemErrorResponse - JSON500 *SecurityExceptionsAPISiemErrorResponse -} - -// Status returns HTTPResponse.Status -func (r CreateExceptionListItemResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateExceptionListItemResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type UpdateExceptionListItemResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SecurityExceptionsAPIExceptionListItem - JSON400 *struct { - union json.RawMessage - } - JSON401 *SecurityExceptionsAPIPlatformErrorResponse - JSON403 *SecurityExceptionsAPIPlatformErrorResponse - JSON404 *SecurityExceptionsAPISiemErrorResponse - JSON500 *SecurityExceptionsAPISiemErrorResponse -} - -// Status returns HTTPResponse.Status -func (r UpdateExceptionListItemResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UpdateExceptionListItemResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - type FindExceptionListItemsResponse struct { Body []byte HTTPResponse *http.Response @@ -129516,151 +129431,6 @@ func (r GetFleetUninstallTokensUninstalltokenidResponse) StatusCode() int { return 0 } -type DeleteListResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SecurityListsAPIList - JSON400 *struct { - union json.RawMessage - } - JSON401 *SecurityListsAPIPlatformErrorResponse - JSON403 *SecurityListsAPIPlatformErrorResponse - JSON404 *SecurityListsAPISiemErrorResponse - JSON500 *SecurityListsAPISiemErrorResponse -} - -// Status returns HTTPResponse.Status -func (r DeleteListResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteListResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ReadListResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SecurityListsAPIList - JSON400 *struct { - union json.RawMessage - } - JSON401 *SecurityListsAPIPlatformErrorResponse - JSON403 *SecurityListsAPIPlatformErrorResponse - JSON404 *SecurityListsAPISiemErrorResponse - JSON500 *SecurityListsAPISiemErrorResponse -} - -// Status returns HTTPResponse.Status -func (r ReadListResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ReadListResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchListResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SecurityListsAPIList - JSON400 *struct { - union json.RawMessage - } - JSON401 *SecurityListsAPIPlatformErrorResponse - JSON403 *SecurityListsAPIPlatformErrorResponse - JSON404 *SecurityListsAPISiemErrorResponse - JSON500 *SecurityListsAPISiemErrorResponse -} - -// Status returns HTTPResponse.Status -func (r PatchListResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchListResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreateListResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SecurityListsAPIList - JSON400 *struct { - union json.RawMessage - } - JSON401 *SecurityListsAPIPlatformErrorResponse - JSON403 *SecurityListsAPIPlatformErrorResponse - JSON409 *SecurityListsAPISiemErrorResponse - JSON500 *SecurityListsAPISiemErrorResponse -} - -// Status returns HTTPResponse.Status -func (r CreateListResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateListResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type UpdateListResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SecurityListsAPIList - JSON400 *struct { - union json.RawMessage - } - JSON401 *SecurityListsAPIPlatformErrorResponse - JSON403 *SecurityListsAPIPlatformErrorResponse - JSON404 *SecurityListsAPISiemErrorResponse - JSON500 *SecurityListsAPISiemErrorResponse -} - -// Status returns HTTPResponse.Status -func (r UpdateListResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UpdateListResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - type FindListsResponse struct { Body []byte HTTPResponse *http.Response @@ -129695,252 +129465,6 @@ func (r FindListsResponse) StatusCode() int { return 0 } -type DeleteListIndexResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Acknowledged bool `json:"acknowledged"` - } - JSON400 *struct { - union json.RawMessage - } - JSON401 *SecurityListsAPIPlatformErrorResponse - JSON403 *SecurityListsAPIPlatformErrorResponse - JSON404 *SecurityListsAPISiemErrorResponse - JSON500 *SecurityListsAPISiemErrorResponse -} - -// Status returns HTTPResponse.Status -func (r DeleteListIndexResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteListIndexResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ReadListIndexResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - ListIndex bool `json:"list_index"` - ListItemIndex bool `json:"list_item_index"` - } - JSON400 *struct { - union json.RawMessage - } - JSON401 *SecurityListsAPIPlatformErrorResponse - JSON403 *SecurityListsAPIPlatformErrorResponse - JSON404 *SecurityListsAPISiemErrorResponse - JSON500 *SecurityListsAPISiemErrorResponse -} - -// Status returns HTTPResponse.Status -func (r ReadListIndexResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ReadListIndexResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreateListIndexResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Acknowledged bool `json:"acknowledged"` - } - JSON400 *struct { - union json.RawMessage - } - JSON401 *SecurityListsAPIPlatformErrorResponse - JSON403 *SecurityListsAPIPlatformErrorResponse - JSON409 *SecurityListsAPISiemErrorResponse - JSON500 *SecurityListsAPISiemErrorResponse -} - -// Status returns HTTPResponse.Status -func (r CreateListIndexResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateListIndexResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteListItemResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - union json.RawMessage - } - JSON400 *struct { - union json.RawMessage - } - JSON401 *SecurityListsAPIPlatformErrorResponse - JSON403 *SecurityListsAPIPlatformErrorResponse - JSON404 *SecurityListsAPISiemErrorResponse - JSON500 *SecurityListsAPISiemErrorResponse -} -type DeleteListItem2001 = []SecurityListsAPIListItem - -// Status returns HTTPResponse.Status -func (r DeleteListItemResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteListItemResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type ReadListItemResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - union json.RawMessage - } - JSON400 *struct { - union json.RawMessage - } - JSON401 *SecurityListsAPIPlatformErrorResponse - JSON403 *SecurityListsAPIPlatformErrorResponse - JSON404 *SecurityListsAPISiemErrorResponse - JSON500 *SecurityListsAPISiemErrorResponse -} -type ReadListItem2001 = []SecurityListsAPIListItem - -// Status returns HTTPResponse.Status -func (r ReadListItemResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r ReadListItemResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchListItemResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SecurityListsAPIListItem - JSON400 *struct { - union json.RawMessage - } - JSON401 *SecurityListsAPIPlatformErrorResponse - JSON403 *SecurityListsAPIPlatformErrorResponse - JSON404 *SecurityListsAPISiemErrorResponse - JSON500 *SecurityListsAPISiemErrorResponse -} - -// Status returns HTTPResponse.Status -func (r PatchListItemResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchListItemResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type CreateListItemResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SecurityListsAPIListItem - JSON400 *struct { - union json.RawMessage - } - JSON401 *SecurityListsAPIPlatformErrorResponse - JSON403 *SecurityListsAPIPlatformErrorResponse - JSON404 *SecurityListsAPIPlatformErrorResponse - JSON409 *SecurityListsAPISiemErrorResponse - JSON500 *SecurityListsAPISiemErrorResponse -} - -// Status returns HTTPResponse.Status -func (r CreateListItemResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r CreateListItemResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type UpdateListItemResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SecurityListsAPIListItem - JSON400 *struct { - union json.RawMessage - } - JSON401 *SecurityListsAPIPlatformErrorResponse - JSON403 *SecurityListsAPIPlatformErrorResponse - JSON404 *SecurityListsAPISiemErrorResponse - JSON500 *SecurityListsAPISiemErrorResponse -} - -// Status returns HTTPResponse.Status -func (r UpdateListItemResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UpdateListItemResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - type ExportListItemsResponse struct { Body []byte HTTPResponse *http.Response @@ -134221,6 +133745,629 @@ func (r UpdateRuleResponse) StatusCode() int { return 0 } +type DeleteExceptionListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SecurityExceptionsAPIExceptionList + JSON400 *struct { + union json.RawMessage + } + JSON401 *SecurityExceptionsAPIPlatformErrorResponse + JSON403 *SecurityExceptionsAPIPlatformErrorResponse + JSON404 *SecurityExceptionsAPISiemErrorResponse + JSON500 *SecurityExceptionsAPISiemErrorResponse +} + +// Status returns HTTPResponse.Status +func (r DeleteExceptionListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteExceptionListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ReadExceptionListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SecurityExceptionsAPIExceptionList + JSON400 *struct { + union json.RawMessage + } + JSON401 *SecurityExceptionsAPIPlatformErrorResponse + JSON403 *SecurityExceptionsAPIPlatformErrorResponse + JSON404 *SecurityExceptionsAPISiemErrorResponse + JSON500 *SecurityExceptionsAPISiemErrorResponse +} + +// Status returns HTTPResponse.Status +func (r ReadExceptionListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ReadExceptionListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateExceptionListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SecurityExceptionsAPIExceptionList + JSON400 *struct { + union json.RawMessage + } + JSON401 *SecurityExceptionsAPIPlatformErrorResponse + JSON403 *SecurityExceptionsAPIPlatformErrorResponse + JSON409 *SecurityExceptionsAPISiemErrorResponse + JSON500 *SecurityExceptionsAPISiemErrorResponse +} + +// Status returns HTTPResponse.Status +func (r CreateExceptionListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateExceptionListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateExceptionListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SecurityExceptionsAPIExceptionList + JSON400 *struct { + union json.RawMessage + } + JSON401 *SecurityExceptionsAPIPlatformErrorResponse + JSON403 *SecurityExceptionsAPIPlatformErrorResponse + JSON404 *SecurityExceptionsAPISiemErrorResponse + JSON500 *SecurityExceptionsAPISiemErrorResponse +} + +// Status returns HTTPResponse.Status +func (r UpdateExceptionListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateExceptionListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteExceptionListItemResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SecurityExceptionsAPIExceptionListItem + JSON400 *struct { + union json.RawMessage + } + JSON401 *SecurityExceptionsAPIPlatformErrorResponse + JSON403 *SecurityExceptionsAPIPlatformErrorResponse + JSON404 *SecurityExceptionsAPISiemErrorResponse + JSON500 *SecurityExceptionsAPISiemErrorResponse +} + +// Status returns HTTPResponse.Status +func (r DeleteExceptionListItemResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteExceptionListItemResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ReadExceptionListItemResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SecurityExceptionsAPIExceptionListItem + JSON400 *struct { + union json.RawMessage + } + JSON401 *SecurityExceptionsAPIPlatformErrorResponse + JSON403 *SecurityExceptionsAPIPlatformErrorResponse + JSON404 *SecurityExceptionsAPISiemErrorResponse + JSON500 *SecurityExceptionsAPISiemErrorResponse +} + +// Status returns HTTPResponse.Status +func (r ReadExceptionListItemResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ReadExceptionListItemResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateExceptionListItemResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SecurityExceptionsAPIExceptionListItem + JSON400 *struct { + union json.RawMessage + } + JSON401 *SecurityExceptionsAPIPlatformErrorResponse + JSON403 *SecurityExceptionsAPIPlatformErrorResponse + JSON409 *SecurityExceptionsAPISiemErrorResponse + JSON500 *SecurityExceptionsAPISiemErrorResponse +} + +// Status returns HTTPResponse.Status +func (r CreateExceptionListItemResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateExceptionListItemResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateExceptionListItemResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SecurityExceptionsAPIExceptionListItem + JSON400 *struct { + union json.RawMessage + } + JSON401 *SecurityExceptionsAPIPlatformErrorResponse + JSON403 *SecurityExceptionsAPIPlatformErrorResponse + JSON404 *SecurityExceptionsAPISiemErrorResponse + JSON500 *SecurityExceptionsAPISiemErrorResponse +} + +// Status returns HTTPResponse.Status +func (r UpdateExceptionListItemResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateExceptionListItemResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SecurityListsAPIList + JSON400 *struct { + union json.RawMessage + } + JSON401 *SecurityListsAPIPlatformErrorResponse + JSON403 *SecurityListsAPIPlatformErrorResponse + JSON404 *SecurityListsAPISiemErrorResponse + JSON500 *SecurityListsAPISiemErrorResponse +} + +// Status returns HTTPResponse.Status +func (r DeleteListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ReadListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SecurityListsAPIList + JSON400 *struct { + union json.RawMessage + } + JSON401 *SecurityListsAPIPlatformErrorResponse + JSON403 *SecurityListsAPIPlatformErrorResponse + JSON404 *SecurityListsAPISiemErrorResponse + JSON500 *SecurityListsAPISiemErrorResponse +} + +// Status returns HTTPResponse.Status +func (r ReadListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ReadListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SecurityListsAPIList + JSON400 *struct { + union json.RawMessage + } + JSON401 *SecurityListsAPIPlatformErrorResponse + JSON403 *SecurityListsAPIPlatformErrorResponse + JSON404 *SecurityListsAPISiemErrorResponse + JSON500 *SecurityListsAPISiemErrorResponse +} + +// Status returns HTTPResponse.Status +func (r PatchListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SecurityListsAPIList + JSON400 *struct { + union json.RawMessage + } + JSON401 *SecurityListsAPIPlatformErrorResponse + JSON403 *SecurityListsAPIPlatformErrorResponse + JSON409 *SecurityListsAPISiemErrorResponse + JSON500 *SecurityListsAPISiemErrorResponse +} + +// Status returns HTTPResponse.Status +func (r CreateListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SecurityListsAPIList + JSON400 *struct { + union json.RawMessage + } + JSON401 *SecurityListsAPIPlatformErrorResponse + JSON403 *SecurityListsAPIPlatformErrorResponse + JSON404 *SecurityListsAPISiemErrorResponse + JSON500 *SecurityListsAPISiemErrorResponse +} + +// Status returns HTTPResponse.Status +func (r UpdateListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteListIndexResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Acknowledged bool `json:"acknowledged"` + } + JSON400 *struct { + union json.RawMessage + } + JSON401 *SecurityListsAPIPlatformErrorResponse + JSON403 *SecurityListsAPIPlatformErrorResponse + JSON404 *SecurityListsAPISiemErrorResponse + JSON500 *SecurityListsAPISiemErrorResponse +} + +// Status returns HTTPResponse.Status +func (r DeleteListIndexResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteListIndexResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ReadListIndexResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + ListIndex bool `json:"list_index"` + ListItemIndex bool `json:"list_item_index"` + } + JSON400 *struct { + union json.RawMessage + } + JSON401 *SecurityListsAPIPlatformErrorResponse + JSON403 *SecurityListsAPIPlatformErrorResponse + JSON404 *SecurityListsAPISiemErrorResponse + JSON500 *SecurityListsAPISiemErrorResponse +} + +// Status returns HTTPResponse.Status +func (r ReadListIndexResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ReadListIndexResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateListIndexResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Acknowledged bool `json:"acknowledged"` + } + JSON400 *struct { + union json.RawMessage + } + JSON401 *SecurityListsAPIPlatformErrorResponse + JSON403 *SecurityListsAPIPlatformErrorResponse + JSON409 *SecurityListsAPISiemErrorResponse + JSON500 *SecurityListsAPISiemErrorResponse +} + +// Status returns HTTPResponse.Status +func (r CreateListIndexResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateListIndexResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteListItemResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + union json.RawMessage + } + JSON400 *struct { + union json.RawMessage + } + JSON401 *SecurityListsAPIPlatformErrorResponse + JSON403 *SecurityListsAPIPlatformErrorResponse + JSON404 *SecurityListsAPISiemErrorResponse + JSON500 *SecurityListsAPISiemErrorResponse +} +type DeleteListItem2001 = []SecurityListsAPIListItem + +// Status returns HTTPResponse.Status +func (r DeleteListItemResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteListItemResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ReadListItemResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + union json.RawMessage + } + JSON400 *struct { + union json.RawMessage + } + JSON401 *SecurityListsAPIPlatformErrorResponse + JSON403 *SecurityListsAPIPlatformErrorResponse + JSON404 *SecurityListsAPISiemErrorResponse + JSON500 *SecurityListsAPISiemErrorResponse +} +type ReadListItem2001 = []SecurityListsAPIListItem + +// Status returns HTTPResponse.Status +func (r ReadListItemResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ReadListItemResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchListItemResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SecurityListsAPIListItem + JSON400 *struct { + union json.RawMessage + } + JSON401 *SecurityListsAPIPlatformErrorResponse + JSON403 *SecurityListsAPIPlatformErrorResponse + JSON404 *SecurityListsAPISiemErrorResponse + JSON500 *SecurityListsAPISiemErrorResponse +} + +// Status returns HTTPResponse.Status +func (r PatchListItemResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchListItemResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateListItemResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SecurityListsAPIListItem + JSON400 *struct { + union json.RawMessage + } + JSON401 *SecurityListsAPIPlatformErrorResponse + JSON403 *SecurityListsAPIPlatformErrorResponse + JSON404 *SecurityListsAPIPlatformErrorResponse + JSON409 *SecurityListsAPISiemErrorResponse + JSON500 *SecurityListsAPISiemErrorResponse +} + +// Status returns HTTPResponse.Status +func (r CreateListItemResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateListItemResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateListItemResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SecurityListsAPIListItem + JSON400 *struct { + union json.RawMessage + } + JSON401 *SecurityListsAPIPlatformErrorResponse + JSON403 *SecurityListsAPIPlatformErrorResponse + JSON404 *SecurityListsAPISiemErrorResponse + JSON500 *SecurityListsAPISiemErrorResponse +} + +// Status returns HTTPResponse.Status +func (r UpdateListItemResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateListItemResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type PostMaintenanceWindowResponse struct { Body []byte HTTPResponse *http.Response @@ -136999,58 +137146,6 @@ func (c *ClientWithResponses) GetEntityStoreStatusWithResponse(ctx context.Conte return ParseGetEntityStoreStatusResponse(rsp) } -// DeleteExceptionListWithResponse request returning *DeleteExceptionListResponse -func (c *ClientWithResponses) DeleteExceptionListWithResponse(ctx context.Context, params *DeleteExceptionListParams, reqEditors ...RequestEditorFn) (*DeleteExceptionListResponse, error) { - rsp, err := c.DeleteExceptionList(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteExceptionListResponse(rsp) -} - -// ReadExceptionListWithResponse request returning *ReadExceptionListResponse -func (c *ClientWithResponses) ReadExceptionListWithResponse(ctx context.Context, params *ReadExceptionListParams, reqEditors ...RequestEditorFn) (*ReadExceptionListResponse, error) { - rsp, err := c.ReadExceptionList(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseReadExceptionListResponse(rsp) -} - -// CreateExceptionListWithBodyWithResponse request with arbitrary body returning *CreateExceptionListResponse -func (c *ClientWithResponses) CreateExceptionListWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateExceptionListResponse, error) { - rsp, err := c.CreateExceptionListWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateExceptionListResponse(rsp) -} - -func (c *ClientWithResponses) CreateExceptionListWithResponse(ctx context.Context, body CreateExceptionListJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateExceptionListResponse, error) { - rsp, err := c.CreateExceptionList(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateExceptionListResponse(rsp) -} - -// UpdateExceptionListWithBodyWithResponse request with arbitrary body returning *UpdateExceptionListResponse -func (c *ClientWithResponses) UpdateExceptionListWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateExceptionListResponse, error) { - rsp, err := c.UpdateExceptionListWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateExceptionListResponse(rsp) -} - -func (c *ClientWithResponses) UpdateExceptionListWithResponse(ctx context.Context, body UpdateExceptionListJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateExceptionListResponse, error) { - rsp, err := c.UpdateExceptionList(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateExceptionListResponse(rsp) -} - // DuplicateExceptionListWithResponse request returning *DuplicateExceptionListResponse func (c *ClientWithResponses) DuplicateExceptionListWithResponse(ctx context.Context, params *DuplicateExceptionListParams, reqEditors ...RequestEditorFn) (*DuplicateExceptionListResponse, error) { rsp, err := c.DuplicateExceptionList(ctx, params, reqEditors...) @@ -137087,58 +137182,6 @@ func (c *ClientWithResponses) ImportExceptionListWithBodyWithResponse(ctx contex return ParseImportExceptionListResponse(rsp) } -// DeleteExceptionListItemWithResponse request returning *DeleteExceptionListItemResponse -func (c *ClientWithResponses) DeleteExceptionListItemWithResponse(ctx context.Context, params *DeleteExceptionListItemParams, reqEditors ...RequestEditorFn) (*DeleteExceptionListItemResponse, error) { - rsp, err := c.DeleteExceptionListItem(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteExceptionListItemResponse(rsp) -} - -// ReadExceptionListItemWithResponse request returning *ReadExceptionListItemResponse -func (c *ClientWithResponses) ReadExceptionListItemWithResponse(ctx context.Context, params *ReadExceptionListItemParams, reqEditors ...RequestEditorFn) (*ReadExceptionListItemResponse, error) { - rsp, err := c.ReadExceptionListItem(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseReadExceptionListItemResponse(rsp) -} - -// CreateExceptionListItemWithBodyWithResponse request with arbitrary body returning *CreateExceptionListItemResponse -func (c *ClientWithResponses) CreateExceptionListItemWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateExceptionListItemResponse, error) { - rsp, err := c.CreateExceptionListItemWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateExceptionListItemResponse(rsp) -} - -func (c *ClientWithResponses) CreateExceptionListItemWithResponse(ctx context.Context, body CreateExceptionListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateExceptionListItemResponse, error) { - rsp, err := c.CreateExceptionListItem(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateExceptionListItemResponse(rsp) -} - -// UpdateExceptionListItemWithBodyWithResponse request with arbitrary body returning *UpdateExceptionListItemResponse -func (c *ClientWithResponses) UpdateExceptionListItemWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateExceptionListItemResponse, error) { - rsp, err := c.UpdateExceptionListItemWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateExceptionListItemResponse(rsp) -} - -func (c *ClientWithResponses) UpdateExceptionListItemWithResponse(ctx context.Context, body UpdateExceptionListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateExceptionListItemResponse, error) { - rsp, err := c.UpdateExceptionListItem(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateExceptionListItemResponse(rsp) -} - // FindExceptionListItemsWithResponse request returning *FindExceptionListItemsResponse func (c *ClientWithResponses) FindExceptionListItemsWithResponse(ctx context.Context, params *FindExceptionListItemsParams, reqEditors ...RequestEditorFn) (*FindExceptionListItemsResponse, error) { rsp, err := c.FindExceptionListItems(ctx, params, reqEditors...) @@ -138767,75 +138810,6 @@ func (c *ClientWithResponses) GetFleetUninstallTokensUninstalltokenidWithRespons return ParseGetFleetUninstallTokensUninstalltokenidResponse(rsp) } -// DeleteListWithResponse request returning *DeleteListResponse -func (c *ClientWithResponses) DeleteListWithResponse(ctx context.Context, params *DeleteListParams, reqEditors ...RequestEditorFn) (*DeleteListResponse, error) { - rsp, err := c.DeleteList(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteListResponse(rsp) -} - -// ReadListWithResponse request returning *ReadListResponse -func (c *ClientWithResponses) ReadListWithResponse(ctx context.Context, params *ReadListParams, reqEditors ...RequestEditorFn) (*ReadListResponse, error) { - rsp, err := c.ReadList(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseReadListResponse(rsp) -} - -// PatchListWithBodyWithResponse request with arbitrary body returning *PatchListResponse -func (c *ClientWithResponses) PatchListWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchListResponse, error) { - rsp, err := c.PatchListWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchListResponse(rsp) -} - -func (c *ClientWithResponses) PatchListWithResponse(ctx context.Context, body PatchListJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchListResponse, error) { - rsp, err := c.PatchList(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchListResponse(rsp) -} - -// CreateListWithBodyWithResponse request with arbitrary body returning *CreateListResponse -func (c *ClientWithResponses) CreateListWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateListResponse, error) { - rsp, err := c.CreateListWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateListResponse(rsp) -} - -func (c *ClientWithResponses) CreateListWithResponse(ctx context.Context, body CreateListJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateListResponse, error) { - rsp, err := c.CreateList(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateListResponse(rsp) -} - -// UpdateListWithBodyWithResponse request with arbitrary body returning *UpdateListResponse -func (c *ClientWithResponses) UpdateListWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateListResponse, error) { - rsp, err := c.UpdateListWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateListResponse(rsp) -} - -func (c *ClientWithResponses) UpdateListWithResponse(ctx context.Context, body UpdateListJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateListResponse, error) { - rsp, err := c.UpdateList(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateListResponse(rsp) -} - // FindListsWithResponse request returning *FindListsResponse func (c *ClientWithResponses) FindListsWithResponse(ctx context.Context, params *FindListsParams, reqEditors ...RequestEditorFn) (*FindListsResponse, error) { rsp, err := c.FindLists(ctx, params, reqEditors...) @@ -138845,102 +138819,6 @@ func (c *ClientWithResponses) FindListsWithResponse(ctx context.Context, params return ParseFindListsResponse(rsp) } -// DeleteListIndexWithResponse request returning *DeleteListIndexResponse -func (c *ClientWithResponses) DeleteListIndexWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*DeleteListIndexResponse, error) { - rsp, err := c.DeleteListIndex(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteListIndexResponse(rsp) -} - -// ReadListIndexWithResponse request returning *ReadListIndexResponse -func (c *ClientWithResponses) ReadListIndexWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ReadListIndexResponse, error) { - rsp, err := c.ReadListIndex(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseReadListIndexResponse(rsp) -} - -// CreateListIndexWithResponse request returning *CreateListIndexResponse -func (c *ClientWithResponses) CreateListIndexWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CreateListIndexResponse, error) { - rsp, err := c.CreateListIndex(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateListIndexResponse(rsp) -} - -// DeleteListItemWithResponse request returning *DeleteListItemResponse -func (c *ClientWithResponses) DeleteListItemWithResponse(ctx context.Context, params *DeleteListItemParams, reqEditors ...RequestEditorFn) (*DeleteListItemResponse, error) { - rsp, err := c.DeleteListItem(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteListItemResponse(rsp) -} - -// ReadListItemWithResponse request returning *ReadListItemResponse -func (c *ClientWithResponses) ReadListItemWithResponse(ctx context.Context, params *ReadListItemParams, reqEditors ...RequestEditorFn) (*ReadListItemResponse, error) { - rsp, err := c.ReadListItem(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseReadListItemResponse(rsp) -} - -// PatchListItemWithBodyWithResponse request with arbitrary body returning *PatchListItemResponse -func (c *ClientWithResponses) PatchListItemWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchListItemResponse, error) { - rsp, err := c.PatchListItemWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchListItemResponse(rsp) -} - -func (c *ClientWithResponses) PatchListItemWithResponse(ctx context.Context, body PatchListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchListItemResponse, error) { - rsp, err := c.PatchListItem(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchListItemResponse(rsp) -} - -// CreateListItemWithBodyWithResponse request with arbitrary body returning *CreateListItemResponse -func (c *ClientWithResponses) CreateListItemWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateListItemResponse, error) { - rsp, err := c.CreateListItemWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateListItemResponse(rsp) -} - -func (c *ClientWithResponses) CreateListItemWithResponse(ctx context.Context, body CreateListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateListItemResponse, error) { - rsp, err := c.CreateListItem(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateListItemResponse(rsp) -} - -// UpdateListItemWithBodyWithResponse request with arbitrary body returning *UpdateListItemResponse -func (c *ClientWithResponses) UpdateListItemWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateListItemResponse, error) { - rsp, err := c.UpdateListItemWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateListItemResponse(rsp) -} - -func (c *ClientWithResponses) UpdateListItemWithResponse(ctx context.Context, body UpdateListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateListItemResponse, error) { - rsp, err := c.UpdateListItem(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateListItemResponse(rsp) -} - // ExportListItemsWithResponse request returning *ExportListItemsResponse func (c *ClientWithResponses) ExportListItemsWithResponse(ctx context.Context, params *ExportListItemsParams, reqEditors ...RequestEditorFn) (*ExportListItemsResponse, error) { rsp, err := c.ExportListItems(ctx, params, reqEditors...) @@ -141214,6 +141092,275 @@ func (c *ClientWithResponses) UpdateRuleWithResponse(ctx context.Context, spaceI return ParseUpdateRuleResponse(rsp) } +// DeleteExceptionListWithResponse request returning *DeleteExceptionListResponse +func (c *ClientWithResponses) DeleteExceptionListWithResponse(ctx context.Context, spaceId SpaceId, params *DeleteExceptionListParams, reqEditors ...RequestEditorFn) (*DeleteExceptionListResponse, error) { + rsp, err := c.DeleteExceptionList(ctx, spaceId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteExceptionListResponse(rsp) +} + +// ReadExceptionListWithResponse request returning *ReadExceptionListResponse +func (c *ClientWithResponses) ReadExceptionListWithResponse(ctx context.Context, spaceId SpaceId, params *ReadExceptionListParams, reqEditors ...RequestEditorFn) (*ReadExceptionListResponse, error) { + rsp, err := c.ReadExceptionList(ctx, spaceId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseReadExceptionListResponse(rsp) +} + +// CreateExceptionListWithBodyWithResponse request with arbitrary body returning *CreateExceptionListResponse +func (c *ClientWithResponses) CreateExceptionListWithBodyWithResponse(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateExceptionListResponse, error) { + rsp, err := c.CreateExceptionListWithBody(ctx, spaceId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateExceptionListResponse(rsp) +} + +func (c *ClientWithResponses) CreateExceptionListWithResponse(ctx context.Context, spaceId SpaceId, body CreateExceptionListJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateExceptionListResponse, error) { + rsp, err := c.CreateExceptionList(ctx, spaceId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateExceptionListResponse(rsp) +} + +// UpdateExceptionListWithBodyWithResponse request with arbitrary body returning *UpdateExceptionListResponse +func (c *ClientWithResponses) UpdateExceptionListWithBodyWithResponse(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateExceptionListResponse, error) { + rsp, err := c.UpdateExceptionListWithBody(ctx, spaceId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateExceptionListResponse(rsp) +} + +func (c *ClientWithResponses) UpdateExceptionListWithResponse(ctx context.Context, spaceId SpaceId, body UpdateExceptionListJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateExceptionListResponse, error) { + rsp, err := c.UpdateExceptionList(ctx, spaceId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateExceptionListResponse(rsp) +} + +// DeleteExceptionListItemWithResponse request returning *DeleteExceptionListItemResponse +func (c *ClientWithResponses) DeleteExceptionListItemWithResponse(ctx context.Context, spaceId SpaceId, params *DeleteExceptionListItemParams, reqEditors ...RequestEditorFn) (*DeleteExceptionListItemResponse, error) { + rsp, err := c.DeleteExceptionListItem(ctx, spaceId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteExceptionListItemResponse(rsp) +} + +// ReadExceptionListItemWithResponse request returning *ReadExceptionListItemResponse +func (c *ClientWithResponses) ReadExceptionListItemWithResponse(ctx context.Context, spaceId SpaceId, params *ReadExceptionListItemParams, reqEditors ...RequestEditorFn) (*ReadExceptionListItemResponse, error) { + rsp, err := c.ReadExceptionListItem(ctx, spaceId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseReadExceptionListItemResponse(rsp) +} + +// CreateExceptionListItemWithBodyWithResponse request with arbitrary body returning *CreateExceptionListItemResponse +func (c *ClientWithResponses) CreateExceptionListItemWithBodyWithResponse(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateExceptionListItemResponse, error) { + rsp, err := c.CreateExceptionListItemWithBody(ctx, spaceId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateExceptionListItemResponse(rsp) +} + +func (c *ClientWithResponses) CreateExceptionListItemWithResponse(ctx context.Context, spaceId SpaceId, body CreateExceptionListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateExceptionListItemResponse, error) { + rsp, err := c.CreateExceptionListItem(ctx, spaceId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateExceptionListItemResponse(rsp) +} + +// UpdateExceptionListItemWithBodyWithResponse request with arbitrary body returning *UpdateExceptionListItemResponse +func (c *ClientWithResponses) UpdateExceptionListItemWithBodyWithResponse(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateExceptionListItemResponse, error) { + rsp, err := c.UpdateExceptionListItemWithBody(ctx, spaceId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateExceptionListItemResponse(rsp) +} + +func (c *ClientWithResponses) UpdateExceptionListItemWithResponse(ctx context.Context, spaceId SpaceId, body UpdateExceptionListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateExceptionListItemResponse, error) { + rsp, err := c.UpdateExceptionListItem(ctx, spaceId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateExceptionListItemResponse(rsp) +} + +// DeleteListWithResponse request returning *DeleteListResponse +func (c *ClientWithResponses) DeleteListWithResponse(ctx context.Context, spaceId SpaceId, params *DeleteListParams, reqEditors ...RequestEditorFn) (*DeleteListResponse, error) { + rsp, err := c.DeleteList(ctx, spaceId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteListResponse(rsp) +} + +// ReadListWithResponse request returning *ReadListResponse +func (c *ClientWithResponses) ReadListWithResponse(ctx context.Context, spaceId SpaceId, params *ReadListParams, reqEditors ...RequestEditorFn) (*ReadListResponse, error) { + rsp, err := c.ReadList(ctx, spaceId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseReadListResponse(rsp) +} + +// PatchListWithBodyWithResponse request with arbitrary body returning *PatchListResponse +func (c *ClientWithResponses) PatchListWithBodyWithResponse(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchListResponse, error) { + rsp, err := c.PatchListWithBody(ctx, spaceId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchListResponse(rsp) +} + +func (c *ClientWithResponses) PatchListWithResponse(ctx context.Context, spaceId SpaceId, body PatchListJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchListResponse, error) { + rsp, err := c.PatchList(ctx, spaceId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchListResponse(rsp) +} + +// CreateListWithBodyWithResponse request with arbitrary body returning *CreateListResponse +func (c *ClientWithResponses) CreateListWithBodyWithResponse(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateListResponse, error) { + rsp, err := c.CreateListWithBody(ctx, spaceId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateListResponse(rsp) +} + +func (c *ClientWithResponses) CreateListWithResponse(ctx context.Context, spaceId SpaceId, body CreateListJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateListResponse, error) { + rsp, err := c.CreateList(ctx, spaceId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateListResponse(rsp) +} + +// UpdateListWithBodyWithResponse request with arbitrary body returning *UpdateListResponse +func (c *ClientWithResponses) UpdateListWithBodyWithResponse(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateListResponse, error) { + rsp, err := c.UpdateListWithBody(ctx, spaceId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateListResponse(rsp) +} + +func (c *ClientWithResponses) UpdateListWithResponse(ctx context.Context, spaceId SpaceId, body UpdateListJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateListResponse, error) { + rsp, err := c.UpdateList(ctx, spaceId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateListResponse(rsp) +} + +// DeleteListIndexWithResponse request returning *DeleteListIndexResponse +func (c *ClientWithResponses) DeleteListIndexWithResponse(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*DeleteListIndexResponse, error) { + rsp, err := c.DeleteListIndex(ctx, spaceId, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteListIndexResponse(rsp) +} + +// ReadListIndexWithResponse request returning *ReadListIndexResponse +func (c *ClientWithResponses) ReadListIndexWithResponse(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*ReadListIndexResponse, error) { + rsp, err := c.ReadListIndex(ctx, spaceId, reqEditors...) + if err != nil { + return nil, err + } + return ParseReadListIndexResponse(rsp) +} + +// CreateListIndexWithResponse request returning *CreateListIndexResponse +func (c *ClientWithResponses) CreateListIndexWithResponse(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*CreateListIndexResponse, error) { + rsp, err := c.CreateListIndex(ctx, spaceId, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateListIndexResponse(rsp) +} + +// DeleteListItemWithResponse request returning *DeleteListItemResponse +func (c *ClientWithResponses) DeleteListItemWithResponse(ctx context.Context, spaceId SpaceId, params *DeleteListItemParams, reqEditors ...RequestEditorFn) (*DeleteListItemResponse, error) { + rsp, err := c.DeleteListItem(ctx, spaceId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteListItemResponse(rsp) +} + +// ReadListItemWithResponse request returning *ReadListItemResponse +func (c *ClientWithResponses) ReadListItemWithResponse(ctx context.Context, spaceId SpaceId, params *ReadListItemParams, reqEditors ...RequestEditorFn) (*ReadListItemResponse, error) { + rsp, err := c.ReadListItem(ctx, spaceId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseReadListItemResponse(rsp) +} + +// PatchListItemWithBodyWithResponse request with arbitrary body returning *PatchListItemResponse +func (c *ClientWithResponses) PatchListItemWithBodyWithResponse(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchListItemResponse, error) { + rsp, err := c.PatchListItemWithBody(ctx, spaceId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchListItemResponse(rsp) +} + +func (c *ClientWithResponses) PatchListItemWithResponse(ctx context.Context, spaceId SpaceId, body PatchListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchListItemResponse, error) { + rsp, err := c.PatchListItem(ctx, spaceId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchListItemResponse(rsp) +} + +// CreateListItemWithBodyWithResponse request with arbitrary body returning *CreateListItemResponse +func (c *ClientWithResponses) CreateListItemWithBodyWithResponse(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateListItemResponse, error) { + rsp, err := c.CreateListItemWithBody(ctx, spaceId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateListItemResponse(rsp) +} + +func (c *ClientWithResponses) CreateListItemWithResponse(ctx context.Context, spaceId SpaceId, body CreateListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateListItemResponse, error) { + rsp, err := c.CreateListItem(ctx, spaceId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateListItemResponse(rsp) +} + +// UpdateListItemWithBodyWithResponse request with arbitrary body returning *UpdateListItemResponse +func (c *ClientWithResponses) UpdateListItemWithBodyWithResponse(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateListItemResponse, error) { + rsp, err := c.UpdateListItemWithBody(ctx, spaceId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateListItemResponse(rsp) +} + +func (c *ClientWithResponses) UpdateListItemWithResponse(ctx context.Context, spaceId SpaceId, body UpdateListItemJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateListItemResponse, error) { + rsp, err := c.UpdateListItem(ctx, spaceId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateListItemResponse(rsp) +} + // PostMaintenanceWindowWithBodyWithResponse request with arbitrary body returning *PostMaintenanceWindowResponse func (c *ClientWithResponses) PostMaintenanceWindowWithBodyWithResponse(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostMaintenanceWindowResponse, error) { rsp, err := c.PostMaintenanceWindowWithBody(ctx, spaceId, contentType, body, reqEditors...) @@ -149006,258 +149153,6 @@ func ParseGetEntityStoreStatusResponse(rsp *http.Response) (*GetEntityStoreStatu return response, nil } -// ParseDeleteExceptionListResponse parses an HTTP response from a DeleteExceptionListWithResponse call -func ParseDeleteExceptionListResponse(rsp *http.Response) (*DeleteExceptionListResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteExceptionListResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SecurityExceptionsAPIExceptionList - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - union json.RawMessage - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest SecurityExceptionsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest SecurityExceptionsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest SecurityExceptionsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest SecurityExceptionsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseReadExceptionListResponse parses an HTTP response from a ReadExceptionListWithResponse call -func ParseReadExceptionListResponse(rsp *http.Response) (*ReadExceptionListResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ReadExceptionListResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SecurityExceptionsAPIExceptionList - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - union json.RawMessage - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest SecurityExceptionsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest SecurityExceptionsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest SecurityExceptionsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest SecurityExceptionsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseCreateExceptionListResponse parses an HTTP response from a CreateExceptionListWithResponse call -func ParseCreateExceptionListResponse(rsp *http.Response) (*CreateExceptionListResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &CreateExceptionListResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SecurityExceptionsAPIExceptionList - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - union json.RawMessage - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest SecurityExceptionsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest SecurityExceptionsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: - var dest SecurityExceptionsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON409 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest SecurityExceptionsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseUpdateExceptionListResponse parses an HTTP response from a UpdateExceptionListWithResponse call -func ParseUpdateExceptionListResponse(rsp *http.Response) (*UpdateExceptionListResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &UpdateExceptionListResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SecurityExceptionsAPIExceptionList - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - union json.RawMessage - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest SecurityExceptionsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest SecurityExceptionsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest SecurityExceptionsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest SecurityExceptionsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - // ParseDuplicateExceptionListResponse parses an HTTP response from a DuplicateExceptionListWithResponse call func ParseDuplicateExceptionListResponse(rsp *http.Response) (*DuplicateExceptionListResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -149509,258 +149404,6 @@ func ParseImportExceptionListResponse(rsp *http.Response) (*ImportExceptionListR return response, nil } -// ParseDeleteExceptionListItemResponse parses an HTTP response from a DeleteExceptionListItemWithResponse call -func ParseDeleteExceptionListItemResponse(rsp *http.Response) (*DeleteExceptionListItemResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteExceptionListItemResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SecurityExceptionsAPIExceptionListItem - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - union json.RawMessage - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest SecurityExceptionsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest SecurityExceptionsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest SecurityExceptionsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest SecurityExceptionsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseReadExceptionListItemResponse parses an HTTP response from a ReadExceptionListItemWithResponse call -func ParseReadExceptionListItemResponse(rsp *http.Response) (*ReadExceptionListItemResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ReadExceptionListItemResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SecurityExceptionsAPIExceptionListItem - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - union json.RawMessage - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest SecurityExceptionsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest SecurityExceptionsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest SecurityExceptionsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest SecurityExceptionsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseCreateExceptionListItemResponse parses an HTTP response from a CreateExceptionListItemWithResponse call -func ParseCreateExceptionListItemResponse(rsp *http.Response) (*CreateExceptionListItemResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &CreateExceptionListItemResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SecurityExceptionsAPIExceptionListItem - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - union json.RawMessage - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest SecurityExceptionsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest SecurityExceptionsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: - var dest SecurityExceptionsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON409 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest SecurityExceptionsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseUpdateExceptionListItemResponse parses an HTTP response from a UpdateExceptionListItemWithResponse call -func ParseUpdateExceptionListItemResponse(rsp *http.Response) (*UpdateExceptionListItemResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &UpdateExceptionListItemResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SecurityExceptionsAPIExceptionListItem - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - union json.RawMessage - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest SecurityExceptionsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest SecurityExceptionsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest SecurityExceptionsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest SecurityExceptionsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - // ParseFindExceptionListItemsResponse parses an HTTP response from a FindExceptionListItemsWithResponse call func ParseFindExceptionListItemsResponse(rsp *http.Response) (*FindExceptionListItemsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -156570,321 +156213,6 @@ func ParseGetFleetUninstallTokensUninstalltokenidResponse(rsp *http.Response) (* return response, nil } -// ParseDeleteListResponse parses an HTTP response from a DeleteListWithResponse call -func ParseDeleteListResponse(rsp *http.Response) (*DeleteListResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteListResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SecurityListsAPIList - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - union json.RawMessage - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest SecurityListsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest SecurityListsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest SecurityListsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest SecurityListsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseReadListResponse parses an HTTP response from a ReadListWithResponse call -func ParseReadListResponse(rsp *http.Response) (*ReadListResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ReadListResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SecurityListsAPIList - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - union json.RawMessage - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest SecurityListsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest SecurityListsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest SecurityListsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest SecurityListsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePatchListResponse parses an HTTP response from a PatchListWithResponse call -func ParsePatchListResponse(rsp *http.Response) (*PatchListResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchListResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SecurityListsAPIList - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - union json.RawMessage - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest SecurityListsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest SecurityListsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest SecurityListsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest SecurityListsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseCreateListResponse parses an HTTP response from a CreateListWithResponse call -func ParseCreateListResponse(rsp *http.Response) (*CreateListResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &CreateListResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SecurityListsAPIList - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - union json.RawMessage - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest SecurityListsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest SecurityListsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: - var dest SecurityListsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON409 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest SecurityListsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseUpdateListResponse parses an HTTP response from a UpdateListWithResponse call -func ParseUpdateListResponse(rsp *http.Response) (*UpdateListResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &UpdateListResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SecurityListsAPIList - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - union json.RawMessage - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest SecurityListsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest SecurityListsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest SecurityListsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest SecurityListsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - // ParseFindListsResponse parses an HTTP response from a FindListsWithResponse call func ParseFindListsResponse(rsp *http.Response) (*FindListsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -156947,528 +156275,6 @@ func ParseFindListsResponse(rsp *http.Response) (*FindListsResponse, error) { return response, nil } -// ParseDeleteListIndexResponse parses an HTTP response from a DeleteListIndexWithResponse call -func ParseDeleteListIndexResponse(rsp *http.Response) (*DeleteListIndexResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteListIndexResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Acknowledged bool `json:"acknowledged"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - union json.RawMessage - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest SecurityListsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest SecurityListsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest SecurityListsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest SecurityListsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseReadListIndexResponse parses an HTTP response from a ReadListIndexWithResponse call -func ParseReadListIndexResponse(rsp *http.Response) (*ReadListIndexResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ReadListIndexResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - ListIndex bool `json:"list_index"` - ListItemIndex bool `json:"list_item_index"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - union json.RawMessage - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest SecurityListsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest SecurityListsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest SecurityListsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest SecurityListsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseCreateListIndexResponse parses an HTTP response from a CreateListIndexWithResponse call -func ParseCreateListIndexResponse(rsp *http.Response) (*CreateListIndexResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &CreateListIndexResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Acknowledged bool `json:"acknowledged"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - union json.RawMessage - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest SecurityListsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest SecurityListsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: - var dest SecurityListsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON409 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest SecurityListsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseDeleteListItemResponse parses an HTTP response from a DeleteListItemWithResponse call -func ParseDeleteListItemResponse(rsp *http.Response) (*DeleteListItemResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteListItemResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - union json.RawMessage - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - union json.RawMessage - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest SecurityListsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest SecurityListsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest SecurityListsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest SecurityListsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseReadListItemResponse parses an HTTP response from a ReadListItemWithResponse call -func ParseReadListItemResponse(rsp *http.Response) (*ReadListItemResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ReadListItemResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - union json.RawMessage - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - union json.RawMessage - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest SecurityListsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest SecurityListsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest SecurityListsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest SecurityListsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParsePatchListItemResponse parses an HTTP response from a PatchListItemWithResponse call -func ParsePatchListItemResponse(rsp *http.Response) (*PatchListItemResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchListItemResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SecurityListsAPIListItem - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - union json.RawMessage - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest SecurityListsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest SecurityListsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest SecurityListsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest SecurityListsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseCreateListItemResponse parses an HTTP response from a CreateListItemWithResponse call -func ParseCreateListItemResponse(rsp *http.Response) (*CreateListItemResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &CreateListItemResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SecurityListsAPIListItem - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - union json.RawMessage - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest SecurityListsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest SecurityListsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest SecurityListsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: - var dest SecurityListsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON409 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest SecurityListsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseUpdateListItemResponse parses an HTTP response from a UpdateListItemWithResponse call -func ParseUpdateListItemResponse(rsp *http.Response) (*UpdateListItemResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &UpdateListItemResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SecurityListsAPIListItem - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest struct { - union json.RawMessage - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest SecurityListsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest SecurityListsAPIPlatformErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest SecurityListsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest SecurityListsAPISiemErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - // ParseExportListItemsResponse parses an HTTP response from a ExportListItemsWithResponse call func ParseExportListItemsResponse(rsp *http.Response) (*ExportListItemsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -162357,6 +161163,1347 @@ func ParseUpdateRuleResponse(rsp *http.Response) (*UpdateRuleResponse, error) { return response, nil } +// ParseDeleteExceptionListResponse parses an HTTP response from a DeleteExceptionListWithResponse call +func ParseDeleteExceptionListResponse(rsp *http.Response) (*DeleteExceptionListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteExceptionListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SecurityExceptionsAPIExceptionList + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + union json.RawMessage + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest SecurityExceptionsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest SecurityExceptionsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest SecurityExceptionsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest SecurityExceptionsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseReadExceptionListResponse parses an HTTP response from a ReadExceptionListWithResponse call +func ParseReadExceptionListResponse(rsp *http.Response) (*ReadExceptionListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ReadExceptionListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SecurityExceptionsAPIExceptionList + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + union json.RawMessage + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest SecurityExceptionsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest SecurityExceptionsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest SecurityExceptionsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest SecurityExceptionsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreateExceptionListResponse parses an HTTP response from a CreateExceptionListWithResponse call +func ParseCreateExceptionListResponse(rsp *http.Response) (*CreateExceptionListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateExceptionListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SecurityExceptionsAPIExceptionList + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + union json.RawMessage + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest SecurityExceptionsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest SecurityExceptionsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest SecurityExceptionsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON409 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest SecurityExceptionsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseUpdateExceptionListResponse parses an HTTP response from a UpdateExceptionListWithResponse call +func ParseUpdateExceptionListResponse(rsp *http.Response) (*UpdateExceptionListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateExceptionListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SecurityExceptionsAPIExceptionList + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + union json.RawMessage + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest SecurityExceptionsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest SecurityExceptionsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest SecurityExceptionsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest SecurityExceptionsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteExceptionListItemResponse parses an HTTP response from a DeleteExceptionListItemWithResponse call +func ParseDeleteExceptionListItemResponse(rsp *http.Response) (*DeleteExceptionListItemResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteExceptionListItemResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SecurityExceptionsAPIExceptionListItem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + union json.RawMessage + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest SecurityExceptionsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest SecurityExceptionsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest SecurityExceptionsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest SecurityExceptionsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseReadExceptionListItemResponse parses an HTTP response from a ReadExceptionListItemWithResponse call +func ParseReadExceptionListItemResponse(rsp *http.Response) (*ReadExceptionListItemResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ReadExceptionListItemResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SecurityExceptionsAPIExceptionListItem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + union json.RawMessage + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest SecurityExceptionsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest SecurityExceptionsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest SecurityExceptionsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest SecurityExceptionsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreateExceptionListItemResponse parses an HTTP response from a CreateExceptionListItemWithResponse call +func ParseCreateExceptionListItemResponse(rsp *http.Response) (*CreateExceptionListItemResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateExceptionListItemResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SecurityExceptionsAPIExceptionListItem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + union json.RawMessage + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest SecurityExceptionsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest SecurityExceptionsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest SecurityExceptionsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON409 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest SecurityExceptionsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseUpdateExceptionListItemResponse parses an HTTP response from a UpdateExceptionListItemWithResponse call +func ParseUpdateExceptionListItemResponse(rsp *http.Response) (*UpdateExceptionListItemResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateExceptionListItemResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SecurityExceptionsAPIExceptionListItem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + union json.RawMessage + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest SecurityExceptionsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest SecurityExceptionsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest SecurityExceptionsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest SecurityExceptionsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteListResponse parses an HTTP response from a DeleteListWithResponse call +func ParseDeleteListResponse(rsp *http.Response) (*DeleteListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SecurityListsAPIList + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + union json.RawMessage + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest SecurityListsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest SecurityListsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest SecurityListsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest SecurityListsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseReadListResponse parses an HTTP response from a ReadListWithResponse call +func ParseReadListResponse(rsp *http.Response) (*ReadListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ReadListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SecurityListsAPIList + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + union json.RawMessage + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest SecurityListsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest SecurityListsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest SecurityListsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest SecurityListsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePatchListResponse parses an HTTP response from a PatchListWithResponse call +func ParsePatchListResponse(rsp *http.Response) (*PatchListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SecurityListsAPIList + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + union json.RawMessage + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest SecurityListsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest SecurityListsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest SecurityListsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest SecurityListsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreateListResponse parses an HTTP response from a CreateListWithResponse call +func ParseCreateListResponse(rsp *http.Response) (*CreateListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SecurityListsAPIList + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + union json.RawMessage + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest SecurityListsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest SecurityListsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest SecurityListsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON409 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest SecurityListsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseUpdateListResponse parses an HTTP response from a UpdateListWithResponse call +func ParseUpdateListResponse(rsp *http.Response) (*UpdateListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SecurityListsAPIList + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + union json.RawMessage + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest SecurityListsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest SecurityListsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest SecurityListsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest SecurityListsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteListIndexResponse parses an HTTP response from a DeleteListIndexWithResponse call +func ParseDeleteListIndexResponse(rsp *http.Response) (*DeleteListIndexResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteListIndexResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Acknowledged bool `json:"acknowledged"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + union json.RawMessage + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest SecurityListsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest SecurityListsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest SecurityListsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest SecurityListsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseReadListIndexResponse parses an HTTP response from a ReadListIndexWithResponse call +func ParseReadListIndexResponse(rsp *http.Response) (*ReadListIndexResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ReadListIndexResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + ListIndex bool `json:"list_index"` + ListItemIndex bool `json:"list_item_index"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + union json.RawMessage + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest SecurityListsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest SecurityListsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest SecurityListsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest SecurityListsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreateListIndexResponse parses an HTTP response from a CreateListIndexWithResponse call +func ParseCreateListIndexResponse(rsp *http.Response) (*CreateListIndexResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateListIndexResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Acknowledged bool `json:"acknowledged"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + union json.RawMessage + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest SecurityListsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest SecurityListsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest SecurityListsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON409 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest SecurityListsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteListItemResponse parses an HTTP response from a DeleteListItemWithResponse call +func ParseDeleteListItemResponse(rsp *http.Response) (*DeleteListItemResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteListItemResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + union json.RawMessage + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + union json.RawMessage + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest SecurityListsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest SecurityListsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest SecurityListsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest SecurityListsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseReadListItemResponse parses an HTTP response from a ReadListItemWithResponse call +func ParseReadListItemResponse(rsp *http.Response) (*ReadListItemResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ReadListItemResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + union json.RawMessage + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + union json.RawMessage + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest SecurityListsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest SecurityListsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest SecurityListsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest SecurityListsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParsePatchListItemResponse parses an HTTP response from a PatchListItemWithResponse call +func ParsePatchListItemResponse(rsp *http.Response) (*PatchListItemResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchListItemResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SecurityListsAPIListItem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + union json.RawMessage + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest SecurityListsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest SecurityListsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest SecurityListsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest SecurityListsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreateListItemResponse parses an HTTP response from a CreateListItemWithResponse call +func ParseCreateListItemResponse(rsp *http.Response) (*CreateListItemResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateListItemResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SecurityListsAPIListItem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + union json.RawMessage + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest SecurityListsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest SecurityListsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest SecurityListsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest SecurityListsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON409 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest SecurityListsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseUpdateListItemResponse parses an HTTP response from a UpdateListItemWithResponse call +func ParseUpdateListItemResponse(rsp *http.Response) (*UpdateListItemResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateListItemResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SecurityListsAPIListItem + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest struct { + union json.RawMessage + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest SecurityListsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest SecurityListsAPIPlatformErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest SecurityListsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest SecurityListsAPISiemErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + // ParsePostMaintenanceWindowResponse parses an HTTP response from a PostMaintenanceWindowWithResponse call func ParsePostMaintenanceWindowResponse(rsp *http.Response) (*PostMaintenanceWindowResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/generated/kbapi/transform_schema.go b/generated/kbapi/transform_schema.go index a377cfe9b..11a83a41e 100644 --- a/generated/kbapi/transform_schema.go +++ b/generated/kbapi/transform_schema.go @@ -691,6 +691,11 @@ func transformKibanaPaths(schema *Schema) { "/api/actions/connector/{id}", "/api/actions/connectors", "/api/detection_engine/rules", + "/api/exception_lists", + "/api/exception_lists/items", + "/api/lists", + "/api/lists/index", + "/api/lists/items", } // Add a spaceId parameter if not already present From 9c26819f451f6e3f7b290f5615b2dfc8f6314513 Mon Sep 17 00:00:00 2001 From: Nick Benoit Date: Tue, 25 Nov 2025 13:48:11 -0700 Subject: [PATCH 04/14] Add experimental flag to .env --- .env | 1 + .github/workflows/test.yml | 1 + docker-compose.yml | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.env b/.env index 47479a252..03212a5b8 100644 --- a/.env +++ b/.env @@ -15,3 +15,4 @@ FLEET_CONTAINER_NAME=terraform-elasticstack-fleet ACCEPTANCE_TESTS_CONTAINER_NAME=terraform-elasticstack-acceptance-tests TOKEN_ACCEPTANCE_TESTS_CONTAINER_NAME=terraform-elasticstack-token-acceptance-tests GOVERSION=1.25.1 +TF_ELASTICSTACK_INCLUDE_EXPERIMENTAL=true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e174a2276..a8cb98976 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -55,6 +55,7 @@ jobs: ELASTIC_PASSWORD: password KIBANA_SYSTEM_USERNAME: kibana_system KIBANA_SYSTEM_PASSWORD: password + TF_ELASTICSTACK_INCLUDE_EXPERIMENTAL: true services: elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch:${{ matrix.version }} diff --git a/docker-compose.yml b/docker-compose.yml index 37c7378d0..52cd93659 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -134,7 +134,8 @@ services: ELASTICSEARCH_USERNAME: elastic ELASTICSEARCH_PASSWORD: ${ELASTICSEARCH_PASSWORD} TF_LOG: ${TF_LOG:-info} - command: make testacc TESTARGS=${TESTARGS:-} + TF_ELASTICSTACK_INCLUDE_EXPERIMENTAL: "true" + command: make testacc TESTARGS='${TESTARGS:-}' token-acceptance-tests: profiles: ["token-acceptance-tests"] From f7a8fd963e1ce1084cb78a3c5f3074f05300cce7 Mon Sep 17 00:00:00 2001 From: Nick Benoit Date: Tue, 25 Nov 2025 15:44:20 -0700 Subject: [PATCH 05/14] Add directions about re-reading state to coding standards --- CODING_STANDARDS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CODING_STANDARDS.md b/CODING_STANDARDS.md index df402caf2..c863aa64f 100644 --- a/CODING_STANDARDS.md +++ b/CODING_STANDARDS.md @@ -36,6 +36,7 @@ This document outlines the coding standards and conventions used in the terrafor - Prefer using existing util functions over longer form, duplicated code: - `utils.IsKnown(val)` instead of `!val.IsNull() && !val.IsUnknown()` - `utils.ListTypeAs` instead of `val.ElementsAs` or similar for other collection types +- The final state for a resource should be derived from a read request following a mutative request (eg create or update). We should not use the response from a mutative request to build the final resource state. ## Schema Definitions From 708a26c6f00d452da06f2ef8ebb2b837fa025662 Mon Sep 17 00:00:00 2001 From: Nick Benoit Date: Tue, 25 Nov 2025 17:38:00 -0700 Subject: [PATCH 06/14] Copilot PR feedback --- internal/kibana/security_list/models.go | 5 +++-- internal/kibana/security_list/read.go | 3 +-- internal/kibana/security_list/schema.go | 1 - internal/kibana/security_list/update.go | 5 ----- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/internal/kibana/security_list/models.go b/internal/kibana/security_list/models.go index 0adc3061d..06e722bea 100644 --- a/internal/kibana/security_list/models.go +++ b/internal/kibana/security_list/models.go @@ -3,6 +3,7 @@ package security_list import ( "context" "encoding/json" + "time" "github.com/elastic/terraform-provider-elasticstack/generated/kbapi" "github.com/elastic/terraform-provider-elasticstack/internal/utils" @@ -116,9 +117,9 @@ func (m *SecurityListModel) fromAPI(ctx context.Context, apiList *kbapi.Security m.Immutable = types.BoolValue(apiList.Immutable) m.Version = types.Int64Value(int64(apiList.Version)) m.TieBreakerID = types.StringValue(apiList.TieBreakerId) - m.CreatedAt = types.StringValue(apiList.CreatedAt.String()) + m.CreatedAt = types.StringValue(apiList.CreatedAt.Format(time.RFC3339)) m.CreatedBy = types.StringValue(apiList.CreatedBy) - m.UpdatedAt = types.StringValue(apiList.UpdatedAt.String()) + m.UpdatedAt = types.StringValue(apiList.UpdatedAt.Format(time.RFC3339)) m.UpdatedBy = types.StringValue(apiList.UpdatedBy) // Set optional _version field diff --git a/internal/kibana/security_list/read.go b/internal/kibana/security_list/read.go index b5027401e..731d1113c 100644 --- a/internal/kibana/security_list/read.go +++ b/internal/kibana/security_list/read.go @@ -22,10 +22,9 @@ func (r *securityListResource) Read(ctx context.Context, req resource.ReadReques } spaceID := state.SpaceID.ValueString() - listID := state.ListID.ValueString() params := &kbapi.ReadListParams{ - Id: kbapi.SecurityListsAPIListId(listID), + Id: kbapi.SecurityListsAPIListId(state.ID.ValueString()), } readResp, diags := kibana_oapi.GetList(ctx, client, spaceID, params) diff --git a/internal/kibana/security_list/schema.go b/internal/kibana/security_list/schema.go index bafe69e46..1162da9f3 100644 --- a/internal/kibana/security_list/schema.go +++ b/internal/kibana/security_list/schema.go @@ -26,7 +26,6 @@ func (r *securityListResource) Schema(_ context.Context, _ resource.SchemaReques Optional: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.RequiresReplace(), - stringplanmodifier.UseStateForUnknown(), }, }, "space_id": schema.StringAttribute{ diff --git a/internal/kibana/security_list/update.go b/internal/kibana/security_list/update.go index d545d92da..a59a23d5e 100644 --- a/internal/kibana/security_list/update.go +++ b/internal/kibana/security_list/update.go @@ -21,11 +21,6 @@ func (r *securityListResource) Update(ctx context.Context, req resource.UpdateRe return } - // Preserve version_id from state for optimistic locking - if state.VersionID.ValueString() != "" { - plan.VersionID = state.VersionID - } - // Convert plan to API request updateReq, diags := plan.toUpdateRequest() resp.Diagnostics.Append(diags...) From 09091597ad177fbe8c92c7a45b434f514ab1330b Mon Sep 17 00:00:00 2001 From: Nick Benoit Date: Wed, 26 Nov 2025 17:26:23 -0700 Subject: [PATCH 07/14] Use normalized type for meta --- internal/kibana/security_list/acc_test.go | 42 +++++++++++++++ internal/kibana/security_list/models.go | 51 ++++++++++--------- internal/kibana/security_list/schema.go | 2 + .../create_with_meta/main.tf | 27 ++++++++++ .../update_meta/main.tf | 27 ++++++++++ 5 files changed, 125 insertions(+), 24 deletions(-) create mode 100644 internal/kibana/security_list/testdata/TestAccResourceSecurityList_WithMetadata/create_with_meta/main.tf create mode 100644 internal/kibana/security_list/testdata/TestAccResourceSecurityList_WithMetadata/update_meta/main.tf diff --git a/internal/kibana/security_list/acc_test.go b/internal/kibana/security_list/acc_test.go index b70d71610..b94d5ae39 100644 --- a/internal/kibana/security_list/acc_test.go +++ b/internal/kibana/security_list/acc_test.go @@ -151,3 +151,45 @@ func TestAccResourceSecurityList_SerializerDeserializer(t *testing.T) { }, }) } + +func TestAccResourceSecurityList_WithMetadata(t *testing.T) { + listID := "meta-list-" + uuid.New().String() + resource.Test(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(t) + ensureListIndexExists(t) + }, + ProtoV6ProviderFactories: acctest.Providers, + Steps: []resource.TestStep{ + { // Create with metadata + ConfigDirectory: acctest.NamedTestCaseDirectory("create_with_meta"), + ConfigVariables: config.Variables{ + "list_id": config.StringVariable(listID), + "name": config.StringVariable("List with Metadata"), + "description": config.StringVariable("A test list with metadata"), + "type": config.StringVariable("ip"), + "meta": config.StringVariable(`{"author":"test-user","category":"network","tags":["production","firewall"]}`), + }, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("elasticstack_kibana_security_list.test", "name", "List with Metadata"), + resource.TestCheckResourceAttr("elasticstack_kibana_security_list.test", "type", "ip"), + resource.TestCheckResourceAttrSet("elasticstack_kibana_security_list.test", "meta"), + ), + }, + { // Update metadata + ConfigDirectory: acctest.NamedTestCaseDirectory("update_meta"), + ConfigVariables: config.Variables{ + "list_id": config.StringVariable(listID), + "name": config.StringVariable("List with Metadata"), + "description": config.StringVariable("A test list with updated metadata"), + "type": config.StringVariable("ip"), + "meta": config.StringVariable(`{"author":"updated-user","category":"security","tags":["staging","api"],"version":"2.0"}`), + }, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("elasticstack_kibana_security_list.test", "description", "A test list with updated metadata"), + resource.TestCheckResourceAttrSet("elasticstack_kibana_security_list.test", "meta"), + ), + }, + }, + }) +} diff --git a/internal/kibana/security_list/models.go b/internal/kibana/security_list/models.go index 06e722bea..75404fc48 100644 --- a/internal/kibana/security_list/models.go +++ b/internal/kibana/security_list/models.go @@ -7,28 +7,29 @@ import ( "github.com/elastic/terraform-provider-elasticstack/generated/kbapi" "github.com/elastic/terraform-provider-elasticstack/internal/utils" + "github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes" "github.com/hashicorp/terraform-plugin-framework/diag" "github.com/hashicorp/terraform-plugin-framework/types" ) type SecurityListModel struct { - ID types.String `tfsdk:"id"` - SpaceID types.String `tfsdk:"space_id"` - ListID types.String `tfsdk:"list_id"` - Name types.String `tfsdk:"name"` - Description types.String `tfsdk:"description"` - Type types.String `tfsdk:"type"` - Deserializer types.String `tfsdk:"deserializer"` - Serializer types.String `tfsdk:"serializer"` - Meta types.String `tfsdk:"meta"` - Version types.Int64 `tfsdk:"version"` - VersionID types.String `tfsdk:"version_id"` - Immutable types.Bool `tfsdk:"immutable"` - CreatedAt types.String `tfsdk:"created_at"` - CreatedBy types.String `tfsdk:"created_by"` - UpdatedAt types.String `tfsdk:"updated_at"` - UpdatedBy types.String `tfsdk:"updated_by"` - TieBreakerID types.String `tfsdk:"tie_breaker_id"` + ID types.String `tfsdk:"id"` + SpaceID types.String `tfsdk:"space_id"` + ListID types.String `tfsdk:"list_id"` + Name types.String `tfsdk:"name"` + Description types.String `tfsdk:"description"` + Type types.String `tfsdk:"type"` + Deserializer types.String `tfsdk:"deserializer"` + Serializer types.String `tfsdk:"serializer"` + Meta jsontypes.Normalized `tfsdk:"meta"` + Version types.Int64 `tfsdk:"version"` + VersionID types.String `tfsdk:"version_id"` + Immutable types.Bool `tfsdk:"immutable"` + CreatedAt types.String `tfsdk:"created_at"` + CreatedBy types.String `tfsdk:"created_by"` + UpdatedAt types.String `tfsdk:"updated_at"` + UpdatedBy types.String `tfsdk:"updated_by"` + TieBreakerID types.String `tfsdk:"tie_breaker_id"` } // toCreateRequest converts the Terraform model to API create request @@ -58,8 +59,9 @@ func (m *SecurityListModel) toCreateRequest() (*kbapi.CreateListJSONRequestBody, if utils.IsKnown(m.Meta) { var metaMap kbapi.SecurityListsAPIListMetadata - if err := json.Unmarshal([]byte(m.Meta.ValueString()), &metaMap); err != nil { - diags.AddError("Invalid meta JSON", err.Error()) + unmarshalDiags := m.Meta.Unmarshal(&metaMap) + diags.Append(unmarshalDiags...) + if diags.HasError() { return nil, diags } req.Meta = &metaMap @@ -90,8 +92,9 @@ func (m *SecurityListModel) toUpdateRequest() (*kbapi.UpdateListJSONRequestBody, if utils.IsKnown(m.Meta) { var metaMap kbapi.SecurityListsAPIListMetadata - if err := json.Unmarshal([]byte(m.Meta.ValueString()), &metaMap); err != nil { - diags.AddError("Invalid meta JSON", err.Error()) + unmarshalDiags := m.Meta.Unmarshal(&metaMap) + diags.Append(unmarshalDiags...) + if diags.HasError() { return nil, diags } req.Meta = &metaMap @@ -144,12 +147,12 @@ func (m *SecurityListModel) fromAPI(ctx context.Context, apiList *kbapi.Security if apiList.Meta != nil { metaBytes, err := json.Marshal(apiList.Meta) if err != nil { - diags.AddError("Failed to marshal meta", err.Error()) + diags.AddError("Failed to marshal meta field from API response to JSON", err.Error()) return diags } - m.Meta = types.StringValue(string(metaBytes)) + m.Meta = jsontypes.NewNormalizedValue(string(metaBytes)) } else { - m.Meta = types.StringNull() + m.Meta = jsontypes.NewNormalizedNull() } return diags diff --git a/internal/kibana/security_list/schema.go b/internal/kibana/security_list/schema.go index 1162da9f3..d8ce9e0da 100644 --- a/internal/kibana/security_list/schema.go +++ b/internal/kibana/security_list/schema.go @@ -4,6 +4,7 @@ import ( "context" _ "embed" + "github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes" "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" @@ -82,6 +83,7 @@ func (r *securityListResource) Schema(_ context.Context, _ resource.SchemaReques "meta": schema.StringAttribute{ MarkdownDescription: "Placeholder for metadata about the value list as JSON string.", Optional: true, + CustomType: jsontypes.NormalizedType{}, }, "version": schema.Int64Attribute{ MarkdownDescription: "The document version number.", diff --git a/internal/kibana/security_list/testdata/TestAccResourceSecurityList_WithMetadata/create_with_meta/main.tf b/internal/kibana/security_list/testdata/TestAccResourceSecurityList_WithMetadata/create_with_meta/main.tf new file mode 100644 index 000000000..a1f546b9f --- /dev/null +++ b/internal/kibana/security_list/testdata/TestAccResourceSecurityList_WithMetadata/create_with_meta/main.tf @@ -0,0 +1,27 @@ +variable "list_id" { + type = string +} + +variable "name" { + type = string +} + +variable "description" { + type = string +} + +variable "type" { + type = string +} + +variable "meta" { + type = string +} + +resource "elasticstack_kibana_security_list" "test" { + list_id = var.list_id + name = var.name + description = var.description + type = var.type + meta = var.meta +} diff --git a/internal/kibana/security_list/testdata/TestAccResourceSecurityList_WithMetadata/update_meta/main.tf b/internal/kibana/security_list/testdata/TestAccResourceSecurityList_WithMetadata/update_meta/main.tf new file mode 100644 index 000000000..a1f546b9f --- /dev/null +++ b/internal/kibana/security_list/testdata/TestAccResourceSecurityList_WithMetadata/update_meta/main.tf @@ -0,0 +1,27 @@ +variable "list_id" { + type = string +} + +variable "name" { + type = string +} + +variable "description" { + type = string +} + +variable "type" { + type = string +} + +variable "meta" { + type = string +} + +resource "elasticstack_kibana_security_list" "test" { + list_id = var.list_id + name = var.name + description = var.description + type = var.type + meta = var.meta +} From ff8f9bcd1a9db3cf526c05268c434f9a3ee63d23 Mon Sep 17 00:00:00 2001 From: Nick Benoit Date: Wed, 26 Nov 2025 17:26:38 -0700 Subject: [PATCH 08/14] Update coding standards guidance for utilities --- .github/copilot-instructions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 84d54a56a..4ff45d922 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1,6 +1,6 @@ You will be writing or reviewing code for the Terraform provider for Elastic Stack (Elasticsearch, Kibana, Fleet, APM, and Logstash). This is a Go-based repository hosting the provider source. -When writing code, you must adhere to the coding standards and conventions outlined in the [CODING_STANDARDS.md](../CODING_STANDARDS.md) document in this repository. +When writing code, you must adhere to the coding standards and conventions outlined in the [CODING_STANDARDS.md](../CODING_STANDARDS.md) document in this repository. After completing any code changes check again that they conform to the [CODING_STANDARDS.md](../CODING_STANDARDS.md). When reviewing code, ensure that all changes comply with the coding standards and conventions specified in the [CODING_STANDARDS.md](../CODING_STANDARDS.md) document. Pay special attention to project structure, schema definitions, JSON handling, resource implementation, and testing practices. From 924f1d766b906b39bad2cdd9f8b9cba53fb5741b Mon Sep 17 00:00:00 2001 From: Nick Benoit Date: Wed, 26 Nov 2025 17:41:06 -0700 Subject: [PATCH 09/14] Add link to docs --- .../security_list/resource-description.md | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/internal/kibana/security_list/resource-description.md b/internal/kibana/security_list/resource-description.md index 9b67b4e12..71a35baed 100644 --- a/internal/kibana/security_list/resource-description.md +++ b/internal/kibana/security_list/resource-description.md @@ -1,23 +1,6 @@ Manages Kibana security lists (also known as value lists). Security lists are used by exception items to define sets of values for matching or excluding in security rules. -## Example Usage - -```terraform -resource "elasticstack_kibana_security_list" "ip_list" { - space_id = "default" - name = "Trusted IP Addresses" - description = "List of trusted IP addresses for security rules" - type = "ip" -} - -resource "elasticstack_kibana_security_list" "keyword_list" { - space_id = "security" - list_id = "custom-keywords" - name = "Custom Keywords" - description = "Custom keyword list for detection rules" - type = "keyword" -} -``` +Relevant Kibana docs can be found [here](https://www.elastic.co/docs/api/doc/kibana/group/endpoint-security-lists-api). ## Notes From 52c50ba915d3c6dc1f8aa212c19080223836393e Mon Sep 17 00:00:00 2001 From: Nick Benoit Date: Wed, 26 Nov 2025 17:52:42 -0700 Subject: [PATCH 10/14] Use new helpers for type casting --- internal/kibana/security_list/models.go | 16 ++++++++-------- internal/utils/utils.go | 13 +++++++++++++ 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/internal/kibana/security_list/models.go b/internal/kibana/security_list/models.go index 75404fc48..6735de302 100644 --- a/internal/kibana/security_list/models.go +++ b/internal/kibana/security_list/models.go @@ -112,11 +112,11 @@ func (m *SecurityListModel) toUpdateRequest() (*kbapi.UpdateListJSONRequestBody, func (m *SecurityListModel) fromAPI(ctx context.Context, apiList *kbapi.SecurityListsAPIList) diag.Diagnostics { var diags diag.Diagnostics - m.ID = types.StringValue(string(apiList.Id)) - m.ListID = types.StringValue(string(apiList.Id)) - m.Name = types.StringValue(string(apiList.Name)) - m.Description = types.StringValue(string(apiList.Description)) - m.Type = types.StringValue(string(apiList.Type)) + m.ID = utils.StringishValue(apiList.Id) + m.ListID = utils.StringishValue(apiList.Id) + m.Name = utils.StringishValue(apiList.Name) + m.Description = utils.StringishValue(apiList.Description) + m.Type = utils.StringishValue(apiList.Type) m.Immutable = types.BoolValue(apiList.Immutable) m.Version = types.Int64Value(int64(apiList.Version)) m.TieBreakerID = types.StringValue(apiList.TieBreakerId) @@ -127,19 +127,19 @@ func (m *SecurityListModel) fromAPI(ctx context.Context, apiList *kbapi.Security // Set optional _version field if apiList.UnderscoreVersion != nil { - m.VersionID = types.StringValue(string(*apiList.UnderscoreVersion)) + m.VersionID = utils.StringishPointerValue(apiList.UnderscoreVersion) } else { m.VersionID = types.StringNull() } if apiList.Deserializer != nil { - m.Deserializer = types.StringValue(string(*apiList.Deserializer)) + m.Deserializer = utils.StringishPointerValue(apiList.Deserializer) } else { m.Deserializer = types.StringNull() } if apiList.Serializer != nil { - m.Serializer = types.StringValue(string(*apiList.Serializer)) + m.Serializer = utils.StringishPointerValue(apiList.Serializer) } else { m.Serializer = types.StringNull() } diff --git a/internal/utils/utils.go b/internal/utils/utils.go index 15b6d423c..b16f25116 100644 --- a/internal/utils/utils.go +++ b/internal/utils/utils.go @@ -231,3 +231,16 @@ func NonNilSlice[T any](s []T) []T { func TimeToStringValue(t time.Time) types.String { return types.StringValue(FormatStrictDateTime(t)) } + +// StringishPointerValue converts a pointer to a string-like type to a Terraform types.String value. +func StringishPointerValue[T ~string](ptr *T) types.String { + if ptr == nil { + return types.StringNull() + } + return types.StringValue(string(*ptr)) +} + +// StringishValue converts a value of any string-like type T to a Terraform types.String. +func StringishValue[T ~string](value T) types.String { + return types.StringValue(string(value)) +} From d89ae58b6f857e77cc083c62f5fa593a94683c17 Mon Sep 17 00:00:00 2001 From: Nick Benoit Date: Wed, 26 Nov 2025 17:52:55 -0700 Subject: [PATCH 11/14] Add errors for missing values on reads --- internal/kibana/security_list/create.go | 1 + internal/kibana/security_list/update.go | 1 + 2 files changed, 2 insertions(+) diff --git a/internal/kibana/security_list/create.go b/internal/kibana/security_list/create.go index 969e09567..81e9b4109 100644 --- a/internal/kibana/security_list/create.go +++ b/internal/kibana/security_list/create.go @@ -55,6 +55,7 @@ func (r *securityListResource) Create(ctx context.Context, req resource.CreateRe if readResp == nil || readResp.JSON200 == nil { resp.State.RemoveResource(ctx) + resp.Diagnostics.AddError("Failed to fetch security list", "API returned empty response") return } diff --git a/internal/kibana/security_list/update.go b/internal/kibana/security_list/update.go index a59a23d5e..475f805cd 100644 --- a/internal/kibana/security_list/update.go +++ b/internal/kibana/security_list/update.go @@ -61,6 +61,7 @@ func (r *securityListResource) Update(ctx context.Context, req resource.UpdateRe if readResp == nil || readResp.JSON200 == nil { resp.State.RemoveResource(ctx) + resp.Diagnostics.AddError("Failed to fetch security list", "API returned empty response") return } From 20b443dffba4eee6c420b70701b59d038fbd058a Mon Sep 17 00:00:00 2001 From: Nick Benoit Date: Wed, 26 Nov 2025 19:19:50 -0700 Subject: [PATCH 12/14] Use composite id for internal id --- internal/kibana/security_list/models.go | 9 ++++++++- internal/kibana/security_list/read.go | 14 +++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/internal/kibana/security_list/models.go b/internal/kibana/security_list/models.go index 6735de302..ad9a179fd 100644 --- a/internal/kibana/security_list/models.go +++ b/internal/kibana/security_list/models.go @@ -6,6 +6,7 @@ import ( "time" "github.com/elastic/terraform-provider-elasticstack/generated/kbapi" + "github.com/elastic/terraform-provider-elasticstack/internal/clients" "github.com/elastic/terraform-provider-elasticstack/internal/utils" "github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes" "github.com/hashicorp/terraform-plugin-framework/diag" @@ -112,7 +113,13 @@ func (m *SecurityListModel) toUpdateRequest() (*kbapi.UpdateListJSONRequestBody, func (m *SecurityListModel) fromAPI(ctx context.Context, apiList *kbapi.SecurityListsAPIList) diag.Diagnostics { var diags diag.Diagnostics - m.ID = utils.StringishValue(apiList.Id) + // Create composite ID from space_id and list_id + compId := clients.CompositeId{ + ClusterId: m.SpaceID.ValueString(), + ResourceId: string(apiList.Id), + } + m.ID = types.StringValue(compId.String()) + m.ListID = utils.StringishValue(apiList.Id) m.Name = utils.StringishValue(apiList.Name) m.Description = utils.StringishValue(apiList.Description) diff --git a/internal/kibana/security_list/read.go b/internal/kibana/security_list/read.go index 731d1113c..045d63df4 100644 --- a/internal/kibana/security_list/read.go +++ b/internal/kibana/security_list/read.go @@ -4,8 +4,10 @@ import ( "context" "github.com/elastic/terraform-provider-elasticstack/generated/kbapi" + "github.com/elastic/terraform-provider-elasticstack/internal/clients" "github.com/elastic/terraform-provider-elasticstack/internal/clients/kibana_oapi" "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/types" ) func (r *securityListResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { @@ -21,10 +23,20 @@ func (r *securityListResource) Read(ctx context.Context, req resource.ReadReques return } + // Parse composite ID to get space_id and list_id spaceID := state.SpaceID.ValueString() + listID := state.ListID.ValueString() + + // Try to parse as composite ID from state.ID + if compId, diags := clients.CompositeIdFromStrFw(state.ID.ValueString()); !diags.HasError() { + spaceID = compId.ClusterId + listID = compId.ResourceId + // Update space_id in state if it was parsed from composite ID + state.SpaceID = types.StringValue(spaceID) + } params := &kbapi.ReadListParams{ - Id: kbapi.SecurityListsAPIListId(state.ID.ValueString()), + Id: kbapi.SecurityListsAPIListId(listID), } readResp, diags := kibana_oapi.GetList(ctx, client, spaceID, params) From 87e41234b26ee78cc7400d4ca77681d094c1f25c Mon Sep 17 00:00:00 2001 From: Nick Benoit Date: Wed, 26 Nov 2025 19:33:56 -0700 Subject: [PATCH 13/14] Add import test --- internal/kibana/security_list/acc_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/internal/kibana/security_list/acc_test.go b/internal/kibana/security_list/acc_test.go index b94d5ae39..d87d07f67 100644 --- a/internal/kibana/security_list/acc_test.go +++ b/internal/kibana/security_list/acc_test.go @@ -75,6 +75,18 @@ func TestAccResourceSecurityList(t *testing.T) { resource.TestCheckResourceAttr("elasticstack_kibana_security_list.test", "description", "An updated test security list"), ), }, + { // Import + ConfigDirectory: acctest.NamedTestCaseDirectory("update"), + ConfigVariables: config.Variables{ + "list_id": config.StringVariable(listID), + "name": config.StringVariable("Updated Security List"), + "description": config.StringVariable("An updated test security list"), + "type": config.StringVariable("ip"), + }, + ResourceName: "elasticstack_kibana_security_list.test", + ImportState: true, + ImportStateVerify: true, + }, }, }) } From 1907787391ea1cea2990ca40f16ff18fe78a05b2 Mon Sep 17 00:00:00 2001 From: Nick Benoit Date: Thu, 27 Nov 2025 10:07:38 -0700 Subject: [PATCH 14/14] Remove nil checks for StringishPointerValue --- internal/kibana/security_list/models.go | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/internal/kibana/security_list/models.go b/internal/kibana/security_list/models.go index ad9a179fd..5b97f2bc5 100644 --- a/internal/kibana/security_list/models.go +++ b/internal/kibana/security_list/models.go @@ -133,23 +133,11 @@ func (m *SecurityListModel) fromAPI(ctx context.Context, apiList *kbapi.Security m.UpdatedBy = types.StringValue(apiList.UpdatedBy) // Set optional _version field - if apiList.UnderscoreVersion != nil { - m.VersionID = utils.StringishPointerValue(apiList.UnderscoreVersion) - } else { - m.VersionID = types.StringNull() - } + m.VersionID = utils.StringishPointerValue(apiList.UnderscoreVersion) - if apiList.Deserializer != nil { - m.Deserializer = utils.StringishPointerValue(apiList.Deserializer) - } else { - m.Deserializer = types.StringNull() - } + m.Deserializer = utils.StringishPointerValue(apiList.Deserializer) - if apiList.Serializer != nil { - m.Serializer = utils.StringishPointerValue(apiList.Serializer) - } else { - m.Serializer = types.StringNull() - } + m.Serializer = utils.StringishPointerValue(apiList.Serializer) if apiList.Meta != nil { metaBytes, err := json.Marshal(apiList.Meta)