diff --git a/generated/kbapi/Makefile b/generated/kbapi/Makefile index 179bf8b5d..78cac6777 100644 --- a/generated/kbapi/Makefile +++ b/generated/kbapi/Makefile @@ -2,7 +2,7 @@ SHELL := /bin/bash ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) -github_ref ?= 5c4f76696e63bf9e9a53d55521f4c18faa02ccf2 +github_ref ?= 9b8ef8299d59fd31e29c91797ad4237eeba78604 oas_url := https://raw.githubusercontent.com/elastic/kibana/$(github_ref)/oas_docs/output/kibana.yaml .PHONY: all diff --git a/generated/kbapi/kibana.gen.go b/generated/kbapi/kibana.gen.go index 5031ad980..a23628e88 100644 --- a/generated/kbapi/kibana.gen.go +++ b/generated/kbapi/kibana.gen.go @@ -28461,6 +28461,39 @@ type GetFleetAgentsActionStatusParams struct { ErrorSize *float32 `form:"errorSize,omitempty" json:"errorSize,omitempty"` } +// PostFleetAgentsBulkMigrateJSONBody defines parameters for PostFleetAgentsBulkMigrate. +type PostFleetAgentsBulkMigrateJSONBody struct { + Agents PostFleetAgentsBulkMigrateJSONBody_Agents `json:"agents"` + BatchSize *float32 `json:"batchSize,omitempty"` + EnrollmentToken string `json:"enrollment_token"` + Settings *struct { + CaSha256 *string `json:"ca_sha256,omitempty"` + CertificateAuthorities *string `json:"certificate_authorities,omitempty"` + ElasticAgentCert *string `json:"elastic_agent_cert,omitempty"` + ElasticAgentCertKey *string `json:"elastic_agent_cert_key,omitempty"` + ElasticAgentCertKeyPassphrase *string `json:"elastic_agent_cert_key_passphrase,omitempty"` + Headers *map[string]string `json:"headers,omitempty"` + Insecure *bool `json:"insecure,omitempty"` + ProxyDisabled *bool `json:"proxy_disabled,omitempty"` + ProxyHeaders *map[string]string `json:"proxy_headers,omitempty"` + ProxyUrl *string `json:"proxy_url,omitempty"` + Staging *string `json:"staging,omitempty"` + Tags *[]string `json:"tags,omitempty"` + } `json:"settings,omitempty"` + Uri string `json:"uri"` +} + +// PostFleetAgentsBulkMigrateJSONBodyAgents0 defines parameters for PostFleetAgentsBulkMigrate. +type PostFleetAgentsBulkMigrateJSONBodyAgents0 = []string + +// PostFleetAgentsBulkMigrateJSONBodyAgents1 defines parameters for PostFleetAgentsBulkMigrate. +type PostFleetAgentsBulkMigrateJSONBodyAgents1 = string + +// PostFleetAgentsBulkMigrateJSONBody_Agents defines parameters for PostFleetAgentsBulkMigrate. +type PostFleetAgentsBulkMigrateJSONBody_Agents struct { + union json.RawMessage +} + // PostFleetAgentsBulkReassignJSONBody defines parameters for PostFleetAgentsBulkReassign. type PostFleetAgentsBulkReassignJSONBody struct { Agents PostFleetAgentsBulkReassignJSONBody_Agents `json:"agents"` @@ -28622,6 +28655,27 @@ type PostFleetAgentsAgentidActionsJSONBody_Action struct { union json.RawMessage } +// PostFleetAgentsAgentidMigrateJSONBody defines parameters for PostFleetAgentsAgentidMigrate. +type PostFleetAgentsAgentidMigrateJSONBody struct { + EnrollmentToken string `json:"enrollment_token"` + Settings *struct { + CaSha256 *string `json:"ca_sha256,omitempty"` + CertificateAuthorities *string `json:"certificate_authorities,omitempty"` + ElasticAgentCert *string `json:"elastic_agent_cert,omitempty"` + ElasticAgentCertKey *string `json:"elastic_agent_cert_key,omitempty"` + ElasticAgentCertKeyPassphrase *string `json:"elastic_agent_cert_key_passphrase,omitempty"` + Headers *map[string]string `json:"headers,omitempty"` + Insecure *bool `json:"insecure,omitempty"` + ProxyDisabled *bool `json:"proxy_disabled,omitempty"` + ProxyHeaders *map[string]string `json:"proxy_headers,omitempty"` + ProxyUrl *string `json:"proxy_url,omitempty"` + ReplaceToken *string `json:"replace_token,omitempty"` + Staging *string `json:"staging,omitempty"` + Tags *[]string `json:"tags,omitempty"` + } `json:"settings,omitempty"` + Uri string `json:"uri"` +} + // PostFleetAgentsAgentidReassignJSONBody defines parameters for PostFleetAgentsAgentidReassign. type PostFleetAgentsAgentidReassignJSONBody struct { PolicyId string `json:"policy_id"` @@ -41801,6 +41855,9 @@ type PostFleetAgentPoliciesAgentpolicyidCopyJSONRequestBody PostFleetAgentPolici // PostFleetAgentsJSONRequestBody defines body for PostFleetAgents for application/json ContentType. type PostFleetAgentsJSONRequestBody PostFleetAgentsJSONBody +// PostFleetAgentsBulkMigrateJSONRequestBody defines body for PostFleetAgentsBulkMigrate for application/json ContentType. +type PostFleetAgentsBulkMigrateJSONRequestBody PostFleetAgentsBulkMigrateJSONBody + // PostFleetAgentsBulkReassignJSONRequestBody defines body for PostFleetAgentsBulkReassign for application/json ContentType. type PostFleetAgentsBulkReassignJSONRequestBody PostFleetAgentsBulkReassignJSONBody @@ -41822,6 +41879,9 @@ type PutFleetAgentsAgentidJSONRequestBody PutFleetAgentsAgentidJSONBody // PostFleetAgentsAgentidActionsJSONRequestBody defines body for PostFleetAgentsAgentidActions for application/json ContentType. type PostFleetAgentsAgentidActionsJSONRequestBody PostFleetAgentsAgentidActionsJSONBody +// PostFleetAgentsAgentidMigrateJSONRequestBody defines body for PostFleetAgentsAgentidMigrate for application/json ContentType. +type PostFleetAgentsAgentidMigrateJSONRequestBody PostFleetAgentsAgentidMigrateJSONBody + // PostFleetAgentsAgentidReassignJSONRequestBody defines body for PostFleetAgentsAgentidReassign for application/json ContentType. type PostFleetAgentsAgentidReassignJSONRequestBody PostFleetAgentsAgentidReassignJSONBody @@ -54709,7 +54769,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 = "std_deviation" + v.Aggregation = "cardinality" b, err := json.Marshal(v) t.union = b return err @@ -54717,7 +54777,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 = "std_deviation" + v.Aggregation = "cardinality" b, err := json.Marshal(v) if err != nil { return err @@ -54798,12 +54858,12 @@ func (t SLOsIndicatorPropertiesTimesliceMetric_Params_Metric_Metrics_Item) Value return nil, err } switch discriminator { + case "cardinality": + return t.AsSLOsTimesliceMetricBasicMetricWithField() case "doc_count": return t.AsSLOsTimesliceMetricDocCountMetric() case "percentile": return t.AsSLOsTimesliceMetricPercentileMetric() - case "std_deviation": - return t.AsSLOsTimesliceMetricBasicMetricWithField() default: return nil, errors.New("unknown discriminator value: " + discriminator) } @@ -68529,6 +68589,11 @@ type ClientInterface interface { // GetFleetAgentsAvailableVersions request GetFleetAgentsAvailableVersions(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + // PostFleetAgentsBulkMigrateWithBody request with any body + PostFleetAgentsBulkMigrateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostFleetAgentsBulkMigrate(ctx context.Context, body PostFleetAgentsBulkMigrateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // PostFleetAgentsBulkReassignWithBody request with any body PostFleetAgentsBulkReassignWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -68585,6 +68650,11 @@ type ClientInterface interface { PostFleetAgentsAgentidActions(ctx context.Context, agentId string, body PostFleetAgentsAgentidActionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // PostFleetAgentsAgentidMigrateWithBody request with any body + PostFleetAgentsAgentidMigrateWithBody(ctx context.Context, agentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostFleetAgentsAgentidMigrate(ctx context.Context, agentId string, body PostFleetAgentsAgentidMigrateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // PostFleetAgentsAgentidReassignWithBody request with any body PostFleetAgentsAgentidReassignWithBody(ctx context.Context, agentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -73362,6 +73432,30 @@ func (c *Client) GetFleetAgentsAvailableVersions(ctx context.Context, reqEditors return c.Client.Do(req) } +func (c *Client) PostFleetAgentsBulkMigrateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostFleetAgentsBulkMigrateRequestWithBody(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) PostFleetAgentsBulkMigrate(ctx context.Context, body PostFleetAgentsBulkMigrateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostFleetAgentsBulkMigrateRequest(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) PostFleetAgentsBulkReassignWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewPostFleetAgentsBulkReassignRequestWithBody(c.Server, contentType, body) if err != nil { @@ -73614,6 +73708,30 @@ func (c *Client) PostFleetAgentsAgentidActions(ctx context.Context, agentId stri return c.Client.Do(req) } +func (c *Client) PostFleetAgentsAgentidMigrateWithBody(ctx context.Context, agentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostFleetAgentsAgentidMigrateRequestWithBody(c.Server, agentId, 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) PostFleetAgentsAgentidMigrate(ctx context.Context, agentId string, body PostFleetAgentsAgentidMigrateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostFleetAgentsAgentidMigrateRequest(c.Server, agentId, 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) PostFleetAgentsAgentidReassignWithBody(ctx context.Context, agentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewPostFleetAgentsAgentidReassignRequestWithBody(c.Server, agentId, contentType, body) if err != nil { @@ -90500,6 +90618,46 @@ func NewGetFleetAgentsAvailableVersionsRequest(server string) (*http.Request, er return req, nil } +// NewPostFleetAgentsBulkMigrateRequest calls the generic PostFleetAgentsBulkMigrate builder with application/json body +func NewPostFleetAgentsBulkMigrateRequest(server string, body PostFleetAgentsBulkMigrateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostFleetAgentsBulkMigrateRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostFleetAgentsBulkMigrateRequestWithBody generates requests for PostFleetAgentsBulkMigrate with any type of body +func NewPostFleetAgentsBulkMigrateRequestWithBody(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/fleet/agents/bulk_migrate") + 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 +} + // NewPostFleetAgentsBulkReassignRequest calls the generic PostFleetAgentsBulkReassign builder with application/json body func NewPostFleetAgentsBulkReassignRequest(server string, body PostFleetAgentsBulkReassignJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader @@ -91078,6 +91236,53 @@ func NewPostFleetAgentsAgentidActionsRequestWithBody(server string, agentId stri return req, nil } +// NewPostFleetAgentsAgentidMigrateRequest calls the generic PostFleetAgentsAgentidMigrate builder with application/json body +func NewPostFleetAgentsAgentidMigrateRequest(server string, agentId string, body PostFleetAgentsAgentidMigrateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostFleetAgentsAgentidMigrateRequestWithBody(server, agentId, "application/json", bodyReader) +} + +// NewPostFleetAgentsAgentidMigrateRequestWithBody generates requests for PostFleetAgentsAgentidMigrate with any type of body +func NewPostFleetAgentsAgentidMigrateRequestWithBody(server string, agentId string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "agentId", runtime.ParamLocationPath, agentId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/fleet/agents/%s/migrate", 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 +} + // NewPostFleetAgentsAgentidReassignRequest calls the generic PostFleetAgentsAgentidReassign builder with application/json body func NewPostFleetAgentsAgentidReassignRequest(server string, agentId string, body PostFleetAgentsAgentidReassignJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader @@ -106587,6 +106792,11 @@ type ClientWithResponsesInterface interface { // GetFleetAgentsAvailableVersionsWithResponse request GetFleetAgentsAvailableVersionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetFleetAgentsAvailableVersionsResponse, error) + // PostFleetAgentsBulkMigrateWithBodyWithResponse request with any body + PostFleetAgentsBulkMigrateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostFleetAgentsBulkMigrateResponse, error) + + PostFleetAgentsBulkMigrateWithResponse(ctx context.Context, body PostFleetAgentsBulkMigrateJSONRequestBody, reqEditors ...RequestEditorFn) (*PostFleetAgentsBulkMigrateResponse, error) + // PostFleetAgentsBulkReassignWithBodyWithResponse request with any body PostFleetAgentsBulkReassignWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostFleetAgentsBulkReassignResponse, error) @@ -106643,6 +106853,11 @@ type ClientWithResponsesInterface interface { PostFleetAgentsAgentidActionsWithResponse(ctx context.Context, agentId string, body PostFleetAgentsAgentidActionsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostFleetAgentsAgentidActionsResponse, error) + // PostFleetAgentsAgentidMigrateWithBodyWithResponse request with any body + PostFleetAgentsAgentidMigrateWithBodyWithResponse(ctx context.Context, agentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostFleetAgentsAgentidMigrateResponse, error) + + PostFleetAgentsAgentidMigrateWithResponse(ctx context.Context, agentId string, body PostFleetAgentsAgentidMigrateJSONRequestBody, reqEditors ...RequestEditorFn) (*PostFleetAgentsAgentidMigrateResponse, error) + // PostFleetAgentsAgentidReassignWithBodyWithResponse request with any body PostFleetAgentsAgentidReassignWithBodyWithResponse(ctx context.Context, agentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostFleetAgentsAgentidReassignResponse, error) @@ -113063,8 +113278,21 @@ func (r EndpointGetActionsDetailsResponse) StatusCode() int { type EndpointFileInfoResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SecurityEndpointManagementAPISuccessResponse + JSON200 *struct { + Data *struct { + ActionId *string `json:"actionId,omitempty"` + AgentId *string `json:"agentId,omitempty"` + AgentType *string `json:"agentType,omitempty"` + Created *time.Time `json:"created,omitempty"` + Id *string `json:"id,omitempty"` + MimeType *string `json:"mimeType,omitempty"` + Name *string `json:"name,omitempty"` + Size *float32 `json:"size,omitempty"` + Status *EndpointFileInfo200DataStatus `json:"status,omitempty"` + } `json:"data,omitempty"` + } } +type EndpointFileInfo200DataStatus string // Status returns HTTPResponse.Status func (r EndpointFileInfoResponse) Status() string { @@ -113085,7 +113313,6 @@ func (r EndpointFileInfoResponse) StatusCode() int { type EndpointFileDownloadResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SecurityEndpointManagementAPISuccessResponse } // Status returns HTTPResponse.Status @@ -116398,6 +116625,37 @@ func (r GetFleetAgentsAvailableVersionsResponse) StatusCode() int { return 0 } +type PostFleetAgentsBulkMigrateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + ActionId string `json:"actionId"` + } + JSON400 *struct { + Attributes interface{} `json:"attributes"` + Error *string `json:"error,omitempty"` + ErrorType *string `json:"errorType,omitempty"` + Message string `json:"message"` + StatusCode *float32 `json:"statusCode,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r PostFleetAgentsBulkMigrateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostFleetAgentsBulkMigrateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type PostFleetAgentsBulkReassignResponse struct { Body []byte HTTPResponse *http.Response @@ -117034,6 +117292,37 @@ func (r PostFleetAgentsAgentidActionsResponse) StatusCode() int { return 0 } +type PostFleetAgentsAgentidMigrateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + ActionId string `json:"actionId"` + } + JSON400 *struct { + Attributes interface{} `json:"attributes"` + Error *string `json:"error,omitempty"` + ErrorType *string `json:"errorType,omitempty"` + Message string `json:"message"` + StatusCode *float32 `json:"statusCode,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r PostFleetAgentsAgentidMigrateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostFleetAgentsAgentidMigrateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type PostFleetAgentsAgentidReassignResponse struct { Body []byte HTTPResponse *http.Response @@ -128826,6 +129115,23 @@ func (c *ClientWithResponses) GetFleetAgentsAvailableVersionsWithResponse(ctx co return ParseGetFleetAgentsAvailableVersionsResponse(rsp) } +// PostFleetAgentsBulkMigrateWithBodyWithResponse request with arbitrary body returning *PostFleetAgentsBulkMigrateResponse +func (c *ClientWithResponses) PostFleetAgentsBulkMigrateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostFleetAgentsBulkMigrateResponse, error) { + rsp, err := c.PostFleetAgentsBulkMigrateWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostFleetAgentsBulkMigrateResponse(rsp) +} + +func (c *ClientWithResponses) PostFleetAgentsBulkMigrateWithResponse(ctx context.Context, body PostFleetAgentsBulkMigrateJSONRequestBody, reqEditors ...RequestEditorFn) (*PostFleetAgentsBulkMigrateResponse, error) { + rsp, err := c.PostFleetAgentsBulkMigrate(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostFleetAgentsBulkMigrateResponse(rsp) +} + // PostFleetAgentsBulkReassignWithBodyWithResponse request with arbitrary body returning *PostFleetAgentsBulkReassignResponse func (c *ClientWithResponses) PostFleetAgentsBulkReassignWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostFleetAgentsBulkReassignResponse, error) { rsp, err := c.PostFleetAgentsBulkReassignWithBody(ctx, contentType, body, reqEditors...) @@ -129008,6 +129314,23 @@ func (c *ClientWithResponses) PostFleetAgentsAgentidActionsWithResponse(ctx cont return ParsePostFleetAgentsAgentidActionsResponse(rsp) } +// PostFleetAgentsAgentidMigrateWithBodyWithResponse request with arbitrary body returning *PostFleetAgentsAgentidMigrateResponse +func (c *ClientWithResponses) PostFleetAgentsAgentidMigrateWithBodyWithResponse(ctx context.Context, agentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostFleetAgentsAgentidMigrateResponse, error) { + rsp, err := c.PostFleetAgentsAgentidMigrateWithBody(ctx, agentId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostFleetAgentsAgentidMigrateResponse(rsp) +} + +func (c *ClientWithResponses) PostFleetAgentsAgentidMigrateWithResponse(ctx context.Context, agentId string, body PostFleetAgentsAgentidMigrateJSONRequestBody, reqEditors ...RequestEditorFn) (*PostFleetAgentsAgentidMigrateResponse, error) { + rsp, err := c.PostFleetAgentsAgentidMigrate(ctx, agentId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostFleetAgentsAgentidMigrateResponse(rsp) +} + // PostFleetAgentsAgentidReassignWithBodyWithResponse request with arbitrary body returning *PostFleetAgentsAgentidReassignResponse func (c *ClientWithResponses) PostFleetAgentsAgentidReassignWithBodyWithResponse(ctx context.Context, agentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostFleetAgentsAgentidReassignResponse, error) { rsp, err := c.PostFleetAgentsAgentidReassignWithBody(ctx, agentId, contentType, body, reqEditors...) @@ -138921,7 +139244,19 @@ func ParseEndpointFileInfoResponse(rsp *http.Response) (*EndpointFileInfoRespons switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SecurityEndpointManagementAPISuccessResponse + var dest struct { + Data *struct { + ActionId *string `json:"actionId,omitempty"` + AgentId *string `json:"agentId,omitempty"` + AgentType *string `json:"agentType,omitempty"` + Created *time.Time `json:"created,omitempty"` + Id *string `json:"id,omitempty"` + MimeType *string `json:"mimeType,omitempty"` + Name *string `json:"name,omitempty"` + Size *float32 `json:"size,omitempty"` + Status *EndpointFileInfo200DataStatus `json:"status,omitempty"` + } `json:"data,omitempty"` + } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -138945,16 +139280,6 @@ func ParseEndpointFileDownloadResponse(rsp *http.Response) (*EndpointFileDownloa HTTPResponse: rsp, } - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SecurityEndpointManagementAPISuccessResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - } - return response, nil } @@ -142691,6 +143016,47 @@ func ParseGetFleetAgentsAvailableVersionsResponse(rsp *http.Response) (*GetFleet return response, nil } +// ParsePostFleetAgentsBulkMigrateResponse parses an HTTP response from a PostFleetAgentsBulkMigrateWithResponse call +func ParsePostFleetAgentsBulkMigrateResponse(rsp *http.Response) (*PostFleetAgentsBulkMigrateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostFleetAgentsBulkMigrateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + ActionId string `json:"actionId"` + } + 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 { + Attributes interface{} `json:"attributes"` + Error *string `json:"error,omitempty"` + ErrorType *string `json:"errorType,omitempty"` + Message string `json:"message"` + StatusCode *float32 `json:"statusCode,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + } + + return response, nil +} + // ParsePostFleetAgentsBulkReassignResponse parses an HTTP response from a PostFleetAgentsBulkReassignWithResponse call func ParsePostFleetAgentsBulkReassignResponse(rsp *http.Response) (*PostFleetAgentsBulkReassignResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -143434,6 +143800,47 @@ func ParsePostFleetAgentsAgentidActionsResponse(rsp *http.Response) (*PostFleetA return response, nil } +// ParsePostFleetAgentsAgentidMigrateResponse parses an HTTP response from a PostFleetAgentsAgentidMigrateWithResponse call +func ParsePostFleetAgentsAgentidMigrateResponse(rsp *http.Response) (*PostFleetAgentsAgentidMigrateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostFleetAgentsAgentidMigrateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + ActionId string `json:"actionId"` + } + 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 { + Attributes interface{} `json:"attributes"` + Error *string `json:"error,omitempty"` + ErrorType *string `json:"errorType,omitempty"` + Message string `json:"message"` + StatusCode *float32 `json:"statusCode,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + } + + return response, nil +} + // ParsePostFleetAgentsAgentidReassignResponse parses an HTTP response from a PostFleetAgentsAgentidReassignWithResponse call func ParsePostFleetAgentsAgentidReassignResponse(rsp *http.Response) (*PostFleetAgentsAgentidReassignResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body)