2025-03-17 18:14:15 +00:00
|
|
|
// Package queryapi provides primitives to interact with the openapi HTTP API.
|
2025-01-15 19:45:51 +00:00
|
|
|
//
|
|
|
|
|
// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version 2.4.1 DO NOT EDIT.
|
2025-03-17 18:14:15 +00:00
|
|
|
package queryapi
|
2025-01-15 19:45:51 +00:00
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"bytes"
|
|
|
|
|
"context"
|
|
|
|
|
"encoding/json"
|
|
|
|
|
"fmt"
|
|
|
|
|
"io"
|
|
|
|
|
"net/http"
|
|
|
|
|
"net/url"
|
|
|
|
|
"strings"
|
2025-03-12 00:59:58 +00:00
|
|
|
"time"
|
2025-01-15 19:45:51 +00:00
|
|
|
|
2025-08-05 07:03:35 -07:00
|
|
|
"github.com/oapi-codegen/nullable"
|
2025-01-15 19:45:51 +00:00
|
|
|
"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-03-12 00:59:58 +00:00
|
|
|
const (
|
2025-04-21 15:12:38 -07:00
|
|
|
CognitoAuthScopes = "cognitoAuth.Scopes"
|
|
|
|
|
JwtAuthScopes = "jwtAuth.Scopes"
|
2025-03-12 00:59:58 +00:00
|
|
|
)
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// Defines values for AdminUserActionResponseAction.
|
|
|
|
|
const (
|
|
|
|
|
Disable AdminUserActionResponseAction = "disable"
|
|
|
|
|
Enable AdminUserActionResponseAction = "enable"
|
|
|
|
|
)
|
|
|
|
|
|
2025-08-05 07:03:35 -07:00
|
|
|
// Defines values for BatchStatus.
|
|
|
|
|
const (
|
|
|
|
|
BatchStatusCancelled BatchStatus = "cancelled"
|
|
|
|
|
BatchStatusCompleted BatchStatus = "completed"
|
|
|
|
|
BatchStatusFailed BatchStatus = "failed"
|
|
|
|
|
BatchStatusProcessing BatchStatus = "processing"
|
|
|
|
|
)
|
|
|
|
|
|
2025-03-10 11:03:00 +00:00
|
|
|
// Defines values for ClientStatus.
|
|
|
|
|
const (
|
|
|
|
|
INSYNC ClientStatus = "IN_SYNC"
|
|
|
|
|
NOTSYNCED ClientStatus = "NOT_SYNCED"
|
|
|
|
|
NOTSYNCING ClientStatus = "NOT_SYNCING"
|
|
|
|
|
)
|
|
|
|
|
|
2025-01-16 13:49:07 +00:00
|
|
|
// Defines values for ExportStatus.
|
|
|
|
|
const (
|
2025-08-05 07:03:35 -07:00
|
|
|
ExportStatusCompleted ExportStatus = "completed"
|
|
|
|
|
ExportStatusFailed ExportStatus = "failed"
|
|
|
|
|
ExportStatusInProgress ExportStatus = "in_progress"
|
2025-01-16 13:49:07 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// 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-01-15 19:45:51 +00:00
|
|
|
// Defines values for QueryType.
|
|
|
|
|
const (
|
|
|
|
|
CONTEXTFULL QueryType = "CONTEXT_FULL"
|
|
|
|
|
JSONEXTRACTOR QueryType = "JSON_EXTRACTOR"
|
|
|
|
|
)
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// Defines values for ListAdminUsersParamsStatus.
|
|
|
|
|
const (
|
|
|
|
|
All ListAdminUsersParamsStatus = "all"
|
|
|
|
|
Disabled ListAdminUsersParamsStatus = "disabled"
|
|
|
|
|
Enabled ListAdminUsersParamsStatus = "enabled"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// Defines values for ListAdminUsersParamsSortBy.
|
|
|
|
|
const (
|
|
|
|
|
CreatedAt ListAdminUsersParamsSortBy = "created_at"
|
|
|
|
|
Email ListAdminUsersParamsSortBy = "email"
|
|
|
|
|
LastName ListAdminUsersParamsSortBy = "last_name"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// Defines values for ListAdminUsersParamsSortOrder.
|
|
|
|
|
const (
|
|
|
|
|
Asc ListAdminUsersParamsSortOrder = "asc"
|
|
|
|
|
Desc ListAdminUsersParamsSortOrder = "desc"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// AdminUserActionResponse Response for user enable/disable actions with success status and timestamp
|
|
|
|
|
type AdminUserActionResponse struct {
|
|
|
|
|
// Action Action performed
|
|
|
|
|
Action AdminUserActionResponseAction `json:"action"`
|
|
|
|
|
|
|
|
|
|
// CognitoSubjectId Cognito subject identifier for the action response
|
|
|
|
|
CognitoSubjectId *string `json:"cognito_subject_id,omitempty"`
|
|
|
|
|
|
|
|
|
|
// Email Email of the user acted upon
|
|
|
|
|
Email openapi_types.Email `json:"email"`
|
|
|
|
|
|
|
|
|
|
// Success Whether the action succeeded
|
|
|
|
|
Success bool `json:"success"`
|
|
|
|
|
|
|
|
|
|
// Timestamp Timestamp of the action
|
|
|
|
|
Timestamp *time.Time `json:"timestamp,omitempty"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// AdminUserActionResponseAction Action performed
|
|
|
|
|
type AdminUserActionResponseAction string
|
|
|
|
|
|
|
|
|
|
// AdminUserCreate Request body for creating a new user with email, name, and role assignments
|
|
|
|
|
type AdminUserCreate struct {
|
|
|
|
|
// Email User email address (used as Cognito username)
|
|
|
|
|
Email openapi_types.Email `json:"email"`
|
|
|
|
|
|
|
|
|
|
// FirstName User's given name for account creation
|
|
|
|
|
FirstName string `json:"first_name"`
|
|
|
|
|
|
|
|
|
|
// LastName User's family name for account creation
|
|
|
|
|
LastName string `json:"last_name"`
|
|
|
|
|
|
|
|
|
|
// Roles List of roles to assign in Permit.io
|
|
|
|
|
Roles []string `json:"roles"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// AdminUserCreateResponse Response after creating a user, including Cognito subject ID and sync status
|
|
|
|
|
type AdminUserCreateResponse struct {
|
|
|
|
|
// CognitoSubjectId Created user's Cognito unique subject identifier
|
|
|
|
|
CognitoSubjectId string `json:"cognito_subject_id"`
|
|
|
|
|
|
|
|
|
|
// CreatedAt Timestamp when the user was created in the system
|
|
|
|
|
CreatedAt *time.Time `json:"created_at,omitempty"`
|
|
|
|
|
|
|
|
|
|
// Email User email address
|
|
|
|
|
Email openapi_types.Email `json:"email"`
|
|
|
|
|
|
|
|
|
|
// Enabled Whether the created user is enabled in Cognito
|
|
|
|
|
Enabled *bool `json:"enabled,omitempty"`
|
|
|
|
|
|
|
|
|
|
// FirstName Created user's given name
|
|
|
|
|
FirstName *string `json:"first_name,omitempty"`
|
|
|
|
|
|
|
|
|
|
// LastName Created user's family name
|
|
|
|
|
LastName *string `json:"last_name,omitempty"`
|
|
|
|
|
|
|
|
|
|
// PermitSynced Whether user was successfully created in Permit.io
|
|
|
|
|
PermitSynced bool `json:"permit_synced"`
|
|
|
|
|
|
|
|
|
|
// RolesAssigned Roles successfully assigned in Permit.io
|
|
|
|
|
RolesAssigned *[]string `json:"roles_assigned,omitempty"`
|
|
|
|
|
|
|
|
|
|
// Status Cognito user status
|
|
|
|
|
Status string `json:"status"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// AdminUserDeleteResponse Response for user deletion with status from each system (Cognito and Permit.io)
|
|
|
|
|
type AdminUserDeleteResponse struct {
|
|
|
|
|
// CognitoSubjectId Cognito subject identifier of the deleted user
|
|
|
|
|
CognitoSubjectId *string `json:"cognito_subject_id,omitempty"`
|
|
|
|
|
|
|
|
|
|
// DeletedFrom Deletion status from each system
|
|
|
|
|
DeletedFrom struct {
|
|
|
|
|
// Cognito Whether user was deleted from Cognito
|
|
|
|
|
Cognito bool `json:"cognito"`
|
|
|
|
|
|
|
|
|
|
// Permit Whether user was deleted from Permit.io
|
|
|
|
|
Permit bool `json:"permit"`
|
|
|
|
|
} `json:"deleted_from"`
|
|
|
|
|
|
|
|
|
|
// Email Email of the deleted user
|
|
|
|
|
Email openapi_types.Email `json:"email"`
|
|
|
|
|
|
|
|
|
|
// Success Whether the deletion succeeded
|
|
|
|
|
Success bool `json:"success"`
|
|
|
|
|
|
|
|
|
|
// Timestamp Timestamp of the deletion
|
|
|
|
|
Timestamp *time.Time `json:"timestamp,omitempty"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// AdminUserDetails Complete user information from Cognito and Permit.io including roles and timestamps
|
|
|
|
|
type AdminUserDetails struct {
|
|
|
|
|
// CognitoSubjectId User's Cognito unique subject identifier from authentication system
|
|
|
|
|
CognitoSubjectId string `json:"cognito_subject_id"`
|
|
|
|
|
|
|
|
|
|
// CreatedAt Timestamp when the user account was created
|
|
|
|
|
CreatedAt *time.Time `json:"created_at,omitempty"`
|
|
|
|
|
|
|
|
|
|
// Email Email address of the user account
|
|
|
|
|
Email openapi_types.Email `json:"email"`
|
|
|
|
|
|
|
|
|
|
// Enabled Current enabled status of the user in Cognito
|
|
|
|
|
Enabled bool `json:"enabled"`
|
|
|
|
|
|
|
|
|
|
// FirstName User's given name retrieved from Cognito
|
|
|
|
|
FirstName *string `json:"first_name,omitempty"`
|
|
|
|
|
|
|
|
|
|
// LastName User's family name retrieved from Cognito
|
|
|
|
|
LastName *string `json:"last_name,omitempty"`
|
|
|
|
|
|
|
|
|
|
// Roles Roles assigned in Permit.io
|
|
|
|
|
Roles *[]string `json:"roles,omitempty"`
|
|
|
|
|
|
|
|
|
|
// Status Current Cognito user account status
|
|
|
|
|
Status string `json:"status"`
|
|
|
|
|
|
|
|
|
|
// UpdatedAt Timestamp of last update
|
|
|
|
|
UpdatedAt *time.Time `json:"updated_at,omitempty"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// AdminUserList Paginated list of users with total count and pagination metadata
|
|
|
|
|
type AdminUserList struct {
|
|
|
|
|
// HasMore Whether more pages are available
|
|
|
|
|
HasMore *bool `json:"has_more,omitempty"`
|
|
|
|
|
|
|
|
|
|
// Page Current page number
|
|
|
|
|
Page int32 `json:"page"`
|
|
|
|
|
|
|
|
|
|
// PageSize Number of users per page
|
|
|
|
|
PageSize int32 `json:"page_size"`
|
|
|
|
|
|
|
|
|
|
// Total Total number of users matching filter
|
|
|
|
|
Total int32 `json:"total"`
|
|
|
|
|
|
|
|
|
|
// Users List of users for current page
|
|
|
|
|
Users []AdminUserDetails `json:"users"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// AdminUserUpdate Request body for updating user attributes (first name, last name, and roles)
|
|
|
|
|
type AdminUserUpdate struct {
|
|
|
|
|
// FirstName Updated given name for the user
|
|
|
|
|
FirstName *string `json:"first_name,omitempty"`
|
|
|
|
|
|
|
|
|
|
// LastName Updated family name for the user
|
|
|
|
|
LastName *string `json:"last_name,omitempty"`
|
|
|
|
|
|
|
|
|
|
// Roles Complete list of roles to assign (replaces existing roles)
|
|
|
|
|
Roles *[]string `json:"roles,omitempty"`
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-05 07:03:35 -07:00
|
|
|
// BatchID The batch upload id.
|
|
|
|
|
type BatchID = openapi_types.UUID
|
|
|
|
|
|
|
|
|
|
// BatchStatus The status of a batch upload
|
|
|
|
|
type BatchStatus string
|
|
|
|
|
|
|
|
|
|
// BatchUploadDetails defines model for BatchUploadDetails.
|
|
|
|
|
type BatchUploadDetails struct {
|
|
|
|
|
// BatchId The batch upload id.
|
|
|
|
|
BatchId BatchID `json:"batch_id"`
|
|
|
|
|
|
|
|
|
|
// ClientId The client external id
|
|
|
|
|
ClientId ClientID `json:"client_id"`
|
|
|
|
|
|
|
|
|
|
// CompletedAt When the batch upload completed processing
|
|
|
|
|
CompletedAt nullable.Nullable[time.Time] `json:"completed_at,omitempty"`
|
|
|
|
|
|
|
|
|
|
// CreatedAt When the batch upload was created
|
|
|
|
|
CreatedAt time.Time `json:"created_at"`
|
|
|
|
|
|
|
|
|
|
// FailedDocuments Number of documents that failed processing
|
|
|
|
|
FailedDocuments int32 `json:"failed_documents"`
|
|
|
|
|
|
|
|
|
|
// FailedFilenames List of filenames that failed processing
|
|
|
|
|
FailedFilenames *[]string `json:"failed_filenames,omitempty"`
|
|
|
|
|
|
|
|
|
|
// InvalidTypeDocuments Number of non-PDF files found in archive
|
|
|
|
|
InvalidTypeDocuments int32 `json:"invalid_type_documents"`
|
|
|
|
|
|
|
|
|
|
// OriginalFilename Original filename of the uploaded ZIP archive
|
|
|
|
|
OriginalFilename string `json:"original_filename"`
|
|
|
|
|
|
|
|
|
|
// ProcessedDocuments Number of documents processed so far
|
|
|
|
|
ProcessedDocuments int32 `json:"processed_documents"`
|
|
|
|
|
|
|
|
|
|
// ProgressPercent Processing progress percentage
|
|
|
|
|
ProgressPercent int32 `json:"progress_percent"`
|
|
|
|
|
|
|
|
|
|
// Status The status of a batch upload
|
|
|
|
|
Status BatchStatus `json:"status"`
|
|
|
|
|
|
|
|
|
|
// TotalDocuments Total number of documents in the batch
|
|
|
|
|
TotalDocuments int32 `json:"total_documents"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// BatchUploadList List of batch uploads for a client
|
|
|
|
|
type BatchUploadList struct {
|
|
|
|
|
Batches []BatchUploadSummary `json:"batches"`
|
|
|
|
|
|
|
|
|
|
// TotalCount Total number of batches for this client
|
|
|
|
|
TotalCount int32 `json:"total_count"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// BatchUploadResponse Response returned when a batch upload is accepted for processing
|
|
|
|
|
type BatchUploadResponse struct {
|
|
|
|
|
// BatchId The batch upload id.
|
|
|
|
|
BatchId BatchID `json:"batch_id"`
|
|
|
|
|
|
|
|
|
|
// Status The status of a batch upload
|
|
|
|
|
Status BatchStatus `json:"status"`
|
|
|
|
|
|
|
|
|
|
// StatusUrl URL to check batch status
|
|
|
|
|
StatusUrl string `json:"status_url"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// BatchUploadSummary Summary information about a batch upload
|
|
|
|
|
type BatchUploadSummary struct {
|
|
|
|
|
// BatchId The batch upload id.
|
|
|
|
|
BatchId BatchID `json:"batch_id"`
|
|
|
|
|
|
|
|
|
|
// ClientId The client external id
|
|
|
|
|
ClientId ClientID `json:"client_id"`
|
|
|
|
|
|
|
|
|
|
// CompletedAt When the batch upload completed processing
|
|
|
|
|
CompletedAt nullable.Nullable[time.Time] `json:"completed_at,omitempty"`
|
|
|
|
|
|
|
|
|
|
// CreatedAt When the batch upload was created
|
|
|
|
|
CreatedAt time.Time `json:"created_at"`
|
|
|
|
|
|
|
|
|
|
// FailedDocuments Number of documents that failed processing
|
|
|
|
|
FailedDocuments int32 `json:"failed_documents"`
|
|
|
|
|
|
|
|
|
|
// InvalidTypeDocuments Number of non-PDF files found in archive
|
|
|
|
|
InvalidTypeDocuments int32 `json:"invalid_type_documents"`
|
|
|
|
|
|
|
|
|
|
// OriginalFilename Original filename of the uploaded ZIP archive
|
|
|
|
|
OriginalFilename string `json:"original_filename"`
|
|
|
|
|
|
|
|
|
|
// ProcessedDocuments Number of documents processed so far
|
|
|
|
|
ProcessedDocuments int32 `json:"processed_documents"`
|
|
|
|
|
|
|
|
|
|
// ProgressPercent Processing progress percentage
|
|
|
|
|
ProgressPercent int32 `json:"progress_percent"`
|
|
|
|
|
|
|
|
|
|
// Status The status of a batch upload
|
|
|
|
|
Status BatchStatus `json:"status"`
|
|
|
|
|
|
|
|
|
|
// TotalDocuments Total number of documents in the batch
|
|
|
|
|
TotalDocuments int32 `json:"total_documents"`
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// ClientCanSync If the client is allowing active syncs
|
|
|
|
|
type ClientCanSync = bool
|
|
|
|
|
|
|
|
|
|
// ClientCreate The properties for creation.
|
2025-01-21 18:24:14 +00:00
|
|
|
type ClientCreate struct {
|
2025-03-11 16:31:06 +00:00
|
|
|
// Id The client external id
|
|
|
|
|
Id ClientID `json:"id"`
|
|
|
|
|
|
2025-01-21 18:24:14 +00:00
|
|
|
// Name The client name
|
2025-03-11 16:31:06 +00:00
|
|
|
Name ClientName `json:"name"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ClientID The client external id
|
|
|
|
|
type ClientID = string
|
|
|
|
|
|
|
|
|
|
// ClientIDBody The client id.
|
|
|
|
|
type ClientIDBody struct {
|
|
|
|
|
// Id The client external id
|
|
|
|
|
Id ClientID `json:"id"`
|
2025-01-21 18:24:14 +00:00
|
|
|
}
|
|
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// ClientName The client name
|
|
|
|
|
type ClientName = string
|
|
|
|
|
|
2025-03-10 11:03:00 +00:00
|
|
|
// ClientStatus Specifies the status of a client.
|
|
|
|
|
type ClientStatus string
|
|
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// ClientStatusBody A client status information object.
|
2025-03-10 11:03:00 +00:00
|
|
|
type ClientStatusBody struct {
|
|
|
|
|
// Status Specifies the status of a client.
|
|
|
|
|
Status ClientStatus `json:"status"`
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// ClientUpdate The properties that may be updated.
|
2025-01-21 18:24:14 +00:00
|
|
|
type ClientUpdate struct {
|
|
|
|
|
// CanSync If the client is allowing active syncs
|
2025-03-11 16:31:06 +00:00
|
|
|
CanSync *ClientCanSync `json:"can_sync,omitempty"`
|
2025-01-21 18:24:14 +00:00
|
|
|
|
|
|
|
|
// Name The client name
|
2025-03-11 16:31:06 +00:00
|
|
|
Name *ClientName `json:"name,omitempty"`
|
2025-01-21 18:24:14 +00:00
|
|
|
}
|
|
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// CodeVersion The desired code version.
|
2025-03-11 18:15:49 +00:00
|
|
|
type CodeVersion = int64
|
2025-03-11 16:31:06 +00:00
|
|
|
|
2025-03-10 11:03:00 +00:00
|
|
|
// Collector Collector model.
|
|
|
|
|
type Collector struct {
|
2025-03-11 16:31:06 +00:00
|
|
|
// ActiveVersion The desired version.
|
|
|
|
|
ActiveVersion Version `json:"active_version"`
|
2025-03-10 11:03:00 +00:00
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// ClientId The client external id
|
|
|
|
|
ClientId ClientID `json:"client_id"`
|
2025-03-10 11:03:00 +00:00
|
|
|
|
|
|
|
|
// Fields The fields in the collector.
|
2025-03-11 16:31:06 +00:00
|
|
|
Fields CollectorFields `json:"fields"`
|
2025-03-10 11:03:00 +00:00
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// LatestVersion The desired version.
|
|
|
|
|
LatestVersion Version `json:"latest_version"`
|
2025-03-10 11:03:00 +00:00
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// MinimumCleanerVersion The desired code version.
|
|
|
|
|
MinimumCleanerVersion CodeVersion `json:"minimum_cleaner_version"`
|
2025-03-10 11:03:00 +00:00
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// MinimumTextVersion The desired code version.
|
|
|
|
|
MinimumTextVersion CodeVersion `json:"minimum_text_version"`
|
2025-03-10 11:03:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// CollectorField The field properties for the collector.
|
|
|
|
|
type CollectorField struct {
|
|
|
|
|
// Name The output field name.
|
2025-03-11 16:31:06 +00:00
|
|
|
Name CollectorFieldName `json:"name"`
|
2025-03-10 11:03:00 +00:00
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// QueryId The query id.
|
|
|
|
|
QueryId QueryID `json:"query_id"`
|
2025-03-10 11:03:00 +00:00
|
|
|
}
|
|
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// CollectorFieldName The output field name.
|
|
|
|
|
type CollectorFieldName = string
|
|
|
|
|
|
|
|
|
|
// CollectorFields The fields in the collector.
|
|
|
|
|
type CollectorFields = []CollectorField
|
|
|
|
|
|
2025-03-10 13:00:57 +00:00
|
|
|
// CollectorSet Payload for updating a Collector.
|
|
|
|
|
type CollectorSet struct {
|
2025-03-11 16:31:06 +00:00
|
|
|
// ActiveVersion The desired version.
|
|
|
|
|
ActiveVersion *Version `json:"active_version,omitempty"`
|
2025-03-10 11:03:00 +00:00
|
|
|
|
|
|
|
|
// Fields The fields in the collector.
|
2025-03-11 16:31:06 +00:00
|
|
|
Fields *CollectorFields `json:"fields,omitempty"`
|
2025-03-10 11:03:00 +00:00
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// MinimumCleanerVersion The desired code version.
|
|
|
|
|
MinimumCleanerVersion *CodeVersion `json:"minimum_cleaner_version,omitempty"`
|
2025-03-10 11:03:00 +00:00
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// MinimumTextVersion The desired code version.
|
|
|
|
|
MinimumTextVersion *CodeVersion `json:"minimum_text_version,omitempty"`
|
2025-03-10 11:03:00 +00:00
|
|
|
}
|
|
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// DocClient The properties of a client.
|
2025-03-10 11:03:00 +00:00
|
|
|
type DocClient struct {
|
|
|
|
|
// CanSync If the client is allowing active syncs
|
2025-03-11 16:31:06 +00:00
|
|
|
CanSync ClientCanSync `json:"can_sync"`
|
2025-03-10 11:03:00 +00:00
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// Id The client external id
|
|
|
|
|
Id ClientID `json:"id"`
|
2025-03-10 11:03:00 +00:00
|
|
|
|
|
|
|
|
// Name The client name
|
2025-03-11 16:31:06 +00:00
|
|
|
Name ClientName `json:"name"`
|
2025-03-10 11:03:00 +00:00
|
|
|
}
|
|
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// Document The document properties.
|
2025-02-21 17:05:37 +00:00
|
|
|
type Document struct {
|
2025-03-17 18:14:15 +00:00
|
|
|
// ClientId The client external id
|
|
|
|
|
ClientId ClientID `json:"client_id"`
|
|
|
|
|
|
|
|
|
|
// Fields The fields and the value for the document
|
|
|
|
|
Fields map[string]interface{} `json:"fields"`
|
|
|
|
|
|
|
|
|
|
// Hash The document hash
|
|
|
|
|
Hash Hash `json:"hash"`
|
2025-02-21 17:05:37 +00:00
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// Id The document id.
|
|
|
|
|
Id DocumentID `json:"id"`
|
2025-02-21 17:05:37 +00:00
|
|
|
}
|
|
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// DocumentID The document id.
|
|
|
|
|
type DocumentID = openapi_types.UUID
|
|
|
|
|
|
2025-03-18 13:06:42 +00:00
|
|
|
// DocumentSummary The document summary properties.
|
2025-03-17 18:14:15 +00:00
|
|
|
type DocumentSummary struct {
|
|
|
|
|
// Hash The document hash
|
|
|
|
|
Hash Hash `json:"hash"`
|
|
|
|
|
|
|
|
|
|
// Id The document id.
|
|
|
|
|
Id DocumentID `json:"id"`
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-18 13:06:42 +00:00
|
|
|
// ErrorMessage Description of error
|
|
|
|
|
type ErrorMessage struct {
|
|
|
|
|
// Message Message describing the cause.
|
|
|
|
|
Message string `json:"message"`
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-16 13:49:07 +00:00
|
|
|
// ExportDetails Payload for export trigger response.
|
|
|
|
|
type ExportDetails struct {
|
2025-03-11 16:31:06 +00:00
|
|
|
// ClientId The client external id
|
|
|
|
|
ClientId ClientID `json:"client_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"`
|
|
|
|
|
|
2025-03-10 11:03:00 +00:00
|
|
|
// Status The possible export states.
|
2025-01-16 13:49:07 +00:00
|
|
|
Status ExportStatus `json:"status"`
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// ExportID The export id.
|
|
|
|
|
type ExportID = openapi_types.UUID
|
|
|
|
|
|
2025-03-10 11:03:00 +00:00
|
|
|
// ExportStatus The possible export states.
|
2025-01-16 13:49:07 +00:00
|
|
|
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.
|
2025-03-12 00:59:58 +00:00
|
|
|
EndDate *time.Time `json:"end_date,omitempty"`
|
2025-01-16 13:49:07 +00:00
|
|
|
|
|
|
|
|
// StartDate This first date of ingestion.
|
2025-03-12 00:59:58 +00:00
|
|
|
StartDate *time.Time `json:"start_date,omitempty"`
|
2025-01-16 13:49:07 +00:00
|
|
|
} `json:"ingestion_filters,omitempty"`
|
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"`
|
|
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// FieldName The output field name.
|
|
|
|
|
FieldName CollectorFieldName `json:"field_name"`
|
2025-01-16 13:49:07 +00:00
|
|
|
|
|
|
|
|
// Values The values useful to the filter.
|
|
|
|
|
Values []string `json:"values"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// FieldFilterCondition The possible field filtering conditions.
|
|
|
|
|
type FieldFilterCondition string
|
|
|
|
|
|
2025-03-17 18:14:15 +00:00
|
|
|
// Hash The document hash
|
|
|
|
|
type Hash = string
|
|
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// IdMessage A single uuid.
|
2025-01-15 19:45:51 +00:00
|
|
|
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"`
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-10 11:03:00 +00:00
|
|
|
// ListDocuments The documents in the client.
|
2025-03-17 18:14:15 +00:00
|
|
|
type ListDocuments = []DocumentSummary
|
2025-02-21 17:05:37 +00:00
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// ListQueries A set of queries.
|
2025-01-15 19:45:51 +00:00
|
|
|
type ListQueries struct {
|
|
|
|
|
// Queries List of queries.
|
|
|
|
|
Queries []Query `json:"queries"`
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// Query A logic unit of execution.
|
2025-01-15 19:45:51 +00:00
|
|
|
type Query struct {
|
2025-03-11 16:31:06 +00:00
|
|
|
// ActiveVersion The desired version.
|
|
|
|
|
ActiveVersion Version `json:"active_version"`
|
2025-01-15 19:45:51 +00:00
|
|
|
|
|
|
|
|
// Config Configuration for the query.
|
2025-03-11 16:31:06 +00:00
|
|
|
Config *QueryConfig `json:"config,omitempty"`
|
2025-01-15 19:45:51 +00:00
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// Id The query id.
|
|
|
|
|
Id QueryID `json:"id"`
|
2025-01-15 19:45:51 +00:00
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// LatestVersion The desired version.
|
|
|
|
|
LatestVersion Version `json:"latest_version"`
|
2025-01-15 19:45:51 +00:00
|
|
|
|
|
|
|
|
// RequiredQueries List of required query IDs.
|
2025-03-11 16:31:06 +00:00
|
|
|
RequiredQueries *RequiredQueryIDs `json:"required_queries,omitempty"`
|
2025-01-15 19:45:51 +00:00
|
|
|
|
|
|
|
|
// Type Specifies the type of the query.
|
|
|
|
|
Type QueryType `json:"type"`
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// QueryConfig Configuration for the query.
|
|
|
|
|
type QueryConfig = string
|
|
|
|
|
|
|
|
|
|
// QueryCreate The parameters required to create a query.
|
2025-01-15 19:45:51 +00:00
|
|
|
type QueryCreate struct {
|
2025-03-11 16:31:06 +00:00
|
|
|
// Config Configuration for the query.
|
|
|
|
|
Config *QueryConfig `json:"config,omitempty"`
|
2025-01-15 19:45:51 +00:00
|
|
|
|
|
|
|
|
// RequiredQueries List of required query IDs.
|
2025-03-11 16:31:06 +00:00
|
|
|
RequiredQueries *RequiredQueryIDs `json:"required_queries,omitempty"`
|
2025-01-15 19:45:51 +00:00
|
|
|
|
|
|
|
|
// Type Specifies the type of the query.
|
|
|
|
|
Type QueryType `json:"type"`
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// QueryID The query id.
|
|
|
|
|
type QueryID = openapi_types.UUID
|
|
|
|
|
|
|
|
|
|
// QueryTestRequest The properties for a query test request.
|
2025-01-15 19:45:51 +00:00
|
|
|
type QueryTestRequest struct {
|
2025-03-11 16:31:06 +00:00
|
|
|
// DocumentId The document id.
|
|
|
|
|
DocumentId DocumentID `json:"document_id"`
|
2025-01-15 19:45:51 +00:00
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// QueryVersion The desired version.
|
|
|
|
|
QueryVersion Version `json:"query_version"`
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// QueryTestResponse The response from a query test.
|
2025-01-15 19:45:51 +00:00
|
|
|
type QueryTestResponse struct {
|
|
|
|
|
// Value Result of the query test.
|
|
|
|
|
Value string `json:"value"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// QueryType Specifies the type of the query.
|
|
|
|
|
type QueryType string
|
|
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// QueryUpdate The properties that may be updated for a query.
|
2025-01-15 19:45:51 +00:00
|
|
|
type QueryUpdate struct {
|
2025-03-11 16:31:06 +00:00
|
|
|
// ActiveVersion The desired version.
|
|
|
|
|
ActiveVersion *Version `json:"active_version,omitempty"`
|
2025-01-15 19:45:51 +00:00
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// Config Configuration for the query.
|
|
|
|
|
Config *QueryConfig `json:"config,omitempty"`
|
2025-01-15 19:45:51 +00:00
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// RequiredQueries List of required query IDs.
|
|
|
|
|
RequiredQueries *RequiredQueryIDs `json:"required_queries,omitempty"`
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// RequiredQueryIDs List of required query IDs.
|
|
|
|
|
type RequiredQueryIDs = []QueryID
|
|
|
|
|
|
|
|
|
|
// Version The desired version.
|
|
|
|
|
type Version = int32
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// UserEmail defines model for UserEmail.
|
|
|
|
|
type UserEmail = openapi_types.Email
|
|
|
|
|
|
|
|
|
|
// BadGateway Description of error
|
|
|
|
|
type BadGateway = ErrorMessage
|
|
|
|
|
|
|
|
|
|
// Conflict Description of error
|
|
|
|
|
type Conflict = ErrorMessage
|
|
|
|
|
|
|
|
|
|
// Forbidden Description of error
|
|
|
|
|
type Forbidden = ErrorMessage
|
|
|
|
|
|
2025-03-18 13:06:42 +00:00
|
|
|
// InternalError Description of error
|
|
|
|
|
type InternalError = ErrorMessage
|
|
|
|
|
|
|
|
|
|
// InvalidRequest Description of error
|
|
|
|
|
type InvalidRequest = ErrorMessage
|
|
|
|
|
|
2025-08-05 07:03:35 -07:00
|
|
|
// NotFound Description of error
|
|
|
|
|
type NotFound = ErrorMessage
|
|
|
|
|
|
2025-03-18 13:06:42 +00:00
|
|
|
// TooManyRequests Description of error
|
|
|
|
|
type TooManyRequests = ErrorMessage
|
|
|
|
|
|
|
|
|
|
// Unauthorized Description of error
|
|
|
|
|
type Unauthorized = ErrorMessage
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// ListAdminUsersParams defines parameters for ListAdminUsers.
|
|
|
|
|
type ListAdminUsersParams struct {
|
|
|
|
|
// Page Page number for pagination
|
|
|
|
|
Page *int32 `form:"page,omitempty" json:"page,omitempty"`
|
|
|
|
|
|
|
|
|
|
// PageSize Number of results per page
|
|
|
|
|
PageSize *int32 `form:"page_size,omitempty" json:"page_size,omitempty"`
|
|
|
|
|
|
|
|
|
|
// Search Search term for email/name filtering
|
|
|
|
|
Search *string `form:"search,omitempty" json:"search,omitempty"`
|
|
|
|
|
|
|
|
|
|
// Status Filter by user status
|
|
|
|
|
Status *ListAdminUsersParamsStatus `form:"status,omitempty" json:"status,omitempty"`
|
|
|
|
|
|
|
|
|
|
// SortBy Field to sort by
|
|
|
|
|
SortBy *ListAdminUsersParamsSortBy `form:"sort_by,omitempty" json:"sort_by,omitempty"`
|
|
|
|
|
|
|
|
|
|
// SortOrder Sort direction
|
|
|
|
|
SortOrder *ListAdminUsersParamsSortOrder `form:"sort_order,omitempty" json:"sort_order,omitempty"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ListAdminUsersParamsStatus defines parameters for ListAdminUsers.
|
|
|
|
|
type ListAdminUsersParamsStatus string
|
|
|
|
|
|
|
|
|
|
// ListAdminUsersParamsSortBy defines parameters for ListAdminUsers.
|
|
|
|
|
type ListAdminUsersParamsSortBy string
|
|
|
|
|
|
|
|
|
|
// ListAdminUsersParamsSortOrder defines parameters for ListAdminUsers.
|
|
|
|
|
type ListAdminUsersParamsSortOrder string
|
|
|
|
|
|
|
|
|
|
// DeleteAdminUserParams defines parameters for DeleteAdminUser.
|
|
|
|
|
type DeleteAdminUserParams struct {
|
|
|
|
|
// Confirm Must be set to true to confirm deletion
|
|
|
|
|
Confirm bool `form:"confirm" json:"confirm"`
|
|
|
|
|
}
|
|
|
|
|
|
2025-05-27 15:28:46 +00:00
|
|
|
// UploadDocumentMultipartBody defines parameters for UploadDocument.
|
|
|
|
|
type UploadDocumentMultipartBody struct {
|
|
|
|
|
// File The file to upload
|
|
|
|
|
File openapi_types.File `json:"file"`
|
|
|
|
|
|
|
|
|
|
// Filename Optional custom filename
|
|
|
|
|
Filename *string `json:"filename,omitempty"`
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-05 07:03:35 -07:00
|
|
|
// ListDocumentBatchesParams defines parameters for ListDocumentBatches.
|
|
|
|
|
type ListDocumentBatchesParams struct {
|
|
|
|
|
// Limit Maximum number of items to return
|
|
|
|
|
Limit *int32 `form:"limit,omitempty" json:"limit,omitempty"`
|
|
|
|
|
|
|
|
|
|
// Offset Number of items to skip
|
|
|
|
|
Offset *int32 `form:"offset,omitempty" json:"offset,omitempty"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// UploadDocumentBatchMultipartBody defines parameters for UploadDocumentBatch.
|
|
|
|
|
type UploadDocumentBatchMultipartBody struct {
|
|
|
|
|
// Archive The file to be uploaded as a ZIP archive
|
|
|
|
|
Archive openapi_types.File `json:"archive"`
|
|
|
|
|
}
|
|
|
|
|
|
2025-04-07 14:10:39 -07:00
|
|
|
// LoginCallbackParams defines parameters for LoginCallback.
|
|
|
|
|
type LoginCallbackParams struct {
|
|
|
|
|
// Code Authorization code from Cognito
|
|
|
|
|
Code string `form:"code" json:"code"`
|
|
|
|
|
|
|
|
|
|
// State State parameter for CSRF protection
|
|
|
|
|
State string `form:"state" json:"state"`
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// CreateAdminUserJSONRequestBody defines body for CreateAdminUser for application/json ContentType.
|
|
|
|
|
type CreateAdminUserJSONRequestBody = AdminUserCreate
|
|
|
|
|
|
|
|
|
|
// UpdateAdminUserJSONRequestBody defines body for UpdateAdminUser for application/json ContentType.
|
|
|
|
|
type UpdateAdminUserJSONRequestBody = AdminUserUpdate
|
|
|
|
|
|
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-03-10 13:00:57 +00:00
|
|
|
// SetCollectorByClientIdJSONRequestBody defines body for SetCollectorByClientId for application/json ContentType.
|
|
|
|
|
type SetCollectorByClientIdJSONRequestBody = CollectorSet
|
2025-01-15 19:45:51 +00:00
|
|
|
|
2025-05-27 15:28:46 +00:00
|
|
|
// UploadDocumentMultipartRequestBody defines body for UploadDocument for multipart/form-data ContentType.
|
|
|
|
|
type UploadDocumentMultipartRequestBody UploadDocumentMultipartBody
|
|
|
|
|
|
2025-08-05 07:03:35 -07:00
|
|
|
// UploadDocumentBatchMultipartRequestBody defines body for UploadDocumentBatch for multipart/form-data ContentType.
|
|
|
|
|
type UploadDocumentBatchMultipartRequestBody UploadDocumentBatchMultipartBody
|
|
|
|
|
|
2025-03-05 19:37:06 +00:00
|
|
|
// TriggerExportJSONRequestBody defines body for TriggerExport for application/json ContentType.
|
|
|
|
|
type TriggerExportJSONRequestBody = ExportTrigger
|
|
|
|
|
|
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-10-23 22:57:15 +00:00
|
|
|
// ListAdminUsers request
|
|
|
|
|
ListAdminUsers(ctx context.Context, params *ListAdminUsersParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
|
|
|
|
// CreateAdminUserWithBody request with any body
|
|
|
|
|
CreateAdminUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
|
|
|
|
CreateAdminUser(ctx context.Context, body CreateAdminUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
|
|
|
|
// DeleteAdminUser request
|
|
|
|
|
DeleteAdminUser(ctx context.Context, email UserEmail, params *DeleteAdminUserParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
|
|
|
|
// GetAdminUser request
|
|
|
|
|
GetAdminUser(ctx context.Context, email UserEmail, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
|
|
|
|
// CheckAdminUserExists request
|
|
|
|
|
CheckAdminUserExists(ctx context.Context, email UserEmail, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
|
|
|
|
// UpdateAdminUserWithBody request with any body
|
|
|
|
|
UpdateAdminUserWithBody(ctx context.Context, email UserEmail, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
|
|
|
|
UpdateAdminUser(ctx context.Context, email UserEmail, body UpdateAdminUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
|
|
|
|
// DisableAdminUser request
|
|
|
|
|
DisableAdminUser(ctx context.Context, email UserEmail, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
|
|
|
|
// EnableAdminUser request
|
|
|
|
|
EnableAdminUser(ctx context.Context, email UserEmail, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
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-03-11 16:31:06 +00:00
|
|
|
GetClient(ctx context.Context, id ClientID, reqEditors ...RequestEditorFn) (*http.Response, error)
|
2025-01-21 18:24:14 +00:00
|
|
|
|
|
|
|
|
// UpdateClientWithBody request with any body
|
2025-03-11 16:31:06 +00:00
|
|
|
UpdateClientWithBody(ctx context.Context, id ClientID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
2025-01-24 14:52:56 +00:00
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
UpdateClient(ctx context.Context, id ClientID, body UpdateClientJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
2025-01-21 18:24:14 +00:00
|
|
|
|
2025-03-10 11:03:00 +00:00
|
|
|
// GetCollectorByClientId request
|
2025-03-11 16:31:06 +00:00
|
|
|
GetCollectorByClientId(ctx context.Context, id ClientID, reqEditors ...RequestEditorFn) (*http.Response, error)
|
2025-01-24 14:52:56 +00:00
|
|
|
|
2025-03-10 13:00:57 +00:00
|
|
|
// SetCollectorByClientIdWithBody request with any body
|
2025-03-11 16:31:06 +00:00
|
|
|
SetCollectorByClientIdWithBody(ctx context.Context, id ClientID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
2025-01-24 14:52:56 +00:00
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
SetCollectorByClientId(ctx context.Context, id ClientID, body SetCollectorByClientIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
2025-01-16 13:49:07 +00:00
|
|
|
|
2025-03-10 11:03:00 +00:00
|
|
|
// ListDocumentsByClientId request
|
2025-03-11 16:31:06 +00:00
|
|
|
ListDocumentsByClientId(ctx context.Context, id ClientID, reqEditors ...RequestEditorFn) (*http.Response, error)
|
2025-02-03 17:45:00 +00:00
|
|
|
|
2025-05-27 15:28:46 +00:00
|
|
|
// UploadDocumentWithBody request with any body
|
|
|
|
|
UploadDocumentWithBody(ctx context.Context, id ClientID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
2025-08-05 07:03:35 -07:00
|
|
|
// ListDocumentBatches request
|
|
|
|
|
ListDocumentBatches(ctx context.Context, id ClientID, params *ListDocumentBatchesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
|
|
|
|
// UploadDocumentBatchWithBody request with any body
|
|
|
|
|
UploadDocumentBatchWithBody(ctx context.Context, id ClientID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
|
|
|
|
// CancelDocumentBatch request
|
|
|
|
|
CancelDocumentBatch(ctx context.Context, id ClientID, batchId BatchID, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
|
|
|
|
// GetDocumentBatch request
|
|
|
|
|
GetDocumentBatch(ctx context.Context, id ClientID, batchId BatchID, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
2025-03-05 19:37:06 +00:00
|
|
|
// TriggerExportWithBody request with any body
|
2025-03-11 16:31:06 +00:00
|
|
|
TriggerExportWithBody(ctx context.Context, id ClientID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
2025-03-05 19:37:06 +00:00
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
TriggerExport(ctx context.Context, id ClientID, body TriggerExportJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
2025-03-05 19:37:06 +00:00
|
|
|
|
2025-03-10 11:03:00 +00:00
|
|
|
// GetStatusByClientId request
|
2025-03-11 16:31:06 +00:00
|
|
|
GetStatusByClientId(ctx context.Context, id ClientID, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
2025-03-17 18:14:15 +00:00
|
|
|
// GetDocument request
|
|
|
|
|
GetDocument(ctx context.Context, id DocumentID, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// ExportState request
|
|
|
|
|
ExportState(ctx context.Context, id ExportID, reqEditors ...RequestEditorFn) (*http.Response, error)
|
2025-03-04 16:20:54 +00:00
|
|
|
|
2025-04-07 14:10:39 -07:00
|
|
|
// GetHomePage request
|
|
|
|
|
GetHomePage(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
|
|
|
|
// Login request
|
|
|
|
|
Login(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
|
|
|
|
// LoginCallback request
|
|
|
|
|
LoginCallback(ctx context.Context, params *LoginCallbackParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
|
|
|
|
|
|
// Logout request
|
|
|
|
|
Logout(ctx context.Context, 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-03-11 16:31:06 +00:00
|
|
|
GetQuery(ctx context.Context, id QueryID, reqEditors ...RequestEditorFn) (*http.Response, error)
|
2025-01-15 19:45:51 +00:00
|
|
|
|
|
|
|
|
// UpdateQueryWithBody request with any body
|
2025-03-11 16:31:06 +00:00
|
|
|
UpdateQueryWithBody(ctx context.Context, id QueryID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
2025-01-15 19:45:51 +00:00
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
UpdateQuery(ctx context.Context, id QueryID, body UpdateQueryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
2025-01-15 19:45:51 +00:00
|
|
|
|
|
|
|
|
// TestQueryWithBody request with any body
|
2025-03-11 16:31:06 +00:00
|
|
|
TestQueryWithBody(ctx context.Context, id QueryID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
2025-01-15 19:45:51 +00:00
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
TestQuery(ctx context.Context, id QueryID, body TestQueryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
func (c *Client) ListAdminUsers(ctx context.Context, params *ListAdminUsersParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewListAdminUsersRequest(c.Server, params)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
req = req.WithContext(ctx)
|
|
|
|
|
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return c.Client.Do(req)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *Client) CreateAdminUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewCreateAdminUserRequestWithBody(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) CreateAdminUser(ctx context.Context, body CreateAdminUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewCreateAdminUserRequest(c.Server, body)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
req = req.WithContext(ctx)
|
|
|
|
|
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return c.Client.Do(req)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *Client) DeleteAdminUser(ctx context.Context, email UserEmail, params *DeleteAdminUserParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewDeleteAdminUserRequest(c.Server, email, params)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
req = req.WithContext(ctx)
|
|
|
|
|
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return c.Client.Do(req)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *Client) GetAdminUser(ctx context.Context, email UserEmail, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewGetAdminUserRequest(c.Server, email)
|
|
|
|
|
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) CheckAdminUserExists(ctx context.Context, email UserEmail, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewCheckAdminUserExistsRequest(c.Server, email)
|
|
|
|
|
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) UpdateAdminUserWithBody(ctx context.Context, email UserEmail, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewUpdateAdminUserRequestWithBody(c.Server, email, 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) UpdateAdminUser(ctx context.Context, email UserEmail, body UpdateAdminUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewUpdateAdminUserRequest(c.Server, email, 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) DisableAdminUser(ctx context.Context, email UserEmail, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewDisableAdminUserRequest(c.Server, email)
|
|
|
|
|
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) EnableAdminUser(ctx context.Context, email UserEmail, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewEnableAdminUserRequest(c.Server, email)
|
|
|
|
|
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
|
|
|
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-03-11 16:31:06 +00:00
|
|
|
func (c *Client) GetClient(ctx context.Context, id ClientID, 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-03-11 16:31:06 +00:00
|
|
|
func (c *Client) UpdateClientWithBody(ctx context.Context, id ClientID, 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-03-11 16:31:06 +00:00
|
|
|
func (c *Client) UpdateClient(ctx context.Context, id ClientID, 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-03-11 16:31:06 +00:00
|
|
|
func (c *Client) GetCollectorByClientId(ctx context.Context, id ClientID, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
2025-03-10 11:03:00 +00:00
|
|
|
req, err := NewGetCollectorByClientIdRequest(c.Server, id)
|
2025-01-24 14:52:56 +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-03-11 16:31:06 +00:00
|
|
|
func (c *Client) SetCollectorByClientIdWithBody(ctx context.Context, id ClientID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
2025-03-10 13:00:57 +00:00
|
|
|
req, err := NewSetCollectorByClientIdRequestWithBody(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-03-11 16:31:06 +00:00
|
|
|
func (c *Client) SetCollectorByClientId(ctx context.Context, id ClientID, body SetCollectorByClientIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
2025-03-10 13:00:57 +00:00
|
|
|
req, err := NewSetCollectorByClientIdRequest(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-03-11 16:31:06 +00:00
|
|
|
func (c *Client) ListDocumentsByClientId(ctx context.Context, id ClientID, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
2025-03-10 11:03:00 +00:00
|
|
|
req, err := NewListDocumentsByClientIdRequest(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-05-27 15:28:46 +00:00
|
|
|
func (c *Client) UploadDocumentWithBody(ctx context.Context, id ClientID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewUploadDocumentRequestWithBody(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-08-05 07:03:35 -07:00
|
|
|
func (c *Client) ListDocumentBatches(ctx context.Context, id ClientID, params *ListDocumentBatchesParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewListDocumentBatchesRequest(c.Server, id, params)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
req = req.WithContext(ctx)
|
|
|
|
|
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return c.Client.Do(req)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *Client) UploadDocumentBatchWithBody(ctx context.Context, id ClientID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewUploadDocumentBatchRequestWithBody(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) CancelDocumentBatch(ctx context.Context, id ClientID, batchId BatchID, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewCancelDocumentBatchRequest(c.Server, id, batchId)
|
|
|
|
|
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) GetDocumentBatch(ctx context.Context, id ClientID, batchId BatchID, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewGetDocumentBatchRequest(c.Server, id, batchId)
|
|
|
|
|
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-11 16:31:06 +00:00
|
|
|
func (c *Client) TriggerExportWithBody(ctx context.Context, id ClientID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewTriggerExportRequestWithBody(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-03-11 16:31:06 +00:00
|
|
|
func (c *Client) TriggerExport(ctx context.Context, id ClientID, body TriggerExportJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewTriggerExportRequest(c.Server, id, body)
|
2025-02-21 17:05:37 +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-03-11 16:31:06 +00:00
|
|
|
func (c *Client) GetStatusByClientId(ctx context.Context, id ClientID, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewGetStatusByClientIdRequest(c.Server, id)
|
2025-02-03 17:45:00 +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-03-17 18:14:15 +00:00
|
|
|
func (c *Client) GetDocument(ctx context.Context, id DocumentID, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewGetDocumentRequest(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-11 16:31:06 +00:00
|
|
|
func (c *Client) ExportState(ctx context.Context, id ExportID, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewExportStateRequest(c.Server, id)
|
2025-03-04 16:20:54 +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-04-07 14:10:39 -07:00
|
|
|
func (c *Client) GetHomePage(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewGetHomePageRequest(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) Login(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewLoginRequest(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) LoginCallback(ctx context.Context, params *LoginCallbackParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewLoginCallbackRequest(c.Server, params)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
req = req.WithContext(ctx)
|
|
|
|
|
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return c.Client.Do(req)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *Client) Logout(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
|
|
|
req, err := NewLogoutRequest(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)
|
|
|
|
|
}
|
|
|
|
|
|
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-03-11 16:31:06 +00:00
|
|
|
func (c *Client) GetQuery(ctx context.Context, id QueryID, 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-03-11 16:31:06 +00:00
|
|
|
func (c *Client) UpdateQueryWithBody(ctx context.Context, id QueryID, 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-03-11 16:31:06 +00:00
|
|
|
func (c *Client) UpdateQuery(ctx context.Context, id QueryID, 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-03-11 16:31:06 +00:00
|
|
|
func (c *Client) TestQueryWithBody(ctx context.Context, id QueryID, 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-03-11 16:31:06 +00:00
|
|
|
func (c *Client) TestQuery(ctx context.Context, id QueryID, 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-10-23 22:57:15 +00:00
|
|
|
// NewListAdminUsersRequest generates requests for ListAdminUsers
|
|
|
|
|
func NewListAdminUsersRequest(server string, params *ListAdminUsersParams) (*http.Request, error) {
|
2025-01-21 18:24:14 +00:00
|
|
|
var err error
|
|
|
|
|
|
|
|
|
|
serverURL, err := url.Parse(server)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
operationPath := fmt.Sprintf("/admin/users")
|
2025-01-21 18:24:14 +00:00
|
|
|
if operationPath[0] == '/' {
|
|
|
|
|
operationPath = "." + operationPath
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
if params != nil {
|
|
|
|
|
queryValues := queryURL.Query()
|
2025-01-21 18:24:14 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
if params.Page != nil {
|
2025-01-21 18:24:14 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
} else {
|
|
|
|
|
for k, v := range parsed {
|
|
|
|
|
for _, v2 := range v {
|
|
|
|
|
queryValues.Add(k, v2)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-01-21 18:24:14 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
}
|
2025-01-21 18:24:14 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
if params.PageSize != nil {
|
2025-01-21 18:24:14 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page_size", runtime.ParamLocationQuery, *params.PageSize); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
} else {
|
|
|
|
|
for k, v := range parsed {
|
|
|
|
|
for _, v2 := range v {
|
|
|
|
|
queryValues.Add(k, v2)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-01-21 18:24:14 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
}
|
2025-01-21 18:24:14 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
if params.Search != nil {
|
2025-01-21 18:24:14 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
} else {
|
|
|
|
|
for k, v := range parsed {
|
|
|
|
|
for _, v2 := range v {
|
|
|
|
|
queryValues.Add(k, v2)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if params.Status != nil {
|
|
|
|
|
|
|
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status", runtime.ParamLocationQuery, *params.Status); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
} else {
|
|
|
|
|
for k, v := range parsed {
|
|
|
|
|
for _, v2 := range v {
|
|
|
|
|
queryValues.Add(k, v2)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if params.SortBy != nil {
|
|
|
|
|
|
|
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort_by", runtime.ParamLocationQuery, *params.SortBy); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
} else {
|
|
|
|
|
for k, v := range parsed {
|
|
|
|
|
for _, v2 := range v {
|
|
|
|
|
queryValues.Add(k, v2)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if params.SortOrder != nil {
|
|
|
|
|
|
|
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort_order", runtime.ParamLocationQuery, *params.SortOrder); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
} else {
|
|
|
|
|
for k, v := range parsed {
|
|
|
|
|
for _, v2 := range v {
|
|
|
|
|
queryValues.Add(k, v2)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
queryURL.RawQuery = queryValues.Encode()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
2025-01-21 18:24:14 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return req, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// NewCreateAdminUserRequest calls the generic CreateAdminUser builder with application/json body
|
|
|
|
|
func NewCreateAdminUserRequest(server string, body CreateAdminUserJSONRequestBody) (*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)
|
2025-10-23 22:57:15 +00:00
|
|
|
return NewCreateAdminUserRequestWithBody(server, "application/json", bodyReader)
|
2025-01-21 18:24:14 +00:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// NewCreateAdminUserRequestWithBody generates requests for CreateAdminUser with any type of body
|
|
|
|
|
func NewCreateAdminUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
2025-01-21 18:24:14 +00:00
|
|
|
var err error
|
|
|
|
|
|
|
|
|
|
serverURL, err := url.Parse(server)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
operationPath := fmt.Sprintf("/admin/users")
|
2025-01-21 18:24:14 +00:00
|
|
|
if operationPath[0] == '/' {
|
|
|
|
|
operationPath = "." + operationPath
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
req, err := http.NewRequest("POST", queryURL.String(), body)
|
2025-01-21 18:24:14 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
|
|
|
|
|
|
return req, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// NewDeleteAdminUserRequest generates requests for DeleteAdminUser
|
|
|
|
|
func NewDeleteAdminUserRequest(server string, email UserEmail, params *DeleteAdminUserParams) (*http.Request, error) {
|
2025-01-15 19:45:51 +00:00
|
|
|
var err error
|
|
|
|
|
|
|
|
|
|
var pathParam0 string
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "email", runtime.ParamLocationPath, email)
|
2025-01-15 19:45:51 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
serverURL, err := url.Parse(server)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
operationPath := fmt.Sprintf("/admin/users/%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
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
if params != nil {
|
|
|
|
|
queryValues := queryURL.Query()
|
2025-01-15 19:45:51 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "confirm", runtime.ParamLocationQuery, params.Confirm); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
} else {
|
|
|
|
|
for k, v := range parsed {
|
|
|
|
|
for _, v2 := range v {
|
|
|
|
|
queryValues.Add(k, v2)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-01-15 19:45:51 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
queryURL.RawQuery = queryValues.Encode()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
req, err := http.NewRequest("DELETE", queryURL.String(), nil)
|
2025-01-15 19:45:51 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-10-23 22:57:15 +00:00
|
|
|
|
|
|
|
|
return req, nil
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// NewGetAdminUserRequest generates requests for GetAdminUser
|
|
|
|
|
func NewGetAdminUserRequest(server string, email UserEmail) (*http.Request, error) {
|
2025-01-15 19:45:51 +00:00
|
|
|
var err error
|
|
|
|
|
|
|
|
|
|
var pathParam0 string
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "email", runtime.ParamLocationPath, email)
|
2025-01-15 19:45:51 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
serverURL, err := url.Parse(server)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
operationPath := fmt.Sprintf("/admin/users/%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
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
2025-01-15 19:45:51 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return req, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// NewCheckAdminUserExistsRequest generates requests for CheckAdminUserExists
|
|
|
|
|
func NewCheckAdminUserExistsRequest(server string, email UserEmail) (*http.Request, error) {
|
2025-02-21 17:05:37 +00:00
|
|
|
var err error
|
|
|
|
|
|
|
|
|
|
var pathParam0 string
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "email", runtime.ParamLocationPath, email)
|
2025-02-21 17:05:37 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
serverURL, err := url.Parse(server)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
operationPath := fmt.Sprintf("/admin/users/%s", pathParam0)
|
2025-02-21 17:05:37 +00:00
|
|
|
if operationPath[0] == '/' {
|
|
|
|
|
operationPath = "." + operationPath
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
req, err := http.NewRequest("HEAD", queryURL.String(), nil)
|
2025-02-21 17:05:37 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return req, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// NewUpdateAdminUserRequest calls the generic UpdateAdminUser builder with application/json body
|
|
|
|
|
func NewUpdateAdminUserRequest(server string, email UserEmail, body UpdateAdminUserJSONRequestBody) (*http.Request, error) {
|
|
|
|
|
var bodyReader io.Reader
|
|
|
|
|
buf, err := json.Marshal(body)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
bodyReader = bytes.NewReader(buf)
|
|
|
|
|
return NewUpdateAdminUserRequestWithBody(server, email, "application/json", bodyReader)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NewUpdateAdminUserRequestWithBody generates requests for UpdateAdminUser with any type of body
|
|
|
|
|
func NewUpdateAdminUserRequestWithBody(server string, email UserEmail, contentType string, body io.Reader) (*http.Request, error) {
|
2025-05-27 15:28:46 +00:00
|
|
|
var err error
|
|
|
|
|
|
|
|
|
|
var pathParam0 string
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "email", runtime.ParamLocationPath, email)
|
2025-05-27 15:28:46 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
serverURL, err := url.Parse(server)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
operationPath := fmt.Sprintf("/admin/users/%s", pathParam0)
|
2025-05-27 15:28:46 +00:00
|
|
|
if operationPath[0] == '/' {
|
|
|
|
|
operationPath = "." + operationPath
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
req, err := http.NewRequest("PATCH", queryURL.String(), body)
|
2025-05-27 15:28:46 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
|
|
|
|
|
|
return req, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// NewDisableAdminUserRequest generates requests for DisableAdminUser
|
|
|
|
|
func NewDisableAdminUserRequest(server string, email UserEmail) (*http.Request, error) {
|
2025-08-05 07:03:35 -07:00
|
|
|
var err error
|
|
|
|
|
|
|
|
|
|
var pathParam0 string
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "email", runtime.ParamLocationPath, email)
|
2025-08-05 07:03:35 -07:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
serverURL, err := url.Parse(server)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
operationPath := fmt.Sprintf("/admin/users/%s/disable", pathParam0)
|
2025-08-05 07:03:35 -07:00
|
|
|
if operationPath[0] == '/' {
|
|
|
|
|
operationPath = "." + operationPath
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
req, err := http.NewRequest("POST", queryURL.String(), nil)
|
2025-08-05 07:03:35 -07:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return req, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// NewEnableAdminUserRequest generates requests for EnableAdminUser
|
|
|
|
|
func NewEnableAdminUserRequest(server string, email UserEmail) (*http.Request, error) {
|
2025-08-05 07:03:35 -07:00
|
|
|
var err error
|
|
|
|
|
|
|
|
|
|
var pathParam0 string
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "email", runtime.ParamLocationPath, email)
|
2025-08-05 07:03:35 -07:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
serverURL, err := url.Parse(server)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
operationPath := fmt.Sprintf("/admin/users/%s/enable", pathParam0)
|
2025-08-05 07:03:35 -07:00
|
|
|
if operationPath[0] == '/' {
|
|
|
|
|
operationPath = "." + operationPath
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
req, err := http.NewRequest("POST", queryURL.String(), nil)
|
2025-08-05 07:03:35 -07:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return req, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +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)
|
2025-08-05 07:03:35 -07:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-10-23 22:57:15 +00:00
|
|
|
bodyReader = bytes.NewReader(buf)
|
|
|
|
|
return NewCreateClientRequestWithBody(server, "application/json", bodyReader)
|
|
|
|
|
}
|
2025-08-05 07:03:35 -07:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// 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
|
2025-08-05 07:03:35 -07:00
|
|
|
|
|
|
|
|
serverURL, err := url.Parse(server)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
operationPath := fmt.Sprintf("/client")
|
2025-08-05 07:03:35 -07:00
|
|
|
if operationPath[0] == '/' {
|
|
|
|
|
operationPath = "." + operationPath
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
req, err := http.NewRequest("POST", queryURL.String(), body)
|
2025-08-05 07:03:35 -07:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
|
|
2025-08-05 07:03:35 -07:00
|
|
|
return req, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// NewGetClientRequest generates requests for GetClient
|
|
|
|
|
func NewGetClientRequest(server string, id ClientID) (*http.Request, error) {
|
2025-08-05 07:03:35 -07: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-10-23 22:57:15 +00:00
|
|
|
operationPath := fmt.Sprintf("/client/%s", pathParam0)
|
2025-08-05 07:03:35 -07: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-10-23 22:57:15 +00:00
|
|
|
// NewUpdateClientRequest calls the generic UpdateClient builder with application/json body
|
|
|
|
|
func NewUpdateClientRequest(server string, id ClientID, body UpdateClientJSONRequestBody) (*http.Request, error) {
|
2025-03-11 16:31:06 +00:00
|
|
|
var bodyReader io.Reader
|
|
|
|
|
buf, err := json.Marshal(body)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
bodyReader = bytes.NewReader(buf)
|
2025-10-23 22:57:15 +00:00
|
|
|
return NewUpdateClientRequestWithBody(server, id, "application/json", bodyReader)
|
2025-03-11 16:31:06 +00:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// NewUpdateClientRequestWithBody generates requests for UpdateClient with any type of body
|
|
|
|
|
func NewUpdateClientRequestWithBody(server string, id ClientID, contentType string, body io.Reader) (*http.Request, error) {
|
2025-02-03 17:45:00 +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-10-23 22:57:15 +00:00
|
|
|
operationPath := fmt.Sprintf("/client/%s", pathParam0)
|
2025-02-03 17:45:00 +00:00
|
|
|
if operationPath[0] == '/' {
|
|
|
|
|
operationPath = "." + operationPath
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
req, err := http.NewRequest("PATCH", queryURL.String(), body)
|
2025-02-03 17:45:00 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
req.Header.Add("Content-Type", contentType)
|
2025-02-03 17:45:00 +00:00
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
return req, nil
|
2025-03-05 19:37:06 +00:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// NewGetCollectorByClientIdRequest generates requests for GetCollectorByClientId
|
|
|
|
|
func NewGetCollectorByClientIdRequest(server string, id ClientID) (*http.Request, error) {
|
2025-03-05 19:37:06 +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-10-23 22:57:15 +00:00
|
|
|
operationPath := fmt.Sprintf("/client/%s/collector", pathParam0)
|
2025-03-05 19:37:06 +00:00
|
|
|
if operationPath[0] == '/' {
|
|
|
|
|
operationPath = "." + operationPath
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
2025-03-05 19:37:06 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return req, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// NewSetCollectorByClientIdRequest calls the generic SetCollectorByClientId builder with application/json body
|
|
|
|
|
func NewSetCollectorByClientIdRequest(server string, id ClientID, body SetCollectorByClientIdJSONRequestBody) (*http.Request, error) {
|
|
|
|
|
var bodyReader io.Reader
|
|
|
|
|
buf, err := json.Marshal(body)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
bodyReader = bytes.NewReader(buf)
|
|
|
|
|
return NewSetCollectorByClientIdRequestWithBody(server, id, "application/json", bodyReader)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NewSetCollectorByClientIdRequestWithBody generates requests for SetCollectorByClientId with any type of body
|
|
|
|
|
func NewSetCollectorByClientIdRequestWithBody(server string, id ClientID, 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
|
2025-03-17 18:14:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
serverURL, err := url.Parse(server)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
operationPath := fmt.Sprintf("/client/%s/collector", pathParam0)
|
2025-03-17 18:14:15 +00:00
|
|
|
if operationPath[0] == '/' {
|
|
|
|
|
operationPath = "." + operationPath
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
req, err := http.NewRequest("PATCH", queryURL.String(), body)
|
2025-03-17 18:14:15 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
|
|
2025-03-17 18:14:15 +00:00
|
|
|
return req, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// NewListDocumentsByClientIdRequest generates requests for ListDocumentsByClientId
|
|
|
|
|
func NewListDocumentsByClientIdRequest(server string, id ClientID) (*http.Request, error) {
|
2025-03-04 16:20:54 +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-10-23 22:57:15 +00:00
|
|
|
operationPath := fmt.Sprintf("/client/%s/document", pathParam0)
|
2025-03-04 16:20:54 +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-10-23 22:57:15 +00:00
|
|
|
// NewUploadDocumentRequestWithBody generates requests for UploadDocument with any type of body
|
|
|
|
|
func NewUploadDocumentRequestWithBody(server string, id ClientID, contentType string, body io.Reader) (*http.Request, error) {
|
2025-04-07 14:10:39 -07:00
|
|
|
var err error
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
var pathParam0 string
|
|
|
|
|
|
|
|
|
|
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-04-07 14:10:39 -07:00
|
|
|
serverURL, err := url.Parse(server)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
operationPath := fmt.Sprintf("/client/%s/document", pathParam0)
|
2025-04-07 14:10:39 -07:00
|
|
|
if operationPath[0] == '/' {
|
|
|
|
|
operationPath = "." + operationPath
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
req, err := http.NewRequest("POST", queryURL.String(), body)
|
2025-04-07 14:10:39 -07:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
|
|
2025-04-07 14:10:39 -07:00
|
|
|
return req, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// NewListDocumentBatchesRequest generates requests for ListDocumentBatches
|
|
|
|
|
func NewListDocumentBatchesRequest(server string, id ClientID, params *ListDocumentBatchesParams) (*http.Request, error) {
|
2025-04-07 14:10:39 -07:00
|
|
|
var err error
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
var pathParam0 string
|
|
|
|
|
|
|
|
|
|
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-04-07 14:10:39 -07:00
|
|
|
serverURL, err := url.Parse(server)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
operationPath := fmt.Sprintf("/client/%s/document/batch", pathParam0)
|
2025-04-07 14:10:39 -07:00
|
|
|
if operationPath[0] == '/' {
|
|
|
|
|
operationPath = "." + operationPath
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
if params != nil {
|
|
|
|
|
queryValues := queryURL.Query()
|
|
|
|
|
|
|
|
|
|
if params.Limit != nil {
|
|
|
|
|
|
|
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
} else {
|
|
|
|
|
for k, v := range parsed {
|
|
|
|
|
for _, v2 := range v {
|
|
|
|
|
queryValues.Add(k, v2)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if params.Offset != nil {
|
|
|
|
|
|
|
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
} else {
|
|
|
|
|
for k, v := range parsed {
|
|
|
|
|
for _, v2 := range v {
|
|
|
|
|
queryValues.Add(k, v2)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
queryURL.RawQuery = queryValues.Encode()
|
|
|
|
|
}
|
|
|
|
|
|
2025-04-07 14:10:39 -07:00
|
|
|
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return req, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// NewUploadDocumentBatchRequestWithBody generates requests for UploadDocumentBatch with any type of body
|
|
|
|
|
func NewUploadDocumentBatchRequestWithBody(server string, id ClientID, contentType string, body io.Reader) (*http.Request, error) {
|
2025-04-07 14:10:39 -07:00
|
|
|
var err error
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
var pathParam0 string
|
|
|
|
|
|
|
|
|
|
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-04-07 14:10:39 -07:00
|
|
|
serverURL, err := url.Parse(server)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
operationPath := fmt.Sprintf("/client/%s/document/batch", pathParam0)
|
2025-04-07 14:10:39 -07:00
|
|
|
if operationPath[0] == '/' {
|
|
|
|
|
operationPath = "." + operationPath
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
req, err := http.NewRequest("POST", queryURL.String(), body)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-04-07 14:10:39 -07:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
req.Header.Add("Content-Type", contentType)
|
2025-04-07 14:10:39 -07:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
return req, nil
|
|
|
|
|
}
|
2025-04-07 14:10:39 -07:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// NewCancelDocumentBatchRequest generates requests for CancelDocumentBatch
|
|
|
|
|
func NewCancelDocumentBatchRequest(server string, id ClientID, batchId BatchID) (*http.Request, error) {
|
|
|
|
|
var err error
|
2025-04-07 14:10:39 -07:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
var pathParam0 string
|
|
|
|
|
|
|
|
|
|
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id)
|
2025-04-07 14:10:39 -07:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
var pathParam1 string
|
2025-04-07 14:10:39 -07:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
pathParam1, err = runtime.StyleParamWithLocation("simple", false, "batch_id", runtime.ParamLocationPath, batchId)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-04-07 14:10:39 -07:00
|
|
|
|
|
|
|
|
serverURL, err := url.Parse(server)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
operationPath := fmt.Sprintf("/client/%s/document/batch/%s", pathParam0, pathParam1)
|
2025-04-07 14:10:39 -07:00
|
|
|
if operationPath[0] == '/' {
|
|
|
|
|
operationPath = "." + operationPath
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
req, err := http.NewRequest("DELETE", queryURL.String(), nil)
|
2025-04-07 14:10:39 -07:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return req, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// NewGetDocumentBatchRequest generates requests for GetDocumentBatch
|
|
|
|
|
func NewGetDocumentBatchRequest(server string, id ClientID, batchId BatchID) (*http.Request, error) {
|
2025-01-15 19:45:51 +00:00
|
|
|
var err error
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
var pathParam0 string
|
|
|
|
|
|
|
|
|
|
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var pathParam1 string
|
|
|
|
|
|
|
|
|
|
pathParam1, err = runtime.StyleParamWithLocation("simple", false, "batch_id", runtime.ParamLocationPath, batchId)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
serverURL, err := url.Parse(server)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
operationPath := fmt.Sprintf("/client/%s/document/batch/%s", pathParam0, pathParam1)
|
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-10-23 22:57:15 +00:00
|
|
|
// NewTriggerExportRequest calls the generic TriggerExport builder with application/json body
|
|
|
|
|
func NewTriggerExportRequest(server string, id ClientID, body TriggerExportJSONRequestBody) (*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-10-23 22:57:15 +00:00
|
|
|
return NewTriggerExportRequestWithBody(server, id, "application/json", bodyReader)
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// NewTriggerExportRequestWithBody generates requests for TriggerExport with any type of body
|
|
|
|
|
func NewTriggerExportRequestWithBody(server string, id ClientID, contentType string, body io.Reader) (*http.Request, error) {
|
2025-01-15 19:45:51 +00:00
|
|
|
var err error
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
var pathParam0 string
|
|
|
|
|
|
|
|
|
|
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
serverURL, err := url.Parse(server)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
operationPath := fmt.Sprintf("/client/%s/export", 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
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// NewGetStatusByClientIdRequest generates requests for GetStatusByClientId
|
|
|
|
|
func NewGetStatusByClientIdRequest(server string, id ClientID) (*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-10-23 22:57:15 +00:00
|
|
|
operationPath := fmt.Sprintf("/client/%s/status", 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-10-23 22:57:15 +00:00
|
|
|
// NewGetDocumentRequest generates requests for GetDocument
|
|
|
|
|
func NewGetDocumentRequest(server string, id DocumentID) (*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-10-23 22:57:15 +00:00
|
|
|
operationPath := fmt.Sprintf("/document/%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
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
2025-01-15 19:45:51 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return req, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// NewExportStateRequest generates requests for ExportState
|
|
|
|
|
func NewExportStateRequest(server string, id ExportID) (*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-10-23 22:57:15 +00:00
|
|
|
operationPath := fmt.Sprintf("/export/%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
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
2025-01-15 19:45:51 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return req, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// NewGetHomePageRequest generates requests for GetHomePage
|
|
|
|
|
func NewGetHomePageRequest(server string) (*http.Request, error) {
|
|
|
|
|
var err error
|
2025-01-15 19:45:51 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
serverURL, err := url.Parse(server)
|
2025-01-15 19:45:51 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
operationPath := fmt.Sprintf("/home")
|
|
|
|
|
if operationPath[0] == '/' {
|
|
|
|
|
operationPath = "." + operationPath
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-01-21 18:24:14 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-01-21 18:24:14 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
return req, nil
|
|
|
|
|
}
|
2025-01-21 18:24:14 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// NewLoginRequest generates requests for Login
|
|
|
|
|
func NewLoginRequest(server string) (*http.Request, error) {
|
|
|
|
|
var err error
|
2025-01-21 18:24:14 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
serverURL, err := url.Parse(server)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-01-24 14:52:56 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
operationPath := fmt.Sprintf("/login")
|
|
|
|
|
if operationPath[0] == '/' {
|
|
|
|
|
operationPath = "." + operationPath
|
|
|
|
|
}
|
2025-01-24 14:52:56 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-01-16 13:49:07 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-01-15 19:45:51 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
return req, nil
|
|
|
|
|
}
|
2025-02-03 17:45:00 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// NewLoginCallbackRequest generates requests for LoginCallback
|
|
|
|
|
func NewLoginCallbackRequest(server string, params *LoginCallbackParams) (*http.Request, error) {
|
|
|
|
|
var err error
|
2025-05-27 15:28:46 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
serverURL, err := url.Parse(server)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-08-05 07:03:35 -07:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
operationPath := fmt.Sprintf("/login-callback")
|
|
|
|
|
if operationPath[0] == '/' {
|
|
|
|
|
operationPath = "." + operationPath
|
|
|
|
|
}
|
2025-08-05 07:03:35 -07:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-08-05 07:03:35 -07:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
if params != nil {
|
|
|
|
|
queryValues := queryURL.Query()
|
2025-08-05 07:03:35 -07:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "code", runtime.ParamLocationQuery, params.Code); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
} else {
|
|
|
|
|
for k, v := range parsed {
|
|
|
|
|
for _, v2 := range v {
|
|
|
|
|
queryValues.Add(k, v2)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-03-05 19:37:06 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "state", runtime.ParamLocationQuery, params.State); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
} else {
|
|
|
|
|
for k, v := range parsed {
|
|
|
|
|
for _, v2 := range v {
|
|
|
|
|
queryValues.Add(k, v2)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-03-05 19:37:06 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
queryURL.RawQuery = queryValues.Encode()
|
|
|
|
|
}
|
2025-03-11 16:31:06 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-03-17 18:14:15 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
return req, nil
|
|
|
|
|
}
|
2025-03-04 16:20:54 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// NewLogoutRequest generates requests for Logout
|
|
|
|
|
func NewLogoutRequest(server string) (*http.Request, error) {
|
|
|
|
|
var err error
|
2025-04-07 14:10:39 -07:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
serverURL, err := url.Parse(server)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-04-07 14:10:39 -07:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
operationPath := fmt.Sprintf("/logout")
|
|
|
|
|
if operationPath[0] == '/' {
|
|
|
|
|
operationPath = "." + operationPath
|
|
|
|
|
}
|
2025-04-07 14:10:39 -07:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-04-07 14:10:39 -07:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-01-15 19:45:51 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
return req, nil
|
|
|
|
|
}
|
2025-01-15 19:45:51 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// NewListQueriesRequest generates requests for ListQueries
|
|
|
|
|
func NewListQueriesRequest(server string) (*http.Request, error) {
|
|
|
|
|
var err error
|
2025-01-15 19:45:51 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
serverURL, err := url.Parse(server)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-01-15 19:45:51 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
operationPath := fmt.Sprintf("/query")
|
|
|
|
|
if operationPath[0] == '/' {
|
|
|
|
|
operationPath = "." + operationPath
|
|
|
|
|
}
|
2025-01-15 19:45:51 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-01-15 19:45:51 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-01-15 19:45:51 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
return req, nil
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// 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)
|
2025-01-21 18:24:14 +00:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// 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-21 18:24:14 +00:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
operationPath := fmt.Sprintf("/query")
|
|
|
|
|
if operationPath[0] == '/' {
|
|
|
|
|
operationPath = "." + operationPath
|
2025-01-21 18:24:14 +00:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NewGetQueryRequest generates requests for GetQuery
|
|
|
|
|
func NewGetQueryRequest(server string, id QueryID) (*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("/query/%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
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NewUpdateQueryRequest calls the generic UpdateQuery builder with application/json body
|
|
|
|
|
func NewUpdateQueryRequest(server string, id QueryID, body UpdateQueryJSONRequestBody) (*http.Request, error) {
|
|
|
|
|
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
|
|
|
|
|
func NewUpdateQueryRequestWithBody(server string, id QueryID, 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("/query/%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
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NewTestQueryRequest calls the generic TestQuery builder with application/json body
|
|
|
|
|
func NewTestQueryRequest(server string, id QueryID, body TestQueryJSONRequestBody) (*http.Request, error) {
|
|
|
|
|
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
|
|
|
|
|
func NewTestQueryRequestWithBody(server string, id QueryID, 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("/query/%s/test", pathParam0)
|
|
|
|
|
if operationPath[0] == '/' {
|
|
|
|
|
operationPath = "." + operationPath
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
req, err := http.NewRequest("POST", queryURL.String(), body)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
|
|
|
|
|
|
return req, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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 {
|
|
|
|
|
// ListAdminUsersWithResponse request
|
|
|
|
|
ListAdminUsersWithResponse(ctx context.Context, params *ListAdminUsersParams, reqEditors ...RequestEditorFn) (*ListAdminUsersResponse, error)
|
|
|
|
|
|
|
|
|
|
// CreateAdminUserWithBodyWithResponse request with any body
|
|
|
|
|
CreateAdminUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAdminUserResponse, error)
|
|
|
|
|
|
|
|
|
|
CreateAdminUserWithResponse(ctx context.Context, body CreateAdminUserJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAdminUserResponse, error)
|
|
|
|
|
|
|
|
|
|
// DeleteAdminUserWithResponse request
|
|
|
|
|
DeleteAdminUserWithResponse(ctx context.Context, email UserEmail, params *DeleteAdminUserParams, reqEditors ...RequestEditorFn) (*DeleteAdminUserResponse, error)
|
|
|
|
|
|
|
|
|
|
// GetAdminUserWithResponse request
|
|
|
|
|
GetAdminUserWithResponse(ctx context.Context, email UserEmail, reqEditors ...RequestEditorFn) (*GetAdminUserResponse, error)
|
|
|
|
|
|
|
|
|
|
// CheckAdminUserExistsWithResponse request
|
|
|
|
|
CheckAdminUserExistsWithResponse(ctx context.Context, email UserEmail, reqEditors ...RequestEditorFn) (*CheckAdminUserExistsResponse, error)
|
|
|
|
|
|
|
|
|
|
// UpdateAdminUserWithBodyWithResponse request with any body
|
|
|
|
|
UpdateAdminUserWithBodyWithResponse(ctx context.Context, email UserEmail, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAdminUserResponse, error)
|
|
|
|
|
|
|
|
|
|
UpdateAdminUserWithResponse(ctx context.Context, email UserEmail, body UpdateAdminUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAdminUserResponse, error)
|
|
|
|
|
|
|
|
|
|
// DisableAdminUserWithResponse request
|
|
|
|
|
DisableAdminUserWithResponse(ctx context.Context, email UserEmail, reqEditors ...RequestEditorFn) (*DisableAdminUserResponse, error)
|
|
|
|
|
|
|
|
|
|
// EnableAdminUserWithResponse request
|
|
|
|
|
EnableAdminUserWithResponse(ctx context.Context, email UserEmail, reqEditors ...RequestEditorFn) (*EnableAdminUserResponse, error)
|
|
|
|
|
|
|
|
|
|
// 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
|
|
|
|
|
GetClientWithResponse(ctx context.Context, id ClientID, reqEditors ...RequestEditorFn) (*GetClientResponse, error)
|
|
|
|
|
|
|
|
|
|
// UpdateClientWithBodyWithResponse request with any body
|
|
|
|
|
UpdateClientWithBodyWithResponse(ctx context.Context, id ClientID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateClientResponse, error)
|
|
|
|
|
|
|
|
|
|
UpdateClientWithResponse(ctx context.Context, id ClientID, body UpdateClientJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateClientResponse, error)
|
|
|
|
|
|
|
|
|
|
// GetCollectorByClientIdWithResponse request
|
|
|
|
|
GetCollectorByClientIdWithResponse(ctx context.Context, id ClientID, reqEditors ...RequestEditorFn) (*GetCollectorByClientIdResponse, error)
|
|
|
|
|
|
|
|
|
|
// SetCollectorByClientIdWithBodyWithResponse request with any body
|
|
|
|
|
SetCollectorByClientIdWithBodyWithResponse(ctx context.Context, id ClientID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetCollectorByClientIdResponse, error)
|
|
|
|
|
|
|
|
|
|
SetCollectorByClientIdWithResponse(ctx context.Context, id ClientID, body SetCollectorByClientIdJSONRequestBody, reqEditors ...RequestEditorFn) (*SetCollectorByClientIdResponse, error)
|
|
|
|
|
|
|
|
|
|
// ListDocumentsByClientIdWithResponse request
|
|
|
|
|
ListDocumentsByClientIdWithResponse(ctx context.Context, id ClientID, reqEditors ...RequestEditorFn) (*ListDocumentsByClientIdResponse, error)
|
|
|
|
|
|
|
|
|
|
// UploadDocumentWithBodyWithResponse request with any body
|
|
|
|
|
UploadDocumentWithBodyWithResponse(ctx context.Context, id ClientID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadDocumentResponse, error)
|
|
|
|
|
|
|
|
|
|
// ListDocumentBatchesWithResponse request
|
|
|
|
|
ListDocumentBatchesWithResponse(ctx context.Context, id ClientID, params *ListDocumentBatchesParams, reqEditors ...RequestEditorFn) (*ListDocumentBatchesResponse, error)
|
|
|
|
|
|
|
|
|
|
// UploadDocumentBatchWithBodyWithResponse request with any body
|
|
|
|
|
UploadDocumentBatchWithBodyWithResponse(ctx context.Context, id ClientID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadDocumentBatchResponse, error)
|
|
|
|
|
|
|
|
|
|
// CancelDocumentBatchWithResponse request
|
|
|
|
|
CancelDocumentBatchWithResponse(ctx context.Context, id ClientID, batchId BatchID, reqEditors ...RequestEditorFn) (*CancelDocumentBatchResponse, error)
|
|
|
|
|
|
|
|
|
|
// GetDocumentBatchWithResponse request
|
|
|
|
|
GetDocumentBatchWithResponse(ctx context.Context, id ClientID, batchId BatchID, reqEditors ...RequestEditorFn) (*GetDocumentBatchResponse, error)
|
|
|
|
|
|
|
|
|
|
// TriggerExportWithBodyWithResponse request with any body
|
|
|
|
|
TriggerExportWithBodyWithResponse(ctx context.Context, id ClientID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TriggerExportResponse, error)
|
|
|
|
|
|
|
|
|
|
TriggerExportWithResponse(ctx context.Context, id ClientID, body TriggerExportJSONRequestBody, reqEditors ...RequestEditorFn) (*TriggerExportResponse, error)
|
|
|
|
|
|
|
|
|
|
// GetStatusByClientIdWithResponse request
|
|
|
|
|
GetStatusByClientIdWithResponse(ctx context.Context, id ClientID, reqEditors ...RequestEditorFn) (*GetStatusByClientIdResponse, error)
|
|
|
|
|
|
|
|
|
|
// GetDocumentWithResponse request
|
|
|
|
|
GetDocumentWithResponse(ctx context.Context, id DocumentID, reqEditors ...RequestEditorFn) (*GetDocumentResponse, error)
|
|
|
|
|
|
|
|
|
|
// ExportStateWithResponse request
|
|
|
|
|
ExportStateWithResponse(ctx context.Context, id ExportID, reqEditors ...RequestEditorFn) (*ExportStateResponse, error)
|
|
|
|
|
|
|
|
|
|
// GetHomePageWithResponse request
|
|
|
|
|
GetHomePageWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHomePageResponse, error)
|
|
|
|
|
|
|
|
|
|
// LoginWithResponse request
|
|
|
|
|
LoginWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*LoginResponse, error)
|
|
|
|
|
|
|
|
|
|
// LoginCallbackWithResponse request
|
|
|
|
|
LoginCallbackWithResponse(ctx context.Context, params *LoginCallbackParams, reqEditors ...RequestEditorFn) (*LoginCallbackResponse, error)
|
|
|
|
|
|
|
|
|
|
// LogoutWithResponse request
|
|
|
|
|
LogoutWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*LogoutResponse, error)
|
|
|
|
|
|
|
|
|
|
// 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)
|
|
|
|
|
|
|
|
|
|
// GetQueryWithResponse request
|
|
|
|
|
GetQueryWithResponse(ctx context.Context, id QueryID, reqEditors ...RequestEditorFn) (*GetQueryResponse, error)
|
|
|
|
|
|
|
|
|
|
// UpdateQueryWithBodyWithResponse request with any body
|
|
|
|
|
UpdateQueryWithBodyWithResponse(ctx context.Context, id QueryID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateQueryResponse, error)
|
|
|
|
|
|
|
|
|
|
UpdateQueryWithResponse(ctx context.Context, id QueryID, body UpdateQueryJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateQueryResponse, error)
|
|
|
|
|
|
|
|
|
|
// TestQueryWithBodyWithResponse request with any body
|
|
|
|
|
TestQueryWithBodyWithResponse(ctx context.Context, id QueryID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TestQueryResponse, error)
|
|
|
|
|
|
|
|
|
|
TestQueryWithResponse(ctx context.Context, id QueryID, body TestQueryJSONRequestBody, reqEditors ...RequestEditorFn) (*TestQueryResponse, error)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type ListAdminUsersResponse struct {
|
|
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
JSON200 *AdminUserList
|
|
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON403 *Forbidden
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
|
|
|
|
func (r ListAdminUsersResponse) Status() string {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
|
|
|
func (r ListAdminUsersResponse) StatusCode() int {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type CreateAdminUserResponse struct {
|
|
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
JSON200 *AdminUserCreateResponse
|
|
|
|
|
JSON201 *AdminUserCreateResponse
|
|
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON403 *Forbidden
|
|
|
|
|
JSON409 *Conflict
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
|
|
|
|
JSON502 *BadGateway
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
|
|
|
|
func (r CreateAdminUserResponse) Status() string {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
|
|
|
func (r CreateAdminUserResponse) StatusCode() int {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type DeleteAdminUserResponse struct {
|
|
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
JSON200 *AdminUserDeleteResponse
|
|
|
|
|
JSON207 *AdminUserDeleteResponse
|
|
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON403 *Forbidden
|
|
|
|
|
JSON404 *NotFound
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
|
|
|
|
func (r DeleteAdminUserResponse) Status() string {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
|
|
|
func (r DeleteAdminUserResponse) StatusCode() int {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type GetAdminUserResponse struct {
|
|
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
JSON200 *AdminUserDetails
|
|
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON403 *Forbidden
|
|
|
|
|
JSON404 *NotFound
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
|
|
|
|
func (r GetAdminUserResponse) Status() string {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
|
|
|
func (r GetAdminUserResponse) StatusCode() int {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type CheckAdminUserExistsResponse struct {
|
|
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON403 *Forbidden
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
|
|
|
|
func (r CheckAdminUserExistsResponse) Status() string {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
|
|
|
func (r CheckAdminUserExistsResponse) StatusCode() int {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type UpdateAdminUserResponse struct {
|
|
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
JSON200 *AdminUserDetails
|
|
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON403 *Forbidden
|
|
|
|
|
JSON404 *NotFound
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
|
|
|
|
func (r UpdateAdminUserResponse) Status() string {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
|
|
|
func (r UpdateAdminUserResponse) StatusCode() int {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type DisableAdminUserResponse struct {
|
|
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
JSON200 *AdminUserActionResponse
|
|
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON403 *Forbidden
|
|
|
|
|
JSON404 *NotFound
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
|
|
|
|
func (r DisableAdminUserResponse) Status() string {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
|
|
|
func (r DisableAdminUserResponse) StatusCode() int {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type EnableAdminUserResponse struct {
|
|
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
JSON200 *AdminUserActionResponse
|
|
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON403 *Forbidden
|
|
|
|
|
JSON404 *NotFound
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
|
|
|
|
func (r EnableAdminUserResponse) Status() string {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
|
|
|
func (r EnableAdminUserResponse) StatusCode() int {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type CreateClientResponse struct {
|
|
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
JSON201 *ClientIDBody
|
|
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 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
|
2025-01-21 18:24:14 +00:00
|
|
|
HTTPResponse *http.Response
|
2025-03-10 11:03:00 +00:00
|
|
|
JSON200 *DocClient
|
2025-03-18 13:06:42 +00:00
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
2025-01-21 18:24:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 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
|
2025-03-18 13:06:42 +00:00
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
2025-01-21 18:24:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 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-03-10 11:03:00 +00:00
|
|
|
type GetCollectorByClientIdResponse struct {
|
2025-01-24 14:52:56 +00:00
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
2025-03-10 11:03:00 +00:00
|
|
|
JSON200 *Collector
|
2025-03-18 13:06:42 +00:00
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
2025-01-24 14:52:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
2025-03-10 11:03:00 +00:00
|
|
|
func (r GetCollectorByClientIdResponse) 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-03-10 11:03:00 +00:00
|
|
|
func (r GetCollectorByClientIdResponse) StatusCode() int {
|
2025-01-24 14:52:56 +00:00
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-10 13:00:57 +00:00
|
|
|
type SetCollectorByClientIdResponse struct {
|
2025-01-16 13:49:07 +00:00
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
2025-03-18 13:06:42 +00:00
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
2025-01-16 13:49:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
2025-03-10 13:00:57 +00:00
|
|
|
func (r SetCollectorByClientIdResponse) 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-03-10 13:00:57 +00:00
|
|
|
func (r SetCollectorByClientIdResponse) StatusCode() int {
|
2025-01-16 13:49:07 +00:00
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-10 11:03:00 +00:00
|
|
|
type ListDocumentsByClientIdResponse struct {
|
2025-02-21 17:05:37 +00:00
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
JSON200 *ListDocuments
|
2025-03-18 13:06:42 +00:00
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
2025-02-21 17:05:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
2025-03-10 11:03:00 +00:00
|
|
|
func (r ListDocumentsByClientIdResponse) Status() string {
|
2025-02-21 17:05:37 +00:00
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
2025-03-10 11:03:00 +00:00
|
|
|
func (r ListDocumentsByClientIdResponse) StatusCode() int {
|
2025-02-21 17:05:37 +00:00
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
2025-05-27 15:28:46 +00:00
|
|
|
type UploadDocumentResponse struct {
|
|
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
|
|
|
|
func (r UploadDocumentResponse) Status() string {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
|
|
|
func (r UploadDocumentResponse) StatusCode() int {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-05 07:03:35 -07:00
|
|
|
type ListDocumentBatchesResponse struct {
|
2025-01-15 19:45:51 +00:00
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
2025-08-05 07:03:35 -07:00
|
|
|
JSON200 *BatchUploadList
|
2025-03-18 13:06:42 +00:00
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
2025-08-05 07:03:35 -07:00
|
|
|
func (r ListDocumentBatchesResponse) 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-08-05 07:03:35 -07:00
|
|
|
func (r ListDocumentBatchesResponse) StatusCode() int {
|
2025-01-15 19:45:51 +00:00
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-05 07:03:35 -07:00
|
|
|
type UploadDocumentBatchResponse struct {
|
2025-03-05 19:37:06 +00:00
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
2025-08-05 07:03:35 -07:00
|
|
|
JSON202 *BatchUploadResponse
|
2025-03-18 13:06:42 +00:00
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
2025-03-05 19:37:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
2025-08-05 07:03:35 -07:00
|
|
|
func (r UploadDocumentBatchResponse) Status() string {
|
2025-03-05 19:37:06 +00:00
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
2025-08-05 07:03:35 -07:00
|
|
|
func (r UploadDocumentBatchResponse) StatusCode() int {
|
2025-03-05 19:37:06 +00:00
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-05 07:03:35 -07:00
|
|
|
type CancelDocumentBatchResponse struct {
|
|
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON404 *NotFound
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
|
|
|
|
func (r CancelDocumentBatchResponse) Status() string {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
|
|
|
func (r CancelDocumentBatchResponse) StatusCode() int {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type GetDocumentBatchResponse struct {
|
|
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
JSON200 *BatchUploadDetails
|
|
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON404 *NotFound
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
|
|
|
|
func (r GetDocumentBatchResponse) Status() string {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
|
|
|
func (r GetDocumentBatchResponse) StatusCode() int {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type TriggerExportResponse struct {
|
|
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
JSON201 *IdMessage
|
|
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 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
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type GetStatusByClientIdResponse struct {
|
|
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
JSON200 *ClientStatusBody
|
|
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
|
|
|
|
func (r GetStatusByClientIdResponse) Status() string {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
|
|
|
func (r GetStatusByClientIdResponse) StatusCode() int {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type GetDocumentResponse struct {
|
2025-03-17 18:14:15 +00:00
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
JSON200 *Document
|
2025-03-18 13:06:42 +00:00
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
2025-03-17 18:14:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
|
|
|
|
func (r GetDocumentResponse) Status() string {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
|
|
|
func (r GetDocumentResponse) StatusCode() int {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
type ExportStateResponse struct {
|
2025-03-04 16:20:54 +00:00
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
2025-03-11 16:31:06 +00:00
|
|
|
JSON200 *ExportDetails
|
2025-03-18 13:06:42 +00:00
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
2025-03-04 16:20:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
2025-03-11 16:31:06 +00:00
|
|
|
func (r ExportStateResponse) Status() string {
|
2025-03-04 16:20:54 +00:00
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
2025-03-11 16:31:06 +00:00
|
|
|
func (r ExportStateResponse) StatusCode() int {
|
2025-03-04 16:20:54 +00:00
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
2025-04-07 14:10:39 -07:00
|
|
|
type GetHomePageResponse struct {
|
|
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
|
|
|
|
func (r GetHomePageResponse) Status() string {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
|
|
|
func (r GetHomePageResponse) StatusCode() int {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type LoginResponse struct {
|
|
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
|
|
|
|
func (r LoginResponse) Status() string {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
|
|
|
func (r LoginResponse) StatusCode() int {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type LoginCallbackResponse struct {
|
|
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
|
|
|
|
func (r LoginCallbackResponse) Status() string {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
|
|
|
func (r LoginCallbackResponse) StatusCode() int {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.StatusCode
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type LogoutResponse struct {
|
|
|
|
|
Body []byte
|
|
|
|
|
HTTPResponse *http.Response
|
|
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Status returns HTTPResponse.Status
|
|
|
|
|
func (r LogoutResponse) Status() string {
|
|
|
|
|
if r.HTTPResponse != nil {
|
|
|
|
|
return r.HTTPResponse.Status
|
|
|
|
|
}
|
|
|
|
|
return http.StatusText(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
|
|
|
func (r LogoutResponse) 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
|
2025-03-18 13:06:42 +00:00
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 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
|
2025-03-18 13:06:42 +00:00
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 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
|
2025-03-18 13:06:42 +00:00
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 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
|
2025-03-18 13:06:42 +00:00
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 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
|
2025-03-18 13:06:42 +00:00
|
|
|
JSON400 *InvalidRequest
|
|
|
|
|
JSON401 *Unauthorized
|
|
|
|
|
JSON429 *TooManyRequests
|
|
|
|
|
JSON500 *InternalError
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 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-10-23 22:57:15 +00:00
|
|
|
// ListAdminUsersWithResponse request returning *ListAdminUsersResponse
|
|
|
|
|
func (c *ClientWithResponses) ListAdminUsersWithResponse(ctx context.Context, params *ListAdminUsersParams, reqEditors ...RequestEditorFn) (*ListAdminUsersResponse, error) {
|
|
|
|
|
rsp, err := c.ListAdminUsers(ctx, params, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseListAdminUsersResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// CreateAdminUserWithBodyWithResponse request with arbitrary body returning *CreateAdminUserResponse
|
|
|
|
|
func (c *ClientWithResponses) CreateAdminUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAdminUserResponse, error) {
|
|
|
|
|
rsp, err := c.CreateAdminUserWithBody(ctx, contentType, body, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseCreateAdminUserResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *ClientWithResponses) CreateAdminUserWithResponse(ctx context.Context, body CreateAdminUserJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAdminUserResponse, error) {
|
|
|
|
|
rsp, err := c.CreateAdminUser(ctx, body, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseCreateAdminUserResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// DeleteAdminUserWithResponse request returning *DeleteAdminUserResponse
|
|
|
|
|
func (c *ClientWithResponses) DeleteAdminUserWithResponse(ctx context.Context, email UserEmail, params *DeleteAdminUserParams, reqEditors ...RequestEditorFn) (*DeleteAdminUserResponse, error) {
|
|
|
|
|
rsp, err := c.DeleteAdminUser(ctx, email, params, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseDeleteAdminUserResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// GetAdminUserWithResponse request returning *GetAdminUserResponse
|
|
|
|
|
func (c *ClientWithResponses) GetAdminUserWithResponse(ctx context.Context, email UserEmail, reqEditors ...RequestEditorFn) (*GetAdminUserResponse, error) {
|
|
|
|
|
rsp, err := c.GetAdminUser(ctx, email, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseGetAdminUserResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// CheckAdminUserExistsWithResponse request returning *CheckAdminUserExistsResponse
|
|
|
|
|
func (c *ClientWithResponses) CheckAdminUserExistsWithResponse(ctx context.Context, email UserEmail, reqEditors ...RequestEditorFn) (*CheckAdminUserExistsResponse, error) {
|
|
|
|
|
rsp, err := c.CheckAdminUserExists(ctx, email, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseCheckAdminUserExistsResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// UpdateAdminUserWithBodyWithResponse request with arbitrary body returning *UpdateAdminUserResponse
|
|
|
|
|
func (c *ClientWithResponses) UpdateAdminUserWithBodyWithResponse(ctx context.Context, email UserEmail, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAdminUserResponse, error) {
|
|
|
|
|
rsp, err := c.UpdateAdminUserWithBody(ctx, email, contentType, body, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseUpdateAdminUserResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *ClientWithResponses) UpdateAdminUserWithResponse(ctx context.Context, email UserEmail, body UpdateAdminUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAdminUserResponse, error) {
|
|
|
|
|
rsp, err := c.UpdateAdminUser(ctx, email, body, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseUpdateAdminUserResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// DisableAdminUserWithResponse request returning *DisableAdminUserResponse
|
|
|
|
|
func (c *ClientWithResponses) DisableAdminUserWithResponse(ctx context.Context, email UserEmail, reqEditors ...RequestEditorFn) (*DisableAdminUserResponse, error) {
|
|
|
|
|
rsp, err := c.DisableAdminUser(ctx, email, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseDisableAdminUserResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// EnableAdminUserWithResponse request returning *EnableAdminUserResponse
|
|
|
|
|
func (c *ClientWithResponses) EnableAdminUserWithResponse(ctx context.Context, email UserEmail, reqEditors ...RequestEditorFn) (*EnableAdminUserResponse, error) {
|
|
|
|
|
rsp, err := c.EnableAdminUser(ctx, email, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseEnableAdminUserResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 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
|
|
|
|
|
func (c *ClientWithResponses) GetClientWithResponse(ctx context.Context, id ClientID, reqEditors ...RequestEditorFn) (*GetClientResponse, error) {
|
|
|
|
|
rsp, err := c.GetClient(ctx, id, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseGetClientResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// UpdateClientWithBodyWithResponse request with arbitrary body returning *UpdateClientResponse
|
|
|
|
|
func (c *ClientWithResponses) UpdateClientWithBodyWithResponse(ctx context.Context, id ClientID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateClientResponse, error) {
|
|
|
|
|
rsp, err := c.UpdateClientWithBody(ctx, id, contentType, body, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseUpdateClientResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *ClientWithResponses) UpdateClientWithResponse(ctx context.Context, id ClientID, body UpdateClientJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateClientResponse, error) {
|
|
|
|
|
rsp, err := c.UpdateClient(ctx, id, body, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseUpdateClientResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// GetCollectorByClientIdWithResponse request returning *GetCollectorByClientIdResponse
|
|
|
|
|
func (c *ClientWithResponses) GetCollectorByClientIdWithResponse(ctx context.Context, id ClientID, reqEditors ...RequestEditorFn) (*GetCollectorByClientIdResponse, error) {
|
|
|
|
|
rsp, err := c.GetCollectorByClientId(ctx, id, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseGetCollectorByClientIdResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// SetCollectorByClientIdWithBodyWithResponse request with arbitrary body returning *SetCollectorByClientIdResponse
|
|
|
|
|
func (c *ClientWithResponses) SetCollectorByClientIdWithBodyWithResponse(ctx context.Context, id ClientID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetCollectorByClientIdResponse, error) {
|
|
|
|
|
rsp, err := c.SetCollectorByClientIdWithBody(ctx, id, contentType, body, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseSetCollectorByClientIdResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *ClientWithResponses) SetCollectorByClientIdWithResponse(ctx context.Context, id ClientID, body SetCollectorByClientIdJSONRequestBody, reqEditors ...RequestEditorFn) (*SetCollectorByClientIdResponse, error) {
|
|
|
|
|
rsp, err := c.SetCollectorByClientId(ctx, id, body, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseSetCollectorByClientIdResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ListDocumentsByClientIdWithResponse request returning *ListDocumentsByClientIdResponse
|
|
|
|
|
func (c *ClientWithResponses) ListDocumentsByClientIdWithResponse(ctx context.Context, id ClientID, reqEditors ...RequestEditorFn) (*ListDocumentsByClientIdResponse, error) {
|
|
|
|
|
rsp, err := c.ListDocumentsByClientId(ctx, id, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseListDocumentsByClientIdResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// UploadDocumentWithBodyWithResponse request with arbitrary body returning *UploadDocumentResponse
|
|
|
|
|
func (c *ClientWithResponses) UploadDocumentWithBodyWithResponse(ctx context.Context, id ClientID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadDocumentResponse, error) {
|
|
|
|
|
rsp, err := c.UploadDocumentWithBody(ctx, id, contentType, body, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseUploadDocumentResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ListDocumentBatchesWithResponse request returning *ListDocumentBatchesResponse
|
|
|
|
|
func (c *ClientWithResponses) ListDocumentBatchesWithResponse(ctx context.Context, id ClientID, params *ListDocumentBatchesParams, reqEditors ...RequestEditorFn) (*ListDocumentBatchesResponse, error) {
|
|
|
|
|
rsp, err := c.ListDocumentBatches(ctx, id, params, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseListDocumentBatchesResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// UploadDocumentBatchWithBodyWithResponse request with arbitrary body returning *UploadDocumentBatchResponse
|
|
|
|
|
func (c *ClientWithResponses) UploadDocumentBatchWithBodyWithResponse(ctx context.Context, id ClientID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadDocumentBatchResponse, error) {
|
|
|
|
|
rsp, err := c.UploadDocumentBatchWithBody(ctx, id, contentType, body, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseUploadDocumentBatchResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// CancelDocumentBatchWithResponse request returning *CancelDocumentBatchResponse
|
|
|
|
|
func (c *ClientWithResponses) CancelDocumentBatchWithResponse(ctx context.Context, id ClientID, batchId BatchID, reqEditors ...RequestEditorFn) (*CancelDocumentBatchResponse, error) {
|
|
|
|
|
rsp, err := c.CancelDocumentBatch(ctx, id, batchId, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseCancelDocumentBatchResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// GetDocumentBatchWithResponse request returning *GetDocumentBatchResponse
|
|
|
|
|
func (c *ClientWithResponses) GetDocumentBatchWithResponse(ctx context.Context, id ClientID, batchId BatchID, reqEditors ...RequestEditorFn) (*GetDocumentBatchResponse, error) {
|
|
|
|
|
rsp, err := c.GetDocumentBatch(ctx, id, batchId, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseGetDocumentBatchResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TriggerExportWithBodyWithResponse request with arbitrary body returning *TriggerExportResponse
|
|
|
|
|
func (c *ClientWithResponses) TriggerExportWithBodyWithResponse(ctx context.Context, id ClientID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TriggerExportResponse, error) {
|
|
|
|
|
rsp, err := c.TriggerExportWithBody(ctx, id, contentType, body, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseTriggerExportResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *ClientWithResponses) TriggerExportWithResponse(ctx context.Context, id ClientID, body TriggerExportJSONRequestBody, reqEditors ...RequestEditorFn) (*TriggerExportResponse, error) {
|
|
|
|
|
rsp, err := c.TriggerExport(ctx, id, body, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseTriggerExportResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// GetStatusByClientIdWithResponse request returning *GetStatusByClientIdResponse
|
|
|
|
|
func (c *ClientWithResponses) GetStatusByClientIdWithResponse(ctx context.Context, id ClientID, reqEditors ...RequestEditorFn) (*GetStatusByClientIdResponse, error) {
|
|
|
|
|
rsp, err := c.GetStatusByClientId(ctx, id, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseGetStatusByClientIdResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// GetDocumentWithResponse request returning *GetDocumentResponse
|
|
|
|
|
func (c *ClientWithResponses) GetDocumentWithResponse(ctx context.Context, id DocumentID, reqEditors ...RequestEditorFn) (*GetDocumentResponse, error) {
|
|
|
|
|
rsp, err := c.GetDocument(ctx, id, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseGetDocumentResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ExportStateWithResponse request returning *ExportStateResponse
|
|
|
|
|
func (c *ClientWithResponses) ExportStateWithResponse(ctx context.Context, id ExportID, reqEditors ...RequestEditorFn) (*ExportStateResponse, error) {
|
|
|
|
|
rsp, err := c.ExportState(ctx, id, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseExportStateResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// GetHomePageWithResponse request returning *GetHomePageResponse
|
|
|
|
|
func (c *ClientWithResponses) GetHomePageWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHomePageResponse, error) {
|
|
|
|
|
rsp, err := c.GetHomePage(ctx, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseGetHomePageResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// LoginWithResponse request returning *LoginResponse
|
|
|
|
|
func (c *ClientWithResponses) LoginWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*LoginResponse, error) {
|
|
|
|
|
rsp, err := c.Login(ctx, reqEditors...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return ParseLoginResponse(rsp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// LoginCallbackWithResponse request returning *LoginCallbackResponse
|
|
|
|
|
func (c *ClientWithResponses) LoginCallbackWithResponse(ctx context.Context, params *LoginCallbackParams, reqEditors ...RequestEditorFn) (*LoginCallbackResponse, error) {
|
|
|
|
|
rsp, err := c.LoginCallback(ctx, params, reqEditors...)
|
2025-01-21 18:24:14 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-10-23 22:57:15 +00:00
|
|
|
return ParseLoginCallbackResponse(rsp)
|
2025-01-21 18:24:14 +00:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// LogoutWithResponse request returning *LogoutResponse
|
|
|
|
|
func (c *ClientWithResponses) LogoutWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*LogoutResponse, error) {
|
|
|
|
|
rsp, err := c.Logout(ctx, reqEditors...)
|
2025-01-21 18:24:14 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-10-23 22:57:15 +00:00
|
|
|
return ParseLogoutResponse(rsp)
|
2025-01-21 18:24:14 +00:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// ListQueriesWithResponse request returning *ListQueriesResponse
|
|
|
|
|
func (c *ClientWithResponses) ListQueriesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListQueriesResponse, error) {
|
|
|
|
|
rsp, err := c.ListQueries(ctx, reqEditors...)
|
2025-01-21 18:24:14 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-10-23 22:57:15 +00:00
|
|
|
return ParseListQueriesResponse(rsp)
|
2025-01-21 18:24:14 +00:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// 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...)
|
2025-01-21 18:24:14 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-10-23 22:57:15 +00:00
|
|
|
return ParseCreateQueryResponse(rsp)
|
2025-01-21 18:24:14 +00:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
func (c *ClientWithResponses) CreateQueryWithResponse(ctx context.Context, body CreateQueryJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateQueryResponse, error) {
|
|
|
|
|
rsp, err := c.CreateQuery(ctx, body, reqEditors...)
|
2025-01-21 18:24:14 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-10-23 22:57:15 +00:00
|
|
|
return ParseCreateQueryResponse(rsp)
|
2025-01-21 18:24:14 +00:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// GetQueryWithResponse request returning *GetQueryResponse
|
|
|
|
|
func (c *ClientWithResponses) GetQueryWithResponse(ctx context.Context, id QueryID, reqEditors ...RequestEditorFn) (*GetQueryResponse, error) {
|
|
|
|
|
rsp, err := c.GetQuery(ctx, id, reqEditors...)
|
2025-01-24 14:52:56 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-10-23 22:57:15 +00:00
|
|
|
return ParseGetQueryResponse(rsp)
|
2025-01-24 14:52:56 +00:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// UpdateQueryWithBodyWithResponse request with arbitrary body returning *UpdateQueryResponse
|
|
|
|
|
func (c *ClientWithResponses) UpdateQueryWithBodyWithResponse(ctx context.Context, id QueryID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateQueryResponse, error) {
|
|
|
|
|
rsp, err := c.UpdateQueryWithBody(ctx, id, contentType, body, reqEditors...)
|
2025-01-24 14:52:56 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-10-23 22:57:15 +00:00
|
|
|
return ParseUpdateQueryResponse(rsp)
|
2025-01-24 14:52:56 +00:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
func (c *ClientWithResponses) UpdateQueryWithResponse(ctx context.Context, id QueryID, body UpdateQueryJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateQueryResponse, error) {
|
|
|
|
|
rsp, err := c.UpdateQuery(ctx, id, body, reqEditors...)
|
2025-01-24 14:52:56 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-10-23 22:57:15 +00:00
|
|
|
return ParseUpdateQueryResponse(rsp)
|
2025-01-24 14:52:56 +00:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// TestQueryWithBodyWithResponse request with arbitrary body returning *TestQueryResponse
|
|
|
|
|
func (c *ClientWithResponses) TestQueryWithBodyWithResponse(ctx context.Context, id QueryID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TestQueryResponse, error) {
|
|
|
|
|
rsp, err := c.TestQueryWithBody(ctx, id, contentType, body, reqEditors...)
|
2025-01-24 14:52:56 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-10-23 22:57:15 +00:00
|
|
|
return ParseTestQueryResponse(rsp)
|
2025-02-21 17:05:37 +00:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
func (c *ClientWithResponses) TestQueryWithResponse(ctx context.Context, id QueryID, body TestQueryJSONRequestBody, reqEditors ...RequestEditorFn) (*TestQueryResponse, error) {
|
|
|
|
|
rsp, err := c.TestQuery(ctx, id, body, reqEditors...)
|
2025-05-27 15:28:46 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-10-23 22:57:15 +00:00
|
|
|
return ParseTestQueryResponse(rsp)
|
2025-05-27 15:28:46 +00:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// ParseListAdminUsersResponse parses an HTTP response from a ListAdminUsersWithResponse call
|
|
|
|
|
func ParseListAdminUsersResponse(rsp *http.Response) (*ListAdminUsersResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
2025-08-05 07:03:35 -07:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-10-23 22:57:15 +00:00
|
|
|
|
|
|
|
|
response := &ListAdminUsersResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
|
|
|
var dest AdminUserList
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON200 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403:
|
|
|
|
|
var dest Forbidden
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON403 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
2025-08-05 07:03:35 -07:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// ParseCreateAdminUserResponse parses an HTTP response from a CreateAdminUserWithResponse call
|
|
|
|
|
func ParseCreateAdminUserResponse(rsp *http.Response) (*CreateAdminUserResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
2025-08-05 07:03:35 -07:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-10-23 22:57:15 +00:00
|
|
|
|
|
|
|
|
response := &CreateAdminUserResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
|
|
|
var dest AdminUserCreateResponse
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON200 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
|
|
|
|
|
var dest AdminUserCreateResponse
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON201 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403:
|
|
|
|
|
var dest Forbidden
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON403 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409:
|
|
|
|
|
var dest Conflict
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON409 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 502:
|
|
|
|
|
var dest BadGateway
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON502 = &dest
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
2025-08-05 07:03:35 -07:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// ParseDeleteAdminUserResponse parses an HTTP response from a DeleteAdminUserWithResponse call
|
|
|
|
|
func ParseDeleteAdminUserResponse(rsp *http.Response) (*DeleteAdminUserResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
2025-08-05 07:03:35 -07:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-10-23 22:57:15 +00:00
|
|
|
|
|
|
|
|
response := &DeleteAdminUserResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
|
|
|
var dest AdminUserDeleteResponse
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON200 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 207:
|
|
|
|
|
var dest AdminUserDeleteResponse
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON207 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403:
|
|
|
|
|
var dest Forbidden
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON403 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
|
|
|
|
|
var dest NotFound
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON404 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
2025-08-05 07:03:35 -07:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// ParseGetAdminUserResponse parses an HTTP response from a GetAdminUserWithResponse call
|
|
|
|
|
func ParseGetAdminUserResponse(rsp *http.Response) (*GetAdminUserResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
response := &GetAdminUserResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
|
|
|
var dest AdminUserDetails
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON200 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403:
|
|
|
|
|
var dest Forbidden
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON403 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
|
|
|
|
|
var dest NotFound
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON404 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
2025-08-05 07:03:35 -07:00
|
|
|
|
2025-03-05 19:37:06 +00:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
return response, nil
|
2025-03-05 19:37:06 +00:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// ParseCheckAdminUserExistsResponse parses an HTTP response from a CheckAdminUserExistsWithResponse call
|
|
|
|
|
func ParseCheckAdminUserExistsResponse(rsp *http.Response) (*CheckAdminUserExistsResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
2025-03-04 16:20:54 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
response := &CheckAdminUserExistsResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
2025-03-17 18:14:15 +00:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
2025-03-11 16:31:06 +00:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
2025-04-07 14:10:39 -07:00
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403:
|
|
|
|
|
var dest Forbidden
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON403 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
2025-04-07 14:10:39 -07:00
|
|
|
|
|
|
|
|
}
|
2025-10-23 22:57:15 +00:00
|
|
|
|
|
|
|
|
return response, nil
|
2025-04-07 14:10:39 -07:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// ParseUpdateAdminUserResponse parses an HTTP response from a UpdateAdminUserWithResponse call
|
|
|
|
|
func ParseUpdateAdminUserResponse(rsp *http.Response) (*UpdateAdminUserResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
2025-04-07 14:10:39 -07:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
response := &UpdateAdminUserResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
|
|
|
var dest AdminUserDetails
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON200 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403:
|
|
|
|
|
var dest Forbidden
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON403 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
|
|
|
|
|
var dest NotFound
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON404 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
|
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
2025-10-23 22:57:15 +00:00
|
|
|
|
|
|
|
|
return response, nil
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// ParseDisableAdminUserResponse parses an HTTP response from a DisableAdminUserWithResponse call
|
|
|
|
|
func ParseDisableAdminUserResponse(rsp *http.Response) (*DisableAdminUserResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
2025-01-15 19:45:51 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
response := &DisableAdminUserResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
|
|
|
var dest AdminUserActionResponse
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON200 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403:
|
|
|
|
|
var dest Forbidden
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON403 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
|
|
|
|
|
var dest NotFound
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON404 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
|
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
2025-10-23 22:57:15 +00:00
|
|
|
|
|
|
|
|
return response, nil
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
// ParseEnableAdminUserResponse parses an HTTP response from a EnableAdminUserWithResponse call
|
|
|
|
|
func ParseEnableAdminUserResponse(rsp *http.Response) (*EnableAdminUserResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
2025-01-15 19:45:51 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
response := &EnableAdminUserResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
2025-10-23 22:57:15 +00:00
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
|
|
|
var dest AdminUserActionResponse
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON200 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403:
|
|
|
|
|
var dest Forbidden
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON403 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
|
|
|
|
|
var dest NotFound
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON404 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
|
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
2025-10-23 22:57:15 +00:00
|
|
|
|
|
|
|
|
return response, nil
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
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:
|
2025-03-11 16:31:06 +00:00
|
|
|
var dest ClientIDBody
|
2025-01-21 18:24:14 +00:00
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON201 = &dest
|
|
|
|
|
|
2025-03-18 13:06:42 +00:00
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
|
|
|
|
|
2025-01-21 18:24:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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:
|
2025-03-10 11:03:00 +00:00
|
|
|
var dest DocClient
|
2025-01-21 18:24:14 +00:00
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON200 = &dest
|
|
|
|
|
|
2025-03-18 13:06:42 +00:00
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
|
|
|
|
|
2025-01-21 18:24:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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,
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-18 13:06:42 +00:00
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-21 18:24:14 +00:00
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-10 11:03:00 +00:00
|
|
|
// ParseGetCollectorByClientIdResponse parses an HTTP response from a GetCollectorByClientIdWithResponse call
|
|
|
|
|
func ParseGetCollectorByClientIdResponse(rsp *http.Response) (*GetCollectorByClientIdResponse, 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-03-10 11:03:00 +00:00
|
|
|
response := &GetCollectorByClientIdResponse{
|
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:
|
2025-03-10 11:03:00 +00:00
|
|
|
var dest Collector
|
2025-01-15 19:45:51 +00:00
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON200 = &dest
|
|
|
|
|
|
2025-03-18 13:06:42 +00:00
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
|
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-10 13:00:57 +00:00
|
|
|
// ParseSetCollectorByClientIdResponse parses an HTTP response from a SetCollectorByClientIdWithResponse call
|
|
|
|
|
func ParseSetCollectorByClientIdResponse(rsp *http.Response) (*SetCollectorByClientIdResponse, 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-03-10 13:00:57 +00:00
|
|
|
response := &SetCollectorByClientIdResponse{
|
2025-01-15 19:45:51 +00:00
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-18 13:06:42 +00:00
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-10 11:03:00 +00:00
|
|
|
// ParseListDocumentsByClientIdResponse parses an HTTP response from a ListDocumentsByClientIdWithResponse call
|
|
|
|
|
func ParseListDocumentsByClientIdResponse(rsp *http.Response) (*ListDocumentsByClientIdResponse, error) {
|
2025-02-21 17:05:37 +00:00
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-10 11:03:00 +00:00
|
|
|
response := &ListDocumentsByClientIdResponse{
|
2025-02-21 17:05:37 +00:00
|
|
|
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
|
|
|
|
|
|
2025-03-18 13:06:42 +00:00
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
2025-05-27 15:28:46 +00:00
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ParseUploadDocumentResponse parses an HTTP response from a UploadDocumentWithResponse call
|
|
|
|
|
func ParseUploadDocumentResponse(rsp *http.Response) (*UploadDocumentResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
response := &UploadDocumentResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
2025-03-18 13:06:42 +00:00
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
|
|
|
|
|
2025-02-21 17:05:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-05 07:03:35 -07:00
|
|
|
// ParseListDocumentBatchesResponse parses an HTTP response from a ListDocumentBatchesWithResponse call
|
|
|
|
|
func ParseListDocumentBatchesResponse(rsp *http.Response) (*ListDocumentBatchesResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
response := &ListDocumentBatchesResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
|
|
|
var dest BatchUploadList
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON200 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ParseUploadDocumentBatchResponse parses an HTTP response from a UploadDocumentBatchWithResponse call
|
|
|
|
|
func ParseUploadDocumentBatchResponse(rsp *http.Response) (*UploadDocumentBatchResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
response := &UploadDocumentBatchResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 202:
|
|
|
|
|
var dest BatchUploadResponse
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON202 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ParseCancelDocumentBatchResponse parses an HTTP response from a CancelDocumentBatchWithResponse call
|
|
|
|
|
func ParseCancelDocumentBatchResponse(rsp *http.Response) (*CancelDocumentBatchResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
response := &CancelDocumentBatchResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
|
|
|
|
|
var dest NotFound
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON404 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ParseGetDocumentBatchResponse parses an HTTP response from a GetDocumentBatchWithResponse call
|
|
|
|
|
func ParseGetDocumentBatchResponse(rsp *http.Response) (*GetDocumentBatchResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
response := &GetDocumentBatchResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
|
|
|
var dest BatchUploadDetails
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON200 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
|
|
|
|
|
var dest NotFound
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON404 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// ParseTriggerExportResponse parses an HTTP response from a TriggerExportWithResponse call
|
|
|
|
|
func ParseTriggerExportResponse(rsp *http.Response) (*TriggerExportResponse, error) {
|
2025-02-03 17:45:00 +00:00
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
response := &TriggerExportResponse{
|
2025-02-03 17:45:00 +00:00
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch {
|
2025-03-11 16:31:06 +00:00
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
|
|
|
|
|
var dest IdMessage
|
2025-02-03 17:45:00 +00:00
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-03-11 16:31:06 +00:00
|
|
|
response.JSON201 = &dest
|
2025-02-03 17:45:00 +00:00
|
|
|
|
2025-03-18 13:06:42 +00:00
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
|
|
|
|
|
2025-02-03 17:45:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// ParseGetStatusByClientIdResponse parses an HTTP response from a GetStatusByClientIdWithResponse call
|
|
|
|
|
func ParseGetStatusByClientIdResponse(rsp *http.Response) (*GetStatusByClientIdResponse, error) {
|
2025-03-05 19:37:06 +00:00
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
response := &GetStatusByClientIdResponse{
|
2025-03-05 19:37:06 +00:00
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch {
|
2025-03-11 16:31:06 +00:00
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
|
|
|
var dest ClientStatusBody
|
2025-03-05 19:37:06 +00:00
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
2025-03-11 16:31:06 +00:00
|
|
|
response.JSON200 = &dest
|
2025-03-05 19:37:06 +00:00
|
|
|
|
2025-03-18 13:06:42 +00:00
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
|
|
|
|
|
2025-03-05 19:37:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-17 18:14:15 +00:00
|
|
|
// ParseGetDocumentResponse parses an HTTP response from a GetDocumentWithResponse call
|
|
|
|
|
func ParseGetDocumentResponse(rsp *http.Response) (*GetDocumentResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
response := &GetDocumentResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
|
|
|
var dest Document
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON200 = &dest
|
|
|
|
|
|
2025-03-18 13:06:42 +00:00
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
|
|
|
|
|
2025-03-17 18:14:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
// ParseExportStateResponse parses an HTTP response from a ExportStateWithResponse call
|
|
|
|
|
func ParseExportStateResponse(rsp *http.Response) (*ExportStateResponse, error) {
|
2025-03-04 16:20:54 +00:00
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-11 16:31:06 +00:00
|
|
|
response := &ExportStateResponse{
|
2025-03-04 16:20:54 +00:00
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
2025-03-11 16:31:06 +00:00
|
|
|
var dest ExportDetails
|
2025-03-04 16:20:54 +00:00
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON200 = &dest
|
|
|
|
|
|
2025-04-07 14:10:39 -07:00
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ParseGetHomePageResponse parses an HTTP response from a GetHomePageWithResponse call
|
|
|
|
|
func ParseGetHomePageResponse(rsp *http.Response) (*GetHomePageResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
response := &GetHomePageResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ParseLoginResponse parses an HTTP response from a LoginWithResponse call
|
|
|
|
|
func ParseLoginResponse(rsp *http.Response) (*LoginResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
response := &LoginResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ParseLoginCallbackResponse parses an HTTP response from a LoginCallbackWithResponse call
|
|
|
|
|
func ParseLoginCallbackResponse(rsp *http.Response) (*LoginCallbackResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
response := &LoginCallbackResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ParseLogoutResponse parses an HTTP response from a LogoutWithResponse call
|
|
|
|
|
func ParseLogoutResponse(rsp *http.Response) (*LogoutResponse, error) {
|
|
|
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
|
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
response := &LogoutResponse{
|
|
|
|
|
Body: bodyBytes,
|
|
|
|
|
HTTPResponse: rsp,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch {
|
2025-03-18 13:06:42 +00:00
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
|
|
|
|
|
2025-03-04 16:20:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
2025-03-18 13:06:42 +00:00
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
|
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
2025-03-18 13:06:42 +00:00
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
|
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
2025-03-18 13:06:42 +00:00
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
|
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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,
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-18 13:06:42 +00:00
|
|
|
switch {
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
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
|
|
|
|
|
|
2025-03-18 13:06:42 +00:00
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
|
|
|
var dest InvalidRequest
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON400 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
|
|
|
var dest Unauthorized
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON401 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
|
|
|
var dest TooManyRequests
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON429 = &dest
|
|
|
|
|
|
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500:
|
|
|
|
|
var dest InternalError
|
|
|
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
response.JSON500 = &dest
|
|
|
|
|
|
2025-01-15 19:45:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return response, nil
|
|
|
|
|
}
|