2eff52877b
retrieve document by id and tests * working * missing files
11352 lines
341 KiB
Go
11352 lines
341 KiB
Go
// Package queryapi provides primitives to interact with the openapi HTTP API.
|
|
//
|
|
// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version 2.4.1 DO NOT EDIT.
|
|
package queryapi
|
|
|
|
import (
|
|
"bytes"
|
|
"context"
|
|
"encoding/json"
|
|
"fmt"
|
|
"io"
|
|
"net/http"
|
|
"net/url"
|
|
"strings"
|
|
"time"
|
|
|
|
"github.com/oapi-codegen/nullable"
|
|
"github.com/oapi-codegen/runtime"
|
|
openapi_types "github.com/oapi-codegen/runtime/types"
|
|
)
|
|
|
|
const (
|
|
CognitoAuthScopes = "cognitoAuth.Scopes"
|
|
JwtAuthScopes = "jwtAuth.Scopes"
|
|
)
|
|
|
|
// Defines values for AdminUserActionResponseAction.
|
|
const (
|
|
Disable AdminUserActionResponseAction = "disable"
|
|
Enable AdminUserActionResponseAction = "enable"
|
|
)
|
|
|
|
// Defines values for BatchDocumentOutcomeOutcome.
|
|
const (
|
|
CleanFailed BatchDocumentOutcomeOutcome = "clean_failed"
|
|
CleanPassed BatchDocumentOutcomeOutcome = "clean_passed"
|
|
Duplicate BatchDocumentOutcomeOutcome = "duplicate"
|
|
FailedOpen BatchDocumentOutcomeOutcome = "failed_open"
|
|
FailedRead BatchDocumentOutcomeOutcome = "failed_read"
|
|
FailedS3Upload BatchDocumentOutcomeOutcome = "failed_s3_upload"
|
|
FailedUpload BatchDocumentOutcomeOutcome = "failed_upload"
|
|
InitComplete BatchDocumentOutcomeOutcome = "init_complete"
|
|
InitDuplicate BatchDocumentOutcomeOutcome = "init_duplicate"
|
|
InvalidType BatchDocumentOutcomeOutcome = "invalid_type"
|
|
Submitted BatchDocumentOutcomeOutcome = "submitted"
|
|
SyncComplete BatchDocumentOutcomeOutcome = "sync_complete"
|
|
SyncSkipped BatchDocumentOutcomeOutcome = "sync_skipped"
|
|
)
|
|
|
|
// Defines values for BatchStatus.
|
|
const (
|
|
BatchStatusCancelled BatchStatus = "cancelled"
|
|
BatchStatusCompleted BatchStatus = "completed"
|
|
BatchStatusFailed BatchStatus = "failed"
|
|
BatchStatusProcessing BatchStatus = "processing"
|
|
)
|
|
|
|
// Defines values for ClientStatus.
|
|
const (
|
|
INSYNC ClientStatus = "IN_SYNC"
|
|
NOTSYNCED ClientStatus = "NOT_SYNCED"
|
|
NOTSYNCING ClientStatus = "NOT_SYNCING"
|
|
)
|
|
|
|
// Defines values for ExportStatus.
|
|
const (
|
|
ExportStatusCompleted ExportStatus = "completed"
|
|
ExportStatusFailed ExportStatus = "failed"
|
|
ExportStatusInProgress ExportStatus = "in_progress"
|
|
)
|
|
|
|
// Defines values for FieldFilterCondition.
|
|
const (
|
|
ClosedInterval FieldFilterCondition = "closed_interval"
|
|
Exclude FieldFilterCondition = "exclude"
|
|
GreaterThan FieldFilterCondition = "greater_than"
|
|
Include FieldFilterCondition = "include"
|
|
LeftClosedInterval FieldFilterCondition = "left_closed_interval"
|
|
LessThan FieldFilterCondition = "less_than"
|
|
OpenInterval FieldFilterCondition = "open_interval"
|
|
RightClosedInterval FieldFilterCondition = "right_closed_interval"
|
|
)
|
|
|
|
// 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 role keys to assign in Permit.io (e.g., super_admin, user_admin, auditor, client_user). Roles must exist in your Permit.io environment. Invalid roles fail silently - check roles_assigned in response.
|
|
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 authorization system. If false, user exists in Cognito (can authenticate) but not in Permit.io (has no authorization/permissions). Manual sync or retry may be required.
|
|
PermitSynced bool `json:"permit_synced"`
|
|
|
|
// RolesAssigned Roles that were successfully assigned in Permit.io. May be a subset of requested roles if some failed. Compare with requested roles array to detect assignment failures. If null or empty, no roles were assigned (user has no permissions). Only present if permit_synced is true.
|
|
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. Only populated by GET /admin/users/{email}. Not populated by GET /admin/users (list endpoint) for performance reasons.
|
|
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 role keys to assign in Permit.io - REPLACES all existing roles (not additive). To add a role, include all current roles plus the new one. To remove a role, omit it from the array. Roles must exist in Permit.io environment. Invalid roles fail silently - check response.roles for final state. Omit this field entirely to leave roles unchanged.
|
|
Roles *[]string `json:"roles,omitempty"`
|
|
}
|
|
|
|
// ArrayFieldItem Single row of array field data (112 fields forming one row)
|
|
type ArrayFieldItem struct {
|
|
AareteDerivedAdditionRateChangeTimeline *string `json:"aareteDerivedAdditionRateChangeTimeline,omitempty"`
|
|
AareteDerivedClaimTypeCd *string `json:"aareteDerivedClaimTypeCd,omitempty"`
|
|
AareteDerivedFeeSchedule *string `json:"aareteDerivedFeeSchedule,omitempty"`
|
|
AareteDerivedFeeScheduleVersion *string `json:"aareteDerivedFeeScheduleVersion,omitempty"`
|
|
AareteDerivedGrouperVersion *string `json:"aareteDerivedGrouperVersion,omitempty"`
|
|
AareteDerivedLob *string `json:"aareteDerivedLob,omitempty"`
|
|
AareteDerivedNetwork *string `json:"aareteDerivedNetwork,omitempty"`
|
|
AareteDerivedProduct *string `json:"aareteDerivedProduct,omitempty"`
|
|
AareteDerivedProgram *string `json:"aareteDerivedProgram,omitempty"`
|
|
AareteDerivedProvType *string `json:"aareteDerivedProvType,omitempty"`
|
|
AareteDerivedReimbMethod *string `json:"aareteDerivedReimbMethod,omitempty"`
|
|
AdditionDesc *string `json:"additionDesc,omitempty"`
|
|
AdditionMaxFeeRateInc *float64 `json:"additionMaxFeeRateInc,omitempty"`
|
|
AdditionMaxPctRateInc *float64 `json:"additionMaxPctRateInc,omitempty"`
|
|
AuthAdmitTypeDesc *string `json:"authAdmitTypeDesc,omitempty"`
|
|
BillTypeCd *string `json:"billTypeCd,omitempty"`
|
|
BillTypeCdDesc *string `json:"billTypeCdDesc,omitempty"`
|
|
CarveoutCd *string `json:"carveoutCd,omitempty"`
|
|
CarveoutInd *bool `json:"carveoutInd,omitempty"`
|
|
ClaimAdmitTypeCd *string `json:"claimAdmitTypeCd,omitempty"`
|
|
ClaimStatusCd *string `json:"claimStatusCd,omitempty"`
|
|
ClaimStatusCdDesc *string `json:"claimStatusCdDesc,omitempty"`
|
|
Cpt4ProcCd *string `json:"cpt4ProcCd,omitempty"`
|
|
Cpt4ProcCdDesc *string `json:"cpt4ProcCdDesc,omitempty"`
|
|
Cpt4ProcMod *string `json:"cpt4ProcMod,omitempty"`
|
|
Cpt4ProcModDesc *string `json:"cpt4ProcModDesc,omitempty"`
|
|
DefaultInd *bool `json:"defaultInd,omitempty"`
|
|
DiagCd *string `json:"diagCd,omitempty"`
|
|
DiagCdDesc *string `json:"diagCdDesc,omitempty"`
|
|
DshFeeRate *float64 `json:"dshFeeRate,omitempty"`
|
|
DshInd *bool `json:"dshInd,omitempty"`
|
|
DshPctRate *float64 `json:"dshPctRate,omitempty"`
|
|
ExhibitPage *string `json:"exhibitPage,omitempty"`
|
|
ExhibitTitle *string `json:"exhibitTitle,omitempty"`
|
|
FacilityAdjustmentTerm *string `json:"facilityAdjustmentTerm,omitempty"`
|
|
GmeFeeRate *float64 `json:"gmeFeeRate,omitempty"`
|
|
GmeInd *bool `json:"gmeInd,omitempty"`
|
|
GmePctRate *float64 `json:"gmePctRate,omitempty"`
|
|
GreaterOfInd *bool `json:"greaterOfInd,omitempty"`
|
|
GrouperAlternativeLevelOfCare *string `json:"grouperAlternativeLevelOfCare,omitempty"`
|
|
GrouperBaseRate *float64 `json:"grouperBaseRate,omitempty"`
|
|
GrouperCd *string `json:"grouperCd,omitempty"`
|
|
GrouperCdDesc *string `json:"grouperCdDesc,omitempty"`
|
|
GrouperHacInd *bool `json:"grouperHacInd,omitempty"`
|
|
GrouperPctRate *float64 `json:"grouperPctRate,omitempty"`
|
|
GrouperReadmissionsInd *bool `json:"grouperReadmissionsInd,omitempty"`
|
|
GrouperRiskOfMortalitySubclass *string `json:"grouperRiskOfMortalitySubclass,omitempty"`
|
|
GrouperSeverity *string `json:"grouperSeverity,omitempty"`
|
|
GrouperSeverityInd *bool `json:"grouperSeverityInd,omitempty"`
|
|
GrouperTransferInd *bool `json:"grouperTransferInd,omitempty"`
|
|
GrouperType *string `json:"grouperType,omitempty"`
|
|
ImeFeeRate *float64 `json:"imeFeeRate,omitempty"`
|
|
ImeInd *bool `json:"imeInd,omitempty"`
|
|
ImePctRate *float64 `json:"imePctRate,omitempty"`
|
|
LesserOfInd *bool `json:"lesserOfInd,omitempty"`
|
|
LobProductRelationship *string `json:"lobProductRelationship,omitempty"`
|
|
LobProgramRelationship *string `json:"lobProgramRelationship,omitempty"`
|
|
NdcCd *string `json:"ndcCd,omitempty"`
|
|
NdcCdDesc *string `json:"ndcCdDesc,omitempty"`
|
|
NtapFeeRate *float64 `json:"ntapFeeRate,omitempty"`
|
|
NtapInd *bool `json:"ntapInd,omitempty"`
|
|
NtapPctRate *float64 `json:"ntapPctRate,omitempty"`
|
|
OutlierExclusionCd *string `json:"outlierExclusionCd,omitempty"`
|
|
OutlierExclusionCdDesc *string `json:"outlierExclusionCdDesc,omitempty"`
|
|
OutlierFirstDollarInd *bool `json:"outlierFirstDollarInd,omitempty"`
|
|
OutlierFixedLossNbrDaysThreshold *float64 `json:"outlierFixedLossNbrDaysThreshold,omitempty"`
|
|
OutlierFixedLossThreshold *float64 `json:"outlierFixedLossThreshold,omitempty"`
|
|
OutlierMaximum *float64 `json:"outlierMaximum,omitempty"`
|
|
OutlierMaximumFrequency *float64 `json:"outlierMaximumFrequency,omitempty"`
|
|
OutlierPctRate *float64 `json:"outlierPctRate,omitempty"`
|
|
OutlierTerm *string `json:"outlierTerm,omitempty"`
|
|
PatientAgeMax *string `json:"patientAgeMax,omitempty"`
|
|
PatientAgeMin *string `json:"patientAgeMin,omitempty"`
|
|
PlaceOfServiceCd *string `json:"placeOfServiceCd,omitempty"`
|
|
PlaceOfServiceCdDesc *string `json:"placeOfServiceCdDesc,omitempty"`
|
|
ProvSpecialtyCd *string `json:"provSpecialtyCd,omitempty"`
|
|
ProvSpecialtyCdDesc *string `json:"provSpecialtyCdDesc,omitempty"`
|
|
ProvTaxonomyCd *string `json:"provTaxonomyCd,omitempty"`
|
|
ProvTaxonomyCdDesc *string `json:"provTaxonomyCdDesc,omitempty"`
|
|
RangeNbrDays *string `json:"rangeNbrDays,omitempty"`
|
|
RateEscalatorDesc *string `json:"rateEscalatorDesc,omitempty"`
|
|
RateEscalatorInd *bool `json:"rateEscalatorInd,omitempty"`
|
|
RateEscalatorMaxRateIncPct *float64 `json:"rateEscalatorMaxRateIncPct,omitempty"`
|
|
RateEscalatorRateChangeTimeline *float64 `json:"rateEscalatorRateChangeTimeline,omitempty"`
|
|
ReimbConversionFactor *float64 `json:"reimbConversionFactor,omitempty"`
|
|
ReimbEffectiveDt *openapi_types.Date `json:"reimbEffectiveDt,omitempty"`
|
|
ReimbFeeRate *float64 `json:"reimbFeeRate,omitempty"`
|
|
ReimbPctRate *float64 `json:"reimbPctRate,omitempty"`
|
|
ReimbProvName *string `json:"reimbProvName,omitempty"`
|
|
ReimbProvNpi *string `json:"reimbProvNpi,omitempty"`
|
|
ReimbProvTin *string `json:"reimbProvTin,omitempty"`
|
|
ReimbTerm *string `json:"reimbTerm,omitempty"`
|
|
ReimbTerminationDt *openapi_types.Date `json:"reimbTerminationDt,omitempty"`
|
|
RevenueCd *string `json:"revenueCd,omitempty"`
|
|
RevenueCdDesc *string `json:"revenueCdDesc,omitempty"`
|
|
ServiceTerm *string `json:"serviceTerm,omitempty"`
|
|
StopLossDailyMaxRate *float64 `json:"stopLossDailyMaxRate,omitempty"`
|
|
StopLossExclusionCd *string `json:"stopLossExclusionCd,omitempty"`
|
|
StopLossExclusionDesc *string `json:"stopLossExclusionDesc,omitempty"`
|
|
StopLossFirstDollarInd *bool `json:"stopLossFirstDollarInd,omitempty"`
|
|
StopLossFixedLossThreshold *float64 `json:"stopLossFixedLossThreshold,omitempty"`
|
|
StopLossMaximum *float64 `json:"stopLossMaximum,omitempty"`
|
|
StopLossMaximumFrequency *float64 `json:"stopLossMaximumFrequency,omitempty"`
|
|
StopLossPctRateOnExcessCharges *float64 `json:"stopLossPctRateOnExcessCharges,omitempty"`
|
|
StopLossRangeNbrDays *float64 `json:"stopLossRangeNbrDays,omitempty"`
|
|
StopLossTerm *string `json:"stopLossTerm,omitempty"`
|
|
TriggerBaseThreshold *float64 `json:"triggerBaseThreshold,omitempty"`
|
|
TriggerCapThresholdAmt *float64 `json:"triggerCapThresholdAmt,omitempty"`
|
|
UcFeeRate *float64 `json:"ucFeeRate,omitempty"`
|
|
UcInd *bool `json:"ucInd,omitempty"`
|
|
UcPctRate *float64 `json:"ucPctRate,omitempty"`
|
|
UnitOfMeasure *string `json:"unitOfMeasure,omitempty"`
|
|
}
|
|
|
|
// BatchDocumentOutcome Per-file outcome from batch extraction and pipeline processing
|
|
type BatchDocumentOutcome struct {
|
|
// CleanFailReason Specific clean validation failure reason when outcome is clean_failed. Null otherwise.
|
|
CleanFailReason nullable.Nullable[string] `json:"clean_fail_reason,omitempty"`
|
|
|
|
// CreatedAt When the file was first extracted from the ZIP
|
|
CreatedAt *time.Time `json:"created_at,omitempty"`
|
|
|
|
// DocumentId Assigned document ID (null for files that never became documents)
|
|
DocumentId nullable.Nullable[openapi_types.UUID] `json:"document_id,omitempty"`
|
|
|
|
// ErrorDetail Human-readable error message for failure outcomes
|
|
ErrorDetail nullable.Nullable[string] `json:"error_detail,omitempty"`
|
|
|
|
// Filename Original filename from the ZIP archive
|
|
Filename string `json:"filename"`
|
|
|
|
// Outcome Current processing status
|
|
Outcome BatchDocumentOutcomeOutcome `json:"outcome"`
|
|
|
|
// UpdatedAt When the outcome was last updated by a pipeline stage
|
|
UpdatedAt *time.Time `json:"updated_at,omitempty"`
|
|
}
|
|
|
|
// BatchDocumentOutcomeOutcome Current processing status
|
|
type BatchDocumentOutcomeOutcome string
|
|
|
|
// 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"`
|
|
|
|
// DocumentOutcomes Per-file outcome tracking for all files in the batch
|
|
DocumentOutcomes *[]BatchDocumentOutcome `json:"document_outcomes,omitempty"`
|
|
|
|
// 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"`
|
|
}
|
|
|
|
// ClientCanSync If the client is allowing active syncs
|
|
type ClientCanSync = bool
|
|
|
|
// ClientCreate The properties for creation.
|
|
type ClientCreate struct {
|
|
// Id The client external id
|
|
Id ClientID `json:"id"`
|
|
|
|
// Name The client name
|
|
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"`
|
|
}
|
|
|
|
// ClientListResponse Response containing a list of all clients.
|
|
type ClientListResponse struct {
|
|
// Clients List of clients in the system.
|
|
Clients []DocClient `json:"clients"`
|
|
|
|
// TotalCount Total number of clients.
|
|
TotalCount int32 `json:"totalCount"`
|
|
}
|
|
|
|
// ClientName The client name
|
|
type ClientName = string
|
|
|
|
// ClientStatus Specifies the status of a client.
|
|
type ClientStatus string
|
|
|
|
// ClientStatusBody A client status information object.
|
|
type ClientStatusBody struct {
|
|
// Status Specifies the status of a client.
|
|
Status ClientStatus `json:"status"`
|
|
}
|
|
|
|
// ClientUpdate The properties that may be updated.
|
|
type ClientUpdate struct {
|
|
// CanSync If the client is allowing active syncs
|
|
CanSync *ClientCanSync `json:"can_sync,omitempty"`
|
|
|
|
// Name The client name
|
|
Name *ClientName `json:"name,omitempty"`
|
|
}
|
|
|
|
// CodeVersion The desired code version.
|
|
type CodeVersion = int64
|
|
|
|
// Collector Collector model. Note - minimum_text_version has been removed since text extraction is deprecated.
|
|
type Collector struct {
|
|
// ActiveVersion The desired version.
|
|
ActiveVersion Version `json:"active_version"`
|
|
|
|
// ClientId The client external id
|
|
ClientId ClientID `json:"client_id"`
|
|
|
|
// LatestVersion The desired version.
|
|
LatestVersion Version `json:"latest_version"`
|
|
|
|
// MinimumCleanerVersion The desired code version.
|
|
MinimumCleanerVersion CodeVersion `json:"minimum_cleaner_version"`
|
|
}
|
|
|
|
// CollectorFieldName The output field name.
|
|
type CollectorFieldName = string
|
|
|
|
// CollectorSet Payload for updating a Collector. Note - minimum_text_version has been removed.
|
|
type CollectorSet struct {
|
|
// ActiveVersion The desired version.
|
|
ActiveVersion *Version `json:"active_version,omitempty"`
|
|
|
|
// MinimumCleanerVersion The desired code version.
|
|
MinimumCleanerVersion *CodeVersion `json:"minimum_cleaner_version,omitempty"`
|
|
}
|
|
|
|
// DeleteResponse Response for hard-delete operations when verbose=true
|
|
type DeleteResponse struct {
|
|
// DeletedDocuments S3 paths of orphaned source documents (only populated when verbose=true)
|
|
DeletedDocuments []struct {
|
|
// DocumentId ID of the deleted document
|
|
DocumentId openapi_types.UUID `json:"documentId"`
|
|
|
|
// S3Path Full S3 path (s3://bucket/key) of the orphaned source file
|
|
S3Path string `json:"s3Path"`
|
|
} `json:"deletedDocuments"`
|
|
}
|
|
|
|
// DocClient The properties of a client.
|
|
type DocClient struct {
|
|
// CanSync If the client is allowing active syncs
|
|
CanSync ClientCanSync `json:"can_sync"`
|
|
|
|
// Id The client external id
|
|
Id ClientID `json:"id"`
|
|
|
|
// Name The client name
|
|
Name ClientName `json:"name"`
|
|
}
|
|
|
|
// DocumentEnriched Enriched document details with additional metadata
|
|
type DocumentEnriched struct {
|
|
// ClientId The client external id
|
|
ClientId ClientID `json:"client_id"`
|
|
|
|
// FileSizeBytes File size in bytes (null for legacy documents)
|
|
FileSizeBytes *int64 `json:"fileSizeBytes,omitempty"`
|
|
|
|
// Filename Original filename of the document
|
|
Filename *string `json:"filename,omitempty"`
|
|
|
|
// FolderId Parent folder ID, null if document is not in a folder
|
|
FolderId *openapi_types.UUID `json:"folderId,omitempty"`
|
|
|
|
// HasTextRecord Whether a text extraction (field extraction) record exists for this document
|
|
HasTextRecord bool `json:"hasTextRecord"`
|
|
|
|
// Hash The document hash
|
|
Hash Hash `json:"hash"`
|
|
|
|
// Id The document id.
|
|
Id DocumentID `json:"id"`
|
|
|
|
// Labels All labels applied to this document
|
|
Labels []LabelRecord `json:"labels"`
|
|
|
|
// OriginalPath Original path provided during upload (immutable)
|
|
OriginalPath *string `json:"originalPath,omitempty"`
|
|
|
|
// TextRecord Field extraction with version information
|
|
TextRecord *FieldExtractionResponse `json:"textRecord,omitempty"`
|
|
}
|
|
|
|
// DocumentID The document id.
|
|
type DocumentID = openapi_types.UUID
|
|
|
|
// DocumentInFolder Document within a folder with enriched metadata (lighter format, excludes client_id and fields)
|
|
type DocumentInFolder struct {
|
|
// FileSizeBytes File size in bytes (null for legacy documents)
|
|
FileSizeBytes *int64 `json:"fileSizeBytes,omitempty"`
|
|
|
|
// Filename Original filename of the document
|
|
Filename *string `json:"filename,omitempty"`
|
|
|
|
// FolderId Parent folder ID
|
|
FolderId *openapi_types.UUID `json:"folderId,omitempty"`
|
|
|
|
// HasTextRecord Whether a text extraction record exists for this document
|
|
HasTextRecord bool `json:"hasTextRecord"`
|
|
|
|
// Hash The document hash
|
|
Hash Hash `json:"hash"`
|
|
|
|
// Id The document id.
|
|
Id DocumentID `json:"id"`
|
|
|
|
// Labels All labels applied to this document
|
|
Labels []LabelRecord `json:"labels"`
|
|
|
|
// OriginalPath Original path provided during upload (immutable)
|
|
OriginalPath *string `json:"originalPath,omitempty"`
|
|
|
|
// TextRecord Field extraction with version information
|
|
TextRecord *FieldExtractionResponse `json:"textRecord,omitempty"`
|
|
}
|
|
|
|
// DocumentSummary The document summary properties.
|
|
type DocumentSummary struct {
|
|
// Hash The document hash
|
|
Hash Hash `json:"hash"`
|
|
|
|
// Id The document id.
|
|
Id DocumentID `json:"id"`
|
|
}
|
|
|
|
// ErrorMessage Description of error
|
|
type ErrorMessage struct {
|
|
// Details Additional error details for debugging (sanitized).
|
|
Details *string `json:"details,omitempty"`
|
|
|
|
// ErrorType Machine-readable error classification for programmatic handling.
|
|
ErrorType *string `json:"error_type,omitempty"`
|
|
|
|
// Message Message describing the cause.
|
|
Message string `json:"message"`
|
|
}
|
|
|
|
// EulaAgreement EULA agreement record
|
|
type EulaAgreement struct {
|
|
// AgreedAt When the agreement was recorded
|
|
AgreedAt time.Time `json:"agreedAt"`
|
|
|
|
// AgreedFromIp IP address from which the user agreed
|
|
AgreedFromIp string `json:"agreedFromIp"`
|
|
|
|
// CognitoSubjectId User's Cognito subject ID
|
|
CognitoSubjectId string `json:"cognitoSubjectId"`
|
|
|
|
// EulaVersion EULA version string
|
|
EulaVersion string `json:"eulaVersion"`
|
|
|
|
// EulaVersionId EULA version ID
|
|
EulaVersionId openapi_types.UUID `json:"eulaVersionId"`
|
|
|
|
// EulaVersionTitle EULA version title (for user history view)
|
|
EulaVersionTitle *string `json:"eulaVersionTitle,omitempty"`
|
|
|
|
// Id Agreement record ID
|
|
Id openapi_types.UUID `json:"id"`
|
|
|
|
// UserEmail User identifier at time of agreement (email, username, or subject ID)
|
|
UserEmail string `json:"userEmail"`
|
|
}
|
|
|
|
// EulaAgreementList Paginated list of EULA agreements
|
|
type EulaAgreementList struct {
|
|
// Agreements List of EULA agreements
|
|
Agreements []EulaAgreement `json:"agreements"`
|
|
|
|
// HasMore Whether more pages are available
|
|
HasMore *bool `json:"has_more,omitempty"`
|
|
|
|
// Page Current page number
|
|
Page int32 `json:"page"`
|
|
|
|
// PageSize Number of items per page
|
|
PageSize int32 `json:"page_size"`
|
|
|
|
// Total Total number of agreements matching filter
|
|
Total int32 `json:"total"`
|
|
}
|
|
|
|
// EulaAgreementResponse Response after recording an agreement
|
|
type EulaAgreementResponse struct {
|
|
// AgreedAt When the agreement was recorded
|
|
AgreedAt time.Time `json:"agreedAt"`
|
|
|
|
// EulaVersion EULA version string
|
|
EulaVersion string `json:"eulaVersion"`
|
|
|
|
// EulaVersionId EULA version ID
|
|
EulaVersionId openapi_types.UUID `json:"eulaVersionId"`
|
|
|
|
// Id Agreement record ID
|
|
Id openapi_types.UUID `json:"id"`
|
|
}
|
|
|
|
// EulaCompliancePagination Pagination information for compliance report
|
|
type EulaCompliancePagination struct {
|
|
// Page Current page number
|
|
Page int32 `json:"page"`
|
|
|
|
// PageSize Number of items per page
|
|
PageSize int32 `json:"pageSize"`
|
|
|
|
// TotalItems Total number of items
|
|
TotalItems int32 `json:"totalItems"`
|
|
|
|
// TotalPages Total number of pages
|
|
TotalPages int32 `json:"totalPages"`
|
|
}
|
|
|
|
// EulaComplianceReport EULA compliance report with user agreement status
|
|
type EulaComplianceReport struct {
|
|
// EulaVersion Abbreviated EULA version for lists
|
|
EulaVersion EulaVersionSummary `json:"eulaVersion"`
|
|
|
|
// Pagination Pagination information for compliance report
|
|
Pagination EulaCompliancePagination `json:"pagination"`
|
|
|
|
// Summary Summary statistics for compliance report
|
|
Summary EulaComplianceSummary `json:"summary"`
|
|
|
|
// Users Unified list of users with agreement status
|
|
Users []EulaComplianceUser `json:"users"`
|
|
}
|
|
|
|
// EulaComplianceSummary Summary statistics for compliance report
|
|
type EulaComplianceSummary struct {
|
|
// AgreedCount Number of users who have agreed
|
|
AgreedCount int32 `json:"agreedCount"`
|
|
|
|
// CompliancePercentage Percentage of users who have agreed
|
|
CompliancePercentage float32 `json:"compliancePercentage"`
|
|
|
|
// NotAgreedCount Number of users who have not agreed
|
|
NotAgreedCount int32 `json:"notAgreedCount"`
|
|
|
|
// TotalUsers Total number of users in the system
|
|
TotalUsers int32 `json:"totalUsers"`
|
|
}
|
|
|
|
// EulaComplianceUser User record in compliance report
|
|
type EulaComplianceUser struct {
|
|
// Agreed Whether the user has agreed to this EULA version
|
|
Agreed bool `json:"agreed"`
|
|
|
|
// AgreedAt When the user agreed (null if not agreed)
|
|
AgreedAt nullable.Nullable[time.Time] `json:"agreedAt,omitempty"`
|
|
|
|
// AgreedFromIp IP address from which the user agreed (null if not agreed)
|
|
AgreedFromIp nullable.Nullable[string] `json:"agreedFromIp,omitempty"`
|
|
|
|
// CognitoSubjectId User's Cognito subject ID
|
|
CognitoSubjectId string `json:"cognitoSubjectId"`
|
|
|
|
// CurrentEmail User's current email from Cognito (may be empty or a non-email identifier)
|
|
CurrentEmail string `json:"currentEmail"`
|
|
|
|
// Email User identifier at time of agreement (email, username, or subject ID; null if not agreed)
|
|
Email nullable.Nullable[string] `json:"email,omitempty"`
|
|
}
|
|
|
|
// EulaPublicResponse Public response for current EULA version
|
|
type EulaPublicResponse struct {
|
|
// Content Full EULA text in Markdown format
|
|
Content string `json:"content"`
|
|
|
|
// EffectiveDate When this version became effective (optional)
|
|
EffectiveDate nullable.Nullable[time.Time] `json:"effectiveDate,omitempty"`
|
|
|
|
// Id EULA version ID
|
|
Id openapi_types.UUID `json:"id"`
|
|
|
|
// Title Human-readable title
|
|
Title string `json:"title"`
|
|
|
|
// Version Version string
|
|
Version string `json:"version"`
|
|
}
|
|
|
|
// EulaStatusResponse User's EULA agreement status
|
|
type EulaStatusResponse struct {
|
|
// AgreedAt When the user agreed (null if not agreed)
|
|
AgreedAt nullable.Nullable[time.Time] `json:"agreedAt,omitempty"`
|
|
|
|
// AgreedVersion Version the user agreed to (null if not agreed)
|
|
AgreedVersion nullable.Nullable[string] `json:"agreedVersion,omitempty"`
|
|
|
|
// CurrentVersion Current EULA version string
|
|
CurrentVersion string `json:"currentVersion"`
|
|
|
|
// CurrentVersionId EULA version ID
|
|
CurrentVersionId openapi_types.UUID `json:"currentVersionId"`
|
|
|
|
// HasAgreed Whether the user has agreed to the current EULA
|
|
HasAgreed bool `json:"hasAgreed"`
|
|
}
|
|
|
|
// EulaVersion Full EULA version details
|
|
type EulaVersion struct {
|
|
// ActivatedAt When this version was activated
|
|
ActivatedAt nullable.Nullable[time.Time] `json:"activatedAt,omitempty"`
|
|
|
|
// ActivatedBy Identifier of admin who activated this version (email, username, or subject ID)
|
|
ActivatedBy nullable.Nullable[string] `json:"activatedBy,omitempty"`
|
|
|
|
// Content Full EULA text in Markdown format
|
|
Content string `json:"content"`
|
|
|
|
// CreatedAt Creation timestamp
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
|
|
// CreatedBy Identifier of admin who created this version (email, username, or subject ID)
|
|
CreatedBy string `json:"createdBy"`
|
|
|
|
// EffectiveDate When this version becomes effective (optional)
|
|
EffectiveDate nullable.Nullable[time.Time] `json:"effectiveDate,omitempty"`
|
|
|
|
// Id EULA version ID
|
|
Id openapi_types.UUID `json:"id"`
|
|
|
|
// IsCurrent Whether this is the current active version
|
|
IsCurrent bool `json:"isCurrent"`
|
|
|
|
// Title Human-readable title
|
|
Title string `json:"title"`
|
|
|
|
// Version Version string (e.g., "1.0", "2024-01")
|
|
Version string `json:"version"`
|
|
}
|
|
|
|
// EulaVersionCreate Request body for creating a new EULA version
|
|
type EulaVersionCreate struct {
|
|
// Content Full EULA text in Markdown format
|
|
Content string `json:"content"`
|
|
|
|
// EffectiveDate When this version becomes effective (optional)
|
|
EffectiveDate nullable.Nullable[time.Time] `json:"effectiveDate,omitempty"`
|
|
|
|
// Title Human-readable title
|
|
Title string `json:"title"`
|
|
|
|
// Version Version string (must be unique)
|
|
Version string `json:"version"`
|
|
}
|
|
|
|
// EulaVersionList Paginated list of EULA versions
|
|
type EulaVersionList struct {
|
|
// HasMore Whether more pages are available
|
|
HasMore *bool `json:"has_more,omitempty"`
|
|
|
|
// Page Current page number
|
|
Page int32 `json:"page"`
|
|
|
|
// PageSize Number of items per page
|
|
PageSize int32 `json:"page_size"`
|
|
|
|
// Total Total number of EULA versions
|
|
Total int32 `json:"total"`
|
|
|
|
// Versions List of EULA versions
|
|
Versions []EulaVersion `json:"versions"`
|
|
}
|
|
|
|
// EulaVersionSummary Abbreviated EULA version for lists
|
|
type EulaVersionSummary struct {
|
|
// EffectiveDate When this version becomes effective (optional)
|
|
EffectiveDate nullable.Nullable[time.Time] `json:"effectiveDate,omitempty"`
|
|
|
|
// Id EULA version ID
|
|
Id openapi_types.UUID `json:"id"`
|
|
|
|
// IsCurrent Whether this is the current active version
|
|
IsCurrent bool `json:"isCurrent"`
|
|
|
|
// Title Human-readable title
|
|
Title string `json:"title"`
|
|
|
|
// Version Version string
|
|
Version string `json:"version"`
|
|
}
|
|
|
|
// EulaVersionUpdate Request body for updating EULA version metadata
|
|
type EulaVersionUpdate struct {
|
|
// EffectiveDate When this version becomes effective
|
|
EffectiveDate *time.Time `json:"effectiveDate,omitempty"`
|
|
|
|
// Title Human-readable title
|
|
Title *string `json:"title,omitempty"`
|
|
}
|
|
|
|
// ExportDetails Payload for export trigger response.
|
|
type ExportDetails struct {
|
|
// ClientId The client external id
|
|
ClientId ClientID `json:"client_id"`
|
|
|
|
// OutputLocation The location in which the export zip file will be found.
|
|
OutputLocation *string `json:"output_location,omitempty"`
|
|
|
|
// Status The possible export states.
|
|
Status ExportStatus `json:"status"`
|
|
}
|
|
|
|
// ExportID The export id.
|
|
type ExportID = openapi_types.UUID
|
|
|
|
// ExportStatus The possible export states.
|
|
type ExportStatus string
|
|
|
|
// ExportTrigger Payload for triggering an export.
|
|
type ExportTrigger struct {
|
|
// FieldFilters Filter the scope based on field output values.
|
|
FieldFilters *[]FieldFilter `json:"field_filters,omitempty"`
|
|
|
|
// IngestionFilters Filter the scope based on ingestion parameters.
|
|
IngestionFilters *struct {
|
|
// EndDate The last date of ingestion.
|
|
EndDate *time.Time `json:"end_date,omitempty"`
|
|
|
|
// StartDate This first date of ingestion.
|
|
StartDate *time.Time `json:"start_date,omitempty"`
|
|
} `json:"ingestion_filters,omitempty"`
|
|
}
|
|
|
|
// FieldExtractionRequest Request to create a new field extraction with single and array fields
|
|
type FieldExtractionRequest struct {
|
|
// ArrayFields Array of field extraction items (all must have consistent structure)
|
|
ArrayFields []ArrayFieldItem `json:"arrayFields"`
|
|
|
|
// CreatedBy Email of user creating the extraction
|
|
CreatedBy openapi_types.Email `json:"createdBy"`
|
|
|
|
// DocumentId The document id.
|
|
DocumentId DocumentID `json:"documentId"`
|
|
|
|
// SingleFields Single-value fields for a document extraction (1:1 relationship)
|
|
SingleFields SingleFields `json:"singleFields"`
|
|
}
|
|
|
|
// FieldExtractionResponse Field extraction with version information
|
|
type FieldExtractionResponse struct {
|
|
// ArrayFields Array of field extraction items
|
|
ArrayFields []ArrayFieldItem `json:"arrayFields"`
|
|
|
|
// CreatedAt Creation timestamp
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
|
|
// CreatedBy Email of user who created this extraction
|
|
CreatedBy openapi_types.Email `json:"createdBy"`
|
|
|
|
// DocumentId The document id.
|
|
DocumentId DocumentID `json:"documentId"`
|
|
|
|
// Id Field extraction ID
|
|
Id openapi_types.UUID `json:"id"`
|
|
|
|
// SingleFields Single-value fields for a document extraction (1:1 relationship)
|
|
SingleFields SingleFields `json:"singleFields"`
|
|
|
|
// Version Version number (1-based)
|
|
Version int32 `json:"version"`
|
|
}
|
|
|
|
// FieldExtractionVersion Field extraction version summary for history
|
|
type FieldExtractionVersion struct {
|
|
// CreatedAt Creation timestamp
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
|
|
// CreatedBy Email of user who created this version
|
|
CreatedBy openapi_types.Email `json:"createdBy"`
|
|
|
|
// DocumentId The document id.
|
|
DocumentId DocumentID `json:"documentId"`
|
|
|
|
// Id Field extraction ID
|
|
Id openapi_types.UUID `json:"id"`
|
|
|
|
// Version Version number (1-based)
|
|
Version int32 `json:"version"`
|
|
}
|
|
|
|
// FieldFilter Filtering a column
|
|
type FieldFilter struct {
|
|
// Condition The possible field filtering conditions.
|
|
Condition FieldFilterCondition `json:"condition"`
|
|
|
|
// FieldName The output field name.
|
|
FieldName CollectorFieldName `json:"field_name"`
|
|
|
|
// Values The values useful to the filter.
|
|
Values []string `json:"values"`
|
|
}
|
|
|
|
// FieldFilterCondition The possible field filtering conditions.
|
|
type FieldFilterCondition string
|
|
|
|
// Folder Folder information for organizing documents
|
|
type Folder struct {
|
|
// ClientId The client external id
|
|
ClientId ClientID `json:"clientId"`
|
|
|
|
// CreatedAt Creation timestamp
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
|
|
// CreatedBy Email of the user who created this folder
|
|
CreatedBy openapi_types.Email `json:"createdBy"`
|
|
|
|
// Id Folder ID
|
|
Id openapi_types.UUID `json:"id"`
|
|
|
|
// Metrics Processing metrics for this folder. Only populated when metrics=true
|
|
// is specified in the request. Null otherwise.
|
|
Metrics nullable.Nullable[FolderMetricsInline] `json:"metrics,omitempty"`
|
|
|
|
// ParentId Parent folder ID
|
|
ParentId nullable.Nullable[openapi_types.UUID] `json:"parentId,omitempty"`
|
|
|
|
// Path Folder path (must start with /). Root folder has path "/".
|
|
Path string `json:"path"`
|
|
}
|
|
|
|
// FolderCreate Request to create a new folder for organizing documents
|
|
type FolderCreate struct {
|
|
// ClientId The client external id
|
|
ClientId ClientID `json:"clientId"`
|
|
|
|
// CreatedBy Email of user who created the folder
|
|
CreatedBy openapi_types.Email `json:"createdBy"`
|
|
|
|
// ParentId Optional parent folder ID
|
|
ParentId *openapi_types.UUID `json:"parentId,omitempty"`
|
|
|
|
// Path Folder path (must start with /). Use "/" for root folder.
|
|
Path string `json:"path"`
|
|
}
|
|
|
|
// FolderList List of folders for a client
|
|
type FolderList struct {
|
|
// Folders List of folders. Each folder includes its ID, path, and parentId.
|
|
// Root-level folders have parentId set to null. Clients can use
|
|
// parentId to reconstruct the folder hierarchy/tree structure.
|
|
Folders []Folder `json:"folders"`
|
|
}
|
|
|
|
// FolderMetrics Processing metrics for a folder including document counts
|
|
type FolderMetrics struct {
|
|
// ByLabel Document counts by label
|
|
ByLabel map[string]int32 `json:"byLabel"`
|
|
|
|
// FolderId Unique identifier for the folder
|
|
FolderId openapi_types.UUID `json:"folderId"`
|
|
|
|
// TotalDocuments Total number of documents in folder
|
|
TotalDocuments int32 `json:"totalDocuments"`
|
|
}
|
|
|
|
// FolderMetricsInline Inline processing metrics for a folder (excludes folderId since it's on parent)
|
|
type FolderMetricsInline struct {
|
|
// ByLabel Document counts by label
|
|
ByLabel map[string]int32 `json:"byLabel"`
|
|
|
|
// TotalDocuments Total number of documents in folder
|
|
TotalDocuments int32 `json:"totalDocuments"`
|
|
}
|
|
|
|
// FolderRename Request to rename an existing folder
|
|
type FolderRename struct {
|
|
// Path New folder path (must start with /). Use "/" for root folder.
|
|
Path string `json:"path"`
|
|
}
|
|
|
|
// Hash The document hash
|
|
type Hash = string
|
|
|
|
// IdMessage A single uuid.
|
|
type IdMessage struct {
|
|
// Id Unique identifier for entity.
|
|
Id openapi_types.UUID `json:"id"`
|
|
}
|
|
|
|
// IdentityResponse Response containing the user's roles and their permissions
|
|
type IdentityResponse struct {
|
|
// Roles List of roles assigned to the user with their permissions
|
|
Roles []IdentityRole `json:"roles"`
|
|
}
|
|
|
|
// IdentityRole A role assigned to the user with its permissions
|
|
type IdentityRole struct {
|
|
// Description Optional description of the role
|
|
Description *string `json:"description,omitempty"`
|
|
|
|
// Key The role key/identifier
|
|
Key string `json:"key"`
|
|
|
|
// Name Human-readable role name
|
|
Name string `json:"name"`
|
|
|
|
// Permissions List of permissions granted by this role
|
|
Permissions []string `json:"permissions"`
|
|
}
|
|
|
|
// LabelApplication Request to apply a workflow label to a document
|
|
type LabelApplication struct {
|
|
// AppliedBy Email of user applying the label
|
|
AppliedBy openapi_types.Email `json:"appliedBy"`
|
|
|
|
// Label Label name (alphanumeric and underscore only)
|
|
Label string `json:"label"`
|
|
}
|
|
|
|
// LabelRecord Record of a label applied to a document
|
|
type LabelRecord struct {
|
|
// AppliedAt Timestamp when label was applied
|
|
AppliedAt time.Time `json:"appliedAt"`
|
|
|
|
// AppliedBy Email of the user who applied this label
|
|
AppliedBy openapi_types.Email `json:"appliedBy"`
|
|
|
|
// DocumentId The document id.
|
|
DocumentId DocumentID `json:"documentId"`
|
|
|
|
// Id Label record ID
|
|
Id openapi_types.UUID `json:"id"`
|
|
|
|
// Label Workflow label name (alphanumeric and underscore only)
|
|
Label string `json:"label"`
|
|
}
|
|
|
|
// ListDocuments The documents in the client.
|
|
type ListDocuments = []DocumentSummary
|
|
|
|
// SingleFields Single-value fields for a document extraction (1:1 relationship)
|
|
type SingleFields struct {
|
|
// AareteDerivedAmendmentNum Amendment number derived by Aarete
|
|
AareteDerivedAmendmentNum *int32 `json:"aareteDerivedAmendmentNum,omitempty"`
|
|
|
|
// AareteDerivedEffectiveDt Contract effective date
|
|
AareteDerivedEffectiveDt *openapi_types.Date `json:"aareteDerivedEffectiveDt,omitempty"`
|
|
|
|
// AareteDerivedTerminationDt Contract termination date
|
|
AareteDerivedTerminationDt *openapi_types.Date `json:"aareteDerivedTerminationDt,omitempty"`
|
|
|
|
// AutoRenewalInd Auto-renewal indicator
|
|
AutoRenewalInd *bool `json:"autoRenewalInd,omitempty"`
|
|
|
|
// AutoRenewalTerm Auto-renewal terms
|
|
AutoRenewalTerm *string `json:"autoRenewalTerm,omitempty"`
|
|
|
|
// ClientName Name of the client
|
|
ClientName *string `json:"clientName,omitempty"`
|
|
|
|
// ContractTitle Title of the contract
|
|
ContractTitle *string `json:"contractTitle,omitempty"`
|
|
|
|
// FileName Original file name
|
|
FileName *string `json:"fileName,omitempty"`
|
|
|
|
// FilenameTin Tax Identification Number from filename
|
|
FilenameTin *string `json:"filenameTin,omitempty"`
|
|
|
|
// PayerName Name of the payer
|
|
PayerName *string `json:"payerName,omitempty"`
|
|
|
|
// PayerState Two-letter state code for payer
|
|
PayerState *string `json:"payerState,omitempty"`
|
|
|
|
// ProvGroupNameFull Full name of provider group
|
|
ProvGroupNameFull *string `json:"provGroupNameFull,omitempty"`
|
|
|
|
// ProvGroupNpi Provider group NPI
|
|
ProvGroupNpi *string `json:"provGroupNpi,omitempty"`
|
|
|
|
// ProvGroupTin Provider group TIN
|
|
ProvGroupTin *string `json:"provGroupTin,omitempty"`
|
|
|
|
// ProvOtherNameFull Full name of other provider
|
|
ProvOtherNameFull *string `json:"provOtherNameFull,omitempty"`
|
|
|
|
// ProvOtherNpi Other provider NPI
|
|
ProvOtherNpi *string `json:"provOtherNpi,omitempty"`
|
|
|
|
// ProvOtherTin Other provider TIN
|
|
ProvOtherTin *string `json:"provOtherTin,omitempty"`
|
|
|
|
// ProviderState Two-letter state code for provider
|
|
ProviderState *string `json:"providerState,omitempty"`
|
|
}
|
|
|
|
// UISetting A UI setting record
|
|
type UISetting struct {
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
Id openapi_types.UUID `json:"id"`
|
|
IsDeleted bool `json:"isDeleted"`
|
|
Key string `json:"key"`
|
|
Namespace string `json:"namespace"`
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
Value map[string]interface{} `json:"value"`
|
|
}
|
|
|
|
// UISettingCreate Request body for creating a UI setting
|
|
type UISettingCreate struct {
|
|
// Key Setting key within the namespace
|
|
Key string `json:"key"`
|
|
|
|
// Namespace Scope for the setting (e.g. demo-dashboard:{userId}, feature-flags:global, saved-filters:{clientId})
|
|
Namespace string `json:"namespace"`
|
|
|
|
// Value JSON value (object) for the setting
|
|
Value map[string]interface{} `json:"value"`
|
|
}
|
|
|
|
// UISettingListResponse List of UI settings
|
|
type UISettingListResponse struct {
|
|
Settings []UISetting `json:"settings"`
|
|
TotalCount int32 `json:"totalCount"`
|
|
}
|
|
|
|
// UISettingUpdate Request body for updating a UI setting
|
|
type UISettingUpdate struct {
|
|
// Value New JSON value for the setting
|
|
Value map[string]interface{} `json:"value"`
|
|
}
|
|
|
|
// Version The desired version.
|
|
type Version = int32
|
|
|
|
// EulaVersionID defines model for EulaVersionID.
|
|
type EulaVersionID = openapi_types.UUID
|
|
|
|
// UISettingID defines model for UISettingID.
|
|
type UISettingID = openapi_types.UUID
|
|
|
|
// 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
|
|
|
|
// InternalError Description of error
|
|
type InternalError = ErrorMessage
|
|
|
|
// InvalidRequest Description of error
|
|
type InvalidRequest = ErrorMessage
|
|
|
|
// NotFound Description of error
|
|
type NotFound = ErrorMessage
|
|
|
|
// TooManyRequests Description of error
|
|
type TooManyRequests = ErrorMessage
|
|
|
|
// Unauthorized Description of error
|
|
type Unauthorized = ErrorMessage
|
|
|
|
// ListEulaVersionsParams defines parameters for ListEulaVersions.
|
|
type ListEulaVersionsParams struct {
|
|
// Page Page number for pagination
|
|
Page *int32 `form:"page,omitempty" json:"page,omitempty"`
|
|
|
|
// PageSize Number of items per page
|
|
PageSize *int32 `form:"page_size,omitempty" json:"page_size,omitempty"`
|
|
}
|
|
|
|
// ListEulaAgreementsParams defines parameters for ListEulaAgreements.
|
|
type ListEulaAgreementsParams struct {
|
|
// Page Page number for pagination
|
|
Page *int32 `form:"page,omitempty" json:"page,omitempty"`
|
|
|
|
// PageSize Number of items per page
|
|
PageSize *int32 `form:"page_size,omitempty" json:"page_size,omitempty"`
|
|
|
|
// VersionId Filter by specific EULA version ID
|
|
VersionId *openapi_types.UUID `form:"version_id,omitempty" json:"version_id,omitempty"`
|
|
|
|
// UserId Filter by Cognito subject ID to see all EULAs a specific user agreed to
|
|
UserId *string `form:"user_id,omitempty" json:"user_id,omitempty"`
|
|
}
|
|
|
|
// GetEulaComplianceParams defines parameters for GetEulaCompliance.
|
|
type GetEulaComplianceParams struct {
|
|
// Page Page number for pagination
|
|
Page *int32 `form:"page,omitempty" json:"page,omitempty"`
|
|
|
|
// PageSize Number of items per page
|
|
PageSize *int32 `form:"page_size,omitempty" json:"page_size,omitempty"`
|
|
|
|
// VersionId Specific EULA version to report on. If omitted, uses current active version.
|
|
VersionId *openapi_types.UUID `form:"version_id,omitempty" json:"version_id,omitempty"`
|
|
|
|
// Agreed Filter by agreement status. True for agreed only, false for not-agreed only.
|
|
Agreed *bool `form:"agreed,omitempty" json:"agreed,omitempty"`
|
|
}
|
|
|
|
// 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"`
|
|
}
|
|
|
|
// DeleteClientParams defines parameters for DeleteClient.
|
|
type DeleteClientParams struct {
|
|
// Confirm Must be set to true to confirm deletion
|
|
Confirm bool `form:"confirm" json:"confirm"`
|
|
|
|
// Verbose When true, returns S3 paths of orphaned source documents in the response body
|
|
Verbose *bool `form:"verbose,omitempty" json:"verbose,omitempty"`
|
|
}
|
|
|
|
// 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"`
|
|
}
|
|
|
|
// 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"`
|
|
}
|
|
|
|
// ListClientFoldersParams defines parameters for ListClientFolders.
|
|
type ListClientFoldersParams struct {
|
|
// Metrics When true, include processing metrics for each folder (document counts by label).
|
|
// Defaults to false for performance reasons.
|
|
Metrics *bool `form:"metrics,omitempty" json:"metrics,omitempty"`
|
|
}
|
|
|
|
// DeleteDocumentParams defines parameters for DeleteDocument.
|
|
type DeleteDocumentParams struct {
|
|
// Verbose When true, returns S3 paths of orphaned source documents in the response body
|
|
Verbose *bool `form:"verbose,omitempty" json:"verbose,omitempty"`
|
|
}
|
|
|
|
// GetDocumentParams defines parameters for GetDocument.
|
|
type GetDocumentParams struct {
|
|
// TextRecord When true, includes the full text extraction record in the response
|
|
TextRecord *bool `form:"textRecord,omitempty" json:"textRecord,omitempty"`
|
|
}
|
|
|
|
// GetCurrentFieldExtractionParams defines parameters for GetCurrentFieldExtraction.
|
|
type GetCurrentFieldExtractionParams struct {
|
|
// DocumentId The document ID
|
|
DocumentId openapi_types.UUID `form:"documentId" json:"documentId"`
|
|
}
|
|
|
|
// GetFieldExtractionHistoryParams defines parameters for GetFieldExtractionHistory.
|
|
type GetFieldExtractionHistoryParams struct {
|
|
// DocumentId The document ID
|
|
DocumentId openapi_types.UUID `form:"documentId" json:"documentId"`
|
|
}
|
|
|
|
// GetFieldExtractionByVersionParams defines parameters for GetFieldExtractionByVersion.
|
|
type GetFieldExtractionByVersionParams struct {
|
|
// DocumentId The document ID
|
|
DocumentId openapi_types.UUID `form:"documentId" json:"documentId"`
|
|
|
|
// Version The version number to retrieve
|
|
Version int64 `form:"version" json:"version"`
|
|
}
|
|
|
|
// DeleteFolderParams defines parameters for DeleteFolder.
|
|
type DeleteFolderParams struct {
|
|
// IncludeDocuments When true, also deletes all documents in the folder tree
|
|
IncludeDocuments *bool `form:"include_documents,omitempty" json:"include_documents,omitempty"`
|
|
|
|
// Verbose When true, returns S3 paths of orphaned source documents in the response body
|
|
Verbose *bool `form:"verbose,omitempty" json:"verbose,omitempty"`
|
|
}
|
|
|
|
// GetFolderDocumentsParams defines parameters for GetFolderDocuments.
|
|
type GetFolderDocumentsParams struct {
|
|
// TextRecord When true, includes the full text extraction record for each document
|
|
TextRecord *bool `form:"textRecord,omitempty" json:"textRecord,omitempty"`
|
|
}
|
|
|
|
// GetDocumentsByLabelParams defines parameters for GetDocumentsByLabel.
|
|
type GetDocumentsByLabelParams struct {
|
|
// ClientId The client ID to filter documents
|
|
ClientId ClientID `form:"clientId" json:"clientId"`
|
|
}
|
|
|
|
// 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"`
|
|
}
|
|
|
|
// ListUISettingsParams defines parameters for ListUISettings.
|
|
type ListUISettingsParams struct {
|
|
// Namespace Filter by namespace (omit to list all).
|
|
Namespace *string `form:"namespace,omitempty" json:"namespace,omitempty"`
|
|
}
|
|
|
|
// CreateEulaVersionJSONRequestBody defines body for CreateEulaVersion for application/json ContentType.
|
|
type CreateEulaVersionJSONRequestBody = EulaVersionCreate
|
|
|
|
// UpdateEulaVersionJSONRequestBody defines body for UpdateEulaVersion for application/json ContentType.
|
|
type UpdateEulaVersionJSONRequestBody = EulaVersionUpdate
|
|
|
|
// CreateAdminUserJSONRequestBody defines body for CreateAdminUser for application/json ContentType.
|
|
type CreateAdminUserJSONRequestBody = AdminUserCreate
|
|
|
|
// UpdateAdminUserJSONRequestBody defines body for UpdateAdminUser for application/json ContentType.
|
|
type UpdateAdminUserJSONRequestBody = AdminUserUpdate
|
|
|
|
// CreateClientJSONRequestBody defines body for CreateClient for application/json ContentType.
|
|
type CreateClientJSONRequestBody = ClientCreate
|
|
|
|
// UpdateClientJSONRequestBody defines body for UpdateClient for application/json ContentType.
|
|
type UpdateClientJSONRequestBody = ClientUpdate
|
|
|
|
// SetCollectorByClientIdJSONRequestBody defines body for SetCollectorByClientId for application/json ContentType.
|
|
type SetCollectorByClientIdJSONRequestBody = CollectorSet
|
|
|
|
// UploadDocumentMultipartRequestBody defines body for UploadDocument for multipart/form-data ContentType.
|
|
type UploadDocumentMultipartRequestBody UploadDocumentMultipartBody
|
|
|
|
// UploadDocumentBatchMultipartRequestBody defines body for UploadDocumentBatch for multipart/form-data ContentType.
|
|
type UploadDocumentBatchMultipartRequestBody UploadDocumentBatchMultipartBody
|
|
|
|
// TriggerExportJSONRequestBody defines body for TriggerExport for application/json ContentType.
|
|
type TriggerExportJSONRequestBody = ExportTrigger
|
|
|
|
// ApplyLabelJSONRequestBody defines body for ApplyLabel for application/json ContentType.
|
|
type ApplyLabelJSONRequestBody = LabelApplication
|
|
|
|
// CreateFieldExtractionJSONRequestBody defines body for CreateFieldExtraction for application/json ContentType.
|
|
type CreateFieldExtractionJSONRequestBody = FieldExtractionRequest
|
|
|
|
// CreateFolderJSONRequestBody defines body for CreateFolder for application/json ContentType.
|
|
type CreateFolderJSONRequestBody = FolderCreate
|
|
|
|
// RenameFolderJSONRequestBody defines body for RenameFolder for application/json ContentType.
|
|
type RenameFolderJSONRequestBody = FolderRename
|
|
|
|
// CreateUISettingJSONRequestBody defines body for CreateUISetting for application/json ContentType.
|
|
type CreateUISettingJSONRequestBody = UISettingCreate
|
|
|
|
// UpdateUISettingJSONRequestBody defines body for UpdateUISetting for application/json ContentType.
|
|
type UpdateUISettingJSONRequestBody = UISettingUpdate
|
|
|
|
// 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 {
|
|
// ListEulaVersions request
|
|
ListEulaVersions(ctx context.Context, params *ListEulaVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// CreateEulaVersionWithBody request with any body
|
|
CreateEulaVersionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
CreateEulaVersion(ctx context.Context, body CreateEulaVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListEulaAgreements request
|
|
ListEulaAgreements(ctx context.Context, params *ListEulaAgreementsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetEulaCompliance request
|
|
GetEulaCompliance(ctx context.Context, params *GetEulaComplianceParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetEulaVersion request
|
|
GetEulaVersion(ctx context.Context, versionId EulaVersionID, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// UpdateEulaVersionWithBody request with any body
|
|
UpdateEulaVersionWithBody(ctx context.Context, versionId EulaVersionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
UpdateEulaVersion(ctx context.Context, versionId EulaVersionID, body UpdateEulaVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ActivateEulaVersion request
|
|
ActivateEulaVersion(ctx context.Context, versionId EulaVersionID, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// 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)
|
|
|
|
// 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)
|
|
|
|
// DeleteClient request
|
|
DeleteClient(ctx context.Context, id ClientID, params *DeleteClientParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetClient request
|
|
GetClient(ctx context.Context, id ClientID, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// UpdateClientWithBody request with any body
|
|
UpdateClientWithBody(ctx context.Context, id ClientID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
UpdateClient(ctx context.Context, id ClientID, body UpdateClientJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetCollectorByClientId request
|
|
GetCollectorByClientId(ctx context.Context, id ClientID, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// SetCollectorByClientIdWithBody request with any body
|
|
SetCollectorByClientIdWithBody(ctx context.Context, id ClientID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
SetCollectorByClientId(ctx context.Context, id ClientID, body SetCollectorByClientIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListDocumentsByClientId request
|
|
ListDocumentsByClientId(ctx context.Context, id ClientID, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// UploadDocumentWithBody request with any body
|
|
UploadDocumentWithBody(ctx context.Context, id ClientID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// 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)
|
|
|
|
// GetDocumentBatch request
|
|
GetDocumentBatch(ctx context.Context, id ClientID, batchId BatchID, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// TriggerExportWithBody request with any body
|
|
TriggerExportWithBody(ctx context.Context, id ClientID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
TriggerExport(ctx context.Context, id ClientID, body TriggerExportJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListClientFolders request
|
|
ListClientFolders(ctx context.Context, id ClientID, params *ListClientFoldersParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetStatusByClientId request
|
|
GetStatusByClientId(ctx context.Context, id ClientID, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListClients request
|
|
ListClients(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// DeleteDocument request
|
|
DeleteDocument(ctx context.Context, id DocumentID, params *DeleteDocumentParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetDocument request
|
|
GetDocument(ctx context.Context, id DocumentID, params *GetDocumentParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// DownloadDocument request
|
|
DownloadDocument(ctx context.Context, id DocumentID, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetDocumentLabels request
|
|
GetDocumentLabels(ctx context.Context, documentId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ApplyLabelWithBody request with any body
|
|
ApplyLabelWithBody(ctx context.Context, documentId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
ApplyLabel(ctx context.Context, documentId openapi_types.UUID, body ApplyLabelJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetCurrentEula request
|
|
GetCurrentEula(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// AgreeToEula request
|
|
AgreeToEula(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetEulaStatus request
|
|
GetEulaStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ExportState request
|
|
ExportState(ctx context.Context, id ExportID, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetCurrentFieldExtraction request
|
|
GetCurrentFieldExtraction(ctx context.Context, params *GetCurrentFieldExtractionParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// CreateFieldExtractionWithBody request with any body
|
|
CreateFieldExtractionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
CreateFieldExtraction(ctx context.Context, body CreateFieldExtractionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetFieldExtractionHistory request
|
|
GetFieldExtractionHistory(ctx context.Context, params *GetFieldExtractionHistoryParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetFieldExtractionByVersion request
|
|
GetFieldExtractionByVersion(ctx context.Context, params *GetFieldExtractionByVersionParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// CreateFolderWithBody request with any body
|
|
CreateFolderWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
CreateFolder(ctx context.Context, body CreateFolderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// DeleteFolder request
|
|
DeleteFolder(ctx context.Context, folderId openapi_types.UUID, params *DeleteFolderParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// RenameFolderWithBody request with any body
|
|
RenameFolderWithBody(ctx context.Context, folderId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
RenameFolder(ctx context.Context, folderId openapi_types.UUID, body RenameFolderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetFolderDocuments request
|
|
GetFolderDocuments(ctx context.Context, folderId openapi_types.UUID, params *GetFolderDocumentsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetFolderMetrics request
|
|
GetFolderMetrics(ctx context.Context, folderId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetHomePage request
|
|
GetHomePage(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetIdentity request
|
|
GetIdentity(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetDocumentsByLabel request
|
|
GetDocumentsByLabel(ctx context.Context, labelName string, params *GetDocumentsByLabelParams, 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)
|
|
|
|
// ListUISettings request
|
|
ListUISettings(ctx context.Context, params *ListUISettingsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// CreateUISettingWithBody request with any body
|
|
CreateUISettingWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
CreateUISetting(ctx context.Context, body CreateUISettingJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// DeleteUISetting request
|
|
DeleteUISetting(ctx context.Context, id UISettingID, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetUISetting request
|
|
GetUISetting(ctx context.Context, id UISettingID, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// UpdateUISettingWithBody request with any body
|
|
UpdateUISettingWithBody(ctx context.Context, id UISettingID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
UpdateUISetting(ctx context.Context, id UISettingID, body UpdateUISettingJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
}
|
|
|
|
func (c *Client) ListEulaVersions(ctx context.Context, params *ListEulaVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListEulaVersionsRequest(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) CreateEulaVersionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateEulaVersionRequestWithBody(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) CreateEulaVersion(ctx context.Context, body CreateEulaVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateEulaVersionRequest(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) ListEulaAgreements(ctx context.Context, params *ListEulaAgreementsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListEulaAgreementsRequest(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) GetEulaCompliance(ctx context.Context, params *GetEulaComplianceParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetEulaComplianceRequest(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) GetEulaVersion(ctx context.Context, versionId EulaVersionID, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetEulaVersionRequest(c.Server, versionId)
|
|
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) UpdateEulaVersionWithBody(ctx context.Context, versionId EulaVersionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUpdateEulaVersionRequestWithBody(c.Server, versionId, 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) UpdateEulaVersion(ctx context.Context, versionId EulaVersionID, body UpdateEulaVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUpdateEulaVersionRequest(c.Server, versionId, 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) ActivateEulaVersion(ctx context.Context, versionId EulaVersionID, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewActivateEulaVersionRequest(c.Server, versionId)
|
|
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) 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)
|
|
}
|
|
|
|
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)
|
|
}
|
|
|
|
func (c *Client) DeleteClient(ctx context.Context, id ClientID, params *DeleteClientParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewDeleteClientRequest(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) GetClient(ctx context.Context, id ClientID, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
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)
|
|
}
|
|
|
|
func (c *Client) UpdateClientWithBody(ctx context.Context, id ClientID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
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)
|
|
}
|
|
|
|
func (c *Client) UpdateClient(ctx context.Context, id ClientID, body UpdateClientJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
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)
|
|
}
|
|
|
|
func (c *Client) GetCollectorByClientId(ctx context.Context, id ClientID, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetCollectorByClientIdRequest(c.Server, id)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
req = req.WithContext(ctx)
|
|
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
|
return nil, err
|
|
}
|
|
return c.Client.Do(req)
|
|
}
|
|
|
|
func (c *Client) SetCollectorByClientIdWithBody(ctx context.Context, id ClientID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewSetCollectorByClientIdRequestWithBody(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) SetCollectorByClientId(ctx context.Context, id ClientID, body SetCollectorByClientIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewSetCollectorByClientIdRequest(c.Server, id, body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
req = req.WithContext(ctx)
|
|
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
|
return nil, err
|
|
}
|
|
return c.Client.Do(req)
|
|
}
|
|
|
|
func (c *Client) ListDocumentsByClientId(ctx context.Context, id ClientID, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListDocumentsByClientIdRequest(c.Server, id)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
req = req.WithContext(ctx)
|
|
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
|
return nil, err
|
|
}
|
|
return c.Client.Do(req)
|
|
}
|
|
|
|
func (c *Client) 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)
|
|
}
|
|
|
|
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) 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)
|
|
}
|
|
|
|
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)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
req = req.WithContext(ctx)
|
|
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
|
return nil, err
|
|
}
|
|
return c.Client.Do(req)
|
|
}
|
|
|
|
func (c *Client) TriggerExport(ctx context.Context, id ClientID, body TriggerExportJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewTriggerExportRequest(c.Server, id, body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
req = req.WithContext(ctx)
|
|
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
|
return nil, err
|
|
}
|
|
return c.Client.Do(req)
|
|
}
|
|
|
|
func (c *Client) ListClientFolders(ctx context.Context, id ClientID, params *ListClientFoldersParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListClientFoldersRequest(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) GetStatusByClientId(ctx context.Context, id ClientID, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetStatusByClientIdRequest(c.Server, id)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
req = req.WithContext(ctx)
|
|
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
|
return nil, err
|
|
}
|
|
return c.Client.Do(req)
|
|
}
|
|
|
|
func (c *Client) ListClients(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListClientsRequest(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) DeleteDocument(ctx context.Context, id DocumentID, params *DeleteDocumentParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewDeleteDocumentRequest(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) GetDocument(ctx context.Context, id DocumentID, params *GetDocumentParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetDocumentRequest(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) DownloadDocument(ctx context.Context, id DocumentID, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewDownloadDocumentRequest(c.Server, id)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
req = req.WithContext(ctx)
|
|
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
|
return nil, err
|
|
}
|
|
return c.Client.Do(req)
|
|
}
|
|
|
|
func (c *Client) GetDocumentLabels(ctx context.Context, documentId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetDocumentLabelsRequest(c.Server, documentId)
|
|
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) ApplyLabelWithBody(ctx context.Context, documentId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewApplyLabelRequestWithBody(c.Server, documentId, 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) ApplyLabel(ctx context.Context, documentId openapi_types.UUID, body ApplyLabelJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewApplyLabelRequest(c.Server, documentId, 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) GetCurrentEula(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetCurrentEulaRequest(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) AgreeToEula(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewAgreeToEulaRequest(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) GetEulaStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetEulaStatusRequest(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) ExportState(ctx context.Context, id ExportID, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewExportStateRequest(c.Server, id)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
req = req.WithContext(ctx)
|
|
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
|
return nil, err
|
|
}
|
|
return c.Client.Do(req)
|
|
}
|
|
|
|
func (c *Client) GetCurrentFieldExtraction(ctx context.Context, params *GetCurrentFieldExtractionParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetCurrentFieldExtractionRequest(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) CreateFieldExtractionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateFieldExtractionRequestWithBody(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) CreateFieldExtraction(ctx context.Context, body CreateFieldExtractionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateFieldExtractionRequest(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) GetFieldExtractionHistory(ctx context.Context, params *GetFieldExtractionHistoryParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetFieldExtractionHistoryRequest(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) GetFieldExtractionByVersion(ctx context.Context, params *GetFieldExtractionByVersionParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetFieldExtractionByVersionRequest(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) CreateFolderWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateFolderRequestWithBody(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) CreateFolder(ctx context.Context, body CreateFolderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateFolderRequest(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) DeleteFolder(ctx context.Context, folderId openapi_types.UUID, params *DeleteFolderParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewDeleteFolderRequest(c.Server, folderId, 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) RenameFolderWithBody(ctx context.Context, folderId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewRenameFolderRequestWithBody(c.Server, folderId, 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) RenameFolder(ctx context.Context, folderId openapi_types.UUID, body RenameFolderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewRenameFolderRequest(c.Server, folderId, 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) GetFolderDocuments(ctx context.Context, folderId openapi_types.UUID, params *GetFolderDocumentsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetFolderDocumentsRequest(c.Server, folderId, 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) GetFolderMetrics(ctx context.Context, folderId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetFolderMetricsRequest(c.Server, folderId)
|
|
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) 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) GetIdentity(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetIdentityRequest(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) GetDocumentsByLabel(ctx context.Context, labelName string, params *GetDocumentsByLabelParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetDocumentsByLabelRequest(c.Server, labelName, 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) 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)
|
|
}
|
|
|
|
func (c *Client) ListUISettings(ctx context.Context, params *ListUISettingsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListUISettingsRequest(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) CreateUISettingWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateUISettingRequestWithBody(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) CreateUISetting(ctx context.Context, body CreateUISettingJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateUISettingRequest(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) DeleteUISetting(ctx context.Context, id UISettingID, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewDeleteUISettingRequest(c.Server, id)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
req = req.WithContext(ctx)
|
|
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
|
return nil, err
|
|
}
|
|
return c.Client.Do(req)
|
|
}
|
|
|
|
func (c *Client) GetUISetting(ctx context.Context, id UISettingID, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetUISettingRequest(c.Server, id)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
req = req.WithContext(ctx)
|
|
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
|
return nil, err
|
|
}
|
|
return c.Client.Do(req)
|
|
}
|
|
|
|
func (c *Client) UpdateUISettingWithBody(ctx context.Context, id UISettingID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUpdateUISettingRequestWithBody(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) UpdateUISetting(ctx context.Context, id UISettingID, body UpdateUISettingJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUpdateUISettingRequest(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)
|
|
}
|
|
|
|
// NewListEulaVersionsRequest generates requests for ListEulaVersions
|
|
func NewListEulaVersionsRequest(server string, params *ListEulaVersionsParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/admin/eula")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
queryValues := queryURL.Query()
|
|
|
|
if params.Page != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil {
|
|
return nil, err
|
|
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for k, v := range parsed {
|
|
for _, v2 := range v {
|
|
queryValues.Add(k, v2)
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.PageSize != nil {
|
|
|
|
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)
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
queryURL.RawQuery = queryValues.Encode()
|
|
}
|
|
|
|
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewCreateEulaVersionRequest calls the generic CreateEulaVersion builder with application/json body
|
|
func NewCreateEulaVersionRequest(server string, body CreateEulaVersionJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewCreateEulaVersionRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewCreateEulaVersionRequestWithBody generates requests for CreateEulaVersion with any type of body
|
|
func NewCreateEulaVersionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/admin/eula")
|
|
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
|
|
}
|
|
|
|
// NewListEulaAgreementsRequest generates requests for ListEulaAgreements
|
|
func NewListEulaAgreementsRequest(server string, params *ListEulaAgreementsParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/admin/eula/agreements")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
queryValues := queryURL.Query()
|
|
|
|
if params.Page != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil {
|
|
return nil, err
|
|
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for k, v := range parsed {
|
|
for _, v2 := range v {
|
|
queryValues.Add(k, v2)
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.PageSize != nil {
|
|
|
|
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)
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.VersionId != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "version_id", runtime.ParamLocationQuery, *params.VersionId); 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.UserId != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "user_id", runtime.ParamLocationQuery, *params.UserId); err != nil {
|
|
return nil, err
|
|
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for k, v := range parsed {
|
|
for _, v2 := range v {
|
|
queryValues.Add(k, v2)
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
queryURL.RawQuery = queryValues.Encode()
|
|
}
|
|
|
|
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetEulaComplianceRequest generates requests for GetEulaCompliance
|
|
func NewGetEulaComplianceRequest(server string, params *GetEulaComplianceParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/admin/eula/compliance")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
queryValues := queryURL.Query()
|
|
|
|
if params.Page != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil {
|
|
return nil, err
|
|
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for k, v := range parsed {
|
|
for _, v2 := range v {
|
|
queryValues.Add(k, v2)
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.PageSize != nil {
|
|
|
|
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)
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.VersionId != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "version_id", runtime.ParamLocationQuery, *params.VersionId); 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.Agreed != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "agreed", runtime.ParamLocationQuery, *params.Agreed); err != nil {
|
|
return nil, err
|
|
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for k, v := range parsed {
|
|
for _, v2 := range v {
|
|
queryValues.Add(k, v2)
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
queryURL.RawQuery = queryValues.Encode()
|
|
}
|
|
|
|
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetEulaVersionRequest generates requests for GetEulaVersion
|
|
func NewGetEulaVersionRequest(server string, versionId EulaVersionID) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "version_id", runtime.ParamLocationPath, versionId)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/admin/eula/%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
|
|
}
|
|
|
|
// NewUpdateEulaVersionRequest calls the generic UpdateEulaVersion builder with application/json body
|
|
func NewUpdateEulaVersionRequest(server string, versionId EulaVersionID, body UpdateEulaVersionJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewUpdateEulaVersionRequestWithBody(server, versionId, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewUpdateEulaVersionRequestWithBody generates requests for UpdateEulaVersion with any type of body
|
|
func NewUpdateEulaVersionRequestWithBody(server string, versionId EulaVersionID, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "version_id", runtime.ParamLocationPath, versionId)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/admin/eula/%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
|
|
}
|
|
|
|
// NewActivateEulaVersionRequest generates requests for ActivateEulaVersion
|
|
func NewActivateEulaVersionRequest(server string, versionId EulaVersionID) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "version_id", runtime.ParamLocationPath, versionId)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/admin/eula/%s/activate", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest("POST", queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListAdminUsersRequest generates requests for ListAdminUsers
|
|
func NewListAdminUsersRequest(server string, params *ListAdminUsersParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/admin/users")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
queryValues := queryURL.Query()
|
|
|
|
if params.Page != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil {
|
|
return nil, err
|
|
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for k, v := range parsed {
|
|
for _, v2 := range v {
|
|
queryValues.Add(k, v2)
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.PageSize != nil {
|
|
|
|
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)
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.Search != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil {
|
|
return nil, err
|
|
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for k, v := range parsed {
|
|
for _, v2 := range v {
|
|
queryValues.Add(k, v2)
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.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)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewCreateAdminUserRequest calls the generic CreateAdminUser builder with application/json body
|
|
func NewCreateAdminUserRequest(server string, body CreateAdminUserJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewCreateAdminUserRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewCreateAdminUserRequestWithBody generates requests for CreateAdminUser with any type of body
|
|
func NewCreateAdminUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/admin/users")
|
|
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
|
|
}
|
|
|
|
// NewDeleteAdminUserRequest generates requests for DeleteAdminUser
|
|
func NewDeleteAdminUserRequest(server string, email UserEmail, params *DeleteAdminUserParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "email", runtime.ParamLocationPath, email)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/admin/users/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
queryValues := queryURL.Query()
|
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "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)
|
|
}
|
|
}
|
|
}
|
|
|
|
queryURL.RawQuery = queryValues.Encode()
|
|
}
|
|
|
|
req, err := http.NewRequest("DELETE", queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetAdminUserRequest generates requests for GetAdminUser
|
|
func NewGetAdminUserRequest(server string, email UserEmail) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "email", runtime.ParamLocationPath, email)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/admin/users/%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
|
|
}
|
|
|
|
// NewCheckAdminUserExistsRequest generates requests for CheckAdminUserExists
|
|
func NewCheckAdminUserExistsRequest(server string, email UserEmail) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "email", runtime.ParamLocationPath, email)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/admin/users/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest("HEAD", queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// 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) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "email", runtime.ParamLocationPath, email)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/admin/users/%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
|
|
}
|
|
|
|
// NewDisableAdminUserRequest generates requests for DisableAdminUser
|
|
func NewDisableAdminUserRequest(server string, email UserEmail) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "email", runtime.ParamLocationPath, email)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/admin/users/%s/disable", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest("POST", queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewEnableAdminUserRequest generates requests for EnableAdminUser
|
|
func NewEnableAdminUserRequest(server string, email UserEmail) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "email", runtime.ParamLocationPath, email)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/admin/users/%s/enable", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest("POST", queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewCreateClientRequest calls the generic CreateClient builder with application/json body
|
|
func NewCreateClientRequest(server string, body CreateClientJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewCreateClientRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewCreateClientRequestWithBody generates requests for CreateClient with any type of body
|
|
func NewCreateClientRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/client")
|
|
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
|
|
}
|
|
|
|
// NewDeleteClientRequest generates requests for DeleteClient
|
|
func NewDeleteClientRequest(server string, id ClientID, params *DeleteClientParams) (*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("/client/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
queryValues := queryURL.Query()
|
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "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)
|
|
}
|
|
}
|
|
}
|
|
|
|
if params.Verbose != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "verbose", runtime.ParamLocationQuery, *params.Verbose); err != nil {
|
|
return nil, err
|
|
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for k, v := range parsed {
|
|
for _, v2 := range v {
|
|
queryValues.Add(k, v2)
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
queryURL.RawQuery = queryValues.Encode()
|
|
}
|
|
|
|
req, err := http.NewRequest("DELETE", queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetClientRequest generates requests for GetClient
|
|
func NewGetClientRequest(server string, id ClientID) (*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("/client/%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
|
|
}
|
|
|
|
// NewUpdateClientRequest calls the generic UpdateClient builder with application/json body
|
|
func NewUpdateClientRequest(server string, id ClientID, body UpdateClientJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewUpdateClientRequestWithBody(server, id, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewUpdateClientRequestWithBody generates requests for UpdateClient with any type of body
|
|
func NewUpdateClientRequestWithBody(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
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/client/%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
|
|
}
|
|
|
|
// NewGetCollectorByClientIdRequest generates requests for GetCollectorByClientId
|
|
func NewGetCollectorByClientIdRequest(server string, id ClientID) (*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("/client/%s/collector", 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
|
|
}
|
|
|
|
// 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
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/client/%s/collector", 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
|
|
}
|
|
|
|
// NewListDocumentsByClientIdRequest generates requests for ListDocumentsByClientId
|
|
func NewListDocumentsByClientIdRequest(server string, id ClientID) (*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("/client/%s/document", 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
|
|
}
|
|
|
|
// NewUploadDocumentRequestWithBody generates requests for UploadDocument with any type of body
|
|
func NewUploadDocumentRequestWithBody(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
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/client/%s/document", 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
|
|
}
|
|
|
|
// NewListDocumentBatchesRequest generates requests for ListDocumentBatches
|
|
func NewListDocumentBatchesRequest(server string, id ClientID, params *ListDocumentBatchesParams) (*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("/client/%s/document/batch", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
queryValues := queryURL.Query()
|
|
|
|
if params.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()
|
|
}
|
|
|
|
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewUploadDocumentBatchRequestWithBody generates requests for UploadDocumentBatch with any type of body
|
|
func NewUploadDocumentBatchRequestWithBody(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
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/client/%s/document/batch", 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
|
|
}
|
|
|
|
// NewGetDocumentBatchRequest generates requests for GetDocumentBatch
|
|
func NewGetDocumentBatchRequest(server string, id ClientID, batchId BatchID) (*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
|
|
}
|
|
|
|
var pathParam1 string
|
|
|
|
pathParam1, err = runtime.StyleParamWithLocation("simple", false, "batch_id", runtime.ParamLocationPath, batchId)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/client/%s/document/batch/%s", pathParam0, pathParam1)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewTriggerExportRequest calls the generic TriggerExport builder with application/json body
|
|
func NewTriggerExportRequest(server string, id ClientID, body TriggerExportJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewTriggerExportRequestWithBody(server, id, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewTriggerExportRequestWithBody generates requests for TriggerExport with any type of body
|
|
func NewTriggerExportRequestWithBody(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
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/client/%s/export", 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
|
|
}
|
|
|
|
// NewListClientFoldersRequest generates requests for ListClientFolders
|
|
func NewListClientFoldersRequest(server string, id ClientID, params *ListClientFoldersParams) (*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("/client/%s/folders", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
queryValues := queryURL.Query()
|
|
|
|
if params.Metrics != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "metrics", runtime.ParamLocationQuery, *params.Metrics); err != nil {
|
|
return nil, err
|
|
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for k, v := range parsed {
|
|
for _, v2 := range v {
|
|
queryValues.Add(k, v2)
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
queryURL.RawQuery = queryValues.Encode()
|
|
}
|
|
|
|
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetStatusByClientIdRequest generates requests for GetStatusByClientId
|
|
func NewGetStatusByClientIdRequest(server string, id ClientID) (*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("/client/%s/status", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListClientsRequest generates requests for ListClients
|
|
func NewListClientsRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/clients")
|
|
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
|
|
}
|
|
|
|
// NewDeleteDocumentRequest generates requests for DeleteDocument
|
|
func NewDeleteDocumentRequest(server string, id DocumentID, params *DeleteDocumentParams) (*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("/document/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
queryValues := queryURL.Query()
|
|
|
|
if params.Verbose != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "verbose", runtime.ParamLocationQuery, *params.Verbose); err != nil {
|
|
return nil, err
|
|
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for k, v := range parsed {
|
|
for _, v2 := range v {
|
|
queryValues.Add(k, v2)
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
queryURL.RawQuery = queryValues.Encode()
|
|
}
|
|
|
|
req, err := http.NewRequest("DELETE", queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetDocumentRequest generates requests for GetDocument
|
|
func NewGetDocumentRequest(server string, id DocumentID, params *GetDocumentParams) (*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("/document/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
queryValues := queryURL.Query()
|
|
|
|
if params.TextRecord != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "textRecord", runtime.ParamLocationQuery, *params.TextRecord); err != nil {
|
|
return nil, err
|
|
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for k, v := range parsed {
|
|
for _, v2 := range v {
|
|
queryValues.Add(k, v2)
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
queryURL.RawQuery = queryValues.Encode()
|
|
}
|
|
|
|
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewDownloadDocumentRequest generates requests for DownloadDocument
|
|
func NewDownloadDocumentRequest(server string, id DocumentID) (*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("/document/%s/download", 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
|
|
}
|
|
|
|
// NewGetDocumentLabelsRequest generates requests for GetDocumentLabels
|
|
func NewGetDocumentLabelsRequest(server string, documentId openapi_types.UUID) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "documentId", runtime.ParamLocationPath, documentId)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/documents/%s/labels", 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
|
|
}
|
|
|
|
// NewApplyLabelRequest calls the generic ApplyLabel builder with application/json body
|
|
func NewApplyLabelRequest(server string, documentId openapi_types.UUID, body ApplyLabelJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewApplyLabelRequestWithBody(server, documentId, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewApplyLabelRequestWithBody generates requests for ApplyLabel with any type of body
|
|
func NewApplyLabelRequestWithBody(server string, documentId openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "documentId", runtime.ParamLocationPath, documentId)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/documents/%s/labels", 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
|
|
}
|
|
|
|
// NewGetCurrentEulaRequest generates requests for GetCurrentEula
|
|
func NewGetCurrentEulaRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/eula")
|
|
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
|
|
}
|
|
|
|
// NewAgreeToEulaRequest generates requests for AgreeToEula
|
|
func NewAgreeToEulaRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/eula/agree")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest("POST", queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetEulaStatusRequest generates requests for GetEulaStatus
|
|
func NewGetEulaStatusRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/eula/status")
|
|
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
|
|
}
|
|
|
|
// NewExportStateRequest generates requests for ExportState
|
|
func NewExportStateRequest(server string, id ExportID) (*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("/export/%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
|
|
}
|
|
|
|
// NewGetCurrentFieldExtractionRequest generates requests for GetCurrentFieldExtraction
|
|
func NewGetCurrentFieldExtractionRequest(server string, params *GetCurrentFieldExtractionParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/field-extractions")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
queryValues := queryURL.Query()
|
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "documentId", runtime.ParamLocationQuery, params.DocumentId); err != nil {
|
|
return nil, err
|
|
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for k, v := range parsed {
|
|
for _, v2 := range v {
|
|
queryValues.Add(k, v2)
|
|
}
|
|
}
|
|
}
|
|
|
|
queryURL.RawQuery = queryValues.Encode()
|
|
}
|
|
|
|
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewCreateFieldExtractionRequest calls the generic CreateFieldExtraction builder with application/json body
|
|
func NewCreateFieldExtractionRequest(server string, body CreateFieldExtractionJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewCreateFieldExtractionRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewCreateFieldExtractionRequestWithBody generates requests for CreateFieldExtraction with any type of body
|
|
func NewCreateFieldExtractionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/field-extractions")
|
|
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
|
|
}
|
|
|
|
// NewGetFieldExtractionHistoryRequest generates requests for GetFieldExtractionHistory
|
|
func NewGetFieldExtractionHistoryRequest(server string, params *GetFieldExtractionHistoryParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/field-extractions/history")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
queryValues := queryURL.Query()
|
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "documentId", runtime.ParamLocationQuery, params.DocumentId); err != nil {
|
|
return nil, err
|
|
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for k, v := range parsed {
|
|
for _, v2 := range v {
|
|
queryValues.Add(k, v2)
|
|
}
|
|
}
|
|
}
|
|
|
|
queryURL.RawQuery = queryValues.Encode()
|
|
}
|
|
|
|
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetFieldExtractionByVersionRequest generates requests for GetFieldExtractionByVersion
|
|
func NewGetFieldExtractionByVersionRequest(server string, params *GetFieldExtractionByVersionParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/field-extractions/version")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
queryValues := queryURL.Query()
|
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "documentId", runtime.ParamLocationQuery, params.DocumentId); 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 queryFrag, err := runtime.StyleParamWithLocation("form", true, "version", runtime.ParamLocationQuery, params.Version); err != nil {
|
|
return nil, err
|
|
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for k, v := range parsed {
|
|
for _, v2 := range v {
|
|
queryValues.Add(k, v2)
|
|
}
|
|
}
|
|
}
|
|
|
|
queryURL.RawQuery = queryValues.Encode()
|
|
}
|
|
|
|
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewCreateFolderRequest calls the generic CreateFolder builder with application/json body
|
|
func NewCreateFolderRequest(server string, body CreateFolderJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewCreateFolderRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewCreateFolderRequestWithBody generates requests for CreateFolder with any type of body
|
|
func NewCreateFolderRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/folders")
|
|
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
|
|
}
|
|
|
|
// NewDeleteFolderRequest generates requests for DeleteFolder
|
|
func NewDeleteFolderRequest(server string, folderId openapi_types.UUID, params *DeleteFolderParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "folderId", runtime.ParamLocationPath, folderId)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/folders/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
queryValues := queryURL.Query()
|
|
|
|
if params.IncludeDocuments != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_documents", runtime.ParamLocationQuery, *params.IncludeDocuments); 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.Verbose != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "verbose", runtime.ParamLocationQuery, *params.Verbose); err != nil {
|
|
return nil, err
|
|
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for k, v := range parsed {
|
|
for _, v2 := range v {
|
|
queryValues.Add(k, v2)
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
queryURL.RawQuery = queryValues.Encode()
|
|
}
|
|
|
|
req, err := http.NewRequest("DELETE", queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewRenameFolderRequest calls the generic RenameFolder builder with application/json body
|
|
func NewRenameFolderRequest(server string, folderId openapi_types.UUID, body RenameFolderJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewRenameFolderRequestWithBody(server, folderId, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewRenameFolderRequestWithBody generates requests for RenameFolder with any type of body
|
|
func NewRenameFolderRequestWithBody(server string, folderId openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "folderId", runtime.ParamLocationPath, folderId)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/folders/%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
|
|
}
|
|
|
|
// NewGetFolderDocumentsRequest generates requests for GetFolderDocuments
|
|
func NewGetFolderDocumentsRequest(server string, folderId openapi_types.UUID, params *GetFolderDocumentsParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "folderId", runtime.ParamLocationPath, folderId)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/folders/%s/documents", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
queryValues := queryURL.Query()
|
|
|
|
if params.TextRecord != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "textRecord", runtime.ParamLocationQuery, *params.TextRecord); err != nil {
|
|
return nil, err
|
|
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for k, v := range parsed {
|
|
for _, v2 := range v {
|
|
queryValues.Add(k, v2)
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
queryURL.RawQuery = queryValues.Encode()
|
|
}
|
|
|
|
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetFolderMetricsRequest generates requests for GetFolderMetrics
|
|
func NewGetFolderMetricsRequest(server string, folderId openapi_types.UUID) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "folderId", runtime.ParamLocationPath, folderId)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/folders/%s/metrics", 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
|
|
}
|
|
|
|
// NewGetHomePageRequest generates requests for GetHomePage
|
|
func NewGetHomePageRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/home")
|
|
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
|
|
}
|
|
|
|
// NewGetIdentityRequest generates requests for GetIdentity
|
|
func NewGetIdentityRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/identity")
|
|
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
|
|
}
|
|
|
|
// NewGetDocumentsByLabelRequest generates requests for GetDocumentsByLabel
|
|
func NewGetDocumentsByLabelRequest(server string, labelName string, params *GetDocumentsByLabelParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "labelName", runtime.ParamLocationPath, labelName)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/labels/%s/documents", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
queryValues := queryURL.Query()
|
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "clientId", runtime.ParamLocationQuery, params.ClientId); err != nil {
|
|
return nil, err
|
|
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for k, v := range parsed {
|
|
for _, v2 := range v {
|
|
queryValues.Add(k, v2)
|
|
}
|
|
}
|
|
}
|
|
|
|
queryURL.RawQuery = queryValues.Encode()
|
|
}
|
|
|
|
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewLoginRequest generates requests for Login
|
|
func NewLoginRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/login")
|
|
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
|
|
}
|
|
|
|
// NewLoginCallbackRequest generates requests for LoginCallback
|
|
func NewLoginCallbackRequest(server string, params *LoginCallbackParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/login-callback")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
queryValues := queryURL.Query()
|
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "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)
|
|
}
|
|
}
|
|
}
|
|
|
|
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)
|
|
}
|
|
}
|
|
}
|
|
|
|
queryURL.RawQuery = queryValues.Encode()
|
|
}
|
|
|
|
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewLogoutRequest generates requests for Logout
|
|
func NewLogoutRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/logout")
|
|
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
|
|
}
|
|
|
|
// NewListUISettingsRequest generates requests for ListUISettings
|
|
func NewListUISettingsRequest(server string, params *ListUISettingsParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/ui-settings")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
queryValues := queryURL.Query()
|
|
|
|
if params.Namespace != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "namespace", runtime.ParamLocationQuery, *params.Namespace); err != nil {
|
|
return nil, err
|
|
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for k, v := range parsed {
|
|
for _, v2 := range v {
|
|
queryValues.Add(k, v2)
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
queryURL.RawQuery = queryValues.Encode()
|
|
}
|
|
|
|
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewCreateUISettingRequest calls the generic CreateUISetting builder with application/json body
|
|
func NewCreateUISettingRequest(server string, body CreateUISettingJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewCreateUISettingRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewCreateUISettingRequestWithBody generates requests for CreateUISetting with any type of body
|
|
func NewCreateUISettingRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/ui-settings")
|
|
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
|
|
}
|
|
|
|
// NewDeleteUISettingRequest generates requests for DeleteUISetting
|
|
func NewDeleteUISettingRequest(server string, id UISettingID) (*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("/ui-settings/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest("DELETE", queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetUISettingRequest generates requests for GetUISetting
|
|
func NewGetUISettingRequest(server string, id UISettingID) (*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("/ui-settings/%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
|
|
}
|
|
|
|
// NewUpdateUISettingRequest calls the generic UpdateUISetting builder with application/json body
|
|
func NewUpdateUISettingRequest(server string, id UISettingID, body UpdateUISettingJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewUpdateUISettingRequestWithBody(server, id, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewUpdateUISettingRequestWithBody generates requests for UpdateUISetting with any type of body
|
|
func NewUpdateUISettingRequestWithBody(server string, id UISettingID, 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("/ui-settings/%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
|
|
}
|
|
|
|
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 {
|
|
// ListEulaVersionsWithResponse request
|
|
ListEulaVersionsWithResponse(ctx context.Context, params *ListEulaVersionsParams, reqEditors ...RequestEditorFn) (*ListEulaVersionsResponse, error)
|
|
|
|
// CreateEulaVersionWithBodyWithResponse request with any body
|
|
CreateEulaVersionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateEulaVersionResponse, error)
|
|
|
|
CreateEulaVersionWithResponse(ctx context.Context, body CreateEulaVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateEulaVersionResponse, error)
|
|
|
|
// ListEulaAgreementsWithResponse request
|
|
ListEulaAgreementsWithResponse(ctx context.Context, params *ListEulaAgreementsParams, reqEditors ...RequestEditorFn) (*ListEulaAgreementsResponse, error)
|
|
|
|
// GetEulaComplianceWithResponse request
|
|
GetEulaComplianceWithResponse(ctx context.Context, params *GetEulaComplianceParams, reqEditors ...RequestEditorFn) (*GetEulaComplianceResponse, error)
|
|
|
|
// GetEulaVersionWithResponse request
|
|
GetEulaVersionWithResponse(ctx context.Context, versionId EulaVersionID, reqEditors ...RequestEditorFn) (*GetEulaVersionResponse, error)
|
|
|
|
// UpdateEulaVersionWithBodyWithResponse request with any body
|
|
UpdateEulaVersionWithBodyWithResponse(ctx context.Context, versionId EulaVersionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateEulaVersionResponse, error)
|
|
|
|
UpdateEulaVersionWithResponse(ctx context.Context, versionId EulaVersionID, body UpdateEulaVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateEulaVersionResponse, error)
|
|
|
|
// ActivateEulaVersionWithResponse request
|
|
ActivateEulaVersionWithResponse(ctx context.Context, versionId EulaVersionID, reqEditors ...RequestEditorFn) (*ActivateEulaVersionResponse, error)
|
|
|
|
// 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)
|
|
|
|
// DeleteClientWithResponse request
|
|
DeleteClientWithResponse(ctx context.Context, id ClientID, params *DeleteClientParams, reqEditors ...RequestEditorFn) (*DeleteClientResponse, 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)
|
|
|
|
// 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)
|
|
|
|
// ListClientFoldersWithResponse request
|
|
ListClientFoldersWithResponse(ctx context.Context, id ClientID, params *ListClientFoldersParams, reqEditors ...RequestEditorFn) (*ListClientFoldersResponse, error)
|
|
|
|
// GetStatusByClientIdWithResponse request
|
|
GetStatusByClientIdWithResponse(ctx context.Context, id ClientID, reqEditors ...RequestEditorFn) (*GetStatusByClientIdResponse, error)
|
|
|
|
// ListClientsWithResponse request
|
|
ListClientsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListClientsResponse, error)
|
|
|
|
// DeleteDocumentWithResponse request
|
|
DeleteDocumentWithResponse(ctx context.Context, id DocumentID, params *DeleteDocumentParams, reqEditors ...RequestEditorFn) (*DeleteDocumentResponse, error)
|
|
|
|
// GetDocumentWithResponse request
|
|
GetDocumentWithResponse(ctx context.Context, id DocumentID, params *GetDocumentParams, reqEditors ...RequestEditorFn) (*GetDocumentResponse, error)
|
|
|
|
// DownloadDocumentWithResponse request
|
|
DownloadDocumentWithResponse(ctx context.Context, id DocumentID, reqEditors ...RequestEditorFn) (*DownloadDocumentResponse, error)
|
|
|
|
// GetDocumentLabelsWithResponse request
|
|
GetDocumentLabelsWithResponse(ctx context.Context, documentId openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetDocumentLabelsResponse, error)
|
|
|
|
// ApplyLabelWithBodyWithResponse request with any body
|
|
ApplyLabelWithBodyWithResponse(ctx context.Context, documentId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ApplyLabelResponse, error)
|
|
|
|
ApplyLabelWithResponse(ctx context.Context, documentId openapi_types.UUID, body ApplyLabelJSONRequestBody, reqEditors ...RequestEditorFn) (*ApplyLabelResponse, error)
|
|
|
|
// GetCurrentEulaWithResponse request
|
|
GetCurrentEulaWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentEulaResponse, error)
|
|
|
|
// AgreeToEulaWithResponse request
|
|
AgreeToEulaWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*AgreeToEulaResponse, error)
|
|
|
|
// GetEulaStatusWithResponse request
|
|
GetEulaStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetEulaStatusResponse, error)
|
|
|
|
// ExportStateWithResponse request
|
|
ExportStateWithResponse(ctx context.Context, id ExportID, reqEditors ...RequestEditorFn) (*ExportStateResponse, error)
|
|
|
|
// GetCurrentFieldExtractionWithResponse request
|
|
GetCurrentFieldExtractionWithResponse(ctx context.Context, params *GetCurrentFieldExtractionParams, reqEditors ...RequestEditorFn) (*GetCurrentFieldExtractionResponse, error)
|
|
|
|
// CreateFieldExtractionWithBodyWithResponse request with any body
|
|
CreateFieldExtractionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateFieldExtractionResponse, error)
|
|
|
|
CreateFieldExtractionWithResponse(ctx context.Context, body CreateFieldExtractionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateFieldExtractionResponse, error)
|
|
|
|
// GetFieldExtractionHistoryWithResponse request
|
|
GetFieldExtractionHistoryWithResponse(ctx context.Context, params *GetFieldExtractionHistoryParams, reqEditors ...RequestEditorFn) (*GetFieldExtractionHistoryResponse, error)
|
|
|
|
// GetFieldExtractionByVersionWithResponse request
|
|
GetFieldExtractionByVersionWithResponse(ctx context.Context, params *GetFieldExtractionByVersionParams, reqEditors ...RequestEditorFn) (*GetFieldExtractionByVersionResponse, error)
|
|
|
|
// CreateFolderWithBodyWithResponse request with any body
|
|
CreateFolderWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateFolderResponse, error)
|
|
|
|
CreateFolderWithResponse(ctx context.Context, body CreateFolderJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateFolderResponse, error)
|
|
|
|
// DeleteFolderWithResponse request
|
|
DeleteFolderWithResponse(ctx context.Context, folderId openapi_types.UUID, params *DeleteFolderParams, reqEditors ...RequestEditorFn) (*DeleteFolderResponse, error)
|
|
|
|
// RenameFolderWithBodyWithResponse request with any body
|
|
RenameFolderWithBodyWithResponse(ctx context.Context, folderId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RenameFolderResponse, error)
|
|
|
|
RenameFolderWithResponse(ctx context.Context, folderId openapi_types.UUID, body RenameFolderJSONRequestBody, reqEditors ...RequestEditorFn) (*RenameFolderResponse, error)
|
|
|
|
// GetFolderDocumentsWithResponse request
|
|
GetFolderDocumentsWithResponse(ctx context.Context, folderId openapi_types.UUID, params *GetFolderDocumentsParams, reqEditors ...RequestEditorFn) (*GetFolderDocumentsResponse, error)
|
|
|
|
// GetFolderMetricsWithResponse request
|
|
GetFolderMetricsWithResponse(ctx context.Context, folderId openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetFolderMetricsResponse, error)
|
|
|
|
// GetHomePageWithResponse request
|
|
GetHomePageWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHomePageResponse, error)
|
|
|
|
// GetIdentityWithResponse request
|
|
GetIdentityWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetIdentityResponse, error)
|
|
|
|
// GetDocumentsByLabelWithResponse request
|
|
GetDocumentsByLabelWithResponse(ctx context.Context, labelName string, params *GetDocumentsByLabelParams, reqEditors ...RequestEditorFn) (*GetDocumentsByLabelResponse, 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)
|
|
|
|
// ListUISettingsWithResponse request
|
|
ListUISettingsWithResponse(ctx context.Context, params *ListUISettingsParams, reqEditors ...RequestEditorFn) (*ListUISettingsResponse, error)
|
|
|
|
// CreateUISettingWithBodyWithResponse request with any body
|
|
CreateUISettingWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUISettingResponse, error)
|
|
|
|
CreateUISettingWithResponse(ctx context.Context, body CreateUISettingJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUISettingResponse, error)
|
|
|
|
// DeleteUISettingWithResponse request
|
|
DeleteUISettingWithResponse(ctx context.Context, id UISettingID, reqEditors ...RequestEditorFn) (*DeleteUISettingResponse, error)
|
|
|
|
// GetUISettingWithResponse request
|
|
GetUISettingWithResponse(ctx context.Context, id UISettingID, reqEditors ...RequestEditorFn) (*GetUISettingResponse, error)
|
|
|
|
// UpdateUISettingWithBodyWithResponse request with any body
|
|
UpdateUISettingWithBodyWithResponse(ctx context.Context, id UISettingID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateUISettingResponse, error)
|
|
|
|
UpdateUISettingWithResponse(ctx context.Context, id UISettingID, body UpdateUISettingJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateUISettingResponse, error)
|
|
}
|
|
|
|
type ListEulaVersionsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *EulaVersionList
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON403 *Forbidden
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListEulaVersionsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListEulaVersionsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type CreateEulaVersionResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON201 *EulaVersion
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON403 *Forbidden
|
|
JSON409 *Conflict
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r CreateEulaVersionResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r CreateEulaVersionResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type ListEulaAgreementsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *EulaAgreementList
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON403 *Forbidden
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListEulaAgreementsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListEulaAgreementsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type GetEulaComplianceResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *EulaComplianceReport
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON403 *Forbidden
|
|
JSON404 *NotFound
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetEulaComplianceResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetEulaComplianceResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type GetEulaVersionResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *EulaVersion
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON403 *Forbidden
|
|
JSON404 *NotFound
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetEulaVersionResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetEulaVersionResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type UpdateEulaVersionResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *EulaVersion
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON403 *Forbidden
|
|
JSON404 *NotFound
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r UpdateEulaVersionResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r UpdateEulaVersionResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type ActivateEulaVersionResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *EulaVersion
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON403 *Forbidden
|
|
JSON404 *NotFound
|
|
JSON409 *Conflict
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ActivateEulaVersionResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ActivateEulaVersionResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
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 DeleteClientResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *DeleteResponse
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON404 *NotFound
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r DeleteClientResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r DeleteClientResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type GetClientResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *DocClient
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// 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
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// 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
|
|
}
|
|
|
|
type GetCollectorByClientIdResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *Collector
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetCollectorByClientIdResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetCollectorByClientIdResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type SetCollectorByClientIdResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r SetCollectorByClientIdResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r SetCollectorByClientIdResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type ListDocumentsByClientIdResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *ListDocuments
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListDocumentsByClientIdResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListDocumentsByClientIdResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
type ListDocumentBatchesResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *BatchUploadList
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListDocumentBatchesResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListDocumentBatchesResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type UploadDocumentBatchResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON202 *BatchUploadResponse
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r UploadDocumentBatchResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r UploadDocumentBatchResponse) 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 ListClientFoldersResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *FolderList
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON404 *NotFound
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListClientFoldersResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListClientFoldersResponse) 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 ListClientsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *ClientListResponse
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListClientsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListClientsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type DeleteDocumentResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *DeleteResponse
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON404 *NotFound
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r DeleteDocumentResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r DeleteDocumentResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type GetDocumentResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *DocumentEnriched
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON404 *NotFound
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// 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
|
|
}
|
|
|
|
type DownloadDocumentResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON404 *NotFound
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r DownloadDocumentResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r DownloadDocumentResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type GetDocumentLabelsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Labels *[]LabelRecord `json:"labels,omitempty"`
|
|
}
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON404 *NotFound
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetDocumentLabelsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetDocumentLabelsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type ApplyLabelResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON201 *LabelRecord
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON404 *NotFound
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ApplyLabelResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ApplyLabelResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type GetCurrentEulaResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *EulaPublicResponse
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON404 *NotFound
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetCurrentEulaResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetCurrentEulaResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type AgreeToEulaResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *EulaAgreementResponse
|
|
JSON201 *EulaAgreementResponse
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r AgreeToEulaResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r AgreeToEulaResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type GetEulaStatusResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *EulaStatusResponse
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON404 *NotFound
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetEulaStatusResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetEulaStatusResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type ExportStateResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *ExportDetails
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ExportStateResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ExportStateResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type GetCurrentFieldExtractionResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *FieldExtractionResponse
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON404 *NotFound
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetCurrentFieldExtractionResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetCurrentFieldExtractionResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type CreateFieldExtractionResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON201 *FieldExtractionResponse
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON404 *NotFound
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r CreateFieldExtractionResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r CreateFieldExtractionResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type GetFieldExtractionHistoryResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Versions *[]FieldExtractionVersion `json:"versions,omitempty"`
|
|
}
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON404 *NotFound
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetFieldExtractionHistoryResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetFieldExtractionHistoryResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type GetFieldExtractionByVersionResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *FieldExtractionResponse
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON404 *NotFound
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetFieldExtractionByVersionResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetFieldExtractionByVersionResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type CreateFolderResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON201 *Folder
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r CreateFolderResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r CreateFolderResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type DeleteFolderResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *DeleteResponse
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON404 *NotFound
|
|
JSON409 *Conflict
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r DeleteFolderResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r DeleteFolderResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type RenameFolderResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *Folder
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON404 *NotFound
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r RenameFolderResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r RenameFolderResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type GetFolderDocumentsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Documents *[]DocumentInFolder `json:"documents,omitempty"`
|
|
}
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON404 *NotFound
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetFolderDocumentsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetFolderDocumentsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type GetFolderMetricsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *FolderMetrics
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON404 *NotFound
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetFolderMetricsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetFolderMetricsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
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 GetIdentityResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *IdentityResponse
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
JSON502 *ErrorMessage
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetIdentityResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetIdentityResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type GetDocumentsByLabelResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Documents *[]DocumentSummary `json:"documents,omitempty"`
|
|
}
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetDocumentsByLabelResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetDocumentsByLabelResponse) 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
|
|
}
|
|
|
|
type ListUISettingsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *UISettingListResponse
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListUISettingsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListUISettingsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type CreateUISettingResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON201 *UISetting
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r CreateUISettingResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r CreateUISettingResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type DeleteUISettingResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON404 *NotFound
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r DeleteUISettingResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r DeleteUISettingResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type GetUISettingResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *UISetting
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON404 *NotFound
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetUISettingResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetUISettingResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type UpdateUISettingResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *UISetting
|
|
JSON400 *InvalidRequest
|
|
JSON401 *Unauthorized
|
|
JSON404 *NotFound
|
|
JSON429 *TooManyRequests
|
|
JSON500 *InternalError
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r UpdateUISettingResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r UpdateUISettingResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ListEulaVersionsWithResponse request returning *ListEulaVersionsResponse
|
|
func (c *ClientWithResponses) ListEulaVersionsWithResponse(ctx context.Context, params *ListEulaVersionsParams, reqEditors ...RequestEditorFn) (*ListEulaVersionsResponse, error) {
|
|
rsp, err := c.ListEulaVersions(ctx, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListEulaVersionsResponse(rsp)
|
|
}
|
|
|
|
// CreateEulaVersionWithBodyWithResponse request with arbitrary body returning *CreateEulaVersionResponse
|
|
func (c *ClientWithResponses) CreateEulaVersionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateEulaVersionResponse, error) {
|
|
rsp, err := c.CreateEulaVersionWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateEulaVersionResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) CreateEulaVersionWithResponse(ctx context.Context, body CreateEulaVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateEulaVersionResponse, error) {
|
|
rsp, err := c.CreateEulaVersion(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateEulaVersionResponse(rsp)
|
|
}
|
|
|
|
// ListEulaAgreementsWithResponse request returning *ListEulaAgreementsResponse
|
|
func (c *ClientWithResponses) ListEulaAgreementsWithResponse(ctx context.Context, params *ListEulaAgreementsParams, reqEditors ...RequestEditorFn) (*ListEulaAgreementsResponse, error) {
|
|
rsp, err := c.ListEulaAgreements(ctx, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListEulaAgreementsResponse(rsp)
|
|
}
|
|
|
|
// GetEulaComplianceWithResponse request returning *GetEulaComplianceResponse
|
|
func (c *ClientWithResponses) GetEulaComplianceWithResponse(ctx context.Context, params *GetEulaComplianceParams, reqEditors ...RequestEditorFn) (*GetEulaComplianceResponse, error) {
|
|
rsp, err := c.GetEulaCompliance(ctx, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetEulaComplianceResponse(rsp)
|
|
}
|
|
|
|
// GetEulaVersionWithResponse request returning *GetEulaVersionResponse
|
|
func (c *ClientWithResponses) GetEulaVersionWithResponse(ctx context.Context, versionId EulaVersionID, reqEditors ...RequestEditorFn) (*GetEulaVersionResponse, error) {
|
|
rsp, err := c.GetEulaVersion(ctx, versionId, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetEulaVersionResponse(rsp)
|
|
}
|
|
|
|
// UpdateEulaVersionWithBodyWithResponse request with arbitrary body returning *UpdateEulaVersionResponse
|
|
func (c *ClientWithResponses) UpdateEulaVersionWithBodyWithResponse(ctx context.Context, versionId EulaVersionID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateEulaVersionResponse, error) {
|
|
rsp, err := c.UpdateEulaVersionWithBody(ctx, versionId, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUpdateEulaVersionResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) UpdateEulaVersionWithResponse(ctx context.Context, versionId EulaVersionID, body UpdateEulaVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateEulaVersionResponse, error) {
|
|
rsp, err := c.UpdateEulaVersion(ctx, versionId, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUpdateEulaVersionResponse(rsp)
|
|
}
|
|
|
|
// ActivateEulaVersionWithResponse request returning *ActivateEulaVersionResponse
|
|
func (c *ClientWithResponses) ActivateEulaVersionWithResponse(ctx context.Context, versionId EulaVersionID, reqEditors ...RequestEditorFn) (*ActivateEulaVersionResponse, error) {
|
|
rsp, err := c.ActivateEulaVersion(ctx, versionId, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseActivateEulaVersionResponse(rsp)
|
|
}
|
|
|
|
// 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)
|
|
}
|
|
|
|
// DeleteClientWithResponse request returning *DeleteClientResponse
|
|
func (c *ClientWithResponses) DeleteClientWithResponse(ctx context.Context, id ClientID, params *DeleteClientParams, reqEditors ...RequestEditorFn) (*DeleteClientResponse, error) {
|
|
rsp, err := c.DeleteClient(ctx, id, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseDeleteClientResponse(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)
|
|
}
|
|
|
|
// 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)
|
|
}
|
|
|
|
// ListClientFoldersWithResponse request returning *ListClientFoldersResponse
|
|
func (c *ClientWithResponses) ListClientFoldersWithResponse(ctx context.Context, id ClientID, params *ListClientFoldersParams, reqEditors ...RequestEditorFn) (*ListClientFoldersResponse, error) {
|
|
rsp, err := c.ListClientFolders(ctx, id, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListClientFoldersResponse(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)
|
|
}
|
|
|
|
// ListClientsWithResponse request returning *ListClientsResponse
|
|
func (c *ClientWithResponses) ListClientsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListClientsResponse, error) {
|
|
rsp, err := c.ListClients(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListClientsResponse(rsp)
|
|
}
|
|
|
|
// DeleteDocumentWithResponse request returning *DeleteDocumentResponse
|
|
func (c *ClientWithResponses) DeleteDocumentWithResponse(ctx context.Context, id DocumentID, params *DeleteDocumentParams, reqEditors ...RequestEditorFn) (*DeleteDocumentResponse, error) {
|
|
rsp, err := c.DeleteDocument(ctx, id, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseDeleteDocumentResponse(rsp)
|
|
}
|
|
|
|
// GetDocumentWithResponse request returning *GetDocumentResponse
|
|
func (c *ClientWithResponses) GetDocumentWithResponse(ctx context.Context, id DocumentID, params *GetDocumentParams, reqEditors ...RequestEditorFn) (*GetDocumentResponse, error) {
|
|
rsp, err := c.GetDocument(ctx, id, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetDocumentResponse(rsp)
|
|
}
|
|
|
|
// DownloadDocumentWithResponse request returning *DownloadDocumentResponse
|
|
func (c *ClientWithResponses) DownloadDocumentWithResponse(ctx context.Context, id DocumentID, reqEditors ...RequestEditorFn) (*DownloadDocumentResponse, error) {
|
|
rsp, err := c.DownloadDocument(ctx, id, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseDownloadDocumentResponse(rsp)
|
|
}
|
|
|
|
// GetDocumentLabelsWithResponse request returning *GetDocumentLabelsResponse
|
|
func (c *ClientWithResponses) GetDocumentLabelsWithResponse(ctx context.Context, documentId openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetDocumentLabelsResponse, error) {
|
|
rsp, err := c.GetDocumentLabels(ctx, documentId, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetDocumentLabelsResponse(rsp)
|
|
}
|
|
|
|
// ApplyLabelWithBodyWithResponse request with arbitrary body returning *ApplyLabelResponse
|
|
func (c *ClientWithResponses) ApplyLabelWithBodyWithResponse(ctx context.Context, documentId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ApplyLabelResponse, error) {
|
|
rsp, err := c.ApplyLabelWithBody(ctx, documentId, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseApplyLabelResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) ApplyLabelWithResponse(ctx context.Context, documentId openapi_types.UUID, body ApplyLabelJSONRequestBody, reqEditors ...RequestEditorFn) (*ApplyLabelResponse, error) {
|
|
rsp, err := c.ApplyLabel(ctx, documentId, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseApplyLabelResponse(rsp)
|
|
}
|
|
|
|
// GetCurrentEulaWithResponse request returning *GetCurrentEulaResponse
|
|
func (c *ClientWithResponses) GetCurrentEulaWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentEulaResponse, error) {
|
|
rsp, err := c.GetCurrentEula(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetCurrentEulaResponse(rsp)
|
|
}
|
|
|
|
// AgreeToEulaWithResponse request returning *AgreeToEulaResponse
|
|
func (c *ClientWithResponses) AgreeToEulaWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*AgreeToEulaResponse, error) {
|
|
rsp, err := c.AgreeToEula(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseAgreeToEulaResponse(rsp)
|
|
}
|
|
|
|
// GetEulaStatusWithResponse request returning *GetEulaStatusResponse
|
|
func (c *ClientWithResponses) GetEulaStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetEulaStatusResponse, error) {
|
|
rsp, err := c.GetEulaStatus(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetEulaStatusResponse(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)
|
|
}
|
|
|
|
// GetCurrentFieldExtractionWithResponse request returning *GetCurrentFieldExtractionResponse
|
|
func (c *ClientWithResponses) GetCurrentFieldExtractionWithResponse(ctx context.Context, params *GetCurrentFieldExtractionParams, reqEditors ...RequestEditorFn) (*GetCurrentFieldExtractionResponse, error) {
|
|
rsp, err := c.GetCurrentFieldExtraction(ctx, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetCurrentFieldExtractionResponse(rsp)
|
|
}
|
|
|
|
// CreateFieldExtractionWithBodyWithResponse request with arbitrary body returning *CreateFieldExtractionResponse
|
|
func (c *ClientWithResponses) CreateFieldExtractionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateFieldExtractionResponse, error) {
|
|
rsp, err := c.CreateFieldExtractionWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateFieldExtractionResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) CreateFieldExtractionWithResponse(ctx context.Context, body CreateFieldExtractionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateFieldExtractionResponse, error) {
|
|
rsp, err := c.CreateFieldExtraction(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateFieldExtractionResponse(rsp)
|
|
}
|
|
|
|
// GetFieldExtractionHistoryWithResponse request returning *GetFieldExtractionHistoryResponse
|
|
func (c *ClientWithResponses) GetFieldExtractionHistoryWithResponse(ctx context.Context, params *GetFieldExtractionHistoryParams, reqEditors ...RequestEditorFn) (*GetFieldExtractionHistoryResponse, error) {
|
|
rsp, err := c.GetFieldExtractionHistory(ctx, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetFieldExtractionHistoryResponse(rsp)
|
|
}
|
|
|
|
// GetFieldExtractionByVersionWithResponse request returning *GetFieldExtractionByVersionResponse
|
|
func (c *ClientWithResponses) GetFieldExtractionByVersionWithResponse(ctx context.Context, params *GetFieldExtractionByVersionParams, reqEditors ...RequestEditorFn) (*GetFieldExtractionByVersionResponse, error) {
|
|
rsp, err := c.GetFieldExtractionByVersion(ctx, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetFieldExtractionByVersionResponse(rsp)
|
|
}
|
|
|
|
// CreateFolderWithBodyWithResponse request with arbitrary body returning *CreateFolderResponse
|
|
func (c *ClientWithResponses) CreateFolderWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateFolderResponse, error) {
|
|
rsp, err := c.CreateFolderWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateFolderResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) CreateFolderWithResponse(ctx context.Context, body CreateFolderJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateFolderResponse, error) {
|
|
rsp, err := c.CreateFolder(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateFolderResponse(rsp)
|
|
}
|
|
|
|
// DeleteFolderWithResponse request returning *DeleteFolderResponse
|
|
func (c *ClientWithResponses) DeleteFolderWithResponse(ctx context.Context, folderId openapi_types.UUID, params *DeleteFolderParams, reqEditors ...RequestEditorFn) (*DeleteFolderResponse, error) {
|
|
rsp, err := c.DeleteFolder(ctx, folderId, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseDeleteFolderResponse(rsp)
|
|
}
|
|
|
|
// RenameFolderWithBodyWithResponse request with arbitrary body returning *RenameFolderResponse
|
|
func (c *ClientWithResponses) RenameFolderWithBodyWithResponse(ctx context.Context, folderId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RenameFolderResponse, error) {
|
|
rsp, err := c.RenameFolderWithBody(ctx, folderId, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseRenameFolderResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) RenameFolderWithResponse(ctx context.Context, folderId openapi_types.UUID, body RenameFolderJSONRequestBody, reqEditors ...RequestEditorFn) (*RenameFolderResponse, error) {
|
|
rsp, err := c.RenameFolder(ctx, folderId, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseRenameFolderResponse(rsp)
|
|
}
|
|
|
|
// GetFolderDocumentsWithResponse request returning *GetFolderDocumentsResponse
|
|
func (c *ClientWithResponses) GetFolderDocumentsWithResponse(ctx context.Context, folderId openapi_types.UUID, params *GetFolderDocumentsParams, reqEditors ...RequestEditorFn) (*GetFolderDocumentsResponse, error) {
|
|
rsp, err := c.GetFolderDocuments(ctx, folderId, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetFolderDocumentsResponse(rsp)
|
|
}
|
|
|
|
// GetFolderMetricsWithResponse request returning *GetFolderMetricsResponse
|
|
func (c *ClientWithResponses) GetFolderMetricsWithResponse(ctx context.Context, folderId openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetFolderMetricsResponse, error) {
|
|
rsp, err := c.GetFolderMetrics(ctx, folderId, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetFolderMetricsResponse(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)
|
|
}
|
|
|
|
// GetIdentityWithResponse request returning *GetIdentityResponse
|
|
func (c *ClientWithResponses) GetIdentityWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetIdentityResponse, error) {
|
|
rsp, err := c.GetIdentity(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetIdentityResponse(rsp)
|
|
}
|
|
|
|
// GetDocumentsByLabelWithResponse request returning *GetDocumentsByLabelResponse
|
|
func (c *ClientWithResponses) GetDocumentsByLabelWithResponse(ctx context.Context, labelName string, params *GetDocumentsByLabelParams, reqEditors ...RequestEditorFn) (*GetDocumentsByLabelResponse, error) {
|
|
rsp, err := c.GetDocumentsByLabel(ctx, labelName, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetDocumentsByLabelResponse(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...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseLoginCallbackResponse(rsp)
|
|
}
|
|
|
|
// LogoutWithResponse request returning *LogoutResponse
|
|
func (c *ClientWithResponses) LogoutWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*LogoutResponse, error) {
|
|
rsp, err := c.Logout(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseLogoutResponse(rsp)
|
|
}
|
|
|
|
// ListUISettingsWithResponse request returning *ListUISettingsResponse
|
|
func (c *ClientWithResponses) ListUISettingsWithResponse(ctx context.Context, params *ListUISettingsParams, reqEditors ...RequestEditorFn) (*ListUISettingsResponse, error) {
|
|
rsp, err := c.ListUISettings(ctx, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListUISettingsResponse(rsp)
|
|
}
|
|
|
|
// CreateUISettingWithBodyWithResponse request with arbitrary body returning *CreateUISettingResponse
|
|
func (c *ClientWithResponses) CreateUISettingWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUISettingResponse, error) {
|
|
rsp, err := c.CreateUISettingWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateUISettingResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) CreateUISettingWithResponse(ctx context.Context, body CreateUISettingJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUISettingResponse, error) {
|
|
rsp, err := c.CreateUISetting(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateUISettingResponse(rsp)
|
|
}
|
|
|
|
// DeleteUISettingWithResponse request returning *DeleteUISettingResponse
|
|
func (c *ClientWithResponses) DeleteUISettingWithResponse(ctx context.Context, id UISettingID, reqEditors ...RequestEditorFn) (*DeleteUISettingResponse, error) {
|
|
rsp, err := c.DeleteUISetting(ctx, id, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseDeleteUISettingResponse(rsp)
|
|
}
|
|
|
|
// GetUISettingWithResponse request returning *GetUISettingResponse
|
|
func (c *ClientWithResponses) GetUISettingWithResponse(ctx context.Context, id UISettingID, reqEditors ...RequestEditorFn) (*GetUISettingResponse, error) {
|
|
rsp, err := c.GetUISetting(ctx, id, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetUISettingResponse(rsp)
|
|
}
|
|
|
|
// UpdateUISettingWithBodyWithResponse request with arbitrary body returning *UpdateUISettingResponse
|
|
func (c *ClientWithResponses) UpdateUISettingWithBodyWithResponse(ctx context.Context, id UISettingID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateUISettingResponse, error) {
|
|
rsp, err := c.UpdateUISettingWithBody(ctx, id, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUpdateUISettingResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) UpdateUISettingWithResponse(ctx context.Context, id UISettingID, body UpdateUISettingJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateUISettingResponse, error) {
|
|
rsp, err := c.UpdateUISetting(ctx, id, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUpdateUISettingResponse(rsp)
|
|
}
|
|
|
|
// ParseListEulaVersionsResponse parses an HTTP response from a ListEulaVersionsWithResponse call
|
|
func ParseListEulaVersionsResponse(rsp *http.Response) (*ListEulaVersionsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListEulaVersionsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest EulaVersionList
|
|
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
|
|
}
|
|
|
|
// ParseCreateEulaVersionResponse parses an HTTP response from a CreateEulaVersionWithResponse call
|
|
func ParseCreateEulaVersionResponse(rsp *http.Response) (*CreateEulaVersionResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &CreateEulaVersionResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
|
|
var dest EulaVersion
|
|
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
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseListEulaAgreementsResponse parses an HTTP response from a ListEulaAgreementsWithResponse call
|
|
func ParseListEulaAgreementsResponse(rsp *http.Response) (*ListEulaAgreementsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListEulaAgreementsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest EulaAgreementList
|
|
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
|
|
}
|
|
|
|
// ParseGetEulaComplianceResponse parses an HTTP response from a GetEulaComplianceWithResponse call
|
|
func ParseGetEulaComplianceResponse(rsp *http.Response) (*GetEulaComplianceResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetEulaComplianceResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest EulaComplianceReport
|
|
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
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetEulaVersionResponse parses an HTTP response from a GetEulaVersionWithResponse call
|
|
func ParseGetEulaVersionResponse(rsp *http.Response) (*GetEulaVersionResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetEulaVersionResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest EulaVersion
|
|
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
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseUpdateEulaVersionResponse parses an HTTP response from a UpdateEulaVersionWithResponse call
|
|
func ParseUpdateEulaVersionResponse(rsp *http.Response) (*UpdateEulaVersionResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &UpdateEulaVersionResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest EulaVersion
|
|
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
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseActivateEulaVersionResponse parses an HTTP response from a ActivateEulaVersionWithResponse call
|
|
func ParseActivateEulaVersionResponse(rsp *http.Response) (*ActivateEulaVersionResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ActivateEulaVersionResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest EulaVersion
|
|
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 == 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
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// 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() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
// 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() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
// 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() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
// 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
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// 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() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &CheckAdminUserExistsResponse{
|
|
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 == 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
|
|
}
|
|
|
|
// 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() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &UpdateAdminUserResponse{
|
|
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
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// 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() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &DisableAdminUserResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
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
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// 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() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &EnableAdminUserResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
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
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseCreateClientResponse parses an HTTP response from a CreateClientWithResponse call
|
|
func ParseCreateClientResponse(rsp *http.Response) (*CreateClientResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &CreateClientResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
|
|
var dest ClientIDBody
|
|
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 == 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
|
|
}
|
|
|
|
// ParseDeleteClientResponse parses an HTTP response from a DeleteClientWithResponse call
|
|
func ParseDeleteClientResponse(rsp *http.Response) (*DeleteClientResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &DeleteClientResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest DeleteResponse
|
|
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
|
|
}
|
|
|
|
// ParseGetClientResponse parses an HTTP response from a GetClientWithResponse call
|
|
func ParseGetClientResponse(rsp *http.Response) (*GetClientResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetClientResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest DocClient
|
|
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
|
|
}
|
|
|
|
// 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,
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
// ParseGetCollectorByClientIdResponse parses an HTTP response from a GetCollectorByClientIdWithResponse call
|
|
func ParseGetCollectorByClientIdResponse(rsp *http.Response) (*GetCollectorByClientIdResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetCollectorByClientIdResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest Collector
|
|
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
|
|
}
|
|
|
|
// ParseSetCollectorByClientIdResponse parses an HTTP response from a SetCollectorByClientIdWithResponse call
|
|
func ParseSetCollectorByClientIdResponse(rsp *http.Response) (*SetCollectorByClientIdResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &SetCollectorByClientIdResponse{
|
|
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
|
|
}
|
|
|
|
// ParseListDocumentsByClientIdResponse parses an HTTP response from a ListDocumentsByClientIdWithResponse call
|
|
func ParseListDocumentsByClientIdResponse(rsp *http.Response) (*ListDocumentsByClientIdResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListDocumentsByClientIdResponse{
|
|
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
|
|
|
|
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
|
|
}
|
|
|
|
// 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:
|
|
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
|
|
}
|
|
|
|
// 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
|
|
}
|
|
|
|
// 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
|
|
}
|
|
|
|
// ParseTriggerExportResponse parses an HTTP response from a TriggerExportWithResponse call
|
|
func ParseTriggerExportResponse(rsp *http.Response) (*TriggerExportResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &TriggerExportResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
|
|
var dest IdMessage
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON201 = &dest
|
|
|
|
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
|
|
}
|
|
|
|
// ParseListClientFoldersResponse parses an HTTP response from a ListClientFoldersWithResponse call
|
|
func ParseListClientFoldersResponse(rsp *http.Response) (*ListClientFoldersResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListClientFoldersResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest FolderList
|
|
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
|
|
}
|
|
|
|
// ParseGetStatusByClientIdResponse parses an HTTP response from a GetStatusByClientIdWithResponse call
|
|
func ParseGetStatusByClientIdResponse(rsp *http.Response) (*GetStatusByClientIdResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetStatusByClientIdResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest ClientStatusBody
|
|
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
|
|
}
|
|
|
|
// ParseListClientsResponse parses an HTTP response from a ListClientsWithResponse call
|
|
func ParseListClientsResponse(rsp *http.Response) (*ListClientsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListClientsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest ClientListResponse
|
|
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
|
|
}
|
|
|
|
// ParseDeleteDocumentResponse parses an HTTP response from a DeleteDocumentWithResponse call
|
|
func ParseDeleteDocumentResponse(rsp *http.Response) (*DeleteDocumentResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &DeleteDocumentResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest DeleteResponse
|
|
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
|
|
}
|
|
|
|
// 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 DocumentEnriched
|
|
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
|
|
}
|
|
|
|
// ParseDownloadDocumentResponse parses an HTTP response from a DownloadDocumentWithResponse call
|
|
func ParseDownloadDocumentResponse(rsp *http.Response) (*DownloadDocumentResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &DownloadDocumentResponse{
|
|
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
|
|
}
|
|
|
|
// ParseGetDocumentLabelsResponse parses an HTTP response from a GetDocumentLabelsWithResponse call
|
|
func ParseGetDocumentLabelsResponse(rsp *http.Response) (*GetDocumentLabelsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetDocumentLabelsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Labels *[]LabelRecord `json:"labels,omitempty"`
|
|
}
|
|
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
|
|
}
|
|
|
|
// ParseApplyLabelResponse parses an HTTP response from a ApplyLabelWithResponse call
|
|
func ParseApplyLabelResponse(rsp *http.Response) (*ApplyLabelResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ApplyLabelResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
|
|
var dest LabelRecord
|
|
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 == 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
|
|
}
|
|
|
|
// ParseGetCurrentEulaResponse parses an HTTP response from a GetCurrentEulaWithResponse call
|
|
func ParseGetCurrentEulaResponse(rsp *http.Response) (*GetCurrentEulaResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetCurrentEulaResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest EulaPublicResponse
|
|
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
|
|
}
|
|
|
|
// ParseAgreeToEulaResponse parses an HTTP response from a AgreeToEulaWithResponse call
|
|
func ParseAgreeToEulaResponse(rsp *http.Response) (*AgreeToEulaResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &AgreeToEulaResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest EulaAgreementResponse
|
|
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 EulaAgreementResponse
|
|
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 == 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
|
|
}
|
|
|
|
// ParseGetEulaStatusResponse parses an HTTP response from a GetEulaStatusWithResponse call
|
|
func ParseGetEulaStatusResponse(rsp *http.Response) (*GetEulaStatusResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetEulaStatusResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest EulaStatusResponse
|
|
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
|
|
}
|
|
|
|
// ParseExportStateResponse parses an HTTP response from a ExportStateWithResponse call
|
|
func ParseExportStateResponse(rsp *http.Response) (*ExportStateResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ExportStateResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest ExportDetails
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
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
|
|
}
|
|
|
|
// ParseGetCurrentFieldExtractionResponse parses an HTTP response from a GetCurrentFieldExtractionWithResponse call
|
|
func ParseGetCurrentFieldExtractionResponse(rsp *http.Response) (*GetCurrentFieldExtractionResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetCurrentFieldExtractionResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest FieldExtractionResponse
|
|
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
|
|
}
|
|
|
|
// ParseCreateFieldExtractionResponse parses an HTTP response from a CreateFieldExtractionWithResponse call
|
|
func ParseCreateFieldExtractionResponse(rsp *http.Response) (*CreateFieldExtractionResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &CreateFieldExtractionResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
|
|
var dest FieldExtractionResponse
|
|
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 == 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
|
|
}
|
|
|
|
// ParseGetFieldExtractionHistoryResponse parses an HTTP response from a GetFieldExtractionHistoryWithResponse call
|
|
func ParseGetFieldExtractionHistoryResponse(rsp *http.Response) (*GetFieldExtractionHistoryResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetFieldExtractionHistoryResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Versions *[]FieldExtractionVersion `json:"versions,omitempty"`
|
|
}
|
|
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
|
|
}
|
|
|
|
// ParseGetFieldExtractionByVersionResponse parses an HTTP response from a GetFieldExtractionByVersionWithResponse call
|
|
func ParseGetFieldExtractionByVersionResponse(rsp *http.Response) (*GetFieldExtractionByVersionResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetFieldExtractionByVersionResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest FieldExtractionResponse
|
|
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
|
|
}
|
|
|
|
// ParseCreateFolderResponse parses an HTTP response from a CreateFolderWithResponse call
|
|
func ParseCreateFolderResponse(rsp *http.Response) (*CreateFolderResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &CreateFolderResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
|
|
var dest Folder
|
|
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 == 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
|
|
}
|
|
|
|
// ParseDeleteFolderResponse parses an HTTP response from a DeleteFolderWithResponse call
|
|
func ParseDeleteFolderResponse(rsp *http.Response) (*DeleteFolderResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &DeleteFolderResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest DeleteResponse
|
|
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 == 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
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseRenameFolderResponse parses an HTTP response from a RenameFolderWithResponse call
|
|
func ParseRenameFolderResponse(rsp *http.Response) (*RenameFolderResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &RenameFolderResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest Folder
|
|
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
|
|
}
|
|
|
|
// ParseGetFolderDocumentsResponse parses an HTTP response from a GetFolderDocumentsWithResponse call
|
|
func ParseGetFolderDocumentsResponse(rsp *http.Response) (*GetFolderDocumentsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetFolderDocumentsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Documents *[]DocumentInFolder `json:"documents,omitempty"`
|
|
}
|
|
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
|
|
}
|
|
|
|
// ParseGetFolderMetricsResponse parses an HTTP response from a GetFolderMetricsWithResponse call
|
|
func ParseGetFolderMetricsResponse(rsp *http.Response) (*GetFolderMetricsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetFolderMetricsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest FolderMetrics
|
|
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
|
|
}
|
|
|
|
// 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
|
|
}
|
|
|
|
// ParseGetIdentityResponse parses an HTTP response from a GetIdentityWithResponse call
|
|
func ParseGetIdentityResponse(rsp *http.Response) (*GetIdentityResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetIdentityResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest IdentityResponse
|
|
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
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 502:
|
|
var dest ErrorMessage
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON502 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetDocumentsByLabelResponse parses an HTTP response from a GetDocumentsByLabelWithResponse call
|
|
func ParseGetDocumentsByLabelResponse(rsp *http.Response) (*GetDocumentsByLabelResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetDocumentsByLabelResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Documents *[]DocumentSummary `json:"documents,omitempty"`
|
|
}
|
|
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
|
|
}
|
|
|
|
// 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 {
|
|
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
|
|
}
|
|
|
|
// ParseListUISettingsResponse parses an HTTP response from a ListUISettingsWithResponse call
|
|
func ParseListUISettingsResponse(rsp *http.Response) (*ListUISettingsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListUISettingsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest UISettingListResponse
|
|
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
|
|
}
|
|
|
|
// ParseCreateUISettingResponse parses an HTTP response from a CreateUISettingWithResponse call
|
|
func ParseCreateUISettingResponse(rsp *http.Response) (*CreateUISettingResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &CreateUISettingResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
|
|
var dest UISetting
|
|
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 == 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
|
|
}
|
|
|
|
// ParseDeleteUISettingResponse parses an HTTP response from a DeleteUISettingWithResponse call
|
|
func ParseDeleteUISettingResponse(rsp *http.Response) (*DeleteUISettingResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &DeleteUISettingResponse{
|
|
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
|
|
}
|
|
|
|
// ParseGetUISettingResponse parses an HTTP response from a GetUISettingWithResponse call
|
|
func ParseGetUISettingResponse(rsp *http.Response) (*GetUISettingResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetUISettingResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest UISetting
|
|
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
|
|
}
|
|
|
|
// ParseUpdateUISettingResponse parses an HTTP response from a UpdateUISettingWithResponse call
|
|
func ParseUpdateUISettingResponse(rsp *http.Response) (*UpdateUISettingResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &UpdateUISettingResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest UISetting
|
|
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
|
|
}
|