mirror of
https://github.com/saltbo/zpan.git
synced 2026-09-01 15:49:00 +08:00
00f48cf355
* feat(avatars): host avatars + team logos on Cloud via SDK 2.4.0; remove public-bucket mode Host user avatars and org logos on the ZPan Cloud avatar service (zpan-cloud-sdk ^2.4.0) instead of a public S3/R2 bucket, then remove the now-dead storages.mode / public-bucket concept entirely (#456 parts 2-3). - image-upload gateway: upload/delete via SDK uploadAvatar/deleteAvatar against a bound Cloud client; validate mime (AVATAR_CONTENT_TYPES) + size (MAX_AVATAR_BYTES) before the call; map cloud error codes to 400/403/413/500; unbound instance returns 503 cloud_required (delete is a best-effort no-op). - licensing-cloud: createAvatarUploadClient builds the client with a plain-object bearer header so both the image content-type and Authorization survive hono's per-request header merge (a Headers instance would be dropped). - drop storages.mode (migration via drizzle-kit), StorageRepo.select() no longer takes a mode, remove StorageMode / Storage.mode / mode schema+audit+UI+i18n and the PUBLIC_IMAGES bucket + PUBLIC_IMAGES_URL wiring. Agent-Profile: https://agent-kanban.dev/agents/f759c704c282d88a * ci(deploy): drop dead PUBLIC_IMAGES R2 provisioning from CF deploy The Cloud avatar migration removed the PUBLIC_IMAGES binding from wrangler.toml, so the deploy workflow's R2 public-images steps are dead and must go too — otherwise every CF deploy keeps re-provisioning a public-read zpan-public-images bucket (the footgun #456 eliminates) and sets an unused PUBLIC_IMAGES_URL secret. Removes the bucket-create, managed-public-URL, and secret steps (steps.r2 was only consumed by the secret step). Also drops a stale storage-modes line from the v2.0 roadmap. Agent-Profile: https://agent-kanban.dev/agents/f759c704c282d88a --------- Co-authored-by: Alex Chen <alex-chen@mails.agent-kanban.dev>
41788 lines
1.3 MiB
Plaintext
41788 lines
1.3 MiB
Plaintext
// Package openapi provides primitives to interact with the openapi HTTP API.
|
|
//
|
|
// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.0 DO NOT EDIT.
|
|
package openapi
|
|
|
|
import (
|
|
"bytes"
|
|
"context"
|
|
"encoding/json"
|
|
"fmt"
|
|
"io"
|
|
"net/http"
|
|
"net/url"
|
|
"strings"
|
|
"time"
|
|
|
|
"github.com/oapi-codegen/runtime"
|
|
openapi_types "github.com/oapi-codegen/runtime/types"
|
|
)
|
|
|
|
// Defines values for DownloadTaskSpecSourceType.
|
|
const (
|
|
DownloadTaskSpecSourceTypeHttp DownloadTaskSpecSourceType = "http"
|
|
DownloadTaskSpecSourceTypeMagnet DownloadTaskSpecSourceType = "magnet"
|
|
DownloadTaskSpecSourceTypeTorrentUrl DownloadTaskSpecSourceType = "torrent_url"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the DownloadTaskSpecSourceType enum.
|
|
func (e DownloadTaskSpecSourceType) Valid() bool {
|
|
switch e {
|
|
case DownloadTaskSpecSourceTypeHttp:
|
|
return true
|
|
case DownloadTaskSpecSourceTypeMagnet:
|
|
return true
|
|
case DownloadTaskSpecSourceTypeTorrentUrl:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for DownloadTaskStatusBillingState.
|
|
const (
|
|
DownloadTaskStatusBillingStateInsufficientCredits DownloadTaskStatusBillingState = "insufficient_credits"
|
|
DownloadTaskStatusBillingStateNone DownloadTaskStatusBillingState = "none"
|
|
DownloadTaskStatusBillingStateOk DownloadTaskStatusBillingState = "ok"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the DownloadTaskStatusBillingState enum.
|
|
func (e DownloadTaskStatusBillingState) Valid() bool {
|
|
switch e {
|
|
case DownloadTaskStatusBillingStateInsufficientCredits:
|
|
return true
|
|
case DownloadTaskStatusBillingStateNone:
|
|
return true
|
|
case DownloadTaskStatusBillingStateOk:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for DownloadTaskStatusRuntimeEngine.
|
|
const (
|
|
DownloadTaskStatusRuntimeEngineAria2 DownloadTaskStatusRuntimeEngine = "aria2"
|
|
DownloadTaskStatusRuntimeEngineBuiltin DownloadTaskStatusRuntimeEngine = "builtin"
|
|
DownloadTaskStatusRuntimeEngineQbittorrent DownloadTaskStatusRuntimeEngine = "qbittorrent"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the DownloadTaskStatusRuntimeEngine enum.
|
|
func (e DownloadTaskStatusRuntimeEngine) Valid() bool {
|
|
switch e {
|
|
case DownloadTaskStatusRuntimeEngineAria2:
|
|
return true
|
|
case DownloadTaskStatusRuntimeEngineBuiltin:
|
|
return true
|
|
case DownloadTaskStatusRuntimeEngineQbittorrent:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for DownloadTaskStatusRuntimePhase.
|
|
const (
|
|
DownloadTaskStatusRuntimePhaseCompleted DownloadTaskStatusRuntimePhase = "completed"
|
|
DownloadTaskStatusRuntimePhaseDownloading DownloadTaskStatusRuntimePhase = "downloading"
|
|
DownloadTaskStatusRuntimePhaseError DownloadTaskStatusRuntimePhase = "error"
|
|
DownloadTaskStatusRuntimePhaseMetadata DownloadTaskStatusRuntimePhase = "metadata"
|
|
DownloadTaskStatusRuntimePhaseSeeding DownloadTaskStatusRuntimePhase = "seeding"
|
|
DownloadTaskStatusRuntimePhaseUploading DownloadTaskStatusRuntimePhase = "uploading"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the DownloadTaskStatusRuntimePhase enum.
|
|
func (e DownloadTaskStatusRuntimePhase) Valid() bool {
|
|
switch e {
|
|
case DownloadTaskStatusRuntimePhaseCompleted:
|
|
return true
|
|
case DownloadTaskStatusRuntimePhaseDownloading:
|
|
return true
|
|
case DownloadTaskStatusRuntimePhaseError:
|
|
return true
|
|
case DownloadTaskStatusRuntimePhaseMetadata:
|
|
return true
|
|
case DownloadTaskStatusRuntimePhaseSeeding:
|
|
return true
|
|
case DownloadTaskStatusRuntimePhaseUploading:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for DownloadTaskStatusState.
|
|
const (
|
|
DownloadTaskStatusStateAssigned DownloadTaskStatusState = "assigned"
|
|
DownloadTaskStatusStateCanceled DownloadTaskStatusState = "canceled"
|
|
DownloadTaskStatusStateCanceling DownloadTaskStatusState = "canceling"
|
|
DownloadTaskStatusStateCompleted DownloadTaskStatusState = "completed"
|
|
DownloadTaskStatusStateDownloading DownloadTaskStatusState = "downloading"
|
|
DownloadTaskStatusStateFailed DownloadTaskStatusState = "failed"
|
|
DownloadTaskStatusStateInterrupted DownloadTaskStatusState = "interrupted"
|
|
DownloadTaskStatusStatePaused DownloadTaskStatusState = "paused"
|
|
DownloadTaskStatusStatePausing DownloadTaskStatusState = "pausing"
|
|
DownloadTaskStatusStateQueued DownloadTaskStatusState = "queued"
|
|
DownloadTaskStatusStateSuspended DownloadTaskStatusState = "suspended"
|
|
DownloadTaskStatusStateUploading DownloadTaskStatusState = "uploading"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the DownloadTaskStatusState enum.
|
|
func (e DownloadTaskStatusState) Valid() bool {
|
|
switch e {
|
|
case DownloadTaskStatusStateAssigned:
|
|
return true
|
|
case DownloadTaskStatusStateCanceled:
|
|
return true
|
|
case DownloadTaskStatusStateCanceling:
|
|
return true
|
|
case DownloadTaskStatusStateCompleted:
|
|
return true
|
|
case DownloadTaskStatusStateDownloading:
|
|
return true
|
|
case DownloadTaskStatusStateFailed:
|
|
return true
|
|
case DownloadTaskStatusStateInterrupted:
|
|
return true
|
|
case DownloadTaskStatusStatePaused:
|
|
return true
|
|
case DownloadTaskStatusStatePausing:
|
|
return true
|
|
case DownloadTaskStatusStateQueued:
|
|
return true
|
|
case DownloadTaskStatusStateSuspended:
|
|
return true
|
|
case DownloadTaskStatusStateUploading:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for DownloaderEngine.
|
|
const (
|
|
DownloaderEngineAria2 DownloaderEngine = "aria2"
|
|
DownloaderEngineBuiltin DownloaderEngine = "builtin"
|
|
DownloaderEngineQbittorrent DownloaderEngine = "qbittorrent"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the DownloaderEngine enum.
|
|
func (e DownloaderEngine) Valid() bool {
|
|
switch e {
|
|
case DownloaderEngineAria2:
|
|
return true
|
|
case DownloaderEngineBuiltin:
|
|
return true
|
|
case DownloaderEngineQbittorrent:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for DownloaderStatus.
|
|
const (
|
|
DownloaderStatusDisabled DownloaderStatus = "disabled"
|
|
DownloaderStatusOffline DownloaderStatus = "offline"
|
|
DownloaderStatusOnline DownloaderStatus = "online"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the DownloaderStatus enum.
|
|
func (e DownloaderStatus) Valid() bool {
|
|
switch e {
|
|
case DownloaderStatusDisabled:
|
|
return true
|
|
case DownloaderStatusOffline:
|
|
return true
|
|
case DownloaderStatusOnline:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for ErrorInfoType.
|
|
const (
|
|
TypeGoogleapisComgoogleRpcErrorInfo ErrorInfoType = "type.googleapis.com/google.rpc.ErrorInfo"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the ErrorInfoType enum.
|
|
func (e ErrorInfoType) Valid() bool {
|
|
switch e {
|
|
case TypeGoogleapisComgoogleRpcErrorInfo:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for ImageHostingConfigDomainStatus.
|
|
const (
|
|
ImageHostingConfigDomainStatusNone ImageHostingConfigDomainStatus = "none"
|
|
ImageHostingConfigDomainStatusPending ImageHostingConfigDomainStatus = "pending"
|
|
ImageHostingConfigDomainStatusVerified ImageHostingConfigDomainStatus = "verified"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the ImageHostingConfigDomainStatus enum.
|
|
func (e ImageHostingConfigDomainStatus) Valid() bool {
|
|
switch e {
|
|
case ImageHostingConfigDomainStatusNone:
|
|
return true
|
|
case ImageHostingConfigDomainStatusPending:
|
|
return true
|
|
case ImageHostingConfigDomainStatusVerified:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for ChangeEmail200JSONResponseBodyMessage.
|
|
const (
|
|
ChangeEmail200JSONResponseBodyMessageEmailUpdated ChangeEmail200JSONResponseBodyMessage = "Email updated"
|
|
ChangeEmail200JSONResponseBodyMessageVerificationEmailSent ChangeEmail200JSONResponseBodyMessage = "Verification email sent"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the ChangeEmail200JSONResponseBodyMessage enum.
|
|
func (e ChangeEmail200JSONResponseBodyMessage) Valid() bool {
|
|
switch e {
|
|
case ChangeEmail200JSONResponseBodyMessageEmailUpdated:
|
|
return true
|
|
case ChangeEmail200JSONResponseBodyMessageVerificationEmailSent:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for DeleteUser200JSONResponseBodyMessage.
|
|
const (
|
|
DeleteUser200JSONResponseBodyMessageUserDeleted DeleteUser200JSONResponseBodyMessage = "User deleted"
|
|
DeleteUser200JSONResponseBodyMessageVerificationEmailSent DeleteUser200JSONResponseBodyMessage = "Verification email sent"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the DeleteUser200JSONResponseBodyMessage enum.
|
|
func (e DeleteUser200JSONResponseBodyMessage) Valid() bool {
|
|
switch e {
|
|
case DeleteUser200JSONResponseBodyMessageUserDeleted:
|
|
return true
|
|
case DeleteUser200JSONResponseBodyMessageVerificationEmailSent:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for GetApiAuthDeleteUserCallback200JSONResponseBodyMessage.
|
|
const (
|
|
UserDeleted GetApiAuthDeleteUserCallback200JSONResponseBodyMessage = "User deleted"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the GetApiAuthDeleteUserCallback200JSONResponseBodyMessage enum.
|
|
func (e GetApiAuthDeleteUserCallback200JSONResponseBodyMessage) Valid() bool {
|
|
switch e {
|
|
case UserDeleted:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for GetApiAuthDevice200JSONResponseBodyStatus.
|
|
const (
|
|
Approved GetApiAuthDevice200JSONResponseBodyStatus = "approved"
|
|
Denied GetApiAuthDevice200JSONResponseBodyStatus = "denied"
|
|
Pending GetApiAuthDevice200JSONResponseBodyStatus = "pending"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the GetApiAuthDevice200JSONResponseBodyStatus enum.
|
|
func (e GetApiAuthDevice200JSONResponseBodyStatus) Valid() bool {
|
|
switch e {
|
|
case Approved:
|
|
return true
|
|
case Denied:
|
|
return true
|
|
case Pending:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for PostApiAuthDeviceCode400JSONResponseBodyError.
|
|
const (
|
|
PostApiAuthDeviceCode400JSONResponseBodyErrorInvalidClient PostApiAuthDeviceCode400JSONResponseBodyError = "invalid_client"
|
|
PostApiAuthDeviceCode400JSONResponseBodyErrorInvalidRequest PostApiAuthDeviceCode400JSONResponseBodyError = "invalid_request"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the PostApiAuthDeviceCode400JSONResponseBodyError enum.
|
|
func (e PostApiAuthDeviceCode400JSONResponseBodyError) Valid() bool {
|
|
switch e {
|
|
case PostApiAuthDeviceCode400JSONResponseBodyErrorInvalidClient:
|
|
return true
|
|
case PostApiAuthDeviceCode400JSONResponseBodyErrorInvalidRequest:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for PostApiAuthDeviceToken400JSONResponseBodyError.
|
|
const (
|
|
PostApiAuthDeviceToken400JSONResponseBodyErrorAccessDenied PostApiAuthDeviceToken400JSONResponseBodyError = "access_denied"
|
|
PostApiAuthDeviceToken400JSONResponseBodyErrorAuthorizationPending PostApiAuthDeviceToken400JSONResponseBodyError = "authorization_pending"
|
|
PostApiAuthDeviceToken400JSONResponseBodyErrorExpiredToken PostApiAuthDeviceToken400JSONResponseBodyError = "expired_token"
|
|
PostApiAuthDeviceToken400JSONResponseBodyErrorInvalidGrant PostApiAuthDeviceToken400JSONResponseBodyError = "invalid_grant"
|
|
PostApiAuthDeviceToken400JSONResponseBodyErrorInvalidRequest PostApiAuthDeviceToken400JSONResponseBodyError = "invalid_request"
|
|
PostApiAuthDeviceToken400JSONResponseBodyErrorSlowDown PostApiAuthDeviceToken400JSONResponseBodyError = "slow_down"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the PostApiAuthDeviceToken400JSONResponseBodyError enum.
|
|
func (e PostApiAuthDeviceToken400JSONResponseBodyError) Valid() bool {
|
|
switch e {
|
|
case PostApiAuthDeviceToken400JSONResponseBodyErrorAccessDenied:
|
|
return true
|
|
case PostApiAuthDeviceToken400JSONResponseBodyErrorAuthorizationPending:
|
|
return true
|
|
case PostApiAuthDeviceToken400JSONResponseBodyErrorExpiredToken:
|
|
return true
|
|
case PostApiAuthDeviceToken400JSONResponseBodyErrorInvalidGrant:
|
|
return true
|
|
case PostApiAuthDeviceToken400JSONResponseBodyErrorInvalidRequest:
|
|
return true
|
|
case PostApiAuthDeviceToken400JSONResponseBodyErrorSlowDown:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for PostApiAuthOauth2Link200JSONResponseBodyRedirect.
|
|
const (
|
|
PostApiAuthOauth2Link200JSONResponseBodyRedirectTrue PostApiAuthOauth2Link200JSONResponseBodyRedirect = true
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the PostApiAuthOauth2Link200JSONResponseBodyRedirect enum.
|
|
func (e PostApiAuthOauth2Link200JSONResponseBodyRedirect) Valid() bool {
|
|
switch e {
|
|
case PostApiAuthOauth2Link200JSONResponseBodyRedirectTrue:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for SignInEmail200JSONResponseBodyRedirect.
|
|
const (
|
|
False SignInEmail200JSONResponseBodyRedirect = false
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the SignInEmail200JSONResponseBodyRedirect enum.
|
|
func (e SignInEmail200JSONResponseBodyRedirect) Valid() bool {
|
|
switch e {
|
|
case False:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for ListBackgroundJobsParamsStatus.
|
|
const (
|
|
ListBackgroundJobsParamsStatusCanceled ListBackgroundJobsParamsStatus = "canceled"
|
|
ListBackgroundJobsParamsStatusCompleted ListBackgroundJobsParamsStatus = "completed"
|
|
ListBackgroundJobsParamsStatusFailed ListBackgroundJobsParamsStatus = "failed"
|
|
ListBackgroundJobsParamsStatusQueued ListBackgroundJobsParamsStatus = "queued"
|
|
ListBackgroundJobsParamsStatusRunning ListBackgroundJobsParamsStatus = "running"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the ListBackgroundJobsParamsStatus enum.
|
|
func (e ListBackgroundJobsParamsStatus) Valid() bool {
|
|
switch e {
|
|
case ListBackgroundJobsParamsStatusCanceled:
|
|
return true
|
|
case ListBackgroundJobsParamsStatusCompleted:
|
|
return true
|
|
case ListBackgroundJobsParamsStatusFailed:
|
|
return true
|
|
case ListBackgroundJobsParamsStatusQueued:
|
|
return true
|
|
case ListBackgroundJobsParamsStatusRunning:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for CreateBackgroundJobJSONBody0Type.
|
|
const (
|
|
ArchiveCompress CreateBackgroundJobJSONBody0Type = "archive_compress"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the CreateBackgroundJobJSONBody0Type enum.
|
|
func (e CreateBackgroundJobJSONBody0Type) Valid() bool {
|
|
switch e {
|
|
case ArchiveCompress:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for CreateBackgroundJobJSONBody1Type.
|
|
const (
|
|
ArchiveExtract CreateBackgroundJobJSONBody1Type = "archive_extract"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the CreateBackgroundJobJSONBody1Type enum.
|
|
func (e CreateBackgroundJobJSONBody1Type) Valid() bool {
|
|
switch e {
|
|
case ArchiveExtract:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for CancelBackgroundJobJSONBodyStatus.
|
|
const (
|
|
CancelBackgroundJobJSONBodyStatusCanceled CancelBackgroundJobJSONBodyStatus = "canceled"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the CancelBackgroundJobJSONBodyStatus enum.
|
|
func (e CancelBackgroundJobJSONBodyStatus) Valid() bool {
|
|
switch e {
|
|
case CancelBackgroundJobJSONBodyStatusCanceled:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for CreateDownloaderJSONBodyHeartbeatEngine.
|
|
const (
|
|
CreateDownloaderJSONBodyHeartbeatEngineAria2 CreateDownloaderJSONBodyHeartbeatEngine = "aria2"
|
|
CreateDownloaderJSONBodyHeartbeatEngineBuiltin CreateDownloaderJSONBodyHeartbeatEngine = "builtin"
|
|
CreateDownloaderJSONBodyHeartbeatEngineQbittorrent CreateDownloaderJSONBodyHeartbeatEngine = "qbittorrent"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the CreateDownloaderJSONBodyHeartbeatEngine enum.
|
|
func (e CreateDownloaderJSONBodyHeartbeatEngine) Valid() bool {
|
|
switch e {
|
|
case CreateDownloaderJSONBodyHeartbeatEngineAria2:
|
|
return true
|
|
case CreateDownloaderJSONBodyHeartbeatEngineBuiltin:
|
|
return true
|
|
case CreateDownloaderJSONBodyHeartbeatEngineQbittorrent:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for RecordDownloaderHeartbeatJSONBodyEngine.
|
|
const (
|
|
RecordDownloaderHeartbeatJSONBodyEngineAria2 RecordDownloaderHeartbeatJSONBodyEngine = "aria2"
|
|
RecordDownloaderHeartbeatJSONBodyEngineBuiltin RecordDownloaderHeartbeatJSONBodyEngine = "builtin"
|
|
RecordDownloaderHeartbeatJSONBodyEngineQbittorrent RecordDownloaderHeartbeatJSONBodyEngine = "qbittorrent"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the RecordDownloaderHeartbeatJSONBodyEngine enum.
|
|
func (e RecordDownloaderHeartbeatJSONBodyEngine) Valid() bool {
|
|
switch e {
|
|
case RecordDownloaderHeartbeatJSONBodyEngineAria2:
|
|
return true
|
|
case RecordDownloaderHeartbeatJSONBodyEngineBuiltin:
|
|
return true
|
|
case RecordDownloaderHeartbeatJSONBodyEngineQbittorrent:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for ListDownloadTasksParamsStatus.
|
|
const (
|
|
ListDownloadTasksParamsStatusAssigned ListDownloadTasksParamsStatus = "assigned"
|
|
ListDownloadTasksParamsStatusCanceled ListDownloadTasksParamsStatus = "canceled"
|
|
ListDownloadTasksParamsStatusCanceling ListDownloadTasksParamsStatus = "canceling"
|
|
ListDownloadTasksParamsStatusCompleted ListDownloadTasksParamsStatus = "completed"
|
|
ListDownloadTasksParamsStatusDownloading ListDownloadTasksParamsStatus = "downloading"
|
|
ListDownloadTasksParamsStatusFailed ListDownloadTasksParamsStatus = "failed"
|
|
ListDownloadTasksParamsStatusInterrupted ListDownloadTasksParamsStatus = "interrupted"
|
|
ListDownloadTasksParamsStatusPaused ListDownloadTasksParamsStatus = "paused"
|
|
ListDownloadTasksParamsStatusPausing ListDownloadTasksParamsStatus = "pausing"
|
|
ListDownloadTasksParamsStatusQueued ListDownloadTasksParamsStatus = "queued"
|
|
ListDownloadTasksParamsStatusSuspended ListDownloadTasksParamsStatus = "suspended"
|
|
ListDownloadTasksParamsStatusUploading ListDownloadTasksParamsStatus = "uploading"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the ListDownloadTasksParamsStatus enum.
|
|
func (e ListDownloadTasksParamsStatus) Valid() bool {
|
|
switch e {
|
|
case ListDownloadTasksParamsStatusAssigned:
|
|
return true
|
|
case ListDownloadTasksParamsStatusCanceled:
|
|
return true
|
|
case ListDownloadTasksParamsStatusCanceling:
|
|
return true
|
|
case ListDownloadTasksParamsStatusCompleted:
|
|
return true
|
|
case ListDownloadTasksParamsStatusDownloading:
|
|
return true
|
|
case ListDownloadTasksParamsStatusFailed:
|
|
return true
|
|
case ListDownloadTasksParamsStatusInterrupted:
|
|
return true
|
|
case ListDownloadTasksParamsStatusPaused:
|
|
return true
|
|
case ListDownloadTasksParamsStatusPausing:
|
|
return true
|
|
case ListDownloadTasksParamsStatusQueued:
|
|
return true
|
|
case ListDownloadTasksParamsStatusSuspended:
|
|
return true
|
|
case ListDownloadTasksParamsStatusUploading:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for ListDownloadTasksParamsAssignedTo.
|
|
const (
|
|
Me ListDownloadTasksParamsAssignedTo = "me"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the ListDownloadTasksParamsAssignedTo enum.
|
|
func (e ListDownloadTasksParamsAssignedTo) Valid() bool {
|
|
switch e {
|
|
case Me:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for ListDownloadTasksParamsSortBy.
|
|
const (
|
|
Category ListDownloadTasksParamsSortBy = "category"
|
|
CreatedAt ListDownloadTasksParamsSortBy = "createdAt"
|
|
Eta ListDownloadTasksParamsSortBy = "eta"
|
|
Progress ListDownloadTasksParamsSortBy = "progress"
|
|
Source ListDownloadTasksParamsSortBy = "source"
|
|
Status ListDownloadTasksParamsSortBy = "status"
|
|
Tags ListDownloadTasksParamsSortBy = "tags"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the ListDownloadTasksParamsSortBy enum.
|
|
func (e ListDownloadTasksParamsSortBy) Valid() bool {
|
|
switch e {
|
|
case Category:
|
|
return true
|
|
case CreatedAt:
|
|
return true
|
|
case Eta:
|
|
return true
|
|
case Progress:
|
|
return true
|
|
case Source:
|
|
return true
|
|
case Status:
|
|
return true
|
|
case Tags:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for ListDownloadTasksParamsSortDir.
|
|
const (
|
|
Asc ListDownloadTasksParamsSortDir = "asc"
|
|
Desc ListDownloadTasksParamsSortDir = "desc"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the ListDownloadTasksParamsSortDir enum.
|
|
func (e ListDownloadTasksParamsSortDir) Valid() bool {
|
|
switch e {
|
|
case Asc:
|
|
return true
|
|
case Desc:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for CreateDownloadTaskJSONBodySourceType.
|
|
const (
|
|
CreateDownloadTaskJSONBodySourceTypeHttp CreateDownloadTaskJSONBodySourceType = "http"
|
|
CreateDownloadTaskJSONBodySourceTypeMagnet CreateDownloadTaskJSONBodySourceType = "magnet"
|
|
CreateDownloadTaskJSONBodySourceTypeTorrentUrl CreateDownloadTaskJSONBodySourceType = "torrent_url"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the CreateDownloadTaskJSONBodySourceType enum.
|
|
func (e CreateDownloadTaskJSONBodySourceType) Valid() bool {
|
|
switch e {
|
|
case CreateDownloadTaskJSONBodySourceTypeHttp:
|
|
return true
|
|
case CreateDownloadTaskJSONBodySourceTypeMagnet:
|
|
return true
|
|
case CreateDownloadTaskJSONBodySourceTypeTorrentUrl:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for UpdateDownloadTaskJSONBodyRuntimeEngine.
|
|
const (
|
|
UpdateDownloadTaskJSONBodyRuntimeEngineAria2 UpdateDownloadTaskJSONBodyRuntimeEngine = "aria2"
|
|
UpdateDownloadTaskJSONBodyRuntimeEngineBuiltin UpdateDownloadTaskJSONBodyRuntimeEngine = "builtin"
|
|
UpdateDownloadTaskJSONBodyRuntimeEngineQbittorrent UpdateDownloadTaskJSONBodyRuntimeEngine = "qbittorrent"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the UpdateDownloadTaskJSONBodyRuntimeEngine enum.
|
|
func (e UpdateDownloadTaskJSONBodyRuntimeEngine) Valid() bool {
|
|
switch e {
|
|
case UpdateDownloadTaskJSONBodyRuntimeEngineAria2:
|
|
return true
|
|
case UpdateDownloadTaskJSONBodyRuntimeEngineBuiltin:
|
|
return true
|
|
case UpdateDownloadTaskJSONBodyRuntimeEngineQbittorrent:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for UpdateDownloadTaskJSONBodyRuntimePhase.
|
|
const (
|
|
UpdateDownloadTaskJSONBodyRuntimePhaseCompleted UpdateDownloadTaskJSONBodyRuntimePhase = "completed"
|
|
UpdateDownloadTaskJSONBodyRuntimePhaseDownloading UpdateDownloadTaskJSONBodyRuntimePhase = "downloading"
|
|
UpdateDownloadTaskJSONBodyRuntimePhaseError UpdateDownloadTaskJSONBodyRuntimePhase = "error"
|
|
UpdateDownloadTaskJSONBodyRuntimePhaseMetadata UpdateDownloadTaskJSONBodyRuntimePhase = "metadata"
|
|
UpdateDownloadTaskJSONBodyRuntimePhaseSeeding UpdateDownloadTaskJSONBodyRuntimePhase = "seeding"
|
|
UpdateDownloadTaskJSONBodyRuntimePhaseUploading UpdateDownloadTaskJSONBodyRuntimePhase = "uploading"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the UpdateDownloadTaskJSONBodyRuntimePhase enum.
|
|
func (e UpdateDownloadTaskJSONBodyRuntimePhase) Valid() bool {
|
|
switch e {
|
|
case UpdateDownloadTaskJSONBodyRuntimePhaseCompleted:
|
|
return true
|
|
case UpdateDownloadTaskJSONBodyRuntimePhaseDownloading:
|
|
return true
|
|
case UpdateDownloadTaskJSONBodyRuntimePhaseError:
|
|
return true
|
|
case UpdateDownloadTaskJSONBodyRuntimePhaseMetadata:
|
|
return true
|
|
case UpdateDownloadTaskJSONBodyRuntimePhaseSeeding:
|
|
return true
|
|
case UpdateDownloadTaskJSONBodyRuntimePhaseUploading:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for UpdateDownloadTaskJSONBodyStatus.
|
|
const (
|
|
UpdateDownloadTaskJSONBodyStatusAssigned UpdateDownloadTaskJSONBodyStatus = "assigned"
|
|
UpdateDownloadTaskJSONBodyStatusCanceled UpdateDownloadTaskJSONBodyStatus = "canceled"
|
|
UpdateDownloadTaskJSONBodyStatusCanceling UpdateDownloadTaskJSONBodyStatus = "canceling"
|
|
UpdateDownloadTaskJSONBodyStatusCompleted UpdateDownloadTaskJSONBodyStatus = "completed"
|
|
UpdateDownloadTaskJSONBodyStatusDownloading UpdateDownloadTaskJSONBodyStatus = "downloading"
|
|
UpdateDownloadTaskJSONBodyStatusFailed UpdateDownloadTaskJSONBodyStatus = "failed"
|
|
UpdateDownloadTaskJSONBodyStatusInterrupted UpdateDownloadTaskJSONBodyStatus = "interrupted"
|
|
UpdateDownloadTaskJSONBodyStatusPaused UpdateDownloadTaskJSONBodyStatus = "paused"
|
|
UpdateDownloadTaskJSONBodyStatusPausing UpdateDownloadTaskJSONBodyStatus = "pausing"
|
|
UpdateDownloadTaskJSONBodyStatusQueued UpdateDownloadTaskJSONBodyStatus = "queued"
|
|
UpdateDownloadTaskJSONBodyStatusSuspended UpdateDownloadTaskJSONBodyStatus = "suspended"
|
|
UpdateDownloadTaskJSONBodyStatusUploading UpdateDownloadTaskJSONBodyStatus = "uploading"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the UpdateDownloadTaskJSONBodyStatus enum.
|
|
func (e UpdateDownloadTaskJSONBodyStatus) Valid() bool {
|
|
switch e {
|
|
case UpdateDownloadTaskJSONBodyStatusAssigned:
|
|
return true
|
|
case UpdateDownloadTaskJSONBodyStatusCanceled:
|
|
return true
|
|
case UpdateDownloadTaskJSONBodyStatusCanceling:
|
|
return true
|
|
case UpdateDownloadTaskJSONBodyStatusCompleted:
|
|
return true
|
|
case UpdateDownloadTaskJSONBodyStatusDownloading:
|
|
return true
|
|
case UpdateDownloadTaskJSONBodyStatusFailed:
|
|
return true
|
|
case UpdateDownloadTaskJSONBodyStatusInterrupted:
|
|
return true
|
|
case UpdateDownloadTaskJSONBodyStatusPaused:
|
|
return true
|
|
case UpdateDownloadTaskJSONBodyStatusPausing:
|
|
return true
|
|
case UpdateDownloadTaskJSONBodyStatusQueued:
|
|
return true
|
|
case UpdateDownloadTaskJSONBodyStatusSuspended:
|
|
return true
|
|
case UpdateDownloadTaskJSONBodyStatusUploading:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for SetDownloadTaskStatusJSONBodyStatus.
|
|
const (
|
|
SetDownloadTaskStatusJSONBodyStatusCanceled SetDownloadTaskStatusJSONBodyStatus = "canceled"
|
|
SetDownloadTaskStatusJSONBodyStatusPaused SetDownloadTaskStatusJSONBodyStatus = "paused"
|
|
SetDownloadTaskStatusJSONBodyStatusQueued SetDownloadTaskStatusJSONBodyStatus = "queued"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the SetDownloadTaskStatusJSONBodyStatus enum.
|
|
func (e SetDownloadTaskStatusJSONBodyStatus) Valid() bool {
|
|
switch e {
|
|
case SetDownloadTaskStatusJSONBodyStatusCanceled:
|
|
return true
|
|
case SetDownloadTaskStatusJSONBodyStatusPaused:
|
|
return true
|
|
case SetDownloadTaskStatusJSONBodyStatusQueued:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for UpdateImageHostingConfigJSONBodyEnabled.
|
|
const (
|
|
UpdateImageHostingConfigJSONBodyEnabledTrue UpdateImageHostingConfigJSONBodyEnabled = true
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the UpdateImageHostingConfigJSONBodyEnabled enum.
|
|
func (e UpdateImageHostingConfigJSONBodyEnabled) Valid() bool {
|
|
switch e {
|
|
case UpdateImageHostingConfigJSONBodyEnabledTrue:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for PresignImageHostingUploadJSONBodyMime.
|
|
const (
|
|
Imagegif PresignImageHostingUploadJSONBodyMime = "image/gif"
|
|
Imagejpeg PresignImageHostingUploadJSONBodyMime = "image/jpeg"
|
|
Imagepng PresignImageHostingUploadJSONBodyMime = "image/png"
|
|
Imagewebp PresignImageHostingUploadJSONBodyMime = "image/webp"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the PresignImageHostingUploadJSONBodyMime enum.
|
|
func (e PresignImageHostingUploadJSONBodyMime) Valid() bool {
|
|
switch e {
|
|
case Imagegif:
|
|
return true
|
|
case Imagejpeg:
|
|
return true
|
|
case Imagepng:
|
|
return true
|
|
case Imagewebp:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for CreateObjectJSONBodyOnConflict.
|
|
const (
|
|
CreateObjectJSONBodyOnConflictFail CreateObjectJSONBodyOnConflict = "fail"
|
|
CreateObjectJSONBodyOnConflictRename CreateObjectJSONBodyOnConflict = "rename"
|
|
CreateObjectJSONBodyOnConflictReplace CreateObjectJSONBodyOnConflict = "replace"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the CreateObjectJSONBodyOnConflict enum.
|
|
func (e CreateObjectJSONBodyOnConflict) Valid() bool {
|
|
switch e {
|
|
case CreateObjectJSONBodyOnConflictFail:
|
|
return true
|
|
case CreateObjectJSONBodyOnConflictRename:
|
|
return true
|
|
case CreateObjectJSONBodyOnConflictReplace:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for UpdateObjectJSONBodyOnConflict.
|
|
const (
|
|
UpdateObjectJSONBodyOnConflictFail UpdateObjectJSONBodyOnConflict = "fail"
|
|
UpdateObjectJSONBodyOnConflictRename UpdateObjectJSONBodyOnConflict = "rename"
|
|
UpdateObjectJSONBodyOnConflictReplace UpdateObjectJSONBodyOnConflict = "replace"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the UpdateObjectJSONBodyOnConflict enum.
|
|
func (e UpdateObjectJSONBodyOnConflict) Valid() bool {
|
|
switch e {
|
|
case UpdateObjectJSONBodyOnConflictFail:
|
|
return true
|
|
case UpdateObjectJSONBodyOnConflictRename:
|
|
return true
|
|
case UpdateObjectJSONBodyOnConflictReplace:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for CopyObjectJSONBodyOnConflict.
|
|
const (
|
|
CopyObjectJSONBodyOnConflictFail CopyObjectJSONBodyOnConflict = "fail"
|
|
CopyObjectJSONBodyOnConflictRename CopyObjectJSONBodyOnConflict = "rename"
|
|
CopyObjectJSONBodyOnConflictReplace CopyObjectJSONBodyOnConflict = "replace"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the CopyObjectJSONBodyOnConflict enum.
|
|
func (e CopyObjectJSONBodyOnConflict) Valid() bool {
|
|
switch e {
|
|
case CopyObjectJSONBodyOnConflictFail:
|
|
return true
|
|
case CopyObjectJSONBodyOnConflictRename:
|
|
return true
|
|
case CopyObjectJSONBodyOnConflictReplace:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for TransferObjectJSONBodyMode.
|
|
const (
|
|
Copy TransferObjectJSONBodyMode = "copy"
|
|
Move TransferObjectJSONBodyMode = "move"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the TransferObjectJSONBodyMode enum.
|
|
func (e TransferObjectJSONBodyMode) Valid() bool {
|
|
switch e {
|
|
case Copy:
|
|
return true
|
|
case Move:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for ListSharesParamsStatus.
|
|
const (
|
|
ListSharesParamsStatusActive ListSharesParamsStatus = "active"
|
|
ListSharesParamsStatusRevoked ListSharesParamsStatus = "revoked"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the ListSharesParamsStatus enum.
|
|
func (e ListSharesParamsStatus) Valid() bool {
|
|
switch e {
|
|
case ListSharesParamsStatusActive:
|
|
return true
|
|
case ListSharesParamsStatusRevoked:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for ListSharesParamsBox.
|
|
const (
|
|
Received ListSharesParamsBox = "received"
|
|
Sent ListSharesParamsBox = "sent"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the ListSharesParamsBox enum.
|
|
func (e ListSharesParamsBox) Valid() bool {
|
|
switch e {
|
|
case Received:
|
|
return true
|
|
case Sent:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for CreateShareJSONBodyKind.
|
|
const (
|
|
Direct CreateShareJSONBodyKind = "direct"
|
|
Landing CreateShareJSONBodyKind = "landing"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the CreateShareJSONBodyKind enum.
|
|
func (e CreateShareJSONBodyKind) Valid() bool {
|
|
switch e {
|
|
case Direct:
|
|
return true
|
|
case Landing:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for VerifySharePassword200JSONResponseBodyOk.
|
|
const (
|
|
VerifySharePassword200JSONResponseBodyOkTrue VerifySharePassword200JSONResponseBodyOk = true
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the VerifySharePassword200JSONResponseBodyOk enum.
|
|
func (e VerifySharePassword200JSONResponseBodyOk) Valid() bool {
|
|
switch e {
|
|
case VerifySharePassword200JSONResponseBodyOkTrue:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for RevokeShareJSONBodyStatus.
|
|
const (
|
|
RevokeShareJSONBodyStatusRevoked RevokeShareJSONBodyStatus = "revoked"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the RevokeShareJSONBodyStatus enum.
|
|
func (e RevokeShareJSONBodyStatus) Valid() bool {
|
|
switch e {
|
|
case RevokeShareJSONBodyStatusRevoked:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for ListAnnouncementsParamsScope.
|
|
const (
|
|
Active ListAnnouncementsParamsScope = "active"
|
|
All ListAnnouncementsParamsScope = "all"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the ListAnnouncementsParamsScope enum.
|
|
func (e ListAnnouncementsParamsScope) Valid() bool {
|
|
switch e {
|
|
case Active:
|
|
return true
|
|
case All:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for ListAnnouncementsParamsStatus.
|
|
const (
|
|
ListAnnouncementsParamsStatusArchived ListAnnouncementsParamsStatus = "archived"
|
|
ListAnnouncementsParamsStatusDraft ListAnnouncementsParamsStatus = "draft"
|
|
ListAnnouncementsParamsStatusPublished ListAnnouncementsParamsStatus = "published"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the ListAnnouncementsParamsStatus enum.
|
|
func (e ListAnnouncementsParamsStatus) Valid() bool {
|
|
switch e {
|
|
case ListAnnouncementsParamsStatusArchived:
|
|
return true
|
|
case ListAnnouncementsParamsStatusDraft:
|
|
return true
|
|
case ListAnnouncementsParamsStatusPublished:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for CreateAnnouncementJSONBodyStatus.
|
|
const (
|
|
CreateAnnouncementJSONBodyStatusArchived CreateAnnouncementJSONBodyStatus = "archived"
|
|
CreateAnnouncementJSONBodyStatusDraft CreateAnnouncementJSONBodyStatus = "draft"
|
|
CreateAnnouncementJSONBodyStatusPublished CreateAnnouncementJSONBodyStatus = "published"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the CreateAnnouncementJSONBodyStatus enum.
|
|
func (e CreateAnnouncementJSONBodyStatus) Valid() bool {
|
|
switch e {
|
|
case CreateAnnouncementJSONBodyStatusArchived:
|
|
return true
|
|
case CreateAnnouncementJSONBodyStatusDraft:
|
|
return true
|
|
case CreateAnnouncementJSONBodyStatusPublished:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for UpdateAnnouncementJSONBodyStatus.
|
|
const (
|
|
Archived UpdateAnnouncementJSONBodyStatus = "archived"
|
|
Draft UpdateAnnouncementJSONBodyStatus = "draft"
|
|
Published UpdateAnnouncementJSONBodyStatus = "published"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the UpdateAnnouncementJSONBodyStatus enum.
|
|
func (e UpdateAnnouncementJSONBodyStatus) Valid() bool {
|
|
switch e {
|
|
case Archived:
|
|
return true
|
|
case Draft:
|
|
return true
|
|
case Published:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for UpsertAuthProviderJSONBodyType.
|
|
const (
|
|
UpsertAuthProviderJSONBodyTypeBuiltin UpsertAuthProviderJSONBodyType = "builtin"
|
|
UpsertAuthProviderJSONBodyTypeOidc UpsertAuthProviderJSONBodyType = "oidc"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the UpsertAuthProviderJSONBodyType enum.
|
|
func (e UpsertAuthProviderJSONBodyType) Valid() bool {
|
|
switch e {
|
|
case UpsertAuthProviderJSONBodyTypeBuiltin:
|
|
return true
|
|
case UpsertAuthProviderJSONBodyTypeOidc:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for SaveEmailConfigJSONBody0Provider.
|
|
const (
|
|
Smtp SaveEmailConfigJSONBody0Provider = "smtp"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the SaveEmailConfigJSONBody0Provider enum.
|
|
func (e SaveEmailConfigJSONBody0Provider) Valid() bool {
|
|
switch e {
|
|
case Smtp:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for SaveEmailConfigJSONBody1Provider.
|
|
const (
|
|
Http SaveEmailConfigJSONBody1Provider = "http"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the SaveEmailConfigJSONBody1Provider enum.
|
|
func (e SaveEmailConfigJSONBody1Provider) Valid() bool {
|
|
switch e {
|
|
case Http:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for SaveEmailConfigJSONBody2Provider.
|
|
const (
|
|
Cloudflare SaveEmailConfigJSONBody2Provider = "cloudflare"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the SaveEmailConfigJSONBody2Provider enum.
|
|
func (e SaveEmailConfigJSONBody2Provider) Valid() bool {
|
|
switch e {
|
|
case Cloudflare:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for UpdateStorageJSONBodyStatus.
|
|
const (
|
|
UpdateStorageJSONBodyStatusActive UpdateStorageJSONBodyStatus = "active"
|
|
UpdateStorageJSONBodyStatusDisabled UpdateStorageJSONBodyStatus = "disabled"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the UpdateStorageJSONBodyStatus enum.
|
|
func (e UpdateStorageJSONBodyStatus) Valid() bool {
|
|
switch e {
|
|
case UpdateStorageJSONBodyStatusActive:
|
|
return true
|
|
case UpdateStorageJSONBodyStatusDisabled:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for CancelOrderJSONBodyStatus.
|
|
const (
|
|
Canceled CancelOrderJSONBodyStatus = "canceled"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the CancelOrderJSONBodyStatus enum.
|
|
func (e CancelOrderJSONBodyStatus) Valid() bool {
|
|
switch e {
|
|
case Canceled:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for GrantTeamEntitlementJSONBodyResourceType.
|
|
const (
|
|
GrantTeamEntitlementJSONBodyResourceTypeStorage GrantTeamEntitlementJSONBodyResourceType = "storage"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the GrantTeamEntitlementJSONBodyResourceType enum.
|
|
func (e GrantTeamEntitlementJSONBodyResourceType) Valid() bool {
|
|
switch e {
|
|
case GrantTeamEntitlementJSONBodyResourceTypeStorage:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for CreateTeamInviteLinkJSONBodyRole.
|
|
const (
|
|
Editor CreateTeamInviteLinkJSONBodyRole = "editor"
|
|
Viewer CreateTeamInviteLinkJSONBodyRole = "viewer"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the CreateTeamInviteLinkJSONBodyRole enum.
|
|
func (e CreateTeamInviteLinkJSONBodyRole) Valid() bool {
|
|
switch e {
|
|
case Editor:
|
|
return true
|
|
case Viewer:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for JoinTeam200JSONResponseBodyOk.
|
|
const (
|
|
JoinTeam200JSONResponseBodyOkTrue JoinTeam200JSONResponseBodyOk = true
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the JoinTeam200JSONResponseBodyOk enum.
|
|
func (e JoinTeam200JSONResponseBodyOk) Valid() bool {
|
|
switch e {
|
|
case JoinTeam200JSONResponseBodyOkTrue:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for RestoreObjectJSONBodyOnConflict.
|
|
const (
|
|
RestoreObjectJSONBodyOnConflictFail RestoreObjectJSONBodyOnConflict = "fail"
|
|
RestoreObjectJSONBodyOnConflictRename RestoreObjectJSONBodyOnConflict = "rename"
|
|
RestoreObjectJSONBodyOnConflictReplace RestoreObjectJSONBodyOnConflict = "replace"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the RestoreObjectJSONBodyOnConflict enum.
|
|
func (e RestoreObjectJSONBodyOnConflict) Valid() bool {
|
|
switch e {
|
|
case RestoreObjectJSONBodyOnConflictFail:
|
|
return true
|
|
case RestoreObjectJSONBodyOnConflictRename:
|
|
return true
|
|
case RestoreObjectJSONBodyOnConflictReplace:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for GrantUserEntitlementJSONBodyResourceType.
|
|
const (
|
|
GrantUserEntitlementJSONBodyResourceTypeStorage GrantUserEntitlementJSONBodyResourceType = "storage"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the GrantUserEntitlementJSONBodyResourceType enum.
|
|
func (e GrantUserEntitlementJSONBodyResourceType) Valid() bool {
|
|
switch e {
|
|
case GrantUserEntitlementJSONBodyResourceTypeStorage:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// ActivityEvent defines model for ActivityEvent.
|
|
type ActivityEvent struct {
|
|
Action string `json:"action"`
|
|
CreatedAt string `json:"createdAt"`
|
|
Id string `json:"id"`
|
|
Metadata *string `json:"metadata"`
|
|
OrgId string `json:"orgId"`
|
|
TargetId *string `json:"targetId"`
|
|
TargetName string `json:"targetName"`
|
|
TargetType string `json:"targetType"`
|
|
User struct {
|
|
Id string `json:"id"`
|
|
Image *string `json:"image"`
|
|
Name string `json:"name"`
|
|
} `json:"user"`
|
|
UserId string `json:"userId"`
|
|
}
|
|
|
|
// ActivityPage defines model for ActivityPage.
|
|
type ActivityPage struct {
|
|
Items []ActivityEvent `json:"items"`
|
|
Page int `json:"page"`
|
|
PageSize int `json:"pageSize"`
|
|
Total int `json:"total"`
|
|
}
|
|
|
|
// AdminUserQuota defines model for AdminUserQuota.
|
|
type AdminUserQuota struct {
|
|
HasPersonalOrg bool `json:"hasPersonalOrg"`
|
|
Total int `json:"total"`
|
|
Used int `json:"used"`
|
|
}
|
|
|
|
// Announcement defines model for Announcement.
|
|
type Announcement struct {
|
|
Body string `json:"body"`
|
|
CreatedAt string `json:"createdAt"`
|
|
CreatedBy string `json:"createdBy"`
|
|
ExpiresAt *string `json:"expiresAt"`
|
|
Id string `json:"id"`
|
|
Priority int `json:"priority"`
|
|
PublishedAt *string `json:"publishedAt"`
|
|
Status string `json:"status"`
|
|
Title string `json:"title"`
|
|
UpdatedAt string `json:"updatedAt"`
|
|
}
|
|
|
|
// AnnouncementList defines model for AnnouncementList.
|
|
type AnnouncementList struct {
|
|
Items []Announcement `json:"items"`
|
|
Page int `json:"page"`
|
|
PageSize int `json:"pageSize"`
|
|
Total int `json:"total"`
|
|
}
|
|
|
|
// AuditEvent defines model for AuditEvent.
|
|
type AuditEvent struct {
|
|
Action string `json:"action"`
|
|
CreatedAt string `json:"createdAt"`
|
|
Id string `json:"id"`
|
|
Metadata *string `json:"metadata"`
|
|
OrgId string `json:"orgId"`
|
|
OrgName *string `json:"orgName"`
|
|
TargetId *string `json:"targetId"`
|
|
TargetName string `json:"targetName"`
|
|
TargetType string `json:"targetType"`
|
|
User struct {
|
|
Id string `json:"id"`
|
|
Image *string `json:"image"`
|
|
Name string `json:"name"`
|
|
} `json:"user"`
|
|
UserId string `json:"userId"`
|
|
}
|
|
|
|
// AuditEventPage defines model for AuditEventPage.
|
|
type AuditEventPage struct {
|
|
Items []AuditEvent `json:"items"`
|
|
Page int `json:"page"`
|
|
PageSize int `json:"pageSize"`
|
|
Total int `json:"total"`
|
|
}
|
|
|
|
// AuthProvider defines model for AuthProvider.
|
|
type AuthProvider struct {
|
|
ClientId string `json:"clientId"`
|
|
ClientSecret *string `json:"clientSecret"`
|
|
DiscoveryUrl *string `json:"discoveryUrl"`
|
|
Enabled bool `json:"enabled"`
|
|
Icon string `json:"icon"`
|
|
Name string `json:"name"`
|
|
ProviderId string `json:"providerId"`
|
|
Scopes *[]string `json:"scopes"`
|
|
Type string `json:"type"`
|
|
}
|
|
|
|
// AuthProviderList defines model for AuthProviderList.
|
|
type AuthProviderList struct {
|
|
Items []AuthProvider `json:"items"`
|
|
Page int `json:"page"`
|
|
PageSize int `json:"pageSize"`
|
|
Total int `json:"total"`
|
|
}
|
|
|
|
// BackgroundJob defines model for BackgroundJob.
|
|
type BackgroundJob struct {
|
|
Cancelable bool `json:"cancelable"`
|
|
CreatedAt string `json:"createdAt"`
|
|
ErrorMessage *string `json:"errorMessage"`
|
|
FinishedAt *string `json:"finishedAt"`
|
|
Id string `json:"id"`
|
|
Metadata *map[string]*interface{} `json:"metadata"`
|
|
OrgId string `json:"orgId"`
|
|
Progress struct {
|
|
CurrentFilename *string `json:"currentFilename"`
|
|
FileCount int `json:"fileCount"`
|
|
InputBytes int `json:"inputBytes"`
|
|
OutputBytes int `json:"outputBytes"`
|
|
ProcessedBytes int `json:"processedBytes"`
|
|
} `json:"progress"`
|
|
ResultMetadata *map[string]*interface{} `json:"resultMetadata"`
|
|
RetriedFromJobId *string `json:"retriedFromJobId"`
|
|
Retryable bool `json:"retryable"`
|
|
StartedAt *string `json:"startedAt"`
|
|
Status string `json:"status"`
|
|
TargetFolder *string `json:"targetFolder"`
|
|
TargetPath *string `json:"targetPath"`
|
|
Type string `json:"type"`
|
|
UpdatedAt string `json:"updatedAt"`
|
|
UserId string `json:"userId"`
|
|
}
|
|
|
|
// BackgroundJobPage defines model for BackgroundJobPage.
|
|
type BackgroundJobPage struct {
|
|
Items []BackgroundJob `json:"items"`
|
|
Page int `json:"page"`
|
|
PageSize int `json:"pageSize"`
|
|
Total int `json:"total"`
|
|
}
|
|
|
|
// BrandingConfig defines model for BrandingConfig.
|
|
type BrandingConfig struct {
|
|
FaviconUrl *string `json:"favicon_url"`
|
|
HidePoweredBy bool `json:"hide_powered_by"`
|
|
LogoUrl *string `json:"logo_url"`
|
|
Theme struct {
|
|
Configured bool `json:"configured"`
|
|
Custom *struct {
|
|
CanvasColor string `json:"canvas_color"`
|
|
PrimaryColor string `json:"primary_color"`
|
|
PrimaryForeground string `json:"primary_foreground"`
|
|
RingColor string `json:"ring_color"`
|
|
SidebarAccentColor string `json:"sidebar_accent_color"`
|
|
} `json:"custom"`
|
|
Mode string `json:"mode"`
|
|
Preset string `json:"preset"`
|
|
} `json:"theme"`
|
|
WordmarkText *string `json:"wordmark_text"`
|
|
}
|
|
|
|
// Changelog defines model for Changelog.
|
|
type Changelog struct {
|
|
CurrentVersion string `json:"currentVersion"`
|
|
LatestVersion *string `json:"latestVersion"`
|
|
Markdown string `json:"markdown"`
|
|
UpdateAvailable bool `json:"updateAvailable"`
|
|
}
|
|
|
|
// CloudStoreValue defines model for CloudStoreValue.
|
|
type CloudStoreValue = interface{}
|
|
|
|
// CreatedShare defines model for CreatedShare.
|
|
type CreatedShare struct {
|
|
DownloadLimit *int `json:"downloadLimit"`
|
|
ExpiresAt *string `json:"expiresAt"`
|
|
Kind string `json:"kind"`
|
|
Token string `json:"token"`
|
|
Urls struct {
|
|
Direct *string `json:"direct,omitempty"`
|
|
Landing *string `json:"landing,omitempty"`
|
|
} `json:"urls"`
|
|
}
|
|
|
|
// DownloadTask defines model for DownloadTask.
|
|
type DownloadTask struct {
|
|
CreatedAt string `json:"createdAt"`
|
|
CreatedBy *string `json:"createdBy,omitempty"`
|
|
Id string `json:"id"`
|
|
OrgId *string `json:"orgId,omitempty"`
|
|
Spec struct {
|
|
Destination struct {
|
|
Folder string `json:"folder"`
|
|
Name *string `json:"name"`
|
|
} `json:"destination"`
|
|
Labels struct {
|
|
Category *string `json:"category"`
|
|
Tags []string `json:"tags"`
|
|
} `json:"labels"`
|
|
Source struct {
|
|
Type DownloadTaskSpecSourceType `json:"type"`
|
|
Uri string `json:"uri"`
|
|
} `json:"source"`
|
|
} `json:"spec"`
|
|
Status struct {
|
|
Assignment *struct {
|
|
AssignedAt *string `json:"assignedAt,omitempty"`
|
|
DownloaderId string `json:"downloaderId"`
|
|
UploadToken *string `json:"uploadToken,omitempty"`
|
|
} `json:"assignment"`
|
|
Attempt int `json:"attempt"`
|
|
Billing struct {
|
|
AuthorizedBytes int64 `json:"authorizedBytes"`
|
|
ChargedBytes int64 `json:"chargedBytes"`
|
|
ChargedCredits int64 `json:"chargedCredits"`
|
|
State DownloadTaskStatusBillingState `json:"state"`
|
|
} `json:"billing"`
|
|
Error *struct {
|
|
Code *string `json:"code,omitempty"`
|
|
Message *string `json:"message"`
|
|
} `json:"error"`
|
|
FinishedAt *string `json:"finishedAt"`
|
|
Output *struct {
|
|
ObjectId string `json:"objectId"`
|
|
} `json:"output"`
|
|
Progress struct {
|
|
Download struct {
|
|
Bytes int64 `json:"bytes"`
|
|
BytesPerSecond int64 `json:"bytesPerSecond"`
|
|
TotalBytes *int64 `json:"totalBytes,omitempty"`
|
|
} `json:"download"`
|
|
Upload struct {
|
|
Bytes int64 `json:"bytes"`
|
|
BytesPerSecond int64 `json:"bytesPerSecond"`
|
|
TotalBytes *int64 `json:"totalBytes,omitempty"`
|
|
} `json:"upload"`
|
|
} `json:"progress"`
|
|
Runtime *struct {
|
|
Connections *int `json:"connections,omitempty"`
|
|
Engine *DownloadTaskStatusRuntimeEngine `json:"engine,omitempty"`
|
|
EtaSeconds *int `json:"etaSeconds,omitempty"`
|
|
Files *[]struct {
|
|
CompletedBytes *int64 `json:"completedBytes,omitempty"`
|
|
Path string `json:"path"`
|
|
Selected *bool `json:"selected,omitempty"`
|
|
Size int64 `json:"size"`
|
|
} `json:"files,omitempty"`
|
|
Message *string `json:"message,omitempty"`
|
|
Peers *[]struct {
|
|
Address string `json:"address"`
|
|
Client *string `json:"client,omitempty"`
|
|
CountryCode *string `json:"countryCode,omitempty"`
|
|
DownloadBps *int64 `json:"downloadBps,omitempty"`
|
|
Progress *float32 `json:"progress,omitempty"`
|
|
RegionCode *string `json:"regionCode,omitempty"`
|
|
UploadBps *int64 `json:"uploadBps,omitempty"`
|
|
} `json:"peers,omitempty"`
|
|
Phase *DownloadTaskStatusRuntimePhase `json:"phase,omitempty"`
|
|
Progress *struct {
|
|
Download struct {
|
|
Bytes int64 `json:"bytes"`
|
|
BytesPerSecond int64 `json:"bytesPerSecond"`
|
|
TotalBytes *int64 `json:"totalBytes,omitempty"`
|
|
} `json:"download"`
|
|
Upload struct {
|
|
Bytes int64 `json:"bytes"`
|
|
BytesPerSecond int64 `json:"bytesPerSecond"`
|
|
TotalBytes *int64 `json:"totalBytes,omitempty"`
|
|
} `json:"upload"`
|
|
} `json:"progress,omitempty"`
|
|
Seeding *struct {
|
|
Active *bool `json:"active,omitempty"`
|
|
Enabled *bool `json:"enabled,omitempty"`
|
|
ExpiresAt *string `json:"expiresAt,omitempty"`
|
|
Ratio *float32 `json:"ratio,omitempty"`
|
|
StartedAt *string `json:"startedAt,omitempty"`
|
|
UploadBytesPerSecond *int64 `json:"uploadBytesPerSecond,omitempty"`
|
|
UploadedBytes *int64 `json:"uploadedBytes,omitempty"`
|
|
} `json:"seeding,omitempty"`
|
|
State *string `json:"state,omitempty"`
|
|
Torrent *struct {
|
|
InfoHash *string `json:"infoHash,omitempty"`
|
|
Leechers *int `json:"leechers,omitempty"`
|
|
Name *string `json:"name,omitempty"`
|
|
Peers *int `json:"peers,omitempty"`
|
|
Seeders *int `json:"seeders,omitempty"`
|
|
} `json:"torrent,omitempty"`
|
|
Trackers *[]struct {
|
|
Leechers *int `json:"leechers,omitempty"`
|
|
Message *string `json:"message,omitempty"`
|
|
Peers *int `json:"peers,omitempty"`
|
|
Seeds *int `json:"seeds,omitempty"`
|
|
Status *string `json:"status,omitempty"`
|
|
Url string `json:"url"`
|
|
} `json:"trackers,omitempty"`
|
|
UpdatedAt *string `json:"updatedAt,omitempty"`
|
|
} `json:"runtime"`
|
|
StartedAt *string `json:"startedAt"`
|
|
State DownloadTaskStatusState `json:"state"`
|
|
UpdatedAt string `json:"updatedAt"`
|
|
} `json:"status"`
|
|
}
|
|
|
|
// DownloadTaskSpecSourceType defines model for DownloadTask.Spec.Source.Type.
|
|
type DownloadTaskSpecSourceType string
|
|
|
|
// DownloadTaskStatusBillingState defines model for DownloadTask.Status.Billing.State.
|
|
type DownloadTaskStatusBillingState string
|
|
|
|
// DownloadTaskStatusRuntimeEngine defines model for DownloadTask.Status.Runtime.Engine.
|
|
type DownloadTaskStatusRuntimeEngine string
|
|
|
|
// DownloadTaskStatusRuntimePhase defines model for DownloadTask.Status.Runtime.Phase.
|
|
type DownloadTaskStatusRuntimePhase string
|
|
|
|
// DownloadTaskStatusState defines model for DownloadTask.Status.State.
|
|
type DownloadTaskStatusState string
|
|
|
|
// DownloadTaskPage defines model for DownloadTaskPage.
|
|
type DownloadTaskPage struct {
|
|
Items []DownloadTask `json:"items"`
|
|
Page int `json:"page"`
|
|
PageSize int `json:"pageSize"`
|
|
Total int `json:"total"`
|
|
}
|
|
|
|
// Downloader defines model for Downloader.
|
|
type Downloader struct {
|
|
Arch string `json:"arch"`
|
|
Capabilities []string `json:"capabilities"`
|
|
CreatedAt string `json:"createdAt"`
|
|
CreatedBy string `json:"createdBy"`
|
|
CurrentTasks int `json:"currentTasks"`
|
|
DownloadBps int64 `json:"downloadBps"`
|
|
Enabled bool `json:"enabled"`
|
|
Engine DownloaderEngine `json:"engine"`
|
|
FreeDiskBytes int64 `json:"freeDiskBytes"`
|
|
Hostname string `json:"hostname"`
|
|
Id string `json:"id"`
|
|
LastHeartbeatAt *string `json:"lastHeartbeatAt"`
|
|
MaxConcurrentTasks int `json:"maxConcurrentTasks"`
|
|
Name string `json:"name"`
|
|
Platform string `json:"platform"`
|
|
RemoteDownloadCreditBillingEnabled bool `json:"remoteDownloadCreditBillingEnabled"`
|
|
RemoteDownloadCreditPerUnit int `json:"remoteDownloadCreditPerUnit"`
|
|
RemoteDownloadCreditUnitBytes int `json:"remoteDownloadCreditUnitBytes"`
|
|
Status DownloaderStatus `json:"status"`
|
|
UpdatedAt string `json:"updatedAt"`
|
|
UploadBps int64 `json:"uploadBps"`
|
|
Version string `json:"version"`
|
|
}
|
|
|
|
// DownloaderEngine defines model for Downloader.Engine.
|
|
type DownloaderEngine string
|
|
|
|
// DownloaderStatus defines model for Downloader.Status.
|
|
type DownloaderStatus string
|
|
|
|
// DownloaderList defines model for DownloaderList.
|
|
type DownloaderList struct {
|
|
Items []Downloader `json:"items"`
|
|
Page int `json:"page"`
|
|
PageSize int `json:"pageSize"`
|
|
Total int `json:"total"`
|
|
}
|
|
|
|
// EffectiveQuota defines model for EffectiveQuota.
|
|
type EffectiveQuota struct {
|
|
BaseQuota int `json:"baseQuota"`
|
|
BaseTrafficQuota int `json:"baseTrafficQuota"`
|
|
CurrentPlan *struct {
|
|
ExpiresAt *string `json:"expiresAt"`
|
|
Name string `json:"name"`
|
|
PackageId *string `json:"packageId"`
|
|
SourceId string `json:"sourceId"`
|
|
StorageBytes int `json:"storageBytes"`
|
|
Subscription bool `json:"subscription"`
|
|
TrafficBytes int `json:"trafficBytes"`
|
|
TrafficOveragePriceCents *int `json:"trafficOveragePriceCents"`
|
|
} `json:"currentPlan"`
|
|
EntitlementQuota int `json:"entitlementQuota"`
|
|
EntitlementTrafficQuota int `json:"entitlementTrafficQuota"`
|
|
OrgId string `json:"orgId"`
|
|
Quota int `json:"quota"`
|
|
StorageExtraNames []string `json:"storageExtraNames"`
|
|
StoragePlanName *string `json:"storagePlanName"`
|
|
TrafficExtraNames []string `json:"trafficExtraNames"`
|
|
TrafficPeriod string `json:"trafficPeriod"`
|
|
TrafficPlanName *string `json:"trafficPlanName"`
|
|
TrafficQuota int `json:"trafficQuota"`
|
|
TrafficUsed int `json:"trafficUsed"`
|
|
Used int `json:"used"`
|
|
}
|
|
|
|
// EmailSettings defines model for EmailSettings.
|
|
type EmailSettings struct {
|
|
Enabled bool `json:"enabled"`
|
|
From *string `json:"from,omitempty"`
|
|
Provider *string `json:"provider,omitempty"`
|
|
}
|
|
|
|
// EntitlementList defines model for EntitlementList.
|
|
type EntitlementList struct {
|
|
Items []QuotaEntitlement `json:"items"`
|
|
Page int `json:"page"`
|
|
PageSize int `json:"pageSize"`
|
|
Total int `json:"total"`
|
|
}
|
|
|
|
// EntitlementResult defines model for EntitlementResult.
|
|
type EntitlementResult struct {
|
|
Entitlement QuotaEntitlement `json:"entitlement"`
|
|
OrgId string `json:"orgId"`
|
|
}
|
|
|
|
// Error defines model for Error.
|
|
type Error struct {
|
|
Error struct {
|
|
Code int `json:"code"`
|
|
Details *[]ErrorInfo `json:"details,omitempty"`
|
|
Message string `json:"message"`
|
|
Status string `json:"status"`
|
|
} `json:"error"`
|
|
}
|
|
|
|
// ErrorInfo defines model for ErrorInfo.
|
|
type ErrorInfo struct {
|
|
Type ErrorInfoType `json:"@type"`
|
|
Domain string `json:"domain"`
|
|
Metadata *map[string]string `json:"metadata,omitempty"`
|
|
Reason string `json:"reason"`
|
|
}
|
|
|
|
// ErrorInfoType defines model for ErrorInfo.Type.
|
|
type ErrorInfoType string
|
|
|
|
// ImageHosting defines model for ImageHosting.
|
|
type ImageHosting struct {
|
|
AccessCount int `json:"accessCount"`
|
|
CreatedAt string `json:"createdAt"`
|
|
Height *int `json:"height"`
|
|
Id string `json:"id"`
|
|
LastAccessedAt *string `json:"lastAccessedAt"`
|
|
Mime string `json:"mime"`
|
|
OrgId string `json:"orgId"`
|
|
Path string `json:"path"`
|
|
Size int `json:"size"`
|
|
Status string `json:"status"`
|
|
StorageId string `json:"storageId"`
|
|
StorageKey string `json:"storageKey"`
|
|
Token string `json:"token"`
|
|
Width *int `json:"width"`
|
|
}
|
|
|
|
// ImageHostingConfig defines model for ImageHostingConfig.
|
|
type ImageHostingConfig struct {
|
|
CreatedAt *int `json:"createdAt"`
|
|
CustomDomain *string `json:"customDomain"`
|
|
DnsInstructions *struct {
|
|
Name string `json:"name"`
|
|
RecordType string `json:"recordType"`
|
|
Target string `json:"target"`
|
|
} `json:"dnsInstructions"`
|
|
DomainStatus ImageHostingConfigDomainStatus `json:"domainStatus"`
|
|
DomainVerifiedAt *int `json:"domainVerifiedAt"`
|
|
Enabled bool `json:"enabled"`
|
|
RefererAllowlist *[]string `json:"refererAllowlist"`
|
|
}
|
|
|
|
// ImageHostingConfigDomainStatus defines model for ImageHostingConfig.DomainStatus.
|
|
type ImageHostingConfigDomainStatus string
|
|
|
|
// ImageHostingDraft defines model for ImageHostingDraft.
|
|
type ImageHostingDraft struct {
|
|
Id string `json:"id"`
|
|
Path string `json:"path"`
|
|
StorageKey string `json:"storageKey"`
|
|
Token string `json:"token"`
|
|
UploadUrl string `json:"uploadUrl"`
|
|
}
|
|
|
|
// ImageHostingList defines model for ImageHostingList.
|
|
type ImageHostingList struct {
|
|
Items []ImageHosting `json:"items"`
|
|
NextCursor *string `json:"nextCursor"`
|
|
}
|
|
|
|
// InstanceInfo defines model for InstanceInfo.
|
|
type InstanceInfo struct {
|
|
Commit *string `json:"commit,omitempty"`
|
|
Id string `json:"id"`
|
|
Name string `json:"name"`
|
|
Node *struct {
|
|
Version *string `json:"version,omitempty"`
|
|
} `json:"node,omitempty"`
|
|
Platform *string `json:"platform,omitempty"`
|
|
Runtime *string `json:"runtime,omitempty"`
|
|
Server *struct {
|
|
Os *struct {
|
|
Arch *string `json:"arch,omitempty"`
|
|
Platform *string `json:"platform,omitempty"`
|
|
Release *string `json:"release,omitempty"`
|
|
} `json:"os,omitempty"`
|
|
} `json:"server,omitempty"`
|
|
Url string `json:"url"`
|
|
Version string `json:"version"`
|
|
}
|
|
|
|
// InviteCode defines model for InviteCode.
|
|
type InviteCode struct {
|
|
Code string `json:"code"`
|
|
CreatedAt string `json:"createdAt"`
|
|
CreatedBy string `json:"createdBy"`
|
|
ExpiresAt *string `json:"expiresAt"`
|
|
Id string `json:"id"`
|
|
UsedAt *string `json:"usedAt"`
|
|
UsedBy *string `json:"usedBy"`
|
|
}
|
|
|
|
// InviteCodeList defines model for InviteCodeList.
|
|
type InviteCodeList struct {
|
|
Items []InviteCode `json:"items"`
|
|
Page int `json:"page"`
|
|
PageSize int `json:"pageSize"`
|
|
Total int `json:"total"`
|
|
}
|
|
|
|
// LicenseBindingState defines model for LicenseBindingState.
|
|
type LicenseBindingState struct {
|
|
AccountEmail *string `json:"account_email,omitempty"`
|
|
Active *bool `json:"active,omitempty"`
|
|
Bound bool `json:"bound"`
|
|
CertificateExpiresAt *int `json:"certificate_expires_at,omitempty"`
|
|
CloudDashboardUrl *string `json:"cloud_dashboard_url,omitempty"`
|
|
Edition *string `json:"edition,omitempty"`
|
|
Features *[]string `json:"features,omitempty"`
|
|
LastRefreshAt *int `json:"last_refresh_at,omitempty"`
|
|
LastRefreshError *string `json:"last_refresh_error,omitempty"`
|
|
LicenseId *string `json:"license_id,omitempty"`
|
|
LicenseValidUntil *int `json:"license_valid_until,omitempty"`
|
|
}
|
|
|
|
// LicensePairing defines model for LicensePairing.
|
|
type LicensePairing struct {
|
|
Code string `json:"code"`
|
|
ExpiresAt string `json:"expiresAt"`
|
|
PairingUrl string `json:"pairingUrl"`
|
|
}
|
|
|
|
// LicensePairingStatus defines model for LicensePairingStatus.
|
|
type LicensePairingStatus struct {
|
|
CloudStoreId *string `json:"cloud_store_id,omitempty"`
|
|
Edition *string `json:"edition,omitempty"`
|
|
Status string `json:"status"`
|
|
}
|
|
|
|
// Matter defines model for Matter.
|
|
type Matter struct {
|
|
Alias string `json:"alias"`
|
|
CreatedAt string `json:"createdAt"`
|
|
Dirtype *int `json:"dirtype"`
|
|
Id string `json:"id"`
|
|
Name string `json:"name"`
|
|
Object string `json:"object"`
|
|
OrgId string `json:"orgId"`
|
|
Parent string `json:"parent"`
|
|
Size *int `json:"size"`
|
|
Status string `json:"status"`
|
|
StorageId string `json:"storageId"`
|
|
TrashedAt *int `json:"trashedAt"`
|
|
Type string `json:"type"`
|
|
UpdatedAt string `json:"updatedAt"`
|
|
}
|
|
|
|
// Notification defines model for Notification.
|
|
type Notification struct {
|
|
Body string `json:"body"`
|
|
CreatedAt string `json:"createdAt"`
|
|
Id string `json:"id"`
|
|
Metadata *string `json:"metadata"`
|
|
ReadAt *string `json:"readAt"`
|
|
RefId *string `json:"refId"`
|
|
RefType *string `json:"refType"`
|
|
Title string `json:"title"`
|
|
Type string `json:"type"`
|
|
UserId string `json:"userId"`
|
|
}
|
|
|
|
// NotificationPage defines model for NotificationPage.
|
|
type NotificationPage struct {
|
|
Items []Notification `json:"items"`
|
|
Page int `json:"page"`
|
|
PageSize int `json:"pageSize"`
|
|
Total int `json:"total"`
|
|
}
|
|
|
|
// ObjectPage defines model for ObjectPage.
|
|
type ObjectPage struct {
|
|
Items []Matter `json:"items"`
|
|
Page int `json:"page"`
|
|
PageSize int `json:"pageSize"`
|
|
Total int `json:"total"`
|
|
}
|
|
|
|
// Organization defines model for Organization.
|
|
type Organization struct {
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
Id *string `json:"id,omitempty"`
|
|
Logo *string `json:"logo,omitempty"`
|
|
Metadata *string `json:"metadata,omitempty"`
|
|
Name string `json:"name"`
|
|
Slug string `json:"slug"`
|
|
}
|
|
|
|
// PendingInvitation defines model for PendingInvitation.
|
|
type PendingInvitation struct {
|
|
CreatedAt string `json:"createdAt"`
|
|
Email string `json:"email"`
|
|
ExpiresAt *string `json:"expiresAt"`
|
|
Id string `json:"id"`
|
|
Role string `json:"role"`
|
|
}
|
|
|
|
// PublicProfile defines model for PublicProfile.
|
|
type PublicProfile struct {
|
|
Shares []*interface{} `json:"shares"`
|
|
User PublicUser `json:"user"`
|
|
}
|
|
|
|
// PublicUser defines model for PublicUser.
|
|
type PublicUser struct {
|
|
Image *string `json:"image"`
|
|
Name string `json:"name"`
|
|
Username string `json:"username"`
|
|
}
|
|
|
|
// QuotaEntitlement defines model for QuotaEntitlement.
|
|
type QuotaEntitlement struct {
|
|
Bytes int `json:"bytes"`
|
|
CreatedAt string `json:"createdAt"`
|
|
EntitlementType string `json:"entitlementType"`
|
|
ExpiresAt *string `json:"expiresAt"`
|
|
Id string `json:"id"`
|
|
Metadata *string `json:"metadata"`
|
|
OrgId string `json:"orgId"`
|
|
ResourceType string `json:"resourceType"`
|
|
Source string `json:"source"`
|
|
SourceId string `json:"sourceId"`
|
|
StartsAt string `json:"startsAt"`
|
|
Status string `json:"status"`
|
|
UpdatedAt string `json:"updatedAt"`
|
|
}
|
|
|
|
// QuotaOverview defines model for QuotaOverview.
|
|
type QuotaOverview struct {
|
|
Items []QuotaOverviewItem `json:"items"`
|
|
Page int `json:"page"`
|
|
PageSize int `json:"pageSize"`
|
|
Total int `json:"total"`
|
|
}
|
|
|
|
// QuotaOverviewItem defines model for QuotaOverviewItem.
|
|
type QuotaOverviewItem struct {
|
|
BaseQuota int `json:"baseQuota"`
|
|
BaseTrafficQuota int `json:"baseTrafficQuota"`
|
|
CurrentPlan *struct {
|
|
ExpiresAt *string `json:"expiresAt"`
|
|
Name string `json:"name"`
|
|
PackageId *string `json:"packageId"`
|
|
SourceId string `json:"sourceId"`
|
|
StorageBytes int `json:"storageBytes"`
|
|
Subscription bool `json:"subscription"`
|
|
TrafficBytes int `json:"trafficBytes"`
|
|
TrafficOveragePriceCents *int `json:"trafficOveragePriceCents"`
|
|
} `json:"currentPlan"`
|
|
EntitlementQuota int `json:"entitlementQuota"`
|
|
EntitlementTrafficQuota int `json:"entitlementTrafficQuota"`
|
|
Id string `json:"id"`
|
|
OrgId string `json:"orgId"`
|
|
OrgName string `json:"orgName"`
|
|
OrgType string `json:"orgType"`
|
|
Quota int `json:"quota"`
|
|
StorageExtraNames []string `json:"storageExtraNames"`
|
|
StoragePlanName *string `json:"storagePlanName"`
|
|
TrafficExtraNames []string `json:"trafficExtraNames"`
|
|
TrafficPeriod string `json:"trafficPeriod"`
|
|
TrafficPlanName *string `json:"trafficPlanName"`
|
|
TrafficQuota int `json:"trafficQuota"`
|
|
TrafficUsed int `json:"trafficUsed"`
|
|
Used int `json:"used"`
|
|
}
|
|
|
|
// SaveShareResult defines model for SaveShareResult.
|
|
type SaveShareResult struct {
|
|
Saved []struct {
|
|
Alias string `json:"alias"`
|
|
CreatedAt string `json:"createdAt"`
|
|
Dirtype *int `json:"dirtype"`
|
|
Id string `json:"id"`
|
|
Name string `json:"name"`
|
|
Object string `json:"object"`
|
|
OrgId string `json:"orgId"`
|
|
Parent string `json:"parent"`
|
|
Size *int `json:"size"`
|
|
Status string `json:"status"`
|
|
StorageId string `json:"storageId"`
|
|
TrashedAt *int `json:"trashedAt"`
|
|
Type string `json:"type"`
|
|
UpdatedAt string `json:"updatedAt"`
|
|
} `json:"saved"`
|
|
Skipped []struct {
|
|
Name string `json:"name"`
|
|
Reason string `json:"reason"`
|
|
} `json:"skipped"`
|
|
}
|
|
|
|
// Session defines model for Session.
|
|
type Session struct {
|
|
ActiveOrganizationId *string `json:"activeOrganizationId,omitempty"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
ExpiresAt time.Time `json:"expiresAt"`
|
|
Id *string `json:"id,omitempty"`
|
|
ImpersonatedBy *string `json:"impersonatedBy,omitempty"`
|
|
IpAddress *string `json:"ipAddress,omitempty"`
|
|
Token string `json:"token"`
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
UserAgent *string `json:"userAgent,omitempty"`
|
|
UserId string `json:"userId"`
|
|
}
|
|
|
|
// ShareList defines model for ShareList.
|
|
type ShareList struct {
|
|
Items []ShareListItem `json:"items"`
|
|
Page int `json:"page"`
|
|
PageSize int `json:"pageSize"`
|
|
Total int `json:"total"`
|
|
}
|
|
|
|
// ShareListItem defines model for ShareListItem.
|
|
type ShareListItem struct {
|
|
CreatedAt string `json:"createdAt"`
|
|
CreatorId string `json:"creatorId"`
|
|
CreatorName *string `json:"creatorName,omitempty"`
|
|
DownloadLimit *int `json:"downloadLimit"`
|
|
Downloads int `json:"downloads"`
|
|
ExpiresAt *string `json:"expiresAt"`
|
|
Id string `json:"id"`
|
|
Kind string `json:"kind"`
|
|
Matter struct {
|
|
Dirtype int `json:"dirtype"`
|
|
Name string `json:"name"`
|
|
Type string `json:"type"`
|
|
} `json:"matter"`
|
|
MatterId string `json:"matterId"`
|
|
OrgId string `json:"orgId"`
|
|
RecipientCount int `json:"recipientCount"`
|
|
Status string `json:"status"`
|
|
Token string `json:"token"`
|
|
Views int `json:"views"`
|
|
}
|
|
|
|
// ShareObjects defines model for ShareObjects.
|
|
type ShareObjects struct {
|
|
Breadcrumb []struct {
|
|
Name string `json:"name"`
|
|
Path string `json:"path"`
|
|
} `json:"breadcrumb"`
|
|
Items []*interface{} `json:"items"`
|
|
Page int `json:"page"`
|
|
PageSize int `json:"pageSize"`
|
|
Total int `json:"total"`
|
|
}
|
|
|
|
// ShareView defines model for ShareView.
|
|
type ShareView struct {
|
|
AccessibleByUser bool `json:"accessibleByUser"`
|
|
CreatedAt *string `json:"createdAt,omitempty"`
|
|
CreatorId *string `json:"creatorId,omitempty"`
|
|
CreatorName string `json:"creatorName"`
|
|
DownloadLimit *int `json:"downloadLimit"`
|
|
Downloads int `json:"downloads"`
|
|
Exhausted bool `json:"exhausted"`
|
|
Expired bool `json:"expired"`
|
|
ExpiresAt *string `json:"expiresAt"`
|
|
Id *string `json:"id,omitempty"`
|
|
Kind string `json:"kind"`
|
|
Matter struct {
|
|
IsFolder bool `json:"isFolder"`
|
|
Name string `json:"name"`
|
|
Size *int `json:"size"`
|
|
Type string `json:"type"`
|
|
} `json:"matter"`
|
|
MatterId *string `json:"matterId,omitempty"`
|
|
OrgId *string `json:"orgId,omitempty"`
|
|
Recipients *[]*interface{} `json:"recipients,omitempty"`
|
|
RequiresPassword bool `json:"requiresPassword"`
|
|
RootRef string `json:"rootRef"`
|
|
Status string `json:"status"`
|
|
Token string `json:"token"`
|
|
Views int `json:"views"`
|
|
}
|
|
|
|
// SiteInvitation defines model for SiteInvitation.
|
|
type SiteInvitation struct {
|
|
AcceptedAt *string `json:"acceptedAt"`
|
|
AcceptedBy *string `json:"acceptedBy"`
|
|
CreatedAt string `json:"createdAt"`
|
|
Email string `json:"email"`
|
|
ExpiresAt string `json:"expiresAt"`
|
|
Id string `json:"id"`
|
|
InvitedBy string `json:"invitedBy"`
|
|
InvitedByName string `json:"invitedByName"`
|
|
RevokedAt *string `json:"revokedAt"`
|
|
RevokedBy *string `json:"revokedBy"`
|
|
Status string `json:"status"`
|
|
Token string `json:"token"`
|
|
UpdatedAt string `json:"updatedAt"`
|
|
}
|
|
|
|
// SiteInvitationList defines model for SiteInvitationList.
|
|
type SiteInvitationList struct {
|
|
Items []SiteInvitation `json:"items"`
|
|
Page int `json:"page"`
|
|
PageSize int `json:"pageSize"`
|
|
Total int `json:"total"`
|
|
}
|
|
|
|
// Storage defines model for Storage.
|
|
type Storage struct {
|
|
AccessKey string `json:"accessKey"`
|
|
Bucket string `json:"bucket"`
|
|
Capacity int `json:"capacity"`
|
|
CreatedAt string `json:"createdAt"`
|
|
CustomHost *string `json:"customHost"`
|
|
EgressCreditBillingEnabled bool `json:"egressCreditBillingEnabled"`
|
|
EgressCreditPerUnit int `json:"egressCreditPerUnit"`
|
|
EgressCreditUnitBytes int `json:"egressCreditUnitBytes"`
|
|
Endpoint string `json:"endpoint"`
|
|
FilePath string `json:"filePath"`
|
|
Id string `json:"id"`
|
|
Region string `json:"region"`
|
|
SecretKey string `json:"secretKey"`
|
|
Status string `json:"status"`
|
|
Title string `json:"title"`
|
|
UpdatedAt string `json:"updatedAt"`
|
|
Used int `json:"used"`
|
|
}
|
|
|
|
// StorageList defines model for StorageList.
|
|
type StorageList struct {
|
|
Items []Storage `json:"items"`
|
|
Page int `json:"page"`
|
|
PageSize int `json:"pageSize"`
|
|
Total int `json:"total"`
|
|
}
|
|
|
|
// SystemOption defines model for SystemOption.
|
|
type SystemOption struct {
|
|
Key string `json:"key"`
|
|
Public bool `json:"public"`
|
|
Value string `json:"value"`
|
|
}
|
|
|
|
// SystemOptionList defines model for SystemOptionList.
|
|
type SystemOptionList struct {
|
|
Items []SystemOption `json:"items"`
|
|
Page int `json:"page"`
|
|
PageSize int `json:"pageSize"`
|
|
Total int `json:"total"`
|
|
}
|
|
|
|
// TeamInvitationList defines model for TeamInvitationList.
|
|
type TeamInvitationList struct {
|
|
Items []PendingInvitation `json:"items"`
|
|
Page int `json:"page"`
|
|
PageSize int `json:"pageSize"`
|
|
Total int `json:"total"`
|
|
}
|
|
|
|
// TeamInviteLinkCreated defines model for TeamInviteLinkCreated.
|
|
type TeamInviteLinkCreated struct {
|
|
ExpiresAt string `json:"expiresAt"`
|
|
Token string `json:"token"`
|
|
}
|
|
|
|
// TeamInviteLinkInfo defines model for TeamInviteLinkInfo.
|
|
type TeamInviteLinkInfo struct {
|
|
ExpiresAt *string `json:"expiresAt"`
|
|
OrganizationId string `json:"organizationId"`
|
|
OrganizationName string `json:"organizationName"`
|
|
Role string `json:"role"`
|
|
}
|
|
|
|
// TeamList defines model for TeamList.
|
|
type TeamList struct {
|
|
Items []TeamSummary `json:"items"`
|
|
Page int `json:"page"`
|
|
PageSize int `json:"pageSize"`
|
|
Total int `json:"total"`
|
|
}
|
|
|
|
// TeamSummary defines model for TeamSummary.
|
|
type TeamSummary struct {
|
|
CreatedAt int `json:"createdAt"`
|
|
Id string `json:"id"`
|
|
Logo *string `json:"logo"`
|
|
MemberCount int `json:"memberCount"`
|
|
Name string `json:"name"`
|
|
OwnerName *string `json:"ownerName"`
|
|
QuotaTotal int `json:"quotaTotal"`
|
|
QuotaUsed int `json:"quotaUsed"`
|
|
Slug string `json:"slug"`
|
|
}
|
|
|
|
// TransferResult defines model for TransferResult.
|
|
type TransferResult struct {
|
|
Saved []Matter `json:"saved"`
|
|
Skipped []struct {
|
|
Name string `json:"name"`
|
|
Reason string `json:"reason"`
|
|
} `json:"skipped"`
|
|
SourceDeleted bool `json:"sourceDeleted"`
|
|
}
|
|
|
|
// TrashObject defines model for TrashObject.
|
|
type TrashObject struct {
|
|
Alias string `json:"alias"`
|
|
CreatedAt string `json:"createdAt"`
|
|
Dirtype *int `json:"dirtype"`
|
|
Id string `json:"id"`
|
|
Name string `json:"name"`
|
|
Object string `json:"object"`
|
|
OrgId string `json:"orgId"`
|
|
Parent string `json:"parent"`
|
|
Size *int `json:"size"`
|
|
Status string `json:"status"`
|
|
StorageId string `json:"storageId"`
|
|
TrashedAt *int `json:"trashedAt"`
|
|
Type string `json:"type"`
|
|
UpdatedAt string `json:"updatedAt"`
|
|
}
|
|
|
|
// TrashObjectPage defines model for TrashObjectPage.
|
|
type TrashObjectPage struct {
|
|
Items []TrashObject `json:"items"`
|
|
Page int `json:"page"`
|
|
PageSize int `json:"pageSize"`
|
|
Total int `json:"total"`
|
|
}
|
|
|
|
// User defines model for User.
|
|
type User struct {
|
|
BanExpires *time.Time `json:"banExpires,omitempty"`
|
|
BanReason *string `json:"banReason,omitempty"`
|
|
Banned *bool `json:"banned,omitempty"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
DisplayUsername *string `json:"displayUsername,omitempty"`
|
|
Email string `json:"email"`
|
|
EmailVerified *bool `json:"emailVerified,omitempty"`
|
|
Id *string `json:"id,omitempty"`
|
|
Image *string `json:"image,omitempty"`
|
|
Name string `json:"name"`
|
|
Role *string `json:"role,omitempty"`
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
Username *string `json:"username,omitempty"`
|
|
}
|
|
|
|
// BanUserJSONBody defines parameters for BanUser.
|
|
type BanUserJSONBody struct {
|
|
// BanExpiresIn The number of seconds until the ban expires
|
|
BanExpiresIn *float32 `json:"banExpiresIn,omitempty"`
|
|
|
|
// BanReason The reason for the ban
|
|
BanReason *string `json:"banReason,omitempty"`
|
|
|
|
// UserId The user id
|
|
UserId string `json:"userId"`
|
|
}
|
|
|
|
// CreateUserJSONBody defines parameters for CreateUser.
|
|
type CreateUserJSONBody struct {
|
|
Data *string `json:"data,omitempty"`
|
|
|
|
// Email The email of the user
|
|
Email string `json:"email"`
|
|
|
|
// Name The name of the user
|
|
Name string `json:"name"`
|
|
Password *string `json:"password,omitempty"`
|
|
Role *string `json:"role,omitempty"`
|
|
}
|
|
|
|
// GetUserParams defines parameters for GetUser.
|
|
type GetUserParams struct {
|
|
Id *string `form:"id,omitempty" json:"id,omitempty"`
|
|
}
|
|
|
|
// PostApiAuthAdminHasPermissionJSONBody defines parameters for PostApiAuthAdminHasPermission.
|
|
type PostApiAuthAdminHasPermissionJSONBody struct {
|
|
// Permissions The permission to check
|
|
Permissions map[string]interface{} `json:"permissions"`
|
|
}
|
|
|
|
// ImpersonateUserJSONBody defines parameters for ImpersonateUser.
|
|
type ImpersonateUserJSONBody struct {
|
|
// UserId The user id
|
|
UserId string `json:"userId"`
|
|
}
|
|
|
|
// AdminListUserSessionsJSONBody defines parameters for AdminListUserSessions.
|
|
type AdminListUserSessionsJSONBody struct {
|
|
// UserId The user id
|
|
UserId string `json:"userId"`
|
|
}
|
|
|
|
// ListUsersParams defines parameters for ListUsers.
|
|
type ListUsersParams struct {
|
|
SearchValue *string `form:"searchValue,omitempty" json:"searchValue,omitempty"`
|
|
SearchField *string `form:"searchField,omitempty" json:"searchField,omitempty"`
|
|
SearchOperator *string `form:"searchOperator,omitempty" json:"searchOperator,omitempty"`
|
|
Limit *string `form:"limit,omitempty" json:"limit,omitempty"`
|
|
Offset *string `form:"offset,omitempty" json:"offset,omitempty"`
|
|
SortBy *string `form:"sortBy,omitempty" json:"sortBy,omitempty"`
|
|
SortDirection *string `form:"sortDirection,omitempty" json:"sortDirection,omitempty"`
|
|
FilterField *string `form:"filterField,omitempty" json:"filterField,omitempty"`
|
|
FilterValue *string `form:"filterValue,omitempty" json:"filterValue,omitempty"`
|
|
FilterOperator *string `form:"filterOperator,omitempty" json:"filterOperator,omitempty"`
|
|
}
|
|
|
|
// RemoveUserJSONBody defines parameters for RemoveUser.
|
|
type RemoveUserJSONBody struct {
|
|
// UserId The user id
|
|
UserId string `json:"userId"`
|
|
}
|
|
|
|
// RevokeUserSessionJSONBody defines parameters for RevokeUserSession.
|
|
type RevokeUserSessionJSONBody struct {
|
|
// SessionToken The session token
|
|
SessionToken string `json:"sessionToken"`
|
|
}
|
|
|
|
// RevokeUserSessionsJSONBody defines parameters for RevokeUserSessions.
|
|
type RevokeUserSessionsJSONBody struct {
|
|
// UserId The user id
|
|
UserId string `json:"userId"`
|
|
}
|
|
|
|
// SetUserRoleJSONBody defines parameters for SetUserRole.
|
|
type SetUserRoleJSONBody struct {
|
|
// Role The role to set, this can be a string or an array of strings. Eg: `admin` or `[admin, user]`
|
|
Role string `json:"role"`
|
|
|
|
// UserId The user id
|
|
UserId string `json:"userId"`
|
|
}
|
|
|
|
// SetUserPasswordJSONBody defines parameters for SetUserPassword.
|
|
type SetUserPasswordJSONBody struct {
|
|
// NewPassword The new password
|
|
NewPassword string `json:"newPassword"`
|
|
|
|
// UserId The user id
|
|
UserId string `json:"userId"`
|
|
}
|
|
|
|
// UnbanUserJSONBody defines parameters for UnbanUser.
|
|
type UnbanUserJSONBody struct {
|
|
// UserId The user id
|
|
UserId string `json:"userId"`
|
|
}
|
|
|
|
// AdminUpdateUserJSONBody defines parameters for AdminUpdateUser.
|
|
type AdminUpdateUserJSONBody struct {
|
|
// Data The user data to update
|
|
Data string `json:"data"`
|
|
|
|
// UserId The user id
|
|
UserId string `json:"userId"`
|
|
}
|
|
|
|
// PostApiAuthApiKeyCreateJSONBody defines parameters for PostApiAuthApiKeyCreate.
|
|
type PostApiAuthApiKeyCreateJSONBody struct {
|
|
// ConfigId The configuration ID to use for the API key. If not provided, the default configuration will be used.
|
|
ConfigId *string `json:"configId,omitempty"`
|
|
ExpiresIn string `json:"expiresIn"`
|
|
Metadata *string `json:"metadata,omitempty"`
|
|
|
|
// Name Name of the Api Key
|
|
Name *string `json:"name,omitempty"`
|
|
|
|
// OrganizationId Organization Id of the organization that the Api Key belongs to. Eg: 'org-id'
|
|
OrganizationId *string `json:"organizationId,omitempty"`
|
|
|
|
// Permissions Permissions of the Api Key.
|
|
Permissions *string `json:"permissions,omitempty"`
|
|
|
|
// Prefix Prefix of the Api Key
|
|
Prefix *string `json:"prefix,omitempty"`
|
|
|
|
// RateLimitEnabled Whether the key has rate limiting enabled. server-only. Eg: true
|
|
RateLimitEnabled *bool `json:"rateLimitEnabled,omitempty"`
|
|
|
|
// RateLimitMax Maximum amount of requests allowed within a window. Once the `maxRequests` is reached, the request will be rejected until the `timeWindow` has passed, at which point the `timeWindow` will be reset. server-only. Eg: 100
|
|
RateLimitMax *float32 `json:"rateLimitMax,omitempty"`
|
|
|
|
// RateLimitTimeWindow The duration in milliseconds where each request is counted. Once the `maxRequests` is reached, the request will be rejected until the `timeWindow` has passed, at which point the `timeWindow` will be reset. server-only. Eg: 1000
|
|
RateLimitTimeWindow *float32 `json:"rateLimitTimeWindow,omitempty"`
|
|
|
|
// RefillAmount Amount to refill the remaining count of the Api Key. server-only. Eg: 100
|
|
RefillAmount *float32 `json:"refillAmount,omitempty"`
|
|
|
|
// RefillInterval Interval to refill the Api Key in milliseconds. server-only. Eg: 1000
|
|
RefillInterval *float32 `json:"refillInterval,omitempty"`
|
|
Remaining string `json:"remaining"`
|
|
|
|
// UserId User Id of the user that the Api Key belongs to. server-only. Eg: "user-id"
|
|
UserId *string `json:"userId,omitempty"`
|
|
}
|
|
|
|
// PostApiAuthApiKeyDeleteJSONBody defines parameters for PostApiAuthApiKeyDelete.
|
|
type PostApiAuthApiKeyDeleteJSONBody struct {
|
|
// KeyId The id of the API key to delete
|
|
KeyId string `json:"keyId"`
|
|
}
|
|
|
|
// GetApiAuthApiKeyGetParams defines parameters for GetApiAuthApiKeyGet.
|
|
type GetApiAuthApiKeyGetParams struct {
|
|
ConfigId *string `form:"configId,omitempty" json:"configId,omitempty"`
|
|
Id *string `form:"id,omitempty" json:"id,omitempty"`
|
|
}
|
|
|
|
// PostApiAuthApiKeyUpdateJSONBody defines parameters for PostApiAuthApiKeyUpdate.
|
|
type PostApiAuthApiKeyUpdateJSONBody struct {
|
|
// ConfigId The configuration ID to use for the API key lookup. If not provided, the default configuration will be used.
|
|
ConfigId *string `json:"configId,omitempty"`
|
|
|
|
// Enabled Whether the Api Key is enabled or not
|
|
Enabled *bool `json:"enabled,omitempty"`
|
|
ExpiresIn string `json:"expiresIn"`
|
|
|
|
// KeyId The id of the Api Key
|
|
KeyId string `json:"keyId"`
|
|
Metadata *string `json:"metadata,omitempty"`
|
|
|
|
// Name The name of the key
|
|
Name *string `json:"name,omitempty"`
|
|
Permissions string `json:"permissions"`
|
|
|
|
// RateLimitEnabled Whether the key has rate limiting enabled.
|
|
RateLimitEnabled *bool `json:"rateLimitEnabled,omitempty"`
|
|
|
|
// RateLimitMax Maximum amount of requests allowed within a window. Once the `maxRequests` is reached, the request will be rejected until the `timeWindow` has passed, at which point the `timeWindow` will be reset. server-only. Eg: 100
|
|
RateLimitMax *float32 `json:"rateLimitMax,omitempty"`
|
|
|
|
// RateLimitTimeWindow The duration in milliseconds where each request is counted. server-only. Eg: 1000
|
|
RateLimitTimeWindow *float32 `json:"rateLimitTimeWindow,omitempty"`
|
|
|
|
// RefillAmount The refill amount
|
|
RefillAmount *float32 `json:"refillAmount,omitempty"`
|
|
|
|
// RefillInterval The refill interval
|
|
RefillInterval *float32 `json:"refillInterval,omitempty"`
|
|
|
|
// Remaining The number of remaining requests
|
|
Remaining *float32 `json:"remaining,omitempty"`
|
|
|
|
// UserId The id of the user which the api key belongs to. server-only. Eg: "some-user-id"
|
|
UserId *string `json:"userId,omitempty"`
|
|
}
|
|
|
|
// PostApiAuthCallbackIdJSONBody defines parameters for PostApiAuthCallbackId.
|
|
type PostApiAuthCallbackIdJSONBody = map[string]interface{}
|
|
|
|
// ChangeEmailJSONBody defines parameters for ChangeEmail.
|
|
type ChangeEmailJSONBody struct {
|
|
// CallbackURL The URL to redirect to after email verification
|
|
CallbackURL *string `json:"callbackURL,omitempty"`
|
|
|
|
// NewEmail The new email address to set must be a valid email address
|
|
NewEmail string `json:"newEmail"`
|
|
}
|
|
|
|
// ChangeEmail200JSONResponseBodyMessage defines parameters for ChangeEmail.
|
|
type ChangeEmail200JSONResponseBodyMessage string
|
|
|
|
// ChangePasswordJSONBody defines parameters for ChangePassword.
|
|
type ChangePasswordJSONBody struct {
|
|
// CurrentPassword The current password is required
|
|
CurrentPassword string `json:"currentPassword"`
|
|
|
|
// NewPassword The new password to set
|
|
NewPassword string `json:"newPassword"`
|
|
|
|
// RevokeOtherSessions Must be a boolean value
|
|
RevokeOtherSessions *bool `json:"revokeOtherSessions,omitempty"`
|
|
}
|
|
|
|
// DeleteUserJSONBody defines parameters for DeleteUser.
|
|
type DeleteUserJSONBody struct {
|
|
// CallbackURL The callback URL to redirect to after the user is deleted
|
|
CallbackURL *string `json:"callbackURL,omitempty"`
|
|
|
|
// Password The user's password. Required if session is not fresh
|
|
Password *string `json:"password,omitempty"`
|
|
|
|
// Token The deletion verification token
|
|
Token *string `json:"token,omitempty"`
|
|
}
|
|
|
|
// DeleteUser200JSONResponseBodyMessage defines parameters for DeleteUser.
|
|
type DeleteUser200JSONResponseBodyMessage string
|
|
|
|
// GetApiAuthDeleteUserCallbackParams defines parameters for GetApiAuthDeleteUserCallback.
|
|
type GetApiAuthDeleteUserCallbackParams struct {
|
|
Token *string `form:"token,omitempty" json:"token,omitempty"`
|
|
CallbackURL *string `form:"callbackURL,omitempty" json:"callbackURL,omitempty"`
|
|
}
|
|
|
|
// GetApiAuthDeleteUserCallback200JSONResponseBodyMessage defines parameters for GetApiAuthDeleteUserCallback.
|
|
type GetApiAuthDeleteUserCallback200JSONResponseBodyMessage string
|
|
|
|
// GetApiAuthDeviceParams defines parameters for GetApiAuthDevice.
|
|
type GetApiAuthDeviceParams struct {
|
|
UserCode *string `form:"user_code,omitempty" json:"user_code,omitempty"`
|
|
}
|
|
|
|
// GetApiAuthDevice200JSONResponseBodyStatus defines parameters for GetApiAuthDevice.
|
|
type GetApiAuthDevice200JSONResponseBodyStatus string
|
|
|
|
// PostApiAuthDeviceApproveJSONBody defines parameters for PostApiAuthDeviceApprove.
|
|
type PostApiAuthDeviceApproveJSONBody struct {
|
|
// UserCode The user code to approve
|
|
UserCode string `json:"userCode"`
|
|
}
|
|
|
|
// PostApiAuthDeviceCodeJSONBody defines parameters for PostApiAuthDeviceCode.
|
|
type PostApiAuthDeviceCodeJSONBody struct {
|
|
// ClientId The client ID of the application
|
|
ClientId string `json:"client_id"`
|
|
|
|
// Scope Space-separated list of scopes
|
|
Scope *string `json:"scope,omitempty"`
|
|
}
|
|
|
|
// PostApiAuthDeviceCode400JSONResponseBodyError defines parameters for PostApiAuthDeviceCode.
|
|
type PostApiAuthDeviceCode400JSONResponseBodyError string
|
|
|
|
// PostApiAuthDeviceDenyJSONBody defines parameters for PostApiAuthDeviceDeny.
|
|
type PostApiAuthDeviceDenyJSONBody struct {
|
|
// UserCode The user code to deny
|
|
UserCode string `json:"userCode"`
|
|
}
|
|
|
|
// PostApiAuthDeviceTokenJSONBody defines parameters for PostApiAuthDeviceToken.
|
|
type PostApiAuthDeviceTokenJSONBody struct {
|
|
// ClientId The client ID of the application
|
|
ClientId string `json:"client_id"`
|
|
|
|
// DeviceCode The device verification code
|
|
DeviceCode string `json:"device_code"`
|
|
|
|
// GrantType The grant type for device flow
|
|
GrantType string `json:"grant_type"`
|
|
}
|
|
|
|
// PostApiAuthDeviceToken400JSONResponseBodyError defines parameters for PostApiAuthDeviceToken.
|
|
type PostApiAuthDeviceToken400JSONResponseBodyError string
|
|
|
|
// PostApiAuthGetAccessTokenJSONBody defines parameters for PostApiAuthGetAccessToken.
|
|
type PostApiAuthGetAccessTokenJSONBody struct {
|
|
// AccountId The account ID associated with the refresh token
|
|
AccountId *string `json:"accountId,omitempty"`
|
|
|
|
// ProviderId The provider ID for the OAuth provider
|
|
ProviderId string `json:"providerId"`
|
|
|
|
// UserId The user ID associated with the account
|
|
UserId *string `json:"userId,omitempty"`
|
|
}
|
|
|
|
// GetSessionPostJSONBody defines parameters for GetSessionPost.
|
|
type GetSessionPostJSONBody = map[string]interface{}
|
|
|
|
// PostApiAuthIsUsernameAvailableJSONBody defines parameters for PostApiAuthIsUsernameAvailable.
|
|
type PostApiAuthIsUsernameAvailableJSONBody struct {
|
|
// Username The username to check
|
|
Username string `json:"username"`
|
|
}
|
|
|
|
// LinkSocialAccountJSONBody defines parameters for LinkSocialAccount.
|
|
type LinkSocialAccountJSONBody struct {
|
|
AdditionalData *string `json:"additionalData,omitempty"`
|
|
|
|
// CallbackURL The URL to redirect to after the user has signed in
|
|
CallbackURL *string `json:"callbackURL,omitempty"`
|
|
|
|
// DisableRedirect Disable automatic redirection to the provider. Useful for handling the redirection yourself
|
|
DisableRedirect *bool `json:"disableRedirect,omitempty"`
|
|
|
|
// ErrorCallbackURL The URL to redirect to if there is an error during the link process
|
|
ErrorCallbackURL *string `json:"errorCallbackURL,omitempty"`
|
|
IdToken *struct {
|
|
AccessToken *string `json:"accessToken,omitempty"`
|
|
Nonce *string `json:"nonce,omitempty"`
|
|
RefreshToken *string `json:"refreshToken,omitempty"`
|
|
Scopes *[]interface{} `json:"scopes,omitempty"`
|
|
Token string `json:"token"`
|
|
} `json:"idToken,omitempty"`
|
|
Provider string `json:"provider"`
|
|
RequestSignUp *bool `json:"requestSignUp,omitempty"`
|
|
|
|
// Scopes Additional scopes to request from the provider
|
|
Scopes *[]interface{} `json:"scopes,omitempty"`
|
|
}
|
|
|
|
// GetApiAuthOauth2CallbackProviderIdParams defines parameters for GetApiAuthOauth2CallbackProviderId.
|
|
type GetApiAuthOauth2CallbackProviderIdParams struct {
|
|
Code *string `form:"code,omitempty" json:"code,omitempty"`
|
|
Error *string `form:"error,omitempty" json:"error,omitempty"`
|
|
ErrorDescription *string `form:"error_description,omitempty" json:"error_description,omitempty"`
|
|
State *string `form:"state,omitempty" json:"state,omitempty"`
|
|
Iss *string `form:"iss,omitempty" json:"iss,omitempty"`
|
|
}
|
|
|
|
// PostApiAuthOauth2LinkJSONBody defines parameters for PostApiAuthOauth2Link.
|
|
type PostApiAuthOauth2LinkJSONBody struct {
|
|
CallbackURL string `json:"callbackURL"`
|
|
|
|
// ErrorCallbackURL The URL to redirect to if there is an error during the link process
|
|
ErrorCallbackURL *string `json:"errorCallbackURL,omitempty"`
|
|
ProviderId string `json:"providerId"`
|
|
|
|
// Scopes Additional scopes to request when linking the account
|
|
Scopes *[]interface{} `json:"scopes,omitempty"`
|
|
}
|
|
|
|
// PostApiAuthOauth2Link200JSONResponseBodyRedirect defines parameters for PostApiAuthOauth2Link.
|
|
type PostApiAuthOauth2Link200JSONResponseBodyRedirect bool
|
|
|
|
// PostApiAuthOrganizationAcceptInvitationJSONBody defines parameters for PostApiAuthOrganizationAcceptInvitation.
|
|
type PostApiAuthOrganizationAcceptInvitationJSONBody struct {
|
|
// InvitationId The ID of the invitation to accept
|
|
InvitationId string `json:"invitationId"`
|
|
}
|
|
|
|
// PostApiAuthOrganizationCancelInvitationJSONBody defines parameters for PostApiAuthOrganizationCancelInvitation.
|
|
type PostApiAuthOrganizationCancelInvitationJSONBody struct {
|
|
// InvitationId The ID of the invitation to cancel
|
|
InvitationId string `json:"invitationId"`
|
|
}
|
|
|
|
// PostApiAuthOrganizationCheckSlugJSONBody defines parameters for PostApiAuthOrganizationCheckSlug.
|
|
type PostApiAuthOrganizationCheckSlugJSONBody struct {
|
|
// Slug The organization slug to check. Eg: "my-org"
|
|
Slug string `json:"slug"`
|
|
}
|
|
|
|
// PostApiAuthOrganizationCreateJSONBody defines parameters for PostApiAuthOrganizationCreate.
|
|
type PostApiAuthOrganizationCreateJSONBody struct {
|
|
// KeepCurrentActiveOrganization Whether to keep the current active organization active after creating a new one. Eg: true
|
|
KeepCurrentActiveOrganization *bool `json:"keepCurrentActiveOrganization,omitempty"`
|
|
Logo *string `json:"logo,omitempty"`
|
|
|
|
// Metadata The metadata of the organization
|
|
Metadata *string `json:"metadata,omitempty"`
|
|
|
|
// Name The name of the organization
|
|
Name string `json:"name"`
|
|
|
|
// Slug The slug of the organization
|
|
Slug string `json:"slug"`
|
|
|
|
// UserId The user id of the organization creator. If not provided, the current user will be used. Should only be used by admins or when called by the server. server-only. Eg: "user-id"
|
|
UserId *string `json:"userId,omitempty"`
|
|
}
|
|
|
|
// PostApiAuthOrganizationDeleteJSONBody defines parameters for PostApiAuthOrganizationDelete.
|
|
type PostApiAuthOrganizationDeleteJSONBody struct {
|
|
// OrganizationId The organization id to delete
|
|
OrganizationId string `json:"organizationId"`
|
|
}
|
|
|
|
// GetApiAuthOrganizationGetInvitationParams defines parameters for GetApiAuthOrganizationGetInvitation.
|
|
type GetApiAuthOrganizationGetInvitationParams struct {
|
|
Id *string `form:"id,omitempty" json:"id,omitempty"`
|
|
}
|
|
|
|
// PostApiAuthOrganizationHasPermissionJSONBody defines parameters for PostApiAuthOrganizationHasPermission.
|
|
type PostApiAuthOrganizationHasPermissionJSONBody struct {
|
|
// Permission The permission to check
|
|
// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
|
|
Permission *map[string]interface{} `json:"permission,omitempty"`
|
|
|
|
// Permissions The permission to check
|
|
Permissions map[string]interface{} `json:"permissions"`
|
|
}
|
|
|
|
// CreateOrganizationInvitationJSONBody defines parameters for CreateOrganizationInvitation.
|
|
type CreateOrganizationInvitationJSONBody struct {
|
|
// Email The email address of the user to invite
|
|
Email string `json:"email"`
|
|
|
|
// OrganizationId The organization ID to invite the user to
|
|
OrganizationId *string `json:"organizationId,omitempty"`
|
|
|
|
// Resend Resend the invitation email, if the user is already invited. Eg: true
|
|
Resend *bool `json:"resend,omitempty"`
|
|
|
|
// Role The role(s) to assign to the user. It can be `admin`, `member`, owner. Eg: "member"
|
|
Role string `json:"role"`
|
|
TeamId string `json:"teamId"`
|
|
}
|
|
|
|
// PostApiAuthOrganizationLeaveJSONBody defines parameters for PostApiAuthOrganizationLeave.
|
|
type PostApiAuthOrganizationLeaveJSONBody struct {
|
|
// OrganizationId The organization Id for the member to leave. Eg: "organization-id"
|
|
OrganizationId string `json:"organizationId"`
|
|
}
|
|
|
|
// PostApiAuthOrganizationRejectInvitationJSONBody defines parameters for PostApiAuthOrganizationRejectInvitation.
|
|
type PostApiAuthOrganizationRejectInvitationJSONBody struct {
|
|
// InvitationId The ID of the invitation to reject
|
|
InvitationId string `json:"invitationId"`
|
|
}
|
|
|
|
// PostApiAuthOrganizationRemoveMemberJSONBody defines parameters for PostApiAuthOrganizationRemoveMember.
|
|
type PostApiAuthOrganizationRemoveMemberJSONBody struct {
|
|
// MemberIdOrEmail The ID or email of the member to remove
|
|
MemberIdOrEmail string `json:"memberIdOrEmail"`
|
|
|
|
// OrganizationId The ID of the organization to remove the member from. If not provided, the active organization will be used. Eg: "org-id"
|
|
OrganizationId *string `json:"organizationId,omitempty"`
|
|
}
|
|
|
|
// SetActiveOrganizationJSONBody defines parameters for SetActiveOrganization.
|
|
type SetActiveOrganizationJSONBody struct {
|
|
OrganizationId *string `json:"organizationId,omitempty"`
|
|
|
|
// OrganizationSlug The organization slug to set as active. It can be null to unset the active organization if organizationId is not provided. Eg: "org-slug"
|
|
OrganizationSlug *string `json:"organizationSlug,omitempty"`
|
|
}
|
|
|
|
// PostApiAuthOrganizationUpdateJSONBody defines parameters for PostApiAuthOrganizationUpdate.
|
|
type PostApiAuthOrganizationUpdateJSONBody struct {
|
|
Data struct {
|
|
Logo *string `json:"logo,omitempty"`
|
|
|
|
// Metadata The metadata of the organization
|
|
Metadata *string `json:"metadata,omitempty"`
|
|
|
|
// Name The name of the organization
|
|
Name *string `json:"name,omitempty"`
|
|
|
|
// Slug The slug of the organization
|
|
Slug *string `json:"slug,omitempty"`
|
|
} `json:"data"`
|
|
|
|
// OrganizationId The organization ID. Eg: "org-id"
|
|
OrganizationId *string `json:"organizationId,omitempty"`
|
|
}
|
|
|
|
// UpdateOrganizationMemberRoleJSONBody defines parameters for UpdateOrganizationMemberRole.
|
|
type UpdateOrganizationMemberRoleJSONBody struct {
|
|
// MemberId The member id to apply the role update to. Eg: "member-id"
|
|
MemberId string `json:"memberId"`
|
|
|
|
// OrganizationId An optional organization ID which the member is a part of to apply the role update. If not provided, you must provide session headers to get the active organization. Eg: "organization-id"
|
|
OrganizationId *string `json:"organizationId,omitempty"`
|
|
|
|
// Role The new role to be applied. This can be a string or array of strings representing the roles. Eg: ["admin", "sale"]
|
|
Role string `json:"role"`
|
|
}
|
|
|
|
// PostApiAuthRefreshTokenJSONBody defines parameters for PostApiAuthRefreshToken.
|
|
type PostApiAuthRefreshTokenJSONBody struct {
|
|
// AccountId The account ID associated with the refresh token
|
|
AccountId *string `json:"accountId,omitempty"`
|
|
|
|
// ProviderId The provider ID for the OAuth provider
|
|
ProviderId string `json:"providerId"`
|
|
|
|
// UserId The user ID associated with the account
|
|
UserId *string `json:"userId,omitempty"`
|
|
}
|
|
|
|
// RequestPasswordResetJSONBody defines parameters for RequestPasswordReset.
|
|
type RequestPasswordResetJSONBody struct {
|
|
// Email The email address of the user to send a password reset email to
|
|
Email string `json:"email"`
|
|
|
|
// RedirectTo The URL to redirect the user to reset their password. If the token isn't valid or expired, it'll be redirected with a query parameter `?error=INVALID_TOKEN`. If the token is valid, it'll be redirected with a query parameter `?token=VALID_TOKEN
|
|
RedirectTo *string `json:"redirectTo,omitempty"`
|
|
}
|
|
|
|
// ResetPasswordJSONBody defines parameters for ResetPassword.
|
|
type ResetPasswordJSONBody struct {
|
|
// NewPassword The new password to set
|
|
NewPassword string `json:"newPassword"`
|
|
|
|
// Token The token to reset the password
|
|
Token *string `json:"token,omitempty"`
|
|
}
|
|
|
|
// ResetPasswordCallbackParams defines parameters for ResetPasswordCallback.
|
|
type ResetPasswordCallbackParams struct {
|
|
// CallbackURL The URL to redirect the user to reset their password
|
|
CallbackURL string `form:"callbackURL" json:"callbackURL"`
|
|
}
|
|
|
|
// PostApiAuthRevokeOtherSessionsJSONBody defines parameters for PostApiAuthRevokeOtherSessions.
|
|
type PostApiAuthRevokeOtherSessionsJSONBody = map[string]interface{}
|
|
|
|
// PostApiAuthRevokeSessionJSONBody defines parameters for PostApiAuthRevokeSession.
|
|
type PostApiAuthRevokeSessionJSONBody struct {
|
|
// Token The token to revoke
|
|
Token string `json:"token"`
|
|
}
|
|
|
|
// PostApiAuthRevokeSessionsJSONBody defines parameters for PostApiAuthRevokeSessions.
|
|
type PostApiAuthRevokeSessionsJSONBody = map[string]interface{}
|
|
|
|
// SendVerificationEmailJSONBody defines parameters for SendVerificationEmail.
|
|
type SendVerificationEmailJSONBody struct {
|
|
// CallbackURL The URL to use for email verification callback
|
|
CallbackURL *string `json:"callbackURL,omitempty"`
|
|
|
|
// Email The email to send the verification email to
|
|
Email string `json:"email"`
|
|
}
|
|
|
|
// SignInEmailJSONBody defines parameters for SignInEmail.
|
|
type SignInEmailJSONBody struct {
|
|
// CallbackURL Callback URL to use as a redirect for email verification
|
|
CallbackURL *string `json:"callbackURL,omitempty"`
|
|
|
|
// Email Email of the user
|
|
Email string `json:"email"`
|
|
|
|
// Password Password of the user
|
|
Password string `json:"password"`
|
|
|
|
// RememberMe If this is false, the session will not be remembered. Default is `true`.
|
|
RememberMe *bool `json:"rememberMe,omitempty"`
|
|
}
|
|
|
|
// SignInEmail200JSONResponseBodyRedirect defines parameters for SignInEmail.
|
|
type SignInEmail200JSONResponseBodyRedirect bool
|
|
|
|
// PostApiAuthSignInOauth2JSONBody defines parameters for PostApiAuthSignInOauth2.
|
|
type PostApiAuthSignInOauth2JSONBody struct {
|
|
AdditionalData *string `json:"additionalData,omitempty"`
|
|
|
|
// CallbackURL The URL to redirect to after sign in
|
|
CallbackURL *string `json:"callbackURL,omitempty"`
|
|
|
|
// DisableRedirect Disable redirect
|
|
DisableRedirect *bool `json:"disableRedirect,omitempty"`
|
|
|
|
// ErrorCallbackURL The URL to redirect to if an error occurs
|
|
ErrorCallbackURL *string `json:"errorCallbackURL,omitempty"`
|
|
|
|
// NewUserCallbackURL The URL to redirect to after login if the user is new. Eg: "/welcome"
|
|
NewUserCallbackURL *string `json:"newUserCallbackURL,omitempty"`
|
|
|
|
// ProviderId The provider ID for the OAuth provider
|
|
ProviderId string `json:"providerId"`
|
|
|
|
// RequestSignUp Explicitly request sign-up. Useful when disableImplicitSignUp is true for this provider. Eg: false
|
|
RequestSignUp *bool `json:"requestSignUp,omitempty"`
|
|
|
|
// Scopes Scopes to be passed to the provider authorization request.
|
|
Scopes *[]interface{} `json:"scopes,omitempty"`
|
|
}
|
|
|
|
// SocialSignInJSONBody defines parameters for SocialSignIn.
|
|
type SocialSignInJSONBody struct {
|
|
AdditionalData *string `json:"additionalData,omitempty"`
|
|
|
|
// CallbackURL Callback URL to redirect to after the user has signed in
|
|
CallbackURL *string `json:"callbackURL,omitempty"`
|
|
|
|
// DisableRedirect Disable automatic redirection to the provider. Useful for handling the redirection yourself
|
|
DisableRedirect *bool `json:"disableRedirect,omitempty"`
|
|
|
|
// ErrorCallbackURL Callback URL to redirect to if an error happens
|
|
ErrorCallbackURL *string `json:"errorCallbackURL,omitempty"`
|
|
IdToken *struct {
|
|
// AccessToken Access token from the provider
|
|
AccessToken *string `json:"accessToken,omitempty"`
|
|
|
|
// ExpiresAt Expiry date of the token
|
|
ExpiresAt *float32 `json:"expiresAt,omitempty"`
|
|
|
|
// Nonce Nonce used to generate the token
|
|
Nonce *string `json:"nonce,omitempty"`
|
|
|
|
// RefreshToken Refresh token from the provider
|
|
RefreshToken *string `json:"refreshToken,omitempty"`
|
|
|
|
// Token ID token from the provider
|
|
Token string `json:"token"`
|
|
|
|
// User The user object from the provider. Only available for some providers like Apple.
|
|
User *struct {
|
|
Email *string `json:"email,omitempty"`
|
|
Name *struct {
|
|
FirstName *string `json:"firstName,omitempty"`
|
|
LastName *string `json:"lastName,omitempty"`
|
|
} `json:"name,omitempty"`
|
|
} `json:"user,omitempty"`
|
|
} `json:"idToken,omitempty"`
|
|
|
|
// LoginHint The login hint to use for the authorization code request
|
|
LoginHint *string `json:"loginHint,omitempty"`
|
|
NewUserCallbackURL *string `json:"newUserCallbackURL,omitempty"`
|
|
Provider string `json:"provider"`
|
|
|
|
// RequestSignUp Explicitly request sign-up. Useful when disableImplicitSignUp is true for this provider
|
|
RequestSignUp *bool `json:"requestSignUp,omitempty"`
|
|
|
|
// Scopes Array of scopes to request from the provider. This will override the default scopes passed.
|
|
Scopes *[]interface{} `json:"scopes,omitempty"`
|
|
}
|
|
|
|
// PostApiAuthSignInUsernameJSONBody defines parameters for PostApiAuthSignInUsername.
|
|
type PostApiAuthSignInUsernameJSONBody struct {
|
|
// CallbackURL URL to redirect to after sign in (also used as the redirect target for email verification when required)
|
|
CallbackURL *string `json:"callbackURL,omitempty"`
|
|
|
|
// Password The password of the user
|
|
Password string `json:"password"`
|
|
|
|
// RememberMe Remember the user session
|
|
RememberMe *bool `json:"rememberMe,omitempty"`
|
|
|
|
// Username The username of the user
|
|
Username string `json:"username"`
|
|
}
|
|
|
|
// SignOutJSONBody defines parameters for SignOut.
|
|
type SignOutJSONBody = map[string]interface{}
|
|
|
|
// SignUpWithEmailAndPasswordJSONBody defines parameters for SignUpWithEmailAndPassword.
|
|
type SignUpWithEmailAndPasswordJSONBody struct {
|
|
// CallbackURL The URL to use for email verification callback
|
|
CallbackURL *string `json:"callbackURL,omitempty"`
|
|
|
|
// Email The email of the user
|
|
Email string `json:"email"`
|
|
|
|
// Image The profile image URL of the user
|
|
Image *string `json:"image,omitempty"`
|
|
|
|
// Name The name of the user
|
|
Name string `json:"name"`
|
|
|
|
// Password The password of the user
|
|
Password string `json:"password"`
|
|
|
|
// RememberMe If this is false, the session will not be remembered. Default is `true`.
|
|
RememberMe *bool `json:"rememberMe,omitempty"`
|
|
}
|
|
|
|
// PostApiAuthUnlinkAccountJSONBody defines parameters for PostApiAuthUnlinkAccount.
|
|
type PostApiAuthUnlinkAccountJSONBody struct {
|
|
AccountId *string `json:"accountId,omitempty"`
|
|
ProviderId string `json:"providerId"`
|
|
}
|
|
|
|
// UpdateSessionJSONBody defines parameters for UpdateSession.
|
|
type UpdateSessionJSONBody = map[string]interface{}
|
|
|
|
// UpdateUserJSONBody defines parameters for UpdateUser.
|
|
type UpdateUserJSONBody struct {
|
|
// Image The image of the user
|
|
Image *string `json:"image,omitempty"`
|
|
|
|
// Name The name of the user
|
|
Name *string `json:"name,omitempty"`
|
|
}
|
|
|
|
// GetApiAuthVerifyEmailParams defines parameters for GetApiAuthVerifyEmail.
|
|
type GetApiAuthVerifyEmailParams struct {
|
|
// Token The token to verify the email
|
|
Token string `form:"token" json:"token"`
|
|
|
|
// CallbackURL The URL to redirect to after email verification
|
|
CallbackURL *string `form:"callbackURL,omitempty" json:"callbackURL,omitempty"`
|
|
}
|
|
|
|
// VerifyPasswordJSONBody defines parameters for VerifyPassword.
|
|
type VerifyPasswordJSONBody struct {
|
|
// Password The password to verify
|
|
Password string `json:"password"`
|
|
}
|
|
|
|
// ListBackgroundJobsParams defines parameters for ListBackgroundJobs.
|
|
type ListBackgroundJobsParams struct {
|
|
Status *ListBackgroundJobsParamsStatus `form:"status,omitempty" json:"status,omitempty"`
|
|
Type *string `form:"type,omitempty" json:"type,omitempty"`
|
|
Page *int `form:"page,omitempty" json:"page,omitempty"`
|
|
PageSize *int `form:"pageSize,omitempty" json:"pageSize,omitempty"`
|
|
}
|
|
|
|
// ListBackgroundJobsParamsStatus defines parameters for ListBackgroundJobs.
|
|
type ListBackgroundJobsParamsStatus string
|
|
|
|
// CreateBackgroundJobJSONBody defines parameters for CreateBackgroundJob.
|
|
type CreateBackgroundJobJSONBody struct {
|
|
union json.RawMessage
|
|
}
|
|
|
|
// CreateBackgroundJobJSONBody0 defines parameters for CreateBackgroundJob.
|
|
type CreateBackgroundJobJSONBody0 struct {
|
|
MatterIds []string `json:"matterIds"`
|
|
OutputName *string `json:"outputName,omitempty"`
|
|
TargetFolder *string `json:"targetFolder,omitempty"`
|
|
Type CreateBackgroundJobJSONBody0Type `json:"type"`
|
|
}
|
|
|
|
// CreateBackgroundJobJSONBody0Type defines parameters for CreateBackgroundJob.
|
|
type CreateBackgroundJobJSONBody0Type string
|
|
|
|
// CreateBackgroundJobJSONBody1 defines parameters for CreateBackgroundJob.
|
|
type CreateBackgroundJobJSONBody1 struct {
|
|
MatterId string `json:"matterId"`
|
|
TargetFolder *string `json:"targetFolder,omitempty"`
|
|
Type CreateBackgroundJobJSONBody1Type `json:"type"`
|
|
}
|
|
|
|
// CreateBackgroundJobJSONBody1Type defines parameters for CreateBackgroundJob.
|
|
type CreateBackgroundJobJSONBody1Type string
|
|
|
|
// CancelBackgroundJobJSONBody defines parameters for CancelBackgroundJob.
|
|
type CancelBackgroundJobJSONBody struct {
|
|
Status CancelBackgroundJobJSONBodyStatus `json:"status"`
|
|
}
|
|
|
|
// CancelBackgroundJobJSONBodyStatus defines parameters for CancelBackgroundJob.
|
|
type CancelBackgroundJobJSONBodyStatus string
|
|
|
|
// CreateDownloaderJSONBody defines parameters for CreateDownloader.
|
|
type CreateDownloaderJSONBody struct {
|
|
Heartbeat struct {
|
|
Arch string `json:"arch"`
|
|
Capabilities []string `json:"capabilities"`
|
|
CurrentTasks int `json:"currentTasks"`
|
|
DownloadBps *int64 `json:"downloadBps,omitempty"`
|
|
Engine CreateDownloaderJSONBodyHeartbeatEngine `json:"engine"`
|
|
FreeDiskBytes *int64 `json:"freeDiskBytes,omitempty"`
|
|
Hostname string `json:"hostname"`
|
|
MaxConcurrentTasks int `json:"maxConcurrentTasks"`
|
|
Platform string `json:"platform"`
|
|
UploadBps *int64 `json:"uploadBps,omitempty"`
|
|
Version string `json:"version"`
|
|
} `json:"heartbeat"`
|
|
Name string `json:"name"`
|
|
}
|
|
|
|
// CreateDownloaderJSONBodyHeartbeatEngine defines parameters for CreateDownloader.
|
|
type CreateDownloaderJSONBodyHeartbeatEngine string
|
|
|
|
// RecordDownloaderHeartbeatJSONBody defines parameters for RecordDownloaderHeartbeat.
|
|
type RecordDownloaderHeartbeatJSONBody struct {
|
|
Arch string `json:"arch"`
|
|
Capabilities []string `json:"capabilities"`
|
|
CurrentTasks int `json:"currentTasks"`
|
|
DownloadBps *int64 `json:"downloadBps,omitempty"`
|
|
Engine RecordDownloaderHeartbeatJSONBodyEngine `json:"engine"`
|
|
FreeDiskBytes *int64 `json:"freeDiskBytes,omitempty"`
|
|
Hostname string `json:"hostname"`
|
|
MaxConcurrentTasks int `json:"maxConcurrentTasks"`
|
|
Platform string `json:"platform"`
|
|
UploadBps *int64 `json:"uploadBps,omitempty"`
|
|
Version string `json:"version"`
|
|
}
|
|
|
|
// RecordDownloaderHeartbeatJSONBodyEngine defines parameters for RecordDownloaderHeartbeat.
|
|
type RecordDownloaderHeartbeatJSONBodyEngine string
|
|
|
|
// UpdateDownloaderJSONBody defines parameters for UpdateDownloader.
|
|
type UpdateDownloaderJSONBody struct {
|
|
Enabled *bool `json:"enabled,omitempty"`
|
|
Name *string `json:"name,omitempty"`
|
|
RemoteDownloadCreditBillingEnabled *bool `json:"remoteDownloadCreditBillingEnabled,omitempty"`
|
|
RemoteDownloadCreditPerUnit *int `json:"remoteDownloadCreditPerUnit,omitempty"`
|
|
RemoteDownloadCreditUnitBytes *int `json:"remoteDownloadCreditUnitBytes,omitempty"`
|
|
}
|
|
|
|
// ListDownloadTasksParams defines parameters for ListDownloadTasks.
|
|
type ListDownloadTasksParams struct {
|
|
Status *ListDownloadTasksParamsStatus `form:"status,omitempty" json:"status,omitempty"`
|
|
AssignedTo *ListDownloadTasksParamsAssignedTo `form:"assignedTo,omitempty" json:"assignedTo,omitempty"`
|
|
Category *string `form:"category,omitempty" json:"category,omitempty"`
|
|
Tag *string `form:"tag,omitempty" json:"tag,omitempty"`
|
|
SortBy *ListDownloadTasksParamsSortBy `form:"sortBy,omitempty" json:"sortBy,omitempty"`
|
|
SortDir *ListDownloadTasksParamsSortDir `form:"sortDir,omitempty" json:"sortDir,omitempty"`
|
|
Page *int `form:"page,omitempty" json:"page,omitempty"`
|
|
PageSize *int `form:"pageSize,omitempty" json:"pageSize,omitempty"`
|
|
}
|
|
|
|
// ListDownloadTasksParamsStatus defines parameters for ListDownloadTasks.
|
|
type ListDownloadTasksParamsStatus string
|
|
|
|
// ListDownloadTasksParamsAssignedTo defines parameters for ListDownloadTasks.
|
|
type ListDownloadTasksParamsAssignedTo string
|
|
|
|
// ListDownloadTasksParamsSortBy defines parameters for ListDownloadTasks.
|
|
type ListDownloadTasksParamsSortBy string
|
|
|
|
// ListDownloadTasksParamsSortDir defines parameters for ListDownloadTasks.
|
|
type ListDownloadTasksParamsSortDir string
|
|
|
|
// CreateDownloadTaskJSONBody defines parameters for CreateDownloadTask.
|
|
type CreateDownloadTaskJSONBody struct {
|
|
Category *string `json:"category,omitempty"`
|
|
Name *string `json:"name,omitempty"`
|
|
Source struct {
|
|
Type CreateDownloadTaskJSONBodySourceType `json:"type"`
|
|
Uri string `json:"uri"`
|
|
} `json:"source"`
|
|
Tags *[]string `json:"tags,omitempty"`
|
|
TargetFolder string `json:"targetFolder"`
|
|
}
|
|
|
|
// CreateDownloadTaskJSONBodySourceType defines parameters for CreateDownloadTask.
|
|
type CreateDownloadTaskJSONBodySourceType string
|
|
|
|
// UpdateDownloadTaskJSONBody defines parameters for UpdateDownloadTask.
|
|
type UpdateDownloadTaskJSONBody struct {
|
|
ErrorMessage *string `json:"errorMessage,omitempty"`
|
|
Progress *struct {
|
|
Download *struct {
|
|
Bytes int64 `json:"bytes"`
|
|
BytesPerSecond int64 `json:"bytesPerSecond"`
|
|
TotalBytes *int64 `json:"totalBytes,omitempty"`
|
|
} `json:"download,omitempty"`
|
|
Upload *struct {
|
|
Bytes int64 `json:"bytes"`
|
|
BytesPerSecond int64 `json:"bytesPerSecond"`
|
|
TotalBytes *int64 `json:"totalBytes,omitempty"`
|
|
} `json:"upload,omitempty"`
|
|
} `json:"progress,omitempty"`
|
|
ResultObjectId *string `json:"resultObjectId,omitempty"`
|
|
Runtime *struct {
|
|
Connections *int `json:"connections,omitempty"`
|
|
Engine *UpdateDownloadTaskJSONBodyRuntimeEngine `json:"engine,omitempty"`
|
|
EtaSeconds *int `json:"etaSeconds,omitempty"`
|
|
Files *[]struct {
|
|
CompletedBytes *int64 `json:"completedBytes,omitempty"`
|
|
Path string `json:"path"`
|
|
Selected *bool `json:"selected,omitempty"`
|
|
Size int64 `json:"size"`
|
|
} `json:"files,omitempty"`
|
|
Message *string `json:"message,omitempty"`
|
|
Peers *[]struct {
|
|
Address string `json:"address"`
|
|
Client *string `json:"client,omitempty"`
|
|
CountryCode *string `json:"countryCode,omitempty"`
|
|
DownloadBps *int64 `json:"downloadBps,omitempty"`
|
|
Progress *float32 `json:"progress,omitempty"`
|
|
RegionCode *string `json:"regionCode,omitempty"`
|
|
UploadBps *int64 `json:"uploadBps,omitempty"`
|
|
} `json:"peers,omitempty"`
|
|
Phase *UpdateDownloadTaskJSONBodyRuntimePhase `json:"phase,omitempty"`
|
|
Progress *struct {
|
|
Download struct {
|
|
Bytes int64 `json:"bytes"`
|
|
BytesPerSecond int64 `json:"bytesPerSecond"`
|
|
TotalBytes *int64 `json:"totalBytes,omitempty"`
|
|
} `json:"download"`
|
|
Upload struct {
|
|
Bytes int64 `json:"bytes"`
|
|
BytesPerSecond int64 `json:"bytesPerSecond"`
|
|
TotalBytes *int64 `json:"totalBytes,omitempty"`
|
|
} `json:"upload"`
|
|
} `json:"progress,omitempty"`
|
|
Seeding *struct {
|
|
Active *bool `json:"active,omitempty"`
|
|
Enabled *bool `json:"enabled,omitempty"`
|
|
ExpiresAt *string `json:"expiresAt,omitempty"`
|
|
Ratio *float32 `json:"ratio,omitempty"`
|
|
StartedAt *string `json:"startedAt,omitempty"`
|
|
UploadBytesPerSecond *int64 `json:"uploadBytesPerSecond,omitempty"`
|
|
UploadedBytes *int64 `json:"uploadedBytes,omitempty"`
|
|
} `json:"seeding,omitempty"`
|
|
State *string `json:"state,omitempty"`
|
|
Torrent *struct {
|
|
InfoHash *string `json:"infoHash,omitempty"`
|
|
Leechers *int `json:"leechers,omitempty"`
|
|
Name *string `json:"name,omitempty"`
|
|
Peers *int `json:"peers,omitempty"`
|
|
Seeders *int `json:"seeders,omitempty"`
|
|
} `json:"torrent,omitempty"`
|
|
Trackers *[]struct {
|
|
Leechers *int `json:"leechers,omitempty"`
|
|
Message *string `json:"message,omitempty"`
|
|
Peers *int `json:"peers,omitempty"`
|
|
Seeds *int `json:"seeds,omitempty"`
|
|
Status *string `json:"status,omitempty"`
|
|
Url string `json:"url"`
|
|
} `json:"trackers,omitempty"`
|
|
UpdatedAt *string `json:"updatedAt,omitempty"`
|
|
} `json:"runtime,omitempty"`
|
|
Status *UpdateDownloadTaskJSONBodyStatus `json:"status,omitempty"`
|
|
}
|
|
|
|
// UpdateDownloadTaskJSONBodyRuntimeEngine defines parameters for UpdateDownloadTask.
|
|
type UpdateDownloadTaskJSONBodyRuntimeEngine string
|
|
|
|
// UpdateDownloadTaskJSONBodyRuntimePhase defines parameters for UpdateDownloadTask.
|
|
type UpdateDownloadTaskJSONBodyRuntimePhase string
|
|
|
|
// UpdateDownloadTaskJSONBodyStatus defines parameters for UpdateDownloadTask.
|
|
type UpdateDownloadTaskJSONBodyStatus string
|
|
|
|
// RetryDownloadTaskJSONBody defines parameters for RetryDownloadTask.
|
|
type RetryDownloadTaskJSONBody struct {
|
|
Fresh *bool `json:"fresh,omitempty"`
|
|
}
|
|
|
|
// SetDownloadTaskStatusJSONBody defines parameters for SetDownloadTaskStatus.
|
|
type SetDownloadTaskStatusJSONBody struct {
|
|
Status SetDownloadTaskStatusJSONBodyStatus `json:"status"`
|
|
}
|
|
|
|
// SetDownloadTaskStatusJSONBodyStatus defines parameters for SetDownloadTaskStatus.
|
|
type SetDownloadTaskStatusJSONBodyStatus string
|
|
|
|
// StreamEventsParams defines parameters for StreamEvents.
|
|
type StreamEventsParams struct {
|
|
// DownloadTasks Set to "1" to subscribe to download-task events.
|
|
DownloadTasks *string `form:"downloadTasks,omitempty" json:"downloadTasks,omitempty"`
|
|
DtStatus *string `form:"dtStatus,omitempty" json:"dtStatus,omitempty"`
|
|
DtCategory *string `form:"dtCategory,omitempty" json:"dtCategory,omitempty"`
|
|
DtTag *string `form:"dtTag,omitempty" json:"dtTag,omitempty"`
|
|
|
|
// DtSortBy One of: createdAt | source | category | tags | status | progress | eta
|
|
DtSortBy *string `form:"dtSortBy,omitempty" json:"dtSortBy,omitempty"`
|
|
|
|
// DtSortDir asc | desc
|
|
DtSortDir *string `form:"dtSortDir,omitempty" json:"dtSortDir,omitempty"`
|
|
}
|
|
|
|
// UpdateImageHostingConfigJSONBody defines parameters for UpdateImageHostingConfig.
|
|
type UpdateImageHostingConfigJSONBody struct {
|
|
CustomDomain *string `json:"customDomain,omitempty"`
|
|
Enabled UpdateImageHostingConfigJSONBodyEnabled `json:"enabled"`
|
|
RefererAllowlist *[]string `json:"refererAllowlist,omitempty"`
|
|
}
|
|
|
|
// UpdateImageHostingConfigJSONBodyEnabled defines parameters for UpdateImageHostingConfig.
|
|
type UpdateImageHostingConfigJSONBodyEnabled bool
|
|
|
|
// ListImageHostingsParams defines parameters for ListImageHostings.
|
|
type ListImageHostingsParams struct {
|
|
PathPrefix *string `form:"pathPrefix,omitempty" json:"pathPrefix,omitempty"`
|
|
Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"`
|
|
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
|
|
}
|
|
|
|
// PresignImageHostingUploadJSONBody defines parameters for PresignImageHostingUpload.
|
|
type PresignImageHostingUploadJSONBody struct {
|
|
Mime PresignImageHostingUploadJSONBodyMime `json:"mime"`
|
|
Path string `json:"path"`
|
|
Size int `json:"size"`
|
|
}
|
|
|
|
// PresignImageHostingUploadJSONBodyMime defines parameters for PresignImageHostingUpload.
|
|
type PresignImageHostingUploadJSONBodyMime string
|
|
|
|
// ListNotificationsParams defines parameters for ListNotifications.
|
|
type ListNotificationsParams struct {
|
|
Page *int `form:"page,omitempty" json:"page,omitempty"`
|
|
PageSize *int `form:"pageSize,omitempty" json:"pageSize,omitempty"`
|
|
Unread *string `form:"unread,omitempty" json:"unread,omitempty"`
|
|
}
|
|
|
|
// ListObjectsParams defines parameters for ListObjects.
|
|
type ListObjectsParams struct {
|
|
Page *int `form:"page,omitempty" json:"page,omitempty"`
|
|
PageSize *int `form:"pageSize,omitempty" json:"pageSize,omitempty"`
|
|
Parent *string `form:"parent,omitempty" json:"parent,omitempty"`
|
|
Path *string `form:"path,omitempty" json:"path,omitempty"`
|
|
Type *string `form:"type,omitempty" json:"type,omitempty"`
|
|
Search *string `form:"search,omitempty" json:"search,omitempty"`
|
|
OrgId *string `form:"orgId,omitempty" json:"orgId,omitempty"`
|
|
}
|
|
|
|
// CreateObjectJSONBody defines parameters for CreateObject.
|
|
type CreateObjectJSONBody struct {
|
|
Dirtype *int `json:"dirtype,omitempty"`
|
|
Name string `json:"name"`
|
|
OnConflict *CreateObjectJSONBodyOnConflict `json:"onConflict,omitempty"`
|
|
Parent *string `json:"parent,omitempty"`
|
|
Size *int `json:"size,omitempty"`
|
|
Type string `json:"type"`
|
|
}
|
|
|
|
// CreateObjectJSONBodyOnConflict defines parameters for CreateObject.
|
|
type CreateObjectJSONBodyOnConflict string
|
|
|
|
// UpdateObjectJSONBody defines parameters for UpdateObject.
|
|
type UpdateObjectJSONBody struct {
|
|
Name *string `json:"name,omitempty"`
|
|
OnConflict *UpdateObjectJSONBodyOnConflict `json:"onConflict,omitempty"`
|
|
Parent *string `json:"parent,omitempty"`
|
|
}
|
|
|
|
// UpdateObjectJSONBodyOnConflict defines parameters for UpdateObject.
|
|
type UpdateObjectJSONBodyOnConflict string
|
|
|
|
// CopyObjectJSONBody defines parameters for CopyObject.
|
|
type CopyObjectJSONBody struct {
|
|
OnConflict *CopyObjectJSONBodyOnConflict `json:"onConflict,omitempty"`
|
|
Parent *string `json:"parent,omitempty"`
|
|
}
|
|
|
|
// CopyObjectJSONBodyOnConflict defines parameters for CopyObject.
|
|
type CopyObjectJSONBodyOnConflict string
|
|
|
|
// TransferObjectJSONBody defines parameters for TransferObject.
|
|
type TransferObjectJSONBody struct {
|
|
Mode TransferObjectJSONBodyMode `json:"mode"`
|
|
TargetOrgId string `json:"targetOrgId"`
|
|
TargetParent *string `json:"targetParent,omitempty"`
|
|
}
|
|
|
|
// TransferObjectJSONBodyMode defines parameters for TransferObject.
|
|
type TransferObjectJSONBodyMode string
|
|
|
|
// CompleteObjectUploadJSONBody defines parameters for CompleteObjectUpload.
|
|
type CompleteObjectUploadJSONBody struct {
|
|
Parts []struct {
|
|
Etag string `json:"etag"`
|
|
PartNumber int `json:"partNumber"`
|
|
} `json:"parts"`
|
|
}
|
|
|
|
// PresignObjectUploadPartsJSONBody defines parameters for PresignObjectUploadParts.
|
|
type PresignObjectUploadPartsJSONBody struct {
|
|
PartNumbers []int `json:"partNumbers"`
|
|
}
|
|
|
|
// ListSharesParams defines parameters for ListShares.
|
|
type ListSharesParams struct {
|
|
Page *int `form:"page,omitempty" json:"page,omitempty"`
|
|
PageSize *int `form:"pageSize,omitempty" json:"pageSize,omitempty"`
|
|
Status *ListSharesParamsStatus `form:"status,omitempty" json:"status,omitempty"`
|
|
Box *ListSharesParamsBox `form:"box,omitempty" json:"box,omitempty"`
|
|
}
|
|
|
|
// ListSharesParamsStatus defines parameters for ListShares.
|
|
type ListSharesParamsStatus string
|
|
|
|
// ListSharesParamsBox defines parameters for ListShares.
|
|
type ListSharesParamsBox string
|
|
|
|
// CreateShareJSONBody defines parameters for CreateShare.
|
|
type CreateShareJSONBody struct {
|
|
DownloadLimit *int `json:"downloadLimit,omitempty"`
|
|
ExpiresAt *time.Time `json:"expiresAt,omitempty"`
|
|
Kind CreateShareJSONBodyKind `json:"kind"`
|
|
MatterId string `json:"matterId"`
|
|
Password *string `json:"password,omitempty"`
|
|
Recipients *[]struct {
|
|
RecipientEmail *openapi_types.Email `json:"recipientEmail,omitempty"`
|
|
RecipientUserId *string `json:"recipientUserId,omitempty"`
|
|
} `json:"recipients,omitempty"`
|
|
}
|
|
|
|
// CreateShareJSONBodyKind defines parameters for CreateShare.
|
|
type CreateShareJSONBodyKind string
|
|
|
|
// ListShareObjectsParams defines parameters for ListShareObjects.
|
|
type ListShareObjectsParams struct {
|
|
Parent *string `form:"parent,omitempty" json:"parent,omitempty"`
|
|
Page *string `form:"page,omitempty" json:"page,omitempty"`
|
|
PageSize *string `form:"pageSize,omitempty" json:"pageSize,omitempty"`
|
|
}
|
|
|
|
// SaveShareJSONBody defines parameters for SaveShare.
|
|
type SaveShareJSONBody struct {
|
|
TargetOrgId string `json:"targetOrgId"`
|
|
TargetParent *string `json:"targetParent,omitempty"`
|
|
TargetSubpath *[]string `json:"targetSubpath,omitempty"`
|
|
}
|
|
|
|
// VerifySharePasswordJSONBody defines parameters for VerifySharePassword.
|
|
type VerifySharePasswordJSONBody struct {
|
|
Password string `json:"password"`
|
|
}
|
|
|
|
// VerifySharePassword200JSONResponseBodyOk defines parameters for VerifySharePassword.
|
|
type VerifySharePassword200JSONResponseBodyOk bool
|
|
|
|
// RevokeShareJSONBody defines parameters for RevokeShare.
|
|
type RevokeShareJSONBody struct {
|
|
Status RevokeShareJSONBodyStatus `json:"status"`
|
|
}
|
|
|
|
// RevokeShareJSONBodyStatus defines parameters for RevokeShare.
|
|
type RevokeShareJSONBodyStatus string
|
|
|
|
// ListAnnouncementsParams defines parameters for ListAnnouncements.
|
|
type ListAnnouncementsParams struct {
|
|
Page *int `form:"page,omitempty" json:"page,omitempty"`
|
|
PageSize *int `form:"pageSize,omitempty" json:"pageSize,omitempty"`
|
|
Scope *ListAnnouncementsParamsScope `form:"scope,omitempty" json:"scope,omitempty"`
|
|
Status *ListAnnouncementsParamsStatus `form:"status,omitempty" json:"status,omitempty"`
|
|
}
|
|
|
|
// ListAnnouncementsParamsScope defines parameters for ListAnnouncements.
|
|
type ListAnnouncementsParamsScope string
|
|
|
|
// ListAnnouncementsParamsStatus defines parameters for ListAnnouncements.
|
|
type ListAnnouncementsParamsStatus string
|
|
|
|
// CreateAnnouncementJSONBody defines parameters for CreateAnnouncement.
|
|
type CreateAnnouncementJSONBody struct {
|
|
Body *string `json:"body,omitempty"`
|
|
Priority *int `json:"priority,omitempty"`
|
|
Status CreateAnnouncementJSONBodyStatus `json:"status"`
|
|
Title string `json:"title"`
|
|
}
|
|
|
|
// CreateAnnouncementJSONBodyStatus defines parameters for CreateAnnouncement.
|
|
type CreateAnnouncementJSONBodyStatus string
|
|
|
|
// UpdateAnnouncementJSONBody defines parameters for UpdateAnnouncement.
|
|
type UpdateAnnouncementJSONBody struct {
|
|
Body *string `json:"body,omitempty"`
|
|
Priority *int `json:"priority,omitempty"`
|
|
Status UpdateAnnouncementJSONBodyStatus `json:"status"`
|
|
Title string `json:"title"`
|
|
}
|
|
|
|
// UpdateAnnouncementJSONBodyStatus defines parameters for UpdateAnnouncement.
|
|
type UpdateAnnouncementJSONBodyStatus string
|
|
|
|
// ListAuditEventsParams defines parameters for ListAuditEvents.
|
|
type ListAuditEventsParams struct {
|
|
Page *int `form:"page,omitempty" json:"page,omitempty"`
|
|
PageSize *int `form:"pageSize,omitempty" json:"pageSize,omitempty"`
|
|
OrgId *string `form:"orgId,omitempty" json:"orgId,omitempty"`
|
|
UserId *string `form:"userId,omitempty" json:"userId,omitempty"`
|
|
Action *string `form:"action,omitempty" json:"action,omitempty"`
|
|
TargetType *string `form:"targetType,omitempty" json:"targetType,omitempty"`
|
|
}
|
|
|
|
// UpsertAuthProviderJSONBody defines parameters for UpsertAuthProvider.
|
|
type UpsertAuthProviderJSONBody struct {
|
|
ClientId string `json:"clientId"`
|
|
ClientSecret string `json:"clientSecret"`
|
|
DiscoveryUrl *string `json:"discoveryUrl,omitempty"`
|
|
Enabled bool `json:"enabled"`
|
|
Scopes *[]string `json:"scopes,omitempty"`
|
|
Type UpsertAuthProviderJSONBodyType `json:"type"`
|
|
}
|
|
|
|
// UpsertAuthProviderJSONBodyType defines parameters for UpsertAuthProvider.
|
|
type UpsertAuthProviderJSONBodyType string
|
|
|
|
// GetChangelogParams defines parameters for GetChangelog.
|
|
type GetChangelogParams struct {
|
|
Refresh *string `form:"refresh,omitempty" json:"refresh,omitempty"`
|
|
}
|
|
|
|
// SaveEmailConfigJSONBody defines parameters for SaveEmailConfig.
|
|
type SaveEmailConfigJSONBody struct {
|
|
union json.RawMessage
|
|
}
|
|
|
|
// SaveEmailConfigJSONBody0 defines parameters for SaveEmailConfig.
|
|
type SaveEmailConfigJSONBody0 struct {
|
|
Enabled bool `json:"enabled"`
|
|
From openapi_types.Email `json:"from"`
|
|
Provider SaveEmailConfigJSONBody0Provider `json:"provider"`
|
|
Smtp struct {
|
|
Host string `json:"host"`
|
|
Pass string `json:"pass"`
|
|
Port int `json:"port"`
|
|
Secure bool `json:"secure"`
|
|
User string `json:"user"`
|
|
} `json:"smtp"`
|
|
}
|
|
|
|
// SaveEmailConfigJSONBody0Provider defines parameters for SaveEmailConfig.
|
|
type SaveEmailConfigJSONBody0Provider string
|
|
|
|
// SaveEmailConfigJSONBody1 defines parameters for SaveEmailConfig.
|
|
type SaveEmailConfigJSONBody1 struct {
|
|
Enabled bool `json:"enabled"`
|
|
From openapi_types.Email `json:"from"`
|
|
Http struct {
|
|
ApiKey string `json:"apiKey"`
|
|
Url string `json:"url"`
|
|
} `json:"http"`
|
|
Provider SaveEmailConfigJSONBody1Provider `json:"provider"`
|
|
}
|
|
|
|
// SaveEmailConfigJSONBody1Provider defines parameters for SaveEmailConfig.
|
|
type SaveEmailConfigJSONBody1Provider string
|
|
|
|
// SaveEmailConfigJSONBody2 defines parameters for SaveEmailConfig.
|
|
type SaveEmailConfigJSONBody2 struct {
|
|
Enabled bool `json:"enabled"`
|
|
From openapi_types.Email `json:"from"`
|
|
Provider SaveEmailConfigJSONBody2Provider `json:"provider"`
|
|
}
|
|
|
|
// SaveEmailConfigJSONBody2Provider defines parameters for SaveEmailConfig.
|
|
type SaveEmailConfigJSONBody2Provider string
|
|
|
|
// SendTestEmailJSONBody defines parameters for SendTestEmail.
|
|
type SendTestEmailJSONBody struct {
|
|
To openapi_types.Email `json:"to"`
|
|
}
|
|
|
|
// ListSiteInvitationsParams defines parameters for ListSiteInvitations.
|
|
type ListSiteInvitationsParams struct {
|
|
Page *int `form:"page,omitempty" json:"page,omitempty"`
|
|
PageSize *int `form:"pageSize,omitempty" json:"pageSize,omitempty"`
|
|
}
|
|
|
|
// CreateSiteInvitationJSONBody defines parameters for CreateSiteInvitation.
|
|
type CreateSiteInvitationJSONBody struct {
|
|
Email openapi_types.Email `json:"email"`
|
|
}
|
|
|
|
// ListInviteCodesParams defines parameters for ListInviteCodes.
|
|
type ListInviteCodesParams struct {
|
|
Page *int `form:"page,omitempty" json:"page,omitempty"`
|
|
PageSize *int `form:"pageSize,omitempty" json:"pageSize,omitempty"`
|
|
}
|
|
|
|
// GenerateInviteCodesJSONBody defines parameters for GenerateInviteCodes.
|
|
type GenerateInviteCodesJSONBody struct {
|
|
Count int `json:"count"`
|
|
ExpiresInDays *int `json:"expiresInDays,omitempty"`
|
|
}
|
|
|
|
// ValidateInviteCodeJSONBody defines parameters for ValidateInviteCode.
|
|
type ValidateInviteCodeJSONBody struct {
|
|
Code string `json:"code"`
|
|
}
|
|
|
|
// SetSystemOptionJSONBody defines parameters for SetSystemOption.
|
|
type SetSystemOptionJSONBody struct {
|
|
Public *bool `json:"public,omitempty"`
|
|
Value string `json:"value"`
|
|
}
|
|
|
|
// CreateStorageJSONBody defines parameters for CreateStorage.
|
|
type CreateStorageJSONBody struct {
|
|
AccessKey string `json:"accessKey"`
|
|
Bucket string `json:"bucket"`
|
|
Capacity *int `json:"capacity,omitempty"`
|
|
CustomHost *string `json:"customHost,omitempty"`
|
|
EgressCreditBillingEnabled *bool `json:"egressCreditBillingEnabled,omitempty"`
|
|
EgressCreditPerUnit *int `json:"egressCreditPerUnit,omitempty"`
|
|
EgressCreditUnitBytes *int `json:"egressCreditUnitBytes,omitempty"`
|
|
Endpoint string `json:"endpoint"`
|
|
Region *string `json:"region,omitempty"`
|
|
SecretKey string `json:"secretKey"`
|
|
Title string `json:"title"`
|
|
}
|
|
|
|
// UpdateStorageJSONBody defines parameters for UpdateStorage.
|
|
type UpdateStorageJSONBody struct {
|
|
AccessKey *string `json:"accessKey,omitempty"`
|
|
Bucket *string `json:"bucket,omitempty"`
|
|
Capacity *int `json:"capacity,omitempty"`
|
|
CustomHost *string `json:"customHost,omitempty"`
|
|
EgressCreditBillingEnabled *bool `json:"egressCreditBillingEnabled,omitempty"`
|
|
EgressCreditPerUnit *int `json:"egressCreditPerUnit,omitempty"`
|
|
EgressCreditUnitBytes *int `json:"egressCreditUnitBytes,omitempty"`
|
|
Endpoint *string `json:"endpoint,omitempty"`
|
|
Region *string `json:"region,omitempty"`
|
|
SecretKey *string `json:"secretKey,omitempty"`
|
|
Status *UpdateStorageJSONBodyStatus `json:"status,omitempty"`
|
|
Title *string `json:"title,omitempty"`
|
|
}
|
|
|
|
// UpdateStorageJSONBodyStatus defines parameters for UpdateStorage.
|
|
type UpdateStorageJSONBodyStatus string
|
|
|
|
// CreateCheckoutJSONBody defines parameters for CreateCheckout.
|
|
type CreateCheckoutJSONBody struct {
|
|
PackageId string `json:"packageId"`
|
|
PriceId *string `json:"priceId,omitempty"`
|
|
PromotionCode *string `json:"promotionCode,omitempty"`
|
|
}
|
|
|
|
// RedeemGiftCardJSONBody defines parameters for RedeemGiftCard.
|
|
type RedeemGiftCardJSONBody struct {
|
|
Code string `json:"code"`
|
|
}
|
|
|
|
// GetDiscountQuoteJSONBody defines parameters for GetDiscountQuote.
|
|
type GetDiscountQuoteJSONBody struct {
|
|
Code string `json:"code"`
|
|
PriceId string `json:"priceId"`
|
|
Quantity *int `json:"quantity,omitempty"`
|
|
}
|
|
|
|
// ListOrdersParams defines parameters for ListOrders.
|
|
type ListOrdersParams struct {
|
|
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
|
|
Offset *int `form:"offset,omitempty" json:"offset,omitempty"`
|
|
}
|
|
|
|
// CancelOrderJSONBody defines parameters for CancelOrder.
|
|
type CancelOrderJSONBody struct {
|
|
Status CancelOrderJSONBodyStatus `json:"status"`
|
|
}
|
|
|
|
// CancelOrderJSONBodyStatus defines parameters for CancelOrder.
|
|
type CancelOrderJSONBodyStatus string
|
|
|
|
// ListTeamActivityParams defines parameters for ListTeamActivity.
|
|
type ListTeamActivityParams struct {
|
|
Page *int `form:"page,omitempty" json:"page,omitempty"`
|
|
PageSize *int `form:"pageSize,omitempty" json:"pageSize,omitempty"`
|
|
}
|
|
|
|
// GrantTeamEntitlementJSONBody defines parameters for GrantTeamEntitlement.
|
|
type GrantTeamEntitlementJSONBody struct {
|
|
Bytes int `json:"bytes"`
|
|
ExpiresAt *time.Time `json:"expiresAt,omitempty"`
|
|
Note *string `json:"note,omitempty"`
|
|
ResourceType GrantTeamEntitlementJSONBodyResourceType `json:"resourceType"`
|
|
}
|
|
|
|
// GrantTeamEntitlementJSONBodyResourceType defines parameters for GrantTeamEntitlement.
|
|
type GrantTeamEntitlementJSONBodyResourceType string
|
|
|
|
// UpdateTeamEntitlementJSONBody defines parameters for UpdateTeamEntitlement.
|
|
type UpdateTeamEntitlementJSONBody struct {
|
|
Bytes *int `json:"bytes,omitempty"`
|
|
ExpiresAt *time.Time `json:"expiresAt,omitempty"`
|
|
Note *string `json:"note,omitempty"`
|
|
}
|
|
|
|
// CreateTeamInviteLinkJSONBody defines parameters for CreateTeamInviteLink.
|
|
type CreateTeamInviteLinkJSONBody struct {
|
|
ExpiresIn *int `json:"expiresIn,omitempty"`
|
|
Role *CreateTeamInviteLinkJSONBodyRole `json:"role,omitempty"`
|
|
}
|
|
|
|
// CreateTeamInviteLinkJSONBodyRole defines parameters for CreateTeamInviteLink.
|
|
type CreateTeamInviteLinkJSONBodyRole string
|
|
|
|
// JoinTeamJSONBody defines parameters for JoinTeam.
|
|
type JoinTeamJSONBody struct {
|
|
Token string `json:"token"`
|
|
}
|
|
|
|
// JoinTeam200JSONResponseBodyOk defines parameters for JoinTeam.
|
|
type JoinTeam200JSONResponseBodyOk bool
|
|
|
|
// ListTrashObjectsParams defines parameters for ListTrashObjects.
|
|
type ListTrashObjectsParams struct {
|
|
Page *int `form:"page,omitempty" json:"page,omitempty"`
|
|
PageSize *int `form:"pageSize,omitempty" json:"pageSize,omitempty"`
|
|
}
|
|
|
|
// RestoreObjectJSONBody defines parameters for RestoreObject.
|
|
type RestoreObjectJSONBody struct {
|
|
OnConflict *RestoreObjectJSONBodyOnConflict `json:"onConflict,omitempty"`
|
|
}
|
|
|
|
// RestoreObjectJSONBodyOnConflict defines parameters for RestoreObject.
|
|
type RestoreObjectJSONBodyOnConflict string
|
|
|
|
// GrantUserEntitlementJSONBody defines parameters for GrantUserEntitlement.
|
|
type GrantUserEntitlementJSONBody struct {
|
|
Bytes int `json:"bytes"`
|
|
ExpiresAt *time.Time `json:"expiresAt,omitempty"`
|
|
Note *string `json:"note,omitempty"`
|
|
ResourceType GrantUserEntitlementJSONBodyResourceType `json:"resourceType"`
|
|
}
|
|
|
|
// GrantUserEntitlementJSONBodyResourceType defines parameters for GrantUserEntitlement.
|
|
type GrantUserEntitlementJSONBodyResourceType string
|
|
|
|
// UpdateUserEntitlementJSONBody defines parameters for UpdateUserEntitlement.
|
|
type UpdateUserEntitlementJSONBody struct {
|
|
Bytes *int `json:"bytes,omitempty"`
|
|
ExpiresAt *time.Time `json:"expiresAt,omitempty"`
|
|
Note *string `json:"note,omitempty"`
|
|
}
|
|
|
|
// BanUserJSONRequestBody defines body for BanUser for application/json ContentType.
|
|
type BanUserJSONRequestBody BanUserJSONBody
|
|
|
|
// CreateUserJSONRequestBody defines body for CreateUser for application/json ContentType.
|
|
type CreateUserJSONRequestBody CreateUserJSONBody
|
|
|
|
// PostApiAuthAdminHasPermissionJSONRequestBody defines body for PostApiAuthAdminHasPermission for application/json ContentType.
|
|
type PostApiAuthAdminHasPermissionJSONRequestBody PostApiAuthAdminHasPermissionJSONBody
|
|
|
|
// ImpersonateUserJSONRequestBody defines body for ImpersonateUser for application/json ContentType.
|
|
type ImpersonateUserJSONRequestBody ImpersonateUserJSONBody
|
|
|
|
// AdminListUserSessionsJSONRequestBody defines body for AdminListUserSessions for application/json ContentType.
|
|
type AdminListUserSessionsJSONRequestBody AdminListUserSessionsJSONBody
|
|
|
|
// RemoveUserJSONRequestBody defines body for RemoveUser for application/json ContentType.
|
|
type RemoveUserJSONRequestBody RemoveUserJSONBody
|
|
|
|
// RevokeUserSessionJSONRequestBody defines body for RevokeUserSession for application/json ContentType.
|
|
type RevokeUserSessionJSONRequestBody RevokeUserSessionJSONBody
|
|
|
|
// RevokeUserSessionsJSONRequestBody defines body for RevokeUserSessions for application/json ContentType.
|
|
type RevokeUserSessionsJSONRequestBody RevokeUserSessionsJSONBody
|
|
|
|
// SetUserRoleJSONRequestBody defines body for SetUserRole for application/json ContentType.
|
|
type SetUserRoleJSONRequestBody SetUserRoleJSONBody
|
|
|
|
// SetUserPasswordJSONRequestBody defines body for SetUserPassword for application/json ContentType.
|
|
type SetUserPasswordJSONRequestBody SetUserPasswordJSONBody
|
|
|
|
// UnbanUserJSONRequestBody defines body for UnbanUser for application/json ContentType.
|
|
type UnbanUserJSONRequestBody UnbanUserJSONBody
|
|
|
|
// AdminUpdateUserJSONRequestBody defines body for AdminUpdateUser for application/json ContentType.
|
|
type AdminUpdateUserJSONRequestBody AdminUpdateUserJSONBody
|
|
|
|
// PostApiAuthApiKeyCreateJSONRequestBody defines body for PostApiAuthApiKeyCreate for application/json ContentType.
|
|
type PostApiAuthApiKeyCreateJSONRequestBody PostApiAuthApiKeyCreateJSONBody
|
|
|
|
// PostApiAuthApiKeyDeleteJSONRequestBody defines body for PostApiAuthApiKeyDelete for application/json ContentType.
|
|
type PostApiAuthApiKeyDeleteJSONRequestBody PostApiAuthApiKeyDeleteJSONBody
|
|
|
|
// PostApiAuthApiKeyUpdateJSONRequestBody defines body for PostApiAuthApiKeyUpdate for application/json ContentType.
|
|
type PostApiAuthApiKeyUpdateJSONRequestBody PostApiAuthApiKeyUpdateJSONBody
|
|
|
|
// PostApiAuthCallbackIdJSONRequestBody defines body for PostApiAuthCallbackId for application/json ContentType.
|
|
type PostApiAuthCallbackIdJSONRequestBody = PostApiAuthCallbackIdJSONBody
|
|
|
|
// ChangeEmailJSONRequestBody defines body for ChangeEmail for application/json ContentType.
|
|
type ChangeEmailJSONRequestBody ChangeEmailJSONBody
|
|
|
|
// ChangePasswordJSONRequestBody defines body for ChangePassword for application/json ContentType.
|
|
type ChangePasswordJSONRequestBody ChangePasswordJSONBody
|
|
|
|
// DeleteUserJSONRequestBody defines body for DeleteUser for application/json ContentType.
|
|
type DeleteUserJSONRequestBody DeleteUserJSONBody
|
|
|
|
// PostApiAuthDeviceApproveJSONRequestBody defines body for PostApiAuthDeviceApprove for application/json ContentType.
|
|
type PostApiAuthDeviceApproveJSONRequestBody PostApiAuthDeviceApproveJSONBody
|
|
|
|
// PostApiAuthDeviceCodeJSONRequestBody defines body for PostApiAuthDeviceCode for application/json ContentType.
|
|
type PostApiAuthDeviceCodeJSONRequestBody PostApiAuthDeviceCodeJSONBody
|
|
|
|
// PostApiAuthDeviceDenyJSONRequestBody defines body for PostApiAuthDeviceDeny for application/json ContentType.
|
|
type PostApiAuthDeviceDenyJSONRequestBody PostApiAuthDeviceDenyJSONBody
|
|
|
|
// PostApiAuthDeviceTokenJSONRequestBody defines body for PostApiAuthDeviceToken for application/json ContentType.
|
|
type PostApiAuthDeviceTokenJSONRequestBody PostApiAuthDeviceTokenJSONBody
|
|
|
|
// PostApiAuthGetAccessTokenJSONRequestBody defines body for PostApiAuthGetAccessToken for application/json ContentType.
|
|
type PostApiAuthGetAccessTokenJSONRequestBody PostApiAuthGetAccessTokenJSONBody
|
|
|
|
// GetSessionPostJSONRequestBody defines body for GetSessionPost for application/json ContentType.
|
|
type GetSessionPostJSONRequestBody = GetSessionPostJSONBody
|
|
|
|
// PostApiAuthIsUsernameAvailableJSONRequestBody defines body for PostApiAuthIsUsernameAvailable for application/json ContentType.
|
|
type PostApiAuthIsUsernameAvailableJSONRequestBody PostApiAuthIsUsernameAvailableJSONBody
|
|
|
|
// LinkSocialAccountJSONRequestBody defines body for LinkSocialAccount for application/json ContentType.
|
|
type LinkSocialAccountJSONRequestBody LinkSocialAccountJSONBody
|
|
|
|
// PostApiAuthOauth2LinkJSONRequestBody defines body for PostApiAuthOauth2Link for application/json ContentType.
|
|
type PostApiAuthOauth2LinkJSONRequestBody PostApiAuthOauth2LinkJSONBody
|
|
|
|
// PostApiAuthOrganizationAcceptInvitationJSONRequestBody defines body for PostApiAuthOrganizationAcceptInvitation for application/json ContentType.
|
|
type PostApiAuthOrganizationAcceptInvitationJSONRequestBody PostApiAuthOrganizationAcceptInvitationJSONBody
|
|
|
|
// PostApiAuthOrganizationCancelInvitationJSONRequestBody defines body for PostApiAuthOrganizationCancelInvitation for application/json ContentType.
|
|
type PostApiAuthOrganizationCancelInvitationJSONRequestBody PostApiAuthOrganizationCancelInvitationJSONBody
|
|
|
|
// PostApiAuthOrganizationCheckSlugJSONRequestBody defines body for PostApiAuthOrganizationCheckSlug for application/json ContentType.
|
|
type PostApiAuthOrganizationCheckSlugJSONRequestBody PostApiAuthOrganizationCheckSlugJSONBody
|
|
|
|
// PostApiAuthOrganizationCreateJSONRequestBody defines body for PostApiAuthOrganizationCreate for application/json ContentType.
|
|
type PostApiAuthOrganizationCreateJSONRequestBody PostApiAuthOrganizationCreateJSONBody
|
|
|
|
// PostApiAuthOrganizationDeleteJSONRequestBody defines body for PostApiAuthOrganizationDelete for application/json ContentType.
|
|
type PostApiAuthOrganizationDeleteJSONRequestBody PostApiAuthOrganizationDeleteJSONBody
|
|
|
|
// PostApiAuthOrganizationHasPermissionJSONRequestBody defines body for PostApiAuthOrganizationHasPermission for application/json ContentType.
|
|
type PostApiAuthOrganizationHasPermissionJSONRequestBody PostApiAuthOrganizationHasPermissionJSONBody
|
|
|
|
// CreateOrganizationInvitationJSONRequestBody defines body for CreateOrganizationInvitation for application/json ContentType.
|
|
type CreateOrganizationInvitationJSONRequestBody CreateOrganizationInvitationJSONBody
|
|
|
|
// PostApiAuthOrganizationLeaveJSONRequestBody defines body for PostApiAuthOrganizationLeave for application/json ContentType.
|
|
type PostApiAuthOrganizationLeaveJSONRequestBody PostApiAuthOrganizationLeaveJSONBody
|
|
|
|
// PostApiAuthOrganizationRejectInvitationJSONRequestBody defines body for PostApiAuthOrganizationRejectInvitation for application/json ContentType.
|
|
type PostApiAuthOrganizationRejectInvitationJSONRequestBody PostApiAuthOrganizationRejectInvitationJSONBody
|
|
|
|
// PostApiAuthOrganizationRemoveMemberJSONRequestBody defines body for PostApiAuthOrganizationRemoveMember for application/json ContentType.
|
|
type PostApiAuthOrganizationRemoveMemberJSONRequestBody PostApiAuthOrganizationRemoveMemberJSONBody
|
|
|
|
// SetActiveOrganizationJSONRequestBody defines body for SetActiveOrganization for application/json ContentType.
|
|
type SetActiveOrganizationJSONRequestBody SetActiveOrganizationJSONBody
|
|
|
|
// PostApiAuthOrganizationUpdateJSONRequestBody defines body for PostApiAuthOrganizationUpdate for application/json ContentType.
|
|
type PostApiAuthOrganizationUpdateJSONRequestBody PostApiAuthOrganizationUpdateJSONBody
|
|
|
|
// UpdateOrganizationMemberRoleJSONRequestBody defines body for UpdateOrganizationMemberRole for application/json ContentType.
|
|
type UpdateOrganizationMemberRoleJSONRequestBody UpdateOrganizationMemberRoleJSONBody
|
|
|
|
// PostApiAuthRefreshTokenJSONRequestBody defines body for PostApiAuthRefreshToken for application/json ContentType.
|
|
type PostApiAuthRefreshTokenJSONRequestBody PostApiAuthRefreshTokenJSONBody
|
|
|
|
// RequestPasswordResetJSONRequestBody defines body for RequestPasswordReset for application/json ContentType.
|
|
type RequestPasswordResetJSONRequestBody RequestPasswordResetJSONBody
|
|
|
|
// ResetPasswordJSONRequestBody defines body for ResetPassword for application/json ContentType.
|
|
type ResetPasswordJSONRequestBody ResetPasswordJSONBody
|
|
|
|
// PostApiAuthRevokeOtherSessionsJSONRequestBody defines body for PostApiAuthRevokeOtherSessions for application/json ContentType.
|
|
type PostApiAuthRevokeOtherSessionsJSONRequestBody = PostApiAuthRevokeOtherSessionsJSONBody
|
|
|
|
// PostApiAuthRevokeSessionJSONRequestBody defines body for PostApiAuthRevokeSession for application/json ContentType.
|
|
type PostApiAuthRevokeSessionJSONRequestBody PostApiAuthRevokeSessionJSONBody
|
|
|
|
// PostApiAuthRevokeSessionsJSONRequestBody defines body for PostApiAuthRevokeSessions for application/json ContentType.
|
|
type PostApiAuthRevokeSessionsJSONRequestBody = PostApiAuthRevokeSessionsJSONBody
|
|
|
|
// SendVerificationEmailJSONRequestBody defines body for SendVerificationEmail for application/json ContentType.
|
|
type SendVerificationEmailJSONRequestBody SendVerificationEmailJSONBody
|
|
|
|
// SignInEmailJSONRequestBody defines body for SignInEmail for application/json ContentType.
|
|
type SignInEmailJSONRequestBody SignInEmailJSONBody
|
|
|
|
// PostApiAuthSignInOauth2JSONRequestBody defines body for PostApiAuthSignInOauth2 for application/json ContentType.
|
|
type PostApiAuthSignInOauth2JSONRequestBody PostApiAuthSignInOauth2JSONBody
|
|
|
|
// SocialSignInJSONRequestBody defines body for SocialSignIn for application/json ContentType.
|
|
type SocialSignInJSONRequestBody SocialSignInJSONBody
|
|
|
|
// PostApiAuthSignInUsernameJSONRequestBody defines body for PostApiAuthSignInUsername for application/json ContentType.
|
|
type PostApiAuthSignInUsernameJSONRequestBody PostApiAuthSignInUsernameJSONBody
|
|
|
|
// SignOutJSONRequestBody defines body for SignOut for application/json ContentType.
|
|
type SignOutJSONRequestBody = SignOutJSONBody
|
|
|
|
// SignUpWithEmailAndPasswordJSONRequestBody defines body for SignUpWithEmailAndPassword for application/json ContentType.
|
|
type SignUpWithEmailAndPasswordJSONRequestBody SignUpWithEmailAndPasswordJSONBody
|
|
|
|
// PostApiAuthUnlinkAccountJSONRequestBody defines body for PostApiAuthUnlinkAccount for application/json ContentType.
|
|
type PostApiAuthUnlinkAccountJSONRequestBody PostApiAuthUnlinkAccountJSONBody
|
|
|
|
// UpdateSessionJSONRequestBody defines body for UpdateSession for application/json ContentType.
|
|
type UpdateSessionJSONRequestBody = UpdateSessionJSONBody
|
|
|
|
// UpdateUserJSONRequestBody defines body for UpdateUser for application/json ContentType.
|
|
type UpdateUserJSONRequestBody UpdateUserJSONBody
|
|
|
|
// VerifyPasswordJSONRequestBody defines body for VerifyPassword for application/json ContentType.
|
|
type VerifyPasswordJSONRequestBody VerifyPasswordJSONBody
|
|
|
|
// CreateBackgroundJobJSONRequestBody defines body for CreateBackgroundJob for application/json ContentType.
|
|
type CreateBackgroundJobJSONRequestBody CreateBackgroundJobJSONBody
|
|
|
|
// CancelBackgroundJobJSONRequestBody defines body for CancelBackgroundJob for application/json ContentType.
|
|
type CancelBackgroundJobJSONRequestBody CancelBackgroundJobJSONBody
|
|
|
|
// CreateDownloaderJSONRequestBody defines body for CreateDownloader for application/json ContentType.
|
|
type CreateDownloaderJSONRequestBody CreateDownloaderJSONBody
|
|
|
|
// RecordDownloaderHeartbeatJSONRequestBody defines body for RecordDownloaderHeartbeat for application/json ContentType.
|
|
type RecordDownloaderHeartbeatJSONRequestBody RecordDownloaderHeartbeatJSONBody
|
|
|
|
// UpdateDownloaderJSONRequestBody defines body for UpdateDownloader for application/json ContentType.
|
|
type UpdateDownloaderJSONRequestBody UpdateDownloaderJSONBody
|
|
|
|
// CreateDownloadTaskJSONRequestBody defines body for CreateDownloadTask for application/json ContentType.
|
|
type CreateDownloadTaskJSONRequestBody CreateDownloadTaskJSONBody
|
|
|
|
// UpdateDownloadTaskJSONRequestBody defines body for UpdateDownloadTask for application/json ContentType.
|
|
type UpdateDownloadTaskJSONRequestBody UpdateDownloadTaskJSONBody
|
|
|
|
// RetryDownloadTaskJSONRequestBody defines body for RetryDownloadTask for application/json ContentType.
|
|
type RetryDownloadTaskJSONRequestBody RetryDownloadTaskJSONBody
|
|
|
|
// SetDownloadTaskStatusJSONRequestBody defines body for SetDownloadTaskStatus for application/json ContentType.
|
|
type SetDownloadTaskStatusJSONRequestBody SetDownloadTaskStatusJSONBody
|
|
|
|
// UpdateImageHostingConfigJSONRequestBody defines body for UpdateImageHostingConfig for application/json ContentType.
|
|
type UpdateImageHostingConfigJSONRequestBody UpdateImageHostingConfigJSONBody
|
|
|
|
// PresignImageHostingUploadJSONRequestBody defines body for PresignImageHostingUpload for application/json ContentType.
|
|
type PresignImageHostingUploadJSONRequestBody PresignImageHostingUploadJSONBody
|
|
|
|
// CreateObjectJSONRequestBody defines body for CreateObject for application/json ContentType.
|
|
type CreateObjectJSONRequestBody CreateObjectJSONBody
|
|
|
|
// UpdateObjectJSONRequestBody defines body for UpdateObject for application/json ContentType.
|
|
type UpdateObjectJSONRequestBody UpdateObjectJSONBody
|
|
|
|
// CopyObjectJSONRequestBody defines body for CopyObject for application/json ContentType.
|
|
type CopyObjectJSONRequestBody CopyObjectJSONBody
|
|
|
|
// TransferObjectJSONRequestBody defines body for TransferObject for application/json ContentType.
|
|
type TransferObjectJSONRequestBody TransferObjectJSONBody
|
|
|
|
// CompleteObjectUploadJSONRequestBody defines body for CompleteObjectUpload for application/json ContentType.
|
|
type CompleteObjectUploadJSONRequestBody CompleteObjectUploadJSONBody
|
|
|
|
// PresignObjectUploadPartsJSONRequestBody defines body for PresignObjectUploadParts for application/json ContentType.
|
|
type PresignObjectUploadPartsJSONRequestBody PresignObjectUploadPartsJSONBody
|
|
|
|
// CreateShareJSONRequestBody defines body for CreateShare for application/json ContentType.
|
|
type CreateShareJSONRequestBody CreateShareJSONBody
|
|
|
|
// SaveShareJSONRequestBody defines body for SaveShare for application/json ContentType.
|
|
type SaveShareJSONRequestBody SaveShareJSONBody
|
|
|
|
// VerifySharePasswordJSONRequestBody defines body for VerifySharePassword for application/json ContentType.
|
|
type VerifySharePasswordJSONRequestBody VerifySharePasswordJSONBody
|
|
|
|
// RevokeShareJSONRequestBody defines body for RevokeShare for application/json ContentType.
|
|
type RevokeShareJSONRequestBody RevokeShareJSONBody
|
|
|
|
// CreateAnnouncementJSONRequestBody defines body for CreateAnnouncement for application/json ContentType.
|
|
type CreateAnnouncementJSONRequestBody CreateAnnouncementJSONBody
|
|
|
|
// UpdateAnnouncementJSONRequestBody defines body for UpdateAnnouncement for application/json ContentType.
|
|
type UpdateAnnouncementJSONRequestBody UpdateAnnouncementJSONBody
|
|
|
|
// UpsertAuthProviderJSONRequestBody defines body for UpsertAuthProvider for application/json ContentType.
|
|
type UpsertAuthProviderJSONRequestBody UpsertAuthProviderJSONBody
|
|
|
|
// SaveEmailConfigJSONRequestBody defines body for SaveEmailConfig for application/json ContentType.
|
|
type SaveEmailConfigJSONRequestBody SaveEmailConfigJSONBody
|
|
|
|
// SendTestEmailJSONRequestBody defines body for SendTestEmail for application/json ContentType.
|
|
type SendTestEmailJSONRequestBody SendTestEmailJSONBody
|
|
|
|
// CreateSiteInvitationJSONRequestBody defines body for CreateSiteInvitation for application/json ContentType.
|
|
type CreateSiteInvitationJSONRequestBody CreateSiteInvitationJSONBody
|
|
|
|
// GenerateInviteCodesJSONRequestBody defines body for GenerateInviteCodes for application/json ContentType.
|
|
type GenerateInviteCodesJSONRequestBody GenerateInviteCodesJSONBody
|
|
|
|
// ValidateInviteCodeJSONRequestBody defines body for ValidateInviteCode for application/json ContentType.
|
|
type ValidateInviteCodeJSONRequestBody ValidateInviteCodeJSONBody
|
|
|
|
// SetSystemOptionJSONRequestBody defines body for SetSystemOption for application/json ContentType.
|
|
type SetSystemOptionJSONRequestBody SetSystemOptionJSONBody
|
|
|
|
// CreateStorageJSONRequestBody defines body for CreateStorage for application/json ContentType.
|
|
type CreateStorageJSONRequestBody CreateStorageJSONBody
|
|
|
|
// UpdateStorageJSONRequestBody defines body for UpdateStorage for application/json ContentType.
|
|
type UpdateStorageJSONRequestBody UpdateStorageJSONBody
|
|
|
|
// CreateCheckoutJSONRequestBody defines body for CreateCheckout for application/json ContentType.
|
|
type CreateCheckoutJSONRequestBody CreateCheckoutJSONBody
|
|
|
|
// RedeemGiftCardJSONRequestBody defines body for RedeemGiftCard for application/json ContentType.
|
|
type RedeemGiftCardJSONRequestBody RedeemGiftCardJSONBody
|
|
|
|
// GetDiscountQuoteJSONRequestBody defines body for GetDiscountQuote for application/json ContentType.
|
|
type GetDiscountQuoteJSONRequestBody GetDiscountQuoteJSONBody
|
|
|
|
// CancelOrderJSONRequestBody defines body for CancelOrder for application/json ContentType.
|
|
type CancelOrderJSONRequestBody CancelOrderJSONBody
|
|
|
|
// GrantTeamEntitlementJSONRequestBody defines body for GrantTeamEntitlement for application/json ContentType.
|
|
type GrantTeamEntitlementJSONRequestBody GrantTeamEntitlementJSONBody
|
|
|
|
// UpdateTeamEntitlementJSONRequestBody defines body for UpdateTeamEntitlement for application/json ContentType.
|
|
type UpdateTeamEntitlementJSONRequestBody UpdateTeamEntitlementJSONBody
|
|
|
|
// CreateTeamInviteLinkJSONRequestBody defines body for CreateTeamInviteLink for application/json ContentType.
|
|
type CreateTeamInviteLinkJSONRequestBody CreateTeamInviteLinkJSONBody
|
|
|
|
// JoinTeamJSONRequestBody defines body for JoinTeam for application/json ContentType.
|
|
type JoinTeamJSONRequestBody JoinTeamJSONBody
|
|
|
|
// RestoreObjectJSONRequestBody defines body for RestoreObject for application/json ContentType.
|
|
type RestoreObjectJSONRequestBody RestoreObjectJSONBody
|
|
|
|
// GrantUserEntitlementJSONRequestBody defines body for GrantUserEntitlement for application/json ContentType.
|
|
type GrantUserEntitlementJSONRequestBody GrantUserEntitlementJSONBody
|
|
|
|
// UpdateUserEntitlementJSONRequestBody defines body for UpdateUserEntitlement for application/json ContentType.
|
|
type UpdateUserEntitlementJSONRequestBody UpdateUserEntitlementJSONBody
|
|
|
|
// AsCreateBackgroundJobJSONBody0 returns the union data inside the CreateBackgroundJobJSONBody as a CreateBackgroundJobJSONBody0
|
|
func (t CreateBackgroundJobJSONBody) AsCreateBackgroundJobJSONBody0() (CreateBackgroundJobJSONBody0, error) {
|
|
var body CreateBackgroundJobJSONBody0
|
|
err := json.Unmarshal(t.union, &body)
|
|
return body, err
|
|
}
|
|
|
|
// FromCreateBackgroundJobJSONBody0 overwrites any union data inside the CreateBackgroundJobJSONBody as the provided CreateBackgroundJobJSONBody0
|
|
func (t *CreateBackgroundJobJSONBody) FromCreateBackgroundJobJSONBody0(v CreateBackgroundJobJSONBody0) error {
|
|
b, err := json.Marshal(v)
|
|
t.union = b
|
|
return err
|
|
}
|
|
|
|
// MergeCreateBackgroundJobJSONBody0 performs a merge with any union data inside the CreateBackgroundJobJSONBody, using the provided CreateBackgroundJobJSONBody0
|
|
func (t *CreateBackgroundJobJSONBody) MergeCreateBackgroundJobJSONBody0(v CreateBackgroundJobJSONBody0) error {
|
|
b, err := json.Marshal(v)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
merged, err := runtime.JSONMerge(t.union, b)
|
|
t.union = merged
|
|
return err
|
|
}
|
|
|
|
// AsCreateBackgroundJobJSONBody1 returns the union data inside the CreateBackgroundJobJSONBody as a CreateBackgroundJobJSONBody1
|
|
func (t CreateBackgroundJobJSONBody) AsCreateBackgroundJobJSONBody1() (CreateBackgroundJobJSONBody1, error) {
|
|
var body CreateBackgroundJobJSONBody1
|
|
err := json.Unmarshal(t.union, &body)
|
|
return body, err
|
|
}
|
|
|
|
// FromCreateBackgroundJobJSONBody1 overwrites any union data inside the CreateBackgroundJobJSONBody as the provided CreateBackgroundJobJSONBody1
|
|
func (t *CreateBackgroundJobJSONBody) FromCreateBackgroundJobJSONBody1(v CreateBackgroundJobJSONBody1) error {
|
|
b, err := json.Marshal(v)
|
|
t.union = b
|
|
return err
|
|
}
|
|
|
|
// MergeCreateBackgroundJobJSONBody1 performs a merge with any union data inside the CreateBackgroundJobJSONBody, using the provided CreateBackgroundJobJSONBody1
|
|
func (t *CreateBackgroundJobJSONBody) MergeCreateBackgroundJobJSONBody1(v CreateBackgroundJobJSONBody1) error {
|
|
b, err := json.Marshal(v)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
merged, err := runtime.JSONMerge(t.union, b)
|
|
t.union = merged
|
|
return err
|
|
}
|
|
|
|
func (t CreateBackgroundJobJSONBody) MarshalJSON() ([]byte, error) {
|
|
b, err := t.union.MarshalJSON()
|
|
return b, err
|
|
}
|
|
|
|
func (t *CreateBackgroundJobJSONBody) UnmarshalJSON(b []byte) error {
|
|
err := t.union.UnmarshalJSON(b)
|
|
return err
|
|
}
|
|
|
|
// AsSaveEmailConfigJSONBody0 returns the union data inside the SaveEmailConfigJSONBody as a SaveEmailConfigJSONBody0
|
|
func (t SaveEmailConfigJSONBody) AsSaveEmailConfigJSONBody0() (SaveEmailConfigJSONBody0, error) {
|
|
var body SaveEmailConfigJSONBody0
|
|
err := json.Unmarshal(t.union, &body)
|
|
return body, err
|
|
}
|
|
|
|
// FromSaveEmailConfigJSONBody0 overwrites any union data inside the SaveEmailConfigJSONBody as the provided SaveEmailConfigJSONBody0
|
|
func (t *SaveEmailConfigJSONBody) FromSaveEmailConfigJSONBody0(v SaveEmailConfigJSONBody0) error {
|
|
b, err := json.Marshal(v)
|
|
t.union = b
|
|
return err
|
|
}
|
|
|
|
// MergeSaveEmailConfigJSONBody0 performs a merge with any union data inside the SaveEmailConfigJSONBody, using the provided SaveEmailConfigJSONBody0
|
|
func (t *SaveEmailConfigJSONBody) MergeSaveEmailConfigJSONBody0(v SaveEmailConfigJSONBody0) error {
|
|
b, err := json.Marshal(v)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
merged, err := runtime.JSONMerge(t.union, b)
|
|
t.union = merged
|
|
return err
|
|
}
|
|
|
|
// AsSaveEmailConfigJSONBody1 returns the union data inside the SaveEmailConfigJSONBody as a SaveEmailConfigJSONBody1
|
|
func (t SaveEmailConfigJSONBody) AsSaveEmailConfigJSONBody1() (SaveEmailConfigJSONBody1, error) {
|
|
var body SaveEmailConfigJSONBody1
|
|
err := json.Unmarshal(t.union, &body)
|
|
return body, err
|
|
}
|
|
|
|
// FromSaveEmailConfigJSONBody1 overwrites any union data inside the SaveEmailConfigJSONBody as the provided SaveEmailConfigJSONBody1
|
|
func (t *SaveEmailConfigJSONBody) FromSaveEmailConfigJSONBody1(v SaveEmailConfigJSONBody1) error {
|
|
b, err := json.Marshal(v)
|
|
t.union = b
|
|
return err
|
|
}
|
|
|
|
// MergeSaveEmailConfigJSONBody1 performs a merge with any union data inside the SaveEmailConfigJSONBody, using the provided SaveEmailConfigJSONBody1
|
|
func (t *SaveEmailConfigJSONBody) MergeSaveEmailConfigJSONBody1(v SaveEmailConfigJSONBody1) error {
|
|
b, err := json.Marshal(v)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
merged, err := runtime.JSONMerge(t.union, b)
|
|
t.union = merged
|
|
return err
|
|
}
|
|
|
|
// AsSaveEmailConfigJSONBody2 returns the union data inside the SaveEmailConfigJSONBody as a SaveEmailConfigJSONBody2
|
|
func (t SaveEmailConfigJSONBody) AsSaveEmailConfigJSONBody2() (SaveEmailConfigJSONBody2, error) {
|
|
var body SaveEmailConfigJSONBody2
|
|
err := json.Unmarshal(t.union, &body)
|
|
return body, err
|
|
}
|
|
|
|
// FromSaveEmailConfigJSONBody2 overwrites any union data inside the SaveEmailConfigJSONBody as the provided SaveEmailConfigJSONBody2
|
|
func (t *SaveEmailConfigJSONBody) FromSaveEmailConfigJSONBody2(v SaveEmailConfigJSONBody2) error {
|
|
b, err := json.Marshal(v)
|
|
t.union = b
|
|
return err
|
|
}
|
|
|
|
// MergeSaveEmailConfigJSONBody2 performs a merge with any union data inside the SaveEmailConfigJSONBody, using the provided SaveEmailConfigJSONBody2
|
|
func (t *SaveEmailConfigJSONBody) MergeSaveEmailConfigJSONBody2(v SaveEmailConfigJSONBody2) error {
|
|
b, err := json.Marshal(v)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
merged, err := runtime.JSONMerge(t.union, b)
|
|
t.union = merged
|
|
return err
|
|
}
|
|
|
|
func (t SaveEmailConfigJSONBody) MarshalJSON() ([]byte, error) {
|
|
b, err := t.union.MarshalJSON()
|
|
return b, err
|
|
}
|
|
|
|
func (t *SaveEmailConfigJSONBody) UnmarshalJSON(b []byte) error {
|
|
err := t.union.UnmarshalJSON(b)
|
|
return err
|
|
}
|
|
|
|
// 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 {
|
|
// GetApiAuthAccountInfo request
|
|
GetApiAuthAccountInfo(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// BanUserWithBody request with any body
|
|
BanUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
BanUser(ctx context.Context, body BanUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// CreateUserWithBody request with any body
|
|
CreateUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
CreateUser(ctx context.Context, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetUser request
|
|
GetUser(ctx context.Context, params *GetUserParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PostApiAuthAdminHasPermissionWithBody request with any body
|
|
PostApiAuthAdminHasPermissionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
PostApiAuthAdminHasPermission(ctx context.Context, body PostApiAuthAdminHasPermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ImpersonateUserWithBody request with any body
|
|
ImpersonateUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
ImpersonateUser(ctx context.Context, body ImpersonateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// AdminListUserSessionsWithBody request with any body
|
|
AdminListUserSessionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
AdminListUserSessions(ctx context.Context, body AdminListUserSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListUsers request
|
|
ListUsers(ctx context.Context, params *ListUsersParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// RemoveUserWithBody request with any body
|
|
RemoveUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
RemoveUser(ctx context.Context, body RemoveUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// RevokeUserSessionWithBody request with any body
|
|
RevokeUserSessionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
RevokeUserSession(ctx context.Context, body RevokeUserSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// RevokeUserSessionsWithBody request with any body
|
|
RevokeUserSessionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
RevokeUserSessions(ctx context.Context, body RevokeUserSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// SetUserRoleWithBody request with any body
|
|
SetUserRoleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
SetUserRole(ctx context.Context, body SetUserRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// SetUserPasswordWithBody request with any body
|
|
SetUserPasswordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
SetUserPassword(ctx context.Context, body SetUserPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PostApiAuthAdminStopImpersonating request
|
|
PostApiAuthAdminStopImpersonating(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// UnbanUserWithBody request with any body
|
|
UnbanUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
UnbanUser(ctx context.Context, body UnbanUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// AdminUpdateUserWithBody request with any body
|
|
AdminUpdateUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
AdminUpdateUser(ctx context.Context, body AdminUpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PostApiAuthApiKeyCreateWithBody request with any body
|
|
PostApiAuthApiKeyCreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
PostApiAuthApiKeyCreate(ctx context.Context, body PostApiAuthApiKeyCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PostApiAuthApiKeyDeleteWithBody request with any body
|
|
PostApiAuthApiKeyDeleteWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
PostApiAuthApiKeyDelete(ctx context.Context, body PostApiAuthApiKeyDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetApiAuthApiKeyGet request
|
|
GetApiAuthApiKeyGet(ctx context.Context, params *GetApiAuthApiKeyGetParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetApiAuthApiKeyList request
|
|
GetApiAuthApiKeyList(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PostApiAuthApiKeyUpdateWithBody request with any body
|
|
PostApiAuthApiKeyUpdateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
PostApiAuthApiKeyUpdate(ctx context.Context, body PostApiAuthApiKeyUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetApiAuthCallbackId request
|
|
GetApiAuthCallbackId(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PostApiAuthCallbackIdWithBody request with any body
|
|
PostApiAuthCallbackIdWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
PostApiAuthCallbackId(ctx context.Context, id string, body PostApiAuthCallbackIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ChangeEmailWithBody request with any body
|
|
ChangeEmailWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
ChangeEmail(ctx context.Context, body ChangeEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ChangePasswordWithBody request with any body
|
|
ChangePasswordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
ChangePassword(ctx context.Context, body ChangePasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// DeleteUserWithBody request with any body
|
|
DeleteUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
DeleteUser(ctx context.Context, body DeleteUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetApiAuthDeleteUserCallback request
|
|
GetApiAuthDeleteUserCallback(ctx context.Context, params *GetApiAuthDeleteUserCallbackParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetApiAuthDevice request
|
|
GetApiAuthDevice(ctx context.Context, params *GetApiAuthDeviceParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PostApiAuthDeviceApproveWithBody request with any body
|
|
PostApiAuthDeviceApproveWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
PostApiAuthDeviceApprove(ctx context.Context, body PostApiAuthDeviceApproveJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PostApiAuthDeviceCodeWithBody request with any body
|
|
PostApiAuthDeviceCodeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
PostApiAuthDeviceCode(ctx context.Context, body PostApiAuthDeviceCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PostApiAuthDeviceDenyWithBody request with any body
|
|
PostApiAuthDeviceDenyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
PostApiAuthDeviceDeny(ctx context.Context, body PostApiAuthDeviceDenyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PostApiAuthDeviceTokenWithBody request with any body
|
|
PostApiAuthDeviceTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
PostApiAuthDeviceToken(ctx context.Context, body PostApiAuthDeviceTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetApiAuthError request
|
|
GetApiAuthError(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PostApiAuthGetAccessTokenWithBody request with any body
|
|
PostApiAuthGetAccessTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
PostApiAuthGetAccessToken(ctx context.Context, body PostApiAuthGetAccessTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetSession request
|
|
GetSession(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetSessionPostWithBody request with any body
|
|
GetSessionPostWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
GetSessionPost(ctx context.Context, body GetSessionPostJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PostApiAuthIsUsernameAvailableWithBody request with any body
|
|
PostApiAuthIsUsernameAvailableWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
PostApiAuthIsUsernameAvailable(ctx context.Context, body PostApiAuthIsUsernameAvailableJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// LinkSocialAccountWithBody request with any body
|
|
LinkSocialAccountWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
LinkSocialAccount(ctx context.Context, body LinkSocialAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListUserAccounts request
|
|
ListUserAccounts(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListUserSessions request
|
|
ListUserSessions(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetApiAuthOauth2CallbackProviderId request
|
|
GetApiAuthOauth2CallbackProviderId(ctx context.Context, providerId string, params *GetApiAuthOauth2CallbackProviderIdParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PostApiAuthOauth2LinkWithBody request with any body
|
|
PostApiAuthOauth2LinkWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
PostApiAuthOauth2Link(ctx context.Context, body PostApiAuthOauth2LinkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetApiAuthOk request
|
|
GetApiAuthOk(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PostApiAuthOrganizationAcceptInvitationWithBody request with any body
|
|
PostApiAuthOrganizationAcceptInvitationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
PostApiAuthOrganizationAcceptInvitation(ctx context.Context, body PostApiAuthOrganizationAcceptInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PostApiAuthOrganizationCancelInvitationWithBody request with any body
|
|
PostApiAuthOrganizationCancelInvitationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
PostApiAuthOrganizationCancelInvitation(ctx context.Context, body PostApiAuthOrganizationCancelInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PostApiAuthOrganizationCheckSlugWithBody request with any body
|
|
PostApiAuthOrganizationCheckSlugWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
PostApiAuthOrganizationCheckSlug(ctx context.Context, body PostApiAuthOrganizationCheckSlugJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PostApiAuthOrganizationCreateWithBody request with any body
|
|
PostApiAuthOrganizationCreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
PostApiAuthOrganizationCreate(ctx context.Context, body PostApiAuthOrganizationCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PostApiAuthOrganizationDeleteWithBody request with any body
|
|
PostApiAuthOrganizationDeleteWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
PostApiAuthOrganizationDelete(ctx context.Context, body PostApiAuthOrganizationDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetApiAuthOrganizationGetActiveMember request
|
|
GetApiAuthOrganizationGetActiveMember(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetApiAuthOrganizationGetActiveMemberRole request
|
|
GetApiAuthOrganizationGetActiveMemberRole(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetOrganization request
|
|
GetOrganization(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetApiAuthOrganizationGetInvitation request
|
|
GetApiAuthOrganizationGetInvitation(ctx context.Context, params *GetApiAuthOrganizationGetInvitationParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PostApiAuthOrganizationHasPermissionWithBody request with any body
|
|
PostApiAuthOrganizationHasPermissionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
PostApiAuthOrganizationHasPermission(ctx context.Context, body PostApiAuthOrganizationHasPermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// CreateOrganizationInvitationWithBody request with any body
|
|
CreateOrganizationInvitationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
CreateOrganizationInvitation(ctx context.Context, body CreateOrganizationInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PostApiAuthOrganizationLeaveWithBody request with any body
|
|
PostApiAuthOrganizationLeaveWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
PostApiAuthOrganizationLeave(ctx context.Context, body PostApiAuthOrganizationLeaveJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetApiAuthOrganizationList request
|
|
GetApiAuthOrganizationList(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetApiAuthOrganizationListInvitations request
|
|
GetApiAuthOrganizationListInvitations(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetApiAuthOrganizationListMembers request
|
|
GetApiAuthOrganizationListMembers(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetApiAuthOrganizationListUserInvitations request
|
|
GetApiAuthOrganizationListUserInvitations(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PostApiAuthOrganizationRejectInvitationWithBody request with any body
|
|
PostApiAuthOrganizationRejectInvitationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
PostApiAuthOrganizationRejectInvitation(ctx context.Context, body PostApiAuthOrganizationRejectInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PostApiAuthOrganizationRemoveMemberWithBody request with any body
|
|
PostApiAuthOrganizationRemoveMemberWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
PostApiAuthOrganizationRemoveMember(ctx context.Context, body PostApiAuthOrganizationRemoveMemberJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// SetActiveOrganizationWithBody request with any body
|
|
SetActiveOrganizationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
SetActiveOrganization(ctx context.Context, body SetActiveOrganizationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PostApiAuthOrganizationUpdateWithBody request with any body
|
|
PostApiAuthOrganizationUpdateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
PostApiAuthOrganizationUpdate(ctx context.Context, body PostApiAuthOrganizationUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// UpdateOrganizationMemberRoleWithBody request with any body
|
|
UpdateOrganizationMemberRoleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
UpdateOrganizationMemberRole(ctx context.Context, body UpdateOrganizationMemberRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PostApiAuthRefreshTokenWithBody request with any body
|
|
PostApiAuthRefreshTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
PostApiAuthRefreshToken(ctx context.Context, body PostApiAuthRefreshTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// RequestPasswordResetWithBody request with any body
|
|
RequestPasswordResetWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
RequestPasswordReset(ctx context.Context, body RequestPasswordResetJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ResetPasswordWithBody request with any body
|
|
ResetPasswordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
ResetPassword(ctx context.Context, body ResetPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ResetPasswordCallback request
|
|
ResetPasswordCallback(ctx context.Context, token string, params *ResetPasswordCallbackParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PostApiAuthRevokeOtherSessionsWithBody request with any body
|
|
PostApiAuthRevokeOtherSessionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
PostApiAuthRevokeOtherSessions(ctx context.Context, body PostApiAuthRevokeOtherSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PostApiAuthRevokeSessionWithBody request with any body
|
|
PostApiAuthRevokeSessionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
PostApiAuthRevokeSession(ctx context.Context, body PostApiAuthRevokeSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PostApiAuthRevokeSessionsWithBody request with any body
|
|
PostApiAuthRevokeSessionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
PostApiAuthRevokeSessions(ctx context.Context, body PostApiAuthRevokeSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// SendVerificationEmailWithBody request with any body
|
|
SendVerificationEmailWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
SendVerificationEmail(ctx context.Context, body SendVerificationEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// SignInEmailWithBody request with any body
|
|
SignInEmailWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
SignInEmail(ctx context.Context, body SignInEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PostApiAuthSignInOauth2WithBody request with any body
|
|
PostApiAuthSignInOauth2WithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
PostApiAuthSignInOauth2(ctx context.Context, body PostApiAuthSignInOauth2JSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// SocialSignInWithBody request with any body
|
|
SocialSignInWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
SocialSignIn(ctx context.Context, body SocialSignInJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PostApiAuthSignInUsernameWithBody request with any body
|
|
PostApiAuthSignInUsernameWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
PostApiAuthSignInUsername(ctx context.Context, body PostApiAuthSignInUsernameJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// SignOutWithBody request with any body
|
|
SignOutWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
SignOut(ctx context.Context, body SignOutJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// SignUpWithEmailAndPasswordWithBody request with any body
|
|
SignUpWithEmailAndPasswordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
SignUpWithEmailAndPassword(ctx context.Context, body SignUpWithEmailAndPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PostApiAuthUnlinkAccountWithBody request with any body
|
|
PostApiAuthUnlinkAccountWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
PostApiAuthUnlinkAccount(ctx context.Context, body PostApiAuthUnlinkAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// UpdateSessionWithBody request with any body
|
|
UpdateSessionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
UpdateSession(ctx context.Context, body UpdateSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// UpdateUserWithBody request with any body
|
|
UpdateUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
UpdateUser(ctx context.Context, body UpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetApiAuthVerifyEmail request
|
|
GetApiAuthVerifyEmail(ctx context.Context, params *GetApiAuthVerifyEmailParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// VerifyPasswordWithBody request with any body
|
|
VerifyPasswordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
VerifyPassword(ctx context.Context, body VerifyPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListBackgroundJobs request
|
|
ListBackgroundJobs(ctx context.Context, params *ListBackgroundJobsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// CreateBackgroundJobWithBody request with any body
|
|
CreateBackgroundJobWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
CreateBackgroundJob(ctx context.Context, body CreateBackgroundJobJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetBackgroundJob request
|
|
GetBackgroundJob(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// RetryBackgroundJob request
|
|
RetryBackgroundJob(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// CancelBackgroundJobWithBody request with any body
|
|
CancelBackgroundJobWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
CancelBackgroundJob(ctx context.Context, id string, body CancelBackgroundJobJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListDownloaders request
|
|
ListDownloaders(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// CreateDownloaderWithBody request with any body
|
|
CreateDownloaderWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
CreateDownloader(ctx context.Context, body CreateDownloaderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// RecordDownloaderHeartbeatWithBody request with any body
|
|
RecordDownloaderHeartbeatWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
RecordDownloaderHeartbeat(ctx context.Context, body RecordDownloaderHeartbeatJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// DeleteDownloader request
|
|
DeleteDownloader(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// UpdateDownloaderWithBody request with any body
|
|
UpdateDownloaderWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
UpdateDownloader(ctx context.Context, id string, body UpdateDownloaderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListDownloadTasks request
|
|
ListDownloadTasks(ctx context.Context, params *ListDownloadTasksParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// CreateDownloadTaskWithBody request with any body
|
|
CreateDownloadTaskWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
CreateDownloadTask(ctx context.Context, body CreateDownloadTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// DeleteDownloadTask request
|
|
DeleteDownloadTask(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetDownloadTask request
|
|
GetDownloadTask(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// UpdateDownloadTaskWithBody request with any body
|
|
UpdateDownloadTaskWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
UpdateDownloadTask(ctx context.Context, id string, body UpdateDownloadTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// RetryDownloadTaskWithBody request with any body
|
|
RetryDownloadTaskWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
RetryDownloadTask(ctx context.Context, id string, body RetryDownloadTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// SetDownloadTaskStatusWithBody request with any body
|
|
SetDownloadTaskStatusWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
SetDownloadTaskStatus(ctx context.Context, id string, body SetDownloadTaskStatusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// StreamEvents request
|
|
StreamEvents(ctx context.Context, params *StreamEventsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// DeleteImageHostingConfig request
|
|
DeleteImageHostingConfig(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetImageHostingConfig request
|
|
GetImageHostingConfig(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// UpdateImageHostingConfigWithBody request with any body
|
|
UpdateImageHostingConfigWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
UpdateImageHostingConfig(ctx context.Context, body UpdateImageHostingConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListImageHostings request
|
|
ListImageHostings(ctx context.Context, params *ListImageHostingsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PresignImageHostingUploadWithBody request with any body
|
|
PresignImageHostingUploadWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
PresignImageHostingUpload(ctx context.Context, body PresignImageHostingUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// DeleteImageHosting request
|
|
DeleteImageHosting(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetImageHosting request
|
|
GetImageHosting(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ConfirmImageHosting request
|
|
ConfirmImageHosting(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListNotifications request
|
|
ListNotifications(ctx context.Context, params *ListNotificationsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// MarkAllNotificationsRead request
|
|
MarkAllNotificationsRead(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetNotificationStats request
|
|
GetNotificationStats(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// MarkNotificationRead request
|
|
MarkNotificationRead(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListObjects request
|
|
ListObjects(ctx context.Context, params *ListObjectsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// CreateObjectWithBody request with any body
|
|
CreateObjectWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
CreateObject(ctx context.Context, body CreateObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// DeleteObject request
|
|
DeleteObject(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetObject request
|
|
GetObject(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// UpdateObjectWithBody request with any body
|
|
UpdateObjectWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
UpdateObject(ctx context.Context, id string, body UpdateObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// CopyObjectWithBody request with any body
|
|
CopyObjectWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
CopyObject(ctx context.Context, id string, body CopyObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// TransferObjectWithBody request with any body
|
|
TransferObjectWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
TransferObject(ctx context.Context, id string, body TransferObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// AbortObjectUpload request
|
|
AbortObjectUpload(ctx context.Context, id string, uploadSessionId string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// CompleteObjectUploadWithBody request with any body
|
|
CompleteObjectUploadWithBody(ctx context.Context, id string, uploadSessionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
CompleteObjectUpload(ctx context.Context, id string, uploadSessionId string, body CompleteObjectUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PresignObjectUploadPartsWithBody request with any body
|
|
PresignObjectUploadPartsWithBody(ctx context.Context, id string, uploadSessionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
PresignObjectUploadParts(ctx context.Context, id string, uploadSessionId string, body PresignObjectUploadPartsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListQuotaOverview request
|
|
ListQuotaOverview(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetMyQuota request
|
|
GetMyQuota(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListShares request
|
|
ListShares(ctx context.Context, params *ListSharesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// CreateShareWithBody request with any body
|
|
CreateShareWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
CreateShare(ctx context.Context, body CreateShareJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetShare request
|
|
GetShare(ctx context.Context, token string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListShareObjects request
|
|
ListShareObjects(ctx context.Context, token string, params *ListShareObjectsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// SaveShareWithBody request with any body
|
|
SaveShareWithBody(ctx context.Context, token string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
SaveShare(ctx context.Context, token string, body SaveShareJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// VerifySharePasswordWithBody request with any body
|
|
VerifySharePasswordWithBody(ctx context.Context, token string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
VerifySharePassword(ctx context.Context, token string, body VerifySharePasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// RevokeShareWithBody request with any body
|
|
RevokeShareWithBody(ctx context.Context, token string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
RevokeShare(ctx context.Context, token string, body RevokeShareJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListAnnouncements request
|
|
ListAnnouncements(ctx context.Context, params *ListAnnouncementsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// CreateAnnouncementWithBody request with any body
|
|
CreateAnnouncementWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
CreateAnnouncement(ctx context.Context, body CreateAnnouncementJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// DeleteAnnouncement request
|
|
DeleteAnnouncement(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetAnnouncement request
|
|
GetAnnouncement(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// UpdateAnnouncementWithBody request with any body
|
|
UpdateAnnouncementWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
UpdateAnnouncement(ctx context.Context, id string, body UpdateAnnouncementJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListAuditEvents request
|
|
ListAuditEvents(ctx context.Context, params *ListAuditEventsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListAuthProviders request
|
|
ListAuthProviders(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// DeleteAuthProvider request
|
|
DeleteAuthProvider(ctx context.Context, providerId string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// UpsertAuthProviderWithBody request with any body
|
|
UpsertAuthProviderWithBody(ctx context.Context, providerId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
UpsertAuthProvider(ctx context.Context, providerId string, body UpsertAuthProviderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetBranding request
|
|
GetBranding(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// UpdateBranding request
|
|
UpdateBranding(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ResetBrandingField request
|
|
ResetBrandingField(ctx context.Context, field string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetChangelog request
|
|
GetChangelog(ctx context.Context, params *GetChangelogParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetEmailConfig request
|
|
GetEmailConfig(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// SaveEmailConfigWithBody request with any body
|
|
SaveEmailConfigWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
SaveEmailConfig(ctx context.Context, body SaveEmailConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// SendTestEmailWithBody request with any body
|
|
SendTestEmailWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
SendTestEmail(ctx context.Context, body SendTestEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetInstanceInfo request
|
|
GetInstanceInfo(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListSiteInvitations request
|
|
ListSiteInvitations(ctx context.Context, params *ListSiteInvitationsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// CreateSiteInvitationWithBody request with any body
|
|
CreateSiteInvitationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
CreateSiteInvitation(ctx context.Context, body CreateSiteInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// RevokeSiteInvitation request
|
|
RevokeSiteInvitation(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ResendSiteInvitation request
|
|
ResendSiteInvitation(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetSiteInvitation request
|
|
GetSiteInvitation(ctx context.Context, token string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListInviteCodes request
|
|
ListInviteCodes(ctx context.Context, params *ListInviteCodesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GenerateInviteCodesWithBody request with any body
|
|
GenerateInviteCodesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
GenerateInviteCodes(ctx context.Context, body GenerateInviteCodesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ValidateInviteCodeWithBody request with any body
|
|
ValidateInviteCodeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
ValidateInviteCode(ctx context.Context, body ValidateInviteCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// DeleteInviteCode request
|
|
DeleteInviteCode(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// UnbindLicense request
|
|
UnbindLicense(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// InitiateLicensePairing request
|
|
InitiateLicensePairing(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PollLicensePairing request
|
|
PollLicensePairing(ctx context.Context, code string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// RefreshLicense request
|
|
RefreshLicense(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetLicensingStatus request
|
|
GetLicensingStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListSystemOptions request
|
|
ListSystemOptions(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// DeleteSystemOption request
|
|
DeleteSystemOption(ctx context.Context, key string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetSystemOption request
|
|
GetSystemOption(ctx context.Context, key string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// SetSystemOptionWithBody request with any body
|
|
SetSystemOptionWithBody(ctx context.Context, key string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
SetSystemOption(ctx context.Context, key string, body SetSystemOptionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListStorages request
|
|
ListStorages(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// CreateStorageWithBody request with any body
|
|
CreateStorageWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
CreateStorage(ctx context.Context, body CreateStorageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// DeleteStorage request
|
|
DeleteStorage(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetStorage request
|
|
GetStorage(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// UpdateStorageWithBody request with any body
|
|
UpdateStorageWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
UpdateStorage(ctx context.Context, id string, body UpdateStorageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// CreateBillingPortalSession request
|
|
CreateBillingPortalSession(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// CreateCheckoutWithBody request with any body
|
|
CreateCheckoutWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
CreateCheckout(ctx context.Context, body CreateCheckoutJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetCreditBalance request
|
|
GetCreditBalance(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetCreditLedger request
|
|
GetCreditLedger(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListCreditProducts request
|
|
ListCreditProducts(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// RedeemGiftCardWithBody request with any body
|
|
RedeemGiftCardWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
RedeemGiftCard(ctx context.Context, body RedeemGiftCardJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetDiscountQuoteWithBody request with any body
|
|
GetDiscountQuoteWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
GetDiscountQuote(ctx context.Context, body GetDiscountQuoteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListOrders request
|
|
ListOrders(ctx context.Context, params *ListOrdersParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ContinueOrderPayment request
|
|
ContinueOrderPayment(ctx context.Context, orderId string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// CancelOrderWithBody request with any body
|
|
CancelOrderWithBody(ctx context.Context, orderId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
CancelOrder(ctx context.Context, orderId string, body CancelOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListStorePackages request
|
|
ListStorePackages(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListStoreTargets request
|
|
ListStoreTargets(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListTeams request
|
|
ListTeams(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetTeamInviteLink request
|
|
GetTeamInviteLink(ctx context.Context, token string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetTeam request
|
|
GetTeam(ctx context.Context, teamId string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListTeamActivity request
|
|
ListTeamActivity(ctx context.Context, teamId string, params *ListTeamActivityParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListTeamEntitlements request
|
|
ListTeamEntitlements(ctx context.Context, teamId string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GrantTeamEntitlementWithBody request with any body
|
|
GrantTeamEntitlementWithBody(ctx context.Context, teamId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
GrantTeamEntitlement(ctx context.Context, teamId string, body GrantTeamEntitlementJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// RevokeTeamEntitlement request
|
|
RevokeTeamEntitlement(ctx context.Context, teamId string, eid string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// UpdateTeamEntitlementWithBody request with any body
|
|
UpdateTeamEntitlementWithBody(ctx context.Context, teamId string, eid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
UpdateTeamEntitlement(ctx context.Context, teamId string, eid string, body UpdateTeamEntitlementJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListTeamInvitations request
|
|
ListTeamInvitations(ctx context.Context, teamId string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// CreateTeamInviteLinkWithBody request with any body
|
|
CreateTeamInviteLinkWithBody(ctx context.Context, teamId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
CreateTeamInviteLink(ctx context.Context, teamId string, body CreateTeamInviteLinkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// DeleteTeamLogo request
|
|
DeleteTeamLogo(ctx context.Context, teamId string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// SetTeamLogo request
|
|
SetTeamLogo(ctx context.Context, teamId string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// JoinTeamWithBody request with any body
|
|
JoinTeamWithBody(ctx context.Context, teamId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
JoinTeam(ctx context.Context, teamId string, body JoinTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListTrashObjects request
|
|
ListTrashObjects(ctx context.Context, params *ListTrashObjectsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// PurgeTrashObject request
|
|
PurgeTrashObject(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetTrashObject request
|
|
GetTrashObject(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// RestoreObjectWithBody request with any body
|
|
RestoreObjectWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
RestoreObject(ctx context.Context, id string, body RestoreObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// DeleteMyAvatar request
|
|
DeleteMyAvatar(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// SetMyAvatar request
|
|
SetMyAvatar(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListUserEntitlements request
|
|
ListUserEntitlements(ctx context.Context, userId string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GrantUserEntitlementWithBody request with any body
|
|
GrantUserEntitlementWithBody(ctx context.Context, userId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
GrantUserEntitlement(ctx context.Context, userId string, body GrantUserEntitlementJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// RevokeUserEntitlement request
|
|
RevokeUserEntitlement(ctx context.Context, userId string, eid string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// UpdateUserEntitlementWithBody request with any body
|
|
UpdateUserEntitlementWithBody(ctx context.Context, userId string, eid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
UpdateUserEntitlement(ctx context.Context, userId string, eid string, body UpdateUserEntitlementJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetUserQuota request
|
|
GetUserQuota(ctx context.Context, userId string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// GetUserProfile request
|
|
GetUserProfile(ctx context.Context, username string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
|
|
// ListUserObjects request
|
|
ListUserObjects(ctx context.Context, username string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
|
}
|
|
|
|
func (c *Client) GetApiAuthAccountInfo(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetApiAuthAccountInfoRequest(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) BanUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewBanUserRequestWithBody(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) BanUser(ctx context.Context, body BanUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewBanUserRequest(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) CreateUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateUserRequestWithBody(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) CreateUser(ctx context.Context, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateUserRequest(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) GetUser(ctx context.Context, params *GetUserParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetUserRequest(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) PostApiAuthAdminHasPermissionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthAdminHasPermissionRequestWithBody(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) PostApiAuthAdminHasPermission(ctx context.Context, body PostApiAuthAdminHasPermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthAdminHasPermissionRequest(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) ImpersonateUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewImpersonateUserRequestWithBody(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) ImpersonateUser(ctx context.Context, body ImpersonateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewImpersonateUserRequest(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) AdminListUserSessionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewAdminListUserSessionsRequestWithBody(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) AdminListUserSessions(ctx context.Context, body AdminListUserSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewAdminListUserSessionsRequest(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) ListUsers(ctx context.Context, params *ListUsersParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListUsersRequest(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) RemoveUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewRemoveUserRequestWithBody(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) RemoveUser(ctx context.Context, body RemoveUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewRemoveUserRequest(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) RevokeUserSessionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewRevokeUserSessionRequestWithBody(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) RevokeUserSession(ctx context.Context, body RevokeUserSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewRevokeUserSessionRequest(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) RevokeUserSessionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewRevokeUserSessionsRequestWithBody(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) RevokeUserSessions(ctx context.Context, body RevokeUserSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewRevokeUserSessionsRequest(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) SetUserRoleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewSetUserRoleRequestWithBody(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) SetUserRole(ctx context.Context, body SetUserRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewSetUserRoleRequest(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) SetUserPasswordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewSetUserPasswordRequestWithBody(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) SetUserPassword(ctx context.Context, body SetUserPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewSetUserPasswordRequest(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) PostApiAuthAdminStopImpersonating(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthAdminStopImpersonatingRequest(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) UnbanUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUnbanUserRequestWithBody(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) UnbanUser(ctx context.Context, body UnbanUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUnbanUserRequest(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) AdminUpdateUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewAdminUpdateUserRequestWithBody(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) AdminUpdateUser(ctx context.Context, body AdminUpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewAdminUpdateUserRequest(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) PostApiAuthApiKeyCreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthApiKeyCreateRequestWithBody(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) PostApiAuthApiKeyCreate(ctx context.Context, body PostApiAuthApiKeyCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthApiKeyCreateRequest(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) PostApiAuthApiKeyDeleteWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthApiKeyDeleteRequestWithBody(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) PostApiAuthApiKeyDelete(ctx context.Context, body PostApiAuthApiKeyDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthApiKeyDeleteRequest(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) GetApiAuthApiKeyGet(ctx context.Context, params *GetApiAuthApiKeyGetParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetApiAuthApiKeyGetRequest(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) GetApiAuthApiKeyList(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetApiAuthApiKeyListRequest(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) PostApiAuthApiKeyUpdateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthApiKeyUpdateRequestWithBody(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) PostApiAuthApiKeyUpdate(ctx context.Context, body PostApiAuthApiKeyUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthApiKeyUpdateRequest(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) GetApiAuthCallbackId(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetApiAuthCallbackIdRequest(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) PostApiAuthCallbackIdWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthCallbackIdRequestWithBody(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) PostApiAuthCallbackId(ctx context.Context, id string, body PostApiAuthCallbackIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthCallbackIdRequest(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) ChangeEmailWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewChangeEmailRequestWithBody(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) ChangeEmail(ctx context.Context, body ChangeEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewChangeEmailRequest(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) ChangePasswordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewChangePasswordRequestWithBody(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) ChangePassword(ctx context.Context, body ChangePasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewChangePasswordRequest(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) DeleteUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewDeleteUserRequestWithBody(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) DeleteUser(ctx context.Context, body DeleteUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewDeleteUserRequest(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) GetApiAuthDeleteUserCallback(ctx context.Context, params *GetApiAuthDeleteUserCallbackParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetApiAuthDeleteUserCallbackRequest(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) GetApiAuthDevice(ctx context.Context, params *GetApiAuthDeviceParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetApiAuthDeviceRequest(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) PostApiAuthDeviceApproveWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthDeviceApproveRequestWithBody(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) PostApiAuthDeviceApprove(ctx context.Context, body PostApiAuthDeviceApproveJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthDeviceApproveRequest(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) PostApiAuthDeviceCodeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthDeviceCodeRequestWithBody(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) PostApiAuthDeviceCode(ctx context.Context, body PostApiAuthDeviceCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthDeviceCodeRequest(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) PostApiAuthDeviceDenyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthDeviceDenyRequestWithBody(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) PostApiAuthDeviceDeny(ctx context.Context, body PostApiAuthDeviceDenyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthDeviceDenyRequest(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) PostApiAuthDeviceTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthDeviceTokenRequestWithBody(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) PostApiAuthDeviceToken(ctx context.Context, body PostApiAuthDeviceTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthDeviceTokenRequest(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) GetApiAuthError(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetApiAuthErrorRequest(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) PostApiAuthGetAccessTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthGetAccessTokenRequestWithBody(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) PostApiAuthGetAccessToken(ctx context.Context, body PostApiAuthGetAccessTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthGetAccessTokenRequest(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) GetSession(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetSessionRequest(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) GetSessionPostWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetSessionPostRequestWithBody(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) GetSessionPost(ctx context.Context, body GetSessionPostJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetSessionPostRequest(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) PostApiAuthIsUsernameAvailableWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthIsUsernameAvailableRequestWithBody(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) PostApiAuthIsUsernameAvailable(ctx context.Context, body PostApiAuthIsUsernameAvailableJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthIsUsernameAvailableRequest(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) LinkSocialAccountWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewLinkSocialAccountRequestWithBody(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) LinkSocialAccount(ctx context.Context, body LinkSocialAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewLinkSocialAccountRequest(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) ListUserAccounts(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListUserAccountsRequest(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) ListUserSessions(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListUserSessionsRequest(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) GetApiAuthOauth2CallbackProviderId(ctx context.Context, providerId string, params *GetApiAuthOauth2CallbackProviderIdParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetApiAuthOauth2CallbackProviderIdRequest(c.Server, providerId, 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) PostApiAuthOauth2LinkWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthOauth2LinkRequestWithBody(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) PostApiAuthOauth2Link(ctx context.Context, body PostApiAuthOauth2LinkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthOauth2LinkRequest(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) GetApiAuthOk(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetApiAuthOkRequest(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) PostApiAuthOrganizationAcceptInvitationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthOrganizationAcceptInvitationRequestWithBody(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) PostApiAuthOrganizationAcceptInvitation(ctx context.Context, body PostApiAuthOrganizationAcceptInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthOrganizationAcceptInvitationRequest(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) PostApiAuthOrganizationCancelInvitationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthOrganizationCancelInvitationRequestWithBody(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) PostApiAuthOrganizationCancelInvitation(ctx context.Context, body PostApiAuthOrganizationCancelInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthOrganizationCancelInvitationRequest(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) PostApiAuthOrganizationCheckSlugWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthOrganizationCheckSlugRequestWithBody(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) PostApiAuthOrganizationCheckSlug(ctx context.Context, body PostApiAuthOrganizationCheckSlugJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthOrganizationCheckSlugRequest(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) PostApiAuthOrganizationCreateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthOrganizationCreateRequestWithBody(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) PostApiAuthOrganizationCreate(ctx context.Context, body PostApiAuthOrganizationCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthOrganizationCreateRequest(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) PostApiAuthOrganizationDeleteWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthOrganizationDeleteRequestWithBody(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) PostApiAuthOrganizationDelete(ctx context.Context, body PostApiAuthOrganizationDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthOrganizationDeleteRequest(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) GetApiAuthOrganizationGetActiveMember(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetApiAuthOrganizationGetActiveMemberRequest(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) GetApiAuthOrganizationGetActiveMemberRole(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetApiAuthOrganizationGetActiveMemberRoleRequest(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) GetOrganization(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetOrganizationRequest(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) GetApiAuthOrganizationGetInvitation(ctx context.Context, params *GetApiAuthOrganizationGetInvitationParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetApiAuthOrganizationGetInvitationRequest(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) PostApiAuthOrganizationHasPermissionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthOrganizationHasPermissionRequestWithBody(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) PostApiAuthOrganizationHasPermission(ctx context.Context, body PostApiAuthOrganizationHasPermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthOrganizationHasPermissionRequest(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) CreateOrganizationInvitationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateOrganizationInvitationRequestWithBody(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) CreateOrganizationInvitation(ctx context.Context, body CreateOrganizationInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateOrganizationInvitationRequest(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) PostApiAuthOrganizationLeaveWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthOrganizationLeaveRequestWithBody(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) PostApiAuthOrganizationLeave(ctx context.Context, body PostApiAuthOrganizationLeaveJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthOrganizationLeaveRequest(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) GetApiAuthOrganizationList(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetApiAuthOrganizationListRequest(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) GetApiAuthOrganizationListInvitations(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetApiAuthOrganizationListInvitationsRequest(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) GetApiAuthOrganizationListMembers(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetApiAuthOrganizationListMembersRequest(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) GetApiAuthOrganizationListUserInvitations(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetApiAuthOrganizationListUserInvitationsRequest(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) PostApiAuthOrganizationRejectInvitationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthOrganizationRejectInvitationRequestWithBody(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) PostApiAuthOrganizationRejectInvitation(ctx context.Context, body PostApiAuthOrganizationRejectInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthOrganizationRejectInvitationRequest(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) PostApiAuthOrganizationRemoveMemberWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthOrganizationRemoveMemberRequestWithBody(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) PostApiAuthOrganizationRemoveMember(ctx context.Context, body PostApiAuthOrganizationRemoveMemberJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthOrganizationRemoveMemberRequest(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) SetActiveOrganizationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewSetActiveOrganizationRequestWithBody(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) SetActiveOrganization(ctx context.Context, body SetActiveOrganizationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewSetActiveOrganizationRequest(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) PostApiAuthOrganizationUpdateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthOrganizationUpdateRequestWithBody(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) PostApiAuthOrganizationUpdate(ctx context.Context, body PostApiAuthOrganizationUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthOrganizationUpdateRequest(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) UpdateOrganizationMemberRoleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUpdateOrganizationMemberRoleRequestWithBody(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) UpdateOrganizationMemberRole(ctx context.Context, body UpdateOrganizationMemberRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUpdateOrganizationMemberRoleRequest(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) PostApiAuthRefreshTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthRefreshTokenRequestWithBody(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) PostApiAuthRefreshToken(ctx context.Context, body PostApiAuthRefreshTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthRefreshTokenRequest(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) RequestPasswordResetWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewRequestPasswordResetRequestWithBody(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) RequestPasswordReset(ctx context.Context, body RequestPasswordResetJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewRequestPasswordResetRequest(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) ResetPasswordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewResetPasswordRequestWithBody(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) ResetPassword(ctx context.Context, body ResetPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewResetPasswordRequest(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) ResetPasswordCallback(ctx context.Context, token string, params *ResetPasswordCallbackParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewResetPasswordCallbackRequest(c.Server, token, 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) PostApiAuthRevokeOtherSessionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthRevokeOtherSessionsRequestWithBody(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) PostApiAuthRevokeOtherSessions(ctx context.Context, body PostApiAuthRevokeOtherSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthRevokeOtherSessionsRequest(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) PostApiAuthRevokeSessionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthRevokeSessionRequestWithBody(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) PostApiAuthRevokeSession(ctx context.Context, body PostApiAuthRevokeSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthRevokeSessionRequest(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) PostApiAuthRevokeSessionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthRevokeSessionsRequestWithBody(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) PostApiAuthRevokeSessions(ctx context.Context, body PostApiAuthRevokeSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthRevokeSessionsRequest(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) SendVerificationEmailWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewSendVerificationEmailRequestWithBody(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) SendVerificationEmail(ctx context.Context, body SendVerificationEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewSendVerificationEmailRequest(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) SignInEmailWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewSignInEmailRequestWithBody(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) SignInEmail(ctx context.Context, body SignInEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewSignInEmailRequest(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) PostApiAuthSignInOauth2WithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthSignInOauth2RequestWithBody(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) PostApiAuthSignInOauth2(ctx context.Context, body PostApiAuthSignInOauth2JSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthSignInOauth2Request(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) SocialSignInWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewSocialSignInRequestWithBody(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) SocialSignIn(ctx context.Context, body SocialSignInJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewSocialSignInRequest(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) PostApiAuthSignInUsernameWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthSignInUsernameRequestWithBody(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) PostApiAuthSignInUsername(ctx context.Context, body PostApiAuthSignInUsernameJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthSignInUsernameRequest(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) SignOutWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewSignOutRequestWithBody(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) SignOut(ctx context.Context, body SignOutJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewSignOutRequest(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) SignUpWithEmailAndPasswordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewSignUpWithEmailAndPasswordRequestWithBody(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) SignUpWithEmailAndPassword(ctx context.Context, body SignUpWithEmailAndPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewSignUpWithEmailAndPasswordRequest(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) PostApiAuthUnlinkAccountWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthUnlinkAccountRequestWithBody(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) PostApiAuthUnlinkAccount(ctx context.Context, body PostApiAuthUnlinkAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPostApiAuthUnlinkAccountRequest(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) UpdateSessionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUpdateSessionRequestWithBody(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) UpdateSession(ctx context.Context, body UpdateSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUpdateSessionRequest(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) UpdateUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUpdateUserRequestWithBody(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) UpdateUser(ctx context.Context, body UpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUpdateUserRequest(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) GetApiAuthVerifyEmail(ctx context.Context, params *GetApiAuthVerifyEmailParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetApiAuthVerifyEmailRequest(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) VerifyPasswordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewVerifyPasswordRequestWithBody(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) VerifyPassword(ctx context.Context, body VerifyPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewVerifyPasswordRequest(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) ListBackgroundJobs(ctx context.Context, params *ListBackgroundJobsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListBackgroundJobsRequest(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) CreateBackgroundJobWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateBackgroundJobRequestWithBody(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) CreateBackgroundJob(ctx context.Context, body CreateBackgroundJobJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateBackgroundJobRequest(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) GetBackgroundJob(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetBackgroundJobRequest(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) RetryBackgroundJob(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewRetryBackgroundJobRequest(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) CancelBackgroundJobWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCancelBackgroundJobRequestWithBody(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) CancelBackgroundJob(ctx context.Context, id string, body CancelBackgroundJobJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCancelBackgroundJobRequest(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) ListDownloaders(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListDownloadersRequest(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) CreateDownloaderWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateDownloaderRequestWithBody(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) CreateDownloader(ctx context.Context, body CreateDownloaderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateDownloaderRequest(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) RecordDownloaderHeartbeatWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewRecordDownloaderHeartbeatRequestWithBody(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) RecordDownloaderHeartbeat(ctx context.Context, body RecordDownloaderHeartbeatJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewRecordDownloaderHeartbeatRequest(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) DeleteDownloader(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewDeleteDownloaderRequest(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) UpdateDownloaderWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUpdateDownloaderRequestWithBody(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) UpdateDownloader(ctx context.Context, id string, body UpdateDownloaderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUpdateDownloaderRequest(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) ListDownloadTasks(ctx context.Context, params *ListDownloadTasksParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListDownloadTasksRequest(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) CreateDownloadTaskWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateDownloadTaskRequestWithBody(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) CreateDownloadTask(ctx context.Context, body CreateDownloadTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateDownloadTaskRequest(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) DeleteDownloadTask(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewDeleteDownloadTaskRequest(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) GetDownloadTask(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetDownloadTaskRequest(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) UpdateDownloadTaskWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUpdateDownloadTaskRequestWithBody(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) UpdateDownloadTask(ctx context.Context, id string, body UpdateDownloadTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUpdateDownloadTaskRequest(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) RetryDownloadTaskWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewRetryDownloadTaskRequestWithBody(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) RetryDownloadTask(ctx context.Context, id string, body RetryDownloadTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewRetryDownloadTaskRequest(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) SetDownloadTaskStatusWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewSetDownloadTaskStatusRequestWithBody(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) SetDownloadTaskStatus(ctx context.Context, id string, body SetDownloadTaskStatusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewSetDownloadTaskStatusRequest(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) StreamEvents(ctx context.Context, params *StreamEventsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewStreamEventsRequest(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) DeleteImageHostingConfig(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewDeleteImageHostingConfigRequest(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) GetImageHostingConfig(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetImageHostingConfigRequest(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) UpdateImageHostingConfigWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUpdateImageHostingConfigRequestWithBody(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) UpdateImageHostingConfig(ctx context.Context, body UpdateImageHostingConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUpdateImageHostingConfigRequest(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) ListImageHostings(ctx context.Context, params *ListImageHostingsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListImageHostingsRequest(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) PresignImageHostingUploadWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPresignImageHostingUploadRequestWithBody(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) PresignImageHostingUpload(ctx context.Context, body PresignImageHostingUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPresignImageHostingUploadRequest(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) DeleteImageHosting(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewDeleteImageHostingRequest(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) GetImageHosting(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetImageHostingRequest(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) ConfirmImageHosting(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewConfirmImageHostingRequest(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) ListNotifications(ctx context.Context, params *ListNotificationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListNotificationsRequest(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) MarkAllNotificationsRead(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewMarkAllNotificationsReadRequest(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) GetNotificationStats(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetNotificationStatsRequest(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) MarkNotificationRead(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewMarkNotificationReadRequest(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) ListObjects(ctx context.Context, params *ListObjectsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListObjectsRequest(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) CreateObjectWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateObjectRequestWithBody(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) CreateObject(ctx context.Context, body CreateObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateObjectRequest(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) DeleteObject(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewDeleteObjectRequest(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) GetObject(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetObjectRequest(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) UpdateObjectWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUpdateObjectRequestWithBody(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) UpdateObject(ctx context.Context, id string, body UpdateObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUpdateObjectRequest(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) CopyObjectWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCopyObjectRequestWithBody(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) CopyObject(ctx context.Context, id string, body CopyObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCopyObjectRequest(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) TransferObjectWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewTransferObjectRequestWithBody(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) TransferObject(ctx context.Context, id string, body TransferObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewTransferObjectRequest(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) AbortObjectUpload(ctx context.Context, id string, uploadSessionId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewAbortObjectUploadRequest(c.Server, id, uploadSessionId)
|
|
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) CompleteObjectUploadWithBody(ctx context.Context, id string, uploadSessionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCompleteObjectUploadRequestWithBody(c.Server, id, uploadSessionId, 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) CompleteObjectUpload(ctx context.Context, id string, uploadSessionId string, body CompleteObjectUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCompleteObjectUploadRequest(c.Server, id, uploadSessionId, 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) PresignObjectUploadPartsWithBody(ctx context.Context, id string, uploadSessionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPresignObjectUploadPartsRequestWithBody(c.Server, id, uploadSessionId, 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) PresignObjectUploadParts(ctx context.Context, id string, uploadSessionId string, body PresignObjectUploadPartsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPresignObjectUploadPartsRequest(c.Server, id, uploadSessionId, 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) ListQuotaOverview(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListQuotaOverviewRequest(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) GetMyQuota(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetMyQuotaRequest(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) ListShares(ctx context.Context, params *ListSharesParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListSharesRequest(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) CreateShareWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateShareRequestWithBody(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) CreateShare(ctx context.Context, body CreateShareJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateShareRequest(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) GetShare(ctx context.Context, token string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetShareRequest(c.Server, token)
|
|
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) ListShareObjects(ctx context.Context, token string, params *ListShareObjectsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListShareObjectsRequest(c.Server, token, 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) SaveShareWithBody(ctx context.Context, token string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewSaveShareRequestWithBody(c.Server, token, 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) SaveShare(ctx context.Context, token string, body SaveShareJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewSaveShareRequest(c.Server, token, 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) VerifySharePasswordWithBody(ctx context.Context, token string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewVerifySharePasswordRequestWithBody(c.Server, token, 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) VerifySharePassword(ctx context.Context, token string, body VerifySharePasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewVerifySharePasswordRequest(c.Server, token, 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) RevokeShareWithBody(ctx context.Context, token string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewRevokeShareRequestWithBody(c.Server, token, 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) RevokeShare(ctx context.Context, token string, body RevokeShareJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewRevokeShareRequest(c.Server, token, 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) ListAnnouncements(ctx context.Context, params *ListAnnouncementsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListAnnouncementsRequest(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) CreateAnnouncementWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateAnnouncementRequestWithBody(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) CreateAnnouncement(ctx context.Context, body CreateAnnouncementJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateAnnouncementRequest(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) DeleteAnnouncement(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewDeleteAnnouncementRequest(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) GetAnnouncement(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetAnnouncementRequest(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) UpdateAnnouncementWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUpdateAnnouncementRequestWithBody(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) UpdateAnnouncement(ctx context.Context, id string, body UpdateAnnouncementJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUpdateAnnouncementRequest(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) ListAuditEvents(ctx context.Context, params *ListAuditEventsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListAuditEventsRequest(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) ListAuthProviders(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListAuthProvidersRequest(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) DeleteAuthProvider(ctx context.Context, providerId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewDeleteAuthProviderRequest(c.Server, providerId)
|
|
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) UpsertAuthProviderWithBody(ctx context.Context, providerId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUpsertAuthProviderRequestWithBody(c.Server, providerId, 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) UpsertAuthProvider(ctx context.Context, providerId string, body UpsertAuthProviderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUpsertAuthProviderRequest(c.Server, providerId, 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) GetBranding(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetBrandingRequest(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) UpdateBranding(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUpdateBrandingRequest(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) ResetBrandingField(ctx context.Context, field string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewResetBrandingFieldRequest(c.Server, field)
|
|
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) GetChangelog(ctx context.Context, params *GetChangelogParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetChangelogRequest(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) GetEmailConfig(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetEmailConfigRequest(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) SaveEmailConfigWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewSaveEmailConfigRequestWithBody(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) SaveEmailConfig(ctx context.Context, body SaveEmailConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewSaveEmailConfigRequest(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) SendTestEmailWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewSendTestEmailRequestWithBody(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) SendTestEmail(ctx context.Context, body SendTestEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewSendTestEmailRequest(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) GetInstanceInfo(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetInstanceInfoRequest(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) ListSiteInvitations(ctx context.Context, params *ListSiteInvitationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListSiteInvitationsRequest(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) CreateSiteInvitationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateSiteInvitationRequestWithBody(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) CreateSiteInvitation(ctx context.Context, body CreateSiteInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateSiteInvitationRequest(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) RevokeSiteInvitation(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewRevokeSiteInvitationRequest(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) ResendSiteInvitation(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewResendSiteInvitationRequest(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) GetSiteInvitation(ctx context.Context, token string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetSiteInvitationRequest(c.Server, token)
|
|
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) ListInviteCodes(ctx context.Context, params *ListInviteCodesParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListInviteCodesRequest(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) GenerateInviteCodesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGenerateInviteCodesRequestWithBody(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) GenerateInviteCodes(ctx context.Context, body GenerateInviteCodesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGenerateInviteCodesRequest(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) ValidateInviteCodeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewValidateInviteCodeRequestWithBody(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) ValidateInviteCode(ctx context.Context, body ValidateInviteCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewValidateInviteCodeRequest(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) DeleteInviteCode(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewDeleteInviteCodeRequest(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) UnbindLicense(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUnbindLicenseRequest(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) InitiateLicensePairing(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewInitiateLicensePairingRequest(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) PollLicensePairing(ctx context.Context, code string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPollLicensePairingRequest(c.Server, code)
|
|
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) RefreshLicense(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewRefreshLicenseRequest(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) GetLicensingStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetLicensingStatusRequest(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) ListSystemOptions(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListSystemOptionsRequest(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) DeleteSystemOption(ctx context.Context, key string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewDeleteSystemOptionRequest(c.Server, key)
|
|
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) GetSystemOption(ctx context.Context, key string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetSystemOptionRequest(c.Server, key)
|
|
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) SetSystemOptionWithBody(ctx context.Context, key string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewSetSystemOptionRequestWithBody(c.Server, key, 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) SetSystemOption(ctx context.Context, key string, body SetSystemOptionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewSetSystemOptionRequest(c.Server, key, 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) ListStorages(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListStoragesRequest(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) CreateStorageWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateStorageRequestWithBody(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) CreateStorage(ctx context.Context, body CreateStorageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateStorageRequest(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) DeleteStorage(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewDeleteStorageRequest(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) GetStorage(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetStorageRequest(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) UpdateStorageWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUpdateStorageRequestWithBody(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) UpdateStorage(ctx context.Context, id string, body UpdateStorageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUpdateStorageRequest(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) CreateBillingPortalSession(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateBillingPortalSessionRequest(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) CreateCheckoutWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateCheckoutRequestWithBody(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) CreateCheckout(ctx context.Context, body CreateCheckoutJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateCheckoutRequest(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) GetCreditBalance(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetCreditBalanceRequest(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) GetCreditLedger(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetCreditLedgerRequest(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) ListCreditProducts(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListCreditProductsRequest(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) RedeemGiftCardWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewRedeemGiftCardRequestWithBody(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) RedeemGiftCard(ctx context.Context, body RedeemGiftCardJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewRedeemGiftCardRequest(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) GetDiscountQuoteWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetDiscountQuoteRequestWithBody(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) GetDiscountQuote(ctx context.Context, body GetDiscountQuoteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetDiscountQuoteRequest(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) ListOrders(ctx context.Context, params *ListOrdersParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListOrdersRequest(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) ContinueOrderPayment(ctx context.Context, orderId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewContinueOrderPaymentRequest(c.Server, orderId)
|
|
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) CancelOrderWithBody(ctx context.Context, orderId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCancelOrderRequestWithBody(c.Server, orderId, 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) CancelOrder(ctx context.Context, orderId string, body CancelOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCancelOrderRequest(c.Server, orderId, 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) ListStorePackages(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListStorePackagesRequest(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) ListStoreTargets(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListStoreTargetsRequest(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) ListTeams(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListTeamsRequest(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) GetTeamInviteLink(ctx context.Context, token string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetTeamInviteLinkRequest(c.Server, token)
|
|
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) GetTeam(ctx context.Context, teamId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetTeamRequest(c.Server, teamId)
|
|
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) ListTeamActivity(ctx context.Context, teamId string, params *ListTeamActivityParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListTeamActivityRequest(c.Server, teamId, 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) ListTeamEntitlements(ctx context.Context, teamId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListTeamEntitlementsRequest(c.Server, teamId)
|
|
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) GrantTeamEntitlementWithBody(ctx context.Context, teamId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGrantTeamEntitlementRequestWithBody(c.Server, teamId, 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) GrantTeamEntitlement(ctx context.Context, teamId string, body GrantTeamEntitlementJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGrantTeamEntitlementRequest(c.Server, teamId, 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) RevokeTeamEntitlement(ctx context.Context, teamId string, eid string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewRevokeTeamEntitlementRequest(c.Server, teamId, eid)
|
|
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) UpdateTeamEntitlementWithBody(ctx context.Context, teamId string, eid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUpdateTeamEntitlementRequestWithBody(c.Server, teamId, eid, 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) UpdateTeamEntitlement(ctx context.Context, teamId string, eid string, body UpdateTeamEntitlementJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUpdateTeamEntitlementRequest(c.Server, teamId, eid, 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) ListTeamInvitations(ctx context.Context, teamId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListTeamInvitationsRequest(c.Server, teamId)
|
|
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) CreateTeamInviteLinkWithBody(ctx context.Context, teamId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateTeamInviteLinkRequestWithBody(c.Server, teamId, 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) CreateTeamInviteLink(ctx context.Context, teamId string, body CreateTeamInviteLinkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewCreateTeamInviteLinkRequest(c.Server, teamId, 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) DeleteTeamLogo(ctx context.Context, teamId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewDeleteTeamLogoRequest(c.Server, teamId)
|
|
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) SetTeamLogo(ctx context.Context, teamId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewSetTeamLogoRequest(c.Server, teamId)
|
|
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) JoinTeamWithBody(ctx context.Context, teamId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewJoinTeamRequestWithBody(c.Server, teamId, 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) JoinTeam(ctx context.Context, teamId string, body JoinTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewJoinTeamRequest(c.Server, teamId, 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) ListTrashObjects(ctx context.Context, params *ListTrashObjectsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListTrashObjectsRequest(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) PurgeTrashObject(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewPurgeTrashObjectRequest(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) GetTrashObject(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetTrashObjectRequest(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) RestoreObjectWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewRestoreObjectRequestWithBody(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) RestoreObject(ctx context.Context, id string, body RestoreObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewRestoreObjectRequest(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) DeleteMyAvatar(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewDeleteMyAvatarRequest(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) SetMyAvatar(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewSetMyAvatarRequest(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) ListUserEntitlements(ctx context.Context, userId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListUserEntitlementsRequest(c.Server, userId)
|
|
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) GrantUserEntitlementWithBody(ctx context.Context, userId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGrantUserEntitlementRequestWithBody(c.Server, userId, 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) GrantUserEntitlement(ctx context.Context, userId string, body GrantUserEntitlementJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGrantUserEntitlementRequest(c.Server, userId, 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) RevokeUserEntitlement(ctx context.Context, userId string, eid string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewRevokeUserEntitlementRequest(c.Server, userId, eid)
|
|
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) UpdateUserEntitlementWithBody(ctx context.Context, userId string, eid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUpdateUserEntitlementRequestWithBody(c.Server, userId, eid, 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) UpdateUserEntitlement(ctx context.Context, userId string, eid string, body UpdateUserEntitlementJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewUpdateUserEntitlementRequest(c.Server, userId, eid, 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) GetUserQuota(ctx context.Context, userId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetUserQuotaRequest(c.Server, userId)
|
|
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) GetUserProfile(ctx context.Context, username string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewGetUserProfileRequest(c.Server, username)
|
|
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) ListUserObjects(ctx context.Context, username string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
|
req, err := NewListUserObjectsRequest(c.Server, username)
|
|
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)
|
|
}
|
|
|
|
// NewGetApiAuthAccountInfoRequest generates requests for GetApiAuthAccountInfo
|
|
func NewGetApiAuthAccountInfoRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/account-info")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewBanUserRequest calls the generic BanUser builder with application/json body
|
|
func NewBanUserRequest(server string, body BanUserJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewBanUserRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewBanUserRequestWithBody generates requests for BanUser with any type of body
|
|
func NewBanUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/admin/ban-user")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewCreateUserRequest calls the generic CreateUser builder with application/json body
|
|
func NewCreateUserRequest(server string, body CreateUserJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewCreateUserRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewCreateUserRequestWithBody generates requests for CreateUser with any type of body
|
|
func NewCreateUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/admin/create-user")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetUserRequest generates requests for GetUser
|
|
func NewGetUserRequest(server string, params *GetUserParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/admin/get-user")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
// queryValues collects non-styled parameters (passthrough, JSON)
|
|
// that are safe to round-trip through url.Values.Encode().
|
|
queryValues := queryURL.Query()
|
|
// rawQueryFragments collects pre-encoded query fragments from
|
|
// styled parameters, preserving literal commas as delimiters
|
|
// per the OpenAPI spec (e.g. "color=blue,black,brown").
|
|
var rawQueryFragments []string
|
|
|
|
if params.Id != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "id", *params.Id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if encoded := queryValues.Encode(); encoded != "" {
|
|
rawQueryFragments = append(rawQueryFragments, encoded)
|
|
}
|
|
queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPostApiAuthAdminHasPermissionRequest calls the generic PostApiAuthAdminHasPermission builder with application/json body
|
|
func NewPostApiAuthAdminHasPermissionRequest(server string, body PostApiAuthAdminHasPermissionJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewPostApiAuthAdminHasPermissionRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewPostApiAuthAdminHasPermissionRequestWithBody generates requests for PostApiAuthAdminHasPermission with any type of body
|
|
func NewPostApiAuthAdminHasPermissionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/admin/has-permission")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewImpersonateUserRequest calls the generic ImpersonateUser builder with application/json body
|
|
func NewImpersonateUserRequest(server string, body ImpersonateUserJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewImpersonateUserRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewImpersonateUserRequestWithBody generates requests for ImpersonateUser with any type of body
|
|
func NewImpersonateUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/admin/impersonate-user")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewAdminListUserSessionsRequest calls the generic AdminListUserSessions builder with application/json body
|
|
func NewAdminListUserSessionsRequest(server string, body AdminListUserSessionsJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewAdminListUserSessionsRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewAdminListUserSessionsRequestWithBody generates requests for AdminListUserSessions with any type of body
|
|
func NewAdminListUserSessionsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/admin/list-user-sessions")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListUsersRequest generates requests for ListUsers
|
|
func NewListUsersRequest(server string, params *ListUsersParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/admin/list-users")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
// queryValues collects non-styled parameters (passthrough, JSON)
|
|
// that are safe to round-trip through url.Values.Encode().
|
|
queryValues := queryURL.Query()
|
|
// rawQueryFragments collects pre-encoded query fragments from
|
|
// styled parameters, preserving literal commas as delimiters
|
|
// per the OpenAPI spec (e.g. "color=blue,black,brown").
|
|
var rawQueryFragments []string
|
|
|
|
if params.SearchValue != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "searchValue", *params.SearchValue, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.SearchField != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "searchField", *params.SearchField, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.SearchOperator != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "searchOperator", *params.SearchOperator, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.Limit != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.Offset != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.SortBy != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "sortBy", *params.SortBy, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.SortDirection != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "sortDirection", *params.SortDirection, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.FilterField != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "filterField", *params.FilterField, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.FilterValue != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "filterValue", *params.FilterValue, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.FilterOperator != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "filterOperator", *params.FilterOperator, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if encoded := queryValues.Encode(); encoded != "" {
|
|
rawQueryFragments = append(rawQueryFragments, encoded)
|
|
}
|
|
queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewRemoveUserRequest calls the generic RemoveUser builder with application/json body
|
|
func NewRemoveUserRequest(server string, body RemoveUserJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewRemoveUserRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewRemoveUserRequestWithBody generates requests for RemoveUser with any type of body
|
|
func NewRemoveUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/admin/remove-user")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewRevokeUserSessionRequest calls the generic RevokeUserSession builder with application/json body
|
|
func NewRevokeUserSessionRequest(server string, body RevokeUserSessionJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewRevokeUserSessionRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewRevokeUserSessionRequestWithBody generates requests for RevokeUserSession with any type of body
|
|
func NewRevokeUserSessionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/admin/revoke-user-session")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewRevokeUserSessionsRequest calls the generic RevokeUserSessions builder with application/json body
|
|
func NewRevokeUserSessionsRequest(server string, body RevokeUserSessionsJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewRevokeUserSessionsRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewRevokeUserSessionsRequestWithBody generates requests for RevokeUserSessions with any type of body
|
|
func NewRevokeUserSessionsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/admin/revoke-user-sessions")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewSetUserRoleRequest calls the generic SetUserRole builder with application/json body
|
|
func NewSetUserRoleRequest(server string, body SetUserRoleJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewSetUserRoleRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewSetUserRoleRequestWithBody generates requests for SetUserRole with any type of body
|
|
func NewSetUserRoleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/admin/set-role")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewSetUserPasswordRequest calls the generic SetUserPassword builder with application/json body
|
|
func NewSetUserPasswordRequest(server string, body SetUserPasswordJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewSetUserPasswordRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewSetUserPasswordRequestWithBody generates requests for SetUserPassword with any type of body
|
|
func NewSetUserPasswordRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/admin/set-user-password")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPostApiAuthAdminStopImpersonatingRequest generates requests for PostApiAuthAdminStopImpersonating
|
|
func NewPostApiAuthAdminStopImpersonatingRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/admin/stop-impersonating")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewUnbanUserRequest calls the generic UnbanUser builder with application/json body
|
|
func NewUnbanUserRequest(server string, body UnbanUserJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewUnbanUserRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewUnbanUserRequestWithBody generates requests for UnbanUser with any type of body
|
|
func NewUnbanUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/admin/unban-user")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewAdminUpdateUserRequest calls the generic AdminUpdateUser builder with application/json body
|
|
func NewAdminUpdateUserRequest(server string, body AdminUpdateUserJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewAdminUpdateUserRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewAdminUpdateUserRequestWithBody generates requests for AdminUpdateUser with any type of body
|
|
func NewAdminUpdateUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/admin/update-user")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPostApiAuthApiKeyCreateRequest calls the generic PostApiAuthApiKeyCreate builder with application/json body
|
|
func NewPostApiAuthApiKeyCreateRequest(server string, body PostApiAuthApiKeyCreateJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewPostApiAuthApiKeyCreateRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewPostApiAuthApiKeyCreateRequestWithBody generates requests for PostApiAuthApiKeyCreate with any type of body
|
|
func NewPostApiAuthApiKeyCreateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/api-key/create")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPostApiAuthApiKeyDeleteRequest calls the generic PostApiAuthApiKeyDelete builder with application/json body
|
|
func NewPostApiAuthApiKeyDeleteRequest(server string, body PostApiAuthApiKeyDeleteJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewPostApiAuthApiKeyDeleteRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewPostApiAuthApiKeyDeleteRequestWithBody generates requests for PostApiAuthApiKeyDelete with any type of body
|
|
func NewPostApiAuthApiKeyDeleteRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/api-key/delete")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetApiAuthApiKeyGetRequest generates requests for GetApiAuthApiKeyGet
|
|
func NewGetApiAuthApiKeyGetRequest(server string, params *GetApiAuthApiKeyGetParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/api-key/get")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
// queryValues collects non-styled parameters (passthrough, JSON)
|
|
// that are safe to round-trip through url.Values.Encode().
|
|
queryValues := queryURL.Query()
|
|
// rawQueryFragments collects pre-encoded query fragments from
|
|
// styled parameters, preserving literal commas as delimiters
|
|
// per the OpenAPI spec (e.g. "color=blue,black,brown").
|
|
var rawQueryFragments []string
|
|
|
|
if params.ConfigId != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "configId", *params.ConfigId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.Id != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "id", *params.Id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if encoded := queryValues.Encode(); encoded != "" {
|
|
rawQueryFragments = append(rawQueryFragments, encoded)
|
|
}
|
|
queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetApiAuthApiKeyListRequest generates requests for GetApiAuthApiKeyList
|
|
func NewGetApiAuthApiKeyListRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/api-key/list")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPostApiAuthApiKeyUpdateRequest calls the generic PostApiAuthApiKeyUpdate builder with application/json body
|
|
func NewPostApiAuthApiKeyUpdateRequest(server string, body PostApiAuthApiKeyUpdateJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewPostApiAuthApiKeyUpdateRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewPostApiAuthApiKeyUpdateRequestWithBody generates requests for PostApiAuthApiKeyUpdate with any type of body
|
|
func NewPostApiAuthApiKeyUpdateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/api-key/update")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetApiAuthCallbackIdRequest generates requests for GetApiAuthCallbackId
|
|
func NewGetApiAuthCallbackIdRequest(server string, id string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/callback/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPostApiAuthCallbackIdRequest calls the generic PostApiAuthCallbackId builder with application/json body
|
|
func NewPostApiAuthCallbackIdRequest(server string, id string, body PostApiAuthCallbackIdJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewPostApiAuthCallbackIdRequestWithBody(server, id, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewPostApiAuthCallbackIdRequestWithBody generates requests for PostApiAuthCallbackId with any type of body
|
|
func NewPostApiAuthCallbackIdRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/callback/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewChangeEmailRequest calls the generic ChangeEmail builder with application/json body
|
|
func NewChangeEmailRequest(server string, body ChangeEmailJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewChangeEmailRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewChangeEmailRequestWithBody generates requests for ChangeEmail with any type of body
|
|
func NewChangeEmailRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/change-email")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewChangePasswordRequest calls the generic ChangePassword builder with application/json body
|
|
func NewChangePasswordRequest(server string, body ChangePasswordJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewChangePasswordRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewChangePasswordRequestWithBody generates requests for ChangePassword with any type of body
|
|
func NewChangePasswordRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/change-password")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewDeleteUserRequest calls the generic DeleteUser builder with application/json body
|
|
func NewDeleteUserRequest(server string, body DeleteUserJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewDeleteUserRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewDeleteUserRequestWithBody generates requests for DeleteUser with any type of body
|
|
func NewDeleteUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/delete-user")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetApiAuthDeleteUserCallbackRequest generates requests for GetApiAuthDeleteUserCallback
|
|
func NewGetApiAuthDeleteUserCallbackRequest(server string, params *GetApiAuthDeleteUserCallbackParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/delete-user/callback")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
// queryValues collects non-styled parameters (passthrough, JSON)
|
|
// that are safe to round-trip through url.Values.Encode().
|
|
queryValues := queryURL.Query()
|
|
// rawQueryFragments collects pre-encoded query fragments from
|
|
// styled parameters, preserving literal commas as delimiters
|
|
// per the OpenAPI spec (e.g. "color=blue,black,brown").
|
|
var rawQueryFragments []string
|
|
|
|
if params.Token != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "token", *params.Token, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.CallbackURL != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "callbackURL", *params.CallbackURL, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if encoded := queryValues.Encode(); encoded != "" {
|
|
rawQueryFragments = append(rawQueryFragments, encoded)
|
|
}
|
|
queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetApiAuthDeviceRequest generates requests for GetApiAuthDevice
|
|
func NewGetApiAuthDeviceRequest(server string, params *GetApiAuthDeviceParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/device")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
// queryValues collects non-styled parameters (passthrough, JSON)
|
|
// that are safe to round-trip through url.Values.Encode().
|
|
queryValues := queryURL.Query()
|
|
// rawQueryFragments collects pre-encoded query fragments from
|
|
// styled parameters, preserving literal commas as delimiters
|
|
// per the OpenAPI spec (e.g. "color=blue,black,brown").
|
|
var rawQueryFragments []string
|
|
|
|
if params.UserCode != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "user_code", *params.UserCode, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if encoded := queryValues.Encode(); encoded != "" {
|
|
rawQueryFragments = append(rawQueryFragments, encoded)
|
|
}
|
|
queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPostApiAuthDeviceApproveRequest calls the generic PostApiAuthDeviceApprove builder with application/json body
|
|
func NewPostApiAuthDeviceApproveRequest(server string, body PostApiAuthDeviceApproveJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewPostApiAuthDeviceApproveRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewPostApiAuthDeviceApproveRequestWithBody generates requests for PostApiAuthDeviceApprove with any type of body
|
|
func NewPostApiAuthDeviceApproveRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/device/approve")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPostApiAuthDeviceCodeRequest calls the generic PostApiAuthDeviceCode builder with application/json body
|
|
func NewPostApiAuthDeviceCodeRequest(server string, body PostApiAuthDeviceCodeJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewPostApiAuthDeviceCodeRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewPostApiAuthDeviceCodeRequestWithBody generates requests for PostApiAuthDeviceCode with any type of body
|
|
func NewPostApiAuthDeviceCodeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/device/code")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPostApiAuthDeviceDenyRequest calls the generic PostApiAuthDeviceDeny builder with application/json body
|
|
func NewPostApiAuthDeviceDenyRequest(server string, body PostApiAuthDeviceDenyJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewPostApiAuthDeviceDenyRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewPostApiAuthDeviceDenyRequestWithBody generates requests for PostApiAuthDeviceDeny with any type of body
|
|
func NewPostApiAuthDeviceDenyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/device/deny")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPostApiAuthDeviceTokenRequest calls the generic PostApiAuthDeviceToken builder with application/json body
|
|
func NewPostApiAuthDeviceTokenRequest(server string, body PostApiAuthDeviceTokenJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewPostApiAuthDeviceTokenRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewPostApiAuthDeviceTokenRequestWithBody generates requests for PostApiAuthDeviceToken with any type of body
|
|
func NewPostApiAuthDeviceTokenRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/device/token")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetApiAuthErrorRequest generates requests for GetApiAuthError
|
|
func NewGetApiAuthErrorRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/error")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPostApiAuthGetAccessTokenRequest calls the generic PostApiAuthGetAccessToken builder with application/json body
|
|
func NewPostApiAuthGetAccessTokenRequest(server string, body PostApiAuthGetAccessTokenJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewPostApiAuthGetAccessTokenRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewPostApiAuthGetAccessTokenRequestWithBody generates requests for PostApiAuthGetAccessToken with any type of body
|
|
func NewPostApiAuthGetAccessTokenRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/get-access-token")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetSessionRequest generates requests for GetSession
|
|
func NewGetSessionRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/get-session")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetSessionPostRequest calls the generic GetSessionPost builder with application/json body
|
|
func NewGetSessionPostRequest(server string, body GetSessionPostJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewGetSessionPostRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewGetSessionPostRequestWithBody generates requests for GetSessionPost with any type of body
|
|
func NewGetSessionPostRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/get-session")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPostApiAuthIsUsernameAvailableRequest calls the generic PostApiAuthIsUsernameAvailable builder with application/json body
|
|
func NewPostApiAuthIsUsernameAvailableRequest(server string, body PostApiAuthIsUsernameAvailableJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewPostApiAuthIsUsernameAvailableRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewPostApiAuthIsUsernameAvailableRequestWithBody generates requests for PostApiAuthIsUsernameAvailable with any type of body
|
|
func NewPostApiAuthIsUsernameAvailableRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/is-username-available")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewLinkSocialAccountRequest calls the generic LinkSocialAccount builder with application/json body
|
|
func NewLinkSocialAccountRequest(server string, body LinkSocialAccountJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewLinkSocialAccountRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewLinkSocialAccountRequestWithBody generates requests for LinkSocialAccount with any type of body
|
|
func NewLinkSocialAccountRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/link-social")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListUserAccountsRequest generates requests for ListUserAccounts
|
|
func NewListUserAccountsRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/list-accounts")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListUserSessionsRequest generates requests for ListUserSessions
|
|
func NewListUserSessionsRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/list-sessions")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetApiAuthOauth2CallbackProviderIdRequest generates requests for GetApiAuthOauth2CallbackProviderId
|
|
func NewGetApiAuthOauth2CallbackProviderIdRequest(server string, providerId string, params *GetApiAuthOauth2CallbackProviderIdParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "providerId", providerId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/oauth2/callback/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
// queryValues collects non-styled parameters (passthrough, JSON)
|
|
// that are safe to round-trip through url.Values.Encode().
|
|
queryValues := queryURL.Query()
|
|
// rawQueryFragments collects pre-encoded query fragments from
|
|
// styled parameters, preserving literal commas as delimiters
|
|
// per the OpenAPI spec (e.g. "color=blue,black,brown").
|
|
var rawQueryFragments []string
|
|
|
|
if params.Code != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "code", *params.Code, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.Error != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "error", *params.Error, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.ErrorDescription != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "error_description", *params.ErrorDescription, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.State != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "state", *params.State, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.Iss != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "iss", *params.Iss, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if encoded := queryValues.Encode(); encoded != "" {
|
|
rawQueryFragments = append(rawQueryFragments, encoded)
|
|
}
|
|
queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPostApiAuthOauth2LinkRequest calls the generic PostApiAuthOauth2Link builder with application/json body
|
|
func NewPostApiAuthOauth2LinkRequest(server string, body PostApiAuthOauth2LinkJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewPostApiAuthOauth2LinkRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewPostApiAuthOauth2LinkRequestWithBody generates requests for PostApiAuthOauth2Link with any type of body
|
|
func NewPostApiAuthOauth2LinkRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/oauth2/link")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetApiAuthOkRequest generates requests for GetApiAuthOk
|
|
func NewGetApiAuthOkRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/ok")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPostApiAuthOrganizationAcceptInvitationRequest calls the generic PostApiAuthOrganizationAcceptInvitation builder with application/json body
|
|
func NewPostApiAuthOrganizationAcceptInvitationRequest(server string, body PostApiAuthOrganizationAcceptInvitationJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewPostApiAuthOrganizationAcceptInvitationRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewPostApiAuthOrganizationAcceptInvitationRequestWithBody generates requests for PostApiAuthOrganizationAcceptInvitation with any type of body
|
|
func NewPostApiAuthOrganizationAcceptInvitationRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/organization/accept-invitation")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPostApiAuthOrganizationCancelInvitationRequest calls the generic PostApiAuthOrganizationCancelInvitation builder with application/json body
|
|
func NewPostApiAuthOrganizationCancelInvitationRequest(server string, body PostApiAuthOrganizationCancelInvitationJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewPostApiAuthOrganizationCancelInvitationRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewPostApiAuthOrganizationCancelInvitationRequestWithBody generates requests for PostApiAuthOrganizationCancelInvitation with any type of body
|
|
func NewPostApiAuthOrganizationCancelInvitationRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/organization/cancel-invitation")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPostApiAuthOrganizationCheckSlugRequest calls the generic PostApiAuthOrganizationCheckSlug builder with application/json body
|
|
func NewPostApiAuthOrganizationCheckSlugRequest(server string, body PostApiAuthOrganizationCheckSlugJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewPostApiAuthOrganizationCheckSlugRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewPostApiAuthOrganizationCheckSlugRequestWithBody generates requests for PostApiAuthOrganizationCheckSlug with any type of body
|
|
func NewPostApiAuthOrganizationCheckSlugRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/organization/check-slug")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPostApiAuthOrganizationCreateRequest calls the generic PostApiAuthOrganizationCreate builder with application/json body
|
|
func NewPostApiAuthOrganizationCreateRequest(server string, body PostApiAuthOrganizationCreateJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewPostApiAuthOrganizationCreateRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewPostApiAuthOrganizationCreateRequestWithBody generates requests for PostApiAuthOrganizationCreate with any type of body
|
|
func NewPostApiAuthOrganizationCreateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/organization/create")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPostApiAuthOrganizationDeleteRequest calls the generic PostApiAuthOrganizationDelete builder with application/json body
|
|
func NewPostApiAuthOrganizationDeleteRequest(server string, body PostApiAuthOrganizationDeleteJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewPostApiAuthOrganizationDeleteRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewPostApiAuthOrganizationDeleteRequestWithBody generates requests for PostApiAuthOrganizationDelete with any type of body
|
|
func NewPostApiAuthOrganizationDeleteRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/organization/delete")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetApiAuthOrganizationGetActiveMemberRequest generates requests for GetApiAuthOrganizationGetActiveMember
|
|
func NewGetApiAuthOrganizationGetActiveMemberRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/organization/get-active-member")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetApiAuthOrganizationGetActiveMemberRoleRequest generates requests for GetApiAuthOrganizationGetActiveMemberRole
|
|
func NewGetApiAuthOrganizationGetActiveMemberRoleRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/organization/get-active-member-role")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetOrganizationRequest generates requests for GetOrganization
|
|
func NewGetOrganizationRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/organization/get-full-organization")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetApiAuthOrganizationGetInvitationRequest generates requests for GetApiAuthOrganizationGetInvitation
|
|
func NewGetApiAuthOrganizationGetInvitationRequest(server string, params *GetApiAuthOrganizationGetInvitationParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/organization/get-invitation")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
// queryValues collects non-styled parameters (passthrough, JSON)
|
|
// that are safe to round-trip through url.Values.Encode().
|
|
queryValues := queryURL.Query()
|
|
// rawQueryFragments collects pre-encoded query fragments from
|
|
// styled parameters, preserving literal commas as delimiters
|
|
// per the OpenAPI spec (e.g. "color=blue,black,brown").
|
|
var rawQueryFragments []string
|
|
|
|
if params.Id != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "id", *params.Id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if encoded := queryValues.Encode(); encoded != "" {
|
|
rawQueryFragments = append(rawQueryFragments, encoded)
|
|
}
|
|
queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPostApiAuthOrganizationHasPermissionRequest calls the generic PostApiAuthOrganizationHasPermission builder with application/json body
|
|
func NewPostApiAuthOrganizationHasPermissionRequest(server string, body PostApiAuthOrganizationHasPermissionJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewPostApiAuthOrganizationHasPermissionRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewPostApiAuthOrganizationHasPermissionRequestWithBody generates requests for PostApiAuthOrganizationHasPermission with any type of body
|
|
func NewPostApiAuthOrganizationHasPermissionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/organization/has-permission")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewCreateOrganizationInvitationRequest calls the generic CreateOrganizationInvitation builder with application/json body
|
|
func NewCreateOrganizationInvitationRequest(server string, body CreateOrganizationInvitationJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewCreateOrganizationInvitationRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewCreateOrganizationInvitationRequestWithBody generates requests for CreateOrganizationInvitation with any type of body
|
|
func NewCreateOrganizationInvitationRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/organization/invite-member")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPostApiAuthOrganizationLeaveRequest calls the generic PostApiAuthOrganizationLeave builder with application/json body
|
|
func NewPostApiAuthOrganizationLeaveRequest(server string, body PostApiAuthOrganizationLeaveJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewPostApiAuthOrganizationLeaveRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewPostApiAuthOrganizationLeaveRequestWithBody generates requests for PostApiAuthOrganizationLeave with any type of body
|
|
func NewPostApiAuthOrganizationLeaveRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/organization/leave")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetApiAuthOrganizationListRequest generates requests for GetApiAuthOrganizationList
|
|
func NewGetApiAuthOrganizationListRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/organization/list")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetApiAuthOrganizationListInvitationsRequest generates requests for GetApiAuthOrganizationListInvitations
|
|
func NewGetApiAuthOrganizationListInvitationsRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/organization/list-invitations")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetApiAuthOrganizationListMembersRequest generates requests for GetApiAuthOrganizationListMembers
|
|
func NewGetApiAuthOrganizationListMembersRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/organization/list-members")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetApiAuthOrganizationListUserInvitationsRequest generates requests for GetApiAuthOrganizationListUserInvitations
|
|
func NewGetApiAuthOrganizationListUserInvitationsRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/organization/list-user-invitations")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPostApiAuthOrganizationRejectInvitationRequest calls the generic PostApiAuthOrganizationRejectInvitation builder with application/json body
|
|
func NewPostApiAuthOrganizationRejectInvitationRequest(server string, body PostApiAuthOrganizationRejectInvitationJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewPostApiAuthOrganizationRejectInvitationRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewPostApiAuthOrganizationRejectInvitationRequestWithBody generates requests for PostApiAuthOrganizationRejectInvitation with any type of body
|
|
func NewPostApiAuthOrganizationRejectInvitationRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/organization/reject-invitation")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPostApiAuthOrganizationRemoveMemberRequest calls the generic PostApiAuthOrganizationRemoveMember builder with application/json body
|
|
func NewPostApiAuthOrganizationRemoveMemberRequest(server string, body PostApiAuthOrganizationRemoveMemberJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewPostApiAuthOrganizationRemoveMemberRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewPostApiAuthOrganizationRemoveMemberRequestWithBody generates requests for PostApiAuthOrganizationRemoveMember with any type of body
|
|
func NewPostApiAuthOrganizationRemoveMemberRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/organization/remove-member")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewSetActiveOrganizationRequest calls the generic SetActiveOrganization builder with application/json body
|
|
func NewSetActiveOrganizationRequest(server string, body SetActiveOrganizationJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewSetActiveOrganizationRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewSetActiveOrganizationRequestWithBody generates requests for SetActiveOrganization with any type of body
|
|
func NewSetActiveOrganizationRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/organization/set-active")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPostApiAuthOrganizationUpdateRequest calls the generic PostApiAuthOrganizationUpdate builder with application/json body
|
|
func NewPostApiAuthOrganizationUpdateRequest(server string, body PostApiAuthOrganizationUpdateJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewPostApiAuthOrganizationUpdateRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewPostApiAuthOrganizationUpdateRequestWithBody generates requests for PostApiAuthOrganizationUpdate with any type of body
|
|
func NewPostApiAuthOrganizationUpdateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/organization/update")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewUpdateOrganizationMemberRoleRequest calls the generic UpdateOrganizationMemberRole builder with application/json body
|
|
func NewUpdateOrganizationMemberRoleRequest(server string, body UpdateOrganizationMemberRoleJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewUpdateOrganizationMemberRoleRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewUpdateOrganizationMemberRoleRequestWithBody generates requests for UpdateOrganizationMemberRole with any type of body
|
|
func NewUpdateOrganizationMemberRoleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/organization/update-member-role")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPostApiAuthRefreshTokenRequest calls the generic PostApiAuthRefreshToken builder with application/json body
|
|
func NewPostApiAuthRefreshTokenRequest(server string, body PostApiAuthRefreshTokenJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewPostApiAuthRefreshTokenRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewPostApiAuthRefreshTokenRequestWithBody generates requests for PostApiAuthRefreshToken with any type of body
|
|
func NewPostApiAuthRefreshTokenRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/refresh-token")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewRequestPasswordResetRequest calls the generic RequestPasswordReset builder with application/json body
|
|
func NewRequestPasswordResetRequest(server string, body RequestPasswordResetJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewRequestPasswordResetRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewRequestPasswordResetRequestWithBody generates requests for RequestPasswordReset with any type of body
|
|
func NewRequestPasswordResetRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/request-password-reset")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewResetPasswordRequest calls the generic ResetPassword builder with application/json body
|
|
func NewResetPasswordRequest(server string, body ResetPasswordJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewResetPasswordRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewResetPasswordRequestWithBody generates requests for ResetPassword with any type of body
|
|
func NewResetPasswordRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/reset-password")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewResetPasswordCallbackRequest generates requests for ResetPasswordCallback
|
|
func NewResetPasswordCallbackRequest(server string, token string, params *ResetPasswordCallbackParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "token", token, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/reset-password/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
// queryValues collects non-styled parameters (passthrough, JSON)
|
|
// that are safe to round-trip through url.Values.Encode().
|
|
queryValues := queryURL.Query()
|
|
// rawQueryFragments collects pre-encoded query fragments from
|
|
// styled parameters, preserving literal commas as delimiters
|
|
// per the OpenAPI spec (e.g. "color=blue,black,brown").
|
|
var rawQueryFragments []string
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "callbackURL", params.CallbackURL, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
if encoded := queryValues.Encode(); encoded != "" {
|
|
rawQueryFragments = append(rawQueryFragments, encoded)
|
|
}
|
|
queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPostApiAuthRevokeOtherSessionsRequest calls the generic PostApiAuthRevokeOtherSessions builder with application/json body
|
|
func NewPostApiAuthRevokeOtherSessionsRequest(server string, body PostApiAuthRevokeOtherSessionsJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewPostApiAuthRevokeOtherSessionsRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewPostApiAuthRevokeOtherSessionsRequestWithBody generates requests for PostApiAuthRevokeOtherSessions with any type of body
|
|
func NewPostApiAuthRevokeOtherSessionsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/revoke-other-sessions")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPostApiAuthRevokeSessionRequest calls the generic PostApiAuthRevokeSession builder with application/json body
|
|
func NewPostApiAuthRevokeSessionRequest(server string, body PostApiAuthRevokeSessionJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewPostApiAuthRevokeSessionRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewPostApiAuthRevokeSessionRequestWithBody generates requests for PostApiAuthRevokeSession with any type of body
|
|
func NewPostApiAuthRevokeSessionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/revoke-session")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPostApiAuthRevokeSessionsRequest calls the generic PostApiAuthRevokeSessions builder with application/json body
|
|
func NewPostApiAuthRevokeSessionsRequest(server string, body PostApiAuthRevokeSessionsJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewPostApiAuthRevokeSessionsRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewPostApiAuthRevokeSessionsRequestWithBody generates requests for PostApiAuthRevokeSessions with any type of body
|
|
func NewPostApiAuthRevokeSessionsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/revoke-sessions")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewSendVerificationEmailRequest calls the generic SendVerificationEmail builder with application/json body
|
|
func NewSendVerificationEmailRequest(server string, body SendVerificationEmailJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewSendVerificationEmailRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewSendVerificationEmailRequestWithBody generates requests for SendVerificationEmail with any type of body
|
|
func NewSendVerificationEmailRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/send-verification-email")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewSignInEmailRequest calls the generic SignInEmail builder with application/json body
|
|
func NewSignInEmailRequest(server string, body SignInEmailJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewSignInEmailRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewSignInEmailRequestWithBody generates requests for SignInEmail with any type of body
|
|
func NewSignInEmailRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/sign-in/email")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPostApiAuthSignInOauth2Request calls the generic PostApiAuthSignInOauth2 builder with application/json body
|
|
func NewPostApiAuthSignInOauth2Request(server string, body PostApiAuthSignInOauth2JSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewPostApiAuthSignInOauth2RequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewPostApiAuthSignInOauth2RequestWithBody generates requests for PostApiAuthSignInOauth2 with any type of body
|
|
func NewPostApiAuthSignInOauth2RequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/sign-in/oauth2")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewSocialSignInRequest calls the generic SocialSignIn builder with application/json body
|
|
func NewSocialSignInRequest(server string, body SocialSignInJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewSocialSignInRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewSocialSignInRequestWithBody generates requests for SocialSignIn with any type of body
|
|
func NewSocialSignInRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/sign-in/social")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPostApiAuthSignInUsernameRequest calls the generic PostApiAuthSignInUsername builder with application/json body
|
|
func NewPostApiAuthSignInUsernameRequest(server string, body PostApiAuthSignInUsernameJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewPostApiAuthSignInUsernameRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewPostApiAuthSignInUsernameRequestWithBody generates requests for PostApiAuthSignInUsername with any type of body
|
|
func NewPostApiAuthSignInUsernameRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/sign-in/username")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewSignOutRequest calls the generic SignOut builder with application/json body
|
|
func NewSignOutRequest(server string, body SignOutJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewSignOutRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewSignOutRequestWithBody generates requests for SignOut with any type of body
|
|
func NewSignOutRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/sign-out")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewSignUpWithEmailAndPasswordRequest calls the generic SignUpWithEmailAndPassword builder with application/json body
|
|
func NewSignUpWithEmailAndPasswordRequest(server string, body SignUpWithEmailAndPasswordJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewSignUpWithEmailAndPasswordRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewSignUpWithEmailAndPasswordRequestWithBody generates requests for SignUpWithEmailAndPassword with any type of body
|
|
func NewSignUpWithEmailAndPasswordRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/sign-up/email")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPostApiAuthUnlinkAccountRequest calls the generic PostApiAuthUnlinkAccount builder with application/json body
|
|
func NewPostApiAuthUnlinkAccountRequest(server string, body PostApiAuthUnlinkAccountJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewPostApiAuthUnlinkAccountRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewPostApiAuthUnlinkAccountRequestWithBody generates requests for PostApiAuthUnlinkAccount with any type of body
|
|
func NewPostApiAuthUnlinkAccountRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/unlink-account")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewUpdateSessionRequest calls the generic UpdateSession builder with application/json body
|
|
func NewUpdateSessionRequest(server string, body UpdateSessionJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewUpdateSessionRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewUpdateSessionRequestWithBody generates requests for UpdateSession with any type of body
|
|
func NewUpdateSessionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/update-session")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewUpdateUserRequest calls the generic UpdateUser builder with application/json body
|
|
func NewUpdateUserRequest(server string, body UpdateUserJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewUpdateUserRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewUpdateUserRequestWithBody generates requests for UpdateUser with any type of body
|
|
func NewUpdateUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/update-user")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetApiAuthVerifyEmailRequest generates requests for GetApiAuthVerifyEmail
|
|
func NewGetApiAuthVerifyEmailRequest(server string, params *GetApiAuthVerifyEmailParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/verify-email")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
// queryValues collects non-styled parameters (passthrough, JSON)
|
|
// that are safe to round-trip through url.Values.Encode().
|
|
queryValues := queryURL.Query()
|
|
// rawQueryFragments collects pre-encoded query fragments from
|
|
// styled parameters, preserving literal commas as delimiters
|
|
// per the OpenAPI spec (e.g. "color=blue,black,brown").
|
|
var rawQueryFragments []string
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "token", params.Token, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
if params.CallbackURL != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "callbackURL", *params.CallbackURL, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if encoded := queryValues.Encode(); encoded != "" {
|
|
rawQueryFragments = append(rawQueryFragments, encoded)
|
|
}
|
|
queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewVerifyPasswordRequest calls the generic VerifyPassword builder with application/json body
|
|
func NewVerifyPasswordRequest(server string, body VerifyPasswordJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewVerifyPasswordRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewVerifyPasswordRequestWithBody generates requests for VerifyPassword with any type of body
|
|
func NewVerifyPasswordRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/auth/verify-password")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListBackgroundJobsRequest generates requests for ListBackgroundJobs
|
|
func NewListBackgroundJobsRequest(server string, params *ListBackgroundJobsParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/background-jobs")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
// queryValues collects non-styled parameters (passthrough, JSON)
|
|
// that are safe to round-trip through url.Values.Encode().
|
|
queryValues := queryURL.Query()
|
|
// rawQueryFragments collects pre-encoded query fragments from
|
|
// styled parameters, preserving literal commas as delimiters
|
|
// per the OpenAPI spec (e.g. "color=blue,black,brown").
|
|
var rawQueryFragments []string
|
|
|
|
if params.Status != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "status", *params.Status, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.Type != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "type", *params.Type, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.Page != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "page", *params.Page, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.PageSize != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "pageSize", *params.PageSize, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if encoded := queryValues.Encode(); encoded != "" {
|
|
rawQueryFragments = append(rawQueryFragments, encoded)
|
|
}
|
|
queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewCreateBackgroundJobRequest calls the generic CreateBackgroundJob builder with application/json body
|
|
func NewCreateBackgroundJobRequest(server string, body CreateBackgroundJobJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewCreateBackgroundJobRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewCreateBackgroundJobRequestWithBody generates requests for CreateBackgroundJob with any type of body
|
|
func NewCreateBackgroundJobRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/background-jobs")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetBackgroundJobRequest generates requests for GetBackgroundJob
|
|
func NewGetBackgroundJobRequest(server string, id string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/background-jobs/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewRetryBackgroundJobRequest generates requests for RetryBackgroundJob
|
|
func NewRetryBackgroundJobRequest(server string, id string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/background-jobs/%s/retries", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewCancelBackgroundJobRequest calls the generic CancelBackgroundJob builder with application/json body
|
|
func NewCancelBackgroundJobRequest(server string, id string, body CancelBackgroundJobJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewCancelBackgroundJobRequestWithBody(server, id, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewCancelBackgroundJobRequestWithBody generates requests for CancelBackgroundJob with any type of body
|
|
func NewCancelBackgroundJobRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/background-jobs/%s/status", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPut, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListDownloadersRequest generates requests for ListDownloaders
|
|
func NewListDownloadersRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/downloads/downloaders")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewCreateDownloaderRequest calls the generic CreateDownloader builder with application/json body
|
|
func NewCreateDownloaderRequest(server string, body CreateDownloaderJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewCreateDownloaderRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewCreateDownloaderRequestWithBody generates requests for CreateDownloader with any type of body
|
|
func NewCreateDownloaderRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/downloads/downloaders")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewRecordDownloaderHeartbeatRequest calls the generic RecordDownloaderHeartbeat builder with application/json body
|
|
func NewRecordDownloaderHeartbeatRequest(server string, body RecordDownloaderHeartbeatJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewRecordDownloaderHeartbeatRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewRecordDownloaderHeartbeatRequestWithBody generates requests for RecordDownloaderHeartbeat with any type of body
|
|
func NewRecordDownloaderHeartbeatRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/downloads/downloaders/me/heartbeats")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewDeleteDownloaderRequest generates requests for DeleteDownloader
|
|
func NewDeleteDownloaderRequest(server string, id string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/downloads/downloaders/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewUpdateDownloaderRequest calls the generic UpdateDownloader builder with application/json body
|
|
func NewUpdateDownloaderRequest(server string, id string, body UpdateDownloaderJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewUpdateDownloaderRequestWithBody(server, id, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewUpdateDownloaderRequestWithBody generates requests for UpdateDownloader with any type of body
|
|
func NewUpdateDownloaderRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/downloads/downloaders/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListDownloadTasksRequest generates requests for ListDownloadTasks
|
|
func NewListDownloadTasksRequest(server string, params *ListDownloadTasksParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/downloads/tasks")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
// queryValues collects non-styled parameters (passthrough, JSON)
|
|
// that are safe to round-trip through url.Values.Encode().
|
|
queryValues := queryURL.Query()
|
|
// rawQueryFragments collects pre-encoded query fragments from
|
|
// styled parameters, preserving literal commas as delimiters
|
|
// per the OpenAPI spec (e.g. "color=blue,black,brown").
|
|
var rawQueryFragments []string
|
|
|
|
if params.Status != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "status", *params.Status, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.AssignedTo != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "assignedTo", *params.AssignedTo, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.Category != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "category", *params.Category, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.Tag != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "tag", *params.Tag, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.SortBy != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "sortBy", *params.SortBy, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.SortDir != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "sortDir", *params.SortDir, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.Page != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "page", *params.Page, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.PageSize != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "pageSize", *params.PageSize, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if encoded := queryValues.Encode(); encoded != "" {
|
|
rawQueryFragments = append(rawQueryFragments, encoded)
|
|
}
|
|
queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewCreateDownloadTaskRequest calls the generic CreateDownloadTask builder with application/json body
|
|
func NewCreateDownloadTaskRequest(server string, body CreateDownloadTaskJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewCreateDownloadTaskRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewCreateDownloadTaskRequestWithBody generates requests for CreateDownloadTask with any type of body
|
|
func NewCreateDownloadTaskRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/downloads/tasks")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewDeleteDownloadTaskRequest generates requests for DeleteDownloadTask
|
|
func NewDeleteDownloadTaskRequest(server string, id string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/downloads/tasks/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetDownloadTaskRequest generates requests for GetDownloadTask
|
|
func NewGetDownloadTaskRequest(server string, id string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/downloads/tasks/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewUpdateDownloadTaskRequest calls the generic UpdateDownloadTask builder with application/json body
|
|
func NewUpdateDownloadTaskRequest(server string, id string, body UpdateDownloadTaskJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewUpdateDownloadTaskRequestWithBody(server, id, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewUpdateDownloadTaskRequestWithBody generates requests for UpdateDownloadTask with any type of body
|
|
func NewUpdateDownloadTaskRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/downloads/tasks/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewRetryDownloadTaskRequest calls the generic RetryDownloadTask builder with application/json body
|
|
func NewRetryDownloadTaskRequest(server string, id string, body RetryDownloadTaskJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewRetryDownloadTaskRequestWithBody(server, id, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewRetryDownloadTaskRequestWithBody generates requests for RetryDownloadTask with any type of body
|
|
func NewRetryDownloadTaskRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/downloads/tasks/%s/attempts", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewSetDownloadTaskStatusRequest calls the generic SetDownloadTaskStatus builder with application/json body
|
|
func NewSetDownloadTaskStatusRequest(server string, id string, body SetDownloadTaskStatusJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewSetDownloadTaskStatusRequestWithBody(server, id, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewSetDownloadTaskStatusRequestWithBody generates requests for SetDownloadTaskStatus with any type of body
|
|
func NewSetDownloadTaskStatusRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/downloads/tasks/%s/status", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPut, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewStreamEventsRequest generates requests for StreamEvents
|
|
func NewStreamEventsRequest(server string, params *StreamEventsParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/events")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
// queryValues collects non-styled parameters (passthrough, JSON)
|
|
// that are safe to round-trip through url.Values.Encode().
|
|
queryValues := queryURL.Query()
|
|
// rawQueryFragments collects pre-encoded query fragments from
|
|
// styled parameters, preserving literal commas as delimiters
|
|
// per the OpenAPI spec (e.g. "color=blue,black,brown").
|
|
var rawQueryFragments []string
|
|
|
|
if params.DownloadTasks != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "downloadTasks", *params.DownloadTasks, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.DtStatus != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "dtStatus", *params.DtStatus, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.DtCategory != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "dtCategory", *params.DtCategory, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.DtTag != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "dtTag", *params.DtTag, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.DtSortBy != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "dtSortBy", *params.DtSortBy, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.DtSortDir != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "dtSortDir", *params.DtSortDir, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if encoded := queryValues.Encode(); encoded != "" {
|
|
rawQueryFragments = append(rawQueryFragments, encoded)
|
|
}
|
|
queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewDeleteImageHostingConfigRequest generates requests for DeleteImageHostingConfig
|
|
func NewDeleteImageHostingConfigRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/image-hosting/config")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetImageHostingConfigRequest generates requests for GetImageHostingConfig
|
|
func NewGetImageHostingConfigRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/image-hosting/config")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewUpdateImageHostingConfigRequest calls the generic UpdateImageHostingConfig builder with application/json body
|
|
func NewUpdateImageHostingConfigRequest(server string, body UpdateImageHostingConfigJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewUpdateImageHostingConfigRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewUpdateImageHostingConfigRequestWithBody generates requests for UpdateImageHostingConfig with any type of body
|
|
func NewUpdateImageHostingConfigRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/image-hosting/config")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPut, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListImageHostingsRequest generates requests for ListImageHostings
|
|
func NewListImageHostingsRequest(server string, params *ListImageHostingsParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/image-hosting/images")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
// queryValues collects non-styled parameters (passthrough, JSON)
|
|
// that are safe to round-trip through url.Values.Encode().
|
|
queryValues := queryURL.Query()
|
|
// rawQueryFragments collects pre-encoded query fragments from
|
|
// styled parameters, preserving literal commas as delimiters
|
|
// per the OpenAPI spec (e.g. "color=blue,black,brown").
|
|
var rawQueryFragments []string
|
|
|
|
if params.PathPrefix != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "pathPrefix", *params.PathPrefix, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.Cursor != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "cursor", *params.Cursor, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.Limit != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if encoded := queryValues.Encode(); encoded != "" {
|
|
rawQueryFragments = append(rawQueryFragments, encoded)
|
|
}
|
|
queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPresignImageHostingUploadRequest calls the generic PresignImageHostingUpload builder with application/json body
|
|
func NewPresignImageHostingUploadRequest(server string, body PresignImageHostingUploadJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewPresignImageHostingUploadRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewPresignImageHostingUploadRequestWithBody generates requests for PresignImageHostingUpload with any type of body
|
|
func NewPresignImageHostingUploadRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/image-hosting/images/presign")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewDeleteImageHostingRequest generates requests for DeleteImageHosting
|
|
func NewDeleteImageHostingRequest(server string, id string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/image-hosting/images/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetImageHostingRequest generates requests for GetImageHosting
|
|
func NewGetImageHostingRequest(server string, id string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/image-hosting/images/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewConfirmImageHostingRequest generates requests for ConfirmImageHosting
|
|
func NewConfirmImageHostingRequest(server string, id string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/image-hosting/images/%s/status", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPut, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListNotificationsRequest generates requests for ListNotifications
|
|
func NewListNotificationsRequest(server string, params *ListNotificationsParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/notifications")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
// queryValues collects non-styled parameters (passthrough, JSON)
|
|
// that are safe to round-trip through url.Values.Encode().
|
|
queryValues := queryURL.Query()
|
|
// rawQueryFragments collects pre-encoded query fragments from
|
|
// styled parameters, preserving literal commas as delimiters
|
|
// per the OpenAPI spec (e.g. "color=blue,black,brown").
|
|
var rawQueryFragments []string
|
|
|
|
if params.Page != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "page", *params.Page, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.PageSize != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "pageSize", *params.PageSize, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.Unread != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "unread", *params.Unread, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if encoded := queryValues.Encode(); encoded != "" {
|
|
rawQueryFragments = append(rawQueryFragments, encoded)
|
|
}
|
|
queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewMarkAllNotificationsReadRequest generates requests for MarkAllNotificationsRead
|
|
func NewMarkAllNotificationsReadRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/notifications")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPatch, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetNotificationStatsRequest generates requests for GetNotificationStats
|
|
func NewGetNotificationStatsRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/notifications/stats")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewMarkNotificationReadRequest generates requests for MarkNotificationRead
|
|
func NewMarkNotificationReadRequest(server string, id string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/notifications/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPatch, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListObjectsRequest generates requests for ListObjects
|
|
func NewListObjectsRequest(server string, params *ListObjectsParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/objects")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
// queryValues collects non-styled parameters (passthrough, JSON)
|
|
// that are safe to round-trip through url.Values.Encode().
|
|
queryValues := queryURL.Query()
|
|
// rawQueryFragments collects pre-encoded query fragments from
|
|
// styled parameters, preserving literal commas as delimiters
|
|
// per the OpenAPI spec (e.g. "color=blue,black,brown").
|
|
var rawQueryFragments []string
|
|
|
|
if params.Page != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "page", *params.Page, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.PageSize != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "pageSize", *params.PageSize, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.Parent != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "parent", *params.Parent, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.Path != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "path", *params.Path, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.Type != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "type", *params.Type, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.Search != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "search", *params.Search, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.OrgId != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "orgId", *params.OrgId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if encoded := queryValues.Encode(); encoded != "" {
|
|
rawQueryFragments = append(rawQueryFragments, encoded)
|
|
}
|
|
queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewCreateObjectRequest calls the generic CreateObject builder with application/json body
|
|
func NewCreateObjectRequest(server string, body CreateObjectJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewCreateObjectRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewCreateObjectRequestWithBody generates requests for CreateObject with any type of body
|
|
func NewCreateObjectRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/objects")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewDeleteObjectRequest generates requests for DeleteObject
|
|
func NewDeleteObjectRequest(server string, id string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/objects/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetObjectRequest generates requests for GetObject
|
|
func NewGetObjectRequest(server string, id string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/objects/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewUpdateObjectRequest calls the generic UpdateObject builder with application/json body
|
|
func NewUpdateObjectRequest(server string, id string, body UpdateObjectJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewUpdateObjectRequestWithBody(server, id, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewUpdateObjectRequestWithBody generates requests for UpdateObject with any type of body
|
|
func NewUpdateObjectRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/objects/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewCopyObjectRequest calls the generic CopyObject builder with application/json body
|
|
func NewCopyObjectRequest(server string, id string, body CopyObjectJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewCopyObjectRequestWithBody(server, id, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewCopyObjectRequestWithBody generates requests for CopyObject with any type of body
|
|
func NewCopyObjectRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/objects/%s/copies", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewTransferObjectRequest calls the generic TransferObject builder with application/json body
|
|
func NewTransferObjectRequest(server string, id string, body TransferObjectJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewTransferObjectRequestWithBody(server, id, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewTransferObjectRequestWithBody generates requests for TransferObject with any type of body
|
|
func NewTransferObjectRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/objects/%s/transfers", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewAbortObjectUploadRequest generates requests for AbortObjectUpload
|
|
func NewAbortObjectUploadRequest(server string, id string, uploadSessionId string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
var pathParam1 string
|
|
|
|
pathParam1, err = runtime.StyleParamWithOptions("simple", false, "uploadSessionId", uploadSessionId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/objects/%s/uploads/%s", pathParam0, pathParam1)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewCompleteObjectUploadRequest calls the generic CompleteObjectUpload builder with application/json body
|
|
func NewCompleteObjectUploadRequest(server string, id string, uploadSessionId string, body CompleteObjectUploadJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewCompleteObjectUploadRequestWithBody(server, id, uploadSessionId, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewCompleteObjectUploadRequestWithBody generates requests for CompleteObjectUpload with any type of body
|
|
func NewCompleteObjectUploadRequestWithBody(server string, id string, uploadSessionId string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
var pathParam1 string
|
|
|
|
pathParam1, err = runtime.StyleParamWithOptions("simple", false, "uploadSessionId", uploadSessionId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/objects/%s/uploads/%s/completions", pathParam0, pathParam1)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPresignObjectUploadPartsRequest calls the generic PresignObjectUploadParts builder with application/json body
|
|
func NewPresignObjectUploadPartsRequest(server string, id string, uploadSessionId string, body PresignObjectUploadPartsJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewPresignObjectUploadPartsRequestWithBody(server, id, uploadSessionId, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewPresignObjectUploadPartsRequestWithBody generates requests for PresignObjectUploadParts with any type of body
|
|
func NewPresignObjectUploadPartsRequestWithBody(server string, id string, uploadSessionId string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
var pathParam1 string
|
|
|
|
pathParam1, err = runtime.StyleParamWithOptions("simple", false, "uploadSessionId", uploadSessionId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/objects/%s/uploads/%s/parts", pathParam0, pathParam1)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListQuotaOverviewRequest generates requests for ListQuotaOverview
|
|
func NewListQuotaOverviewRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/quotas")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetMyQuotaRequest generates requests for GetMyQuota
|
|
func NewGetMyQuotaRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/quotas/me")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListSharesRequest generates requests for ListShares
|
|
func NewListSharesRequest(server string, params *ListSharesParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/shares")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
// queryValues collects non-styled parameters (passthrough, JSON)
|
|
// that are safe to round-trip through url.Values.Encode().
|
|
queryValues := queryURL.Query()
|
|
// rawQueryFragments collects pre-encoded query fragments from
|
|
// styled parameters, preserving literal commas as delimiters
|
|
// per the OpenAPI spec (e.g. "color=blue,black,brown").
|
|
var rawQueryFragments []string
|
|
|
|
if params.Page != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "page", *params.Page, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.PageSize != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "pageSize", *params.PageSize, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.Status != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "status", *params.Status, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.Box != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "box", *params.Box, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if encoded := queryValues.Encode(); encoded != "" {
|
|
rawQueryFragments = append(rawQueryFragments, encoded)
|
|
}
|
|
queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewCreateShareRequest calls the generic CreateShare builder with application/json body
|
|
func NewCreateShareRequest(server string, body CreateShareJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewCreateShareRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewCreateShareRequestWithBody generates requests for CreateShare with any type of body
|
|
func NewCreateShareRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/shares")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetShareRequest generates requests for GetShare
|
|
func NewGetShareRequest(server string, token string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "token", token, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/shares/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListShareObjectsRequest generates requests for ListShareObjects
|
|
func NewListShareObjectsRequest(server string, token string, params *ListShareObjectsParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "token", token, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/shares/%s/objects", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
// queryValues collects non-styled parameters (passthrough, JSON)
|
|
// that are safe to round-trip through url.Values.Encode().
|
|
queryValues := queryURL.Query()
|
|
// rawQueryFragments collects pre-encoded query fragments from
|
|
// styled parameters, preserving literal commas as delimiters
|
|
// per the OpenAPI spec (e.g. "color=blue,black,brown").
|
|
var rawQueryFragments []string
|
|
|
|
if params.Parent != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "parent", *params.Parent, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.Page != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "page", *params.Page, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.PageSize != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "pageSize", *params.PageSize, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if encoded := queryValues.Encode(); encoded != "" {
|
|
rawQueryFragments = append(rawQueryFragments, encoded)
|
|
}
|
|
queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewSaveShareRequest calls the generic SaveShare builder with application/json body
|
|
func NewSaveShareRequest(server string, token string, body SaveShareJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewSaveShareRequestWithBody(server, token, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewSaveShareRequestWithBody generates requests for SaveShare with any type of body
|
|
func NewSaveShareRequestWithBody(server string, token string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "token", token, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/shares/%s/objects", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewVerifySharePasswordRequest calls the generic VerifySharePassword builder with application/json body
|
|
func NewVerifySharePasswordRequest(server string, token string, body VerifySharePasswordJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewVerifySharePasswordRequestWithBody(server, token, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewVerifySharePasswordRequestWithBody generates requests for VerifySharePassword with any type of body
|
|
func NewVerifySharePasswordRequestWithBody(server string, token string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "token", token, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/shares/%s/sessions", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewRevokeShareRequest calls the generic RevokeShare builder with application/json body
|
|
func NewRevokeShareRequest(server string, token string, body RevokeShareJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewRevokeShareRequestWithBody(server, token, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewRevokeShareRequestWithBody generates requests for RevokeShare with any type of body
|
|
func NewRevokeShareRequestWithBody(server string, token string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "token", token, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/shares/%s/status", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPut, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListAnnouncementsRequest generates requests for ListAnnouncements
|
|
func NewListAnnouncementsRequest(server string, params *ListAnnouncementsParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/announcements")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
// queryValues collects non-styled parameters (passthrough, JSON)
|
|
// that are safe to round-trip through url.Values.Encode().
|
|
queryValues := queryURL.Query()
|
|
// rawQueryFragments collects pre-encoded query fragments from
|
|
// styled parameters, preserving literal commas as delimiters
|
|
// per the OpenAPI spec (e.g. "color=blue,black,brown").
|
|
var rawQueryFragments []string
|
|
|
|
if params.Page != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "page", *params.Page, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.PageSize != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "pageSize", *params.PageSize, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.Scope != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "scope", *params.Scope, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.Status != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "status", *params.Status, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if encoded := queryValues.Encode(); encoded != "" {
|
|
rawQueryFragments = append(rawQueryFragments, encoded)
|
|
}
|
|
queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewCreateAnnouncementRequest calls the generic CreateAnnouncement builder with application/json body
|
|
func NewCreateAnnouncementRequest(server string, body CreateAnnouncementJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewCreateAnnouncementRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewCreateAnnouncementRequestWithBody generates requests for CreateAnnouncement with any type of body
|
|
func NewCreateAnnouncementRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/announcements")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewDeleteAnnouncementRequest generates requests for DeleteAnnouncement
|
|
func NewDeleteAnnouncementRequest(server string, id string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/announcements/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetAnnouncementRequest generates requests for GetAnnouncement
|
|
func NewGetAnnouncementRequest(server string, id string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/announcements/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewUpdateAnnouncementRequest calls the generic UpdateAnnouncement builder with application/json body
|
|
func NewUpdateAnnouncementRequest(server string, id string, body UpdateAnnouncementJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewUpdateAnnouncementRequestWithBody(server, id, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewUpdateAnnouncementRequestWithBody generates requests for UpdateAnnouncement with any type of body
|
|
func NewUpdateAnnouncementRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/announcements/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPut, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListAuditEventsRequest generates requests for ListAuditEvents
|
|
func NewListAuditEventsRequest(server string, params *ListAuditEventsParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/audit-events")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
// queryValues collects non-styled parameters (passthrough, JSON)
|
|
// that are safe to round-trip through url.Values.Encode().
|
|
queryValues := queryURL.Query()
|
|
// rawQueryFragments collects pre-encoded query fragments from
|
|
// styled parameters, preserving literal commas as delimiters
|
|
// per the OpenAPI spec (e.g. "color=blue,black,brown").
|
|
var rawQueryFragments []string
|
|
|
|
if params.Page != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "page", *params.Page, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.PageSize != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "pageSize", *params.PageSize, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.OrgId != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "orgId", *params.OrgId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.UserId != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "userId", *params.UserId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.Action != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "action", *params.Action, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.TargetType != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "targetType", *params.TargetType, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if encoded := queryValues.Encode(); encoded != "" {
|
|
rawQueryFragments = append(rawQueryFragments, encoded)
|
|
}
|
|
queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListAuthProvidersRequest generates requests for ListAuthProviders
|
|
func NewListAuthProvidersRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/auth-providers")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewDeleteAuthProviderRequest generates requests for DeleteAuthProvider
|
|
func NewDeleteAuthProviderRequest(server string, providerId string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "providerId", providerId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/auth-providers/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewUpsertAuthProviderRequest calls the generic UpsertAuthProvider builder with application/json body
|
|
func NewUpsertAuthProviderRequest(server string, providerId string, body UpsertAuthProviderJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewUpsertAuthProviderRequestWithBody(server, providerId, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewUpsertAuthProviderRequestWithBody generates requests for UpsertAuthProvider with any type of body
|
|
func NewUpsertAuthProviderRequestWithBody(server string, providerId string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "providerId", providerId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/auth-providers/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPut, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetBrandingRequest generates requests for GetBranding
|
|
func NewGetBrandingRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/branding")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewUpdateBrandingRequest generates requests for UpdateBranding
|
|
func NewUpdateBrandingRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/branding")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPut, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewResetBrandingFieldRequest generates requests for ResetBrandingField
|
|
func NewResetBrandingFieldRequest(server string, field string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "field", field, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/branding/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetChangelogRequest generates requests for GetChangelog
|
|
func NewGetChangelogRequest(server string, params *GetChangelogParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/changelog")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
// queryValues collects non-styled parameters (passthrough, JSON)
|
|
// that are safe to round-trip through url.Values.Encode().
|
|
queryValues := queryURL.Query()
|
|
// rawQueryFragments collects pre-encoded query fragments from
|
|
// styled parameters, preserving literal commas as delimiters
|
|
// per the OpenAPI spec (e.g. "color=blue,black,brown").
|
|
var rawQueryFragments []string
|
|
|
|
if params.Refresh != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "refresh", *params.Refresh, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if encoded := queryValues.Encode(); encoded != "" {
|
|
rawQueryFragments = append(rawQueryFragments, encoded)
|
|
}
|
|
queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetEmailConfigRequest generates requests for GetEmailConfig
|
|
func NewGetEmailConfigRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/email")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewSaveEmailConfigRequest calls the generic SaveEmailConfig builder with application/json body
|
|
func NewSaveEmailConfigRequest(server string, body SaveEmailConfigJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewSaveEmailConfigRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewSaveEmailConfigRequestWithBody generates requests for SaveEmailConfig with any type of body
|
|
func NewSaveEmailConfigRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/email")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPut, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewSendTestEmailRequest calls the generic SendTestEmail builder with application/json body
|
|
func NewSendTestEmailRequest(server string, body SendTestEmailJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewSendTestEmailRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewSendTestEmailRequestWithBody generates requests for SendTestEmail with any type of body
|
|
func NewSendTestEmailRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/email/test-messages")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetInstanceInfoRequest generates requests for GetInstanceInfo
|
|
func NewGetInstanceInfoRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/instance")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListSiteInvitationsRequest generates requests for ListSiteInvitations
|
|
func NewListSiteInvitationsRequest(server string, params *ListSiteInvitationsParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/invitations")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
// queryValues collects non-styled parameters (passthrough, JSON)
|
|
// that are safe to round-trip through url.Values.Encode().
|
|
queryValues := queryURL.Query()
|
|
// rawQueryFragments collects pre-encoded query fragments from
|
|
// styled parameters, preserving literal commas as delimiters
|
|
// per the OpenAPI spec (e.g. "color=blue,black,brown").
|
|
var rawQueryFragments []string
|
|
|
|
if params.Page != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "page", *params.Page, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.PageSize != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "pageSize", *params.PageSize, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if encoded := queryValues.Encode(); encoded != "" {
|
|
rawQueryFragments = append(rawQueryFragments, encoded)
|
|
}
|
|
queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewCreateSiteInvitationRequest calls the generic CreateSiteInvitation builder with application/json body
|
|
func NewCreateSiteInvitationRequest(server string, body CreateSiteInvitationJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewCreateSiteInvitationRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewCreateSiteInvitationRequestWithBody generates requests for CreateSiteInvitation with any type of body
|
|
func NewCreateSiteInvitationRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/invitations")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewRevokeSiteInvitationRequest generates requests for RevokeSiteInvitation
|
|
func NewRevokeSiteInvitationRequest(server string, id string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/invitations/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewResendSiteInvitationRequest generates requests for ResendSiteInvitation
|
|
func NewResendSiteInvitationRequest(server string, id string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/invitations/%s/deliveries", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetSiteInvitationRequest generates requests for GetSiteInvitation
|
|
func NewGetSiteInvitationRequest(server string, token string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "token", token, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/invitations/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListInviteCodesRequest generates requests for ListInviteCodes
|
|
func NewListInviteCodesRequest(server string, params *ListInviteCodesParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/invite-codes")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
// queryValues collects non-styled parameters (passthrough, JSON)
|
|
// that are safe to round-trip through url.Values.Encode().
|
|
queryValues := queryURL.Query()
|
|
// rawQueryFragments collects pre-encoded query fragments from
|
|
// styled parameters, preserving literal commas as delimiters
|
|
// per the OpenAPI spec (e.g. "color=blue,black,brown").
|
|
var rawQueryFragments []string
|
|
|
|
if params.Page != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "page", *params.Page, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.PageSize != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "pageSize", *params.PageSize, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if encoded := queryValues.Encode(); encoded != "" {
|
|
rawQueryFragments = append(rawQueryFragments, encoded)
|
|
}
|
|
queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGenerateInviteCodesRequest calls the generic GenerateInviteCodes builder with application/json body
|
|
func NewGenerateInviteCodesRequest(server string, body GenerateInviteCodesJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewGenerateInviteCodesRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewGenerateInviteCodesRequestWithBody generates requests for GenerateInviteCodes with any type of body
|
|
func NewGenerateInviteCodesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/invite-codes")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewValidateInviteCodeRequest calls the generic ValidateInviteCode builder with application/json body
|
|
func NewValidateInviteCodeRequest(server string, body ValidateInviteCodeJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewValidateInviteCodeRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewValidateInviteCodeRequestWithBody generates requests for ValidateInviteCode with any type of body
|
|
func NewValidateInviteCodeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/invite-codes/validations")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewDeleteInviteCodeRequest generates requests for DeleteInviteCode
|
|
func NewDeleteInviteCodeRequest(server string, id string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/invite-codes/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewUnbindLicenseRequest generates requests for UnbindLicense
|
|
func NewUnbindLicenseRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/licensing/binding")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewInitiateLicensePairingRequest generates requests for InitiateLicensePairing
|
|
func NewInitiateLicensePairingRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/licensing/pairings")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPollLicensePairingRequest generates requests for PollLicensePairing
|
|
func NewPollLicensePairingRequest(server string, code string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "code", code, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/licensing/pairings/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewRefreshLicenseRequest generates requests for RefreshLicense
|
|
func NewRefreshLicenseRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/licensing/refresh-runs")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetLicensingStatusRequest generates requests for GetLicensingStatus
|
|
func NewGetLicensingStatusRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/licensing/status")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListSystemOptionsRequest generates requests for ListSystemOptions
|
|
func NewListSystemOptionsRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/options")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewDeleteSystemOptionRequest generates requests for DeleteSystemOption
|
|
func NewDeleteSystemOptionRequest(server string, key string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "key", key, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/options/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetSystemOptionRequest generates requests for GetSystemOption
|
|
func NewGetSystemOptionRequest(server string, key string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "key", key, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/options/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewSetSystemOptionRequest calls the generic SetSystemOption builder with application/json body
|
|
func NewSetSystemOptionRequest(server string, key string, body SetSystemOptionJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewSetSystemOptionRequestWithBody(server, key, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewSetSystemOptionRequestWithBody generates requests for SetSystemOption with any type of body
|
|
func NewSetSystemOptionRequestWithBody(server string, key string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "key", key, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/options/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPut, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListStoragesRequest generates requests for ListStorages
|
|
func NewListStoragesRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/storages")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewCreateStorageRequest calls the generic CreateStorage builder with application/json body
|
|
func NewCreateStorageRequest(server string, body CreateStorageJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewCreateStorageRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewCreateStorageRequestWithBody generates requests for CreateStorage with any type of body
|
|
func NewCreateStorageRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/storages")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewDeleteStorageRequest generates requests for DeleteStorage
|
|
func NewDeleteStorageRequest(server string, id string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/storages/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetStorageRequest generates requests for GetStorage
|
|
func NewGetStorageRequest(server string, id string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/storages/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewUpdateStorageRequest calls the generic UpdateStorage builder with application/json body
|
|
func NewUpdateStorageRequest(server string, id string, body UpdateStorageJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewUpdateStorageRequestWithBody(server, id, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewUpdateStorageRequestWithBody generates requests for UpdateStorage with any type of body
|
|
func NewUpdateStorageRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/site/storages/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPut, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewCreateBillingPortalSessionRequest generates requests for CreateBillingPortalSession
|
|
func NewCreateBillingPortalSessionRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/store/billing-portal-sessions")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewCreateCheckoutRequest calls the generic CreateCheckout builder with application/json body
|
|
func NewCreateCheckoutRequest(server string, body CreateCheckoutJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewCreateCheckoutRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewCreateCheckoutRequestWithBody generates requests for CreateCheckout with any type of body
|
|
func NewCreateCheckoutRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/store/checkouts")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetCreditBalanceRequest generates requests for GetCreditBalance
|
|
func NewGetCreditBalanceRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/store/credits")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetCreditLedgerRequest generates requests for GetCreditLedger
|
|
func NewGetCreditLedgerRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/store/credits/ledger-entries")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListCreditProductsRequest generates requests for ListCreditProducts
|
|
func NewListCreditProductsRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/store/credits/products")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewRedeemGiftCardRequest calls the generic RedeemGiftCard builder with application/json body
|
|
func NewRedeemGiftCardRequest(server string, body RedeemGiftCardJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewRedeemGiftCardRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewRedeemGiftCardRequestWithBody generates requests for RedeemGiftCard with any type of body
|
|
func NewRedeemGiftCardRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/store/credits/redemptions")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetDiscountQuoteRequest calls the generic GetDiscountQuote builder with application/json body
|
|
func NewGetDiscountQuoteRequest(server string, body GetDiscountQuoteJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewGetDiscountQuoteRequestWithBody(server, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewGetDiscountQuoteRequestWithBody generates requests for GetDiscountQuote with any type of body
|
|
func NewGetDiscountQuoteRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/store/discount-quotes")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListOrdersRequest generates requests for ListOrders
|
|
func NewListOrdersRequest(server string, params *ListOrdersParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/store/orders")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
// queryValues collects non-styled parameters (passthrough, JSON)
|
|
// that are safe to round-trip through url.Values.Encode().
|
|
queryValues := queryURL.Query()
|
|
// rawQueryFragments collects pre-encoded query fragments from
|
|
// styled parameters, preserving literal commas as delimiters
|
|
// per the OpenAPI spec (e.g. "color=blue,black,brown").
|
|
var rawQueryFragments []string
|
|
|
|
if params.Limit != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.Offset != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if encoded := queryValues.Encode(); encoded != "" {
|
|
rawQueryFragments = append(rawQueryFragments, encoded)
|
|
}
|
|
queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewContinueOrderPaymentRequest generates requests for ContinueOrderPayment
|
|
func NewContinueOrderPaymentRequest(server string, orderId string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "orderId", orderId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/store/orders/%s/payments", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewCancelOrderRequest calls the generic CancelOrder builder with application/json body
|
|
func NewCancelOrderRequest(server string, orderId string, body CancelOrderJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewCancelOrderRequestWithBody(server, orderId, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewCancelOrderRequestWithBody generates requests for CancelOrder with any type of body
|
|
func NewCancelOrderRequestWithBody(server string, orderId string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "orderId", orderId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/store/orders/%s/status", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPut, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListStorePackagesRequest generates requests for ListStorePackages
|
|
func NewListStorePackagesRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/store/packages")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListStoreTargetsRequest generates requests for ListStoreTargets
|
|
func NewListStoreTargetsRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/store/targets")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListTeamsRequest generates requests for ListTeams
|
|
func NewListTeamsRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/teams")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetTeamInviteLinkRequest generates requests for GetTeamInviteLink
|
|
func NewGetTeamInviteLinkRequest(server string, token string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "token", token, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/teams/invite-links/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetTeamRequest generates requests for GetTeam
|
|
func NewGetTeamRequest(server string, teamId string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "teamId", teamId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/teams/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListTeamActivityRequest generates requests for ListTeamActivity
|
|
func NewListTeamActivityRequest(server string, teamId string, params *ListTeamActivityParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "teamId", teamId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/teams/%s/activity", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
// queryValues collects non-styled parameters (passthrough, JSON)
|
|
// that are safe to round-trip through url.Values.Encode().
|
|
queryValues := queryURL.Query()
|
|
// rawQueryFragments collects pre-encoded query fragments from
|
|
// styled parameters, preserving literal commas as delimiters
|
|
// per the OpenAPI spec (e.g. "color=blue,black,brown").
|
|
var rawQueryFragments []string
|
|
|
|
if params.Page != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "page", *params.Page, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.PageSize != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "pageSize", *params.PageSize, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if encoded := queryValues.Encode(); encoded != "" {
|
|
rawQueryFragments = append(rawQueryFragments, encoded)
|
|
}
|
|
queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListTeamEntitlementsRequest generates requests for ListTeamEntitlements
|
|
func NewListTeamEntitlementsRequest(server string, teamId string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "teamId", teamId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/teams/%s/entitlements", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGrantTeamEntitlementRequest calls the generic GrantTeamEntitlement builder with application/json body
|
|
func NewGrantTeamEntitlementRequest(server string, teamId string, body GrantTeamEntitlementJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewGrantTeamEntitlementRequestWithBody(server, teamId, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewGrantTeamEntitlementRequestWithBody generates requests for GrantTeamEntitlement with any type of body
|
|
func NewGrantTeamEntitlementRequestWithBody(server string, teamId string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "teamId", teamId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/teams/%s/entitlements", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewRevokeTeamEntitlementRequest generates requests for RevokeTeamEntitlement
|
|
func NewRevokeTeamEntitlementRequest(server string, teamId string, eid string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "teamId", teamId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
var pathParam1 string
|
|
|
|
pathParam1, err = runtime.StyleParamWithOptions("simple", false, "eid", eid, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/teams/%s/entitlements/%s", pathParam0, pathParam1)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewUpdateTeamEntitlementRequest calls the generic UpdateTeamEntitlement builder with application/json body
|
|
func NewUpdateTeamEntitlementRequest(server string, teamId string, eid string, body UpdateTeamEntitlementJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewUpdateTeamEntitlementRequestWithBody(server, teamId, eid, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewUpdateTeamEntitlementRequestWithBody generates requests for UpdateTeamEntitlement with any type of body
|
|
func NewUpdateTeamEntitlementRequestWithBody(server string, teamId string, eid string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "teamId", teamId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
var pathParam1 string
|
|
|
|
pathParam1, err = runtime.StyleParamWithOptions("simple", false, "eid", eid, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/teams/%s/entitlements/%s", pathParam0, pathParam1)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListTeamInvitationsRequest generates requests for ListTeamInvitations
|
|
func NewListTeamInvitationsRequest(server string, teamId string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "teamId", teamId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/teams/%s/invitations", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewCreateTeamInviteLinkRequest calls the generic CreateTeamInviteLink builder with application/json body
|
|
func NewCreateTeamInviteLinkRequest(server string, teamId string, body CreateTeamInviteLinkJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewCreateTeamInviteLinkRequestWithBody(server, teamId, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewCreateTeamInviteLinkRequestWithBody generates requests for CreateTeamInviteLink with any type of body
|
|
func NewCreateTeamInviteLinkRequestWithBody(server string, teamId string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "teamId", teamId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/teams/%s/invite-links", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewDeleteTeamLogoRequest generates requests for DeleteTeamLogo
|
|
func NewDeleteTeamLogoRequest(server string, teamId string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "teamId", teamId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/teams/%s/logo", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewSetTeamLogoRequest generates requests for SetTeamLogo
|
|
func NewSetTeamLogoRequest(server string, teamId string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "teamId", teamId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/teams/%s/logo", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPut, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewJoinTeamRequest calls the generic JoinTeam builder with application/json body
|
|
func NewJoinTeamRequest(server string, teamId string, body JoinTeamJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewJoinTeamRequestWithBody(server, teamId, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewJoinTeamRequestWithBody generates requests for JoinTeam with any type of body
|
|
func NewJoinTeamRequestWithBody(server string, teamId string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "teamId", teamId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/teams/%s/members", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListTrashObjectsRequest generates requests for ListTrashObjects
|
|
func NewListTrashObjectsRequest(server string, params *ListTrashObjectsParams) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/trash/objects")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if params != nil {
|
|
// queryValues collects non-styled parameters (passthrough, JSON)
|
|
// that are safe to round-trip through url.Values.Encode().
|
|
queryValues := queryURL.Query()
|
|
// rawQueryFragments collects pre-encoded query fragments from
|
|
// styled parameters, preserving literal commas as delimiters
|
|
// per the OpenAPI spec (e.g. "color=blue,black,brown").
|
|
var rawQueryFragments []string
|
|
|
|
if params.Page != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "page", *params.Page, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if params.PageSize != nil {
|
|
|
|
if queryFrag, err := runtime.StyleParamWithOptions("form", true, "pageSize", *params.PageSize, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
|
|
return nil, err
|
|
} else {
|
|
for _, qp := range strings.Split(queryFrag, "&") {
|
|
rawQueryFragments = append(rawQueryFragments, qp)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if encoded := queryValues.Encode(); encoded != "" {
|
|
rawQueryFragments = append(rawQueryFragments, encoded)
|
|
}
|
|
queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewPurgeTrashObjectRequest generates requests for PurgeTrashObject
|
|
func NewPurgeTrashObjectRequest(server string, id string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/trash/objects/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetTrashObjectRequest generates requests for GetTrashObject
|
|
func NewGetTrashObjectRequest(server string, id string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/trash/objects/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewRestoreObjectRequest calls the generic RestoreObject builder with application/json body
|
|
func NewRestoreObjectRequest(server string, id string, body RestoreObjectJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewRestoreObjectRequestWithBody(server, id, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewRestoreObjectRequestWithBody generates requests for RestoreObject with any type of body
|
|
func NewRestoreObjectRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/trash/objects/%s/restorations", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewDeleteMyAvatarRequest generates requests for DeleteMyAvatar
|
|
func NewDeleteMyAvatarRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/users/me/avatar")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewSetMyAvatarRequest generates requests for SetMyAvatar
|
|
func NewSetMyAvatarRequest(server string) (*http.Request, error) {
|
|
var err error
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/users/me/avatar")
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPut, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListUserEntitlementsRequest generates requests for ListUserEntitlements
|
|
func NewListUserEntitlementsRequest(server string, userId string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "userId", userId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/users/%s/entitlements", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGrantUserEntitlementRequest calls the generic GrantUserEntitlement builder with application/json body
|
|
func NewGrantUserEntitlementRequest(server string, userId string, body GrantUserEntitlementJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewGrantUserEntitlementRequestWithBody(server, userId, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewGrantUserEntitlementRequestWithBody generates requests for GrantUserEntitlement with any type of body
|
|
func NewGrantUserEntitlementRequestWithBody(server string, userId string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "userId", userId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/users/%s/entitlements", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewRevokeUserEntitlementRequest generates requests for RevokeUserEntitlement
|
|
func NewRevokeUserEntitlementRequest(server string, userId string, eid string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "userId", userId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
var pathParam1 string
|
|
|
|
pathParam1, err = runtime.StyleParamWithOptions("simple", false, "eid", eid, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/users/%s/entitlements/%s", pathParam0, pathParam1)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewUpdateUserEntitlementRequest calls the generic UpdateUserEntitlement builder with application/json body
|
|
func NewUpdateUserEntitlementRequest(server string, userId string, eid string, body UpdateUserEntitlementJSONRequestBody) (*http.Request, error) {
|
|
var bodyReader io.Reader
|
|
buf, err := json.Marshal(body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
bodyReader = bytes.NewReader(buf)
|
|
return NewUpdateUserEntitlementRequestWithBody(server, userId, eid, "application/json", bodyReader)
|
|
}
|
|
|
|
// NewUpdateUserEntitlementRequestWithBody generates requests for UpdateUserEntitlement with any type of body
|
|
func NewUpdateUserEntitlementRequestWithBody(server string, userId string, eid string, contentType string, body io.Reader) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "userId", userId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
var pathParam1 string
|
|
|
|
pathParam1, err = runtime.StyleParamWithOptions("simple", false, "eid", eid, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/users/%s/entitlements/%s", pathParam0, pathParam1)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req.Header.Add("Content-Type", contentType)
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetUserQuotaRequest generates requests for GetUserQuota
|
|
func NewGetUserQuotaRequest(server string, userId string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "userId", userId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/users/%s/quota", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewGetUserProfileRequest generates requests for GetUserProfile
|
|
func NewGetUserProfileRequest(server string, username string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "username", username, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/users/%s", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
// NewListUserObjectsRequest generates requests for ListUserObjects
|
|
func NewListUserObjectsRequest(server string, username string) (*http.Request, error) {
|
|
var err error
|
|
|
|
var pathParam0 string
|
|
|
|
pathParam0, err = runtime.StyleParamWithOptions("simple", false, "username", username, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
serverURL, err := url.Parse(server)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
operationPath := fmt.Sprintf("/api/users/%s/objects", pathParam0)
|
|
if operationPath[0] == '/' {
|
|
operationPath = "." + operationPath
|
|
}
|
|
|
|
queryURL, err := serverURL.Parse(operationPath)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return req, nil
|
|
}
|
|
|
|
func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error {
|
|
for _, r := range c.RequestEditors {
|
|
if err := r(ctx, req); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
for _, r := range additionalEditors {
|
|
if err := r(ctx, req); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// ClientWithResponses builds on ClientInterface to offer response payloads
|
|
type ClientWithResponses struct {
|
|
ClientInterface
|
|
}
|
|
|
|
// NewClientWithResponses creates a new ClientWithResponses, which wraps
|
|
// Client with return type handling
|
|
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) {
|
|
client, err := NewClient(server, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &ClientWithResponses{client}, nil
|
|
}
|
|
|
|
// WithBaseURL overrides the baseURL.
|
|
func WithBaseURL(baseURL string) ClientOption {
|
|
return func(c *Client) error {
|
|
newBaseURL, err := url.Parse(baseURL)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
c.Server = newBaseURL.String()
|
|
return nil
|
|
}
|
|
}
|
|
|
|
// ClientWithResponsesInterface is the interface specification for the client with responses above.
|
|
type ClientWithResponsesInterface interface {
|
|
// GetApiAuthAccountInfoWithResponse request
|
|
GetApiAuthAccountInfoWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthAccountInfoResponse, error)
|
|
|
|
// BanUserWithBodyWithResponse request with any body
|
|
BanUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*BanUserResponse, error)
|
|
|
|
BanUserWithResponse(ctx context.Context, body BanUserJSONRequestBody, reqEditors ...RequestEditorFn) (*BanUserResponse, error)
|
|
|
|
// CreateUserWithBodyWithResponse request with any body
|
|
CreateUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUserResponse, error)
|
|
|
|
CreateUserWithResponse(ctx context.Context, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUserResponse, error)
|
|
|
|
// GetUserWithResponse request
|
|
GetUserWithResponse(ctx context.Context, params *GetUserParams, reqEditors ...RequestEditorFn) (*GetUserResponse, error)
|
|
|
|
// PostApiAuthAdminHasPermissionWithBodyWithResponse request with any body
|
|
PostApiAuthAdminHasPermissionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthAdminHasPermissionResponse, error)
|
|
|
|
PostApiAuthAdminHasPermissionWithResponse(ctx context.Context, body PostApiAuthAdminHasPermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthAdminHasPermissionResponse, error)
|
|
|
|
// ImpersonateUserWithBodyWithResponse request with any body
|
|
ImpersonateUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ImpersonateUserResponse, error)
|
|
|
|
ImpersonateUserWithResponse(ctx context.Context, body ImpersonateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*ImpersonateUserResponse, error)
|
|
|
|
// AdminListUserSessionsWithBodyWithResponse request with any body
|
|
AdminListUserSessionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AdminListUserSessionsResponse, error)
|
|
|
|
AdminListUserSessionsWithResponse(ctx context.Context, body AdminListUserSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*AdminListUserSessionsResponse, error)
|
|
|
|
// ListUsersWithResponse request
|
|
ListUsersWithResponse(ctx context.Context, params *ListUsersParams, reqEditors ...RequestEditorFn) (*ListUsersResponse, error)
|
|
|
|
// RemoveUserWithBodyWithResponse request with any body
|
|
RemoveUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RemoveUserResponse, error)
|
|
|
|
RemoveUserWithResponse(ctx context.Context, body RemoveUserJSONRequestBody, reqEditors ...RequestEditorFn) (*RemoveUserResponse, error)
|
|
|
|
// RevokeUserSessionWithBodyWithResponse request with any body
|
|
RevokeUserSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RevokeUserSessionResponse, error)
|
|
|
|
RevokeUserSessionWithResponse(ctx context.Context, body RevokeUserSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*RevokeUserSessionResponse, error)
|
|
|
|
// RevokeUserSessionsWithBodyWithResponse request with any body
|
|
RevokeUserSessionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RevokeUserSessionsResponse, error)
|
|
|
|
RevokeUserSessionsWithResponse(ctx context.Context, body RevokeUserSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*RevokeUserSessionsResponse, error)
|
|
|
|
// SetUserRoleWithBodyWithResponse request with any body
|
|
SetUserRoleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetUserRoleResponse, error)
|
|
|
|
SetUserRoleWithResponse(ctx context.Context, body SetUserRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*SetUserRoleResponse, error)
|
|
|
|
// SetUserPasswordWithBodyWithResponse request with any body
|
|
SetUserPasswordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetUserPasswordResponse, error)
|
|
|
|
SetUserPasswordWithResponse(ctx context.Context, body SetUserPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*SetUserPasswordResponse, error)
|
|
|
|
// PostApiAuthAdminStopImpersonatingWithResponse request
|
|
PostApiAuthAdminStopImpersonatingWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostApiAuthAdminStopImpersonatingResponse, error)
|
|
|
|
// UnbanUserWithBodyWithResponse request with any body
|
|
UnbanUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UnbanUserResponse, error)
|
|
|
|
UnbanUserWithResponse(ctx context.Context, body UnbanUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UnbanUserResponse, error)
|
|
|
|
// AdminUpdateUserWithBodyWithResponse request with any body
|
|
AdminUpdateUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AdminUpdateUserResponse, error)
|
|
|
|
AdminUpdateUserWithResponse(ctx context.Context, body AdminUpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*AdminUpdateUserResponse, error)
|
|
|
|
// PostApiAuthApiKeyCreateWithBodyWithResponse request with any body
|
|
PostApiAuthApiKeyCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthApiKeyCreateResponse, error)
|
|
|
|
PostApiAuthApiKeyCreateWithResponse(ctx context.Context, body PostApiAuthApiKeyCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthApiKeyCreateResponse, error)
|
|
|
|
// PostApiAuthApiKeyDeleteWithBodyWithResponse request with any body
|
|
PostApiAuthApiKeyDeleteWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthApiKeyDeleteResponse, error)
|
|
|
|
PostApiAuthApiKeyDeleteWithResponse(ctx context.Context, body PostApiAuthApiKeyDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthApiKeyDeleteResponse, error)
|
|
|
|
// GetApiAuthApiKeyGetWithResponse request
|
|
GetApiAuthApiKeyGetWithResponse(ctx context.Context, params *GetApiAuthApiKeyGetParams, reqEditors ...RequestEditorFn) (*GetApiAuthApiKeyGetResponse, error)
|
|
|
|
// GetApiAuthApiKeyListWithResponse request
|
|
GetApiAuthApiKeyListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthApiKeyListResponse, error)
|
|
|
|
// PostApiAuthApiKeyUpdateWithBodyWithResponse request with any body
|
|
PostApiAuthApiKeyUpdateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthApiKeyUpdateResponse, error)
|
|
|
|
PostApiAuthApiKeyUpdateWithResponse(ctx context.Context, body PostApiAuthApiKeyUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthApiKeyUpdateResponse, error)
|
|
|
|
// GetApiAuthCallbackIdWithResponse request
|
|
GetApiAuthCallbackIdWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetApiAuthCallbackIdResponse, error)
|
|
|
|
// PostApiAuthCallbackIdWithBodyWithResponse request with any body
|
|
PostApiAuthCallbackIdWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthCallbackIdResponse, error)
|
|
|
|
PostApiAuthCallbackIdWithResponse(ctx context.Context, id string, body PostApiAuthCallbackIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthCallbackIdResponse, error)
|
|
|
|
// ChangeEmailWithBodyWithResponse request with any body
|
|
ChangeEmailWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ChangeEmailResponse, error)
|
|
|
|
ChangeEmailWithResponse(ctx context.Context, body ChangeEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*ChangeEmailResponse, error)
|
|
|
|
// ChangePasswordWithBodyWithResponse request with any body
|
|
ChangePasswordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ChangePasswordResponse, error)
|
|
|
|
ChangePasswordWithResponse(ctx context.Context, body ChangePasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*ChangePasswordResponse, error)
|
|
|
|
// DeleteUserWithBodyWithResponse request with any body
|
|
DeleteUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error)
|
|
|
|
DeleteUserWithResponse(ctx context.Context, body DeleteUserJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error)
|
|
|
|
// GetApiAuthDeleteUserCallbackWithResponse request
|
|
GetApiAuthDeleteUserCallbackWithResponse(ctx context.Context, params *GetApiAuthDeleteUserCallbackParams, reqEditors ...RequestEditorFn) (*GetApiAuthDeleteUserCallbackResponse, error)
|
|
|
|
// GetApiAuthDeviceWithResponse request
|
|
GetApiAuthDeviceWithResponse(ctx context.Context, params *GetApiAuthDeviceParams, reqEditors ...RequestEditorFn) (*GetApiAuthDeviceResponse, error)
|
|
|
|
// PostApiAuthDeviceApproveWithBodyWithResponse request with any body
|
|
PostApiAuthDeviceApproveWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceApproveResponse, error)
|
|
|
|
PostApiAuthDeviceApproveWithResponse(ctx context.Context, body PostApiAuthDeviceApproveJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceApproveResponse, error)
|
|
|
|
// PostApiAuthDeviceCodeWithBodyWithResponse request with any body
|
|
PostApiAuthDeviceCodeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceCodeResponse, error)
|
|
|
|
PostApiAuthDeviceCodeWithResponse(ctx context.Context, body PostApiAuthDeviceCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceCodeResponse, error)
|
|
|
|
// PostApiAuthDeviceDenyWithBodyWithResponse request with any body
|
|
PostApiAuthDeviceDenyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceDenyResponse, error)
|
|
|
|
PostApiAuthDeviceDenyWithResponse(ctx context.Context, body PostApiAuthDeviceDenyJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceDenyResponse, error)
|
|
|
|
// PostApiAuthDeviceTokenWithBodyWithResponse request with any body
|
|
PostApiAuthDeviceTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceTokenResponse, error)
|
|
|
|
PostApiAuthDeviceTokenWithResponse(ctx context.Context, body PostApiAuthDeviceTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceTokenResponse, error)
|
|
|
|
// GetApiAuthErrorWithResponse request
|
|
GetApiAuthErrorWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthErrorResponse, error)
|
|
|
|
// PostApiAuthGetAccessTokenWithBodyWithResponse request with any body
|
|
PostApiAuthGetAccessTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthGetAccessTokenResponse, error)
|
|
|
|
PostApiAuthGetAccessTokenWithResponse(ctx context.Context, body PostApiAuthGetAccessTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthGetAccessTokenResponse, error)
|
|
|
|
// GetSessionWithResponse request
|
|
GetSessionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetSessionResponse, error)
|
|
|
|
// GetSessionPostWithBodyWithResponse request with any body
|
|
GetSessionPostWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetSessionPostResponse, error)
|
|
|
|
GetSessionPostWithResponse(ctx context.Context, body GetSessionPostJSONRequestBody, reqEditors ...RequestEditorFn) (*GetSessionPostResponse, error)
|
|
|
|
// PostApiAuthIsUsernameAvailableWithBodyWithResponse request with any body
|
|
PostApiAuthIsUsernameAvailableWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthIsUsernameAvailableResponse, error)
|
|
|
|
PostApiAuthIsUsernameAvailableWithResponse(ctx context.Context, body PostApiAuthIsUsernameAvailableJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthIsUsernameAvailableResponse, error)
|
|
|
|
// LinkSocialAccountWithBodyWithResponse request with any body
|
|
LinkSocialAccountWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LinkSocialAccountResponse, error)
|
|
|
|
LinkSocialAccountWithResponse(ctx context.Context, body LinkSocialAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*LinkSocialAccountResponse, error)
|
|
|
|
// ListUserAccountsWithResponse request
|
|
ListUserAccountsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListUserAccountsResponse, error)
|
|
|
|
// ListUserSessionsWithResponse request
|
|
ListUserSessionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListUserSessionsResponse, error)
|
|
|
|
// GetApiAuthOauth2CallbackProviderIdWithResponse request
|
|
GetApiAuthOauth2CallbackProviderIdWithResponse(ctx context.Context, providerId string, params *GetApiAuthOauth2CallbackProviderIdParams, reqEditors ...RequestEditorFn) (*GetApiAuthOauth2CallbackProviderIdResponse, error)
|
|
|
|
// PostApiAuthOauth2LinkWithBodyWithResponse request with any body
|
|
PostApiAuthOauth2LinkWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2LinkResponse, error)
|
|
|
|
PostApiAuthOauth2LinkWithResponse(ctx context.Context, body PostApiAuthOauth2LinkJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2LinkResponse, error)
|
|
|
|
// GetApiAuthOkWithResponse request
|
|
GetApiAuthOkWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOkResponse, error)
|
|
|
|
// PostApiAuthOrganizationAcceptInvitationWithBodyWithResponse request with any body
|
|
PostApiAuthOrganizationAcceptInvitationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationAcceptInvitationResponse, error)
|
|
|
|
PostApiAuthOrganizationAcceptInvitationWithResponse(ctx context.Context, body PostApiAuthOrganizationAcceptInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationAcceptInvitationResponse, error)
|
|
|
|
// PostApiAuthOrganizationCancelInvitationWithBodyWithResponse request with any body
|
|
PostApiAuthOrganizationCancelInvitationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationCancelInvitationResponse, error)
|
|
|
|
PostApiAuthOrganizationCancelInvitationWithResponse(ctx context.Context, body PostApiAuthOrganizationCancelInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationCancelInvitationResponse, error)
|
|
|
|
// PostApiAuthOrganizationCheckSlugWithBodyWithResponse request with any body
|
|
PostApiAuthOrganizationCheckSlugWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationCheckSlugResponse, error)
|
|
|
|
PostApiAuthOrganizationCheckSlugWithResponse(ctx context.Context, body PostApiAuthOrganizationCheckSlugJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationCheckSlugResponse, error)
|
|
|
|
// PostApiAuthOrganizationCreateWithBodyWithResponse request with any body
|
|
PostApiAuthOrganizationCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationCreateResponse, error)
|
|
|
|
PostApiAuthOrganizationCreateWithResponse(ctx context.Context, body PostApiAuthOrganizationCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationCreateResponse, error)
|
|
|
|
// PostApiAuthOrganizationDeleteWithBodyWithResponse request with any body
|
|
PostApiAuthOrganizationDeleteWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationDeleteResponse, error)
|
|
|
|
PostApiAuthOrganizationDeleteWithResponse(ctx context.Context, body PostApiAuthOrganizationDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationDeleteResponse, error)
|
|
|
|
// GetApiAuthOrganizationGetActiveMemberWithResponse request
|
|
GetApiAuthOrganizationGetActiveMemberWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOrganizationGetActiveMemberResponse, error)
|
|
|
|
// GetApiAuthOrganizationGetActiveMemberRoleWithResponse request
|
|
GetApiAuthOrganizationGetActiveMemberRoleWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOrganizationGetActiveMemberRoleResponse, error)
|
|
|
|
// GetOrganizationWithResponse request
|
|
GetOrganizationWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOrganizationResponse, error)
|
|
|
|
// GetApiAuthOrganizationGetInvitationWithResponse request
|
|
GetApiAuthOrganizationGetInvitationWithResponse(ctx context.Context, params *GetApiAuthOrganizationGetInvitationParams, reqEditors ...RequestEditorFn) (*GetApiAuthOrganizationGetInvitationResponse, error)
|
|
|
|
// PostApiAuthOrganizationHasPermissionWithBodyWithResponse request with any body
|
|
PostApiAuthOrganizationHasPermissionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationHasPermissionResponse, error)
|
|
|
|
PostApiAuthOrganizationHasPermissionWithResponse(ctx context.Context, body PostApiAuthOrganizationHasPermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationHasPermissionResponse, error)
|
|
|
|
// CreateOrganizationInvitationWithBodyWithResponse request with any body
|
|
CreateOrganizationInvitationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateOrganizationInvitationResponse, error)
|
|
|
|
CreateOrganizationInvitationWithResponse(ctx context.Context, body CreateOrganizationInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateOrganizationInvitationResponse, error)
|
|
|
|
// PostApiAuthOrganizationLeaveWithBodyWithResponse request with any body
|
|
PostApiAuthOrganizationLeaveWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationLeaveResponse, error)
|
|
|
|
PostApiAuthOrganizationLeaveWithResponse(ctx context.Context, body PostApiAuthOrganizationLeaveJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationLeaveResponse, error)
|
|
|
|
// GetApiAuthOrganizationListWithResponse request
|
|
GetApiAuthOrganizationListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOrganizationListResponse, error)
|
|
|
|
// GetApiAuthOrganizationListInvitationsWithResponse request
|
|
GetApiAuthOrganizationListInvitationsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOrganizationListInvitationsResponse, error)
|
|
|
|
// GetApiAuthOrganizationListMembersWithResponse request
|
|
GetApiAuthOrganizationListMembersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOrganizationListMembersResponse, error)
|
|
|
|
// GetApiAuthOrganizationListUserInvitationsWithResponse request
|
|
GetApiAuthOrganizationListUserInvitationsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOrganizationListUserInvitationsResponse, error)
|
|
|
|
// PostApiAuthOrganizationRejectInvitationWithBodyWithResponse request with any body
|
|
PostApiAuthOrganizationRejectInvitationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationRejectInvitationResponse, error)
|
|
|
|
PostApiAuthOrganizationRejectInvitationWithResponse(ctx context.Context, body PostApiAuthOrganizationRejectInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationRejectInvitationResponse, error)
|
|
|
|
// PostApiAuthOrganizationRemoveMemberWithBodyWithResponse request with any body
|
|
PostApiAuthOrganizationRemoveMemberWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationRemoveMemberResponse, error)
|
|
|
|
PostApiAuthOrganizationRemoveMemberWithResponse(ctx context.Context, body PostApiAuthOrganizationRemoveMemberJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationRemoveMemberResponse, error)
|
|
|
|
// SetActiveOrganizationWithBodyWithResponse request with any body
|
|
SetActiveOrganizationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetActiveOrganizationResponse, error)
|
|
|
|
SetActiveOrganizationWithResponse(ctx context.Context, body SetActiveOrganizationJSONRequestBody, reqEditors ...RequestEditorFn) (*SetActiveOrganizationResponse, error)
|
|
|
|
// PostApiAuthOrganizationUpdateWithBodyWithResponse request with any body
|
|
PostApiAuthOrganizationUpdateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationUpdateResponse, error)
|
|
|
|
PostApiAuthOrganizationUpdateWithResponse(ctx context.Context, body PostApiAuthOrganizationUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationUpdateResponse, error)
|
|
|
|
// UpdateOrganizationMemberRoleWithBodyWithResponse request with any body
|
|
UpdateOrganizationMemberRoleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateOrganizationMemberRoleResponse, error)
|
|
|
|
UpdateOrganizationMemberRoleWithResponse(ctx context.Context, body UpdateOrganizationMemberRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateOrganizationMemberRoleResponse, error)
|
|
|
|
// PostApiAuthRefreshTokenWithBodyWithResponse request with any body
|
|
PostApiAuthRefreshTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthRefreshTokenResponse, error)
|
|
|
|
PostApiAuthRefreshTokenWithResponse(ctx context.Context, body PostApiAuthRefreshTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthRefreshTokenResponse, error)
|
|
|
|
// RequestPasswordResetWithBodyWithResponse request with any body
|
|
RequestPasswordResetWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RequestPasswordResetResponse, error)
|
|
|
|
RequestPasswordResetWithResponse(ctx context.Context, body RequestPasswordResetJSONRequestBody, reqEditors ...RequestEditorFn) (*RequestPasswordResetResponse, error)
|
|
|
|
// ResetPasswordWithBodyWithResponse request with any body
|
|
ResetPasswordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ResetPasswordResponse, error)
|
|
|
|
ResetPasswordWithResponse(ctx context.Context, body ResetPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*ResetPasswordResponse, error)
|
|
|
|
// ResetPasswordCallbackWithResponse request
|
|
ResetPasswordCallbackWithResponse(ctx context.Context, token string, params *ResetPasswordCallbackParams, reqEditors ...RequestEditorFn) (*ResetPasswordCallbackResponse, error)
|
|
|
|
// PostApiAuthRevokeOtherSessionsWithBodyWithResponse request with any body
|
|
PostApiAuthRevokeOtherSessionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthRevokeOtherSessionsResponse, error)
|
|
|
|
PostApiAuthRevokeOtherSessionsWithResponse(ctx context.Context, body PostApiAuthRevokeOtherSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthRevokeOtherSessionsResponse, error)
|
|
|
|
// PostApiAuthRevokeSessionWithBodyWithResponse request with any body
|
|
PostApiAuthRevokeSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthRevokeSessionResponse, error)
|
|
|
|
PostApiAuthRevokeSessionWithResponse(ctx context.Context, body PostApiAuthRevokeSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthRevokeSessionResponse, error)
|
|
|
|
// PostApiAuthRevokeSessionsWithBodyWithResponse request with any body
|
|
PostApiAuthRevokeSessionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthRevokeSessionsResponse, error)
|
|
|
|
PostApiAuthRevokeSessionsWithResponse(ctx context.Context, body PostApiAuthRevokeSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthRevokeSessionsResponse, error)
|
|
|
|
// SendVerificationEmailWithBodyWithResponse request with any body
|
|
SendVerificationEmailWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendVerificationEmailResponse, error)
|
|
|
|
SendVerificationEmailWithResponse(ctx context.Context, body SendVerificationEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*SendVerificationEmailResponse, error)
|
|
|
|
// SignInEmailWithBodyWithResponse request with any body
|
|
SignInEmailWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SignInEmailResponse, error)
|
|
|
|
SignInEmailWithResponse(ctx context.Context, body SignInEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*SignInEmailResponse, error)
|
|
|
|
// PostApiAuthSignInOauth2WithBodyWithResponse request with any body
|
|
PostApiAuthSignInOauth2WithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthSignInOauth2Response, error)
|
|
|
|
PostApiAuthSignInOauth2WithResponse(ctx context.Context, body PostApiAuthSignInOauth2JSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthSignInOauth2Response, error)
|
|
|
|
// SocialSignInWithBodyWithResponse request with any body
|
|
SocialSignInWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SocialSignInResponse, error)
|
|
|
|
SocialSignInWithResponse(ctx context.Context, body SocialSignInJSONRequestBody, reqEditors ...RequestEditorFn) (*SocialSignInResponse, error)
|
|
|
|
// PostApiAuthSignInUsernameWithBodyWithResponse request with any body
|
|
PostApiAuthSignInUsernameWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthSignInUsernameResponse, error)
|
|
|
|
PostApiAuthSignInUsernameWithResponse(ctx context.Context, body PostApiAuthSignInUsernameJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthSignInUsernameResponse, error)
|
|
|
|
// SignOutWithBodyWithResponse request with any body
|
|
SignOutWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SignOutResponse, error)
|
|
|
|
SignOutWithResponse(ctx context.Context, body SignOutJSONRequestBody, reqEditors ...RequestEditorFn) (*SignOutResponse, error)
|
|
|
|
// SignUpWithEmailAndPasswordWithBodyWithResponse request with any body
|
|
SignUpWithEmailAndPasswordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SignUpWithEmailAndPasswordResponse, error)
|
|
|
|
SignUpWithEmailAndPasswordWithResponse(ctx context.Context, body SignUpWithEmailAndPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*SignUpWithEmailAndPasswordResponse, error)
|
|
|
|
// PostApiAuthUnlinkAccountWithBodyWithResponse request with any body
|
|
PostApiAuthUnlinkAccountWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthUnlinkAccountResponse, error)
|
|
|
|
PostApiAuthUnlinkAccountWithResponse(ctx context.Context, body PostApiAuthUnlinkAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthUnlinkAccountResponse, error)
|
|
|
|
// UpdateSessionWithBodyWithResponse request with any body
|
|
UpdateSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSessionResponse, error)
|
|
|
|
UpdateSessionWithResponse(ctx context.Context, body UpdateSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSessionResponse, error)
|
|
|
|
// UpdateUserWithBodyWithResponse request with any body
|
|
UpdateUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateUserResponse, error)
|
|
|
|
UpdateUserWithResponse(ctx context.Context, body UpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateUserResponse, error)
|
|
|
|
// GetApiAuthVerifyEmailWithResponse request
|
|
GetApiAuthVerifyEmailWithResponse(ctx context.Context, params *GetApiAuthVerifyEmailParams, reqEditors ...RequestEditorFn) (*GetApiAuthVerifyEmailResponse, error)
|
|
|
|
// VerifyPasswordWithBodyWithResponse request with any body
|
|
VerifyPasswordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*VerifyPasswordResponse, error)
|
|
|
|
VerifyPasswordWithResponse(ctx context.Context, body VerifyPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*VerifyPasswordResponse, error)
|
|
|
|
// ListBackgroundJobsWithResponse request
|
|
ListBackgroundJobsWithResponse(ctx context.Context, params *ListBackgroundJobsParams, reqEditors ...RequestEditorFn) (*ListBackgroundJobsResponse, error)
|
|
|
|
// CreateBackgroundJobWithBodyWithResponse request with any body
|
|
CreateBackgroundJobWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateBackgroundJobResponse, error)
|
|
|
|
CreateBackgroundJobWithResponse(ctx context.Context, body CreateBackgroundJobJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateBackgroundJobResponse, error)
|
|
|
|
// GetBackgroundJobWithResponse request
|
|
GetBackgroundJobWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetBackgroundJobResponse, error)
|
|
|
|
// RetryBackgroundJobWithResponse request
|
|
RetryBackgroundJobWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*RetryBackgroundJobResponse, error)
|
|
|
|
// CancelBackgroundJobWithBodyWithResponse request with any body
|
|
CancelBackgroundJobWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CancelBackgroundJobResponse, error)
|
|
|
|
CancelBackgroundJobWithResponse(ctx context.Context, id string, body CancelBackgroundJobJSONRequestBody, reqEditors ...RequestEditorFn) (*CancelBackgroundJobResponse, error)
|
|
|
|
// ListDownloadersWithResponse request
|
|
ListDownloadersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListDownloadersResponse, error)
|
|
|
|
// CreateDownloaderWithBodyWithResponse request with any body
|
|
CreateDownloaderWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDownloaderResponse, error)
|
|
|
|
CreateDownloaderWithResponse(ctx context.Context, body CreateDownloaderJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDownloaderResponse, error)
|
|
|
|
// RecordDownloaderHeartbeatWithBodyWithResponse request with any body
|
|
RecordDownloaderHeartbeatWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RecordDownloaderHeartbeatResponse, error)
|
|
|
|
RecordDownloaderHeartbeatWithResponse(ctx context.Context, body RecordDownloaderHeartbeatJSONRequestBody, reqEditors ...RequestEditorFn) (*RecordDownloaderHeartbeatResponse, error)
|
|
|
|
// DeleteDownloaderWithResponse request
|
|
DeleteDownloaderWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteDownloaderResponse, error)
|
|
|
|
// UpdateDownloaderWithBodyWithResponse request with any body
|
|
UpdateDownloaderWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDownloaderResponse, error)
|
|
|
|
UpdateDownloaderWithResponse(ctx context.Context, id string, body UpdateDownloaderJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDownloaderResponse, error)
|
|
|
|
// ListDownloadTasksWithResponse request
|
|
ListDownloadTasksWithResponse(ctx context.Context, params *ListDownloadTasksParams, reqEditors ...RequestEditorFn) (*ListDownloadTasksResponse, error)
|
|
|
|
// CreateDownloadTaskWithBodyWithResponse request with any body
|
|
CreateDownloadTaskWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDownloadTaskResponse, error)
|
|
|
|
CreateDownloadTaskWithResponse(ctx context.Context, body CreateDownloadTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDownloadTaskResponse, error)
|
|
|
|
// DeleteDownloadTaskWithResponse request
|
|
DeleteDownloadTaskWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteDownloadTaskResponse, error)
|
|
|
|
// GetDownloadTaskWithResponse request
|
|
GetDownloadTaskWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetDownloadTaskResponse, error)
|
|
|
|
// UpdateDownloadTaskWithBodyWithResponse request with any body
|
|
UpdateDownloadTaskWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDownloadTaskResponse, error)
|
|
|
|
UpdateDownloadTaskWithResponse(ctx context.Context, id string, body UpdateDownloadTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDownloadTaskResponse, error)
|
|
|
|
// RetryDownloadTaskWithBodyWithResponse request with any body
|
|
RetryDownloadTaskWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RetryDownloadTaskResponse, error)
|
|
|
|
RetryDownloadTaskWithResponse(ctx context.Context, id string, body RetryDownloadTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*RetryDownloadTaskResponse, error)
|
|
|
|
// SetDownloadTaskStatusWithBodyWithResponse request with any body
|
|
SetDownloadTaskStatusWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetDownloadTaskStatusResponse, error)
|
|
|
|
SetDownloadTaskStatusWithResponse(ctx context.Context, id string, body SetDownloadTaskStatusJSONRequestBody, reqEditors ...RequestEditorFn) (*SetDownloadTaskStatusResponse, error)
|
|
|
|
// StreamEventsWithResponse request
|
|
StreamEventsWithResponse(ctx context.Context, params *StreamEventsParams, reqEditors ...RequestEditorFn) (*StreamEventsResponse, error)
|
|
|
|
// DeleteImageHostingConfigWithResponse request
|
|
DeleteImageHostingConfigWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*DeleteImageHostingConfigResponse, error)
|
|
|
|
// GetImageHostingConfigWithResponse request
|
|
GetImageHostingConfigWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetImageHostingConfigResponse, error)
|
|
|
|
// UpdateImageHostingConfigWithBodyWithResponse request with any body
|
|
UpdateImageHostingConfigWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateImageHostingConfigResponse, error)
|
|
|
|
UpdateImageHostingConfigWithResponse(ctx context.Context, body UpdateImageHostingConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateImageHostingConfigResponse, error)
|
|
|
|
// ListImageHostingsWithResponse request
|
|
ListImageHostingsWithResponse(ctx context.Context, params *ListImageHostingsParams, reqEditors ...RequestEditorFn) (*ListImageHostingsResponse, error)
|
|
|
|
// PresignImageHostingUploadWithBodyWithResponse request with any body
|
|
PresignImageHostingUploadWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PresignImageHostingUploadResponse, error)
|
|
|
|
PresignImageHostingUploadWithResponse(ctx context.Context, body PresignImageHostingUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*PresignImageHostingUploadResponse, error)
|
|
|
|
// DeleteImageHostingWithResponse request
|
|
DeleteImageHostingWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteImageHostingResponse, error)
|
|
|
|
// GetImageHostingWithResponse request
|
|
GetImageHostingWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetImageHostingResponse, error)
|
|
|
|
// ConfirmImageHostingWithResponse request
|
|
ConfirmImageHostingWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ConfirmImageHostingResponse, error)
|
|
|
|
// ListNotificationsWithResponse request
|
|
ListNotificationsWithResponse(ctx context.Context, params *ListNotificationsParams, reqEditors ...RequestEditorFn) (*ListNotificationsResponse, error)
|
|
|
|
// MarkAllNotificationsReadWithResponse request
|
|
MarkAllNotificationsReadWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*MarkAllNotificationsReadResponse, error)
|
|
|
|
// GetNotificationStatsWithResponse request
|
|
GetNotificationStatsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetNotificationStatsResponse, error)
|
|
|
|
// MarkNotificationReadWithResponse request
|
|
MarkNotificationReadWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*MarkNotificationReadResponse, error)
|
|
|
|
// ListObjectsWithResponse request
|
|
ListObjectsWithResponse(ctx context.Context, params *ListObjectsParams, reqEditors ...RequestEditorFn) (*ListObjectsResponse, error)
|
|
|
|
// CreateObjectWithBodyWithResponse request with any body
|
|
CreateObjectWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateObjectResponse, error)
|
|
|
|
CreateObjectWithResponse(ctx context.Context, body CreateObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateObjectResponse, error)
|
|
|
|
// DeleteObjectWithResponse request
|
|
DeleteObjectWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteObjectResponse, error)
|
|
|
|
// GetObjectWithResponse request
|
|
GetObjectWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetObjectResponse, error)
|
|
|
|
// UpdateObjectWithBodyWithResponse request with any body
|
|
UpdateObjectWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateObjectResponse, error)
|
|
|
|
UpdateObjectWithResponse(ctx context.Context, id string, body UpdateObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateObjectResponse, error)
|
|
|
|
// CopyObjectWithBodyWithResponse request with any body
|
|
CopyObjectWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CopyObjectResponse, error)
|
|
|
|
CopyObjectWithResponse(ctx context.Context, id string, body CopyObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*CopyObjectResponse, error)
|
|
|
|
// TransferObjectWithBodyWithResponse request with any body
|
|
TransferObjectWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TransferObjectResponse, error)
|
|
|
|
TransferObjectWithResponse(ctx context.Context, id string, body TransferObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*TransferObjectResponse, error)
|
|
|
|
// AbortObjectUploadWithResponse request
|
|
AbortObjectUploadWithResponse(ctx context.Context, id string, uploadSessionId string, reqEditors ...RequestEditorFn) (*AbortObjectUploadResponse, error)
|
|
|
|
// CompleteObjectUploadWithBodyWithResponse request with any body
|
|
CompleteObjectUploadWithBodyWithResponse(ctx context.Context, id string, uploadSessionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CompleteObjectUploadResponse, error)
|
|
|
|
CompleteObjectUploadWithResponse(ctx context.Context, id string, uploadSessionId string, body CompleteObjectUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*CompleteObjectUploadResponse, error)
|
|
|
|
// PresignObjectUploadPartsWithBodyWithResponse request with any body
|
|
PresignObjectUploadPartsWithBodyWithResponse(ctx context.Context, id string, uploadSessionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PresignObjectUploadPartsResponse, error)
|
|
|
|
PresignObjectUploadPartsWithResponse(ctx context.Context, id string, uploadSessionId string, body PresignObjectUploadPartsJSONRequestBody, reqEditors ...RequestEditorFn) (*PresignObjectUploadPartsResponse, error)
|
|
|
|
// ListQuotaOverviewWithResponse request
|
|
ListQuotaOverviewWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListQuotaOverviewResponse, error)
|
|
|
|
// GetMyQuotaWithResponse request
|
|
GetMyQuotaWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetMyQuotaResponse, error)
|
|
|
|
// ListSharesWithResponse request
|
|
ListSharesWithResponse(ctx context.Context, params *ListSharesParams, reqEditors ...RequestEditorFn) (*ListSharesResponse, error)
|
|
|
|
// CreateShareWithBodyWithResponse request with any body
|
|
CreateShareWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateShareResponse, error)
|
|
|
|
CreateShareWithResponse(ctx context.Context, body CreateShareJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateShareResponse, error)
|
|
|
|
// GetShareWithResponse request
|
|
GetShareWithResponse(ctx context.Context, token string, reqEditors ...RequestEditorFn) (*GetShareResponse, error)
|
|
|
|
// ListShareObjectsWithResponse request
|
|
ListShareObjectsWithResponse(ctx context.Context, token string, params *ListShareObjectsParams, reqEditors ...RequestEditorFn) (*ListShareObjectsResponse, error)
|
|
|
|
// SaveShareWithBodyWithResponse request with any body
|
|
SaveShareWithBodyWithResponse(ctx context.Context, token string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SaveShareResponse, error)
|
|
|
|
SaveShareWithResponse(ctx context.Context, token string, body SaveShareJSONRequestBody, reqEditors ...RequestEditorFn) (*SaveShareResponse, error)
|
|
|
|
// VerifySharePasswordWithBodyWithResponse request with any body
|
|
VerifySharePasswordWithBodyWithResponse(ctx context.Context, token string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*VerifySharePasswordResponse, error)
|
|
|
|
VerifySharePasswordWithResponse(ctx context.Context, token string, body VerifySharePasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*VerifySharePasswordResponse, error)
|
|
|
|
// RevokeShareWithBodyWithResponse request with any body
|
|
RevokeShareWithBodyWithResponse(ctx context.Context, token string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RevokeShareResponse, error)
|
|
|
|
RevokeShareWithResponse(ctx context.Context, token string, body RevokeShareJSONRequestBody, reqEditors ...RequestEditorFn) (*RevokeShareResponse, error)
|
|
|
|
// ListAnnouncementsWithResponse request
|
|
ListAnnouncementsWithResponse(ctx context.Context, params *ListAnnouncementsParams, reqEditors ...RequestEditorFn) (*ListAnnouncementsResponse, error)
|
|
|
|
// CreateAnnouncementWithBodyWithResponse request with any body
|
|
CreateAnnouncementWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAnnouncementResponse, error)
|
|
|
|
CreateAnnouncementWithResponse(ctx context.Context, body CreateAnnouncementJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAnnouncementResponse, error)
|
|
|
|
// DeleteAnnouncementWithResponse request
|
|
DeleteAnnouncementWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteAnnouncementResponse, error)
|
|
|
|
// GetAnnouncementWithResponse request
|
|
GetAnnouncementWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetAnnouncementResponse, error)
|
|
|
|
// UpdateAnnouncementWithBodyWithResponse request with any body
|
|
UpdateAnnouncementWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAnnouncementResponse, error)
|
|
|
|
UpdateAnnouncementWithResponse(ctx context.Context, id string, body UpdateAnnouncementJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAnnouncementResponse, error)
|
|
|
|
// ListAuditEventsWithResponse request
|
|
ListAuditEventsWithResponse(ctx context.Context, params *ListAuditEventsParams, reqEditors ...RequestEditorFn) (*ListAuditEventsResponse, error)
|
|
|
|
// ListAuthProvidersWithResponse request
|
|
ListAuthProvidersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListAuthProvidersResponse, error)
|
|
|
|
// DeleteAuthProviderWithResponse request
|
|
DeleteAuthProviderWithResponse(ctx context.Context, providerId string, reqEditors ...RequestEditorFn) (*DeleteAuthProviderResponse, error)
|
|
|
|
// UpsertAuthProviderWithBodyWithResponse request with any body
|
|
UpsertAuthProviderWithBodyWithResponse(ctx context.Context, providerId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpsertAuthProviderResponse, error)
|
|
|
|
UpsertAuthProviderWithResponse(ctx context.Context, providerId string, body UpsertAuthProviderJSONRequestBody, reqEditors ...RequestEditorFn) (*UpsertAuthProviderResponse, error)
|
|
|
|
// GetBrandingWithResponse request
|
|
GetBrandingWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetBrandingResponse, error)
|
|
|
|
// UpdateBrandingWithResponse request
|
|
UpdateBrandingWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UpdateBrandingResponse, error)
|
|
|
|
// ResetBrandingFieldWithResponse request
|
|
ResetBrandingFieldWithResponse(ctx context.Context, field string, reqEditors ...RequestEditorFn) (*ResetBrandingFieldResponse, error)
|
|
|
|
// GetChangelogWithResponse request
|
|
GetChangelogWithResponse(ctx context.Context, params *GetChangelogParams, reqEditors ...RequestEditorFn) (*GetChangelogResponse, error)
|
|
|
|
// GetEmailConfigWithResponse request
|
|
GetEmailConfigWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetEmailConfigResponse, error)
|
|
|
|
// SaveEmailConfigWithBodyWithResponse request with any body
|
|
SaveEmailConfigWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SaveEmailConfigResponse, error)
|
|
|
|
SaveEmailConfigWithResponse(ctx context.Context, body SaveEmailConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*SaveEmailConfigResponse, error)
|
|
|
|
// SendTestEmailWithBodyWithResponse request with any body
|
|
SendTestEmailWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendTestEmailResponse, error)
|
|
|
|
SendTestEmailWithResponse(ctx context.Context, body SendTestEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*SendTestEmailResponse, error)
|
|
|
|
// GetInstanceInfoWithResponse request
|
|
GetInstanceInfoWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetInstanceInfoResponse, error)
|
|
|
|
// ListSiteInvitationsWithResponse request
|
|
ListSiteInvitationsWithResponse(ctx context.Context, params *ListSiteInvitationsParams, reqEditors ...RequestEditorFn) (*ListSiteInvitationsResponse, error)
|
|
|
|
// CreateSiteInvitationWithBodyWithResponse request with any body
|
|
CreateSiteInvitationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSiteInvitationResponse, error)
|
|
|
|
CreateSiteInvitationWithResponse(ctx context.Context, body CreateSiteInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSiteInvitationResponse, error)
|
|
|
|
// RevokeSiteInvitationWithResponse request
|
|
RevokeSiteInvitationWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*RevokeSiteInvitationResponse, error)
|
|
|
|
// ResendSiteInvitationWithResponse request
|
|
ResendSiteInvitationWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ResendSiteInvitationResponse, error)
|
|
|
|
// GetSiteInvitationWithResponse request
|
|
GetSiteInvitationWithResponse(ctx context.Context, token string, reqEditors ...RequestEditorFn) (*GetSiteInvitationResponse, error)
|
|
|
|
// ListInviteCodesWithResponse request
|
|
ListInviteCodesWithResponse(ctx context.Context, params *ListInviteCodesParams, reqEditors ...RequestEditorFn) (*ListInviteCodesResponse, error)
|
|
|
|
// GenerateInviteCodesWithBodyWithResponse request with any body
|
|
GenerateInviteCodesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GenerateInviteCodesResponse, error)
|
|
|
|
GenerateInviteCodesWithResponse(ctx context.Context, body GenerateInviteCodesJSONRequestBody, reqEditors ...RequestEditorFn) (*GenerateInviteCodesResponse, error)
|
|
|
|
// ValidateInviteCodeWithBodyWithResponse request with any body
|
|
ValidateInviteCodeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ValidateInviteCodeResponse, error)
|
|
|
|
ValidateInviteCodeWithResponse(ctx context.Context, body ValidateInviteCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*ValidateInviteCodeResponse, error)
|
|
|
|
// DeleteInviteCodeWithResponse request
|
|
DeleteInviteCodeWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteInviteCodeResponse, error)
|
|
|
|
// UnbindLicenseWithResponse request
|
|
UnbindLicenseWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UnbindLicenseResponse, error)
|
|
|
|
// InitiateLicensePairingWithResponse request
|
|
InitiateLicensePairingWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*InitiateLicensePairingResponse, error)
|
|
|
|
// PollLicensePairingWithResponse request
|
|
PollLicensePairingWithResponse(ctx context.Context, code string, reqEditors ...RequestEditorFn) (*PollLicensePairingResponse, error)
|
|
|
|
// RefreshLicenseWithResponse request
|
|
RefreshLicenseWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*RefreshLicenseResponse, error)
|
|
|
|
// GetLicensingStatusWithResponse request
|
|
GetLicensingStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetLicensingStatusResponse, error)
|
|
|
|
// ListSystemOptionsWithResponse request
|
|
ListSystemOptionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListSystemOptionsResponse, error)
|
|
|
|
// DeleteSystemOptionWithResponse request
|
|
DeleteSystemOptionWithResponse(ctx context.Context, key string, reqEditors ...RequestEditorFn) (*DeleteSystemOptionResponse, error)
|
|
|
|
// GetSystemOptionWithResponse request
|
|
GetSystemOptionWithResponse(ctx context.Context, key string, reqEditors ...RequestEditorFn) (*GetSystemOptionResponse, error)
|
|
|
|
// SetSystemOptionWithBodyWithResponse request with any body
|
|
SetSystemOptionWithBodyWithResponse(ctx context.Context, key string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetSystemOptionResponse, error)
|
|
|
|
SetSystemOptionWithResponse(ctx context.Context, key string, body SetSystemOptionJSONRequestBody, reqEditors ...RequestEditorFn) (*SetSystemOptionResponse, error)
|
|
|
|
// ListStoragesWithResponse request
|
|
ListStoragesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListStoragesResponse, error)
|
|
|
|
// CreateStorageWithBodyWithResponse request with any body
|
|
CreateStorageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateStorageResponse, error)
|
|
|
|
CreateStorageWithResponse(ctx context.Context, body CreateStorageJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateStorageResponse, error)
|
|
|
|
// DeleteStorageWithResponse request
|
|
DeleteStorageWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteStorageResponse, error)
|
|
|
|
// GetStorageWithResponse request
|
|
GetStorageWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetStorageResponse, error)
|
|
|
|
// UpdateStorageWithBodyWithResponse request with any body
|
|
UpdateStorageWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateStorageResponse, error)
|
|
|
|
UpdateStorageWithResponse(ctx context.Context, id string, body UpdateStorageJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateStorageResponse, error)
|
|
|
|
// CreateBillingPortalSessionWithResponse request
|
|
CreateBillingPortalSessionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CreateBillingPortalSessionResponse, error)
|
|
|
|
// CreateCheckoutWithBodyWithResponse request with any body
|
|
CreateCheckoutWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCheckoutResponse, error)
|
|
|
|
CreateCheckoutWithResponse(ctx context.Context, body CreateCheckoutJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCheckoutResponse, error)
|
|
|
|
// GetCreditBalanceWithResponse request
|
|
GetCreditBalanceWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCreditBalanceResponse, error)
|
|
|
|
// GetCreditLedgerWithResponse request
|
|
GetCreditLedgerWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCreditLedgerResponse, error)
|
|
|
|
// ListCreditProductsWithResponse request
|
|
ListCreditProductsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListCreditProductsResponse, error)
|
|
|
|
// RedeemGiftCardWithBodyWithResponse request with any body
|
|
RedeemGiftCardWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RedeemGiftCardResponse, error)
|
|
|
|
RedeemGiftCardWithResponse(ctx context.Context, body RedeemGiftCardJSONRequestBody, reqEditors ...RequestEditorFn) (*RedeemGiftCardResponse, error)
|
|
|
|
// GetDiscountQuoteWithBodyWithResponse request with any body
|
|
GetDiscountQuoteWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetDiscountQuoteResponse, error)
|
|
|
|
GetDiscountQuoteWithResponse(ctx context.Context, body GetDiscountQuoteJSONRequestBody, reqEditors ...RequestEditorFn) (*GetDiscountQuoteResponse, error)
|
|
|
|
// ListOrdersWithResponse request
|
|
ListOrdersWithResponse(ctx context.Context, params *ListOrdersParams, reqEditors ...RequestEditorFn) (*ListOrdersResponse, error)
|
|
|
|
// ContinueOrderPaymentWithResponse request
|
|
ContinueOrderPaymentWithResponse(ctx context.Context, orderId string, reqEditors ...RequestEditorFn) (*ContinueOrderPaymentResponse, error)
|
|
|
|
// CancelOrderWithBodyWithResponse request with any body
|
|
CancelOrderWithBodyWithResponse(ctx context.Context, orderId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CancelOrderResponse, error)
|
|
|
|
CancelOrderWithResponse(ctx context.Context, orderId string, body CancelOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*CancelOrderResponse, error)
|
|
|
|
// ListStorePackagesWithResponse request
|
|
ListStorePackagesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListStorePackagesResponse, error)
|
|
|
|
// ListStoreTargetsWithResponse request
|
|
ListStoreTargetsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListStoreTargetsResponse, error)
|
|
|
|
// ListTeamsWithResponse request
|
|
ListTeamsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListTeamsResponse, error)
|
|
|
|
// GetTeamInviteLinkWithResponse request
|
|
GetTeamInviteLinkWithResponse(ctx context.Context, token string, reqEditors ...RequestEditorFn) (*GetTeamInviteLinkResponse, error)
|
|
|
|
// GetTeamWithResponse request
|
|
GetTeamWithResponse(ctx context.Context, teamId string, reqEditors ...RequestEditorFn) (*GetTeamResponse, error)
|
|
|
|
// ListTeamActivityWithResponse request
|
|
ListTeamActivityWithResponse(ctx context.Context, teamId string, params *ListTeamActivityParams, reqEditors ...RequestEditorFn) (*ListTeamActivityResponse, error)
|
|
|
|
// ListTeamEntitlementsWithResponse request
|
|
ListTeamEntitlementsWithResponse(ctx context.Context, teamId string, reqEditors ...RequestEditorFn) (*ListTeamEntitlementsResponse, error)
|
|
|
|
// GrantTeamEntitlementWithBodyWithResponse request with any body
|
|
GrantTeamEntitlementWithBodyWithResponse(ctx context.Context, teamId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GrantTeamEntitlementResponse, error)
|
|
|
|
GrantTeamEntitlementWithResponse(ctx context.Context, teamId string, body GrantTeamEntitlementJSONRequestBody, reqEditors ...RequestEditorFn) (*GrantTeamEntitlementResponse, error)
|
|
|
|
// RevokeTeamEntitlementWithResponse request
|
|
RevokeTeamEntitlementWithResponse(ctx context.Context, teamId string, eid string, reqEditors ...RequestEditorFn) (*RevokeTeamEntitlementResponse, error)
|
|
|
|
// UpdateTeamEntitlementWithBodyWithResponse request with any body
|
|
UpdateTeamEntitlementWithBodyWithResponse(ctx context.Context, teamId string, eid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTeamEntitlementResponse, error)
|
|
|
|
UpdateTeamEntitlementWithResponse(ctx context.Context, teamId string, eid string, body UpdateTeamEntitlementJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTeamEntitlementResponse, error)
|
|
|
|
// ListTeamInvitationsWithResponse request
|
|
ListTeamInvitationsWithResponse(ctx context.Context, teamId string, reqEditors ...RequestEditorFn) (*ListTeamInvitationsResponse, error)
|
|
|
|
// CreateTeamInviteLinkWithBodyWithResponse request with any body
|
|
CreateTeamInviteLinkWithBodyWithResponse(ctx context.Context, teamId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamInviteLinkResponse, error)
|
|
|
|
CreateTeamInviteLinkWithResponse(ctx context.Context, teamId string, body CreateTeamInviteLinkJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamInviteLinkResponse, error)
|
|
|
|
// DeleteTeamLogoWithResponse request
|
|
DeleteTeamLogoWithResponse(ctx context.Context, teamId string, reqEditors ...RequestEditorFn) (*DeleteTeamLogoResponse, error)
|
|
|
|
// SetTeamLogoWithResponse request
|
|
SetTeamLogoWithResponse(ctx context.Context, teamId string, reqEditors ...RequestEditorFn) (*SetTeamLogoResponse, error)
|
|
|
|
// JoinTeamWithBodyWithResponse request with any body
|
|
JoinTeamWithBodyWithResponse(ctx context.Context, teamId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*JoinTeamResponse, error)
|
|
|
|
JoinTeamWithResponse(ctx context.Context, teamId string, body JoinTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*JoinTeamResponse, error)
|
|
|
|
// ListTrashObjectsWithResponse request
|
|
ListTrashObjectsWithResponse(ctx context.Context, params *ListTrashObjectsParams, reqEditors ...RequestEditorFn) (*ListTrashObjectsResponse, error)
|
|
|
|
// PurgeTrashObjectWithResponse request
|
|
PurgeTrashObjectWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*PurgeTrashObjectResponse, error)
|
|
|
|
// GetTrashObjectWithResponse request
|
|
GetTrashObjectWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetTrashObjectResponse, error)
|
|
|
|
// RestoreObjectWithBodyWithResponse request with any body
|
|
RestoreObjectWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RestoreObjectResponse, error)
|
|
|
|
RestoreObjectWithResponse(ctx context.Context, id string, body RestoreObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*RestoreObjectResponse, error)
|
|
|
|
// DeleteMyAvatarWithResponse request
|
|
DeleteMyAvatarWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*DeleteMyAvatarResponse, error)
|
|
|
|
// SetMyAvatarWithResponse request
|
|
SetMyAvatarWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*SetMyAvatarResponse, error)
|
|
|
|
// ListUserEntitlementsWithResponse request
|
|
ListUserEntitlementsWithResponse(ctx context.Context, userId string, reqEditors ...RequestEditorFn) (*ListUserEntitlementsResponse, error)
|
|
|
|
// GrantUserEntitlementWithBodyWithResponse request with any body
|
|
GrantUserEntitlementWithBodyWithResponse(ctx context.Context, userId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GrantUserEntitlementResponse, error)
|
|
|
|
GrantUserEntitlementWithResponse(ctx context.Context, userId string, body GrantUserEntitlementJSONRequestBody, reqEditors ...RequestEditorFn) (*GrantUserEntitlementResponse, error)
|
|
|
|
// RevokeUserEntitlementWithResponse request
|
|
RevokeUserEntitlementWithResponse(ctx context.Context, userId string, eid string, reqEditors ...RequestEditorFn) (*RevokeUserEntitlementResponse, error)
|
|
|
|
// UpdateUserEntitlementWithBodyWithResponse request with any body
|
|
UpdateUserEntitlementWithBodyWithResponse(ctx context.Context, userId string, eid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateUserEntitlementResponse, error)
|
|
|
|
UpdateUserEntitlementWithResponse(ctx context.Context, userId string, eid string, body UpdateUserEntitlementJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateUserEntitlementResponse, error)
|
|
|
|
// GetUserQuotaWithResponse request
|
|
GetUserQuotaWithResponse(ctx context.Context, userId string, reqEditors ...RequestEditorFn) (*GetUserQuotaResponse, error)
|
|
|
|
// GetUserProfileWithResponse request
|
|
GetUserProfileWithResponse(ctx context.Context, username string, reqEditors ...RequestEditorFn) (*GetUserProfileResponse, error)
|
|
|
|
// ListUserObjectsWithResponse request
|
|
ListUserObjectsWithResponse(ctx context.Context, username string, reqEditors ...RequestEditorFn) (*ListUserObjectsResponse, error)
|
|
}
|
|
|
|
type GetApiAuthAccountInfoResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Data map[string]interface{} `json:"data"`
|
|
User struct {
|
|
Email *string `json:"email,omitempty"`
|
|
EmailVerified bool `json:"emailVerified"`
|
|
Id string `json:"id"`
|
|
Image *string `json:"image,omitempty"`
|
|
Name *string `json:"name,omitempty"`
|
|
} `json:"user"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetApiAuthAccountInfoResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetApiAuthAccountInfoResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetApiAuthAccountInfoResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type BanUserResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
User *User `json:"user,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r BanUserResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r BanUserResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r BanUserResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type CreateUserResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
User *User `json:"user,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r CreateUserResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r CreateUserResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r CreateUserResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetUserResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
User *User `json:"user,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetUserResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetUserResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetUserResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PostApiAuthAdminHasPermissionResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Error *string `json:"error,omitempty"`
|
|
Success bool `json:"success"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PostApiAuthAdminHasPermissionResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PostApiAuthAdminHasPermissionResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PostApiAuthAdminHasPermissionResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ImpersonateUserResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Session *Session `json:"session,omitempty"`
|
|
User *User `json:"user,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ImpersonateUserResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ImpersonateUserResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ImpersonateUserResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type AdminListUserSessionsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Sessions *[]Session `json:"sessions,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r AdminListUserSessionsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r AdminListUserSessionsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r AdminListUserSessionsResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListUsersResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Limit *float32 `json:"limit,omitempty"`
|
|
Offset *float32 `json:"offset,omitempty"`
|
|
Total float32 `json:"total"`
|
|
Users []User `json:"users"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListUsersResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListUsersResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ListUsersResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type RemoveUserResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Success *bool `json:"success,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r RemoveUserResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r RemoveUserResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r RemoveUserResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type RevokeUserSessionResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Success *bool `json:"success,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r RevokeUserSessionResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r RevokeUserSessionResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r RevokeUserSessionResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type RevokeUserSessionsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Success *bool `json:"success,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r RevokeUserSessionsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r RevokeUserSessionsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r RevokeUserSessionsResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type SetUserRoleResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
User *User `json:"user,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r SetUserRoleResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r SetUserRoleResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r SetUserRoleResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type SetUserPasswordResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Status *bool `json:"status,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r SetUserPasswordResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r SetUserPasswordResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r SetUserPasswordResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PostApiAuthAdminStopImpersonatingResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PostApiAuthAdminStopImpersonatingResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PostApiAuthAdminStopImpersonatingResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PostApiAuthAdminStopImpersonatingResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type UnbanUserResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
User *User `json:"user,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r UnbanUserResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r UnbanUserResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r UnbanUserResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type AdminUpdateUserResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
User *User `json:"user,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r AdminUpdateUserResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r AdminUpdateUserResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r AdminUpdateUserResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PostApiAuthApiKeyCreateResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
// CreatedAt Creation timestamp
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
|
|
// Enabled Whether the key is enabled
|
|
Enabled bool `json:"enabled"`
|
|
|
|
// ExpiresAt Expiration timestamp
|
|
ExpiresAt *time.Time `json:"expiresAt,omitempty"`
|
|
|
|
// Id Unique identifier of the API key
|
|
Id string `json:"id"`
|
|
|
|
// Key The full API key (only returned on creation)
|
|
Key string `json:"key"`
|
|
|
|
// LastRefillAt Last refill timestamp
|
|
LastRefillAt *time.Time `json:"lastRefillAt,omitempty"`
|
|
|
|
// LastRequest Last request timestamp
|
|
LastRequest *time.Time `json:"lastRequest,omitempty"`
|
|
|
|
// Metadata Metadata associated with the key
|
|
Metadata *map[string]interface{} `json:"metadata,omitempty"`
|
|
|
|
// Name Name of the API key
|
|
Name *string `json:"name,omitempty"`
|
|
|
|
// Permissions Permissions associated with the key
|
|
Permissions *map[string][]string `json:"permissions,omitempty"`
|
|
|
|
// Prefix Prefix of the API key
|
|
Prefix *string `json:"prefix,omitempty"`
|
|
|
|
// RateLimitEnabled Whether rate limiting is enabled
|
|
RateLimitEnabled bool `json:"rateLimitEnabled"`
|
|
|
|
// RateLimitMax Maximum requests in time window
|
|
RateLimitMax *float32 `json:"rateLimitMax,omitempty"`
|
|
|
|
// RateLimitTimeWindow Rate limit time window in milliseconds
|
|
RateLimitTimeWindow *float32 `json:"rateLimitTimeWindow,omitempty"`
|
|
|
|
// ReferenceId ID of the reference owning the key
|
|
ReferenceId string `json:"referenceId"`
|
|
|
|
// RefillAmount Amount to refill
|
|
RefillAmount *float32 `json:"refillAmount,omitempty"`
|
|
|
|
// RefillInterval Refill interval in milliseconds
|
|
RefillInterval *float32 `json:"refillInterval,omitempty"`
|
|
|
|
// Remaining Remaining requests
|
|
Remaining *float32 `json:"remaining,omitempty"`
|
|
|
|
// RequestCount Current request count in window
|
|
RequestCount float32 `json:"requestCount"`
|
|
|
|
// Start Starting characters of the key (if configured)
|
|
Start *string `json:"start,omitempty"`
|
|
|
|
// UpdatedAt Last update timestamp
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PostApiAuthApiKeyCreateResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PostApiAuthApiKeyCreateResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PostApiAuthApiKeyCreateResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PostApiAuthApiKeyDeleteResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
// Success Indicates if the API key was successfully deleted
|
|
Success bool `json:"success"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PostApiAuthApiKeyDeleteResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PostApiAuthApiKeyDeleteResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PostApiAuthApiKeyDeleteResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetApiAuthApiKeyGetResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
// CreatedAt created at
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
|
|
// Enabled Sets if key is enabled or disabled
|
|
Enabled bool `json:"enabled"`
|
|
|
|
// ExpiresAt Expiry date of a key
|
|
ExpiresAt *time.Time `json:"expiresAt,omitempty"`
|
|
|
|
// Id ID
|
|
Id string `json:"id"`
|
|
|
|
// LastRefillAt The last refill date
|
|
LastRefillAt *time.Time `json:"lastRefillAt,omitempty"`
|
|
|
|
// LastRequest When last request occurred
|
|
LastRequest *time.Time `json:"lastRequest,omitempty"`
|
|
|
|
// Metadata Extra metadata about the apiKey
|
|
Metadata *map[string]interface{} `json:"metadata,omitempty"`
|
|
|
|
// Name The name of the key
|
|
Name *string `json:"name,omitempty"`
|
|
|
|
// Permissions Permissions for the api key (stored as JSON string)
|
|
Permissions *string `json:"permissions,omitempty"`
|
|
|
|
// Prefix The API Key prefix. Stored as plain text.
|
|
Prefix *string `json:"prefix,omitempty"`
|
|
|
|
// RateLimitEnabled Whether the key has rate limiting enabled
|
|
RateLimitEnabled bool `json:"rateLimitEnabled"`
|
|
|
|
// RateLimitMax Maximum amount of requests allowed within a window
|
|
RateLimitMax *float32 `json:"rateLimitMax,omitempty"`
|
|
|
|
// RateLimitTimeWindow The duration in milliseconds
|
|
RateLimitTimeWindow *float32 `json:"rateLimitTimeWindow,omitempty"`
|
|
|
|
// RefillAmount The amount to refill
|
|
RefillAmount *float32 `json:"refillAmount,omitempty"`
|
|
|
|
// RefillInterval The interval in milliseconds between refills of the `remaining` count. Example: 3600000 // refill every hour (3600000ms = 1h)
|
|
RefillInterval *float32 `json:"refillInterval,omitempty"`
|
|
|
|
// Remaining Remaining requests (every time api key is used this should updated and should be updated on refill as well)
|
|
Remaining *float32 `json:"remaining,omitempty"`
|
|
|
|
// RequestCount The number of requests made within the rate limit time window
|
|
RequestCount float32 `json:"requestCount"`
|
|
|
|
// Start Shows the first few characters of the API key, including the prefix. This allows you to show those few characters in the UI to make it easier for users to identify the API key.
|
|
Start *string `json:"start,omitempty"`
|
|
|
|
// UpdatedAt updated at
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
|
|
// UserId The owner of the user id
|
|
UserId string `json:"userId"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetApiAuthApiKeyGetResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetApiAuthApiKeyGetResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetApiAuthApiKeyGetResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetApiAuthApiKeyListResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
ApiKeys []struct {
|
|
// CreatedAt created at
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
|
|
// Enabled Sets if key is enabled or disabled
|
|
Enabled bool `json:"enabled"`
|
|
|
|
// ExpiresAt Expiry date of a key
|
|
ExpiresAt *time.Time `json:"expiresAt,omitempty"`
|
|
|
|
// Id ID
|
|
Id string `json:"id"`
|
|
|
|
// LastRefillAt The last refill date
|
|
LastRefillAt *time.Time `json:"lastRefillAt,omitempty"`
|
|
|
|
// LastRequest When last request occurred
|
|
LastRequest *time.Time `json:"lastRequest,omitempty"`
|
|
|
|
// Metadata Extra metadata about the apiKey
|
|
Metadata *map[string]interface{} `json:"metadata,omitempty"`
|
|
|
|
// Name The name of the key
|
|
Name *string `json:"name,omitempty"`
|
|
|
|
// Permissions Permissions for the api key (stored as JSON string)
|
|
Permissions *string `json:"permissions,omitempty"`
|
|
|
|
// Prefix The API Key prefix. Stored as plain text.
|
|
Prefix *string `json:"prefix,omitempty"`
|
|
|
|
// RateLimitEnabled Whether the key has rate limiting enabled
|
|
RateLimitEnabled bool `json:"rateLimitEnabled"`
|
|
|
|
// RateLimitMax Maximum amount of requests allowed within a window
|
|
RateLimitMax *float32 `json:"rateLimitMax,omitempty"`
|
|
|
|
// RateLimitTimeWindow The duration in milliseconds
|
|
RateLimitTimeWindow *float32 `json:"rateLimitTimeWindow,omitempty"`
|
|
|
|
// RefillAmount The amount to refill
|
|
RefillAmount *float32 `json:"refillAmount,omitempty"`
|
|
|
|
// RefillInterval The interval in milliseconds between refills of the `remaining` count. Example: 3600000 // refill every hour (3600000ms = 1h)
|
|
RefillInterval *float32 `json:"refillInterval,omitempty"`
|
|
|
|
// Remaining Remaining requests (every time api key is used this should updated and should be updated on refill as well)
|
|
Remaining *float32 `json:"remaining,omitempty"`
|
|
|
|
// RequestCount The number of requests made within the rate limit time window
|
|
RequestCount float32 `json:"requestCount"`
|
|
|
|
// Start Shows the first few characters of the API key, including the prefix. This allows you to show those few characters in the UI to make it easier for users to identify the API key.
|
|
Start *string `json:"start,omitempty"`
|
|
|
|
// UpdatedAt updated at
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
|
|
// UserId The owner of the user id
|
|
UserId string `json:"userId"`
|
|
} `json:"apiKeys"`
|
|
|
|
// Limit The limit used for pagination
|
|
Limit *float32 `json:"limit,omitempty"`
|
|
|
|
// Offset The offset used for pagination
|
|
Offset *float32 `json:"offset,omitempty"`
|
|
|
|
// Total Total number of API keys
|
|
Total float32 `json:"total"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetApiAuthApiKeyListResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetApiAuthApiKeyListResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetApiAuthApiKeyListResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PostApiAuthApiKeyUpdateResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
// CreatedAt created at
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
|
|
// Enabled Sets if key is enabled or disabled
|
|
Enabled bool `json:"enabled"`
|
|
|
|
// ExpiresAt Expiry date of a key
|
|
ExpiresAt *time.Time `json:"expiresAt,omitempty"`
|
|
|
|
// Id ID
|
|
Id string `json:"id"`
|
|
|
|
// LastRefillAt The last refill date
|
|
LastRefillAt *time.Time `json:"lastRefillAt,omitempty"`
|
|
|
|
// LastRequest When last request occurred
|
|
LastRequest *time.Time `json:"lastRequest,omitempty"`
|
|
|
|
// Metadata Extra metadata about the apiKey
|
|
Metadata *map[string]interface{} `json:"metadata,omitempty"`
|
|
|
|
// Name The name of the key
|
|
Name *string `json:"name,omitempty"`
|
|
|
|
// Permissions Permissions for the api key (stored as JSON string)
|
|
Permissions *string `json:"permissions,omitempty"`
|
|
|
|
// Prefix The API Key prefix. Stored as plain text.
|
|
Prefix *string `json:"prefix,omitempty"`
|
|
|
|
// RateLimitEnabled Whether the key has rate limiting enabled
|
|
RateLimitEnabled bool `json:"rateLimitEnabled"`
|
|
|
|
// RateLimitMax Maximum amount of requests allowed within a window
|
|
RateLimitMax *float32 `json:"rateLimitMax,omitempty"`
|
|
|
|
// RateLimitTimeWindow The duration in milliseconds
|
|
RateLimitTimeWindow *float32 `json:"rateLimitTimeWindow,omitempty"`
|
|
|
|
// RefillAmount The amount to refill
|
|
RefillAmount *float32 `json:"refillAmount,omitempty"`
|
|
|
|
// RefillInterval The interval in milliseconds between refills of the `remaining` count. Example: 3600000 // refill every hour (3600000ms = 1h)
|
|
RefillInterval *float32 `json:"refillInterval,omitempty"`
|
|
|
|
// Remaining Remaining requests (every time api key is used this should updated and should be updated on refill as well)
|
|
Remaining *float32 `json:"remaining,omitempty"`
|
|
|
|
// RequestCount The number of requests made within the rate limit time window
|
|
RequestCount float32 `json:"requestCount"`
|
|
|
|
// Start Shows the first few characters of the API key, including the prefix. This allows you to show those few characters in the UI to make it easier for users to identify the API key.
|
|
Start *string `json:"start,omitempty"`
|
|
|
|
// UpdatedAt updated at
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
|
|
// UserId The owner of the user id
|
|
UserId string `json:"userId"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PostApiAuthApiKeyUpdateResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PostApiAuthApiKeyUpdateResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PostApiAuthApiKeyUpdateResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetApiAuthCallbackIdResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetApiAuthCallbackIdResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetApiAuthCallbackIdResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetApiAuthCallbackIdResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PostApiAuthCallbackIdResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PostApiAuthCallbackIdResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PostApiAuthCallbackIdResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PostApiAuthCallbackIdResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ChangeEmailResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
// Message Status message of the email change process
|
|
Message *ChangeEmail200JSONResponseBodyMessage `json:"message,omitempty"`
|
|
|
|
// Status Indicates if the request was successful
|
|
Status bool `json:"status"`
|
|
User *User `json:"user,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ChangeEmailResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ChangeEmailResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ChangeEmailResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ChangePasswordResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
// Token New session token if other sessions were revoked
|
|
Token *string `json:"token,omitempty"`
|
|
User struct {
|
|
// CreatedAt When the user was created
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
|
|
// Email The email address of the user
|
|
Email openapi_types.Email `json:"email"`
|
|
|
|
// EmailVerified Whether the email has been verified
|
|
EmailVerified bool `json:"emailVerified"`
|
|
|
|
// Id The unique identifier of the user
|
|
Id string `json:"id"`
|
|
|
|
// Image The profile image URL of the user
|
|
Image *string `json:"image,omitempty"`
|
|
|
|
// Name The name of the user
|
|
Name string `json:"name"`
|
|
|
|
// UpdatedAt When the user was last updated
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
} `json:"user"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ChangePasswordResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ChangePasswordResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ChangePasswordResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type DeleteUserResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
// Message Status message of the deletion process
|
|
Message DeleteUser200JSONResponseBodyMessage `json:"message"`
|
|
|
|
// Success Indicates if the operation was successful
|
|
Success bool `json:"success"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r DeleteUserResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r DeleteUserResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r DeleteUserResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetApiAuthDeleteUserCallbackResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
// Message Confirmation message
|
|
Message GetApiAuthDeleteUserCallback200JSONResponseBodyMessage `json:"message"`
|
|
|
|
// Success Indicates if the deletion was successful
|
|
Success bool `json:"success"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetApiAuthDeleteUserCallbackResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetApiAuthDeleteUserCallbackResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetApiAuthDeleteUserCallbackResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetApiAuthDeviceResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
// Status Current status of the device authorization
|
|
Status *GetApiAuthDevice200JSONResponseBodyStatus `json:"status,omitempty"`
|
|
|
|
// UserCode The user code to verify
|
|
UserCode *string `json:"user_code,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetApiAuthDeviceResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetApiAuthDeviceResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetApiAuthDeviceResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PostApiAuthDeviceApproveResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Success *bool `json:"success,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PostApiAuthDeviceApproveResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PostApiAuthDeviceApproveResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PostApiAuthDeviceApproveResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PostApiAuthDeviceCodeResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
// DeviceCode The device verification code
|
|
DeviceCode *string `json:"device_code,omitempty"`
|
|
|
|
// ExpiresIn Lifetime in seconds of the device code
|
|
ExpiresIn *float32 `json:"expires_in,omitempty"`
|
|
|
|
// Interval Minimum polling interval in seconds
|
|
Interval *float32 `json:"interval,omitempty"`
|
|
|
|
// UserCode The user code to display
|
|
UserCode *string `json:"user_code,omitempty"`
|
|
|
|
// VerificationUri The URL for user verification. Defaults to /device if not configured.
|
|
VerificationUri *string `json:"verification_uri,omitempty"`
|
|
|
|
// VerificationUriComplete The complete URL with user code as query parameter.
|
|
VerificationUriComplete *string `json:"verification_uri_complete,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Error *PostApiAuthDeviceCode400JSONResponseBodyError `json:"error,omitempty"`
|
|
ErrorDescription *string `json:"error_description,omitempty"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PostApiAuthDeviceCodeResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PostApiAuthDeviceCodeResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PostApiAuthDeviceCodeResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PostApiAuthDeviceDenyResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Success *bool `json:"success,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PostApiAuthDeviceDenyResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PostApiAuthDeviceDenyResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PostApiAuthDeviceDenyResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PostApiAuthDeviceTokenResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
AccessToken string `json:"access_token"`
|
|
ExpiresIn int `json:"expires_in"`
|
|
Scope *string `json:"scope,omitempty"`
|
|
TokenType string `json:"token_type"`
|
|
}
|
|
JSON400 *struct {
|
|
Error *PostApiAuthDeviceToken400JSONResponseBodyError `json:"error,omitempty"`
|
|
ErrorDescription *string `json:"error_description,omitempty"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PostApiAuthDeviceTokenResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PostApiAuthDeviceTokenResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PostApiAuthDeviceTokenResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetApiAuthErrorResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetApiAuthErrorResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetApiAuthErrorResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetApiAuthErrorResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PostApiAuthGetAccessTokenResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
AccessToken *string `json:"accessToken,omitempty"`
|
|
AccessTokenExpiresAt *time.Time `json:"accessTokenExpiresAt,omitempty"`
|
|
IdToken *string `json:"idToken,omitempty"`
|
|
TokenType *string `json:"tokenType,omitempty"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PostApiAuthGetAccessTokenResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PostApiAuthGetAccessTokenResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PostApiAuthGetAccessTokenResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetSessionResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Session Session `json:"session"`
|
|
User User `json:"user"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetSessionResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetSessionResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetSessionResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetSessionPostResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Session Session `json:"session"`
|
|
User User `json:"user"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetSessionPostResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetSessionPostResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetSessionPostResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PostApiAuthIsUsernameAvailableResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PostApiAuthIsUsernameAvailableResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PostApiAuthIsUsernameAvailableResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PostApiAuthIsUsernameAvailableResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type LinkSocialAccountResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
// Redirect Indicates if the user should be redirected to the authorization URL
|
|
Redirect bool `json:"redirect"`
|
|
Status *bool `json:"status,omitempty"`
|
|
|
|
// Url The authorization URL to redirect the user to
|
|
Url *string `json:"url,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r LinkSocialAccountResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r LinkSocialAccountResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r LinkSocialAccountResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListUserAccountsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *[]struct {
|
|
AccountId string `json:"accountId"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
Id string `json:"id"`
|
|
ProviderId string `json:"providerId"`
|
|
Scopes []string `json:"scopes"`
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
UserId string `json:"userId"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListUserAccountsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListUserAccountsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ListUserAccountsResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListUserSessionsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *[]Session
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListUserSessionsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListUserSessionsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ListUserSessionsResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetApiAuthOauth2CallbackProviderIdResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Url *string `json:"url,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetApiAuthOauth2CallbackProviderIdResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetApiAuthOauth2CallbackProviderIdResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetApiAuthOauth2CallbackProviderIdResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PostApiAuthOauth2LinkResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
// Redirect Indicates that the client should redirect to the provided URL
|
|
Redirect PostApiAuthOauth2Link200JSONResponseBodyRedirect `json:"redirect"`
|
|
|
|
// Url The authorization URL to redirect the user to for linking the OAuth2 account
|
|
Url string `json:"url"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PostApiAuthOauth2LinkResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PostApiAuthOauth2LinkResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PostApiAuthOauth2LinkResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetApiAuthOkResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
// Ok Indicates if the API is working
|
|
Ok bool `json:"ok"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetApiAuthOkResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetApiAuthOkResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetApiAuthOkResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PostApiAuthOrganizationAcceptInvitationResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Invitation *map[string]interface{} `json:"invitation,omitempty"`
|
|
Member *map[string]interface{} `json:"member,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PostApiAuthOrganizationAcceptInvitationResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PostApiAuthOrganizationAcceptInvitationResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PostApiAuthOrganizationAcceptInvitationResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PostApiAuthOrganizationCancelInvitationResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PostApiAuthOrganizationCancelInvitationResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PostApiAuthOrganizationCancelInvitationResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PostApiAuthOrganizationCancelInvitationResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PostApiAuthOrganizationCheckSlugResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PostApiAuthOrganizationCheckSlugResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PostApiAuthOrganizationCheckSlugResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PostApiAuthOrganizationCheckSlugResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PostApiAuthOrganizationCreateResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *Organization
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PostApiAuthOrganizationCreateResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PostApiAuthOrganizationCreateResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PostApiAuthOrganizationCreateResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PostApiAuthOrganizationDeleteResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *string
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PostApiAuthOrganizationDeleteResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PostApiAuthOrganizationDeleteResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PostApiAuthOrganizationDeleteResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetApiAuthOrganizationGetActiveMemberResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Id string `json:"id"`
|
|
OrganizationId string `json:"organizationId"`
|
|
Role string `json:"role"`
|
|
UserId string `json:"userId"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetApiAuthOrganizationGetActiveMemberResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetApiAuthOrganizationGetActiveMemberResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetApiAuthOrganizationGetActiveMemberResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetApiAuthOrganizationGetActiveMemberRoleResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetApiAuthOrganizationGetActiveMemberRoleResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetApiAuthOrganizationGetActiveMemberRoleResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetApiAuthOrganizationGetActiveMemberRoleResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetOrganizationResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *Organization
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetOrganizationResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetOrganizationResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetOrganizationResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetApiAuthOrganizationGetInvitationResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Email string `json:"email"`
|
|
ExpiresAt string `json:"expiresAt"`
|
|
Id string `json:"id"`
|
|
InviterEmail string `json:"inviterEmail"`
|
|
InviterId string `json:"inviterId"`
|
|
OrganizationId string `json:"organizationId"`
|
|
OrganizationName string `json:"organizationName"`
|
|
OrganizationSlug string `json:"organizationSlug"`
|
|
Role string `json:"role"`
|
|
Status string `json:"status"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetApiAuthOrganizationGetInvitationResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetApiAuthOrganizationGetInvitationResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetApiAuthOrganizationGetInvitationResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PostApiAuthOrganizationHasPermissionResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Error *string `json:"error,omitempty"`
|
|
Success bool `json:"success"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PostApiAuthOrganizationHasPermissionResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PostApiAuthOrganizationHasPermissionResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PostApiAuthOrganizationHasPermissionResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type CreateOrganizationInvitationResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
CreatedAt string `json:"createdAt"`
|
|
Email string `json:"email"`
|
|
ExpiresAt string `json:"expiresAt"`
|
|
Id string `json:"id"`
|
|
InviterId string `json:"inviterId"`
|
|
OrganizationId string `json:"organizationId"`
|
|
Role string `json:"role"`
|
|
Status string `json:"status"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r CreateOrganizationInvitationResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r CreateOrganizationInvitationResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r CreateOrganizationInvitationResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PostApiAuthOrganizationLeaveResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PostApiAuthOrganizationLeaveResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PostApiAuthOrganizationLeaveResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PostApiAuthOrganizationLeaveResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetApiAuthOrganizationListResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *[]Organization
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetApiAuthOrganizationListResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetApiAuthOrganizationListResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetApiAuthOrganizationListResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetApiAuthOrganizationListInvitationsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetApiAuthOrganizationListInvitationsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetApiAuthOrganizationListInvitationsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetApiAuthOrganizationListInvitationsResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetApiAuthOrganizationListMembersResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetApiAuthOrganizationListMembersResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetApiAuthOrganizationListMembersResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetApiAuthOrganizationListMembersResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetApiAuthOrganizationListUserInvitationsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *[]struct {
|
|
CreatedAt string `json:"createdAt"`
|
|
Email string `json:"email"`
|
|
ExpiresAt string `json:"expiresAt"`
|
|
Id string `json:"id"`
|
|
|
|
// InviterId The ID of the user who created the invitation
|
|
InviterId string `json:"inviterId"`
|
|
OrganizationId string `json:"organizationId"`
|
|
OrganizationName string `json:"organizationName"`
|
|
Role string `json:"role"`
|
|
Status string `json:"status"`
|
|
|
|
// TeamId The ID of the team associated with the invitation
|
|
TeamId *string `json:"teamId,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetApiAuthOrganizationListUserInvitationsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetApiAuthOrganizationListUserInvitationsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetApiAuthOrganizationListUserInvitationsResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PostApiAuthOrganizationRejectInvitationResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Invitation *map[string]interface{} `json:"invitation,omitempty"`
|
|
Member *map[string]interface{} `json:"member,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PostApiAuthOrganizationRejectInvitationResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PostApiAuthOrganizationRejectInvitationResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PostApiAuthOrganizationRejectInvitationResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PostApiAuthOrganizationRemoveMemberResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Member struct {
|
|
Id string `json:"id"`
|
|
OrganizationId string `json:"organizationId"`
|
|
Role string `json:"role"`
|
|
UserId string `json:"userId"`
|
|
} `json:"member"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PostApiAuthOrganizationRemoveMemberResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PostApiAuthOrganizationRemoveMemberResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PostApiAuthOrganizationRemoveMemberResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type SetActiveOrganizationResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *Organization
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r SetActiveOrganizationResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r SetActiveOrganizationResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r SetActiveOrganizationResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PostApiAuthOrganizationUpdateResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *Organization
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PostApiAuthOrganizationUpdateResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PostApiAuthOrganizationUpdateResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PostApiAuthOrganizationUpdateResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type UpdateOrganizationMemberRoleResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Member struct {
|
|
Id string `json:"id"`
|
|
OrganizationId string `json:"organizationId"`
|
|
Role string `json:"role"`
|
|
UserId string `json:"userId"`
|
|
} `json:"member"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r UpdateOrganizationMemberRoleResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r UpdateOrganizationMemberRoleResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r UpdateOrganizationMemberRoleResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PostApiAuthRefreshTokenResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
AccessToken *string `json:"accessToken,omitempty"`
|
|
AccessTokenExpiresAt *time.Time `json:"accessTokenExpiresAt,omitempty"`
|
|
IdToken *string `json:"idToken,omitempty"`
|
|
RefreshToken *string `json:"refreshToken,omitempty"`
|
|
RefreshTokenExpiresAt *time.Time `json:"refreshTokenExpiresAt,omitempty"`
|
|
TokenType *string `json:"tokenType,omitempty"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PostApiAuthRefreshTokenResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PostApiAuthRefreshTokenResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PostApiAuthRefreshTokenResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type RequestPasswordResetResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
Status *bool `json:"status,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r RequestPasswordResetResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r RequestPasswordResetResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r RequestPasswordResetResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ResetPasswordResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Status *bool `json:"status,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ResetPasswordResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ResetPasswordResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ResetPasswordResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ResetPasswordCallbackResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Token *string `json:"token,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ResetPasswordCallbackResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ResetPasswordCallbackResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ResetPasswordCallbackResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PostApiAuthRevokeOtherSessionsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
// Status Indicates if all other sessions were revoked successfully
|
|
Status bool `json:"status"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PostApiAuthRevokeOtherSessionsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PostApiAuthRevokeOtherSessionsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PostApiAuthRevokeOtherSessionsResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PostApiAuthRevokeSessionResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
// Status Indicates if the session was revoked successfully
|
|
Status bool `json:"status"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PostApiAuthRevokeSessionResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PostApiAuthRevokeSessionResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PostApiAuthRevokeSessionResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PostApiAuthRevokeSessionsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
// Status Indicates if all sessions were revoked successfully
|
|
Status bool `json:"status"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PostApiAuthRevokeSessionsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PostApiAuthRevokeSessionsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PostApiAuthRevokeSessionsResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type SendVerificationEmailResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
// Status Indicates if the email was sent successfully
|
|
Status *bool `json:"status,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
// Message Error message
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r SendVerificationEmailResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r SendVerificationEmailResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r SendVerificationEmailResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type SignInEmailResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Redirect SignInEmail200JSONResponseBodyRedirect `json:"redirect"`
|
|
|
|
// Token Session token
|
|
Token string `json:"token"`
|
|
Url *string `json:"url,omitempty"`
|
|
User User `json:"user"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r SignInEmailResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r SignInEmailResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r SignInEmailResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PostApiAuthSignInOauth2Response struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Redirect *bool `json:"redirect,omitempty"`
|
|
Url *string `json:"url,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PostApiAuthSignInOauth2Response) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PostApiAuthSignInOauth2Response) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PostApiAuthSignInOauth2Response) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type SocialSignInResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Redirect bool `json:"redirect"`
|
|
Token *string `json:"token,omitempty"`
|
|
Url *string `json:"url,omitempty"`
|
|
User *User `json:"user,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r SocialSignInResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r SocialSignInResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r SocialSignInResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PostApiAuthSignInUsernameResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
// Redirect Whether the client should follow the Location header. True when callbackURL was provided.
|
|
Redirect bool `json:"redirect"`
|
|
|
|
// Token Session token for the authenticated session
|
|
Token string `json:"token"`
|
|
|
|
// Url The callbackURL echoed back so the client can redirect.
|
|
Url *string `json:"url,omitempty"`
|
|
User User `json:"user"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON422 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PostApiAuthSignInUsernameResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PostApiAuthSignInUsernameResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PostApiAuthSignInUsernameResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type SignOutResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Success *bool `json:"success,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r SignOutResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r SignOutResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r SignOutResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type SignUpWithEmailAndPasswordResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
// Token Authentication token for the session
|
|
Token *string `json:"token,omitempty"`
|
|
User struct {
|
|
// CreatedAt When the user was created
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
|
|
// Email The email address of the user
|
|
Email openapi_types.Email `json:"email"`
|
|
|
|
// EmailVerified Whether the email has been verified
|
|
EmailVerified bool `json:"emailVerified"`
|
|
|
|
// Id The unique identifier of the user
|
|
Id string `json:"id"`
|
|
|
|
// Image The profile image URL of the user
|
|
Image *string `json:"image,omitempty"`
|
|
|
|
// Name The name of the user
|
|
Name string `json:"name"`
|
|
|
|
// UpdatedAt When the user was last updated
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
} `json:"user"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON422 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r SignUpWithEmailAndPasswordResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r SignUpWithEmailAndPasswordResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r SignUpWithEmailAndPasswordResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PostApiAuthUnlinkAccountResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Status *bool `json:"status,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PostApiAuthUnlinkAccountResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PostApiAuthUnlinkAccountResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PostApiAuthUnlinkAccountResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type UpdateSessionResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Session *Session `json:"session,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r UpdateSessionResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r UpdateSessionResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r UpdateSessionResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type UpdateUserResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
User *User `json:"user,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r UpdateUserResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r UpdateUserResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r UpdateUserResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetApiAuthVerifyEmailResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
// Status Indicates if the email was verified successfully
|
|
Status bool `json:"status"`
|
|
User User `json:"user"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetApiAuthVerifyEmailResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetApiAuthVerifyEmailResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetApiAuthVerifyEmailResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type VerifyPasswordResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Status *bool `json:"status,omitempty"`
|
|
}
|
|
JSON400 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON401 *struct {
|
|
Message string `json:"message"`
|
|
}
|
|
JSON403 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON404 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON429 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
JSON500 *struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r VerifyPasswordResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r VerifyPasswordResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r VerifyPasswordResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListBackgroundJobsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *BackgroundJobPage
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListBackgroundJobsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListBackgroundJobsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ListBackgroundJobsResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type CreateBackgroundJobResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON201 *BackgroundJob
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r CreateBackgroundJobResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r CreateBackgroundJobResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r CreateBackgroundJobResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetBackgroundJobResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *BackgroundJob
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetBackgroundJobResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetBackgroundJobResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetBackgroundJobResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type RetryBackgroundJobResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON201 *BackgroundJob
|
|
JSON404 *Error
|
|
JSON409 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r RetryBackgroundJobResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r RetryBackgroundJobResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r RetryBackgroundJobResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type CancelBackgroundJobResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *BackgroundJob
|
|
JSON404 *Error
|
|
JSON409 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r CancelBackgroundJobResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r CancelBackgroundJobResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r CancelBackgroundJobResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListDownloadersResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *DownloaderList
|
|
JSON401 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListDownloadersResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListDownloadersResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ListDownloadersResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type CreateDownloaderResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON201 *struct {
|
|
Downloader Downloader `json:"downloader"`
|
|
Token string `json:"token"`
|
|
}
|
|
JSON401 *Error
|
|
JSON402 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r CreateDownloaderResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r CreateDownloaderResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r CreateDownloaderResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type RecordDownloaderHeartbeatResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *Downloader
|
|
JSON401 *Error
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r RecordDownloaderHeartbeatResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r RecordDownloaderHeartbeatResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r RecordDownloaderHeartbeatResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type DeleteDownloaderResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r DeleteDownloaderResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r DeleteDownloaderResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r DeleteDownloaderResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type UpdateDownloaderResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *Downloader
|
|
JSON402 *Error
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r UpdateDownloaderResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r UpdateDownloaderResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r UpdateDownloaderResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListDownloadTasksResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *DownloadTaskPage
|
|
JSON401 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListDownloadTasksResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListDownloadTasksResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ListDownloadTasksResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type CreateDownloadTaskResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON201 *DownloadTask
|
|
JSON401 *Error
|
|
JSON403 *Error
|
|
JSON404 *Error
|
|
JSON409 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r CreateDownloadTaskResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r CreateDownloadTaskResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r CreateDownloadTaskResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type DeleteDownloadTaskResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON401 *Error
|
|
JSON403 *Error
|
|
JSON404 *Error
|
|
JSON409 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r DeleteDownloadTaskResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r DeleteDownloadTaskResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r DeleteDownloadTaskResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetDownloadTaskResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *DownloadTask
|
|
JSON401 *Error
|
|
JSON403 *Error
|
|
JSON404 *Error
|
|
JSON409 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetDownloadTaskResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetDownloadTaskResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetDownloadTaskResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type UpdateDownloadTaskResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *DownloadTask
|
|
JSON401 *Error
|
|
JSON403 *Error
|
|
JSON404 *Error
|
|
JSON409 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r UpdateDownloadTaskResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r UpdateDownloadTaskResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r UpdateDownloadTaskResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type RetryDownloadTaskResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON201 *DownloadTask
|
|
JSON401 *Error
|
|
JSON403 *Error
|
|
JSON404 *Error
|
|
JSON409 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r RetryDownloadTaskResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r RetryDownloadTaskResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r RetryDownloadTaskResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type SetDownloadTaskStatusResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *DownloadTask
|
|
JSON401 *Error
|
|
JSON403 *Error
|
|
JSON404 *Error
|
|
JSON409 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r SetDownloadTaskStatusResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r SetDownloadTaskStatusResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r SetDownloadTaskStatusResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type StreamEventsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON401 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r StreamEventsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r StreamEventsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r StreamEventsResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type DeleteImageHostingConfigResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON401 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r DeleteImageHostingConfigResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r DeleteImageHostingConfigResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r DeleteImageHostingConfigResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetImageHostingConfigResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *ImageHostingConfig
|
|
JSON401 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetImageHostingConfigResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetImageHostingConfigResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetImageHostingConfigResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type UpdateImageHostingConfigResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *ImageHostingConfig
|
|
JSON400 *Error
|
|
JSON401 *Error
|
|
JSON409 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r UpdateImageHostingConfigResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r UpdateImageHostingConfigResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r UpdateImageHostingConfigResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListImageHostingsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *ImageHostingList
|
|
JSON400 *Error
|
|
JSON403 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListImageHostingsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListImageHostingsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ListImageHostingsResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PresignImageHostingUploadResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON201 *ImageHostingDraft
|
|
JSON400 *Error
|
|
JSON403 *Error
|
|
JSON413 *Error
|
|
JSON503 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PresignImageHostingUploadResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PresignImageHostingUploadResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PresignImageHostingUploadResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type DeleteImageHostingResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON400 *Error
|
|
JSON403 *Error
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r DeleteImageHostingResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r DeleteImageHostingResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r DeleteImageHostingResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetImageHostingResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *ImageHosting
|
|
JSON400 *Error
|
|
JSON403 *Error
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetImageHostingResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetImageHostingResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetImageHostingResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ConfirmImageHostingResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *ImageHosting
|
|
JSON400 *Error
|
|
JSON403 *Error
|
|
JSON404 *Error
|
|
JSON422 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ConfirmImageHostingResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ConfirmImageHostingResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ConfirmImageHostingResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListNotificationsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *NotificationPage
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListNotificationsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListNotificationsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ListNotificationsResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type MarkAllNotificationsReadResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Count int `json:"count"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r MarkAllNotificationsReadResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r MarkAllNotificationsReadResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r MarkAllNotificationsReadResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetNotificationStatsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Count int `json:"count"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetNotificationStatsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetNotificationStatsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetNotificationStatsResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type MarkNotificationReadResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r MarkNotificationReadResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r MarkNotificationReadResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r MarkNotificationReadResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListObjectsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *ObjectPage
|
|
JSON400 *Error
|
|
JSON403 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListObjectsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListObjectsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ListObjectsResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type CreateObjectResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON201 *struct {
|
|
Alias string `json:"alias"`
|
|
CreatedAt string `json:"createdAt"`
|
|
Dirtype *int `json:"dirtype"`
|
|
Id string `json:"id"`
|
|
Name string `json:"name"`
|
|
Object string `json:"object"`
|
|
OrgId string `json:"orgId"`
|
|
Parent string `json:"parent"`
|
|
Size *int `json:"size"`
|
|
Status string `json:"status"`
|
|
StorageId string `json:"storageId"`
|
|
TrashedAt *int `json:"trashedAt"`
|
|
Type string `json:"type"`
|
|
UpdatedAt string `json:"updatedAt"`
|
|
Upload *struct {
|
|
PartSize int `json:"partSize"`
|
|
SessionId string `json:"sessionId"`
|
|
Urls []string `json:"urls"`
|
|
} `json:"upload,omitempty"`
|
|
}
|
|
JSON400 *Error
|
|
JSON403 *Error
|
|
JSON409 *Error
|
|
JSON503 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r CreateObjectResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r CreateObjectResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r CreateObjectResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type DeleteObjectResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON400 *Error
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r DeleteObjectResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r DeleteObjectResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r DeleteObjectResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetObjectResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Alias string `json:"alias"`
|
|
CreatedAt string `json:"createdAt"`
|
|
Dirtype *int `json:"dirtype"`
|
|
DownloadUrl *string `json:"downloadUrl,omitempty"`
|
|
Id string `json:"id"`
|
|
Name string `json:"name"`
|
|
Object string `json:"object"`
|
|
OrgId string `json:"orgId"`
|
|
Parent string `json:"parent"`
|
|
Size *int `json:"size"`
|
|
Status string `json:"status"`
|
|
StorageId string `json:"storageId"`
|
|
TrashedAt *int `json:"trashedAt"`
|
|
Type string `json:"type"`
|
|
UpdatedAt string `json:"updatedAt"`
|
|
}
|
|
JSON400 *Error
|
|
JSON402 *Error
|
|
JSON404 *Error
|
|
JSON422 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetObjectResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetObjectResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetObjectResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type UpdateObjectResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *Matter
|
|
JSON400 *Error
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r UpdateObjectResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r UpdateObjectResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r UpdateObjectResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type CopyObjectResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON201 *Matter
|
|
JSON400 *Error
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r CopyObjectResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r CopyObjectResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r CopyObjectResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type TransferObjectResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON201 *TransferResult
|
|
JSON400 *Error
|
|
JSON403 *Error
|
|
JSON404 *Error
|
|
JSON422 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r TransferObjectResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r TransferObjectResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r TransferObjectResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type AbortObjectUploadResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON400 *Error
|
|
JSON403 *Error
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r AbortObjectUploadResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r AbortObjectUploadResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r AbortObjectUploadResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type CompleteObjectUploadResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *Matter
|
|
JSON400 *Error
|
|
JSON403 *Error
|
|
JSON404 *Error
|
|
JSON422 *Error
|
|
JSON502 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r CompleteObjectUploadResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r CompleteObjectUploadResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r CompleteObjectUploadResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PresignObjectUploadPartsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
PartSize int `json:"partSize"`
|
|
Parts []struct {
|
|
PartNumber int `json:"partNumber"`
|
|
Url string `json:"url"`
|
|
} `json:"parts"`
|
|
UploadId string `json:"uploadId"`
|
|
}
|
|
JSON400 *Error
|
|
JSON403 *Error
|
|
JSON404 *Error
|
|
JSON502 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PresignObjectUploadPartsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PresignObjectUploadPartsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PresignObjectUploadPartsResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListQuotaOverviewResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *QuotaOverview
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListQuotaOverviewResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListQuotaOverviewResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ListQuotaOverviewResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetMyQuotaResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *EffectiveQuota
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetMyQuotaResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetMyQuotaResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetMyQuotaResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListSharesResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *ShareList
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListSharesResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListSharesResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ListSharesResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type CreateShareResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON201 *CreatedShare
|
|
JSON400 *Error
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r CreateShareResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r CreateShareResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r CreateShareResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetShareResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *ShareView
|
|
JSON404 *Error
|
|
JSON410 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetShareResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetShareResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetShareResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListShareObjectsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *ShareObjects
|
|
JSON400 *Error
|
|
JSON401 *Error
|
|
JSON404 *Error
|
|
JSON410 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListShareObjectsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListShareObjectsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ListShareObjectsResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type SaveShareResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON201 *SaveShareResult
|
|
JSON400 *Error
|
|
JSON401 *Error
|
|
JSON403 *Error
|
|
JSON404 *Error
|
|
JSON410 *Error
|
|
JSON422 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r SaveShareResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r SaveShareResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r SaveShareResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type VerifySharePasswordResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Ok VerifySharePassword200JSONResponseBodyOk `json:"ok"`
|
|
}
|
|
JSON403 *Error
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r VerifySharePasswordResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r VerifySharePasswordResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r VerifySharePasswordResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type RevokeShareResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *ShareView
|
|
JSON403 *Error
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r RevokeShareResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r RevokeShareResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r RevokeShareResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListAnnouncementsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *AnnouncementList
|
|
JSON403 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListAnnouncementsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListAnnouncementsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ListAnnouncementsResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type CreateAnnouncementResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON201 *Announcement
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r CreateAnnouncementResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r CreateAnnouncementResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r CreateAnnouncementResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type DeleteAnnouncementResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r DeleteAnnouncementResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r DeleteAnnouncementResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r DeleteAnnouncementResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetAnnouncementResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *Announcement
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetAnnouncementResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetAnnouncementResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetAnnouncementResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type UpdateAnnouncementResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *Announcement
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r UpdateAnnouncementResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r UpdateAnnouncementResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r UpdateAnnouncementResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListAuditEventsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *AuditEventPage
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListAuditEventsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListAuditEventsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ListAuditEventsResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListAuthProvidersResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *AuthProviderList
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListAuthProvidersResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListAuthProvidersResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ListAuthProvidersResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type DeleteAuthProviderResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON400 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r DeleteAuthProviderResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r DeleteAuthProviderResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r DeleteAuthProviderResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type UpsertAuthProviderResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *AuthProvider
|
|
JSON400 *Error
|
|
JSON402 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r UpsertAuthProviderResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r UpsertAuthProviderResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r UpsertAuthProviderResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetBrandingResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *BrandingConfig
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetBrandingResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetBrandingResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetBrandingResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type UpdateBrandingResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *BrandingConfig
|
|
JSON400 *Error
|
|
JSON413 *Error
|
|
JSON415 *Error
|
|
JSON422 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r UpdateBrandingResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r UpdateBrandingResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r UpdateBrandingResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ResetBrandingFieldResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON400 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ResetBrandingFieldResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ResetBrandingFieldResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ResetBrandingFieldResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetChangelogResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *Changelog
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetChangelogResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetChangelogResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetChangelogResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetEmailConfigResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *EmailSettings
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetEmailConfigResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetEmailConfigResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetEmailConfigResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type SaveEmailConfigResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Success bool `json:"success"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r SaveEmailConfigResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r SaveEmailConfigResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r SaveEmailConfigResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type SendTestEmailResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Success bool `json:"success"`
|
|
}
|
|
JSON400 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r SendTestEmailResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r SendTestEmailResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r SendTestEmailResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetInstanceInfoResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *InstanceInfo
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetInstanceInfoResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetInstanceInfoResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetInstanceInfoResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListSiteInvitationsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *SiteInvitationList
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListSiteInvitationsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListSiteInvitationsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ListSiteInvitationsResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type CreateSiteInvitationResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON201 *SiteInvitation
|
|
JSON401 *Error
|
|
JSON409 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r CreateSiteInvitationResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r CreateSiteInvitationResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r CreateSiteInvitationResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type RevokeSiteInvitationResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON400 *Error
|
|
JSON401 *Error
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r RevokeSiteInvitationResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r RevokeSiteInvitationResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r RevokeSiteInvitationResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ResendSiteInvitationResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *SiteInvitation
|
|
JSON400 *Error
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ResendSiteInvitationResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ResendSiteInvitationResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ResendSiteInvitationResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetSiteInvitationResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *SiteInvitation
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetSiteInvitationResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetSiteInvitationResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetSiteInvitationResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListInviteCodesResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *InviteCodeList
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListInviteCodesResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListInviteCodesResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ListInviteCodesResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GenerateInviteCodesResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON201 *struct {
|
|
Codes []InviteCode `json:"codes"`
|
|
}
|
|
JSON401 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GenerateInviteCodesResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GenerateInviteCodesResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GenerateInviteCodesResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ValidateInviteCodeResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Error *string `json:"error,omitempty"`
|
|
Valid bool `json:"valid"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ValidateInviteCodeResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ValidateInviteCodeResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ValidateInviteCodeResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type DeleteInviteCodeResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON400 *Error
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r DeleteInviteCodeResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r DeleteInviteCodeResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r DeleteInviteCodeResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type UnbindLicenseResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON502 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r UnbindLicenseResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r UnbindLicenseResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r UnbindLicenseResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type InitiateLicensePairingResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *LicensePairing
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r InitiateLicensePairingResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r InitiateLicensePairingResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r InitiateLicensePairingResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PollLicensePairingResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *LicensePairingStatus
|
|
JSON502 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PollLicensePairingResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PollLicensePairingResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PollLicensePairingResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type RefreshLicenseResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
LastRefreshAt *int `json:"last_refresh_at"`
|
|
Success bool `json:"success"`
|
|
}
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r RefreshLicenseResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r RefreshLicenseResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r RefreshLicenseResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetLicensingStatusResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *LicenseBindingState
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetLicensingStatusResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetLicensingStatusResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetLicensingStatusResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListSystemOptionsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *SystemOptionList
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListSystemOptionsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListSystemOptionsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ListSystemOptionsResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type DeleteSystemOptionResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r DeleteSystemOptionResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r DeleteSystemOptionResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r DeleteSystemOptionResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetSystemOptionResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *SystemOption
|
|
JSON403 *Error
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetSystemOptionResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetSystemOptionResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetSystemOptionResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type SetSystemOptionResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *SystemOption
|
|
JSON201 *SystemOption
|
|
JSON400 *Error
|
|
JSON402 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r SetSystemOptionResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r SetSystemOptionResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r SetSystemOptionResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListStoragesResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *StorageList
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListStoragesResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListStoragesResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ListStoragesResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type CreateStorageResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON201 *Storage
|
|
JSON402 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r CreateStorageResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r CreateStorageResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r CreateStorageResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type DeleteStorageResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON404 *Error
|
|
JSON409 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r DeleteStorageResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r DeleteStorageResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r DeleteStorageResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetStorageResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *Storage
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetStorageResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetStorageResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetStorageResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type UpdateStorageResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *Storage
|
|
JSON402 *Error
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r UpdateStorageResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r UpdateStorageResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r UpdateStorageResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type CreateBillingPortalSessionResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *CloudStoreValue
|
|
JSON400 *Error
|
|
JSON403 *Error
|
|
JSON502 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r CreateBillingPortalSessionResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r CreateBillingPortalSessionResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r CreateBillingPortalSessionResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type CreateCheckoutResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *CloudStoreValue
|
|
JSON400 *Error
|
|
JSON403 *Error
|
|
JSON409 *Error
|
|
JSON502 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r CreateCheckoutResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r CreateCheckoutResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r CreateCheckoutResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetCreditBalanceResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *CloudStoreValue
|
|
JSON400 *Error
|
|
JSON403 *Error
|
|
JSON502 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetCreditBalanceResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetCreditBalanceResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetCreditBalanceResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetCreditLedgerResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *CloudStoreValue
|
|
JSON400 *Error
|
|
JSON403 *Error
|
|
JSON502 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetCreditLedgerResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetCreditLedgerResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetCreditLedgerResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListCreditProductsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *CloudStoreValue
|
|
JSON403 *Error
|
|
JSON502 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListCreditProductsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListCreditProductsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ListCreditProductsResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type RedeemGiftCardResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *CloudStoreValue
|
|
JSON400 *Error
|
|
JSON403 *Error
|
|
JSON502 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r RedeemGiftCardResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r RedeemGiftCardResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r RedeemGiftCardResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetDiscountQuoteResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *CloudStoreValue
|
|
JSON403 *Error
|
|
JSON502 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetDiscountQuoteResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetDiscountQuoteResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetDiscountQuoteResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListOrdersResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *CloudStoreValue
|
|
JSON400 *Error
|
|
JSON403 *Error
|
|
JSON502 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListOrdersResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListOrdersResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ListOrdersResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ContinueOrderPaymentResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *CloudStoreValue
|
|
JSON400 *Error
|
|
JSON403 *Error
|
|
JSON404 *Error
|
|
JSON502 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ContinueOrderPaymentResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ContinueOrderPaymentResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ContinueOrderPaymentResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type CancelOrderResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *CloudStoreValue
|
|
JSON400 *Error
|
|
JSON403 *Error
|
|
JSON404 *Error
|
|
JSON502 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r CancelOrderResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r CancelOrderResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r CancelOrderResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListStorePackagesResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *CloudStoreValue
|
|
JSON403 *Error
|
|
JSON502 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListStorePackagesResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListStorePackagesResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ListStorePackagesResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListStoreTargetsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *CloudStoreValue
|
|
JSON403 *Error
|
|
JSON502 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListStoreTargetsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListStoreTargetsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ListStoreTargetsResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListTeamsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *TeamList
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListTeamsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListTeamsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ListTeamsResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetTeamInviteLinkResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *TeamInviteLinkInfo
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetTeamInviteLinkResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetTeamInviteLinkResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetTeamInviteLinkResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetTeamResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *TeamSummary
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetTeamResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetTeamResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetTeamResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListTeamActivityResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *ActivityPage
|
|
JSON403 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListTeamActivityResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListTeamActivityResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ListTeamActivityResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListTeamEntitlementsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *EntitlementList
|
|
JSON400 *Error
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListTeamEntitlementsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListTeamEntitlementsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ListTeamEntitlementsResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GrantTeamEntitlementResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON201 *EntitlementResult
|
|
JSON400 *Error
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GrantTeamEntitlementResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GrantTeamEntitlementResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GrantTeamEntitlementResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type RevokeTeamEntitlementResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON400 *Error
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r RevokeTeamEntitlementResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r RevokeTeamEntitlementResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r RevokeTeamEntitlementResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type UpdateTeamEntitlementResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *EntitlementResult
|
|
JSON400 *Error
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r UpdateTeamEntitlementResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r UpdateTeamEntitlementResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r UpdateTeamEntitlementResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListTeamInvitationsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *TeamInvitationList
|
|
JSON403 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListTeamInvitationsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListTeamInvitationsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ListTeamInvitationsResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type CreateTeamInviteLinkResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON201 *TeamInviteLinkCreated
|
|
JSON403 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r CreateTeamInviteLinkResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r CreateTeamInviteLinkResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r CreateTeamInviteLinkResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type DeleteTeamLogoResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON403 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r DeleteTeamLogoResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r DeleteTeamLogoResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r DeleteTeamLogoResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type SetTeamLogoResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Url string `json:"url"`
|
|
}
|
|
JSON400 *Error
|
|
JSON403 *Error
|
|
JSON413 *Error
|
|
JSON415 *Error
|
|
JSON503 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r SetTeamLogoResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r SetTeamLogoResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r SetTeamLogoResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type JoinTeamResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Ok JoinTeam200JSONResponseBodyOk `json:"ok"`
|
|
}
|
|
JSON404 *Error
|
|
JSON409 *Error
|
|
JSON410 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r JoinTeamResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r JoinTeamResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r JoinTeamResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListTrashObjectsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *TrashObjectPage
|
|
JSON400 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListTrashObjectsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListTrashObjectsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ListTrashObjectsResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type PurgeTrashObjectResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON400 *Error
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r PurgeTrashObjectResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r PurgeTrashObjectResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r PurgeTrashObjectResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetTrashObjectResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *TrashObject
|
|
JSON400 *Error
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetTrashObjectResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetTrashObjectResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetTrashObjectResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type RestoreObjectResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *TrashObject
|
|
JSON400 *Error
|
|
JSON404 *Error
|
|
JSON409 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r RestoreObjectResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r RestoreObjectResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r RestoreObjectResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type DeleteMyAvatarResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r DeleteMyAvatarResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r DeleteMyAvatarResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r DeleteMyAvatarResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type SetMyAvatarResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Url string `json:"url"`
|
|
}
|
|
JSON400 *Error
|
|
JSON413 *Error
|
|
JSON415 *Error
|
|
JSON503 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r SetMyAvatarResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r SetMyAvatarResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r SetMyAvatarResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListUserEntitlementsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *EntitlementList
|
|
JSON400 *Error
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListUserEntitlementsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListUserEntitlementsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ListUserEntitlementsResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GrantUserEntitlementResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON201 *EntitlementResult
|
|
JSON400 *Error
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GrantUserEntitlementResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GrantUserEntitlementResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GrantUserEntitlementResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type RevokeUserEntitlementResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON400 *Error
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r RevokeUserEntitlementResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r RevokeUserEntitlementResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r RevokeUserEntitlementResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type UpdateUserEntitlementResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *EntitlementResult
|
|
JSON400 *Error
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r UpdateUserEntitlementResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r UpdateUserEntitlementResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r UpdateUserEntitlementResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetUserQuotaResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *AdminUserQuota
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetUserQuotaResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetUserQuotaResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetUserQuotaResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetUserProfileResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *PublicProfile
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r GetUserProfileResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r GetUserProfileResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r GetUserProfileResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListUserObjectsResponse struct {
|
|
Body []byte
|
|
HTTPResponse *http.Response
|
|
JSON200 *struct {
|
|
Breadcrumb []*interface{} `json:"breadcrumb"`
|
|
Items []*interface{} `json:"items"`
|
|
}
|
|
JSON404 *Error
|
|
}
|
|
|
|
// Status returns HTTPResponse.Status
|
|
func (r ListUserObjectsResponse) Status() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Status
|
|
}
|
|
return http.StatusText(0)
|
|
}
|
|
|
|
// StatusCode returns HTTPResponse.StatusCode
|
|
func (r ListUserObjectsResponse) StatusCode() int {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.StatusCode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
|
|
func (r ListUserObjectsResponse) ContentType() string {
|
|
if r.HTTPResponse != nil {
|
|
return r.HTTPResponse.Header.Get("Content-Type")
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// GetApiAuthAccountInfoWithResponse request returning *GetApiAuthAccountInfoResponse
|
|
func (c *ClientWithResponses) GetApiAuthAccountInfoWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthAccountInfoResponse, error) {
|
|
rsp, err := c.GetApiAuthAccountInfo(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetApiAuthAccountInfoResponse(rsp)
|
|
}
|
|
|
|
// BanUserWithBodyWithResponse request with arbitrary body returning *BanUserResponse
|
|
func (c *ClientWithResponses) BanUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*BanUserResponse, error) {
|
|
rsp, err := c.BanUserWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseBanUserResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) BanUserWithResponse(ctx context.Context, body BanUserJSONRequestBody, reqEditors ...RequestEditorFn) (*BanUserResponse, error) {
|
|
rsp, err := c.BanUser(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseBanUserResponse(rsp)
|
|
}
|
|
|
|
// CreateUserWithBodyWithResponse request with arbitrary body returning *CreateUserResponse
|
|
func (c *ClientWithResponses) CreateUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUserResponse, error) {
|
|
rsp, err := c.CreateUserWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateUserResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) CreateUserWithResponse(ctx context.Context, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUserResponse, error) {
|
|
rsp, err := c.CreateUser(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateUserResponse(rsp)
|
|
}
|
|
|
|
// GetUserWithResponse request returning *GetUserResponse
|
|
func (c *ClientWithResponses) GetUserWithResponse(ctx context.Context, params *GetUserParams, reqEditors ...RequestEditorFn) (*GetUserResponse, error) {
|
|
rsp, err := c.GetUser(ctx, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetUserResponse(rsp)
|
|
}
|
|
|
|
// PostApiAuthAdminHasPermissionWithBodyWithResponse request with arbitrary body returning *PostApiAuthAdminHasPermissionResponse
|
|
func (c *ClientWithResponses) PostApiAuthAdminHasPermissionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthAdminHasPermissionResponse, error) {
|
|
rsp, err := c.PostApiAuthAdminHasPermissionWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthAdminHasPermissionResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) PostApiAuthAdminHasPermissionWithResponse(ctx context.Context, body PostApiAuthAdminHasPermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthAdminHasPermissionResponse, error) {
|
|
rsp, err := c.PostApiAuthAdminHasPermission(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthAdminHasPermissionResponse(rsp)
|
|
}
|
|
|
|
// ImpersonateUserWithBodyWithResponse request with arbitrary body returning *ImpersonateUserResponse
|
|
func (c *ClientWithResponses) ImpersonateUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ImpersonateUserResponse, error) {
|
|
rsp, err := c.ImpersonateUserWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseImpersonateUserResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) ImpersonateUserWithResponse(ctx context.Context, body ImpersonateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*ImpersonateUserResponse, error) {
|
|
rsp, err := c.ImpersonateUser(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseImpersonateUserResponse(rsp)
|
|
}
|
|
|
|
// AdminListUserSessionsWithBodyWithResponse request with arbitrary body returning *AdminListUserSessionsResponse
|
|
func (c *ClientWithResponses) AdminListUserSessionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AdminListUserSessionsResponse, error) {
|
|
rsp, err := c.AdminListUserSessionsWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseAdminListUserSessionsResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) AdminListUserSessionsWithResponse(ctx context.Context, body AdminListUserSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*AdminListUserSessionsResponse, error) {
|
|
rsp, err := c.AdminListUserSessions(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseAdminListUserSessionsResponse(rsp)
|
|
}
|
|
|
|
// ListUsersWithResponse request returning *ListUsersResponse
|
|
func (c *ClientWithResponses) ListUsersWithResponse(ctx context.Context, params *ListUsersParams, reqEditors ...RequestEditorFn) (*ListUsersResponse, error) {
|
|
rsp, err := c.ListUsers(ctx, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListUsersResponse(rsp)
|
|
}
|
|
|
|
// RemoveUserWithBodyWithResponse request with arbitrary body returning *RemoveUserResponse
|
|
func (c *ClientWithResponses) RemoveUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RemoveUserResponse, error) {
|
|
rsp, err := c.RemoveUserWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseRemoveUserResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) RemoveUserWithResponse(ctx context.Context, body RemoveUserJSONRequestBody, reqEditors ...RequestEditorFn) (*RemoveUserResponse, error) {
|
|
rsp, err := c.RemoveUser(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseRemoveUserResponse(rsp)
|
|
}
|
|
|
|
// RevokeUserSessionWithBodyWithResponse request with arbitrary body returning *RevokeUserSessionResponse
|
|
func (c *ClientWithResponses) RevokeUserSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RevokeUserSessionResponse, error) {
|
|
rsp, err := c.RevokeUserSessionWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseRevokeUserSessionResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) RevokeUserSessionWithResponse(ctx context.Context, body RevokeUserSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*RevokeUserSessionResponse, error) {
|
|
rsp, err := c.RevokeUserSession(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseRevokeUserSessionResponse(rsp)
|
|
}
|
|
|
|
// RevokeUserSessionsWithBodyWithResponse request with arbitrary body returning *RevokeUserSessionsResponse
|
|
func (c *ClientWithResponses) RevokeUserSessionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RevokeUserSessionsResponse, error) {
|
|
rsp, err := c.RevokeUserSessionsWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseRevokeUserSessionsResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) RevokeUserSessionsWithResponse(ctx context.Context, body RevokeUserSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*RevokeUserSessionsResponse, error) {
|
|
rsp, err := c.RevokeUserSessions(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseRevokeUserSessionsResponse(rsp)
|
|
}
|
|
|
|
// SetUserRoleWithBodyWithResponse request with arbitrary body returning *SetUserRoleResponse
|
|
func (c *ClientWithResponses) SetUserRoleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetUserRoleResponse, error) {
|
|
rsp, err := c.SetUserRoleWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseSetUserRoleResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) SetUserRoleWithResponse(ctx context.Context, body SetUserRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*SetUserRoleResponse, error) {
|
|
rsp, err := c.SetUserRole(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseSetUserRoleResponse(rsp)
|
|
}
|
|
|
|
// SetUserPasswordWithBodyWithResponse request with arbitrary body returning *SetUserPasswordResponse
|
|
func (c *ClientWithResponses) SetUserPasswordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetUserPasswordResponse, error) {
|
|
rsp, err := c.SetUserPasswordWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseSetUserPasswordResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) SetUserPasswordWithResponse(ctx context.Context, body SetUserPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*SetUserPasswordResponse, error) {
|
|
rsp, err := c.SetUserPassword(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseSetUserPasswordResponse(rsp)
|
|
}
|
|
|
|
// PostApiAuthAdminStopImpersonatingWithResponse request returning *PostApiAuthAdminStopImpersonatingResponse
|
|
func (c *ClientWithResponses) PostApiAuthAdminStopImpersonatingWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostApiAuthAdminStopImpersonatingResponse, error) {
|
|
rsp, err := c.PostApiAuthAdminStopImpersonating(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthAdminStopImpersonatingResponse(rsp)
|
|
}
|
|
|
|
// UnbanUserWithBodyWithResponse request with arbitrary body returning *UnbanUserResponse
|
|
func (c *ClientWithResponses) UnbanUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UnbanUserResponse, error) {
|
|
rsp, err := c.UnbanUserWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUnbanUserResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) UnbanUserWithResponse(ctx context.Context, body UnbanUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UnbanUserResponse, error) {
|
|
rsp, err := c.UnbanUser(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUnbanUserResponse(rsp)
|
|
}
|
|
|
|
// AdminUpdateUserWithBodyWithResponse request with arbitrary body returning *AdminUpdateUserResponse
|
|
func (c *ClientWithResponses) AdminUpdateUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AdminUpdateUserResponse, error) {
|
|
rsp, err := c.AdminUpdateUserWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseAdminUpdateUserResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) AdminUpdateUserWithResponse(ctx context.Context, body AdminUpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*AdminUpdateUserResponse, error) {
|
|
rsp, err := c.AdminUpdateUser(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseAdminUpdateUserResponse(rsp)
|
|
}
|
|
|
|
// PostApiAuthApiKeyCreateWithBodyWithResponse request with arbitrary body returning *PostApiAuthApiKeyCreateResponse
|
|
func (c *ClientWithResponses) PostApiAuthApiKeyCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthApiKeyCreateResponse, error) {
|
|
rsp, err := c.PostApiAuthApiKeyCreateWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthApiKeyCreateResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) PostApiAuthApiKeyCreateWithResponse(ctx context.Context, body PostApiAuthApiKeyCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthApiKeyCreateResponse, error) {
|
|
rsp, err := c.PostApiAuthApiKeyCreate(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthApiKeyCreateResponse(rsp)
|
|
}
|
|
|
|
// PostApiAuthApiKeyDeleteWithBodyWithResponse request with arbitrary body returning *PostApiAuthApiKeyDeleteResponse
|
|
func (c *ClientWithResponses) PostApiAuthApiKeyDeleteWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthApiKeyDeleteResponse, error) {
|
|
rsp, err := c.PostApiAuthApiKeyDeleteWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthApiKeyDeleteResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) PostApiAuthApiKeyDeleteWithResponse(ctx context.Context, body PostApiAuthApiKeyDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthApiKeyDeleteResponse, error) {
|
|
rsp, err := c.PostApiAuthApiKeyDelete(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthApiKeyDeleteResponse(rsp)
|
|
}
|
|
|
|
// GetApiAuthApiKeyGetWithResponse request returning *GetApiAuthApiKeyGetResponse
|
|
func (c *ClientWithResponses) GetApiAuthApiKeyGetWithResponse(ctx context.Context, params *GetApiAuthApiKeyGetParams, reqEditors ...RequestEditorFn) (*GetApiAuthApiKeyGetResponse, error) {
|
|
rsp, err := c.GetApiAuthApiKeyGet(ctx, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetApiAuthApiKeyGetResponse(rsp)
|
|
}
|
|
|
|
// GetApiAuthApiKeyListWithResponse request returning *GetApiAuthApiKeyListResponse
|
|
func (c *ClientWithResponses) GetApiAuthApiKeyListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthApiKeyListResponse, error) {
|
|
rsp, err := c.GetApiAuthApiKeyList(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetApiAuthApiKeyListResponse(rsp)
|
|
}
|
|
|
|
// PostApiAuthApiKeyUpdateWithBodyWithResponse request with arbitrary body returning *PostApiAuthApiKeyUpdateResponse
|
|
func (c *ClientWithResponses) PostApiAuthApiKeyUpdateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthApiKeyUpdateResponse, error) {
|
|
rsp, err := c.PostApiAuthApiKeyUpdateWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthApiKeyUpdateResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) PostApiAuthApiKeyUpdateWithResponse(ctx context.Context, body PostApiAuthApiKeyUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthApiKeyUpdateResponse, error) {
|
|
rsp, err := c.PostApiAuthApiKeyUpdate(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthApiKeyUpdateResponse(rsp)
|
|
}
|
|
|
|
// GetApiAuthCallbackIdWithResponse request returning *GetApiAuthCallbackIdResponse
|
|
func (c *ClientWithResponses) GetApiAuthCallbackIdWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetApiAuthCallbackIdResponse, error) {
|
|
rsp, err := c.GetApiAuthCallbackId(ctx, id, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetApiAuthCallbackIdResponse(rsp)
|
|
}
|
|
|
|
// PostApiAuthCallbackIdWithBodyWithResponse request with arbitrary body returning *PostApiAuthCallbackIdResponse
|
|
func (c *ClientWithResponses) PostApiAuthCallbackIdWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthCallbackIdResponse, error) {
|
|
rsp, err := c.PostApiAuthCallbackIdWithBody(ctx, id, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthCallbackIdResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) PostApiAuthCallbackIdWithResponse(ctx context.Context, id string, body PostApiAuthCallbackIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthCallbackIdResponse, error) {
|
|
rsp, err := c.PostApiAuthCallbackId(ctx, id, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthCallbackIdResponse(rsp)
|
|
}
|
|
|
|
// ChangeEmailWithBodyWithResponse request with arbitrary body returning *ChangeEmailResponse
|
|
func (c *ClientWithResponses) ChangeEmailWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ChangeEmailResponse, error) {
|
|
rsp, err := c.ChangeEmailWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseChangeEmailResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) ChangeEmailWithResponse(ctx context.Context, body ChangeEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*ChangeEmailResponse, error) {
|
|
rsp, err := c.ChangeEmail(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseChangeEmailResponse(rsp)
|
|
}
|
|
|
|
// ChangePasswordWithBodyWithResponse request with arbitrary body returning *ChangePasswordResponse
|
|
func (c *ClientWithResponses) ChangePasswordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ChangePasswordResponse, error) {
|
|
rsp, err := c.ChangePasswordWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseChangePasswordResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) ChangePasswordWithResponse(ctx context.Context, body ChangePasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*ChangePasswordResponse, error) {
|
|
rsp, err := c.ChangePassword(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseChangePasswordResponse(rsp)
|
|
}
|
|
|
|
// DeleteUserWithBodyWithResponse request with arbitrary body returning *DeleteUserResponse
|
|
func (c *ClientWithResponses) DeleteUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error) {
|
|
rsp, err := c.DeleteUserWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseDeleteUserResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) DeleteUserWithResponse(ctx context.Context, body DeleteUserJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error) {
|
|
rsp, err := c.DeleteUser(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseDeleteUserResponse(rsp)
|
|
}
|
|
|
|
// GetApiAuthDeleteUserCallbackWithResponse request returning *GetApiAuthDeleteUserCallbackResponse
|
|
func (c *ClientWithResponses) GetApiAuthDeleteUserCallbackWithResponse(ctx context.Context, params *GetApiAuthDeleteUserCallbackParams, reqEditors ...RequestEditorFn) (*GetApiAuthDeleteUserCallbackResponse, error) {
|
|
rsp, err := c.GetApiAuthDeleteUserCallback(ctx, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetApiAuthDeleteUserCallbackResponse(rsp)
|
|
}
|
|
|
|
// GetApiAuthDeviceWithResponse request returning *GetApiAuthDeviceResponse
|
|
func (c *ClientWithResponses) GetApiAuthDeviceWithResponse(ctx context.Context, params *GetApiAuthDeviceParams, reqEditors ...RequestEditorFn) (*GetApiAuthDeviceResponse, error) {
|
|
rsp, err := c.GetApiAuthDevice(ctx, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetApiAuthDeviceResponse(rsp)
|
|
}
|
|
|
|
// PostApiAuthDeviceApproveWithBodyWithResponse request with arbitrary body returning *PostApiAuthDeviceApproveResponse
|
|
func (c *ClientWithResponses) PostApiAuthDeviceApproveWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceApproveResponse, error) {
|
|
rsp, err := c.PostApiAuthDeviceApproveWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthDeviceApproveResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) PostApiAuthDeviceApproveWithResponse(ctx context.Context, body PostApiAuthDeviceApproveJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceApproveResponse, error) {
|
|
rsp, err := c.PostApiAuthDeviceApprove(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthDeviceApproveResponse(rsp)
|
|
}
|
|
|
|
// PostApiAuthDeviceCodeWithBodyWithResponse request with arbitrary body returning *PostApiAuthDeviceCodeResponse
|
|
func (c *ClientWithResponses) PostApiAuthDeviceCodeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceCodeResponse, error) {
|
|
rsp, err := c.PostApiAuthDeviceCodeWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthDeviceCodeResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) PostApiAuthDeviceCodeWithResponse(ctx context.Context, body PostApiAuthDeviceCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceCodeResponse, error) {
|
|
rsp, err := c.PostApiAuthDeviceCode(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthDeviceCodeResponse(rsp)
|
|
}
|
|
|
|
// PostApiAuthDeviceDenyWithBodyWithResponse request with arbitrary body returning *PostApiAuthDeviceDenyResponse
|
|
func (c *ClientWithResponses) PostApiAuthDeviceDenyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceDenyResponse, error) {
|
|
rsp, err := c.PostApiAuthDeviceDenyWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthDeviceDenyResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) PostApiAuthDeviceDenyWithResponse(ctx context.Context, body PostApiAuthDeviceDenyJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceDenyResponse, error) {
|
|
rsp, err := c.PostApiAuthDeviceDeny(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthDeviceDenyResponse(rsp)
|
|
}
|
|
|
|
// PostApiAuthDeviceTokenWithBodyWithResponse request with arbitrary body returning *PostApiAuthDeviceTokenResponse
|
|
func (c *ClientWithResponses) PostApiAuthDeviceTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceTokenResponse, error) {
|
|
rsp, err := c.PostApiAuthDeviceTokenWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthDeviceTokenResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) PostApiAuthDeviceTokenWithResponse(ctx context.Context, body PostApiAuthDeviceTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthDeviceTokenResponse, error) {
|
|
rsp, err := c.PostApiAuthDeviceToken(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthDeviceTokenResponse(rsp)
|
|
}
|
|
|
|
// GetApiAuthErrorWithResponse request returning *GetApiAuthErrorResponse
|
|
func (c *ClientWithResponses) GetApiAuthErrorWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthErrorResponse, error) {
|
|
rsp, err := c.GetApiAuthError(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetApiAuthErrorResponse(rsp)
|
|
}
|
|
|
|
// PostApiAuthGetAccessTokenWithBodyWithResponse request with arbitrary body returning *PostApiAuthGetAccessTokenResponse
|
|
func (c *ClientWithResponses) PostApiAuthGetAccessTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthGetAccessTokenResponse, error) {
|
|
rsp, err := c.PostApiAuthGetAccessTokenWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthGetAccessTokenResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) PostApiAuthGetAccessTokenWithResponse(ctx context.Context, body PostApiAuthGetAccessTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthGetAccessTokenResponse, error) {
|
|
rsp, err := c.PostApiAuthGetAccessToken(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthGetAccessTokenResponse(rsp)
|
|
}
|
|
|
|
// GetSessionWithResponse request returning *GetSessionResponse
|
|
func (c *ClientWithResponses) GetSessionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetSessionResponse, error) {
|
|
rsp, err := c.GetSession(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetSessionResponse(rsp)
|
|
}
|
|
|
|
// GetSessionPostWithBodyWithResponse request with arbitrary body returning *GetSessionPostResponse
|
|
func (c *ClientWithResponses) GetSessionPostWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetSessionPostResponse, error) {
|
|
rsp, err := c.GetSessionPostWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetSessionPostResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) GetSessionPostWithResponse(ctx context.Context, body GetSessionPostJSONRequestBody, reqEditors ...RequestEditorFn) (*GetSessionPostResponse, error) {
|
|
rsp, err := c.GetSessionPost(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetSessionPostResponse(rsp)
|
|
}
|
|
|
|
// PostApiAuthIsUsernameAvailableWithBodyWithResponse request with arbitrary body returning *PostApiAuthIsUsernameAvailableResponse
|
|
func (c *ClientWithResponses) PostApiAuthIsUsernameAvailableWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthIsUsernameAvailableResponse, error) {
|
|
rsp, err := c.PostApiAuthIsUsernameAvailableWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthIsUsernameAvailableResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) PostApiAuthIsUsernameAvailableWithResponse(ctx context.Context, body PostApiAuthIsUsernameAvailableJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthIsUsernameAvailableResponse, error) {
|
|
rsp, err := c.PostApiAuthIsUsernameAvailable(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthIsUsernameAvailableResponse(rsp)
|
|
}
|
|
|
|
// LinkSocialAccountWithBodyWithResponse request with arbitrary body returning *LinkSocialAccountResponse
|
|
func (c *ClientWithResponses) LinkSocialAccountWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LinkSocialAccountResponse, error) {
|
|
rsp, err := c.LinkSocialAccountWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseLinkSocialAccountResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) LinkSocialAccountWithResponse(ctx context.Context, body LinkSocialAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*LinkSocialAccountResponse, error) {
|
|
rsp, err := c.LinkSocialAccount(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseLinkSocialAccountResponse(rsp)
|
|
}
|
|
|
|
// ListUserAccountsWithResponse request returning *ListUserAccountsResponse
|
|
func (c *ClientWithResponses) ListUserAccountsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListUserAccountsResponse, error) {
|
|
rsp, err := c.ListUserAccounts(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListUserAccountsResponse(rsp)
|
|
}
|
|
|
|
// ListUserSessionsWithResponse request returning *ListUserSessionsResponse
|
|
func (c *ClientWithResponses) ListUserSessionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListUserSessionsResponse, error) {
|
|
rsp, err := c.ListUserSessions(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListUserSessionsResponse(rsp)
|
|
}
|
|
|
|
// GetApiAuthOauth2CallbackProviderIdWithResponse request returning *GetApiAuthOauth2CallbackProviderIdResponse
|
|
func (c *ClientWithResponses) GetApiAuthOauth2CallbackProviderIdWithResponse(ctx context.Context, providerId string, params *GetApiAuthOauth2CallbackProviderIdParams, reqEditors ...RequestEditorFn) (*GetApiAuthOauth2CallbackProviderIdResponse, error) {
|
|
rsp, err := c.GetApiAuthOauth2CallbackProviderId(ctx, providerId, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetApiAuthOauth2CallbackProviderIdResponse(rsp)
|
|
}
|
|
|
|
// PostApiAuthOauth2LinkWithBodyWithResponse request with arbitrary body returning *PostApiAuthOauth2LinkResponse
|
|
func (c *ClientWithResponses) PostApiAuthOauth2LinkWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2LinkResponse, error) {
|
|
rsp, err := c.PostApiAuthOauth2LinkWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthOauth2LinkResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) PostApiAuthOauth2LinkWithResponse(ctx context.Context, body PostApiAuthOauth2LinkJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOauth2LinkResponse, error) {
|
|
rsp, err := c.PostApiAuthOauth2Link(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthOauth2LinkResponse(rsp)
|
|
}
|
|
|
|
// GetApiAuthOkWithResponse request returning *GetApiAuthOkResponse
|
|
func (c *ClientWithResponses) GetApiAuthOkWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOkResponse, error) {
|
|
rsp, err := c.GetApiAuthOk(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetApiAuthOkResponse(rsp)
|
|
}
|
|
|
|
// PostApiAuthOrganizationAcceptInvitationWithBodyWithResponse request with arbitrary body returning *PostApiAuthOrganizationAcceptInvitationResponse
|
|
func (c *ClientWithResponses) PostApiAuthOrganizationAcceptInvitationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationAcceptInvitationResponse, error) {
|
|
rsp, err := c.PostApiAuthOrganizationAcceptInvitationWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthOrganizationAcceptInvitationResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) PostApiAuthOrganizationAcceptInvitationWithResponse(ctx context.Context, body PostApiAuthOrganizationAcceptInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationAcceptInvitationResponse, error) {
|
|
rsp, err := c.PostApiAuthOrganizationAcceptInvitation(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthOrganizationAcceptInvitationResponse(rsp)
|
|
}
|
|
|
|
// PostApiAuthOrganizationCancelInvitationWithBodyWithResponse request with arbitrary body returning *PostApiAuthOrganizationCancelInvitationResponse
|
|
func (c *ClientWithResponses) PostApiAuthOrganizationCancelInvitationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationCancelInvitationResponse, error) {
|
|
rsp, err := c.PostApiAuthOrganizationCancelInvitationWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthOrganizationCancelInvitationResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) PostApiAuthOrganizationCancelInvitationWithResponse(ctx context.Context, body PostApiAuthOrganizationCancelInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationCancelInvitationResponse, error) {
|
|
rsp, err := c.PostApiAuthOrganizationCancelInvitation(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthOrganizationCancelInvitationResponse(rsp)
|
|
}
|
|
|
|
// PostApiAuthOrganizationCheckSlugWithBodyWithResponse request with arbitrary body returning *PostApiAuthOrganizationCheckSlugResponse
|
|
func (c *ClientWithResponses) PostApiAuthOrganizationCheckSlugWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationCheckSlugResponse, error) {
|
|
rsp, err := c.PostApiAuthOrganizationCheckSlugWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthOrganizationCheckSlugResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) PostApiAuthOrganizationCheckSlugWithResponse(ctx context.Context, body PostApiAuthOrganizationCheckSlugJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationCheckSlugResponse, error) {
|
|
rsp, err := c.PostApiAuthOrganizationCheckSlug(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthOrganizationCheckSlugResponse(rsp)
|
|
}
|
|
|
|
// PostApiAuthOrganizationCreateWithBodyWithResponse request with arbitrary body returning *PostApiAuthOrganizationCreateResponse
|
|
func (c *ClientWithResponses) PostApiAuthOrganizationCreateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationCreateResponse, error) {
|
|
rsp, err := c.PostApiAuthOrganizationCreateWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthOrganizationCreateResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) PostApiAuthOrganizationCreateWithResponse(ctx context.Context, body PostApiAuthOrganizationCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationCreateResponse, error) {
|
|
rsp, err := c.PostApiAuthOrganizationCreate(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthOrganizationCreateResponse(rsp)
|
|
}
|
|
|
|
// PostApiAuthOrganizationDeleteWithBodyWithResponse request with arbitrary body returning *PostApiAuthOrganizationDeleteResponse
|
|
func (c *ClientWithResponses) PostApiAuthOrganizationDeleteWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationDeleteResponse, error) {
|
|
rsp, err := c.PostApiAuthOrganizationDeleteWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthOrganizationDeleteResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) PostApiAuthOrganizationDeleteWithResponse(ctx context.Context, body PostApiAuthOrganizationDeleteJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationDeleteResponse, error) {
|
|
rsp, err := c.PostApiAuthOrganizationDelete(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthOrganizationDeleteResponse(rsp)
|
|
}
|
|
|
|
// GetApiAuthOrganizationGetActiveMemberWithResponse request returning *GetApiAuthOrganizationGetActiveMemberResponse
|
|
func (c *ClientWithResponses) GetApiAuthOrganizationGetActiveMemberWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOrganizationGetActiveMemberResponse, error) {
|
|
rsp, err := c.GetApiAuthOrganizationGetActiveMember(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetApiAuthOrganizationGetActiveMemberResponse(rsp)
|
|
}
|
|
|
|
// GetApiAuthOrganizationGetActiveMemberRoleWithResponse request returning *GetApiAuthOrganizationGetActiveMemberRoleResponse
|
|
func (c *ClientWithResponses) GetApiAuthOrganizationGetActiveMemberRoleWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOrganizationGetActiveMemberRoleResponse, error) {
|
|
rsp, err := c.GetApiAuthOrganizationGetActiveMemberRole(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetApiAuthOrganizationGetActiveMemberRoleResponse(rsp)
|
|
}
|
|
|
|
// GetOrganizationWithResponse request returning *GetOrganizationResponse
|
|
func (c *ClientWithResponses) GetOrganizationWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOrganizationResponse, error) {
|
|
rsp, err := c.GetOrganization(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetOrganizationResponse(rsp)
|
|
}
|
|
|
|
// GetApiAuthOrganizationGetInvitationWithResponse request returning *GetApiAuthOrganizationGetInvitationResponse
|
|
func (c *ClientWithResponses) GetApiAuthOrganizationGetInvitationWithResponse(ctx context.Context, params *GetApiAuthOrganizationGetInvitationParams, reqEditors ...RequestEditorFn) (*GetApiAuthOrganizationGetInvitationResponse, error) {
|
|
rsp, err := c.GetApiAuthOrganizationGetInvitation(ctx, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetApiAuthOrganizationGetInvitationResponse(rsp)
|
|
}
|
|
|
|
// PostApiAuthOrganizationHasPermissionWithBodyWithResponse request with arbitrary body returning *PostApiAuthOrganizationHasPermissionResponse
|
|
func (c *ClientWithResponses) PostApiAuthOrganizationHasPermissionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationHasPermissionResponse, error) {
|
|
rsp, err := c.PostApiAuthOrganizationHasPermissionWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthOrganizationHasPermissionResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) PostApiAuthOrganizationHasPermissionWithResponse(ctx context.Context, body PostApiAuthOrganizationHasPermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationHasPermissionResponse, error) {
|
|
rsp, err := c.PostApiAuthOrganizationHasPermission(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthOrganizationHasPermissionResponse(rsp)
|
|
}
|
|
|
|
// CreateOrganizationInvitationWithBodyWithResponse request with arbitrary body returning *CreateOrganizationInvitationResponse
|
|
func (c *ClientWithResponses) CreateOrganizationInvitationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateOrganizationInvitationResponse, error) {
|
|
rsp, err := c.CreateOrganizationInvitationWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateOrganizationInvitationResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) CreateOrganizationInvitationWithResponse(ctx context.Context, body CreateOrganizationInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateOrganizationInvitationResponse, error) {
|
|
rsp, err := c.CreateOrganizationInvitation(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateOrganizationInvitationResponse(rsp)
|
|
}
|
|
|
|
// PostApiAuthOrganizationLeaveWithBodyWithResponse request with arbitrary body returning *PostApiAuthOrganizationLeaveResponse
|
|
func (c *ClientWithResponses) PostApiAuthOrganizationLeaveWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationLeaveResponse, error) {
|
|
rsp, err := c.PostApiAuthOrganizationLeaveWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthOrganizationLeaveResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) PostApiAuthOrganizationLeaveWithResponse(ctx context.Context, body PostApiAuthOrganizationLeaveJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationLeaveResponse, error) {
|
|
rsp, err := c.PostApiAuthOrganizationLeave(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthOrganizationLeaveResponse(rsp)
|
|
}
|
|
|
|
// GetApiAuthOrganizationListWithResponse request returning *GetApiAuthOrganizationListResponse
|
|
func (c *ClientWithResponses) GetApiAuthOrganizationListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOrganizationListResponse, error) {
|
|
rsp, err := c.GetApiAuthOrganizationList(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetApiAuthOrganizationListResponse(rsp)
|
|
}
|
|
|
|
// GetApiAuthOrganizationListInvitationsWithResponse request returning *GetApiAuthOrganizationListInvitationsResponse
|
|
func (c *ClientWithResponses) GetApiAuthOrganizationListInvitationsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOrganizationListInvitationsResponse, error) {
|
|
rsp, err := c.GetApiAuthOrganizationListInvitations(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetApiAuthOrganizationListInvitationsResponse(rsp)
|
|
}
|
|
|
|
// GetApiAuthOrganizationListMembersWithResponse request returning *GetApiAuthOrganizationListMembersResponse
|
|
func (c *ClientWithResponses) GetApiAuthOrganizationListMembersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOrganizationListMembersResponse, error) {
|
|
rsp, err := c.GetApiAuthOrganizationListMembers(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetApiAuthOrganizationListMembersResponse(rsp)
|
|
}
|
|
|
|
// GetApiAuthOrganizationListUserInvitationsWithResponse request returning *GetApiAuthOrganizationListUserInvitationsResponse
|
|
func (c *ClientWithResponses) GetApiAuthOrganizationListUserInvitationsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAuthOrganizationListUserInvitationsResponse, error) {
|
|
rsp, err := c.GetApiAuthOrganizationListUserInvitations(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetApiAuthOrganizationListUserInvitationsResponse(rsp)
|
|
}
|
|
|
|
// PostApiAuthOrganizationRejectInvitationWithBodyWithResponse request with arbitrary body returning *PostApiAuthOrganizationRejectInvitationResponse
|
|
func (c *ClientWithResponses) PostApiAuthOrganizationRejectInvitationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationRejectInvitationResponse, error) {
|
|
rsp, err := c.PostApiAuthOrganizationRejectInvitationWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthOrganizationRejectInvitationResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) PostApiAuthOrganizationRejectInvitationWithResponse(ctx context.Context, body PostApiAuthOrganizationRejectInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationRejectInvitationResponse, error) {
|
|
rsp, err := c.PostApiAuthOrganizationRejectInvitation(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthOrganizationRejectInvitationResponse(rsp)
|
|
}
|
|
|
|
// PostApiAuthOrganizationRemoveMemberWithBodyWithResponse request with arbitrary body returning *PostApiAuthOrganizationRemoveMemberResponse
|
|
func (c *ClientWithResponses) PostApiAuthOrganizationRemoveMemberWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationRemoveMemberResponse, error) {
|
|
rsp, err := c.PostApiAuthOrganizationRemoveMemberWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthOrganizationRemoveMemberResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) PostApiAuthOrganizationRemoveMemberWithResponse(ctx context.Context, body PostApiAuthOrganizationRemoveMemberJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationRemoveMemberResponse, error) {
|
|
rsp, err := c.PostApiAuthOrganizationRemoveMember(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthOrganizationRemoveMemberResponse(rsp)
|
|
}
|
|
|
|
// SetActiveOrganizationWithBodyWithResponse request with arbitrary body returning *SetActiveOrganizationResponse
|
|
func (c *ClientWithResponses) SetActiveOrganizationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetActiveOrganizationResponse, error) {
|
|
rsp, err := c.SetActiveOrganizationWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseSetActiveOrganizationResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) SetActiveOrganizationWithResponse(ctx context.Context, body SetActiveOrganizationJSONRequestBody, reqEditors ...RequestEditorFn) (*SetActiveOrganizationResponse, error) {
|
|
rsp, err := c.SetActiveOrganization(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseSetActiveOrganizationResponse(rsp)
|
|
}
|
|
|
|
// PostApiAuthOrganizationUpdateWithBodyWithResponse request with arbitrary body returning *PostApiAuthOrganizationUpdateResponse
|
|
func (c *ClientWithResponses) PostApiAuthOrganizationUpdateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationUpdateResponse, error) {
|
|
rsp, err := c.PostApiAuthOrganizationUpdateWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthOrganizationUpdateResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) PostApiAuthOrganizationUpdateWithResponse(ctx context.Context, body PostApiAuthOrganizationUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthOrganizationUpdateResponse, error) {
|
|
rsp, err := c.PostApiAuthOrganizationUpdate(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthOrganizationUpdateResponse(rsp)
|
|
}
|
|
|
|
// UpdateOrganizationMemberRoleWithBodyWithResponse request with arbitrary body returning *UpdateOrganizationMemberRoleResponse
|
|
func (c *ClientWithResponses) UpdateOrganizationMemberRoleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateOrganizationMemberRoleResponse, error) {
|
|
rsp, err := c.UpdateOrganizationMemberRoleWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUpdateOrganizationMemberRoleResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) UpdateOrganizationMemberRoleWithResponse(ctx context.Context, body UpdateOrganizationMemberRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateOrganizationMemberRoleResponse, error) {
|
|
rsp, err := c.UpdateOrganizationMemberRole(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUpdateOrganizationMemberRoleResponse(rsp)
|
|
}
|
|
|
|
// PostApiAuthRefreshTokenWithBodyWithResponse request with arbitrary body returning *PostApiAuthRefreshTokenResponse
|
|
func (c *ClientWithResponses) PostApiAuthRefreshTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthRefreshTokenResponse, error) {
|
|
rsp, err := c.PostApiAuthRefreshTokenWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthRefreshTokenResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) PostApiAuthRefreshTokenWithResponse(ctx context.Context, body PostApiAuthRefreshTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthRefreshTokenResponse, error) {
|
|
rsp, err := c.PostApiAuthRefreshToken(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthRefreshTokenResponse(rsp)
|
|
}
|
|
|
|
// RequestPasswordResetWithBodyWithResponse request with arbitrary body returning *RequestPasswordResetResponse
|
|
func (c *ClientWithResponses) RequestPasswordResetWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RequestPasswordResetResponse, error) {
|
|
rsp, err := c.RequestPasswordResetWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseRequestPasswordResetResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) RequestPasswordResetWithResponse(ctx context.Context, body RequestPasswordResetJSONRequestBody, reqEditors ...RequestEditorFn) (*RequestPasswordResetResponse, error) {
|
|
rsp, err := c.RequestPasswordReset(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseRequestPasswordResetResponse(rsp)
|
|
}
|
|
|
|
// ResetPasswordWithBodyWithResponse request with arbitrary body returning *ResetPasswordResponse
|
|
func (c *ClientWithResponses) ResetPasswordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ResetPasswordResponse, error) {
|
|
rsp, err := c.ResetPasswordWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseResetPasswordResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) ResetPasswordWithResponse(ctx context.Context, body ResetPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*ResetPasswordResponse, error) {
|
|
rsp, err := c.ResetPassword(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseResetPasswordResponse(rsp)
|
|
}
|
|
|
|
// ResetPasswordCallbackWithResponse request returning *ResetPasswordCallbackResponse
|
|
func (c *ClientWithResponses) ResetPasswordCallbackWithResponse(ctx context.Context, token string, params *ResetPasswordCallbackParams, reqEditors ...RequestEditorFn) (*ResetPasswordCallbackResponse, error) {
|
|
rsp, err := c.ResetPasswordCallback(ctx, token, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseResetPasswordCallbackResponse(rsp)
|
|
}
|
|
|
|
// PostApiAuthRevokeOtherSessionsWithBodyWithResponse request with arbitrary body returning *PostApiAuthRevokeOtherSessionsResponse
|
|
func (c *ClientWithResponses) PostApiAuthRevokeOtherSessionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthRevokeOtherSessionsResponse, error) {
|
|
rsp, err := c.PostApiAuthRevokeOtherSessionsWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthRevokeOtherSessionsResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) PostApiAuthRevokeOtherSessionsWithResponse(ctx context.Context, body PostApiAuthRevokeOtherSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthRevokeOtherSessionsResponse, error) {
|
|
rsp, err := c.PostApiAuthRevokeOtherSessions(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthRevokeOtherSessionsResponse(rsp)
|
|
}
|
|
|
|
// PostApiAuthRevokeSessionWithBodyWithResponse request with arbitrary body returning *PostApiAuthRevokeSessionResponse
|
|
func (c *ClientWithResponses) PostApiAuthRevokeSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthRevokeSessionResponse, error) {
|
|
rsp, err := c.PostApiAuthRevokeSessionWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthRevokeSessionResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) PostApiAuthRevokeSessionWithResponse(ctx context.Context, body PostApiAuthRevokeSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthRevokeSessionResponse, error) {
|
|
rsp, err := c.PostApiAuthRevokeSession(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthRevokeSessionResponse(rsp)
|
|
}
|
|
|
|
// PostApiAuthRevokeSessionsWithBodyWithResponse request with arbitrary body returning *PostApiAuthRevokeSessionsResponse
|
|
func (c *ClientWithResponses) PostApiAuthRevokeSessionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthRevokeSessionsResponse, error) {
|
|
rsp, err := c.PostApiAuthRevokeSessionsWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthRevokeSessionsResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) PostApiAuthRevokeSessionsWithResponse(ctx context.Context, body PostApiAuthRevokeSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthRevokeSessionsResponse, error) {
|
|
rsp, err := c.PostApiAuthRevokeSessions(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthRevokeSessionsResponse(rsp)
|
|
}
|
|
|
|
// SendVerificationEmailWithBodyWithResponse request with arbitrary body returning *SendVerificationEmailResponse
|
|
func (c *ClientWithResponses) SendVerificationEmailWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendVerificationEmailResponse, error) {
|
|
rsp, err := c.SendVerificationEmailWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseSendVerificationEmailResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) SendVerificationEmailWithResponse(ctx context.Context, body SendVerificationEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*SendVerificationEmailResponse, error) {
|
|
rsp, err := c.SendVerificationEmail(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseSendVerificationEmailResponse(rsp)
|
|
}
|
|
|
|
// SignInEmailWithBodyWithResponse request with arbitrary body returning *SignInEmailResponse
|
|
func (c *ClientWithResponses) SignInEmailWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SignInEmailResponse, error) {
|
|
rsp, err := c.SignInEmailWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseSignInEmailResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) SignInEmailWithResponse(ctx context.Context, body SignInEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*SignInEmailResponse, error) {
|
|
rsp, err := c.SignInEmail(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseSignInEmailResponse(rsp)
|
|
}
|
|
|
|
// PostApiAuthSignInOauth2WithBodyWithResponse request with arbitrary body returning *PostApiAuthSignInOauth2Response
|
|
func (c *ClientWithResponses) PostApiAuthSignInOauth2WithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthSignInOauth2Response, error) {
|
|
rsp, err := c.PostApiAuthSignInOauth2WithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthSignInOauth2Response(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) PostApiAuthSignInOauth2WithResponse(ctx context.Context, body PostApiAuthSignInOauth2JSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthSignInOauth2Response, error) {
|
|
rsp, err := c.PostApiAuthSignInOauth2(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthSignInOauth2Response(rsp)
|
|
}
|
|
|
|
// SocialSignInWithBodyWithResponse request with arbitrary body returning *SocialSignInResponse
|
|
func (c *ClientWithResponses) SocialSignInWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SocialSignInResponse, error) {
|
|
rsp, err := c.SocialSignInWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseSocialSignInResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) SocialSignInWithResponse(ctx context.Context, body SocialSignInJSONRequestBody, reqEditors ...RequestEditorFn) (*SocialSignInResponse, error) {
|
|
rsp, err := c.SocialSignIn(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseSocialSignInResponse(rsp)
|
|
}
|
|
|
|
// PostApiAuthSignInUsernameWithBodyWithResponse request with arbitrary body returning *PostApiAuthSignInUsernameResponse
|
|
func (c *ClientWithResponses) PostApiAuthSignInUsernameWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthSignInUsernameResponse, error) {
|
|
rsp, err := c.PostApiAuthSignInUsernameWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthSignInUsernameResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) PostApiAuthSignInUsernameWithResponse(ctx context.Context, body PostApiAuthSignInUsernameJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthSignInUsernameResponse, error) {
|
|
rsp, err := c.PostApiAuthSignInUsername(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthSignInUsernameResponse(rsp)
|
|
}
|
|
|
|
// SignOutWithBodyWithResponse request with arbitrary body returning *SignOutResponse
|
|
func (c *ClientWithResponses) SignOutWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SignOutResponse, error) {
|
|
rsp, err := c.SignOutWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseSignOutResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) SignOutWithResponse(ctx context.Context, body SignOutJSONRequestBody, reqEditors ...RequestEditorFn) (*SignOutResponse, error) {
|
|
rsp, err := c.SignOut(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseSignOutResponse(rsp)
|
|
}
|
|
|
|
// SignUpWithEmailAndPasswordWithBodyWithResponse request with arbitrary body returning *SignUpWithEmailAndPasswordResponse
|
|
func (c *ClientWithResponses) SignUpWithEmailAndPasswordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SignUpWithEmailAndPasswordResponse, error) {
|
|
rsp, err := c.SignUpWithEmailAndPasswordWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseSignUpWithEmailAndPasswordResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) SignUpWithEmailAndPasswordWithResponse(ctx context.Context, body SignUpWithEmailAndPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*SignUpWithEmailAndPasswordResponse, error) {
|
|
rsp, err := c.SignUpWithEmailAndPassword(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseSignUpWithEmailAndPasswordResponse(rsp)
|
|
}
|
|
|
|
// PostApiAuthUnlinkAccountWithBodyWithResponse request with arbitrary body returning *PostApiAuthUnlinkAccountResponse
|
|
func (c *ClientWithResponses) PostApiAuthUnlinkAccountWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiAuthUnlinkAccountResponse, error) {
|
|
rsp, err := c.PostApiAuthUnlinkAccountWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthUnlinkAccountResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) PostApiAuthUnlinkAccountWithResponse(ctx context.Context, body PostApiAuthUnlinkAccountJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiAuthUnlinkAccountResponse, error) {
|
|
rsp, err := c.PostApiAuthUnlinkAccount(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePostApiAuthUnlinkAccountResponse(rsp)
|
|
}
|
|
|
|
// UpdateSessionWithBodyWithResponse request with arbitrary body returning *UpdateSessionResponse
|
|
func (c *ClientWithResponses) UpdateSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSessionResponse, error) {
|
|
rsp, err := c.UpdateSessionWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUpdateSessionResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) UpdateSessionWithResponse(ctx context.Context, body UpdateSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSessionResponse, error) {
|
|
rsp, err := c.UpdateSession(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUpdateSessionResponse(rsp)
|
|
}
|
|
|
|
// UpdateUserWithBodyWithResponse request with arbitrary body returning *UpdateUserResponse
|
|
func (c *ClientWithResponses) UpdateUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateUserResponse, error) {
|
|
rsp, err := c.UpdateUserWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUpdateUserResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) UpdateUserWithResponse(ctx context.Context, body UpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateUserResponse, error) {
|
|
rsp, err := c.UpdateUser(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUpdateUserResponse(rsp)
|
|
}
|
|
|
|
// GetApiAuthVerifyEmailWithResponse request returning *GetApiAuthVerifyEmailResponse
|
|
func (c *ClientWithResponses) GetApiAuthVerifyEmailWithResponse(ctx context.Context, params *GetApiAuthVerifyEmailParams, reqEditors ...RequestEditorFn) (*GetApiAuthVerifyEmailResponse, error) {
|
|
rsp, err := c.GetApiAuthVerifyEmail(ctx, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetApiAuthVerifyEmailResponse(rsp)
|
|
}
|
|
|
|
// VerifyPasswordWithBodyWithResponse request with arbitrary body returning *VerifyPasswordResponse
|
|
func (c *ClientWithResponses) VerifyPasswordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*VerifyPasswordResponse, error) {
|
|
rsp, err := c.VerifyPasswordWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseVerifyPasswordResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) VerifyPasswordWithResponse(ctx context.Context, body VerifyPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*VerifyPasswordResponse, error) {
|
|
rsp, err := c.VerifyPassword(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseVerifyPasswordResponse(rsp)
|
|
}
|
|
|
|
// ListBackgroundJobsWithResponse request returning *ListBackgroundJobsResponse
|
|
func (c *ClientWithResponses) ListBackgroundJobsWithResponse(ctx context.Context, params *ListBackgroundJobsParams, reqEditors ...RequestEditorFn) (*ListBackgroundJobsResponse, error) {
|
|
rsp, err := c.ListBackgroundJobs(ctx, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListBackgroundJobsResponse(rsp)
|
|
}
|
|
|
|
// CreateBackgroundJobWithBodyWithResponse request with arbitrary body returning *CreateBackgroundJobResponse
|
|
func (c *ClientWithResponses) CreateBackgroundJobWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateBackgroundJobResponse, error) {
|
|
rsp, err := c.CreateBackgroundJobWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateBackgroundJobResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) CreateBackgroundJobWithResponse(ctx context.Context, body CreateBackgroundJobJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateBackgroundJobResponse, error) {
|
|
rsp, err := c.CreateBackgroundJob(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateBackgroundJobResponse(rsp)
|
|
}
|
|
|
|
// GetBackgroundJobWithResponse request returning *GetBackgroundJobResponse
|
|
func (c *ClientWithResponses) GetBackgroundJobWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetBackgroundJobResponse, error) {
|
|
rsp, err := c.GetBackgroundJob(ctx, id, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetBackgroundJobResponse(rsp)
|
|
}
|
|
|
|
// RetryBackgroundJobWithResponse request returning *RetryBackgroundJobResponse
|
|
func (c *ClientWithResponses) RetryBackgroundJobWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*RetryBackgroundJobResponse, error) {
|
|
rsp, err := c.RetryBackgroundJob(ctx, id, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseRetryBackgroundJobResponse(rsp)
|
|
}
|
|
|
|
// CancelBackgroundJobWithBodyWithResponse request with arbitrary body returning *CancelBackgroundJobResponse
|
|
func (c *ClientWithResponses) CancelBackgroundJobWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CancelBackgroundJobResponse, error) {
|
|
rsp, err := c.CancelBackgroundJobWithBody(ctx, id, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCancelBackgroundJobResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) CancelBackgroundJobWithResponse(ctx context.Context, id string, body CancelBackgroundJobJSONRequestBody, reqEditors ...RequestEditorFn) (*CancelBackgroundJobResponse, error) {
|
|
rsp, err := c.CancelBackgroundJob(ctx, id, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCancelBackgroundJobResponse(rsp)
|
|
}
|
|
|
|
// ListDownloadersWithResponse request returning *ListDownloadersResponse
|
|
func (c *ClientWithResponses) ListDownloadersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListDownloadersResponse, error) {
|
|
rsp, err := c.ListDownloaders(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListDownloadersResponse(rsp)
|
|
}
|
|
|
|
// CreateDownloaderWithBodyWithResponse request with arbitrary body returning *CreateDownloaderResponse
|
|
func (c *ClientWithResponses) CreateDownloaderWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDownloaderResponse, error) {
|
|
rsp, err := c.CreateDownloaderWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateDownloaderResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) CreateDownloaderWithResponse(ctx context.Context, body CreateDownloaderJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDownloaderResponse, error) {
|
|
rsp, err := c.CreateDownloader(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateDownloaderResponse(rsp)
|
|
}
|
|
|
|
// RecordDownloaderHeartbeatWithBodyWithResponse request with arbitrary body returning *RecordDownloaderHeartbeatResponse
|
|
func (c *ClientWithResponses) RecordDownloaderHeartbeatWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RecordDownloaderHeartbeatResponse, error) {
|
|
rsp, err := c.RecordDownloaderHeartbeatWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseRecordDownloaderHeartbeatResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) RecordDownloaderHeartbeatWithResponse(ctx context.Context, body RecordDownloaderHeartbeatJSONRequestBody, reqEditors ...RequestEditorFn) (*RecordDownloaderHeartbeatResponse, error) {
|
|
rsp, err := c.RecordDownloaderHeartbeat(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseRecordDownloaderHeartbeatResponse(rsp)
|
|
}
|
|
|
|
// DeleteDownloaderWithResponse request returning *DeleteDownloaderResponse
|
|
func (c *ClientWithResponses) DeleteDownloaderWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteDownloaderResponse, error) {
|
|
rsp, err := c.DeleteDownloader(ctx, id, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseDeleteDownloaderResponse(rsp)
|
|
}
|
|
|
|
// UpdateDownloaderWithBodyWithResponse request with arbitrary body returning *UpdateDownloaderResponse
|
|
func (c *ClientWithResponses) UpdateDownloaderWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDownloaderResponse, error) {
|
|
rsp, err := c.UpdateDownloaderWithBody(ctx, id, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUpdateDownloaderResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) UpdateDownloaderWithResponse(ctx context.Context, id string, body UpdateDownloaderJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDownloaderResponse, error) {
|
|
rsp, err := c.UpdateDownloader(ctx, id, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUpdateDownloaderResponse(rsp)
|
|
}
|
|
|
|
// ListDownloadTasksWithResponse request returning *ListDownloadTasksResponse
|
|
func (c *ClientWithResponses) ListDownloadTasksWithResponse(ctx context.Context, params *ListDownloadTasksParams, reqEditors ...RequestEditorFn) (*ListDownloadTasksResponse, error) {
|
|
rsp, err := c.ListDownloadTasks(ctx, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListDownloadTasksResponse(rsp)
|
|
}
|
|
|
|
// CreateDownloadTaskWithBodyWithResponse request with arbitrary body returning *CreateDownloadTaskResponse
|
|
func (c *ClientWithResponses) CreateDownloadTaskWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDownloadTaskResponse, error) {
|
|
rsp, err := c.CreateDownloadTaskWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateDownloadTaskResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) CreateDownloadTaskWithResponse(ctx context.Context, body CreateDownloadTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDownloadTaskResponse, error) {
|
|
rsp, err := c.CreateDownloadTask(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateDownloadTaskResponse(rsp)
|
|
}
|
|
|
|
// DeleteDownloadTaskWithResponse request returning *DeleteDownloadTaskResponse
|
|
func (c *ClientWithResponses) DeleteDownloadTaskWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteDownloadTaskResponse, error) {
|
|
rsp, err := c.DeleteDownloadTask(ctx, id, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseDeleteDownloadTaskResponse(rsp)
|
|
}
|
|
|
|
// GetDownloadTaskWithResponse request returning *GetDownloadTaskResponse
|
|
func (c *ClientWithResponses) GetDownloadTaskWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetDownloadTaskResponse, error) {
|
|
rsp, err := c.GetDownloadTask(ctx, id, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetDownloadTaskResponse(rsp)
|
|
}
|
|
|
|
// UpdateDownloadTaskWithBodyWithResponse request with arbitrary body returning *UpdateDownloadTaskResponse
|
|
func (c *ClientWithResponses) UpdateDownloadTaskWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDownloadTaskResponse, error) {
|
|
rsp, err := c.UpdateDownloadTaskWithBody(ctx, id, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUpdateDownloadTaskResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) UpdateDownloadTaskWithResponse(ctx context.Context, id string, body UpdateDownloadTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDownloadTaskResponse, error) {
|
|
rsp, err := c.UpdateDownloadTask(ctx, id, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUpdateDownloadTaskResponse(rsp)
|
|
}
|
|
|
|
// RetryDownloadTaskWithBodyWithResponse request with arbitrary body returning *RetryDownloadTaskResponse
|
|
func (c *ClientWithResponses) RetryDownloadTaskWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RetryDownloadTaskResponse, error) {
|
|
rsp, err := c.RetryDownloadTaskWithBody(ctx, id, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseRetryDownloadTaskResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) RetryDownloadTaskWithResponse(ctx context.Context, id string, body RetryDownloadTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*RetryDownloadTaskResponse, error) {
|
|
rsp, err := c.RetryDownloadTask(ctx, id, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseRetryDownloadTaskResponse(rsp)
|
|
}
|
|
|
|
// SetDownloadTaskStatusWithBodyWithResponse request with arbitrary body returning *SetDownloadTaskStatusResponse
|
|
func (c *ClientWithResponses) SetDownloadTaskStatusWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetDownloadTaskStatusResponse, error) {
|
|
rsp, err := c.SetDownloadTaskStatusWithBody(ctx, id, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseSetDownloadTaskStatusResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) SetDownloadTaskStatusWithResponse(ctx context.Context, id string, body SetDownloadTaskStatusJSONRequestBody, reqEditors ...RequestEditorFn) (*SetDownloadTaskStatusResponse, error) {
|
|
rsp, err := c.SetDownloadTaskStatus(ctx, id, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseSetDownloadTaskStatusResponse(rsp)
|
|
}
|
|
|
|
// StreamEventsWithResponse request returning *StreamEventsResponse
|
|
func (c *ClientWithResponses) StreamEventsWithResponse(ctx context.Context, params *StreamEventsParams, reqEditors ...RequestEditorFn) (*StreamEventsResponse, error) {
|
|
rsp, err := c.StreamEvents(ctx, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseStreamEventsResponse(rsp)
|
|
}
|
|
|
|
// DeleteImageHostingConfigWithResponse request returning *DeleteImageHostingConfigResponse
|
|
func (c *ClientWithResponses) DeleteImageHostingConfigWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*DeleteImageHostingConfigResponse, error) {
|
|
rsp, err := c.DeleteImageHostingConfig(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseDeleteImageHostingConfigResponse(rsp)
|
|
}
|
|
|
|
// GetImageHostingConfigWithResponse request returning *GetImageHostingConfigResponse
|
|
func (c *ClientWithResponses) GetImageHostingConfigWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetImageHostingConfigResponse, error) {
|
|
rsp, err := c.GetImageHostingConfig(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetImageHostingConfigResponse(rsp)
|
|
}
|
|
|
|
// UpdateImageHostingConfigWithBodyWithResponse request with arbitrary body returning *UpdateImageHostingConfigResponse
|
|
func (c *ClientWithResponses) UpdateImageHostingConfigWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateImageHostingConfigResponse, error) {
|
|
rsp, err := c.UpdateImageHostingConfigWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUpdateImageHostingConfigResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) UpdateImageHostingConfigWithResponse(ctx context.Context, body UpdateImageHostingConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateImageHostingConfigResponse, error) {
|
|
rsp, err := c.UpdateImageHostingConfig(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUpdateImageHostingConfigResponse(rsp)
|
|
}
|
|
|
|
// ListImageHostingsWithResponse request returning *ListImageHostingsResponse
|
|
func (c *ClientWithResponses) ListImageHostingsWithResponse(ctx context.Context, params *ListImageHostingsParams, reqEditors ...RequestEditorFn) (*ListImageHostingsResponse, error) {
|
|
rsp, err := c.ListImageHostings(ctx, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListImageHostingsResponse(rsp)
|
|
}
|
|
|
|
// PresignImageHostingUploadWithBodyWithResponse request with arbitrary body returning *PresignImageHostingUploadResponse
|
|
func (c *ClientWithResponses) PresignImageHostingUploadWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PresignImageHostingUploadResponse, error) {
|
|
rsp, err := c.PresignImageHostingUploadWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePresignImageHostingUploadResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) PresignImageHostingUploadWithResponse(ctx context.Context, body PresignImageHostingUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*PresignImageHostingUploadResponse, error) {
|
|
rsp, err := c.PresignImageHostingUpload(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePresignImageHostingUploadResponse(rsp)
|
|
}
|
|
|
|
// DeleteImageHostingWithResponse request returning *DeleteImageHostingResponse
|
|
func (c *ClientWithResponses) DeleteImageHostingWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteImageHostingResponse, error) {
|
|
rsp, err := c.DeleteImageHosting(ctx, id, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseDeleteImageHostingResponse(rsp)
|
|
}
|
|
|
|
// GetImageHostingWithResponse request returning *GetImageHostingResponse
|
|
func (c *ClientWithResponses) GetImageHostingWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetImageHostingResponse, error) {
|
|
rsp, err := c.GetImageHosting(ctx, id, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetImageHostingResponse(rsp)
|
|
}
|
|
|
|
// ConfirmImageHostingWithResponse request returning *ConfirmImageHostingResponse
|
|
func (c *ClientWithResponses) ConfirmImageHostingWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ConfirmImageHostingResponse, error) {
|
|
rsp, err := c.ConfirmImageHosting(ctx, id, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseConfirmImageHostingResponse(rsp)
|
|
}
|
|
|
|
// ListNotificationsWithResponse request returning *ListNotificationsResponse
|
|
func (c *ClientWithResponses) ListNotificationsWithResponse(ctx context.Context, params *ListNotificationsParams, reqEditors ...RequestEditorFn) (*ListNotificationsResponse, error) {
|
|
rsp, err := c.ListNotifications(ctx, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListNotificationsResponse(rsp)
|
|
}
|
|
|
|
// MarkAllNotificationsReadWithResponse request returning *MarkAllNotificationsReadResponse
|
|
func (c *ClientWithResponses) MarkAllNotificationsReadWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*MarkAllNotificationsReadResponse, error) {
|
|
rsp, err := c.MarkAllNotificationsRead(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseMarkAllNotificationsReadResponse(rsp)
|
|
}
|
|
|
|
// GetNotificationStatsWithResponse request returning *GetNotificationStatsResponse
|
|
func (c *ClientWithResponses) GetNotificationStatsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetNotificationStatsResponse, error) {
|
|
rsp, err := c.GetNotificationStats(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetNotificationStatsResponse(rsp)
|
|
}
|
|
|
|
// MarkNotificationReadWithResponse request returning *MarkNotificationReadResponse
|
|
func (c *ClientWithResponses) MarkNotificationReadWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*MarkNotificationReadResponse, error) {
|
|
rsp, err := c.MarkNotificationRead(ctx, id, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseMarkNotificationReadResponse(rsp)
|
|
}
|
|
|
|
// ListObjectsWithResponse request returning *ListObjectsResponse
|
|
func (c *ClientWithResponses) ListObjectsWithResponse(ctx context.Context, params *ListObjectsParams, reqEditors ...RequestEditorFn) (*ListObjectsResponse, error) {
|
|
rsp, err := c.ListObjects(ctx, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListObjectsResponse(rsp)
|
|
}
|
|
|
|
// CreateObjectWithBodyWithResponse request with arbitrary body returning *CreateObjectResponse
|
|
func (c *ClientWithResponses) CreateObjectWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateObjectResponse, error) {
|
|
rsp, err := c.CreateObjectWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateObjectResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) CreateObjectWithResponse(ctx context.Context, body CreateObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateObjectResponse, error) {
|
|
rsp, err := c.CreateObject(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateObjectResponse(rsp)
|
|
}
|
|
|
|
// DeleteObjectWithResponse request returning *DeleteObjectResponse
|
|
func (c *ClientWithResponses) DeleteObjectWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteObjectResponse, error) {
|
|
rsp, err := c.DeleteObject(ctx, id, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseDeleteObjectResponse(rsp)
|
|
}
|
|
|
|
// GetObjectWithResponse request returning *GetObjectResponse
|
|
func (c *ClientWithResponses) GetObjectWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetObjectResponse, error) {
|
|
rsp, err := c.GetObject(ctx, id, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetObjectResponse(rsp)
|
|
}
|
|
|
|
// UpdateObjectWithBodyWithResponse request with arbitrary body returning *UpdateObjectResponse
|
|
func (c *ClientWithResponses) UpdateObjectWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateObjectResponse, error) {
|
|
rsp, err := c.UpdateObjectWithBody(ctx, id, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUpdateObjectResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) UpdateObjectWithResponse(ctx context.Context, id string, body UpdateObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateObjectResponse, error) {
|
|
rsp, err := c.UpdateObject(ctx, id, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUpdateObjectResponse(rsp)
|
|
}
|
|
|
|
// CopyObjectWithBodyWithResponse request with arbitrary body returning *CopyObjectResponse
|
|
func (c *ClientWithResponses) CopyObjectWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CopyObjectResponse, error) {
|
|
rsp, err := c.CopyObjectWithBody(ctx, id, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCopyObjectResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) CopyObjectWithResponse(ctx context.Context, id string, body CopyObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*CopyObjectResponse, error) {
|
|
rsp, err := c.CopyObject(ctx, id, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCopyObjectResponse(rsp)
|
|
}
|
|
|
|
// TransferObjectWithBodyWithResponse request with arbitrary body returning *TransferObjectResponse
|
|
func (c *ClientWithResponses) TransferObjectWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TransferObjectResponse, error) {
|
|
rsp, err := c.TransferObjectWithBody(ctx, id, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseTransferObjectResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) TransferObjectWithResponse(ctx context.Context, id string, body TransferObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*TransferObjectResponse, error) {
|
|
rsp, err := c.TransferObject(ctx, id, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseTransferObjectResponse(rsp)
|
|
}
|
|
|
|
// AbortObjectUploadWithResponse request returning *AbortObjectUploadResponse
|
|
func (c *ClientWithResponses) AbortObjectUploadWithResponse(ctx context.Context, id string, uploadSessionId string, reqEditors ...RequestEditorFn) (*AbortObjectUploadResponse, error) {
|
|
rsp, err := c.AbortObjectUpload(ctx, id, uploadSessionId, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseAbortObjectUploadResponse(rsp)
|
|
}
|
|
|
|
// CompleteObjectUploadWithBodyWithResponse request with arbitrary body returning *CompleteObjectUploadResponse
|
|
func (c *ClientWithResponses) CompleteObjectUploadWithBodyWithResponse(ctx context.Context, id string, uploadSessionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CompleteObjectUploadResponse, error) {
|
|
rsp, err := c.CompleteObjectUploadWithBody(ctx, id, uploadSessionId, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCompleteObjectUploadResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) CompleteObjectUploadWithResponse(ctx context.Context, id string, uploadSessionId string, body CompleteObjectUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*CompleteObjectUploadResponse, error) {
|
|
rsp, err := c.CompleteObjectUpload(ctx, id, uploadSessionId, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCompleteObjectUploadResponse(rsp)
|
|
}
|
|
|
|
// PresignObjectUploadPartsWithBodyWithResponse request with arbitrary body returning *PresignObjectUploadPartsResponse
|
|
func (c *ClientWithResponses) PresignObjectUploadPartsWithBodyWithResponse(ctx context.Context, id string, uploadSessionId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PresignObjectUploadPartsResponse, error) {
|
|
rsp, err := c.PresignObjectUploadPartsWithBody(ctx, id, uploadSessionId, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePresignObjectUploadPartsResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) PresignObjectUploadPartsWithResponse(ctx context.Context, id string, uploadSessionId string, body PresignObjectUploadPartsJSONRequestBody, reqEditors ...RequestEditorFn) (*PresignObjectUploadPartsResponse, error) {
|
|
rsp, err := c.PresignObjectUploadParts(ctx, id, uploadSessionId, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePresignObjectUploadPartsResponse(rsp)
|
|
}
|
|
|
|
// ListQuotaOverviewWithResponse request returning *ListQuotaOverviewResponse
|
|
func (c *ClientWithResponses) ListQuotaOverviewWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListQuotaOverviewResponse, error) {
|
|
rsp, err := c.ListQuotaOverview(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListQuotaOverviewResponse(rsp)
|
|
}
|
|
|
|
// GetMyQuotaWithResponse request returning *GetMyQuotaResponse
|
|
func (c *ClientWithResponses) GetMyQuotaWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetMyQuotaResponse, error) {
|
|
rsp, err := c.GetMyQuota(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetMyQuotaResponse(rsp)
|
|
}
|
|
|
|
// ListSharesWithResponse request returning *ListSharesResponse
|
|
func (c *ClientWithResponses) ListSharesWithResponse(ctx context.Context, params *ListSharesParams, reqEditors ...RequestEditorFn) (*ListSharesResponse, error) {
|
|
rsp, err := c.ListShares(ctx, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListSharesResponse(rsp)
|
|
}
|
|
|
|
// CreateShareWithBodyWithResponse request with arbitrary body returning *CreateShareResponse
|
|
func (c *ClientWithResponses) CreateShareWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateShareResponse, error) {
|
|
rsp, err := c.CreateShareWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateShareResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) CreateShareWithResponse(ctx context.Context, body CreateShareJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateShareResponse, error) {
|
|
rsp, err := c.CreateShare(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateShareResponse(rsp)
|
|
}
|
|
|
|
// GetShareWithResponse request returning *GetShareResponse
|
|
func (c *ClientWithResponses) GetShareWithResponse(ctx context.Context, token string, reqEditors ...RequestEditorFn) (*GetShareResponse, error) {
|
|
rsp, err := c.GetShare(ctx, token, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetShareResponse(rsp)
|
|
}
|
|
|
|
// ListShareObjectsWithResponse request returning *ListShareObjectsResponse
|
|
func (c *ClientWithResponses) ListShareObjectsWithResponse(ctx context.Context, token string, params *ListShareObjectsParams, reqEditors ...RequestEditorFn) (*ListShareObjectsResponse, error) {
|
|
rsp, err := c.ListShareObjects(ctx, token, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListShareObjectsResponse(rsp)
|
|
}
|
|
|
|
// SaveShareWithBodyWithResponse request with arbitrary body returning *SaveShareResponse
|
|
func (c *ClientWithResponses) SaveShareWithBodyWithResponse(ctx context.Context, token string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SaveShareResponse, error) {
|
|
rsp, err := c.SaveShareWithBody(ctx, token, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseSaveShareResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) SaveShareWithResponse(ctx context.Context, token string, body SaveShareJSONRequestBody, reqEditors ...RequestEditorFn) (*SaveShareResponse, error) {
|
|
rsp, err := c.SaveShare(ctx, token, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseSaveShareResponse(rsp)
|
|
}
|
|
|
|
// VerifySharePasswordWithBodyWithResponse request with arbitrary body returning *VerifySharePasswordResponse
|
|
func (c *ClientWithResponses) VerifySharePasswordWithBodyWithResponse(ctx context.Context, token string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*VerifySharePasswordResponse, error) {
|
|
rsp, err := c.VerifySharePasswordWithBody(ctx, token, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseVerifySharePasswordResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) VerifySharePasswordWithResponse(ctx context.Context, token string, body VerifySharePasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*VerifySharePasswordResponse, error) {
|
|
rsp, err := c.VerifySharePassword(ctx, token, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseVerifySharePasswordResponse(rsp)
|
|
}
|
|
|
|
// RevokeShareWithBodyWithResponse request with arbitrary body returning *RevokeShareResponse
|
|
func (c *ClientWithResponses) RevokeShareWithBodyWithResponse(ctx context.Context, token string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RevokeShareResponse, error) {
|
|
rsp, err := c.RevokeShareWithBody(ctx, token, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseRevokeShareResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) RevokeShareWithResponse(ctx context.Context, token string, body RevokeShareJSONRequestBody, reqEditors ...RequestEditorFn) (*RevokeShareResponse, error) {
|
|
rsp, err := c.RevokeShare(ctx, token, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseRevokeShareResponse(rsp)
|
|
}
|
|
|
|
// ListAnnouncementsWithResponse request returning *ListAnnouncementsResponse
|
|
func (c *ClientWithResponses) ListAnnouncementsWithResponse(ctx context.Context, params *ListAnnouncementsParams, reqEditors ...RequestEditorFn) (*ListAnnouncementsResponse, error) {
|
|
rsp, err := c.ListAnnouncements(ctx, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListAnnouncementsResponse(rsp)
|
|
}
|
|
|
|
// CreateAnnouncementWithBodyWithResponse request with arbitrary body returning *CreateAnnouncementResponse
|
|
func (c *ClientWithResponses) CreateAnnouncementWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAnnouncementResponse, error) {
|
|
rsp, err := c.CreateAnnouncementWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateAnnouncementResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) CreateAnnouncementWithResponse(ctx context.Context, body CreateAnnouncementJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAnnouncementResponse, error) {
|
|
rsp, err := c.CreateAnnouncement(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateAnnouncementResponse(rsp)
|
|
}
|
|
|
|
// DeleteAnnouncementWithResponse request returning *DeleteAnnouncementResponse
|
|
func (c *ClientWithResponses) DeleteAnnouncementWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteAnnouncementResponse, error) {
|
|
rsp, err := c.DeleteAnnouncement(ctx, id, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseDeleteAnnouncementResponse(rsp)
|
|
}
|
|
|
|
// GetAnnouncementWithResponse request returning *GetAnnouncementResponse
|
|
func (c *ClientWithResponses) GetAnnouncementWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetAnnouncementResponse, error) {
|
|
rsp, err := c.GetAnnouncement(ctx, id, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetAnnouncementResponse(rsp)
|
|
}
|
|
|
|
// UpdateAnnouncementWithBodyWithResponse request with arbitrary body returning *UpdateAnnouncementResponse
|
|
func (c *ClientWithResponses) UpdateAnnouncementWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAnnouncementResponse, error) {
|
|
rsp, err := c.UpdateAnnouncementWithBody(ctx, id, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUpdateAnnouncementResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) UpdateAnnouncementWithResponse(ctx context.Context, id string, body UpdateAnnouncementJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAnnouncementResponse, error) {
|
|
rsp, err := c.UpdateAnnouncement(ctx, id, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUpdateAnnouncementResponse(rsp)
|
|
}
|
|
|
|
// ListAuditEventsWithResponse request returning *ListAuditEventsResponse
|
|
func (c *ClientWithResponses) ListAuditEventsWithResponse(ctx context.Context, params *ListAuditEventsParams, reqEditors ...RequestEditorFn) (*ListAuditEventsResponse, error) {
|
|
rsp, err := c.ListAuditEvents(ctx, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListAuditEventsResponse(rsp)
|
|
}
|
|
|
|
// ListAuthProvidersWithResponse request returning *ListAuthProvidersResponse
|
|
func (c *ClientWithResponses) ListAuthProvidersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListAuthProvidersResponse, error) {
|
|
rsp, err := c.ListAuthProviders(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListAuthProvidersResponse(rsp)
|
|
}
|
|
|
|
// DeleteAuthProviderWithResponse request returning *DeleteAuthProviderResponse
|
|
func (c *ClientWithResponses) DeleteAuthProviderWithResponse(ctx context.Context, providerId string, reqEditors ...RequestEditorFn) (*DeleteAuthProviderResponse, error) {
|
|
rsp, err := c.DeleteAuthProvider(ctx, providerId, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseDeleteAuthProviderResponse(rsp)
|
|
}
|
|
|
|
// UpsertAuthProviderWithBodyWithResponse request with arbitrary body returning *UpsertAuthProviderResponse
|
|
func (c *ClientWithResponses) UpsertAuthProviderWithBodyWithResponse(ctx context.Context, providerId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpsertAuthProviderResponse, error) {
|
|
rsp, err := c.UpsertAuthProviderWithBody(ctx, providerId, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUpsertAuthProviderResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) UpsertAuthProviderWithResponse(ctx context.Context, providerId string, body UpsertAuthProviderJSONRequestBody, reqEditors ...RequestEditorFn) (*UpsertAuthProviderResponse, error) {
|
|
rsp, err := c.UpsertAuthProvider(ctx, providerId, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUpsertAuthProviderResponse(rsp)
|
|
}
|
|
|
|
// GetBrandingWithResponse request returning *GetBrandingResponse
|
|
func (c *ClientWithResponses) GetBrandingWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetBrandingResponse, error) {
|
|
rsp, err := c.GetBranding(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetBrandingResponse(rsp)
|
|
}
|
|
|
|
// UpdateBrandingWithResponse request returning *UpdateBrandingResponse
|
|
func (c *ClientWithResponses) UpdateBrandingWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UpdateBrandingResponse, error) {
|
|
rsp, err := c.UpdateBranding(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUpdateBrandingResponse(rsp)
|
|
}
|
|
|
|
// ResetBrandingFieldWithResponse request returning *ResetBrandingFieldResponse
|
|
func (c *ClientWithResponses) ResetBrandingFieldWithResponse(ctx context.Context, field string, reqEditors ...RequestEditorFn) (*ResetBrandingFieldResponse, error) {
|
|
rsp, err := c.ResetBrandingField(ctx, field, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseResetBrandingFieldResponse(rsp)
|
|
}
|
|
|
|
// GetChangelogWithResponse request returning *GetChangelogResponse
|
|
func (c *ClientWithResponses) GetChangelogWithResponse(ctx context.Context, params *GetChangelogParams, reqEditors ...RequestEditorFn) (*GetChangelogResponse, error) {
|
|
rsp, err := c.GetChangelog(ctx, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetChangelogResponse(rsp)
|
|
}
|
|
|
|
// GetEmailConfigWithResponse request returning *GetEmailConfigResponse
|
|
func (c *ClientWithResponses) GetEmailConfigWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetEmailConfigResponse, error) {
|
|
rsp, err := c.GetEmailConfig(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetEmailConfigResponse(rsp)
|
|
}
|
|
|
|
// SaveEmailConfigWithBodyWithResponse request with arbitrary body returning *SaveEmailConfigResponse
|
|
func (c *ClientWithResponses) SaveEmailConfigWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SaveEmailConfigResponse, error) {
|
|
rsp, err := c.SaveEmailConfigWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseSaveEmailConfigResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) SaveEmailConfigWithResponse(ctx context.Context, body SaveEmailConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*SaveEmailConfigResponse, error) {
|
|
rsp, err := c.SaveEmailConfig(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseSaveEmailConfigResponse(rsp)
|
|
}
|
|
|
|
// SendTestEmailWithBodyWithResponse request with arbitrary body returning *SendTestEmailResponse
|
|
func (c *ClientWithResponses) SendTestEmailWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendTestEmailResponse, error) {
|
|
rsp, err := c.SendTestEmailWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseSendTestEmailResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) SendTestEmailWithResponse(ctx context.Context, body SendTestEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*SendTestEmailResponse, error) {
|
|
rsp, err := c.SendTestEmail(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseSendTestEmailResponse(rsp)
|
|
}
|
|
|
|
// GetInstanceInfoWithResponse request returning *GetInstanceInfoResponse
|
|
func (c *ClientWithResponses) GetInstanceInfoWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetInstanceInfoResponse, error) {
|
|
rsp, err := c.GetInstanceInfo(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetInstanceInfoResponse(rsp)
|
|
}
|
|
|
|
// ListSiteInvitationsWithResponse request returning *ListSiteInvitationsResponse
|
|
func (c *ClientWithResponses) ListSiteInvitationsWithResponse(ctx context.Context, params *ListSiteInvitationsParams, reqEditors ...RequestEditorFn) (*ListSiteInvitationsResponse, error) {
|
|
rsp, err := c.ListSiteInvitations(ctx, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListSiteInvitationsResponse(rsp)
|
|
}
|
|
|
|
// CreateSiteInvitationWithBodyWithResponse request with arbitrary body returning *CreateSiteInvitationResponse
|
|
func (c *ClientWithResponses) CreateSiteInvitationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSiteInvitationResponse, error) {
|
|
rsp, err := c.CreateSiteInvitationWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateSiteInvitationResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) CreateSiteInvitationWithResponse(ctx context.Context, body CreateSiteInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSiteInvitationResponse, error) {
|
|
rsp, err := c.CreateSiteInvitation(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateSiteInvitationResponse(rsp)
|
|
}
|
|
|
|
// RevokeSiteInvitationWithResponse request returning *RevokeSiteInvitationResponse
|
|
func (c *ClientWithResponses) RevokeSiteInvitationWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*RevokeSiteInvitationResponse, error) {
|
|
rsp, err := c.RevokeSiteInvitation(ctx, id, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseRevokeSiteInvitationResponse(rsp)
|
|
}
|
|
|
|
// ResendSiteInvitationWithResponse request returning *ResendSiteInvitationResponse
|
|
func (c *ClientWithResponses) ResendSiteInvitationWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ResendSiteInvitationResponse, error) {
|
|
rsp, err := c.ResendSiteInvitation(ctx, id, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseResendSiteInvitationResponse(rsp)
|
|
}
|
|
|
|
// GetSiteInvitationWithResponse request returning *GetSiteInvitationResponse
|
|
func (c *ClientWithResponses) GetSiteInvitationWithResponse(ctx context.Context, token string, reqEditors ...RequestEditorFn) (*GetSiteInvitationResponse, error) {
|
|
rsp, err := c.GetSiteInvitation(ctx, token, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetSiteInvitationResponse(rsp)
|
|
}
|
|
|
|
// ListInviteCodesWithResponse request returning *ListInviteCodesResponse
|
|
func (c *ClientWithResponses) ListInviteCodesWithResponse(ctx context.Context, params *ListInviteCodesParams, reqEditors ...RequestEditorFn) (*ListInviteCodesResponse, error) {
|
|
rsp, err := c.ListInviteCodes(ctx, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListInviteCodesResponse(rsp)
|
|
}
|
|
|
|
// GenerateInviteCodesWithBodyWithResponse request with arbitrary body returning *GenerateInviteCodesResponse
|
|
func (c *ClientWithResponses) GenerateInviteCodesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GenerateInviteCodesResponse, error) {
|
|
rsp, err := c.GenerateInviteCodesWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGenerateInviteCodesResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) GenerateInviteCodesWithResponse(ctx context.Context, body GenerateInviteCodesJSONRequestBody, reqEditors ...RequestEditorFn) (*GenerateInviteCodesResponse, error) {
|
|
rsp, err := c.GenerateInviteCodes(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGenerateInviteCodesResponse(rsp)
|
|
}
|
|
|
|
// ValidateInviteCodeWithBodyWithResponse request with arbitrary body returning *ValidateInviteCodeResponse
|
|
func (c *ClientWithResponses) ValidateInviteCodeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ValidateInviteCodeResponse, error) {
|
|
rsp, err := c.ValidateInviteCodeWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseValidateInviteCodeResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) ValidateInviteCodeWithResponse(ctx context.Context, body ValidateInviteCodeJSONRequestBody, reqEditors ...RequestEditorFn) (*ValidateInviteCodeResponse, error) {
|
|
rsp, err := c.ValidateInviteCode(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseValidateInviteCodeResponse(rsp)
|
|
}
|
|
|
|
// DeleteInviteCodeWithResponse request returning *DeleteInviteCodeResponse
|
|
func (c *ClientWithResponses) DeleteInviteCodeWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteInviteCodeResponse, error) {
|
|
rsp, err := c.DeleteInviteCode(ctx, id, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseDeleteInviteCodeResponse(rsp)
|
|
}
|
|
|
|
// UnbindLicenseWithResponse request returning *UnbindLicenseResponse
|
|
func (c *ClientWithResponses) UnbindLicenseWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UnbindLicenseResponse, error) {
|
|
rsp, err := c.UnbindLicense(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUnbindLicenseResponse(rsp)
|
|
}
|
|
|
|
// InitiateLicensePairingWithResponse request returning *InitiateLicensePairingResponse
|
|
func (c *ClientWithResponses) InitiateLicensePairingWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*InitiateLicensePairingResponse, error) {
|
|
rsp, err := c.InitiateLicensePairing(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseInitiateLicensePairingResponse(rsp)
|
|
}
|
|
|
|
// PollLicensePairingWithResponse request returning *PollLicensePairingResponse
|
|
func (c *ClientWithResponses) PollLicensePairingWithResponse(ctx context.Context, code string, reqEditors ...RequestEditorFn) (*PollLicensePairingResponse, error) {
|
|
rsp, err := c.PollLicensePairing(ctx, code, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePollLicensePairingResponse(rsp)
|
|
}
|
|
|
|
// RefreshLicenseWithResponse request returning *RefreshLicenseResponse
|
|
func (c *ClientWithResponses) RefreshLicenseWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*RefreshLicenseResponse, error) {
|
|
rsp, err := c.RefreshLicense(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseRefreshLicenseResponse(rsp)
|
|
}
|
|
|
|
// GetLicensingStatusWithResponse request returning *GetLicensingStatusResponse
|
|
func (c *ClientWithResponses) GetLicensingStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetLicensingStatusResponse, error) {
|
|
rsp, err := c.GetLicensingStatus(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetLicensingStatusResponse(rsp)
|
|
}
|
|
|
|
// ListSystemOptionsWithResponse request returning *ListSystemOptionsResponse
|
|
func (c *ClientWithResponses) ListSystemOptionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListSystemOptionsResponse, error) {
|
|
rsp, err := c.ListSystemOptions(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListSystemOptionsResponse(rsp)
|
|
}
|
|
|
|
// DeleteSystemOptionWithResponse request returning *DeleteSystemOptionResponse
|
|
func (c *ClientWithResponses) DeleteSystemOptionWithResponse(ctx context.Context, key string, reqEditors ...RequestEditorFn) (*DeleteSystemOptionResponse, error) {
|
|
rsp, err := c.DeleteSystemOption(ctx, key, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseDeleteSystemOptionResponse(rsp)
|
|
}
|
|
|
|
// GetSystemOptionWithResponse request returning *GetSystemOptionResponse
|
|
func (c *ClientWithResponses) GetSystemOptionWithResponse(ctx context.Context, key string, reqEditors ...RequestEditorFn) (*GetSystemOptionResponse, error) {
|
|
rsp, err := c.GetSystemOption(ctx, key, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetSystemOptionResponse(rsp)
|
|
}
|
|
|
|
// SetSystemOptionWithBodyWithResponse request with arbitrary body returning *SetSystemOptionResponse
|
|
func (c *ClientWithResponses) SetSystemOptionWithBodyWithResponse(ctx context.Context, key string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetSystemOptionResponse, error) {
|
|
rsp, err := c.SetSystemOptionWithBody(ctx, key, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseSetSystemOptionResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) SetSystemOptionWithResponse(ctx context.Context, key string, body SetSystemOptionJSONRequestBody, reqEditors ...RequestEditorFn) (*SetSystemOptionResponse, error) {
|
|
rsp, err := c.SetSystemOption(ctx, key, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseSetSystemOptionResponse(rsp)
|
|
}
|
|
|
|
// ListStoragesWithResponse request returning *ListStoragesResponse
|
|
func (c *ClientWithResponses) ListStoragesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListStoragesResponse, error) {
|
|
rsp, err := c.ListStorages(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListStoragesResponse(rsp)
|
|
}
|
|
|
|
// CreateStorageWithBodyWithResponse request with arbitrary body returning *CreateStorageResponse
|
|
func (c *ClientWithResponses) CreateStorageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateStorageResponse, error) {
|
|
rsp, err := c.CreateStorageWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateStorageResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) CreateStorageWithResponse(ctx context.Context, body CreateStorageJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateStorageResponse, error) {
|
|
rsp, err := c.CreateStorage(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateStorageResponse(rsp)
|
|
}
|
|
|
|
// DeleteStorageWithResponse request returning *DeleteStorageResponse
|
|
func (c *ClientWithResponses) DeleteStorageWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteStorageResponse, error) {
|
|
rsp, err := c.DeleteStorage(ctx, id, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseDeleteStorageResponse(rsp)
|
|
}
|
|
|
|
// GetStorageWithResponse request returning *GetStorageResponse
|
|
func (c *ClientWithResponses) GetStorageWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetStorageResponse, error) {
|
|
rsp, err := c.GetStorage(ctx, id, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetStorageResponse(rsp)
|
|
}
|
|
|
|
// UpdateStorageWithBodyWithResponse request with arbitrary body returning *UpdateStorageResponse
|
|
func (c *ClientWithResponses) UpdateStorageWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateStorageResponse, error) {
|
|
rsp, err := c.UpdateStorageWithBody(ctx, id, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUpdateStorageResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) UpdateStorageWithResponse(ctx context.Context, id string, body UpdateStorageJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateStorageResponse, error) {
|
|
rsp, err := c.UpdateStorage(ctx, id, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUpdateStorageResponse(rsp)
|
|
}
|
|
|
|
// CreateBillingPortalSessionWithResponse request returning *CreateBillingPortalSessionResponse
|
|
func (c *ClientWithResponses) CreateBillingPortalSessionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CreateBillingPortalSessionResponse, error) {
|
|
rsp, err := c.CreateBillingPortalSession(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateBillingPortalSessionResponse(rsp)
|
|
}
|
|
|
|
// CreateCheckoutWithBodyWithResponse request with arbitrary body returning *CreateCheckoutResponse
|
|
func (c *ClientWithResponses) CreateCheckoutWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCheckoutResponse, error) {
|
|
rsp, err := c.CreateCheckoutWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateCheckoutResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) CreateCheckoutWithResponse(ctx context.Context, body CreateCheckoutJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCheckoutResponse, error) {
|
|
rsp, err := c.CreateCheckout(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateCheckoutResponse(rsp)
|
|
}
|
|
|
|
// GetCreditBalanceWithResponse request returning *GetCreditBalanceResponse
|
|
func (c *ClientWithResponses) GetCreditBalanceWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCreditBalanceResponse, error) {
|
|
rsp, err := c.GetCreditBalance(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetCreditBalanceResponse(rsp)
|
|
}
|
|
|
|
// GetCreditLedgerWithResponse request returning *GetCreditLedgerResponse
|
|
func (c *ClientWithResponses) GetCreditLedgerWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCreditLedgerResponse, error) {
|
|
rsp, err := c.GetCreditLedger(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetCreditLedgerResponse(rsp)
|
|
}
|
|
|
|
// ListCreditProductsWithResponse request returning *ListCreditProductsResponse
|
|
func (c *ClientWithResponses) ListCreditProductsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListCreditProductsResponse, error) {
|
|
rsp, err := c.ListCreditProducts(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListCreditProductsResponse(rsp)
|
|
}
|
|
|
|
// RedeemGiftCardWithBodyWithResponse request with arbitrary body returning *RedeemGiftCardResponse
|
|
func (c *ClientWithResponses) RedeemGiftCardWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RedeemGiftCardResponse, error) {
|
|
rsp, err := c.RedeemGiftCardWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseRedeemGiftCardResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) RedeemGiftCardWithResponse(ctx context.Context, body RedeemGiftCardJSONRequestBody, reqEditors ...RequestEditorFn) (*RedeemGiftCardResponse, error) {
|
|
rsp, err := c.RedeemGiftCard(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseRedeemGiftCardResponse(rsp)
|
|
}
|
|
|
|
// GetDiscountQuoteWithBodyWithResponse request with arbitrary body returning *GetDiscountQuoteResponse
|
|
func (c *ClientWithResponses) GetDiscountQuoteWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetDiscountQuoteResponse, error) {
|
|
rsp, err := c.GetDiscountQuoteWithBody(ctx, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetDiscountQuoteResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) GetDiscountQuoteWithResponse(ctx context.Context, body GetDiscountQuoteJSONRequestBody, reqEditors ...RequestEditorFn) (*GetDiscountQuoteResponse, error) {
|
|
rsp, err := c.GetDiscountQuote(ctx, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetDiscountQuoteResponse(rsp)
|
|
}
|
|
|
|
// ListOrdersWithResponse request returning *ListOrdersResponse
|
|
func (c *ClientWithResponses) ListOrdersWithResponse(ctx context.Context, params *ListOrdersParams, reqEditors ...RequestEditorFn) (*ListOrdersResponse, error) {
|
|
rsp, err := c.ListOrders(ctx, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListOrdersResponse(rsp)
|
|
}
|
|
|
|
// ContinueOrderPaymentWithResponse request returning *ContinueOrderPaymentResponse
|
|
func (c *ClientWithResponses) ContinueOrderPaymentWithResponse(ctx context.Context, orderId string, reqEditors ...RequestEditorFn) (*ContinueOrderPaymentResponse, error) {
|
|
rsp, err := c.ContinueOrderPayment(ctx, orderId, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseContinueOrderPaymentResponse(rsp)
|
|
}
|
|
|
|
// CancelOrderWithBodyWithResponse request with arbitrary body returning *CancelOrderResponse
|
|
func (c *ClientWithResponses) CancelOrderWithBodyWithResponse(ctx context.Context, orderId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CancelOrderResponse, error) {
|
|
rsp, err := c.CancelOrderWithBody(ctx, orderId, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCancelOrderResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) CancelOrderWithResponse(ctx context.Context, orderId string, body CancelOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*CancelOrderResponse, error) {
|
|
rsp, err := c.CancelOrder(ctx, orderId, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCancelOrderResponse(rsp)
|
|
}
|
|
|
|
// ListStorePackagesWithResponse request returning *ListStorePackagesResponse
|
|
func (c *ClientWithResponses) ListStorePackagesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListStorePackagesResponse, error) {
|
|
rsp, err := c.ListStorePackages(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListStorePackagesResponse(rsp)
|
|
}
|
|
|
|
// ListStoreTargetsWithResponse request returning *ListStoreTargetsResponse
|
|
func (c *ClientWithResponses) ListStoreTargetsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListStoreTargetsResponse, error) {
|
|
rsp, err := c.ListStoreTargets(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListStoreTargetsResponse(rsp)
|
|
}
|
|
|
|
// ListTeamsWithResponse request returning *ListTeamsResponse
|
|
func (c *ClientWithResponses) ListTeamsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListTeamsResponse, error) {
|
|
rsp, err := c.ListTeams(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListTeamsResponse(rsp)
|
|
}
|
|
|
|
// GetTeamInviteLinkWithResponse request returning *GetTeamInviteLinkResponse
|
|
func (c *ClientWithResponses) GetTeamInviteLinkWithResponse(ctx context.Context, token string, reqEditors ...RequestEditorFn) (*GetTeamInviteLinkResponse, error) {
|
|
rsp, err := c.GetTeamInviteLink(ctx, token, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetTeamInviteLinkResponse(rsp)
|
|
}
|
|
|
|
// GetTeamWithResponse request returning *GetTeamResponse
|
|
func (c *ClientWithResponses) GetTeamWithResponse(ctx context.Context, teamId string, reqEditors ...RequestEditorFn) (*GetTeamResponse, error) {
|
|
rsp, err := c.GetTeam(ctx, teamId, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetTeamResponse(rsp)
|
|
}
|
|
|
|
// ListTeamActivityWithResponse request returning *ListTeamActivityResponse
|
|
func (c *ClientWithResponses) ListTeamActivityWithResponse(ctx context.Context, teamId string, params *ListTeamActivityParams, reqEditors ...RequestEditorFn) (*ListTeamActivityResponse, error) {
|
|
rsp, err := c.ListTeamActivity(ctx, teamId, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListTeamActivityResponse(rsp)
|
|
}
|
|
|
|
// ListTeamEntitlementsWithResponse request returning *ListTeamEntitlementsResponse
|
|
func (c *ClientWithResponses) ListTeamEntitlementsWithResponse(ctx context.Context, teamId string, reqEditors ...RequestEditorFn) (*ListTeamEntitlementsResponse, error) {
|
|
rsp, err := c.ListTeamEntitlements(ctx, teamId, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListTeamEntitlementsResponse(rsp)
|
|
}
|
|
|
|
// GrantTeamEntitlementWithBodyWithResponse request with arbitrary body returning *GrantTeamEntitlementResponse
|
|
func (c *ClientWithResponses) GrantTeamEntitlementWithBodyWithResponse(ctx context.Context, teamId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GrantTeamEntitlementResponse, error) {
|
|
rsp, err := c.GrantTeamEntitlementWithBody(ctx, teamId, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGrantTeamEntitlementResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) GrantTeamEntitlementWithResponse(ctx context.Context, teamId string, body GrantTeamEntitlementJSONRequestBody, reqEditors ...RequestEditorFn) (*GrantTeamEntitlementResponse, error) {
|
|
rsp, err := c.GrantTeamEntitlement(ctx, teamId, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGrantTeamEntitlementResponse(rsp)
|
|
}
|
|
|
|
// RevokeTeamEntitlementWithResponse request returning *RevokeTeamEntitlementResponse
|
|
func (c *ClientWithResponses) RevokeTeamEntitlementWithResponse(ctx context.Context, teamId string, eid string, reqEditors ...RequestEditorFn) (*RevokeTeamEntitlementResponse, error) {
|
|
rsp, err := c.RevokeTeamEntitlement(ctx, teamId, eid, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseRevokeTeamEntitlementResponse(rsp)
|
|
}
|
|
|
|
// UpdateTeamEntitlementWithBodyWithResponse request with arbitrary body returning *UpdateTeamEntitlementResponse
|
|
func (c *ClientWithResponses) UpdateTeamEntitlementWithBodyWithResponse(ctx context.Context, teamId string, eid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTeamEntitlementResponse, error) {
|
|
rsp, err := c.UpdateTeamEntitlementWithBody(ctx, teamId, eid, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUpdateTeamEntitlementResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) UpdateTeamEntitlementWithResponse(ctx context.Context, teamId string, eid string, body UpdateTeamEntitlementJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTeamEntitlementResponse, error) {
|
|
rsp, err := c.UpdateTeamEntitlement(ctx, teamId, eid, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUpdateTeamEntitlementResponse(rsp)
|
|
}
|
|
|
|
// ListTeamInvitationsWithResponse request returning *ListTeamInvitationsResponse
|
|
func (c *ClientWithResponses) ListTeamInvitationsWithResponse(ctx context.Context, teamId string, reqEditors ...RequestEditorFn) (*ListTeamInvitationsResponse, error) {
|
|
rsp, err := c.ListTeamInvitations(ctx, teamId, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListTeamInvitationsResponse(rsp)
|
|
}
|
|
|
|
// CreateTeamInviteLinkWithBodyWithResponse request with arbitrary body returning *CreateTeamInviteLinkResponse
|
|
func (c *ClientWithResponses) CreateTeamInviteLinkWithBodyWithResponse(ctx context.Context, teamId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamInviteLinkResponse, error) {
|
|
rsp, err := c.CreateTeamInviteLinkWithBody(ctx, teamId, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateTeamInviteLinkResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) CreateTeamInviteLinkWithResponse(ctx context.Context, teamId string, body CreateTeamInviteLinkJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamInviteLinkResponse, error) {
|
|
rsp, err := c.CreateTeamInviteLink(ctx, teamId, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseCreateTeamInviteLinkResponse(rsp)
|
|
}
|
|
|
|
// DeleteTeamLogoWithResponse request returning *DeleteTeamLogoResponse
|
|
func (c *ClientWithResponses) DeleteTeamLogoWithResponse(ctx context.Context, teamId string, reqEditors ...RequestEditorFn) (*DeleteTeamLogoResponse, error) {
|
|
rsp, err := c.DeleteTeamLogo(ctx, teamId, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseDeleteTeamLogoResponse(rsp)
|
|
}
|
|
|
|
// SetTeamLogoWithResponse request returning *SetTeamLogoResponse
|
|
func (c *ClientWithResponses) SetTeamLogoWithResponse(ctx context.Context, teamId string, reqEditors ...RequestEditorFn) (*SetTeamLogoResponse, error) {
|
|
rsp, err := c.SetTeamLogo(ctx, teamId, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseSetTeamLogoResponse(rsp)
|
|
}
|
|
|
|
// JoinTeamWithBodyWithResponse request with arbitrary body returning *JoinTeamResponse
|
|
func (c *ClientWithResponses) JoinTeamWithBodyWithResponse(ctx context.Context, teamId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*JoinTeamResponse, error) {
|
|
rsp, err := c.JoinTeamWithBody(ctx, teamId, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseJoinTeamResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) JoinTeamWithResponse(ctx context.Context, teamId string, body JoinTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*JoinTeamResponse, error) {
|
|
rsp, err := c.JoinTeam(ctx, teamId, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseJoinTeamResponse(rsp)
|
|
}
|
|
|
|
// ListTrashObjectsWithResponse request returning *ListTrashObjectsResponse
|
|
func (c *ClientWithResponses) ListTrashObjectsWithResponse(ctx context.Context, params *ListTrashObjectsParams, reqEditors ...RequestEditorFn) (*ListTrashObjectsResponse, error) {
|
|
rsp, err := c.ListTrashObjects(ctx, params, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListTrashObjectsResponse(rsp)
|
|
}
|
|
|
|
// PurgeTrashObjectWithResponse request returning *PurgeTrashObjectResponse
|
|
func (c *ClientWithResponses) PurgeTrashObjectWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*PurgeTrashObjectResponse, error) {
|
|
rsp, err := c.PurgeTrashObject(ctx, id, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParsePurgeTrashObjectResponse(rsp)
|
|
}
|
|
|
|
// GetTrashObjectWithResponse request returning *GetTrashObjectResponse
|
|
func (c *ClientWithResponses) GetTrashObjectWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetTrashObjectResponse, error) {
|
|
rsp, err := c.GetTrashObject(ctx, id, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetTrashObjectResponse(rsp)
|
|
}
|
|
|
|
// RestoreObjectWithBodyWithResponse request with arbitrary body returning *RestoreObjectResponse
|
|
func (c *ClientWithResponses) RestoreObjectWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RestoreObjectResponse, error) {
|
|
rsp, err := c.RestoreObjectWithBody(ctx, id, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseRestoreObjectResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) RestoreObjectWithResponse(ctx context.Context, id string, body RestoreObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*RestoreObjectResponse, error) {
|
|
rsp, err := c.RestoreObject(ctx, id, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseRestoreObjectResponse(rsp)
|
|
}
|
|
|
|
// DeleteMyAvatarWithResponse request returning *DeleteMyAvatarResponse
|
|
func (c *ClientWithResponses) DeleteMyAvatarWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*DeleteMyAvatarResponse, error) {
|
|
rsp, err := c.DeleteMyAvatar(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseDeleteMyAvatarResponse(rsp)
|
|
}
|
|
|
|
// SetMyAvatarWithResponse request returning *SetMyAvatarResponse
|
|
func (c *ClientWithResponses) SetMyAvatarWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*SetMyAvatarResponse, error) {
|
|
rsp, err := c.SetMyAvatar(ctx, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseSetMyAvatarResponse(rsp)
|
|
}
|
|
|
|
// ListUserEntitlementsWithResponse request returning *ListUserEntitlementsResponse
|
|
func (c *ClientWithResponses) ListUserEntitlementsWithResponse(ctx context.Context, userId string, reqEditors ...RequestEditorFn) (*ListUserEntitlementsResponse, error) {
|
|
rsp, err := c.ListUserEntitlements(ctx, userId, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListUserEntitlementsResponse(rsp)
|
|
}
|
|
|
|
// GrantUserEntitlementWithBodyWithResponse request with arbitrary body returning *GrantUserEntitlementResponse
|
|
func (c *ClientWithResponses) GrantUserEntitlementWithBodyWithResponse(ctx context.Context, userId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GrantUserEntitlementResponse, error) {
|
|
rsp, err := c.GrantUserEntitlementWithBody(ctx, userId, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGrantUserEntitlementResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) GrantUserEntitlementWithResponse(ctx context.Context, userId string, body GrantUserEntitlementJSONRequestBody, reqEditors ...RequestEditorFn) (*GrantUserEntitlementResponse, error) {
|
|
rsp, err := c.GrantUserEntitlement(ctx, userId, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGrantUserEntitlementResponse(rsp)
|
|
}
|
|
|
|
// RevokeUserEntitlementWithResponse request returning *RevokeUserEntitlementResponse
|
|
func (c *ClientWithResponses) RevokeUserEntitlementWithResponse(ctx context.Context, userId string, eid string, reqEditors ...RequestEditorFn) (*RevokeUserEntitlementResponse, error) {
|
|
rsp, err := c.RevokeUserEntitlement(ctx, userId, eid, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseRevokeUserEntitlementResponse(rsp)
|
|
}
|
|
|
|
// UpdateUserEntitlementWithBodyWithResponse request with arbitrary body returning *UpdateUserEntitlementResponse
|
|
func (c *ClientWithResponses) UpdateUserEntitlementWithBodyWithResponse(ctx context.Context, userId string, eid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateUserEntitlementResponse, error) {
|
|
rsp, err := c.UpdateUserEntitlementWithBody(ctx, userId, eid, contentType, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUpdateUserEntitlementResponse(rsp)
|
|
}
|
|
|
|
func (c *ClientWithResponses) UpdateUserEntitlementWithResponse(ctx context.Context, userId string, eid string, body UpdateUserEntitlementJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateUserEntitlementResponse, error) {
|
|
rsp, err := c.UpdateUserEntitlement(ctx, userId, eid, body, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseUpdateUserEntitlementResponse(rsp)
|
|
}
|
|
|
|
// GetUserQuotaWithResponse request returning *GetUserQuotaResponse
|
|
func (c *ClientWithResponses) GetUserQuotaWithResponse(ctx context.Context, userId string, reqEditors ...RequestEditorFn) (*GetUserQuotaResponse, error) {
|
|
rsp, err := c.GetUserQuota(ctx, userId, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetUserQuotaResponse(rsp)
|
|
}
|
|
|
|
// GetUserProfileWithResponse request returning *GetUserProfileResponse
|
|
func (c *ClientWithResponses) GetUserProfileWithResponse(ctx context.Context, username string, reqEditors ...RequestEditorFn) (*GetUserProfileResponse, error) {
|
|
rsp, err := c.GetUserProfile(ctx, username, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseGetUserProfileResponse(rsp)
|
|
}
|
|
|
|
// ListUserObjectsWithResponse request returning *ListUserObjectsResponse
|
|
func (c *ClientWithResponses) ListUserObjectsWithResponse(ctx context.Context, username string, reqEditors ...RequestEditorFn) (*ListUserObjectsResponse, error) {
|
|
rsp, err := c.ListUserObjects(ctx, username, reqEditors...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return ParseListUserObjectsResponse(rsp)
|
|
}
|
|
|
|
// ParseGetApiAuthAccountInfoResponse parses an HTTP response from a GetApiAuthAccountInfoWithResponse call
|
|
func ParseGetApiAuthAccountInfoResponse(rsp *http.Response) (*GetApiAuthAccountInfoResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetApiAuthAccountInfoResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Data map[string]interface{} `json:"data"`
|
|
User struct {
|
|
Email *string `json:"email,omitempty"`
|
|
EmailVerified bool `json:"emailVerified"`
|
|
Id string `json:"id"`
|
|
Image *string `json:"image,omitempty"`
|
|
Name *string `json:"name,omitempty"`
|
|
} `json:"user"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseBanUserResponse parses an HTTP response from a BanUserWithResponse call
|
|
func ParseBanUserResponse(rsp *http.Response) (*BanUserResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &BanUserResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
User *User `json:"user,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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseCreateUserResponse parses an HTTP response from a CreateUserWithResponse call
|
|
func ParseCreateUserResponse(rsp *http.Response) (*CreateUserResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &CreateUserResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
User *User `json:"user,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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetUserResponse parses an HTTP response from a GetUserWithResponse call
|
|
func ParseGetUserResponse(rsp *http.Response) (*GetUserResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetUserResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
User *User `json:"user,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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePostApiAuthAdminHasPermissionResponse parses an HTTP response from a PostApiAuthAdminHasPermissionWithResponse call
|
|
func ParsePostApiAuthAdminHasPermissionResponse(rsp *http.Response) (*PostApiAuthAdminHasPermissionResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PostApiAuthAdminHasPermissionResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Error *string `json:"error,omitempty"`
|
|
Success bool `json:"success"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseImpersonateUserResponse parses an HTTP response from a ImpersonateUserWithResponse call
|
|
func ParseImpersonateUserResponse(rsp *http.Response) (*ImpersonateUserResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ImpersonateUserResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Session *Session `json:"session,omitempty"`
|
|
User *User `json:"user,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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseAdminListUserSessionsResponse parses an HTTP response from a AdminListUserSessionsWithResponse call
|
|
func ParseAdminListUserSessionsResponse(rsp *http.Response) (*AdminListUserSessionsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &AdminListUserSessionsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Sessions *[]Session `json:"sessions,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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseListUsersResponse parses an HTTP response from a ListUsersWithResponse call
|
|
func ParseListUsersResponse(rsp *http.Response) (*ListUsersResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListUsersResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Limit *float32 `json:"limit,omitempty"`
|
|
Offset *float32 `json:"offset,omitempty"`
|
|
Total float32 `json:"total"`
|
|
Users []User `json:"users"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseRemoveUserResponse parses an HTTP response from a RemoveUserWithResponse call
|
|
func ParseRemoveUserResponse(rsp *http.Response) (*RemoveUserResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &RemoveUserResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Success *bool `json:"success,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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseRevokeUserSessionResponse parses an HTTP response from a RevokeUserSessionWithResponse call
|
|
func ParseRevokeUserSessionResponse(rsp *http.Response) (*RevokeUserSessionResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &RevokeUserSessionResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Success *bool `json:"success,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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseRevokeUserSessionsResponse parses an HTTP response from a RevokeUserSessionsWithResponse call
|
|
func ParseRevokeUserSessionsResponse(rsp *http.Response) (*RevokeUserSessionsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &RevokeUserSessionsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Success *bool `json:"success,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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseSetUserRoleResponse parses an HTTP response from a SetUserRoleWithResponse call
|
|
func ParseSetUserRoleResponse(rsp *http.Response) (*SetUserRoleResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &SetUserRoleResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
User *User `json:"user,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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseSetUserPasswordResponse parses an HTTP response from a SetUserPasswordWithResponse call
|
|
func ParseSetUserPasswordResponse(rsp *http.Response) (*SetUserPasswordResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &SetUserPasswordResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Status *bool `json:"status,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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePostApiAuthAdminStopImpersonatingResponse parses an HTTP response from a PostApiAuthAdminStopImpersonatingWithResponse call
|
|
func ParsePostApiAuthAdminStopImpersonatingResponse(rsp *http.Response) (*PostApiAuthAdminStopImpersonatingResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PostApiAuthAdminStopImpersonatingResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseUnbanUserResponse parses an HTTP response from a UnbanUserWithResponse call
|
|
func ParseUnbanUserResponse(rsp *http.Response) (*UnbanUserResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &UnbanUserResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
User *User `json:"user,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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseAdminUpdateUserResponse parses an HTTP response from a AdminUpdateUserWithResponse call
|
|
func ParseAdminUpdateUserResponse(rsp *http.Response) (*AdminUpdateUserResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &AdminUpdateUserResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
User *User `json:"user,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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePostApiAuthApiKeyCreateResponse parses an HTTP response from a PostApiAuthApiKeyCreateWithResponse call
|
|
func ParsePostApiAuthApiKeyCreateResponse(rsp *http.Response) (*PostApiAuthApiKeyCreateResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PostApiAuthApiKeyCreateResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
// CreatedAt Creation timestamp
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
|
|
// Enabled Whether the key is enabled
|
|
Enabled bool `json:"enabled"`
|
|
|
|
// ExpiresAt Expiration timestamp
|
|
ExpiresAt *time.Time `json:"expiresAt,omitempty"`
|
|
|
|
// Id Unique identifier of the API key
|
|
Id string `json:"id"`
|
|
|
|
// Key The full API key (only returned on creation)
|
|
Key string `json:"key"`
|
|
|
|
// LastRefillAt Last refill timestamp
|
|
LastRefillAt *time.Time `json:"lastRefillAt,omitempty"`
|
|
|
|
// LastRequest Last request timestamp
|
|
LastRequest *time.Time `json:"lastRequest,omitempty"`
|
|
|
|
// Metadata Metadata associated with the key
|
|
Metadata *map[string]interface{} `json:"metadata,omitempty"`
|
|
|
|
// Name Name of the API key
|
|
Name *string `json:"name,omitempty"`
|
|
|
|
// Permissions Permissions associated with the key
|
|
Permissions *map[string][]string `json:"permissions,omitempty"`
|
|
|
|
// Prefix Prefix of the API key
|
|
Prefix *string `json:"prefix,omitempty"`
|
|
|
|
// RateLimitEnabled Whether rate limiting is enabled
|
|
RateLimitEnabled bool `json:"rateLimitEnabled"`
|
|
|
|
// RateLimitMax Maximum requests in time window
|
|
RateLimitMax *float32 `json:"rateLimitMax,omitempty"`
|
|
|
|
// RateLimitTimeWindow Rate limit time window in milliseconds
|
|
RateLimitTimeWindow *float32 `json:"rateLimitTimeWindow,omitempty"`
|
|
|
|
// ReferenceId ID of the reference owning the key
|
|
ReferenceId string `json:"referenceId"`
|
|
|
|
// RefillAmount Amount to refill
|
|
RefillAmount *float32 `json:"refillAmount,omitempty"`
|
|
|
|
// RefillInterval Refill interval in milliseconds
|
|
RefillInterval *float32 `json:"refillInterval,omitempty"`
|
|
|
|
// Remaining Remaining requests
|
|
Remaining *float32 `json:"remaining,omitempty"`
|
|
|
|
// RequestCount Current request count in window
|
|
RequestCount float32 `json:"requestCount"`
|
|
|
|
// Start Starting characters of the key (if configured)
|
|
Start *string `json:"start,omitempty"`
|
|
|
|
// UpdatedAt Last update timestamp
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePostApiAuthApiKeyDeleteResponse parses an HTTP response from a PostApiAuthApiKeyDeleteWithResponse call
|
|
func ParsePostApiAuthApiKeyDeleteResponse(rsp *http.Response) (*PostApiAuthApiKeyDeleteResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PostApiAuthApiKeyDeleteResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
// Success Indicates if the API key was successfully deleted
|
|
Success bool `json:"success"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetApiAuthApiKeyGetResponse parses an HTTP response from a GetApiAuthApiKeyGetWithResponse call
|
|
func ParseGetApiAuthApiKeyGetResponse(rsp *http.Response) (*GetApiAuthApiKeyGetResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetApiAuthApiKeyGetResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
// CreatedAt created at
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
|
|
// Enabled Sets if key is enabled or disabled
|
|
Enabled bool `json:"enabled"`
|
|
|
|
// ExpiresAt Expiry date of a key
|
|
ExpiresAt *time.Time `json:"expiresAt,omitempty"`
|
|
|
|
// Id ID
|
|
Id string `json:"id"`
|
|
|
|
// LastRefillAt The last refill date
|
|
LastRefillAt *time.Time `json:"lastRefillAt,omitempty"`
|
|
|
|
// LastRequest When last request occurred
|
|
LastRequest *time.Time `json:"lastRequest,omitempty"`
|
|
|
|
// Metadata Extra metadata about the apiKey
|
|
Metadata *map[string]interface{} `json:"metadata,omitempty"`
|
|
|
|
// Name The name of the key
|
|
Name *string `json:"name,omitempty"`
|
|
|
|
// Permissions Permissions for the api key (stored as JSON string)
|
|
Permissions *string `json:"permissions,omitempty"`
|
|
|
|
// Prefix The API Key prefix. Stored as plain text.
|
|
Prefix *string `json:"prefix,omitempty"`
|
|
|
|
// RateLimitEnabled Whether the key has rate limiting enabled
|
|
RateLimitEnabled bool `json:"rateLimitEnabled"`
|
|
|
|
// RateLimitMax Maximum amount of requests allowed within a window
|
|
RateLimitMax *float32 `json:"rateLimitMax,omitempty"`
|
|
|
|
// RateLimitTimeWindow The duration in milliseconds
|
|
RateLimitTimeWindow *float32 `json:"rateLimitTimeWindow,omitempty"`
|
|
|
|
// RefillAmount The amount to refill
|
|
RefillAmount *float32 `json:"refillAmount,omitempty"`
|
|
|
|
// RefillInterval The interval in milliseconds between refills of the `remaining` count. Example: 3600000 // refill every hour (3600000ms = 1h)
|
|
RefillInterval *float32 `json:"refillInterval,omitempty"`
|
|
|
|
// Remaining Remaining requests (every time api key is used this should updated and should be updated on refill as well)
|
|
Remaining *float32 `json:"remaining,omitempty"`
|
|
|
|
// RequestCount The number of requests made within the rate limit time window
|
|
RequestCount float32 `json:"requestCount"`
|
|
|
|
// Start Shows the first few characters of the API key, including the prefix. This allows you to show those few characters in the UI to make it easier for users to identify the API key.
|
|
Start *string `json:"start,omitempty"`
|
|
|
|
// UpdatedAt updated at
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
|
|
// UserId The owner of the user id
|
|
UserId string `json:"userId"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetApiAuthApiKeyListResponse parses an HTTP response from a GetApiAuthApiKeyListWithResponse call
|
|
func ParseGetApiAuthApiKeyListResponse(rsp *http.Response) (*GetApiAuthApiKeyListResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetApiAuthApiKeyListResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
ApiKeys []struct {
|
|
// CreatedAt created at
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
|
|
// Enabled Sets if key is enabled or disabled
|
|
Enabled bool `json:"enabled"`
|
|
|
|
// ExpiresAt Expiry date of a key
|
|
ExpiresAt *time.Time `json:"expiresAt,omitempty"`
|
|
|
|
// Id ID
|
|
Id string `json:"id"`
|
|
|
|
// LastRefillAt The last refill date
|
|
LastRefillAt *time.Time `json:"lastRefillAt,omitempty"`
|
|
|
|
// LastRequest When last request occurred
|
|
LastRequest *time.Time `json:"lastRequest,omitempty"`
|
|
|
|
// Metadata Extra metadata about the apiKey
|
|
Metadata *map[string]interface{} `json:"metadata,omitempty"`
|
|
|
|
// Name The name of the key
|
|
Name *string `json:"name,omitempty"`
|
|
|
|
// Permissions Permissions for the api key (stored as JSON string)
|
|
Permissions *string `json:"permissions,omitempty"`
|
|
|
|
// Prefix The API Key prefix. Stored as plain text.
|
|
Prefix *string `json:"prefix,omitempty"`
|
|
|
|
// RateLimitEnabled Whether the key has rate limiting enabled
|
|
RateLimitEnabled bool `json:"rateLimitEnabled"`
|
|
|
|
// RateLimitMax Maximum amount of requests allowed within a window
|
|
RateLimitMax *float32 `json:"rateLimitMax,omitempty"`
|
|
|
|
// RateLimitTimeWindow The duration in milliseconds
|
|
RateLimitTimeWindow *float32 `json:"rateLimitTimeWindow,omitempty"`
|
|
|
|
// RefillAmount The amount to refill
|
|
RefillAmount *float32 `json:"refillAmount,omitempty"`
|
|
|
|
// RefillInterval The interval in milliseconds between refills of the `remaining` count. Example: 3600000 // refill every hour (3600000ms = 1h)
|
|
RefillInterval *float32 `json:"refillInterval,omitempty"`
|
|
|
|
// Remaining Remaining requests (every time api key is used this should updated and should be updated on refill as well)
|
|
Remaining *float32 `json:"remaining,omitempty"`
|
|
|
|
// RequestCount The number of requests made within the rate limit time window
|
|
RequestCount float32 `json:"requestCount"`
|
|
|
|
// Start Shows the first few characters of the API key, including the prefix. This allows you to show those few characters in the UI to make it easier for users to identify the API key.
|
|
Start *string `json:"start,omitempty"`
|
|
|
|
// UpdatedAt updated at
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
|
|
// UserId The owner of the user id
|
|
UserId string `json:"userId"`
|
|
} `json:"apiKeys"`
|
|
|
|
// Limit The limit used for pagination
|
|
Limit *float32 `json:"limit,omitempty"`
|
|
|
|
// Offset The offset used for pagination
|
|
Offset *float32 `json:"offset,omitempty"`
|
|
|
|
// Total Total number of API keys
|
|
Total float32 `json:"total"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePostApiAuthApiKeyUpdateResponse parses an HTTP response from a PostApiAuthApiKeyUpdateWithResponse call
|
|
func ParsePostApiAuthApiKeyUpdateResponse(rsp *http.Response) (*PostApiAuthApiKeyUpdateResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PostApiAuthApiKeyUpdateResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
// CreatedAt created at
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
|
|
// Enabled Sets if key is enabled or disabled
|
|
Enabled bool `json:"enabled"`
|
|
|
|
// ExpiresAt Expiry date of a key
|
|
ExpiresAt *time.Time `json:"expiresAt,omitempty"`
|
|
|
|
// Id ID
|
|
Id string `json:"id"`
|
|
|
|
// LastRefillAt The last refill date
|
|
LastRefillAt *time.Time `json:"lastRefillAt,omitempty"`
|
|
|
|
// LastRequest When last request occurred
|
|
LastRequest *time.Time `json:"lastRequest,omitempty"`
|
|
|
|
// Metadata Extra metadata about the apiKey
|
|
Metadata *map[string]interface{} `json:"metadata,omitempty"`
|
|
|
|
// Name The name of the key
|
|
Name *string `json:"name,omitempty"`
|
|
|
|
// Permissions Permissions for the api key (stored as JSON string)
|
|
Permissions *string `json:"permissions,omitempty"`
|
|
|
|
// Prefix The API Key prefix. Stored as plain text.
|
|
Prefix *string `json:"prefix,omitempty"`
|
|
|
|
// RateLimitEnabled Whether the key has rate limiting enabled
|
|
RateLimitEnabled bool `json:"rateLimitEnabled"`
|
|
|
|
// RateLimitMax Maximum amount of requests allowed within a window
|
|
RateLimitMax *float32 `json:"rateLimitMax,omitempty"`
|
|
|
|
// RateLimitTimeWindow The duration in milliseconds
|
|
RateLimitTimeWindow *float32 `json:"rateLimitTimeWindow,omitempty"`
|
|
|
|
// RefillAmount The amount to refill
|
|
RefillAmount *float32 `json:"refillAmount,omitempty"`
|
|
|
|
// RefillInterval The interval in milliseconds between refills of the `remaining` count. Example: 3600000 // refill every hour (3600000ms = 1h)
|
|
RefillInterval *float32 `json:"refillInterval,omitempty"`
|
|
|
|
// Remaining Remaining requests (every time api key is used this should updated and should be updated on refill as well)
|
|
Remaining *float32 `json:"remaining,omitempty"`
|
|
|
|
// RequestCount The number of requests made within the rate limit time window
|
|
RequestCount float32 `json:"requestCount"`
|
|
|
|
// Start Shows the first few characters of the API key, including the prefix. This allows you to show those few characters in the UI to make it easier for users to identify the API key.
|
|
Start *string `json:"start,omitempty"`
|
|
|
|
// UpdatedAt updated at
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
|
|
// UserId The owner of the user id
|
|
UserId string `json:"userId"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetApiAuthCallbackIdResponse parses an HTTP response from a GetApiAuthCallbackIdWithResponse call
|
|
func ParseGetApiAuthCallbackIdResponse(rsp *http.Response) (*GetApiAuthCallbackIdResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetApiAuthCallbackIdResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePostApiAuthCallbackIdResponse parses an HTTP response from a PostApiAuthCallbackIdWithResponse call
|
|
func ParsePostApiAuthCallbackIdResponse(rsp *http.Response) (*PostApiAuthCallbackIdResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PostApiAuthCallbackIdResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseChangeEmailResponse parses an HTTP response from a ChangeEmailWithResponse call
|
|
func ParseChangeEmailResponse(rsp *http.Response) (*ChangeEmailResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ChangeEmailResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
// Message Status message of the email change process
|
|
Message *ChangeEmail200JSONResponseBodyMessage `json:"message,omitempty"`
|
|
|
|
// Status Indicates if the request was successful
|
|
Status bool `json:"status"`
|
|
User *User `json:"user,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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseChangePasswordResponse parses an HTTP response from a ChangePasswordWithResponse call
|
|
func ParseChangePasswordResponse(rsp *http.Response) (*ChangePasswordResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ChangePasswordResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
// Token New session token if other sessions were revoked
|
|
Token *string `json:"token,omitempty"`
|
|
User struct {
|
|
// CreatedAt When the user was created
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
|
|
// Email The email address of the user
|
|
Email openapi_types.Email `json:"email"`
|
|
|
|
// EmailVerified Whether the email has been verified
|
|
EmailVerified bool `json:"emailVerified"`
|
|
|
|
// Id The unique identifier of the user
|
|
Id string `json:"id"`
|
|
|
|
// Image The profile image URL of the user
|
|
Image *string `json:"image,omitempty"`
|
|
|
|
// Name The name of the user
|
|
Name string `json:"name"`
|
|
|
|
// UpdatedAt When the user was last updated
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
} `json:"user"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseDeleteUserResponse parses an HTTP response from a DeleteUserWithResponse call
|
|
func ParseDeleteUserResponse(rsp *http.Response) (*DeleteUserResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &DeleteUserResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
// Message Status message of the deletion process
|
|
Message DeleteUser200JSONResponseBodyMessage `json:"message"`
|
|
|
|
// Success Indicates if the operation was successful
|
|
Success bool `json:"success"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetApiAuthDeleteUserCallbackResponse parses an HTTP response from a GetApiAuthDeleteUserCallbackWithResponse call
|
|
func ParseGetApiAuthDeleteUserCallbackResponse(rsp *http.Response) (*GetApiAuthDeleteUserCallbackResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetApiAuthDeleteUserCallbackResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
// Message Confirmation message
|
|
Message GetApiAuthDeleteUserCallback200JSONResponseBodyMessage `json:"message"`
|
|
|
|
// Success Indicates if the deletion was successful
|
|
Success bool `json:"success"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetApiAuthDeviceResponse parses an HTTP response from a GetApiAuthDeviceWithResponse call
|
|
func ParseGetApiAuthDeviceResponse(rsp *http.Response) (*GetApiAuthDeviceResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetApiAuthDeviceResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
// Status Current status of the device authorization
|
|
Status *GetApiAuthDevice200JSONResponseBodyStatus `json:"status,omitempty"`
|
|
|
|
// UserCode The user code to verify
|
|
UserCode *string `json:"user_code,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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePostApiAuthDeviceApproveResponse parses an HTTP response from a PostApiAuthDeviceApproveWithResponse call
|
|
func ParsePostApiAuthDeviceApproveResponse(rsp *http.Response) (*PostApiAuthDeviceApproveResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PostApiAuthDeviceApproveResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Success *bool `json:"success,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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePostApiAuthDeviceCodeResponse parses an HTTP response from a PostApiAuthDeviceCodeWithResponse call
|
|
func ParsePostApiAuthDeviceCodeResponse(rsp *http.Response) (*PostApiAuthDeviceCodeResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PostApiAuthDeviceCodeResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
// DeviceCode The device verification code
|
|
DeviceCode *string `json:"device_code,omitempty"`
|
|
|
|
// ExpiresIn Lifetime in seconds of the device code
|
|
ExpiresIn *float32 `json:"expires_in,omitempty"`
|
|
|
|
// Interval Minimum polling interval in seconds
|
|
Interval *float32 `json:"interval,omitempty"`
|
|
|
|
// UserCode The user code to display
|
|
UserCode *string `json:"user_code,omitempty"`
|
|
|
|
// VerificationUri The URL for user verification. Defaults to /device if not configured.
|
|
VerificationUri *string `json:"verification_uri,omitempty"`
|
|
|
|
// VerificationUriComplete The complete URL with user code as query parameter.
|
|
VerificationUriComplete *string `json:"verification_uri_complete,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 struct {
|
|
Error *PostApiAuthDeviceCode400JSONResponseBodyError `json:"error,omitempty"`
|
|
ErrorDescription *string `json:"error_description,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePostApiAuthDeviceDenyResponse parses an HTTP response from a PostApiAuthDeviceDenyWithResponse call
|
|
func ParsePostApiAuthDeviceDenyResponse(rsp *http.Response) (*PostApiAuthDeviceDenyResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PostApiAuthDeviceDenyResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Success *bool `json:"success,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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePostApiAuthDeviceTokenResponse parses an HTTP response from a PostApiAuthDeviceTokenWithResponse call
|
|
func ParsePostApiAuthDeviceTokenResponse(rsp *http.Response) (*PostApiAuthDeviceTokenResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PostApiAuthDeviceTokenResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
AccessToken string `json:"access_token"`
|
|
ExpiresIn int `json:"expires_in"`
|
|
Scope *string `json:"scope,omitempty"`
|
|
TokenType string `json:"token_type"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Error *PostApiAuthDeviceToken400JSONResponseBodyError `json:"error,omitempty"`
|
|
ErrorDescription *string `json:"error_description,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetApiAuthErrorResponse parses an HTTP response from a GetApiAuthErrorWithResponse call
|
|
func ParseGetApiAuthErrorResponse(rsp *http.Response) (*GetApiAuthErrorResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetApiAuthErrorResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePostApiAuthGetAccessTokenResponse parses an HTTP response from a PostApiAuthGetAccessTokenWithResponse call
|
|
func ParsePostApiAuthGetAccessTokenResponse(rsp *http.Response) (*PostApiAuthGetAccessTokenResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PostApiAuthGetAccessTokenResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
AccessToken *string `json:"accessToken,omitempty"`
|
|
AccessTokenExpiresAt *time.Time `json:"accessTokenExpiresAt,omitempty"`
|
|
IdToken *string `json:"idToken,omitempty"`
|
|
TokenType *string `json:"tokenType,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 == 401:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetSessionResponse parses an HTTP response from a GetSessionWithResponse call
|
|
func ParseGetSessionResponse(rsp *http.Response) (*GetSessionResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetSessionResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Session Session `json:"session"`
|
|
User User `json:"user"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetSessionPostResponse parses an HTTP response from a GetSessionPostWithResponse call
|
|
func ParseGetSessionPostResponse(rsp *http.Response) (*GetSessionPostResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetSessionPostResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Session Session `json:"session"`
|
|
User User `json:"user"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePostApiAuthIsUsernameAvailableResponse parses an HTTP response from a PostApiAuthIsUsernameAvailableWithResponse call
|
|
func ParsePostApiAuthIsUsernameAvailableResponse(rsp *http.Response) (*PostApiAuthIsUsernameAvailableResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PostApiAuthIsUsernameAvailableResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseLinkSocialAccountResponse parses an HTTP response from a LinkSocialAccountWithResponse call
|
|
func ParseLinkSocialAccountResponse(rsp *http.Response) (*LinkSocialAccountResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &LinkSocialAccountResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
// Redirect Indicates if the user should be redirected to the authorization URL
|
|
Redirect bool `json:"redirect"`
|
|
Status *bool `json:"status,omitempty"`
|
|
|
|
// Url The authorization URL to redirect the user to
|
|
Url *string `json:"url,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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseListUserAccountsResponse parses an HTTP response from a ListUserAccountsWithResponse call
|
|
func ParseListUserAccountsResponse(rsp *http.Response) (*ListUserAccountsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListUserAccountsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest []struct {
|
|
AccountId string `json:"accountId"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
Id string `json:"id"`
|
|
ProviderId string `json:"providerId"`
|
|
Scopes []string `json:"scopes"`
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
UserId string `json:"userId"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseListUserSessionsResponse parses an HTTP response from a ListUserSessionsWithResponse call
|
|
func ParseListUserSessionsResponse(rsp *http.Response) (*ListUserSessionsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListUserSessionsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest []Session
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetApiAuthOauth2CallbackProviderIdResponse parses an HTTP response from a GetApiAuthOauth2CallbackProviderIdWithResponse call
|
|
func ParseGetApiAuthOauth2CallbackProviderIdResponse(rsp *http.Response) (*GetApiAuthOauth2CallbackProviderIdResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetApiAuthOauth2CallbackProviderIdResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Url *string `json:"url,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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePostApiAuthOauth2LinkResponse parses an HTTP response from a PostApiAuthOauth2LinkWithResponse call
|
|
func ParsePostApiAuthOauth2LinkResponse(rsp *http.Response) (*PostApiAuthOauth2LinkResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PostApiAuthOauth2LinkResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
// Redirect Indicates that the client should redirect to the provided URL
|
|
Redirect PostApiAuthOauth2Link200JSONResponseBodyRedirect `json:"redirect"`
|
|
|
|
// Url The authorization URL to redirect the user to for linking the OAuth2 account
|
|
Url string `json:"url"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetApiAuthOkResponse parses an HTTP response from a GetApiAuthOkWithResponse call
|
|
func ParseGetApiAuthOkResponse(rsp *http.Response) (*GetApiAuthOkResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetApiAuthOkResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
// Ok Indicates if the API is working
|
|
Ok bool `json:"ok"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePostApiAuthOrganizationAcceptInvitationResponse parses an HTTP response from a PostApiAuthOrganizationAcceptInvitationWithResponse call
|
|
func ParsePostApiAuthOrganizationAcceptInvitationResponse(rsp *http.Response) (*PostApiAuthOrganizationAcceptInvitationResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PostApiAuthOrganizationAcceptInvitationResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Invitation *map[string]interface{} `json:"invitation,omitempty"`
|
|
Member *map[string]interface{} `json:"member,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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePostApiAuthOrganizationCancelInvitationResponse parses an HTTP response from a PostApiAuthOrganizationCancelInvitationWithResponse call
|
|
func ParsePostApiAuthOrganizationCancelInvitationResponse(rsp *http.Response) (*PostApiAuthOrganizationCancelInvitationResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PostApiAuthOrganizationCancelInvitationResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePostApiAuthOrganizationCheckSlugResponse parses an HTTP response from a PostApiAuthOrganizationCheckSlugWithResponse call
|
|
func ParsePostApiAuthOrganizationCheckSlugResponse(rsp *http.Response) (*PostApiAuthOrganizationCheckSlugResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PostApiAuthOrganizationCheckSlugResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePostApiAuthOrganizationCreateResponse parses an HTTP response from a PostApiAuthOrganizationCreateWithResponse call
|
|
func ParsePostApiAuthOrganizationCreateResponse(rsp *http.Response) (*PostApiAuthOrganizationCreateResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PostApiAuthOrganizationCreateResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest Organization
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePostApiAuthOrganizationDeleteResponse parses an HTTP response from a PostApiAuthOrganizationDeleteWithResponse call
|
|
func ParsePostApiAuthOrganizationDeleteResponse(rsp *http.Response) (*PostApiAuthOrganizationDeleteResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PostApiAuthOrganizationDeleteResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest string
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetApiAuthOrganizationGetActiveMemberResponse parses an HTTP response from a GetApiAuthOrganizationGetActiveMemberWithResponse call
|
|
func ParseGetApiAuthOrganizationGetActiveMemberResponse(rsp *http.Response) (*GetApiAuthOrganizationGetActiveMemberResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetApiAuthOrganizationGetActiveMemberResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Id string `json:"id"`
|
|
OrganizationId string `json:"organizationId"`
|
|
Role string `json:"role"`
|
|
UserId string `json:"userId"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetApiAuthOrganizationGetActiveMemberRoleResponse parses an HTTP response from a GetApiAuthOrganizationGetActiveMemberRoleWithResponse call
|
|
func ParseGetApiAuthOrganizationGetActiveMemberRoleResponse(rsp *http.Response) (*GetApiAuthOrganizationGetActiveMemberRoleResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetApiAuthOrganizationGetActiveMemberRoleResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetOrganizationResponse parses an HTTP response from a GetOrganizationWithResponse call
|
|
func ParseGetOrganizationResponse(rsp *http.Response) (*GetOrganizationResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetOrganizationResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest Organization
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetApiAuthOrganizationGetInvitationResponse parses an HTTP response from a GetApiAuthOrganizationGetInvitationWithResponse call
|
|
func ParseGetApiAuthOrganizationGetInvitationResponse(rsp *http.Response) (*GetApiAuthOrganizationGetInvitationResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetApiAuthOrganizationGetInvitationResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Email string `json:"email"`
|
|
ExpiresAt string `json:"expiresAt"`
|
|
Id string `json:"id"`
|
|
InviterEmail string `json:"inviterEmail"`
|
|
InviterId string `json:"inviterId"`
|
|
OrganizationId string `json:"organizationId"`
|
|
OrganizationName string `json:"organizationName"`
|
|
OrganizationSlug string `json:"organizationSlug"`
|
|
Role string `json:"role"`
|
|
Status string `json:"status"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePostApiAuthOrganizationHasPermissionResponse parses an HTTP response from a PostApiAuthOrganizationHasPermissionWithResponse call
|
|
func ParsePostApiAuthOrganizationHasPermissionResponse(rsp *http.Response) (*PostApiAuthOrganizationHasPermissionResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PostApiAuthOrganizationHasPermissionResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Error *string `json:"error,omitempty"`
|
|
Success bool `json:"success"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseCreateOrganizationInvitationResponse parses an HTTP response from a CreateOrganizationInvitationWithResponse call
|
|
func ParseCreateOrganizationInvitationResponse(rsp *http.Response) (*CreateOrganizationInvitationResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &CreateOrganizationInvitationResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
CreatedAt string `json:"createdAt"`
|
|
Email string `json:"email"`
|
|
ExpiresAt string `json:"expiresAt"`
|
|
Id string `json:"id"`
|
|
InviterId string `json:"inviterId"`
|
|
OrganizationId string `json:"organizationId"`
|
|
Role string `json:"role"`
|
|
Status string `json:"status"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePostApiAuthOrganizationLeaveResponse parses an HTTP response from a PostApiAuthOrganizationLeaveWithResponse call
|
|
func ParsePostApiAuthOrganizationLeaveResponse(rsp *http.Response) (*PostApiAuthOrganizationLeaveResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PostApiAuthOrganizationLeaveResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetApiAuthOrganizationListResponse parses an HTTP response from a GetApiAuthOrganizationListWithResponse call
|
|
func ParseGetApiAuthOrganizationListResponse(rsp *http.Response) (*GetApiAuthOrganizationListResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetApiAuthOrganizationListResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest []Organization
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetApiAuthOrganizationListInvitationsResponse parses an HTTP response from a GetApiAuthOrganizationListInvitationsWithResponse call
|
|
func ParseGetApiAuthOrganizationListInvitationsResponse(rsp *http.Response) (*GetApiAuthOrganizationListInvitationsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetApiAuthOrganizationListInvitationsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetApiAuthOrganizationListMembersResponse parses an HTTP response from a GetApiAuthOrganizationListMembersWithResponse call
|
|
func ParseGetApiAuthOrganizationListMembersResponse(rsp *http.Response) (*GetApiAuthOrganizationListMembersResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetApiAuthOrganizationListMembersResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetApiAuthOrganizationListUserInvitationsResponse parses an HTTP response from a GetApiAuthOrganizationListUserInvitationsWithResponse call
|
|
func ParseGetApiAuthOrganizationListUserInvitationsResponse(rsp *http.Response) (*GetApiAuthOrganizationListUserInvitationsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetApiAuthOrganizationListUserInvitationsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest []struct {
|
|
CreatedAt string `json:"createdAt"`
|
|
Email string `json:"email"`
|
|
ExpiresAt string `json:"expiresAt"`
|
|
Id string `json:"id"`
|
|
|
|
// InviterId The ID of the user who created the invitation
|
|
InviterId string `json:"inviterId"`
|
|
OrganizationId string `json:"organizationId"`
|
|
OrganizationName string `json:"organizationName"`
|
|
Role string `json:"role"`
|
|
Status string `json:"status"`
|
|
|
|
// TeamId The ID of the team associated with the invitation
|
|
TeamId *string `json:"teamId,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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePostApiAuthOrganizationRejectInvitationResponse parses an HTTP response from a PostApiAuthOrganizationRejectInvitationWithResponse call
|
|
func ParsePostApiAuthOrganizationRejectInvitationResponse(rsp *http.Response) (*PostApiAuthOrganizationRejectInvitationResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PostApiAuthOrganizationRejectInvitationResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Invitation *map[string]interface{} `json:"invitation,omitempty"`
|
|
Member *map[string]interface{} `json:"member,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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePostApiAuthOrganizationRemoveMemberResponse parses an HTTP response from a PostApiAuthOrganizationRemoveMemberWithResponse call
|
|
func ParsePostApiAuthOrganizationRemoveMemberResponse(rsp *http.Response) (*PostApiAuthOrganizationRemoveMemberResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PostApiAuthOrganizationRemoveMemberResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Member struct {
|
|
Id string `json:"id"`
|
|
OrganizationId string `json:"organizationId"`
|
|
Role string `json:"role"`
|
|
UserId string `json:"userId"`
|
|
} `json:"member"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseSetActiveOrganizationResponse parses an HTTP response from a SetActiveOrganizationWithResponse call
|
|
func ParseSetActiveOrganizationResponse(rsp *http.Response) (*SetActiveOrganizationResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &SetActiveOrganizationResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest Organization
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePostApiAuthOrganizationUpdateResponse parses an HTTP response from a PostApiAuthOrganizationUpdateWithResponse call
|
|
func ParsePostApiAuthOrganizationUpdateResponse(rsp *http.Response) (*PostApiAuthOrganizationUpdateResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PostApiAuthOrganizationUpdateResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest Organization
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseUpdateOrganizationMemberRoleResponse parses an HTTP response from a UpdateOrganizationMemberRoleWithResponse call
|
|
func ParseUpdateOrganizationMemberRoleResponse(rsp *http.Response) (*UpdateOrganizationMemberRoleResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &UpdateOrganizationMemberRoleResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Member struct {
|
|
Id string `json:"id"`
|
|
OrganizationId string `json:"organizationId"`
|
|
Role string `json:"role"`
|
|
UserId string `json:"userId"`
|
|
} `json:"member"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePostApiAuthRefreshTokenResponse parses an HTTP response from a PostApiAuthRefreshTokenWithResponse call
|
|
func ParsePostApiAuthRefreshTokenResponse(rsp *http.Response) (*PostApiAuthRefreshTokenResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PostApiAuthRefreshTokenResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
AccessToken *string `json:"accessToken,omitempty"`
|
|
AccessTokenExpiresAt *time.Time `json:"accessTokenExpiresAt,omitempty"`
|
|
IdToken *string `json:"idToken,omitempty"`
|
|
RefreshToken *string `json:"refreshToken,omitempty"`
|
|
RefreshTokenExpiresAt *time.Time `json:"refreshTokenExpiresAt,omitempty"`
|
|
TokenType *string `json:"tokenType,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 == 401:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseRequestPasswordResetResponse parses an HTTP response from a RequestPasswordResetWithResponse call
|
|
func ParseRequestPasswordResetResponse(rsp *http.Response) (*RequestPasswordResetResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &RequestPasswordResetResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Message *string `json:"message,omitempty"`
|
|
Status *bool `json:"status,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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseResetPasswordResponse parses an HTTP response from a ResetPasswordWithResponse call
|
|
func ParseResetPasswordResponse(rsp *http.Response) (*ResetPasswordResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ResetPasswordResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Status *bool `json:"status,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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseResetPasswordCallbackResponse parses an HTTP response from a ResetPasswordCallbackWithResponse call
|
|
func ParseResetPasswordCallbackResponse(rsp *http.Response) (*ResetPasswordCallbackResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ResetPasswordCallbackResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Token *string `json:"token,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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePostApiAuthRevokeOtherSessionsResponse parses an HTTP response from a PostApiAuthRevokeOtherSessionsWithResponse call
|
|
func ParsePostApiAuthRevokeOtherSessionsResponse(rsp *http.Response) (*PostApiAuthRevokeOtherSessionsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PostApiAuthRevokeOtherSessionsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
// Status Indicates if all other sessions were revoked successfully
|
|
Status bool `json:"status"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePostApiAuthRevokeSessionResponse parses an HTTP response from a PostApiAuthRevokeSessionWithResponse call
|
|
func ParsePostApiAuthRevokeSessionResponse(rsp *http.Response) (*PostApiAuthRevokeSessionResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PostApiAuthRevokeSessionResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
// Status Indicates if the session was revoked successfully
|
|
Status bool `json:"status"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePostApiAuthRevokeSessionsResponse parses an HTTP response from a PostApiAuthRevokeSessionsWithResponse call
|
|
func ParsePostApiAuthRevokeSessionsResponse(rsp *http.Response) (*PostApiAuthRevokeSessionsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PostApiAuthRevokeSessionsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
// Status Indicates if all sessions were revoked successfully
|
|
Status bool `json:"status"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseSendVerificationEmailResponse parses an HTTP response from a SendVerificationEmailWithResponse call
|
|
func ParseSendVerificationEmailResponse(rsp *http.Response) (*SendVerificationEmailResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &SendVerificationEmailResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
// Status Indicates if the email was sent successfully
|
|
Status *bool `json:"status,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 struct {
|
|
// Message Error message
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseSignInEmailResponse parses an HTTP response from a SignInEmailWithResponse call
|
|
func ParseSignInEmailResponse(rsp *http.Response) (*SignInEmailResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &SignInEmailResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Redirect SignInEmail200JSONResponseBodyRedirect `json:"redirect"`
|
|
|
|
// Token Session token
|
|
Token string `json:"token"`
|
|
Url *string `json:"url,omitempty"`
|
|
User User `json:"user"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePostApiAuthSignInOauth2Response parses an HTTP response from a PostApiAuthSignInOauth2WithResponse call
|
|
func ParsePostApiAuthSignInOauth2Response(rsp *http.Response) (*PostApiAuthSignInOauth2Response, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PostApiAuthSignInOauth2Response{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Redirect *bool `json:"redirect,omitempty"`
|
|
Url *string `json:"url,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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseSocialSignInResponse parses an HTTP response from a SocialSignInWithResponse call
|
|
func ParseSocialSignInResponse(rsp *http.Response) (*SocialSignInResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &SocialSignInResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Redirect bool `json:"redirect"`
|
|
Token *string `json:"token,omitempty"`
|
|
Url *string `json:"url,omitempty"`
|
|
User *User `json:"user,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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePostApiAuthSignInUsernameResponse parses an HTTP response from a PostApiAuthSignInUsernameWithResponse call
|
|
func ParsePostApiAuthSignInUsernameResponse(rsp *http.Response) (*PostApiAuthSignInUsernameResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PostApiAuthSignInUsernameResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
// Redirect Whether the client should follow the Location header. True when callbackURL was provided.
|
|
Redirect bool `json:"redirect"`
|
|
|
|
// Token Session token for the authenticated session
|
|
Token string `json:"token"`
|
|
|
|
// Url The callbackURL echoed back so the client can redirect.
|
|
Url *string `json:"url,omitempty"`
|
|
User User `json:"user"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 == 422:
|
|
var dest struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON422 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
var dest struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseSignOutResponse parses an HTTP response from a SignOutWithResponse call
|
|
func ParseSignOutResponse(rsp *http.Response) (*SignOutResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &SignOutResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Success *bool `json:"success,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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseSignUpWithEmailAndPasswordResponse parses an HTTP response from a SignUpWithEmailAndPasswordWithResponse call
|
|
func ParseSignUpWithEmailAndPasswordResponse(rsp *http.Response) (*SignUpWithEmailAndPasswordResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &SignUpWithEmailAndPasswordResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
// Token Authentication token for the session
|
|
Token *string `json:"token,omitempty"`
|
|
User struct {
|
|
// CreatedAt When the user was created
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
|
|
// Email The email address of the user
|
|
Email openapi_types.Email `json:"email"`
|
|
|
|
// EmailVerified Whether the email has been verified
|
|
EmailVerified bool `json:"emailVerified"`
|
|
|
|
// Id The unique identifier of the user
|
|
Id string `json:"id"`
|
|
|
|
// Image The profile image URL of the user
|
|
Image *string `json:"image,omitempty"`
|
|
|
|
// Name The name of the user
|
|
Name string `json:"name"`
|
|
|
|
// UpdatedAt When the user was last updated
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
} `json:"user"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 == 422:
|
|
var dest struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON422 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429:
|
|
var dest struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePostApiAuthUnlinkAccountResponse parses an HTTP response from a PostApiAuthUnlinkAccountWithResponse call
|
|
func ParsePostApiAuthUnlinkAccountResponse(rsp *http.Response) (*PostApiAuthUnlinkAccountResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PostApiAuthUnlinkAccountResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Status *bool `json:"status,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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseUpdateSessionResponse parses an HTTP response from a UpdateSessionWithResponse call
|
|
func ParseUpdateSessionResponse(rsp *http.Response) (*UpdateSessionResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &UpdateSessionResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Session *Session `json:"session,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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseUpdateUserResponse parses an HTTP response from a UpdateUserWithResponse call
|
|
func ParseUpdateUserResponse(rsp *http.Response) (*UpdateUserResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &UpdateUserResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
User *User `json:"user,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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetApiAuthVerifyEmailResponse parses an HTTP response from a GetApiAuthVerifyEmailWithResponse call
|
|
func ParseGetApiAuthVerifyEmailResponse(rsp *http.Response) (*GetApiAuthVerifyEmailResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetApiAuthVerifyEmailResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
// Status Indicates if the email was verified successfully
|
|
Status bool `json:"status"`
|
|
User User `json:"user"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseVerifyPasswordResponse parses an HTTP response from a VerifyPasswordWithResponse call
|
|
func ParseVerifyPasswordResponse(rsp *http.Response) (*VerifyPasswordResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &VerifyPasswordResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Status *bool `json:"status,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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message string `json:"message"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
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 struct {
|
|
Message *string `json:"message,omitempty"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON500 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseListBackgroundJobsResponse parses an HTTP response from a ListBackgroundJobsWithResponse call
|
|
func ParseListBackgroundJobsResponse(rsp *http.Response) (*ListBackgroundJobsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListBackgroundJobsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest BackgroundJobPage
|
|
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 == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseCreateBackgroundJobResponse parses an HTTP response from a CreateBackgroundJobWithResponse call
|
|
func ParseCreateBackgroundJobResponse(rsp *http.Response) (*CreateBackgroundJobResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &CreateBackgroundJobResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
|
|
var dest BackgroundJob
|
|
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 == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetBackgroundJobResponse parses an HTTP response from a GetBackgroundJobWithResponse call
|
|
func ParseGetBackgroundJobResponse(rsp *http.Response) (*GetBackgroundJobResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetBackgroundJobResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest BackgroundJob
|
|
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 == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseRetryBackgroundJobResponse parses an HTTP response from a RetryBackgroundJobWithResponse call
|
|
func ParseRetryBackgroundJobResponse(rsp *http.Response) (*RetryBackgroundJobResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &RetryBackgroundJobResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
|
|
var dest BackgroundJob
|
|
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 == 404:
|
|
var dest Error
|
|
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 Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON409 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseCancelBackgroundJobResponse parses an HTTP response from a CancelBackgroundJobWithResponse call
|
|
func ParseCancelBackgroundJobResponse(rsp *http.Response) (*CancelBackgroundJobResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &CancelBackgroundJobResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest BackgroundJob
|
|
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 == 404:
|
|
var dest Error
|
|
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 Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON409 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseListDownloadersResponse parses an HTTP response from a ListDownloadersWithResponse call
|
|
func ParseListDownloadersResponse(rsp *http.Response) (*ListDownloadersResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListDownloadersResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest DownloaderList
|
|
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 == 401:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON401 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseCreateDownloaderResponse parses an HTTP response from a CreateDownloaderWithResponse call
|
|
func ParseCreateDownloaderResponse(rsp *http.Response) (*CreateDownloaderResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &CreateDownloaderResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
|
|
var dest struct {
|
|
Downloader Downloader `json:"downloader"`
|
|
Token string `json:"token"`
|
|
}
|
|
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 == 401:
|
|
var dest Error
|
|
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 == 402:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON402 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseRecordDownloaderHeartbeatResponse parses an HTTP response from a RecordDownloaderHeartbeatWithResponse call
|
|
func ParseRecordDownloaderHeartbeatResponse(rsp *http.Response) (*RecordDownloaderHeartbeatResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &RecordDownloaderHeartbeatResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest Downloader
|
|
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 == 401:
|
|
var dest Error
|
|
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 Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseDeleteDownloaderResponse parses an HTTP response from a DeleteDownloaderWithResponse call
|
|
func ParseDeleteDownloaderResponse(rsp *http.Response) (*DeleteDownloaderResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &DeleteDownloaderResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseUpdateDownloaderResponse parses an HTTP response from a UpdateDownloaderWithResponse call
|
|
func ParseUpdateDownloaderResponse(rsp *http.Response) (*UpdateDownloaderResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &UpdateDownloaderResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest Downloader
|
|
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 == 402:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON402 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseListDownloadTasksResponse parses an HTTP response from a ListDownloadTasksWithResponse call
|
|
func ParseListDownloadTasksResponse(rsp *http.Response) (*ListDownloadTasksResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListDownloadTasksResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest DownloadTaskPage
|
|
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 == 401:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON401 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseCreateDownloadTaskResponse parses an HTTP response from a CreateDownloadTaskWithResponse call
|
|
func ParseCreateDownloadTaskResponse(rsp *http.Response) (*CreateDownloadTaskResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &CreateDownloadTaskResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
|
|
var dest DownloadTask
|
|
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 == 401:
|
|
var dest Error
|
|
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 Error
|
|
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 Error
|
|
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 Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON409 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseDeleteDownloadTaskResponse parses an HTTP response from a DeleteDownloadTaskWithResponse call
|
|
func ParseDeleteDownloadTaskResponse(rsp *http.Response) (*DeleteDownloadTaskResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &DeleteDownloadTaskResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
var dest Error
|
|
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 Error
|
|
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 Error
|
|
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 Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON409 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetDownloadTaskResponse parses an HTTP response from a GetDownloadTaskWithResponse call
|
|
func ParseGetDownloadTaskResponse(rsp *http.Response) (*GetDownloadTaskResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetDownloadTaskResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest DownloadTask
|
|
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 == 401:
|
|
var dest Error
|
|
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 Error
|
|
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 Error
|
|
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 Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON409 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseUpdateDownloadTaskResponse parses an HTTP response from a UpdateDownloadTaskWithResponse call
|
|
func ParseUpdateDownloadTaskResponse(rsp *http.Response) (*UpdateDownloadTaskResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &UpdateDownloadTaskResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest DownloadTask
|
|
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 == 401:
|
|
var dest Error
|
|
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 Error
|
|
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 Error
|
|
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 Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON409 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseRetryDownloadTaskResponse parses an HTTP response from a RetryDownloadTaskWithResponse call
|
|
func ParseRetryDownloadTaskResponse(rsp *http.Response) (*RetryDownloadTaskResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &RetryDownloadTaskResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
|
|
var dest DownloadTask
|
|
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 == 401:
|
|
var dest Error
|
|
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 Error
|
|
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 Error
|
|
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 Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON409 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseSetDownloadTaskStatusResponse parses an HTTP response from a SetDownloadTaskStatusWithResponse call
|
|
func ParseSetDownloadTaskStatusResponse(rsp *http.Response) (*SetDownloadTaskStatusResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &SetDownloadTaskStatusResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest DownloadTask
|
|
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 == 401:
|
|
var dest Error
|
|
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 Error
|
|
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 Error
|
|
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 Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON409 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseStreamEventsResponse parses an HTTP response from a StreamEventsWithResponse call
|
|
func ParseStreamEventsResponse(rsp *http.Response) (*StreamEventsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &StreamEventsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON401 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseDeleteImageHostingConfigResponse parses an HTTP response from a DeleteImageHostingConfigWithResponse call
|
|
func ParseDeleteImageHostingConfigResponse(rsp *http.Response) (*DeleteImageHostingConfigResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &DeleteImageHostingConfigResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON401 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetImageHostingConfigResponse parses an HTTP response from a GetImageHostingConfigWithResponse call
|
|
func ParseGetImageHostingConfigResponse(rsp *http.Response) (*GetImageHostingConfigResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetImageHostingConfigResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest ImageHostingConfig
|
|
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 == 401:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON401 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseUpdateImageHostingConfigResponse parses an HTTP response from a UpdateImageHostingConfigWithResponse call
|
|
func ParseUpdateImageHostingConfigResponse(rsp *http.Response) (*UpdateImageHostingConfigResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &UpdateImageHostingConfigResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest ImageHostingConfig
|
|
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 Error
|
|
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 Error
|
|
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 == 409:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON409 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseListImageHostingsResponse parses an HTTP response from a ListImageHostingsWithResponse call
|
|
func ParseListImageHostingsResponse(rsp *http.Response) (*ListImageHostingsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListImageHostingsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest ImageHostingList
|
|
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 Error
|
|
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 == 403:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON403 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePresignImageHostingUploadResponse parses an HTTP response from a PresignImageHostingUploadWithResponse call
|
|
func ParsePresignImageHostingUploadResponse(rsp *http.Response) (*PresignImageHostingUploadResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PresignImageHostingUploadResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
|
|
var dest ImageHostingDraft
|
|
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 Error
|
|
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 == 403:
|
|
var dest Error
|
|
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 == 413:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON413 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON503 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseDeleteImageHostingResponse parses an HTTP response from a DeleteImageHostingWithResponse call
|
|
func ParseDeleteImageHostingResponse(rsp *http.Response) (*DeleteImageHostingResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &DeleteImageHostingResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest Error
|
|
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 == 403:
|
|
var dest Error
|
|
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 Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetImageHostingResponse parses an HTTP response from a GetImageHostingWithResponse call
|
|
func ParseGetImageHostingResponse(rsp *http.Response) (*GetImageHostingResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetImageHostingResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest ImageHosting
|
|
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 Error
|
|
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 == 403:
|
|
var dest Error
|
|
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 Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseConfirmImageHostingResponse parses an HTTP response from a ConfirmImageHostingWithResponse call
|
|
func ParseConfirmImageHostingResponse(rsp *http.Response) (*ConfirmImageHostingResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ConfirmImageHostingResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest ImageHosting
|
|
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 Error
|
|
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 == 403:
|
|
var dest Error
|
|
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 Error
|
|
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 == 422:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON422 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseListNotificationsResponse parses an HTTP response from a ListNotificationsWithResponse call
|
|
func ParseListNotificationsResponse(rsp *http.Response) (*ListNotificationsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListNotificationsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest NotificationPage
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseMarkAllNotificationsReadResponse parses an HTTP response from a MarkAllNotificationsReadWithResponse call
|
|
func ParseMarkAllNotificationsReadResponse(rsp *http.Response) (*MarkAllNotificationsReadResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &MarkAllNotificationsReadResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Count int `json:"count"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetNotificationStatsResponse parses an HTTP response from a GetNotificationStatsWithResponse call
|
|
func ParseGetNotificationStatsResponse(rsp *http.Response) (*GetNotificationStatsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetNotificationStatsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Count int `json:"count"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseMarkNotificationReadResponse parses an HTTP response from a MarkNotificationReadWithResponse call
|
|
func ParseMarkNotificationReadResponse(rsp *http.Response) (*MarkNotificationReadResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &MarkNotificationReadResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseListObjectsResponse parses an HTTP response from a ListObjectsWithResponse call
|
|
func ParseListObjectsResponse(rsp *http.Response) (*ListObjectsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListObjectsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest ObjectPage
|
|
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 Error
|
|
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 == 403:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON403 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseCreateObjectResponse parses an HTTP response from a CreateObjectWithResponse call
|
|
func ParseCreateObjectResponse(rsp *http.Response) (*CreateObjectResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &CreateObjectResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
|
|
var dest struct {
|
|
Alias string `json:"alias"`
|
|
CreatedAt string `json:"createdAt"`
|
|
Dirtype *int `json:"dirtype"`
|
|
Id string `json:"id"`
|
|
Name string `json:"name"`
|
|
Object string `json:"object"`
|
|
OrgId string `json:"orgId"`
|
|
Parent string `json:"parent"`
|
|
Size *int `json:"size"`
|
|
Status string `json:"status"`
|
|
StorageId string `json:"storageId"`
|
|
TrashedAt *int `json:"trashedAt"`
|
|
Type string `json:"type"`
|
|
UpdatedAt string `json:"updatedAt"`
|
|
Upload *struct {
|
|
PartSize int `json:"partSize"`
|
|
SessionId string `json:"sessionId"`
|
|
Urls []string `json:"urls"`
|
|
} `json:"upload,omitempty"`
|
|
}
|
|
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 Error
|
|
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 == 403:
|
|
var dest Error
|
|
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 Error
|
|
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 == 503:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON503 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseDeleteObjectResponse parses an HTTP response from a DeleteObjectWithResponse call
|
|
func ParseDeleteObjectResponse(rsp *http.Response) (*DeleteObjectResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &DeleteObjectResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest Error
|
|
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 == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetObjectResponse parses an HTTP response from a GetObjectWithResponse call
|
|
func ParseGetObjectResponse(rsp *http.Response) (*GetObjectResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetObjectResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Alias string `json:"alias"`
|
|
CreatedAt string `json:"createdAt"`
|
|
Dirtype *int `json:"dirtype"`
|
|
DownloadUrl *string `json:"downloadUrl,omitempty"`
|
|
Id string `json:"id"`
|
|
Name string `json:"name"`
|
|
Object string `json:"object"`
|
|
OrgId string `json:"orgId"`
|
|
Parent string `json:"parent"`
|
|
Size *int `json:"size"`
|
|
Status string `json:"status"`
|
|
StorageId string `json:"storageId"`
|
|
TrashedAt *int `json:"trashedAt"`
|
|
Type string `json:"type"`
|
|
UpdatedAt string `json:"updatedAt"`
|
|
}
|
|
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 Error
|
|
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 == 402:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON402 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
|
|
var dest Error
|
|
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 == 422:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON422 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseUpdateObjectResponse parses an HTTP response from a UpdateObjectWithResponse call
|
|
func ParseUpdateObjectResponse(rsp *http.Response) (*UpdateObjectResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &UpdateObjectResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest Matter
|
|
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 Error
|
|
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 == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseCopyObjectResponse parses an HTTP response from a CopyObjectWithResponse call
|
|
func ParseCopyObjectResponse(rsp *http.Response) (*CopyObjectResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &CopyObjectResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
|
|
var dest Matter
|
|
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 Error
|
|
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 == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseTransferObjectResponse parses an HTTP response from a TransferObjectWithResponse call
|
|
func ParseTransferObjectResponse(rsp *http.Response) (*TransferObjectResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &TransferObjectResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
|
|
var dest TransferResult
|
|
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 Error
|
|
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 == 403:
|
|
var dest Error
|
|
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 Error
|
|
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 == 422:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON422 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseAbortObjectUploadResponse parses an HTTP response from a AbortObjectUploadWithResponse call
|
|
func ParseAbortObjectUploadResponse(rsp *http.Response) (*AbortObjectUploadResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &AbortObjectUploadResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest Error
|
|
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 == 403:
|
|
var dest Error
|
|
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 Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseCompleteObjectUploadResponse parses an HTTP response from a CompleteObjectUploadWithResponse call
|
|
func ParseCompleteObjectUploadResponse(rsp *http.Response) (*CompleteObjectUploadResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &CompleteObjectUploadResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest Matter
|
|
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 Error
|
|
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 == 403:
|
|
var dest Error
|
|
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 Error
|
|
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 == 422:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON422 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 502:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON502 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePresignObjectUploadPartsResponse parses an HTTP response from a PresignObjectUploadPartsWithResponse call
|
|
func ParsePresignObjectUploadPartsResponse(rsp *http.Response) (*PresignObjectUploadPartsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PresignObjectUploadPartsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
PartSize int `json:"partSize"`
|
|
Parts []struct {
|
|
PartNumber int `json:"partNumber"`
|
|
Url string `json:"url"`
|
|
} `json:"parts"`
|
|
UploadId string `json:"uploadId"`
|
|
}
|
|
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 Error
|
|
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 == 403:
|
|
var dest Error
|
|
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 Error
|
|
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 == 502:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON502 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseListQuotaOverviewResponse parses an HTTP response from a ListQuotaOverviewWithResponse call
|
|
func ParseListQuotaOverviewResponse(rsp *http.Response) (*ListQuotaOverviewResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListQuotaOverviewResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest QuotaOverview
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetMyQuotaResponse parses an HTTP response from a GetMyQuotaWithResponse call
|
|
func ParseGetMyQuotaResponse(rsp *http.Response) (*GetMyQuotaResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetMyQuotaResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest EffectiveQuota
|
|
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 == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseListSharesResponse parses an HTTP response from a ListSharesWithResponse call
|
|
func ParseListSharesResponse(rsp *http.Response) (*ListSharesResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListSharesResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest ShareList
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseCreateShareResponse parses an HTTP response from a CreateShareWithResponse call
|
|
func ParseCreateShareResponse(rsp *http.Response) (*CreateShareResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &CreateShareResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
|
|
var dest CreatedShare
|
|
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 Error
|
|
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 == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetShareResponse parses an HTTP response from a GetShareWithResponse call
|
|
func ParseGetShareResponse(rsp *http.Response) (*GetShareResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetShareResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest ShareView
|
|
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 == 404:
|
|
var dest Error
|
|
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 == 410:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON410 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseListShareObjectsResponse parses an HTTP response from a ListShareObjectsWithResponse call
|
|
func ParseListShareObjectsResponse(rsp *http.Response) (*ListShareObjectsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListShareObjectsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest ShareObjects
|
|
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 Error
|
|
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 Error
|
|
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 Error
|
|
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 == 410:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON410 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseSaveShareResponse parses an HTTP response from a SaveShareWithResponse call
|
|
func ParseSaveShareResponse(rsp *http.Response) (*SaveShareResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &SaveShareResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
|
|
var dest SaveShareResult
|
|
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 Error
|
|
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 Error
|
|
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 Error
|
|
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 Error
|
|
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 == 410:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON410 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON422 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseVerifySharePasswordResponse parses an HTTP response from a VerifySharePasswordWithResponse call
|
|
func ParseVerifySharePasswordResponse(rsp *http.Response) (*VerifySharePasswordResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &VerifySharePasswordResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Ok VerifySharePassword200JSONResponseBodyOk `json:"ok"`
|
|
}
|
|
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 == 403:
|
|
var dest Error
|
|
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 Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseRevokeShareResponse parses an HTTP response from a RevokeShareWithResponse call
|
|
func ParseRevokeShareResponse(rsp *http.Response) (*RevokeShareResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &RevokeShareResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest ShareView
|
|
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 == 403:
|
|
var dest Error
|
|
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 Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseListAnnouncementsResponse parses an HTTP response from a ListAnnouncementsWithResponse call
|
|
func ParseListAnnouncementsResponse(rsp *http.Response) (*ListAnnouncementsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListAnnouncementsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest AnnouncementList
|
|
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 == 403:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON403 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseCreateAnnouncementResponse parses an HTTP response from a CreateAnnouncementWithResponse call
|
|
func ParseCreateAnnouncementResponse(rsp *http.Response) (*CreateAnnouncementResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &CreateAnnouncementResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
|
|
var dest Announcement
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON201 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseDeleteAnnouncementResponse parses an HTTP response from a DeleteAnnouncementWithResponse call
|
|
func ParseDeleteAnnouncementResponse(rsp *http.Response) (*DeleteAnnouncementResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &DeleteAnnouncementResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetAnnouncementResponse parses an HTTP response from a GetAnnouncementWithResponse call
|
|
func ParseGetAnnouncementResponse(rsp *http.Response) (*GetAnnouncementResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetAnnouncementResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest Announcement
|
|
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 == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseUpdateAnnouncementResponse parses an HTTP response from a UpdateAnnouncementWithResponse call
|
|
func ParseUpdateAnnouncementResponse(rsp *http.Response) (*UpdateAnnouncementResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &UpdateAnnouncementResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest Announcement
|
|
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 == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseListAuditEventsResponse parses an HTTP response from a ListAuditEventsWithResponse call
|
|
func ParseListAuditEventsResponse(rsp *http.Response) (*ListAuditEventsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListAuditEventsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest AuditEventPage
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseListAuthProvidersResponse parses an HTTP response from a ListAuthProvidersWithResponse call
|
|
func ParseListAuthProvidersResponse(rsp *http.Response) (*ListAuthProvidersResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListAuthProvidersResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest AuthProviderList
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseDeleteAuthProviderResponse parses an HTTP response from a DeleteAuthProviderWithResponse call
|
|
func ParseDeleteAuthProviderResponse(rsp *http.Response) (*DeleteAuthProviderResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &DeleteAuthProviderResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON400 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseUpsertAuthProviderResponse parses an HTTP response from a UpsertAuthProviderWithResponse call
|
|
func ParseUpsertAuthProviderResponse(rsp *http.Response) (*UpsertAuthProviderResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &UpsertAuthProviderResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest AuthProvider
|
|
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 Error
|
|
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 == 402:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON402 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetBrandingResponse parses an HTTP response from a GetBrandingWithResponse call
|
|
func ParseGetBrandingResponse(rsp *http.Response) (*GetBrandingResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetBrandingResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest BrandingConfig
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseUpdateBrandingResponse parses an HTTP response from a UpdateBrandingWithResponse call
|
|
func ParseUpdateBrandingResponse(rsp *http.Response) (*UpdateBrandingResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &UpdateBrandingResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest BrandingConfig
|
|
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 Error
|
|
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 == 413:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON413 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 415:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON415 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON422 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseResetBrandingFieldResponse parses an HTTP response from a ResetBrandingFieldWithResponse call
|
|
func ParseResetBrandingFieldResponse(rsp *http.Response) (*ResetBrandingFieldResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ResetBrandingFieldResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON400 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetChangelogResponse parses an HTTP response from a GetChangelogWithResponse call
|
|
func ParseGetChangelogResponse(rsp *http.Response) (*GetChangelogResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetChangelogResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest Changelog
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetEmailConfigResponse parses an HTTP response from a GetEmailConfigWithResponse call
|
|
func ParseGetEmailConfigResponse(rsp *http.Response) (*GetEmailConfigResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetEmailConfigResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest EmailSettings
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseSaveEmailConfigResponse parses an HTTP response from a SaveEmailConfigWithResponse call
|
|
func ParseSaveEmailConfigResponse(rsp *http.Response) (*SaveEmailConfigResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &SaveEmailConfigResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Success bool `json:"success"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseSendTestEmailResponse parses an HTTP response from a SendTestEmailWithResponse call
|
|
func ParseSendTestEmailResponse(rsp *http.Response) (*SendTestEmailResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &SendTestEmailResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Success bool `json:"success"`
|
|
}
|
|
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 Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON400 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetInstanceInfoResponse parses an HTTP response from a GetInstanceInfoWithResponse call
|
|
func ParseGetInstanceInfoResponse(rsp *http.Response) (*GetInstanceInfoResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetInstanceInfoResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest InstanceInfo
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseListSiteInvitationsResponse parses an HTTP response from a ListSiteInvitationsWithResponse call
|
|
func ParseListSiteInvitationsResponse(rsp *http.Response) (*ListSiteInvitationsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListSiteInvitationsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest SiteInvitationList
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseCreateSiteInvitationResponse parses an HTTP response from a CreateSiteInvitationWithResponse call
|
|
func ParseCreateSiteInvitationResponse(rsp *http.Response) (*CreateSiteInvitationResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &CreateSiteInvitationResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
|
|
var dest SiteInvitation
|
|
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 == 401:
|
|
var dest Error
|
|
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 == 409:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON409 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseRevokeSiteInvitationResponse parses an HTTP response from a RevokeSiteInvitationWithResponse call
|
|
func ParseRevokeSiteInvitationResponse(rsp *http.Response) (*RevokeSiteInvitationResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &RevokeSiteInvitationResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest Error
|
|
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 Error
|
|
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 Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseResendSiteInvitationResponse parses an HTTP response from a ResendSiteInvitationWithResponse call
|
|
func ParseResendSiteInvitationResponse(rsp *http.Response) (*ResendSiteInvitationResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ResendSiteInvitationResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest SiteInvitation
|
|
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 Error
|
|
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 == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetSiteInvitationResponse parses an HTTP response from a GetSiteInvitationWithResponse call
|
|
func ParseGetSiteInvitationResponse(rsp *http.Response) (*GetSiteInvitationResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetSiteInvitationResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest SiteInvitation
|
|
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 == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseListInviteCodesResponse parses an HTTP response from a ListInviteCodesWithResponse call
|
|
func ParseListInviteCodesResponse(rsp *http.Response) (*ListInviteCodesResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListInviteCodesResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest InviteCodeList
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGenerateInviteCodesResponse parses an HTTP response from a GenerateInviteCodesWithResponse call
|
|
func ParseGenerateInviteCodesResponse(rsp *http.Response) (*GenerateInviteCodesResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GenerateInviteCodesResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
|
|
var dest struct {
|
|
Codes []InviteCode `json:"codes"`
|
|
}
|
|
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 == 401:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON401 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseValidateInviteCodeResponse parses an HTTP response from a ValidateInviteCodeWithResponse call
|
|
func ParseValidateInviteCodeResponse(rsp *http.Response) (*ValidateInviteCodeResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ValidateInviteCodeResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Error *string `json:"error,omitempty"`
|
|
Valid bool `json:"valid"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseDeleteInviteCodeResponse parses an HTTP response from a DeleteInviteCodeWithResponse call
|
|
func ParseDeleteInviteCodeResponse(rsp *http.Response) (*DeleteInviteCodeResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &DeleteInviteCodeResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest Error
|
|
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 == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseUnbindLicenseResponse parses an HTTP response from a UnbindLicenseWithResponse call
|
|
func ParseUnbindLicenseResponse(rsp *http.Response) (*UnbindLicenseResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &UnbindLicenseResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 502:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON502 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseInitiateLicensePairingResponse parses an HTTP response from a InitiateLicensePairingWithResponse call
|
|
func ParseInitiateLicensePairingResponse(rsp *http.Response) (*InitiateLicensePairingResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &InitiateLicensePairingResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest LicensePairing
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePollLicensePairingResponse parses an HTTP response from a PollLicensePairingWithResponse call
|
|
func ParsePollLicensePairingResponse(rsp *http.Response) (*PollLicensePairingResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PollLicensePairingResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest LicensePairingStatus
|
|
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 == 502:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON502 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseRefreshLicenseResponse parses an HTTP response from a RefreshLicenseWithResponse call
|
|
func ParseRefreshLicenseResponse(rsp *http.Response) (*RefreshLicenseResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &RefreshLicenseResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
LastRefreshAt *int `json:"last_refresh_at"`
|
|
Success bool `json:"success"`
|
|
}
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetLicensingStatusResponse parses an HTTP response from a GetLicensingStatusWithResponse call
|
|
func ParseGetLicensingStatusResponse(rsp *http.Response) (*GetLicensingStatusResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetLicensingStatusResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest LicenseBindingState
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseListSystemOptionsResponse parses an HTTP response from a ListSystemOptionsWithResponse call
|
|
func ParseListSystemOptionsResponse(rsp *http.Response) (*ListSystemOptionsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListSystemOptionsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest SystemOptionList
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseDeleteSystemOptionResponse parses an HTTP response from a DeleteSystemOptionWithResponse call
|
|
func ParseDeleteSystemOptionResponse(rsp *http.Response) (*DeleteSystemOptionResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &DeleteSystemOptionResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetSystemOptionResponse parses an HTTP response from a GetSystemOptionWithResponse call
|
|
func ParseGetSystemOptionResponse(rsp *http.Response) (*GetSystemOptionResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetSystemOptionResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest SystemOption
|
|
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 == 403:
|
|
var dest Error
|
|
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 Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseSetSystemOptionResponse parses an HTTP response from a SetSystemOptionWithResponse call
|
|
func ParseSetSystemOptionResponse(rsp *http.Response) (*SetSystemOptionResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &SetSystemOptionResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest SystemOption
|
|
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 SystemOption
|
|
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 Error
|
|
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 == 402:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON402 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseListStoragesResponse parses an HTTP response from a ListStoragesWithResponse call
|
|
func ParseListStoragesResponse(rsp *http.Response) (*ListStoragesResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListStoragesResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest StorageList
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseCreateStorageResponse parses an HTTP response from a CreateStorageWithResponse call
|
|
func ParseCreateStorageResponse(rsp *http.Response) (*CreateStorageResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &CreateStorageResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
|
|
var dest Storage
|
|
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 == 402:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON402 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseDeleteStorageResponse parses an HTTP response from a DeleteStorageWithResponse call
|
|
func ParseDeleteStorageResponse(rsp *http.Response) (*DeleteStorageResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &DeleteStorageResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
|
|
var dest Error
|
|
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 Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON409 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetStorageResponse parses an HTTP response from a GetStorageWithResponse call
|
|
func ParseGetStorageResponse(rsp *http.Response) (*GetStorageResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetStorageResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest Storage
|
|
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 == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseUpdateStorageResponse parses an HTTP response from a UpdateStorageWithResponse call
|
|
func ParseUpdateStorageResponse(rsp *http.Response) (*UpdateStorageResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &UpdateStorageResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest Storage
|
|
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 == 402:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON402 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseCreateBillingPortalSessionResponse parses an HTTP response from a CreateBillingPortalSessionWithResponse call
|
|
func ParseCreateBillingPortalSessionResponse(rsp *http.Response) (*CreateBillingPortalSessionResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &CreateBillingPortalSessionResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest CloudStoreValue
|
|
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 Error
|
|
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 == 403:
|
|
var dest Error
|
|
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 == 502:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON502 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseCreateCheckoutResponse parses an HTTP response from a CreateCheckoutWithResponse call
|
|
func ParseCreateCheckoutResponse(rsp *http.Response) (*CreateCheckoutResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &CreateCheckoutResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest CloudStoreValue
|
|
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 Error
|
|
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 == 403:
|
|
var dest Error
|
|
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 Error
|
|
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 == 502:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON502 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetCreditBalanceResponse parses an HTTP response from a GetCreditBalanceWithResponse call
|
|
func ParseGetCreditBalanceResponse(rsp *http.Response) (*GetCreditBalanceResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetCreditBalanceResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest CloudStoreValue
|
|
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 Error
|
|
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 == 403:
|
|
var dest Error
|
|
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 == 502:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON502 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetCreditLedgerResponse parses an HTTP response from a GetCreditLedgerWithResponse call
|
|
func ParseGetCreditLedgerResponse(rsp *http.Response) (*GetCreditLedgerResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetCreditLedgerResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest CloudStoreValue
|
|
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 Error
|
|
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 == 403:
|
|
var dest Error
|
|
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 == 502:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON502 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseListCreditProductsResponse parses an HTTP response from a ListCreditProductsWithResponse call
|
|
func ParseListCreditProductsResponse(rsp *http.Response) (*ListCreditProductsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListCreditProductsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest CloudStoreValue
|
|
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 == 403:
|
|
var dest Error
|
|
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 == 502:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON502 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseRedeemGiftCardResponse parses an HTTP response from a RedeemGiftCardWithResponse call
|
|
func ParseRedeemGiftCardResponse(rsp *http.Response) (*RedeemGiftCardResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &RedeemGiftCardResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest CloudStoreValue
|
|
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 Error
|
|
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 == 403:
|
|
var dest Error
|
|
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 == 502:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON502 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetDiscountQuoteResponse parses an HTTP response from a GetDiscountQuoteWithResponse call
|
|
func ParseGetDiscountQuoteResponse(rsp *http.Response) (*GetDiscountQuoteResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetDiscountQuoteResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest CloudStoreValue
|
|
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 == 403:
|
|
var dest Error
|
|
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 == 502:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON502 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseListOrdersResponse parses an HTTP response from a ListOrdersWithResponse call
|
|
func ParseListOrdersResponse(rsp *http.Response) (*ListOrdersResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListOrdersResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest CloudStoreValue
|
|
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 Error
|
|
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 == 403:
|
|
var dest Error
|
|
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 == 502:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON502 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseContinueOrderPaymentResponse parses an HTTP response from a ContinueOrderPaymentWithResponse call
|
|
func ParseContinueOrderPaymentResponse(rsp *http.Response) (*ContinueOrderPaymentResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ContinueOrderPaymentResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest CloudStoreValue
|
|
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 Error
|
|
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 == 403:
|
|
var dest Error
|
|
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 Error
|
|
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 == 502:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON502 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseCancelOrderResponse parses an HTTP response from a CancelOrderWithResponse call
|
|
func ParseCancelOrderResponse(rsp *http.Response) (*CancelOrderResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &CancelOrderResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest CloudStoreValue
|
|
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 Error
|
|
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 == 403:
|
|
var dest Error
|
|
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 Error
|
|
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 == 502:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON502 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseListStorePackagesResponse parses an HTTP response from a ListStorePackagesWithResponse call
|
|
func ParseListStorePackagesResponse(rsp *http.Response) (*ListStorePackagesResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListStorePackagesResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest CloudStoreValue
|
|
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 == 403:
|
|
var dest Error
|
|
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 == 502:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON502 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseListStoreTargetsResponse parses an HTTP response from a ListStoreTargetsWithResponse call
|
|
func ParseListStoreTargetsResponse(rsp *http.Response) (*ListStoreTargetsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListStoreTargetsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest CloudStoreValue
|
|
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 == 403:
|
|
var dest Error
|
|
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 == 502:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON502 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseListTeamsResponse parses an HTTP response from a ListTeamsWithResponse call
|
|
func ParseListTeamsResponse(rsp *http.Response) (*ListTeamsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListTeamsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest TeamList
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetTeamInviteLinkResponse parses an HTTP response from a GetTeamInviteLinkWithResponse call
|
|
func ParseGetTeamInviteLinkResponse(rsp *http.Response) (*GetTeamInviteLinkResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetTeamInviteLinkResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest TeamInviteLinkInfo
|
|
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 == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetTeamResponse parses an HTTP response from a GetTeamWithResponse call
|
|
func ParseGetTeamResponse(rsp *http.Response) (*GetTeamResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetTeamResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest TeamSummary
|
|
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 == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseListTeamActivityResponse parses an HTTP response from a ListTeamActivityWithResponse call
|
|
func ParseListTeamActivityResponse(rsp *http.Response) (*ListTeamActivityResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListTeamActivityResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest ActivityPage
|
|
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 == 403:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON403 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseListTeamEntitlementsResponse parses an HTTP response from a ListTeamEntitlementsWithResponse call
|
|
func ParseListTeamEntitlementsResponse(rsp *http.Response) (*ListTeamEntitlementsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListTeamEntitlementsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest EntitlementList
|
|
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 Error
|
|
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 == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGrantTeamEntitlementResponse parses an HTTP response from a GrantTeamEntitlementWithResponse call
|
|
func ParseGrantTeamEntitlementResponse(rsp *http.Response) (*GrantTeamEntitlementResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GrantTeamEntitlementResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
|
|
var dest EntitlementResult
|
|
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 Error
|
|
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 == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseRevokeTeamEntitlementResponse parses an HTTP response from a RevokeTeamEntitlementWithResponse call
|
|
func ParseRevokeTeamEntitlementResponse(rsp *http.Response) (*RevokeTeamEntitlementResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &RevokeTeamEntitlementResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest Error
|
|
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 == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseUpdateTeamEntitlementResponse parses an HTTP response from a UpdateTeamEntitlementWithResponse call
|
|
func ParseUpdateTeamEntitlementResponse(rsp *http.Response) (*UpdateTeamEntitlementResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &UpdateTeamEntitlementResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest EntitlementResult
|
|
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 Error
|
|
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 == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseListTeamInvitationsResponse parses an HTTP response from a ListTeamInvitationsWithResponse call
|
|
func ParseListTeamInvitationsResponse(rsp *http.Response) (*ListTeamInvitationsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListTeamInvitationsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest TeamInvitationList
|
|
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 == 403:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON403 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseCreateTeamInviteLinkResponse parses an HTTP response from a CreateTeamInviteLinkWithResponse call
|
|
func ParseCreateTeamInviteLinkResponse(rsp *http.Response) (*CreateTeamInviteLinkResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &CreateTeamInviteLinkResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
|
|
var dest TeamInviteLinkCreated
|
|
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 == 403:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON403 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseDeleteTeamLogoResponse parses an HTTP response from a DeleteTeamLogoWithResponse call
|
|
func ParseDeleteTeamLogoResponse(rsp *http.Response) (*DeleteTeamLogoResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &DeleteTeamLogoResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON403 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseSetTeamLogoResponse parses an HTTP response from a SetTeamLogoWithResponse call
|
|
func ParseSetTeamLogoResponse(rsp *http.Response) (*SetTeamLogoResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &SetTeamLogoResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Url string `json:"url"`
|
|
}
|
|
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 Error
|
|
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 == 403:
|
|
var dest Error
|
|
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 == 413:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON413 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 415:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON415 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON503 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseJoinTeamResponse parses an HTTP response from a JoinTeamWithResponse call
|
|
func ParseJoinTeamResponse(rsp *http.Response) (*JoinTeamResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &JoinTeamResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Ok JoinTeam200JSONResponseBodyOk `json:"ok"`
|
|
}
|
|
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 == 404:
|
|
var dest Error
|
|
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 Error
|
|
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 == 410:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON410 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseListTrashObjectsResponse parses an HTTP response from a ListTrashObjectsWithResponse call
|
|
func ParseListTrashObjectsResponse(rsp *http.Response) (*ListTrashObjectsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListTrashObjectsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest TrashObjectPage
|
|
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 Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON400 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParsePurgeTrashObjectResponse parses an HTTP response from a PurgeTrashObjectWithResponse call
|
|
func ParsePurgeTrashObjectResponse(rsp *http.Response) (*PurgeTrashObjectResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &PurgeTrashObjectResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest Error
|
|
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 == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetTrashObjectResponse parses an HTTP response from a GetTrashObjectWithResponse call
|
|
func ParseGetTrashObjectResponse(rsp *http.Response) (*GetTrashObjectResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetTrashObjectResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest TrashObject
|
|
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 Error
|
|
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 == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseRestoreObjectResponse parses an HTTP response from a RestoreObjectWithResponse call
|
|
func ParseRestoreObjectResponse(rsp *http.Response) (*RestoreObjectResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &RestoreObjectResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest TrashObject
|
|
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 Error
|
|
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 == 404:
|
|
var dest Error
|
|
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 Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON409 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseDeleteMyAvatarResponse parses an HTTP response from a DeleteMyAvatarWithResponse call
|
|
func ParseDeleteMyAvatarResponse(rsp *http.Response) (*DeleteMyAvatarResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &DeleteMyAvatarResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseSetMyAvatarResponse parses an HTTP response from a SetMyAvatarWithResponse call
|
|
func ParseSetMyAvatarResponse(rsp *http.Response) (*SetMyAvatarResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &SetMyAvatarResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Url string `json:"url"`
|
|
}
|
|
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 Error
|
|
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 == 413:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON413 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 415:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON415 = &dest
|
|
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON503 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseListUserEntitlementsResponse parses an HTTP response from a ListUserEntitlementsWithResponse call
|
|
func ParseListUserEntitlementsResponse(rsp *http.Response) (*ListUserEntitlementsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListUserEntitlementsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest EntitlementList
|
|
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 Error
|
|
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 == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGrantUserEntitlementResponse parses an HTTP response from a GrantUserEntitlementWithResponse call
|
|
func ParseGrantUserEntitlementResponse(rsp *http.Response) (*GrantUserEntitlementResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GrantUserEntitlementResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
|
|
var dest EntitlementResult
|
|
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 Error
|
|
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 == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseRevokeUserEntitlementResponse parses an HTTP response from a RevokeUserEntitlementWithResponse call
|
|
func ParseRevokeUserEntitlementResponse(rsp *http.Response) (*RevokeUserEntitlementResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &RevokeUserEntitlementResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
|
var dest Error
|
|
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 == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseUpdateUserEntitlementResponse parses an HTTP response from a UpdateUserEntitlementWithResponse call
|
|
func ParseUpdateUserEntitlementResponse(rsp *http.Response) (*UpdateUserEntitlementResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &UpdateUserEntitlementResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest EntitlementResult
|
|
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 Error
|
|
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 == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetUserQuotaResponse parses an HTTP response from a GetUserQuotaWithResponse call
|
|
func ParseGetUserQuotaResponse(rsp *http.Response) (*GetUserQuotaResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetUserQuotaResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest AdminUserQuota
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON200 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseGetUserProfileResponse parses an HTTP response from a GetUserProfileWithResponse call
|
|
func ParseGetUserProfileResponse(rsp *http.Response) (*GetUserProfileResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &GetUserProfileResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest PublicProfile
|
|
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 == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|
|
|
|
// ParseListUserObjectsResponse parses an HTTP response from a ListUserObjectsWithResponse call
|
|
func ParseListUserObjectsResponse(rsp *http.Response) (*ListUserObjectsResponse, error) {
|
|
bodyBytes, err := io.ReadAll(rsp.Body)
|
|
defer func() { _ = rsp.Body.Close() }()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
response := &ListUserObjectsResponse{
|
|
Body: bodyBytes,
|
|
HTTPResponse: rsp,
|
|
}
|
|
|
|
switch {
|
|
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
|
var dest struct {
|
|
Breadcrumb []*interface{} `json:"breadcrumb"`
|
|
Items []*interface{} `json:"items"`
|
|
}
|
|
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 == 404:
|
|
var dest Error
|
|
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
|
return nil, err
|
|
}
|
|
response.JSON404 = &dest
|
|
|
|
}
|
|
|
|
return response, nil
|
|
}
|