2025-01-15 19:45:51 +00:00
|
|
|
// Package queryservice provides primitives to interact with the openapi HTTP API.
|
|
|
|
|
//
|
|
|
|
|
// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version 2.4.1 DO NOT EDIT.
|
|
|
|
|
package queryservice
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"bytes"
|
|
|
|
|
"context"
|
|
|
|
|
"encoding/json"
|
|
|
|
|
"fmt"
|
|
|
|
|
"io"
|
|
|
|
|
"net/http"
|
|
|
|
|
"net/url"
|
|
|
|
|
"strings"
|
|
|
|
|
|
|
|
|
|
"github.com/oapi-codegen/runtime"
|
2025-01-24 14:52:56 +00:00
|
|
|
openapi_types "github.com/oapi-codegen/runtime/types"
|
2025-01-15 19:45:51 +00:00
|
|
|
)
|
|
|
|
|
|
2025-01-16 13:49:07 +00:00
|
|
|
// Defines values for ExportStatus.
|
|
|
|
|
const (
|
|
|
|
|
Completed ExportStatus = "completed"
|
|
|
|
|
Failed ExportStatus = "failed"
|
|
|
|
|
InProgress ExportStatus = "in_progress"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// Defines values for FieldFilterCondition.
|
|
|
|
|
const (
|
|
|
|
|
ClosedInterval FieldFilterCondition = "closed_interval"
|
|
|
|
|
Exclude FieldFilterCondition = "exclude"
|
|
|
|
|
GreaterThan FieldFilterCondition = "greater_than"
|
|
|
|
|
Include FieldFilterCondition = "include"
|
|
|
|
|
LeftClosedInterval FieldFilterCondition = "left_closed_interval"
|
|
|
|
|
LessThan FieldFilterCondition = "less_than"
|
|
|
|
|
OpenInterval FieldFilterCondition = "open_interval"
|
|
|
|
|
RightClosedInterval FieldFilterCondition = "right_closed_interval"
|
|
|
|
|
)
|
|
|
|
|
|
2025-02-20 19:02:44 +00:00
|
|
|
// Defines values for JobStatus.
|
|
|
|
|
const (
|
|
|
|
|
INSYNC JobStatus = "IN_SYNC"
|
|
|
|
|
NOTSYNCED JobStatus = "NOT_SYNCED"
|
|
|
|
|
)
|
|
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
// Defines values for QueryType.
|
|
|
|
|
const (
|
|
|
|
|
CONTEXTFULL QueryType = "CONTEXT_FULL"
|
|
|
|
|
JSONEXTRACTOR QueryType = "JSON_EXTRACTOR"
|
|
|
|
|
)
|
|
|
|
|
|
2025-01-21 18:24:14 +00:00
|
|
|
// ClientCreate defines model for ClientCreate.
|
|
|
|
|
type ClientCreate struct {
|
|
|
|
|
// Name The client name
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ClientUpdate defines model for ClientUpdate.
|
|
|
|
|
type ClientUpdate struct {
|
|
|
|
|
// CanSync If the client is allowing active syncs
|
|
|
|
|
CanSync *bool `json:"can_sync,omitempty"`
|
|
|
|
|
|
|
|
|
|
// Name The client name
|
|
|
|
|
Name *string `json:"name,omitempty"`
|
|
|
|
|
}
|
|
|
|
|
|
2025-02-21 17:05:37 +00:00
|
|
|
// Document defines model for Document.
|
|
|
|
|
type Document struct {
|
|
|
|
|
// Bucket The bucket containing the document
|
|
|
|
|
Bucket string `json:"bucket"`
|
|
|
|
|
|
|
|
|
|
// Id The document id
|
|
|
|
|
Id openapi_types.UUID `json:"id"`
|
|
|
|
|
|
|
|
|
|
// Key The path to the document
|
|
|
|
|
Key string `json:"key"`
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-16 13:49:07 +00:00
|
|
|
// ExportDetails Payload for export trigger response.
|
|
|
|
|
type ExportDetails struct {
|
|
|
|
|
// JobId The job id relative to the export.
|
2025-02-03 17:45:00 +00:00
|
|
|
JobId openapi_types.UUID `json:"job_id"`
|
2025-01-16 13:49:07 +00:00
|
|
|
|
|
|
|
|
// OutputLocation The location in which the export zip file will be found.
|
|
|
|
|
OutputLocation *string `json:"output_location,omitempty"`
|
|
|
|
|
|
|
|
|
|
// Status The possible export job states.
|
|
|
|
|
Status ExportStatus `json:"status"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ExportStatus The possible export job states.
|
|
|
|
|
type ExportStatus string
|
|
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
// ExportTrigger Payload for triggering an export.
|
|
|
|
|
type ExportTrigger struct {
|
2025-01-16 13:49:07 +00:00
|
|
|
// FieldFilters Filter the scope based on field output values.
|
|
|
|
|
FieldFilters *[]FieldFilter `json:"field_filters,omitempty"`
|
|
|
|
|
|
|
|
|
|
// IngestionFilters Filter the scope based on ingestion parameters.
|
|
|
|
|
IngestionFilters *struct {
|
|
|
|
|
// EndDate The last date of ingestion.
|
|
|
|
|
EndDate *string `json:"end_date,omitempty"`
|
|
|
|
|
|
|
|
|
|
// StartDate This first date of ingestion.
|
|
|
|
|
StartDate *string `json:"start_date,omitempty"`
|
|
|
|
|
} `json:"ingestion_filters,omitempty"`
|
|
|
|
|
|
|
|
|
|
// JobId The job id of the query results to be exported.
|
2025-01-24 14:52:56 +00:00
|
|
|
JobId openapi_types.UUID `json:"job_id"`
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
2025-01-16 13:49:07 +00:00
|
|
|
// FieldFilter Filtering a column
|
|
|
|
|
type FieldFilter struct {
|
|
|
|
|
// Condition The possible field filtering conditions.
|
|
|
|
|
Condition FieldFilterCondition `json:"condition"`
|
|
|
|
|
|
|
|
|
|
// FieldName The name of the field in question.
|
|
|
|
|
FieldName string `json:"field_name"`
|
|
|
|
|
|
|
|
|
|
// Values The values useful to the filter.
|
|
|
|
|
Values []string `json:"values"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// FieldFilterCondition The possible field filtering conditions.
|
|
|
|
|
type FieldFilterCondition string
|
|
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
// IdMessage defines model for IdMessage.
|
|
|
|
|
type IdMessage struct {
|
2025-01-16 13:49:07 +00:00
|
|
|
// Id Unique identifier for entity.
|
2025-01-24 14:52:56 +00:00
|
|
|
Id openapi_types.UUID `json:"id"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Job defines model for Job.
|
|
|
|
|
type Job struct {
|
|
|
|
|
// CanSync Specifies whether the job is actively syncing
|
|
|
|
|
CanSync bool `json:"can_sync"`
|
|
|
|
|
|
|
|
|
|
// ClientId The client id the job belongs to
|
|
|
|
|
ClientId openapi_types.UUID `json:"client_id"`
|
|
|
|
|
|
|
|
|
|
// Id The job id
|
|
|
|
|
Id openapi_types.UUID `json:"id"`
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
2025-01-21 18:24:14 +00:00
|
|
|
// JobClient defines model for JobClient.
|
|
|
|
|
type JobClient struct {
|
|
|
|
|
// CanSync If the client is allowing active syncs
|
|
|
|
|
CanSync bool `json:"can_sync"`
|
|
|
|
|
|
|
|
|
|
// Id The client id
|
2025-01-24 14:52:56 +00:00
|
|
|
Id openapi_types.UUID `json:"id"`
|
2025-01-21 18:24:14 +00:00
|
|
|
|
|
|
|
|
// Name The client name
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
// JobCollector JobCollector model.
|
|
|
|
|
type JobCollector struct {
|
2025-01-21 12:28:46 +00:00
|
|
|
// ActiveVersion The active version of the collector.
|
|
|
|
|
ActiveVersion int32 `json:"active_version"`
|
|
|
|
|
|
|
|
|
|
// Fields The fields in the job collector.
|
|
|
|
|
Fields []JobCollectorField `json:"fields"`
|
|
|
|
|
|
|
|
|
|
// JobId The ID of the associated job.
|
2025-01-24 14:52:56 +00:00
|
|
|
JobId openapi_types.UUID `json:"job_id"`
|
2025-01-21 12:28:46 +00:00
|
|
|
|
|
|
|
|
// LatestVersion The latest version of the collector.
|
|
|
|
|
LatestVersion int32 `json:"latest_version"`
|
|
|
|
|
|
|
|
|
|
// MinimumCleanerVersion The minimum version for the document cleaner.
|
|
|
|
|
MinimumCleanerVersion int32 `json:"minimum_cleaner_version"`
|
|
|
|
|
|
|
|
|
|
// MinimumTextVersion The minimum version for the text parser.
|
|
|
|
|
MinimumTextVersion int32 `json:"minimum_text_version"`
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
2025-01-21 12:28:46 +00:00
|
|
|
// JobCollectorField The field properties for the job collector.
|
|
|
|
|
type JobCollectorField struct {
|
|
|
|
|
// Name The output field name.
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
|
|
|
|
|
// QueryId The query id that will populate the result.
|
2025-01-24 14:52:56 +00:00
|
|
|
QueryId openapi_types.UUID `json:"query_id"`
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// JobCollectorUpdate Payload for updating a JobCollector.
|
|
|
|
|
type JobCollectorUpdate struct {
|
2025-01-21 12:28:46 +00:00
|
|
|
// ActiveVersion The active version of the collector.
|
|
|
|
|
ActiveVersion *int32 `json:"active_version,omitempty"`
|
|
|
|
|
|
|
|
|
|
// Fields The fields in the job collector.
|
|
|
|
|
Fields *[]JobCollectorField `json:"fields,omitempty"`
|
|
|
|
|
|
|
|
|
|
// MinimumCleanerVersion The minimum version for the document cleaner.
|
|
|
|
|
MinimumCleanerVersion *int32 `json:"minimum_cleaner_version,omitempty"`
|
|
|
|
|
|
|
|
|
|
// MinimumTextVersion The minimum version for the text parser.
|
|
|
|
|
MinimumTextVersion *int32 `json:"minimum_text_version,omitempty"`
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
// JobCreate defines model for JobCreate.
|
|
|
|
|
type JobCreate struct {
|
|
|
|
|
// ClientId The client id the job belongs to
|
|
|
|
|
ClientId openapi_types.UUID `json:"client_id"`
|
|
|
|
|
}
|
|
|
|
|
|
2025-02-20 19:02:44 +00:00
|
|
|
// JobStatus Specifies the status of a job.
|
|
|
|
|
type JobStatus string
|
|
|
|
|
|
2025-03-04 16:20:54 +00:00
|
|
|
// JobStatusBody defines model for JobStatusBody.
|
|
|
|
|
type JobStatusBody struct {
|
|
|
|
|
// JobId The job id
|
|
|
|
|
JobId openapi_types.UUID `json:"job_id"`
|
|
|
|
|
|
|
|
|
|
// Status Specifies the status of a job.
|
|
|
|
|
Status JobStatus `json:"status"`
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
// JobUpdate defines model for JobUpdate.
|
|
|
|
|
type JobUpdate struct {
|
|
|
|
|
// CanSync Specifies whether the job is actively syncing
|
|
|
|
|
CanSync *bool `json:"can_sync,omitempty"`
|
|
|
|
|
}
|
|
|
|
|
|
2025-02-21 17:05:37 +00:00
|
|
|
// ListDocuments The documents in the job.
|
|
|
|
|
type ListDocuments = []Document
|
|
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
// ListQueries defines model for ListQueries.
|
|
|
|
|
type ListQueries struct {
|
|
|
|
|
// Queries List of queries.
|
|
|
|
|
Queries []Query `json:"queries"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Query defines model for Query.
|
|
|
|
|
type Query struct {
|
|
|
|
|
// ActiveVersion The active version of the query.
|
|
|
|
|
ActiveVersion int32 `json:"active_version"`
|
|
|
|
|
|
|
|
|
|
// Config Configuration for the query.
|
|
|
|
|
Config *string `json:"config,omitempty"`
|
|
|
|
|
|
|
|
|
|
// Id Unique identifier for the query.
|
2025-01-24 14:52:56 +00:00
|
|
|
Id openapi_types.UUID `json:"id"`
|
2025-01-15 19:45:51 +00:00
|
|
|
|
|
|
|
|
// LatestVersion The latest version of the query.
|
|
|
|
|
LatestVersion int32 `json:"latest_version"`
|
|
|
|
|
|
|
|
|
|
// RequiredQueries List of required query IDs.
|
2025-01-24 14:52:56 +00:00
|
|
|
RequiredQueries *[]openapi_types.UUID `json:"required_queries,omitempty"`
|
2025-01-15 19:45:51 +00:00
|
|
|
|
|
|
|
|
// Type Specifies the type of the query.
|
|
|
|
|
Type QueryType `json:"type"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// QueryCreate defines model for QueryCreate.
|
|
|
|
|
type QueryCreate struct {
|
|
|
|
|
// Config Configuration for the new query.
|
|
|
|
|
Config *string `json:"config,omitempty"`
|
|
|
|
|
|
|
|
|
|
// RequiredQueries List of required query IDs.
|
2025-01-24 14:52:56 +00:00
|
|
|
RequiredQueries *[]openapi_types.UUID `json:"required_queries,omitempty"`
|
2025-01-15 19:45:51 +00:00
|
|
|
|
|
|
|
|
// Type Specifies the type of the query.
|
|
|
|
|
Type QueryType `json:"type"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// QueryTestRequest defines model for QueryTestRequest.
|
|
|
|
|
type QueryTestRequest struct {
|
|
|
|
|
// DocumentId ID of the document to test against.
|
2025-01-24 14:52:56 +00:00
|
|
|
DocumentId openapi_types.UUID `json:"document_id"`
|
2025-01-15 19:45:51 +00:00
|
|
|
|
|
|
|
|
// QueryVersion Version of the query to use for testing.
|
|
|
|
|
QueryVersion int32 `json:"query_version"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// QueryTestResponse defines model for QueryTestResponse.
|
|
|
|
|
type QueryTestResponse struct {
|
|
|
|
|
// Value Result of the query test.
|
|
|
|
|
Value string `json:"value"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// QueryType Specifies the type of the query.
|
|
|
|
|
type QueryType string
|
|
|
|
|
|
|
|
|
|
// QueryUpdate defines model for QueryUpdate.
|
|
|
|
|
type QueryUpdate struct {
|
|
|
|
|
// ActiveVersion Updated active version.
|
|
|
|
|
ActiveVersion *int32 `json:"active_version,omitempty"`
|
|
|
|
|
|
|
|
|
|
// Config Updated configuration for the query.
|
|
|
|
|
Config *string `json:"config,omitempty"`
|
|
|
|
|
|
|
|
|
|
// RequiredQueries Updated list of required query IDs.
|
2025-01-24 14:52:56 +00:00
|
|
|
RequiredQueries *[]openapi_types.UUID `json:"required_queries,omitempty"`
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
2025-01-21 18:24:14 +00:00
|
|
|
// CreateClientJSONRequestBody defines body for CreateClient for application/json ContentType.
|
|
|
|
|
type CreateClientJSONRequestBody = ClientCreate
|
|
|
|
|
|
|
|
|
|
// UpdateClientJSONRequestBody defines body for UpdateClient for application/json ContentType.
|
|
|
|
|
type UpdateClientJSONRequestBody = ClientUpdate
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
// CreateJobJSONRequestBody defines body for CreateJob for application/json ContentType.
|
|
|
|
|
type CreateJobJSONRequestBody = JobCreate
|
|
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
// TriggerExportJSONRequestBody defines body for TriggerExport for application/json ContentType.
|
|
|
|
|
type TriggerExportJSONRequestBody = ExportTrigger
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
// UpdateJobJSONRequestBody defines body for UpdateJob for application/json ContentType.
|
|
|
|
|
type UpdateJobJSONRequestBody = JobUpdate
|
|
|
|
|
|
2025-01-21 12:28:46 +00:00
|
|
|
// UpdateJobCollectorByJobIdJSONRequestBody defines body for UpdateJobCollectorByJobId for application/json ContentType.
|
|
|
|
|
type UpdateJobCollectorByJobIdJSONRequestBody = JobCollectorUpdate
|
2025-01-15 19:45:51 +00:00
|
|
|
|
|
|
|
|
// CreateQueryJSONRequestBody defines body for CreateQuery for application/json ContentType.
|
|
|
|
|
type CreateQueryJSONRequestBody = QueryCreate
|
|
|
|
|
|
|
|
|
|
// UpdateQueryJSONRequestBody defines body for UpdateQuery for application/json ContentType.
|
|
|
|
|
type UpdateQueryJSONRequestBody = QueryUpdate
|
|
|
|
|
|
|
|
|
|
// TestQueryJSONRequestBody defines body for TestQuery for application/json ContentType.
|
|
|
|
|
type TestQueryJSONRequestBody = QueryTestRequest
|
|
|
|
|
|
|
|
|
|
// RequestEditorFn is the function signature for the RequestEditor callback function
|
|
|
|
|
type RequestEditorFn func(ctx context.Context, req *http.Request) error
|
|
|
|
|
|
|
|
|
|
// Doer performs HTTP requests.
|
|
|
|
|
//
|
|
|
|
|
// The standard http.Client implements this interface.
|
|
|
|
|
type HttpRequestDoer interface {
|
|
|
|
|
Do(req *http.Request) (*http.Response, error)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Client which conforms to the OpenAPI3 specification for this service.
|
|
|
|
|
type Client struct {
|
|
|
|
|
// The endpoint of the server conforming to this interface, with scheme,
|
|
|
|
|
// https://api.deepmap.com for example. This can contain a path relative
|
|
|
|
|
// to the server, such as https://api.deepmap.com/dev-test, and all the
|
|
|
|
|
// paths in the swagger spec will be appended to the server.
|
|
|
|
|
Server string
|
|
|
|
|
|
|
|
|
|
// Doer for performing requests, typically a *http.Client with any
|
|
|
|
|
// customized settings, such as certificate chains.
|
|
|
|
|
Client HttpRequestDoer
|
|
|
|
|
|
|
|
|
|
// A list of callbacks for modifying requests which are generated before sending over
|
|
|
|
|
// the network.
|
|
|
|
|
RequestEditors []RequestEditorFn
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ClientOption allows setting custom parameters during construction
|
|
|
|
|
type ClientOption func(*Client) error
|
|
|
|
|
|
|
|
|
|
// Creates a new Client, with reasonable defaults
|
|
|
|
|
func NewClient(server string, opts ...ClientOption) (*Client, error) {
|
|
|
|
|
// create a client with sane default values
|
|
|
|
|
client := Client{
|
|
|
|
|
Server: server,
|
|
|
|
|
}
|
|
|
|
|
// mutate client and add all optional params
|
|
|
|
|
for _, o := range opts {
|
|
|
|
|
if err := o(&client); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// ensure the server URL always has a trailing slash
|
|
|
|
|
if !strings.HasSuffix(client.Server, "/") {
|
|
|
|
|
client.Server += "/"
|
|
|
|
|
}
|
|
|
|
|
// create httpClient, if not already present
|
|
|
|
|
if client.Client == nil {
|
|
|
|
|
client.Client = &http.Client{}
|
|
|
|
|
}
|
|
|
|
|
return &client, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// WithHTTPClient allows overriding the default Doer, which is
|
|
|
|
|
// automatically created using http.Client. This is useful for tests.
|
|
|
|
|
func WithHTTPClient(doer HttpRequestDoer) ClientOption {
|
|
|
|
|
return func(c *Client) error {
|
|
|
|
|
c.Client = doer
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// WithRequestEditorFn allows setting up a callback function, which will be
|
|
|
|
|
// called right before sending the request. This can be used to mutate the request.
|
|
|
|
|
func WithRequestEditorFn(fn RequestEditorFn) ClientOption {
|
|
|
|
|
return func(c *Client) error {
|
|
|
|
|
c.RequestEditors = append(c.RequestEditors, fn)
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// The interface specification for the client above.
|
|
|
|
|
type ClientInterface interface {
|
2025-01-21 18:24:14 +00:00
|
|
|
// CreateClientWithBody request with any body
|
|
|
|
|
CreateClientWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
|
|
|
|
CreateClient(ctx context.Context, body CreateClientJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
|
|
|
|
// GetClient request
|
2025-01-24 14:52:56 +00:00
|
|
|
GetClient(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)
|
2025-01-21 18:24:14 +00:00
|
|
|
|
|
|
|
|
// UpdateClientWithBody request with any body
|
2025-01-24 14:52:56 +00:00
|
|
|
UpdateClientWithBody(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
|
|
|
|
UpdateClient(ctx context.Context, id openapi_types.UUID, body UpdateClientJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
2025-01-21 18:24:14 +00:00
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
// CreateJobWithBody request with any body
|
|
|
|
|
CreateJobWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
|
|
|
|
CreateJob(ctx context.Context, body CreateJobJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
2025-01-21 18:24:14 +00:00
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
// TriggerExportWithBody request with any body
|
|
|
|
|
TriggerExportWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
|
|
|
|
TriggerExport(ctx context.Context, body TriggerExportJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
// GetJob request
|
|
|
|
|
GetJob(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
|
|
|
|
// UpdateJobWithBody request with any body
|
|
|
|
|
UpdateJobWithBody(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
|
|
|
|
UpdateJob(ctx context.Context, id openapi_types.UUID, body UpdateJobJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
2025-01-16 13:49:07 +00:00
|
|
|
|
2025-01-21 12:28:46 +00:00
|
|
|
// GetJobCollectorByJobId request
|
2025-01-24 14:52:56 +00:00
|
|
|
GetJobCollectorByJobId(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)
|
2025-01-15 19:45:51 +00:00
|
|
|
|
2025-01-21 12:28:46 +00:00
|
|
|
// UpdateJobCollectorByJobIdWithBody request with any body
|
2025-01-24 14:52:56 +00:00
|
|
|
UpdateJobCollectorByJobIdWithBody(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
2025-01-15 19:45:51 +00:00
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
UpdateJobCollectorByJobId(ctx context.Context, id openapi_types.UUID, body UpdateJobCollectorByJobIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
2025-01-15 19:45:51 +00:00
|
|
|
|
2025-02-21 17:05:37 +00:00
|
|
|
// ListDocumentsByJobId request
|
|
|
|
|
ListDocumentsByJobId(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
2025-02-03 17:45:00 +00:00
|
|
|
// ExportState request
|
|
|
|
|
ExportState(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
2025-03-04 16:20:54 +00:00
|
|
|
// GetJobStatusByJobId request
|
|
|
|
|
GetJobStatusByJobId(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
// ListQueries request
|
|
|
|
|
ListQueries(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
|
|
|
|
// CreateQueryWithBody request with any body
|
|
|
|
|
CreateQueryWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
|
|
|
|
CreateQuery(ctx context.Context, body CreateQueryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
2025-01-21 18:24:14 +00:00
|
|
|
// GetQuery request
|
2025-01-24 14:52:56 +00:00
|
|
|
GetQuery(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)
|
2025-01-15 19:45:51 +00:00
|
|
|
|
|
|
|
|
// UpdateQueryWithBody request with any body
|
2025-01-24 14:52:56 +00:00
|
|
|
UpdateQueryWithBody(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
2025-01-15 19:45:51 +00:00
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
UpdateQuery(ctx context.Context, id openapi_types.UUID, body UpdateQueryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
2025-01-15 19:45:51 +00:00
|
|
|
|
|
|
|
|
// TestQueryWithBody request with any body
|
2025-01-24 14:52:56 +00:00
|
|
|
TestQueryWithBody(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
2025-01-15 19:45:51 +00:00
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
TestQuery(ctx context.Context, id openapi_types.UUID, body TestQueryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
2025-01-21 18:24:14 +00:00
|
|
|
func (c *Client) CreateClientWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewCreateClientRequestWithBody(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) CreateClient(ctx context.Context, body CreateClientJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewCreateClientRequest(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)
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
func (c *Client) GetClient(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
2025-01-21 18:24:14 +00:00
|
|
|
req, err := NewGetClientRequest(c.Server, id)
|
|
|
|
|
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)
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
func (c *Client) UpdateClientWithBody(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
2025-01-21 18:24:14 +00:00
|
|
|
req, err := NewUpdateClientRequestWithBody(c.Server, id, 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)
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
func (c *Client) UpdateClient(ctx context.Context, id openapi_types.UUID, body UpdateClientJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
2025-01-21 18:24:14 +00:00
|
|
|
req, err := NewUpdateClientRequest(c.Server, id, 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)
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
func (c *Client) CreateJobWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewCreateJobRequestWithBody(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) CreateJob(ctx context.Context, body CreateJobJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewCreateJobRequest(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)
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
func (c *Client) TriggerExportWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewTriggerExportRequestWithBody(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) TriggerExport(ctx context.Context, body TriggerExportJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewTriggerExportRequest(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)
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
func (c *Client) GetJob(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewGetJobRequest(c.Server, id)
|
|
|
|
|
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) UpdateJobWithBody(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewUpdateJobRequestWithBody(c.Server, id, 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) UpdateJob(ctx context.Context, id openapi_types.UUID, body UpdateJobJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewUpdateJobRequest(c.Server, id, 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) GetJobCollectorByJobId(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
2025-01-21 12:28:46 +00:00
|
|
|
req, err := NewGetJobCollectorByJobIdRequest(c.Server, id)
|
2025-01-15 19:45:51 +00:00
|
|
|
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)
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
func (c *Client) UpdateJobCollectorByJobIdWithBody(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
2025-01-21 12:28:46 +00:00
|
|
|
req, err := NewUpdateJobCollectorByJobIdRequestWithBody(c.Server, id, contentType, body)
|
2025-01-15 19:45:51 +00:00
|
|
|
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)
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
func (c *Client) UpdateJobCollectorByJobId(ctx context.Context, id openapi_types.UUID, body UpdateJobCollectorByJobIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
2025-01-21 12:28:46 +00:00
|
|
|
req, err := NewUpdateJobCollectorByJobIdRequest(c.Server, id, body)
|
2025-01-15 19:45:51 +00:00
|
|
|
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)
|
|
|
|
|
}
|
|
|
|
|
|
2025-02-21 17:05:37 +00:00
|
|
|
func (c *Client) ListDocumentsByJobId(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewListDocumentsByJobIdRequest(c.Server, id)
|
|
|
|
|
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)
|
|
|
|
|
}
|
|
|
|
|
|
2025-02-03 17:45:00 +00:00
|
|
|
func (c *Client) ExportState(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewExportStateRequest(c.Server, id)
|
|
|
|
|
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)
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-04 16:20:54 +00:00
|
|
|
func (c *Client) GetJobStatusByJobId(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewGetJobStatusByJobIdRequest(c.Server, id)
|
|
|
|
|
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)
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
func (c *Client) ListQueries(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewListQueriesRequest(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) CreateQueryWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewCreateQueryRequestWithBody(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) CreateQuery(ctx context.Context, body CreateQueryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewCreateQueryRequest(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)
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
func (c *Client) GetQuery(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
2025-01-21 18:24:14 +00:00
|
|
|
req, err := NewGetQueryRequest(c.Server, id)
|
2025-01-15 19:45:51 +00:00
|
|
|
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)
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
func (c *Client) UpdateQueryWithBody(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
2025-01-15 19:45:51 +00:00
|
|
|
req, err := NewUpdateQueryRequestWithBody(c.Server, id, 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)
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
func (c *Client) UpdateQuery(ctx context.Context, id openapi_types.UUID, body UpdateQueryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
2025-01-15 19:45:51 +00:00
|
|
|
req, err := NewUpdateQueryRequest(c.Server, id, 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)
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
func (c *Client) TestQueryWithBody(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
2025-01-15 19:45:51 +00:00
|
|
|
req, err := NewTestQueryRequestWithBody(c.Server, id, 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)
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
func (c *Client) TestQuery(ctx context.Context, id openapi_types.UUID, body TestQueryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
2025-01-15 19:45:51 +00:00
|
|
|
req, err := NewTestQueryRequest(c.Server, id, 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)
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-21 18:24:14 +00:00
|
|
|
// NewCreateClientRequest calls the generic CreateClient builder with application/json body
|
|
|
|
|
func NewCreateClientRequest(server string, body CreateClientJSONRequestBody) (*http.Request, error) {
|
|
|
|
|
var bodyReader io.Reader
|
|
|
|
|
buf, err := json.Marshal(body)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
bodyReader = bytes.NewReader(buf)
|
|
|
|
|
return NewCreateClientRequestWithBody(server, "application/json", bodyReader)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NewCreateClientRequestWithBody generates requests for CreateClient with any type of body
|
|
|
|
|
func NewCreateClientRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
|
|
|
var err error
|
|
|
|
|
|
|
|
|
|
serverURL, err := url.Parse(server)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
operationPath := fmt.Sprintf("/client")
|
2025-01-21 18:24:14 +00:00
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NewGetClientRequest generates requests for GetClient
|
2025-01-24 14:52:56 +00:00
|
|
|
func NewGetClientRequest(server string, id openapi_types.UUID) (*http.Request, error) {
|
2025-01-21 18:24:14 +00:00
|
|
|
var err error
|
|
|
|
|
|
|
|
|
|
var pathParam0 string
|
|
|
|
|
|
|
|
|
|
pathParam0, 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
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
operationPath := fmt.Sprintf("/client/%s", pathParam0)
|
2025-01-21 18:24:14 +00:00
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NewUpdateClientRequest calls the generic UpdateClient builder with application/json body
|
2025-01-24 14:52:56 +00:00
|
|
|
func NewUpdateClientRequest(server string, id openapi_types.UUID, body UpdateClientJSONRequestBody) (*http.Request, error) {
|
2025-01-21 18:24:14 +00:00
|
|
|
var bodyReader io.Reader
|
|
|
|
|
buf, err := json.Marshal(body)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
bodyReader = bytes.NewReader(buf)
|
|
|
|
|
return NewUpdateClientRequestWithBody(server, id, "application/json", bodyReader)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NewUpdateClientRequestWithBody generates requests for UpdateClient with any type of body
|
2025-01-24 14:52:56 +00:00
|
|
|
func NewUpdateClientRequestWithBody(server string, id openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error) {
|
2025-01-21 18:24:14 +00:00
|
|
|
var err error
|
|
|
|
|
|
|
|
|
|
var pathParam0 string
|
|
|
|
|
|
|
|
|
|
pathParam0, 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
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
operationPath := fmt.Sprintf("/client/%s", pathParam0)
|
2025-01-21 18:24:14 +00:00
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
// NewCreateJobRequest calls the generic CreateJob builder with application/json body
|
|
|
|
|
func NewCreateJobRequest(server string, body CreateJobJSONRequestBody) (*http.Request, error) {
|
|
|
|
|
var bodyReader io.Reader
|
|
|
|
|
buf, err := json.Marshal(body)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
bodyReader = bytes.NewReader(buf)
|
|
|
|
|
return NewCreateJobRequestWithBody(server, "application/json", bodyReader)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NewCreateJobRequestWithBody generates requests for CreateJob with any type of body
|
|
|
|
|
func NewCreateJobRequestWithBody(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("/job")
|
|
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
// NewTriggerExportRequest calls the generic TriggerExport builder with application/json body
|
|
|
|
|
func NewTriggerExportRequest(server string, body TriggerExportJSONRequestBody) (*http.Request, error) {
|
|
|
|
|
var bodyReader io.Reader
|
|
|
|
|
buf, err := json.Marshal(body)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
bodyReader = bytes.NewReader(buf)
|
|
|
|
|
return NewTriggerExportRequestWithBody(server, "application/json", bodyReader)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NewTriggerExportRequestWithBody generates requests for TriggerExport with any type of body
|
|
|
|
|
func NewTriggerExportRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
|
|
|
var err error
|
|
|
|
|
|
|
|
|
|
serverURL, err := url.Parse(server)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-21 12:28:46 +00:00
|
|
|
operationPath := fmt.Sprintf("/job/export")
|
2025-01-15 19:45:51 +00:00
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
// NewGetJobRequest generates requests for GetJob
|
|
|
|
|
func NewGetJobRequest(server string, id openapi_types.UUID) (*http.Request, error) {
|
|
|
|
|
var err error
|
|
|
|
|
|
|
|
|
|
var pathParam0 string
|
|
|
|
|
|
|
|
|
|
pathParam0, 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("/job/%s", 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
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NewUpdateJobRequest calls the generic UpdateJob builder with application/json body
|
|
|
|
|
func NewUpdateJobRequest(server string, id openapi_types.UUID, body UpdateJobJSONRequestBody) (*http.Request, error) {
|
|
|
|
|
var bodyReader io.Reader
|
|
|
|
|
buf, err := json.Marshal(body)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
bodyReader = bytes.NewReader(buf)
|
|
|
|
|
return NewUpdateJobRequestWithBody(server, id, "application/json", bodyReader)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NewUpdateJobRequestWithBody generates requests for UpdateJob with any type of body
|
|
|
|
|
func NewUpdateJobRequestWithBody(server string, id openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error) {
|
|
|
|
|
var err error
|
|
|
|
|
|
|
|
|
|
var pathParam0 string
|
|
|
|
|
|
|
|
|
|
pathParam0, 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("/job/%s", 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
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-21 12:28:46 +00:00
|
|
|
// NewGetJobCollectorByJobIdRequest generates requests for GetJobCollectorByJobId
|
2025-01-24 14:52:56 +00:00
|
|
|
func NewGetJobCollectorByJobIdRequest(server string, id openapi_types.UUID) (*http.Request, error) {
|
2025-01-15 19:45:51 +00:00
|
|
|
var err error
|
|
|
|
|
|
|
|
|
|
var pathParam0 string
|
|
|
|
|
|
|
|
|
|
pathParam0, 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
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-21 12:28:46 +00:00
|
|
|
operationPath := fmt.Sprintf("/job/%s/collector", pathParam0)
|
2025-01-15 19:45:51 +00:00
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-21 12:28:46 +00:00
|
|
|
// NewUpdateJobCollectorByJobIdRequest calls the generic UpdateJobCollectorByJobId builder with application/json body
|
2025-01-24 14:52:56 +00:00
|
|
|
func NewUpdateJobCollectorByJobIdRequest(server string, id openapi_types.UUID, body UpdateJobCollectorByJobIdJSONRequestBody) (*http.Request, error) {
|
2025-01-15 19:45:51 +00:00
|
|
|
var bodyReader io.Reader
|
|
|
|
|
buf, err := json.Marshal(body)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
bodyReader = bytes.NewReader(buf)
|
2025-01-21 12:28:46 +00:00
|
|
|
return NewUpdateJobCollectorByJobIdRequestWithBody(server, id, "application/json", bodyReader)
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
2025-01-21 12:28:46 +00:00
|
|
|
// NewUpdateJobCollectorByJobIdRequestWithBody generates requests for UpdateJobCollectorByJobId with any type of body
|
2025-01-24 14:52:56 +00:00
|
|
|
func NewUpdateJobCollectorByJobIdRequestWithBody(server string, id openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error) {
|
2025-01-15 19:45:51 +00:00
|
|
|
var err error
|
|
|
|
|
|
|
|
|
|
var pathParam0 string
|
|
|
|
|
|
|
|
|
|
pathParam0, 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
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-21 12:28:46 +00:00
|
|
|
operationPath := fmt.Sprintf("/job/%s/collector", pathParam0)
|
2025-01-15 19:45:51 +00:00
|
|
|
if operationPath[0] == '/' {
|
|
|
|
|
operationPath = "." + operationPath
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-21 12:28:46 +00:00
|
|
|
req, err := http.NewRequest("PATCH", queryURL.String(), body)
|
2025-01-15 19:45:51 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
|
|
|
|
|
|
return req, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-02-21 17:05:37 +00:00
|
|
|
// NewListDocumentsByJobIdRequest generates requests for ListDocumentsByJobId
|
|
|
|
|
func NewListDocumentsByJobIdRequest(server string, id openapi_types.UUID) (*http.Request, error) {
|
|
|
|
|
var err error
|
|
|
|
|
|
|
|
|
|
var pathParam0 string
|
|
|
|
|
|
|
|
|
|
pathParam0, 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("/job/%s/documents", 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
|
|
|
|
|
}
|
|
|
|
|
|
2025-02-03 17:45:00 +00:00
|
|
|
// NewExportStateRequest generates requests for ExportState
|
|
|
|
|
func NewExportStateRequest(server string, id openapi_types.UUID) (*http.Request, error) {
|
|
|
|
|
var err error
|
|
|
|
|
|
|
|
|
|
var pathParam0 string
|
|
|
|
|
|
|
|
|
|
pathParam0, 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("/job/%s/export", 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
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-04 16:20:54 +00:00
|
|
|
// NewGetJobStatusByJobIdRequest generates requests for GetJobStatusByJobId
|
|
|
|
|
func NewGetJobStatusByJobIdRequest(server string, id openapi_types.UUID) (*http.Request, error) {
|
|
|
|
|
var err error
|
|
|
|
|
|
|
|
|
|
var pathParam0 string
|
|
|
|
|
|
|
|
|
|
pathParam0, 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("/job/%s/status", 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
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
// NewListQueriesRequest generates requests for ListQueries
|
|
|
|
|
func NewListQueriesRequest(server string) (*http.Request, error) {
|
|
|
|
|
var err error
|
|
|
|
|
|
|
|
|
|
serverURL, err := url.Parse(server)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
operationPath := fmt.Sprintf("/query")
|
2025-01-15 19:45:51 +00:00
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NewCreateQueryRequest calls the generic CreateQuery builder with application/json body
|
|
|
|
|
func NewCreateQueryRequest(server string, body CreateQueryJSONRequestBody) (*http.Request, error) {
|
|
|
|
|
var bodyReader io.Reader
|
|
|
|
|
buf, err := json.Marshal(body)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
bodyReader = bytes.NewReader(buf)
|
|
|
|
|
return NewCreateQueryRequestWithBody(server, "application/json", bodyReader)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NewCreateQueryRequestWithBody generates requests for CreateQuery with any type of body
|
|
|
|
|
func NewCreateQueryRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
|
|
|
var err error
|
|
|
|
|
|
|
|
|
|
serverURL, err := url.Parse(server)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
operationPath := fmt.Sprintf("/query")
|
2025-01-15 19:45:51 +00:00
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-21 18:24:14 +00:00
|
|
|
// NewGetQueryRequest generates requests for GetQuery
|
2025-01-24 14:52:56 +00:00
|
|
|
func NewGetQueryRequest(server string, id openapi_types.UUID) (*http.Request, error) {
|
2025-01-15 19:45:51 +00:00
|
|
|
var err error
|
|
|
|
|
|
|
|
|
|
var pathParam0 string
|
|
|
|
|
|
|
|
|
|
pathParam0, 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
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
operationPath := fmt.Sprintf("/query/%s", pathParam0)
|
2025-01-15 19:45:51 +00:00
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NewUpdateQueryRequest calls the generic UpdateQuery builder with application/json body
|
2025-01-24 14:52:56 +00:00
|
|
|
func NewUpdateQueryRequest(server string, id openapi_types.UUID, body UpdateQueryJSONRequestBody) (*http.Request, error) {
|
2025-01-15 19:45:51 +00:00
|
|
|
var bodyReader io.Reader
|
|
|
|
|
buf, err := json.Marshal(body)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
bodyReader = bytes.NewReader(buf)
|
|
|
|
|
return NewUpdateQueryRequestWithBody(server, id, "application/json", bodyReader)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NewUpdateQueryRequestWithBody generates requests for UpdateQuery with any type of body
|
2025-01-24 14:52:56 +00:00
|
|
|
func NewUpdateQueryRequestWithBody(server string, id openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error) {
|
2025-01-15 19:45:51 +00:00
|
|
|
var err error
|
|
|
|
|
|
|
|
|
|
var pathParam0 string
|
|
|
|
|
|
|
|
|
|
pathParam0, 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
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
operationPath := fmt.Sprintf("/query/%s", pathParam0)
|
2025-01-15 19:45:51 +00:00
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NewTestQueryRequest calls the generic TestQuery builder with application/json body
|
2025-01-24 14:52:56 +00:00
|
|
|
func NewTestQueryRequest(server string, id openapi_types.UUID, body TestQueryJSONRequestBody) (*http.Request, error) {
|
2025-01-15 19:45:51 +00:00
|
|
|
var bodyReader io.Reader
|
|
|
|
|
buf, err := json.Marshal(body)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
bodyReader = bytes.NewReader(buf)
|
|
|
|
|
return NewTestQueryRequestWithBody(server, id, "application/json", bodyReader)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NewTestQueryRequestWithBody generates requests for TestQuery with any type of body
|
2025-01-24 14:52:56 +00:00
|
|
|
func NewTestQueryRequestWithBody(server string, id openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error) {
|
2025-01-15 19:45:51 +00:00
|
|
|
var err error
|
|
|
|
|
|
|
|
|
|
var pathParam0 string
|
|
|
|
|
|
|
|
|
|
pathParam0, 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
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
operationPath := fmt.Sprintf("/query/%s/test", pathParam0)
|
2025-01-15 19:45:51 +00:00
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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 {
|
2025-01-21 18:24:14 +00:00
|
|
|
// CreateClientWithBodyWithResponse request with any body
|
|
|
|
|
CreateClientWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateClientResponse, error)
|
|
|
|
|
|
|
|
|
|
CreateClientWithResponse(ctx context.Context, body CreateClientJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateClientResponse, error)
|
|
|
|
|
|
|
|
|
|
// GetClientWithResponse request
|
2025-01-24 14:52:56 +00:00
|
|
|
GetClientWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetClientResponse, error)
|
2025-01-21 18:24:14 +00:00
|
|
|
|
|
|
|
|
// UpdateClientWithBodyWithResponse request with any body
|
2025-01-24 14:52:56 +00:00
|
|
|
UpdateClientWithBodyWithResponse(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateClientResponse, error)
|
2025-01-21 18:24:14 +00:00
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
UpdateClientWithResponse(ctx context.Context, id openapi_types.UUID, body UpdateClientJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateClientResponse, error)
|
|
|
|
|
|
|
|
|
|
// CreateJobWithBodyWithResponse request with any body
|
|
|
|
|
CreateJobWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateJobResponse, error)
|
|
|
|
|
|
|
|
|
|
CreateJobWithResponse(ctx context.Context, body CreateJobJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateJobResponse, error)
|
2025-01-21 18:24:14 +00:00
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
// TriggerExportWithBodyWithResponse request with any body
|
|
|
|
|
TriggerExportWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TriggerExportResponse, error)
|
|
|
|
|
|
|
|
|
|
TriggerExportWithResponse(ctx context.Context, body TriggerExportJSONRequestBody, reqEditors ...RequestEditorFn) (*TriggerExportResponse, error)
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
// GetJobWithResponse request
|
|
|
|
|
GetJobWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetJobResponse, error)
|
|
|
|
|
|
|
|
|
|
// UpdateJobWithBodyWithResponse request with any body
|
|
|
|
|
UpdateJobWithBodyWithResponse(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateJobResponse, error)
|
|
|
|
|
|
|
|
|
|
UpdateJobWithResponse(ctx context.Context, id openapi_types.UUID, body UpdateJobJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateJobResponse, error)
|
2025-01-16 13:49:07 +00:00
|
|
|
|
2025-01-21 12:28:46 +00:00
|
|
|
// GetJobCollectorByJobIdWithResponse request
|
2025-01-24 14:52:56 +00:00
|
|
|
GetJobCollectorByJobIdWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetJobCollectorByJobIdResponse, error)
|
2025-01-15 19:45:51 +00:00
|
|
|
|
2025-01-21 12:28:46 +00:00
|
|
|
// UpdateJobCollectorByJobIdWithBodyWithResponse request with any body
|
2025-01-24 14:52:56 +00:00
|
|
|
UpdateJobCollectorByJobIdWithBodyWithResponse(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateJobCollectorByJobIdResponse, error)
|
2025-01-15 19:45:51 +00:00
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
UpdateJobCollectorByJobIdWithResponse(ctx context.Context, id openapi_types.UUID, body UpdateJobCollectorByJobIdJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateJobCollectorByJobIdResponse, error)
|
2025-01-15 19:45:51 +00:00
|
|
|
|
2025-02-21 17:05:37 +00:00
|
|
|
// ListDocumentsByJobIdWithResponse request
|
|
|
|
|
ListDocumentsByJobIdWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*ListDocumentsByJobIdResponse, error)
|
|
|
|
|
|
2025-02-03 17:45:00 +00:00
|
|
|
// ExportStateWithResponse request
|
|
|
|
|
ExportStateWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*ExportStateResponse, error)
|
|
|
|
|
|
2025-03-04 16:20:54 +00:00
|
|
|
// GetJobStatusByJobIdWithResponse request
|
|
|
|
|
GetJobStatusByJobIdWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetJobStatusByJobIdResponse, error)
|
|
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
// ListQueriesWithResponse request
|
|
|
|
|
ListQueriesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListQueriesResponse, error)
|
|
|
|
|
|
|
|
|
|
// CreateQueryWithBodyWithResponse request with any body
|
|
|
|
|
CreateQueryWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateQueryResponse, error)
|
|
|
|
|
|
|
|
|
|
CreateQueryWithResponse(ctx context.Context, body CreateQueryJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateQueryResponse, error)
|
|
|
|
|
|
2025-01-21 18:24:14 +00:00
|
|
|
// GetQueryWithResponse request
|
2025-01-24 14:52:56 +00:00
|
|
|
GetQueryWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetQueryResponse, error)
|
2025-01-15 19:45:51 +00:00
|
|
|
|
|
|
|
|
// UpdateQueryWithBodyWithResponse request with any body
|
2025-01-24 14:52:56 +00:00
|
|
|
UpdateQueryWithBodyWithResponse(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateQueryResponse, error)
|
2025-01-15 19:45:51 +00:00
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
UpdateQueryWithResponse(ctx context.Context, id openapi_types.UUID, body UpdateQueryJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateQueryResponse, error)
|
2025-01-15 19:45:51 +00:00
|
|
|
|
|
|
|
|
// TestQueryWithBodyWithResponse request with any body
|
2025-01-24 14:52:56 +00:00
|
|
|
TestQueryWithBodyWithResponse(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TestQueryResponse, error)
|
2025-01-15 19:45:51 +00:00
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
TestQueryWithResponse(ctx context.Context, id openapi_types.UUID, body TestQueryJSONRequestBody, reqEditors ...RequestEditorFn) (*TestQueryResponse, error)
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
2025-01-21 18:24:14 +00:00
|
|
|
type CreateClientResponse struct {
|
|
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
JSON201 *IdMessage
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
|
|
|
|
func (r CreateClientResponse) Status() string {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
|
|
|
func (r CreateClientResponse) StatusCode() int {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type GetClientResponse struct {
|
|
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
JSON200 *JobClient
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
|
|
|
|
func (r GetClientResponse) Status() string {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
|
|
|
func (r GetClientResponse) StatusCode() int {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type UpdateClientResponse struct {
|
|
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
|
|
|
|
func (r UpdateClientResponse) Status() string {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
|
|
|
func (r UpdateClientResponse) StatusCode() int {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
type CreateJobResponse struct {
|
|
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
JSON201 *IdMessage
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
|
|
|
|
func (r CreateJobResponse) Status() string {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
|
|
|
func (r CreateJobResponse) StatusCode() int {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
type TriggerExportResponse struct {
|
|
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
JSON201 *IdMessage
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
|
|
|
|
func (r TriggerExportResponse) Status() string {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
|
|
|
func (r TriggerExportResponse) StatusCode() int {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
2025-02-03 17:45:00 +00:00
|
|
|
type GetJobResponse struct {
|
2025-01-16 13:49:07 +00:00
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
2025-02-03 17:45:00 +00:00
|
|
|
JSON200 *Job
|
2025-01-16 13:49:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
2025-02-03 17:45:00 +00:00
|
|
|
func (r GetJobResponse) Status() string {
|
2025-01-16 13:49:07 +00:00
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
2025-02-03 17:45:00 +00:00
|
|
|
func (r GetJobResponse) StatusCode() int {
|
2025-01-16 13:49:07 +00:00
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
2025-02-03 17:45:00 +00:00
|
|
|
type UpdateJobResponse struct {
|
2025-01-24 14:52:56 +00:00
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
2025-02-03 17:45:00 +00:00
|
|
|
func (r UpdateJobResponse) Status() string {
|
2025-01-24 14:52:56 +00:00
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
2025-02-03 17:45:00 +00:00
|
|
|
func (r UpdateJobResponse) StatusCode() int {
|
2025-01-24 14:52:56 +00:00
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
2025-02-03 17:45:00 +00:00
|
|
|
type GetJobCollectorByJobIdResponse struct {
|
2025-01-24 14:52:56 +00:00
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
2025-02-03 17:45:00 +00:00
|
|
|
JSON200 *JobCollector
|
2025-01-24 14:52:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
2025-02-03 17:45:00 +00:00
|
|
|
func (r GetJobCollectorByJobIdResponse) Status() string {
|
2025-01-24 14:52:56 +00:00
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
2025-02-03 17:45:00 +00:00
|
|
|
func (r GetJobCollectorByJobIdResponse) StatusCode() int {
|
2025-01-24 14:52:56 +00:00
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
2025-02-03 17:45:00 +00:00
|
|
|
type UpdateJobCollectorByJobIdResponse struct {
|
2025-01-15 19:45:51 +00:00
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
2025-02-03 17:45:00 +00:00
|
|
|
func (r UpdateJobCollectorByJobIdResponse) Status() string {
|
2025-01-15 19:45:51 +00:00
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
2025-02-03 17:45:00 +00:00
|
|
|
func (r UpdateJobCollectorByJobIdResponse) StatusCode() int {
|
2025-01-15 19:45:51 +00:00
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
2025-02-21 17:05:37 +00:00
|
|
|
type ListDocumentsByJobIdResponse struct {
|
|
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
JSON200 *ListDocuments
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
|
|
|
|
func (r ListDocumentsByJobIdResponse) Status() string {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
|
|
|
func (r ListDocumentsByJobIdResponse) StatusCode() int {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
2025-02-03 17:45:00 +00:00
|
|
|
type ExportStateResponse struct {
|
2025-01-15 19:45:51 +00:00
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
2025-02-03 17:45:00 +00:00
|
|
|
JSON200 *ExportDetails
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
2025-02-03 17:45:00 +00:00
|
|
|
func (r ExportStateResponse) Status() string {
|
2025-01-15 19:45:51 +00:00
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
2025-02-03 17:45:00 +00:00
|
|
|
func (r ExportStateResponse) StatusCode() int {
|
2025-01-15 19:45:51 +00:00
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-04 16:20:54 +00:00
|
|
|
type GetJobStatusByJobIdResponse struct {
|
|
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
JSON200 *JobStatusBody
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
|
|
|
|
func (r GetJobStatusByJobIdResponse) Status() string {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
|
|
|
func (r GetJobStatusByJobIdResponse) StatusCode() int {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
type ListQueriesResponse struct {
|
|
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
JSON200 *ListQueries
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
|
|
|
|
func (r ListQueriesResponse) Status() string {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
|
|
|
func (r ListQueriesResponse) StatusCode() int {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type CreateQueryResponse struct {
|
|
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
JSON201 *IdMessage
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
|
|
|
|
func (r CreateQueryResponse) Status() string {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
|
|
|
func (r CreateQueryResponse) StatusCode() int {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-21 18:24:14 +00:00
|
|
|
type GetQueryResponse struct {
|
2025-01-15 19:45:51 +00:00
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
JSON200 *Query
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
2025-01-21 18:24:14 +00:00
|
|
|
func (r GetQueryResponse) Status() string {
|
2025-01-15 19:45:51 +00:00
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
2025-01-21 18:24:14 +00:00
|
|
|
func (r GetQueryResponse) StatusCode() int {
|
2025-01-15 19:45:51 +00:00
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type UpdateQueryResponse struct {
|
|
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
|
|
|
|
func (r UpdateQueryResponse) Status() string {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
|
|
|
func (r UpdateQueryResponse) StatusCode() int {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type TestQueryResponse struct {
|
|
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
JSON200 *QueryTestResponse
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
|
|
|
|
func (r TestQueryResponse) Status() string {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
|
|
|
func (r TestQueryResponse) StatusCode() int {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-21 18:24:14 +00:00
|
|
|
// CreateClientWithBodyWithResponse request with arbitrary body returning *CreateClientResponse
|
|
|
|
|
func (c *ClientWithResponses) CreateClientWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateClientResponse, error) {
|
|
|
|
|
rsp, err := c.CreateClientWithBody(ctx, contentType, body, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseCreateClientResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *ClientWithResponses) CreateClientWithResponse(ctx context.Context, body CreateClientJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateClientResponse, error) {
|
|
|
|
|
rsp, err := c.CreateClient(ctx, body, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseCreateClientResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// GetClientWithResponse request returning *GetClientResponse
|
2025-01-24 14:52:56 +00:00
|
|
|
func (c *ClientWithResponses) GetClientWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetClientResponse, error) {
|
2025-01-21 18:24:14 +00:00
|
|
|
rsp, err := c.GetClient(ctx, id, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseGetClientResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// UpdateClientWithBodyWithResponse request with arbitrary body returning *UpdateClientResponse
|
2025-01-24 14:52:56 +00:00
|
|
|
func (c *ClientWithResponses) UpdateClientWithBodyWithResponse(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateClientResponse, error) {
|
2025-01-21 18:24:14 +00:00
|
|
|
rsp, err := c.UpdateClientWithBody(ctx, id, contentType, body, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseUpdateClientResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
func (c *ClientWithResponses) UpdateClientWithResponse(ctx context.Context, id openapi_types.UUID, body UpdateClientJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateClientResponse, error) {
|
2025-01-21 18:24:14 +00:00
|
|
|
rsp, err := c.UpdateClient(ctx, id, body, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseUpdateClientResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
// CreateJobWithBodyWithResponse request with arbitrary body returning *CreateJobResponse
|
|
|
|
|
func (c *ClientWithResponses) CreateJobWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateJobResponse, error) {
|
|
|
|
|
rsp, err := c.CreateJobWithBody(ctx, contentType, body, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseCreateJobResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *ClientWithResponses) CreateJobWithResponse(ctx context.Context, body CreateJobJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateJobResponse, error) {
|
|
|
|
|
rsp, err := c.CreateJob(ctx, body, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseCreateJobResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
// TriggerExportWithBodyWithResponse request with arbitrary body returning *TriggerExportResponse
|
|
|
|
|
func (c *ClientWithResponses) TriggerExportWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TriggerExportResponse, error) {
|
|
|
|
|
rsp, err := c.TriggerExportWithBody(ctx, contentType, body, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseTriggerExportResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *ClientWithResponses) TriggerExportWithResponse(ctx context.Context, body TriggerExportJSONRequestBody, reqEditors ...RequestEditorFn) (*TriggerExportResponse, error) {
|
|
|
|
|
rsp, err := c.TriggerExport(ctx, body, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseTriggerExportResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
// GetJobWithResponse request returning *GetJobResponse
|
|
|
|
|
func (c *ClientWithResponses) GetJobWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetJobResponse, error) {
|
|
|
|
|
rsp, err := c.GetJob(ctx, id, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseGetJobResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// UpdateJobWithBodyWithResponse request with arbitrary body returning *UpdateJobResponse
|
|
|
|
|
func (c *ClientWithResponses) UpdateJobWithBodyWithResponse(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateJobResponse, error) {
|
|
|
|
|
rsp, err := c.UpdateJobWithBody(ctx, id, contentType, body, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseUpdateJobResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *ClientWithResponses) UpdateJobWithResponse(ctx context.Context, id openapi_types.UUID, body UpdateJobJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateJobResponse, error) {
|
|
|
|
|
rsp, err := c.UpdateJob(ctx, id, body, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseUpdateJobResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-21 12:28:46 +00:00
|
|
|
// GetJobCollectorByJobIdWithResponse request returning *GetJobCollectorByJobIdResponse
|
2025-01-24 14:52:56 +00:00
|
|
|
func (c *ClientWithResponses) GetJobCollectorByJobIdWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetJobCollectorByJobIdResponse, error) {
|
2025-01-21 12:28:46 +00:00
|
|
|
rsp, err := c.GetJobCollectorByJobId(ctx, id, reqEditors...)
|
2025-01-15 19:45:51 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-01-21 12:28:46 +00:00
|
|
|
return ParseGetJobCollectorByJobIdResponse(rsp)
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
2025-01-21 12:28:46 +00:00
|
|
|
// UpdateJobCollectorByJobIdWithBodyWithResponse request with arbitrary body returning *UpdateJobCollectorByJobIdResponse
|
2025-01-24 14:52:56 +00:00
|
|
|
func (c *ClientWithResponses) UpdateJobCollectorByJobIdWithBodyWithResponse(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateJobCollectorByJobIdResponse, error) {
|
2025-01-21 12:28:46 +00:00
|
|
|
rsp, err := c.UpdateJobCollectorByJobIdWithBody(ctx, id, contentType, body, reqEditors...)
|
2025-01-15 19:45:51 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-01-21 12:28:46 +00:00
|
|
|
return ParseUpdateJobCollectorByJobIdResponse(rsp)
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
func (c *ClientWithResponses) UpdateJobCollectorByJobIdWithResponse(ctx context.Context, id openapi_types.UUID, body UpdateJobCollectorByJobIdJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateJobCollectorByJobIdResponse, error) {
|
2025-01-21 12:28:46 +00:00
|
|
|
rsp, err := c.UpdateJobCollectorByJobId(ctx, id, body, reqEditors...)
|
2025-01-15 19:45:51 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-01-21 12:28:46 +00:00
|
|
|
return ParseUpdateJobCollectorByJobIdResponse(rsp)
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
2025-02-21 17:05:37 +00:00
|
|
|
// ListDocumentsByJobIdWithResponse request returning *ListDocumentsByJobIdResponse
|
|
|
|
|
func (c *ClientWithResponses) ListDocumentsByJobIdWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*ListDocumentsByJobIdResponse, error) {
|
|
|
|
|
rsp, err := c.ListDocumentsByJobId(ctx, id, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseListDocumentsByJobIdResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
2025-02-03 17:45:00 +00:00
|
|
|
// ExportStateWithResponse request returning *ExportStateResponse
|
|
|
|
|
func (c *ClientWithResponses) ExportStateWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*ExportStateResponse, error) {
|
|
|
|
|
rsp, err := c.ExportState(ctx, id, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseExportStateResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-04 16:20:54 +00:00
|
|
|
// GetJobStatusByJobIdWithResponse request returning *GetJobStatusByJobIdResponse
|
|
|
|
|
func (c *ClientWithResponses) GetJobStatusByJobIdWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetJobStatusByJobIdResponse, error) {
|
|
|
|
|
rsp, err := c.GetJobStatusByJobId(ctx, id, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseGetJobStatusByJobIdResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
// ListQueriesWithResponse request returning *ListQueriesResponse
|
|
|
|
|
func (c *ClientWithResponses) ListQueriesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListQueriesResponse, error) {
|
|
|
|
|
rsp, err := c.ListQueries(ctx, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseListQueriesResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// CreateQueryWithBodyWithResponse request with arbitrary body returning *CreateQueryResponse
|
|
|
|
|
func (c *ClientWithResponses) CreateQueryWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateQueryResponse, error) {
|
|
|
|
|
rsp, err := c.CreateQueryWithBody(ctx, contentType, body, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseCreateQueryResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *ClientWithResponses) CreateQueryWithResponse(ctx context.Context, body CreateQueryJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateQueryResponse, error) {
|
|
|
|
|
rsp, err := c.CreateQuery(ctx, body, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseCreateQueryResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-21 18:24:14 +00:00
|
|
|
// GetQueryWithResponse request returning *GetQueryResponse
|
2025-01-24 14:52:56 +00:00
|
|
|
func (c *ClientWithResponses) GetQueryWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetQueryResponse, error) {
|
2025-01-21 18:24:14 +00:00
|
|
|
rsp, err := c.GetQuery(ctx, id, reqEditors...)
|
2025-01-15 19:45:51 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-01-21 18:24:14 +00:00
|
|
|
return ParseGetQueryResponse(rsp)
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// UpdateQueryWithBodyWithResponse request with arbitrary body returning *UpdateQueryResponse
|
2025-01-24 14:52:56 +00:00
|
|
|
func (c *ClientWithResponses) UpdateQueryWithBodyWithResponse(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateQueryResponse, error) {
|
2025-01-15 19:45:51 +00:00
|
|
|
rsp, err := c.UpdateQueryWithBody(ctx, id, contentType, body, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseUpdateQueryResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
func (c *ClientWithResponses) UpdateQueryWithResponse(ctx context.Context, id openapi_types.UUID, body UpdateQueryJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateQueryResponse, error) {
|
2025-01-15 19:45:51 +00:00
|
|
|
rsp, err := c.UpdateQuery(ctx, id, body, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseUpdateQueryResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TestQueryWithBodyWithResponse request with arbitrary body returning *TestQueryResponse
|
2025-01-24 14:52:56 +00:00
|
|
|
func (c *ClientWithResponses) TestQueryWithBodyWithResponse(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TestQueryResponse, error) {
|
2025-01-15 19:45:51 +00:00
|
|
|
rsp, err := c.TestQueryWithBody(ctx, id, contentType, body, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseTestQueryResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
func (c *ClientWithResponses) TestQueryWithResponse(ctx context.Context, id openapi_types.UUID, body TestQueryJSONRequestBody, reqEditors ...RequestEditorFn) (*TestQueryResponse, error) {
|
2025-01-15 19:45:51 +00:00
|
|
|
rsp, err := c.TestQuery(ctx, id, body, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseTestQueryResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-21 18:24:14 +00:00
|
|
|
// ParseCreateClientResponse parses an HTTP response from a CreateClientWithResponse call
|
|
|
|
|
func ParseCreateClientResponse(rsp *http.Response) (*CreateClientResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
response := &CreateClientResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
|
|
|
|
|
var dest IdMessage
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON201 = &dest
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ParseGetClientResponse parses an HTTP response from a GetClientWithResponse call
|
|
|
|
|
func ParseGetClientResponse(rsp *http.Response) (*GetClientResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
response := &GetClientResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
|
|
|
var dest JobClient
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON200 = &dest
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ParseUpdateClientResponse parses an HTTP response from a UpdateClientWithResponse call
|
|
|
|
|
func ParseUpdateClientResponse(rsp *http.Response) (*UpdateClientResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
response := &UpdateClientResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
// ParseCreateJobResponse parses an HTTP response from a CreateJobWithResponse call
|
|
|
|
|
func ParseCreateJobResponse(rsp *http.Response) (*CreateJobResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
response := &CreateJobResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
|
|
|
|
|
var dest IdMessage
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON201 = &dest
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
// ParseTriggerExportResponse parses an HTTP response from a TriggerExportWithResponse call
|
|
|
|
|
func ParseTriggerExportResponse(rsp *http.Response) (*TriggerExportResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
response := &TriggerExportResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
|
|
|
|
|
var dest IdMessage
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON201 = &dest
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-24 14:52:56 +00:00
|
|
|
// ParseGetJobResponse parses an HTTP response from a GetJobWithResponse call
|
|
|
|
|
func ParseGetJobResponse(rsp *http.Response) (*GetJobResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
response := &GetJobResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
|
|
|
var dest Job
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON200 = &dest
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ParseUpdateJobResponse parses an HTTP response from a UpdateJobWithResponse call
|
|
|
|
|
func ParseUpdateJobResponse(rsp *http.Response) (*UpdateJobResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
response := &UpdateJobResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-16 13:49:07 +00:00
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-21 12:28:46 +00:00
|
|
|
// ParseGetJobCollectorByJobIdResponse parses an HTTP response from a GetJobCollectorByJobIdWithResponse call
|
|
|
|
|
func ParseGetJobCollectorByJobIdResponse(rsp *http.Response) (*GetJobCollectorByJobIdResponse, error) {
|
2025-01-15 19:45:51 +00:00
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-21 12:28:46 +00:00
|
|
|
response := &GetJobCollectorByJobIdResponse{
|
2025-01-15 19:45:51 +00:00
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
|
|
|
var dest JobCollector
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON200 = &dest
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-21 12:28:46 +00:00
|
|
|
// ParseUpdateJobCollectorByJobIdResponse parses an HTTP response from a UpdateJobCollectorByJobIdWithResponse call
|
|
|
|
|
func ParseUpdateJobCollectorByJobIdResponse(rsp *http.Response) (*UpdateJobCollectorByJobIdResponse, error) {
|
2025-01-15 19:45:51 +00:00
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-21 12:28:46 +00:00
|
|
|
response := &UpdateJobCollectorByJobIdResponse{
|
2025-01-15 19:45:51 +00:00
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-02-21 17:05:37 +00:00
|
|
|
// ParseListDocumentsByJobIdResponse parses an HTTP response from a ListDocumentsByJobIdWithResponse call
|
|
|
|
|
func ParseListDocumentsByJobIdResponse(rsp *http.Response) (*ListDocumentsByJobIdResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
response := &ListDocumentsByJobIdResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
|
|
|
var dest ListDocuments
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON200 = &dest
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-02-03 17:45:00 +00:00
|
|
|
// ParseExportStateResponse parses an HTTP response from a ExportStateWithResponse call
|
|
|
|
|
func ParseExportStateResponse(rsp *http.Response) (*ExportStateResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
response := &ExportStateResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
|
|
|
var dest ExportDetails
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON200 = &dest
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-04 16:20:54 +00:00
|
|
|
// ParseGetJobStatusByJobIdResponse parses an HTTP response from a GetJobStatusByJobIdWithResponse call
|
|
|
|
|
func ParseGetJobStatusByJobIdResponse(rsp *http.Response) (*GetJobStatusByJobIdResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
response := &GetJobStatusByJobIdResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
|
|
|
var dest JobStatusBody
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON200 = &dest
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
// ParseListQueriesResponse parses an HTTP response from a ListQueriesWithResponse call
|
|
|
|
|
func ParseListQueriesResponse(rsp *http.Response) (*ListQueriesResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
response := &ListQueriesResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
|
|
|
var dest ListQueries
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON200 = &dest
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ParseCreateQueryResponse parses an HTTP response from a CreateQueryWithResponse call
|
|
|
|
|
func ParseCreateQueryResponse(rsp *http.Response) (*CreateQueryResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
response := &CreateQueryResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
|
|
|
|
|
var dest IdMessage
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON201 = &dest
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-21 18:24:14 +00:00
|
|
|
// ParseGetQueryResponse parses an HTTP response from a GetQueryWithResponse call
|
|
|
|
|
func ParseGetQueryResponse(rsp *http.Response) (*GetQueryResponse, error) {
|
2025-01-15 19:45:51 +00:00
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-21 18:24:14 +00:00
|
|
|
response := &GetQueryResponse{
|
2025-01-15 19:45:51 +00:00
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
|
|
|
var dest Query
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON200 = &dest
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ParseUpdateQueryResponse parses an HTTP response from a UpdateQueryWithResponse call
|
|
|
|
|
func ParseUpdateQueryResponse(rsp *http.Response) (*UpdateQueryResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
response := &UpdateQueryResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ParseTestQueryResponse parses an HTTP response from a TestQueryWithResponse call
|
|
|
|
|
func ParseTestQueryResponse(rsp *http.Response) (*TestQueryResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
response := &TestQueryResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
|
|
|
var dest QueryTestResponse
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON200 = &dest
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
|
|
|
|
}
|