From 81276a8899815d86bf6575f1454ae2c6526cb721 Mon Sep 17 00:00:00 2001 From: D1-3105 Date: Fri, 4 Sep 2026 01:49:09 +0000 Subject: [PATCH] PR 326 has made the CLI incompatible with serverless --- api/serverless/openapi.yaml | 265 +- internal/api/serverless/client_test.go | 3 +- internal/api/serverless/gen/client.gen.go | 3636 +++++++++++---------- internal/api/serverless/sourceuploads.go | 12 +- internal/cmd/serverless/deploy.go | 5 +- internal/cmd/serverless/upload.go | 22 +- internal/cmd/serverless/upload_test.go | 26 +- 7 files changed, 2189 insertions(+), 1780 deletions(-) diff --git a/api/serverless/openapi.yaml b/api/serverless/openapi.yaml index 88bc827..1dd182f 100644 --- a/api/serverless/openapi.yaml +++ b/api/serverless/openapi.yaml @@ -34,7 +34,9 @@ tags: - name: Apps description: Manage apps and their lifecycle - name: SourceUploads - description: Stage source archives for future app create and update integration + description: > + Stage a source archive, then read the immutable source a completed upload + publishes for app create and update - name: Builds description: Immutable builds - name: Versions @@ -386,7 +388,12 @@ paths: `202` can carry a task that has already finished: read its `status` instead of assuming `pending`, and note it may name a different `appId`. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and - `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. + `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. An + organisation whose serverless tenancy is revoked, or has no tenancy receipt + at all, returns `403 Forbidden`, distinguishing that from an app that does + not exist. An organisation whose tenancy is still being provisioned + returns `503 Service Unavailable` instead — that state is retryable, not a + revocation, and clears once provisioning finishes. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it @@ -434,7 +441,12 @@ paths: `GET /v1/apps/{appId}/tasks/{taskId}` for its result. A request the platform cannot attribute to an accepted task fails instead, with no task to poll. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and - `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. Endpoint + `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. An + organisation whose serverless tenancy is revoked, or has no tenancy receipt + at all, returns `403 Forbidden`, distinguishing that from an app that does + not exist. An organisation whose tenancy is still being provisioned + returns `503 Service Unavailable` instead — that state is retryable, not a + revocation, and clears once provisioning finishes. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it @@ -838,21 +850,21 @@ paths: '404': $ref: '#/components/responses/NotFound' - /v1/apps/{appId}/source-uploads: + /v1/source-uploads: post: tags: - SourceUploads summary: Create a source upload description: > - Creates an upload session for source intended for `appId`. The app does not need - to exist yet. The response contains a short-lived transfer instruction for one - exact staging object. Repeating the request with the same idempotency key and - declaration while the session is pending and unexpired returns the same upload - resource with a refreshed transfer instruction. Replays with a different declaration - or after the session becomes ready, rejected, consumed, expired, or deleted return `409`. + Creates an upload session for a source archive. The session belongs to the + authenticated organization and names no app: an upload precedes any app, and the + source it publishes may back several. The response contains a short-lived transfer + instruction for one exact staging object. Repeating the request with the same + idempotency key and declaration while the session is pending and unexpired returns + the same upload resource with a refreshed transfer instruction. Replays with a + different declaration, or after the session becomes ready, rejected, expired, or + deleted, return `409`. operationId: createSourceUpload - parameters: - - $ref: '#/components/parameters/AppId' requestBody: required: true content: @@ -881,17 +893,17 @@ paths: '503': $ref: '#/components/responses/ServiceUnavailable' - /v1/apps/{appId}/source-uploads/{uploadId}: + /v1/source-uploads/{uploadId}: get: tags: - SourceUploads summary: Get a source upload description: > - Returns the upload session belonging to the authenticated organization and - `appId`. An upload belonging to another organization or app returns `404`. + Returns the upload session belonging to the authenticated organization. Once the + upload is `ready` the session carries the `sourceId` it published. An upload + belonging to another organization returns `404`. operationId: getSourceUpload parameters: - - $ref: '#/components/parameters/AppId' - $ref: '#/components/parameters/SourceUploadId' responses: '200': @@ -917,12 +929,13 @@ paths: - SourceUploads summary: Abort a source upload description: > - Aborts an unconsumed upload and removes its staging object. The session remains as - a deleted tombstone so its object key cannot be reused. Repeating a successful - abort is idempotent. + Aborts an upload that has not published its source and removes its staging object. + The session remains as a deleted tombstone so its staging key cannot be reused. + Repeating a successful abort is idempotent. A `ready` upload cannot be aborted: the + source it published is a resource in its own right, and the request answers `409` + with type `source-upload-completed`. operationId: deleteSourceUpload parameters: - - $ref: '#/components/parameters/AppId' - $ref: '#/components/parameters/SourceUploadId' responses: '204': @@ -944,18 +957,20 @@ paths: '503': $ref: '#/components/responses/ServiceUnavailable' - /v1/apps/{appId}/source-uploads/{uploadId}/complete: + /v1/source-uploads/{uploadId}/complete: post: tags: - SourceUploads summary: Complete a source upload description: > Verifies the staging object's length, content type, and SHA-256 digest against the - session declaration. A successful retry returns the existing ready resource. A - rejected upload keeps its rejection so later retries return the same result. + session declaration, applies the archive rules for the source type, and publishes + the verified bytes as an immutable source artifact. The first success creates the + source and returns the ready session carrying its `sourceId`; a retry returns the + same session and the same `sourceId`. A rejected upload keeps its rejection so later + retries return the same result. operationId: completeSourceUpload parameters: - - $ref: '#/components/parameters/AppId' - $ref: '#/components/parameters/SourceUploadId' responses: '200': @@ -981,6 +996,39 @@ paths: '503': $ref: '#/components/responses/ServiceUnavailable' + /v1/sources/{sourceId}: + get: + tags: + - SourceUploads + summary: Get a source + description: > + Returns the immutable source artifact a completed upload published: its type and + the length and digest upload completion verified. A source is organization-scoped + and may be named by any number of apps and versions in that organization; one + belonging to another organization returns `404`. There is no list and no delete. + operationId: getSource + parameters: + - $ref: '#/components/parameters/SourceId' + responses: + '200': + description: Source + content: + application/json: + schema: + $ref: '#/components/schemas/Source' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + '422': + $ref: '#/components/responses/ValidationError' + '503': + $ref: '#/components/responses/ServiceUnavailable' + /v1/apps/{appId}/deploy: post: tags: @@ -1233,6 +1281,8 @@ paths: $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' + '400': + $ref: '#/components/responses/BadRequest' /v1/apps/{appId}/builds/{buildId}: get: @@ -1263,6 +1313,8 @@ paths: $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' + '400': + $ref: '#/components/responses/BadRequest' delete: tags: - Builds @@ -1342,6 +1394,8 @@ paths: $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' + '400': + $ref: '#/components/responses/BadRequest' /v1/apps/{appId}/versions/{versionNumber}: get: @@ -1372,6 +1426,8 @@ paths: $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' + '400': + $ref: '#/components/responses/BadRequest' delete: tags: - Versions @@ -1406,6 +1462,8 @@ paths: $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/Conflict' + '400': + $ref: '#/components/responses/BadRequest' # --------------------------------------------------------------------------- # Endpoints @@ -1752,16 +1810,28 @@ paths: organisation UUID, a Kubernetes service account `org-` in the shared app namespace, and a decrypt IAM binding on that key for the KSA principal. `state: disabled` runs teardown: disable the key's - primary version, drop the decrypt binding, delete the KSA. The key - itself is not destroyed — a destroyed key makes every ciphertext - under it permanently unreadable. The local row stays as a tombstone - so a later Ensure converges on the same names. + primary version, drop the decrypt binding, delete the KSA. It then + stops the organisation's estate: every deployment that is `active` + moves to `stopping` and has its drain enqueued, and that stop is one + database transaction — the `200` is returned only once it has + committed, so it guarantees every deployment that was active is on + its way to `stopped`. The key itself is not destroyed — a destroyed + key makes every ciphertext under it permanently unreadable. The + local row stays as a tombstone so a later Ensure converges on the + same names; a later Ensure does not resume the deployments this + disable stopped — restoring the organisation's IAM is not the same + decision as restarting its workload, and this route does not conflate + them. A stopped deployment stays stopped until its own resume call, + the same as one the customer stopped directly. A retry after a partial failure converges rather than duplicating objects. `200` returns the resulting receipt. `503` when Cloud KMS - key-admin is rate-limited (60 writes/min) or otherwise unavailable; - the caller (admin-api Messenger) retries the same PUT. + key-admin is rate-limited (60 writes/min) or otherwise unavailable, + or when the tenancy was disabled but the deployment stop could not + be committed — the tenancy row is already `disabled` in that case, + and the same PUT retried stops whatever is still active; the caller + (admin-api Messenger) retries the same PUT either way. operationId: upsertOrgTenancy requestBody: required: true @@ -1936,6 +2006,8 @@ paths: $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' + '400': + $ref: '#/components/responses/BadRequest' /v1/apps/{appId}/environment-variables/{variableName}: put: @@ -2056,6 +2128,8 @@ paths: $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' + '400': + $ref: '#/components/responses/BadRequest' /v1/usage: get: @@ -2301,6 +2375,13 @@ components: Immutable app identifier, unique among the authenticated organisation's live apps. schema: $ref: '#/components/schemas/AppId' + SourceId: + name: sourceId + in: path + required: true + description: Source artifact identifier. + schema: + $ref: '#/components/schemas/SourceId' SourceUploadId: name: uploadId in: path @@ -2588,6 +2669,10 @@ components: type: string format: uuid + SourceId: + type: string + format: uuid + AppSourceType: type: string enum: [code, container] @@ -2597,12 +2682,11 @@ components: SourceUploadState: type: string - enum: [pending, ready, rejected, consumed, expired, deleted] + enum: [pending, ready, rejected, expired, deleted] x-enum-varnames: - SourceUploadStatePending - SourceUploadStateReady - SourceUploadStateRejected - - SourceUploadStateConsumed - SourceUploadStateExpired - SourceUploadStateDeleted @@ -2633,29 +2717,12 @@ components: description: Lowercase SHA-256 digest of the complete archive. sourceType: $ref: '#/components/schemas/AppSourceType' - modelFile: - type: string - minLength: 1 - maxLength: 512 - pattern: '^[^/\\\s]\S*$' - description: > - Path of the MLflow model entry point inside the archive, relative to its root - (e.g. `model.py`). Required for a `code` upload and refused for a `container` - one, whose required files the contract names rather than the client. - - - It is declared here rather than at app creation because upload completion is - the last thing that opens the archive: `POST /v1/apps` consumes a ready upload - and never reads the object, so an entry point named there could only be proved - against the archive by reading it a second time. The pattern refuses a leading - separator; a path that escapes the archive root is refused by completion. SourceUpload: type: object additionalProperties: false required: - id - - appId - declaredByteLength - sha256 - sourceType @@ -2666,8 +2733,15 @@ components: properties: id: $ref: '#/components/schemas/SourceUploadId' - appId: - $ref: '#/components/schemas/AppId' + sourceId: + type: string + allOf: + - $ref: '#/components/schemas/SourceId' + nullable: true + description: > + The immutable source this upload published. Set once the upload is `ready`; it + is what app create and source update name. Equal to `id`, so a retry of + completion returns the same value. declaredByteLength: type: integer format: int64 @@ -2747,6 +2821,37 @@ components: transfer: $ref: '#/components/schemas/SourceUploadTransfer' + Source: + type: object + additionalProperties: false + description: > + An immutable source artifact: the archive a completed upload published, with the + facts upload completion verified it under. It names no app, version, or entry point, + so any number of versions across the organization's apps may reference it. + required: + - id + - sourceType + - byteLength + - sha256 + - createdAt + properties: + id: + $ref: '#/components/schemas/SourceId' + sourceType: + $ref: '#/components/schemas/AppSourceType' + byteLength: + type: integer + format: int64 + minimum: 1 + description: Verified length of the archive in bytes. + sha256: + type: string + pattern: '^[a-f0-9]{64}$' + description: Verified lowercase SHA-256 digest of the archive. + createdAt: + type: string + format: date-time + EndpointPath: type: string description: > @@ -4157,24 +4262,17 @@ components: ContainerSource: type: object - # Rejects the retired zipBase64 (and any other stray field) at the edge: - # without this, a payload carrying both a valid uploadId and the old - # inline archive would still be accepted. additionalProperties: false required: - - uploadId + - sourceId properties: - uploadId: + sourceId: allOf: - - $ref: '#/components/schemas/SourceUploadId' - # The pattern is what the request validator enforces on the body: - # kin-openapi treats `format` as advisory, so without it a non-uuid - # uploadId would pass the edge and fail deeper with a worse error. - # On the body only — a malformed *path* id stays the parse-time 400. + - $ref: '#/components/schemas/SourceId' pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$' description: > - Id of a ready, unexpired source upload created for this app via - `POST /v1/apps/{appId}/source-uploads` and completed. The archive + Id of a source published by a completed upload in this organization + (`POST /v1/source-uploads`, then `complete`). The archive it names carries a wrapper `Dockerfile` and a `container.yaml` config document at its root, plus any build-context files the Dockerfile copies in. Runware builds the image from it — resolving @@ -4185,34 +4283,37 @@ components: create — `400` where the document could not be parsed, `422` where it parsed and broke a rule — with `errors[]` entries carrying `configPointer` into the document; the endpoint set it declares - becomes visible once the first build is ready and deployed. The - operation consumes the upload atomically with the version it - creates (version 1 on create, the next version on a source - update); a consumed upload cannot back a second app or version. + becomes visible once the first build is ready and deployed. A source + is immutable and reusable: the same `sourceId` may back any number of + apps and versions in the organization. CodebaseSource: type: object - # Same edge rejection of the retired zipBase64 (and modelFile, which now - # lives on the upload declaration) as ContainerSource. additionalProperties: false required: - - uploadId + - sourceId + - modelFile properties: - uploadId: + sourceId: allOf: - - $ref: '#/components/schemas/SourceUploadId' - # Same edge enforcement as the container source's uploadId: `format` - # alone is advisory to the request validator. + - $ref: '#/components/schemas/SourceId' pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$' description: > - Id of a ready, unexpired source upload created for this app via - `POST /v1/apps/{appId}/source-uploads` and completed. The archive - it names is the zip of the customer's code, and the upload's own - declaration carries the model entry point (`modelFile`), verified - against the archive at completion — it is not repeated here. The - operation consumes the upload atomically with the version it - creates (version 1 on create, the next version on a source - update); a consumed upload cannot back a second app or version. + Id of a source published by a completed upload in this organization + (`POST /v1/source-uploads`, then `complete`). The archive it names is the + zip of the customer's code. A source is immutable and reusable: the same + `sourceId` may back any number of apps and versions, each choosing its own + `modelFile`. + modelFile: + type: string + minLength: 1 + maxLength: 512 + pattern: '^[^/\\\s]\S*$' + description: > + Path of the MLflow model entry point inside the archive, relative to its root + (e.g. `model.py`). Version execution configuration rather than archive + identity, so two apps may run one source with different entry points. The + build proves the file is in the archive and answers `422` when it is not. AppSourceUpsert: type: object diff --git a/internal/api/serverless/client_test.go b/internal/api/serverless/client_test.go index 536d9d8..9dfa639 100644 --- a/internal/api/serverless/client_test.go +++ b/internal/api/serverless/client_test.go @@ -165,7 +165,8 @@ func TestCreateApp(t *testing.T) { source, err := NewCodeAppSource(CodeSourceUpsert{ BaseImage: "python:3.11-slim", Codebase: CodebaseSource{ - UploadId: uuid.MustParse("019c7654-8b21-7abc-9123-abcdef123456"), + SourceId: uuid.MustParse("019c7654-8b21-7abc-9123-abcdef123456"), + ModelFile: "model.py", }, }) if err != nil { diff --git a/internal/api/serverless/gen/client.gen.go b/internal/api/serverless/gen/client.gen.go index d755b80..cfe4c7f 100644 --- a/internal/api/serverless/gen/client.gen.go +++ b/internal/api/serverless/gen/client.gen.go @@ -303,7 +303,6 @@ func (e SourceUploadSinglePutTransferMode) Valid() bool { // Defines values for SourceUploadState. const ( - SourceUploadStateConsumed SourceUploadState = "consumed" SourceUploadStateDeleted SourceUploadState = "deleted" SourceUploadStateExpired SourceUploadState = "expired" SourceUploadStatePending SourceUploadState = "pending" @@ -314,8 +313,6 @@ const ( // Valid indicates whether the value is a known member of the SourceUploadState enum. func (e SourceUploadState) Valid() bool { switch e { - case SourceUploadStateConsumed: - return true case SourceUploadStateDeleted: return true case SourceUploadStateExpired: @@ -867,8 +864,11 @@ type CodeSourceUpsert struct { // CodebaseSource defines model for CodebaseSource. type CodebaseSource struct { - // UploadId Id of a ready, unexpired source upload created for this app via `POST /v1/apps/{appId}/source-uploads` and completed. The archive it names is the zip of the customer's code, and the upload's own declaration carries the model entry point (`modelFile`), verified against the archive at completion — it is not repeated here. The operation consumes the upload atomically with the version it creates (version 1 on create, the next version on a source update); a consumed upload cannot back a second app or version. - UploadId SourceUploadId `json:"uploadId"` + // ModelFile Path of the MLflow model entry point inside the archive, relative to its root (e.g. `model.py`). Version execution configuration rather than archive identity, so two apps may run one source with different entry points. The build proves the file is in the archive and answers `422` when it is not. + ModelFile string `json:"modelFile"` + + // SourceId Id of a source published by a completed upload in this organization (`POST /v1/source-uploads`, then `complete`). The archive it names is the zip of the customer's code. A source is immutable and reusable: the same `sourceId` may back any number of apps and versions, each choosing its own `modelFile`. + SourceId SourceId `json:"sourceId"` } // ComputeType Worker compute class. GPU is the only supported value. CPU workloads are not supported. @@ -876,8 +876,8 @@ type ComputeType string // ContainerSource defines model for ContainerSource. type ContainerSource struct { - // UploadId Id of a ready, unexpired source upload created for this app via `POST /v1/apps/{appId}/source-uploads` and completed. The archive it names carries a wrapper `Dockerfile` and a `container.yaml` config document at its root, plus any build-context files the Dockerfile copies in. Runware builds the image from it — resolving the Dockerfile's public base images to immutable digests — and hosts the result, so no image reference or pull credential is supplied: a private base image is not supported until a build-time credential mechanism exists. An invalid `container.yaml` rejects the create — `400` where the document could not be parsed, `422` where it parsed and broke a rule — with `errors[]` entries carrying `configPointer` into the document; the endpoint set it declares becomes visible once the first build is ready and deployed. The operation consumes the upload atomically with the version it creates (version 1 on create, the next version on a source update); a consumed upload cannot back a second app or version. - UploadId SourceUploadId `json:"uploadId"` + // SourceId Id of a source published by a completed upload in this organization (`POST /v1/source-uploads`, then `complete`). The archive it names carries a wrapper `Dockerfile` and a `container.yaml` config document at its root, plus any build-context files the Dockerfile copies in. Runware builds the image from it — resolving the Dockerfile's public base images to immutable digests — and hosts the result, so no image reference or pull credential is supplied: a private base image is not supported until a build-time credential mechanism exists. An invalid `container.yaml` rejects the create — `400` where the document could not be parsed, `422` where it parsed and broke a rule — with `errors[]` entries carrying `configPointer` into the document; the endpoint set it declares becomes visible once the first build is ready and deployed. A source is immutable and reusable: the same `sourceId` may back any number of apps and versions in the organization. + SourceId SourceId `json:"sourceId"` } // Currency ISO 4217 alphabetic code. The platform bills in USD only. @@ -1294,21 +1294,37 @@ type SecretUpdate struct { Value string `json:"value"` } +// Source An immutable source artifact: the archive a completed upload published, with the facts upload completion verified it under. It names no app, version, or entry point, so any number of versions across the organization's apps may reference it. +type Source struct { + // ByteLength Verified length of the archive in bytes. + ByteLength int64 `json:"byteLength"` + CreatedAt time.Time `json:"createdAt"` + Id SourceId `json:"id"` + + // Sha256 Verified lowercase SHA-256 digest of the archive. + Sha256 string `json:"sha256"` + SourceType AppSourceType `json:"sourceType"` +} + +// SourceId defines model for SourceId. +type SourceId = openapi_types.UUID + // SourceUpload defines model for SourceUpload. type SourceUpload struct { - // AppId Immutable app identifier. Unique among the authenticated organisation's live apps: it cannot be changed after creation, and it becomes available again once the app it named reaches `deleted`. - AppId AppId `json:"appId"` CreatedAt time.Time `json:"createdAt"` DeclaredByteLength int64 `json:"declaredByteLength"` ExpiresAt time.Time `json:"expiresAt"` Id SourceUploadId `json:"id"` // RejectionReason Reason completion rejected the archive, when state is `rejected`. - RejectionReason *string `json:"rejectionReason,omitempty"` - Sha256 string `json:"sha256"` - SourceType AppSourceType `json:"sourceType"` - State SourceUploadState `json:"state"` - UpdatedAt time.Time `json:"updatedAt"` + RejectionReason *string `json:"rejectionReason,omitempty"` + Sha256 string `json:"sha256"` + + // SourceId The immutable source this upload published. Set once the upload is `ready`; it is what app create and source update name. Equal to `id`, so a retry of completion returns the same value. + SourceId *SourceId `json:"sourceId,omitempty"` + SourceType AppSourceType `json:"sourceType"` + State SourceUploadState `json:"state"` + UpdatedAt time.Time `json:"updatedAt"` } // SourceUploadCreate defines model for SourceUploadCreate. @@ -1319,11 +1335,6 @@ type SourceUploadCreate struct { // IdempotencyKey Client-generated key used to make session creation safe to retry. IdempotencyKey string `json:"idempotencyKey"` - // ModelFile Path of the MLflow model entry point inside the archive, relative to its root (e.g. `model.py`). Required for a `code` upload and refused for a `container` one, whose required files the contract names rather than the client. - // - // It is declared here rather than at app creation because upload completion is the last thing that opens the archive: `POST /v1/apps` consumes a ready upload and never reads the object, so an entry point named there could only be proved against the archive by reading it a second time. The pattern refuses a leading separator; a path that escapes the archive root is refused by completion. - ModelFile *string `json:"modelFile,omitempty"` - // Sha256 Lowercase SHA-256 digest of the complete archive. Sha256 string `json:"sha256"` SourceType AppSourceType `json:"sourceType"` @@ -1910,9 +1921,6 @@ type StartSyncTaskJSONRequestBody = TaskInvocation // AttachAppSecretJSONRequestBody defines body for AttachAppSecret for application/json ContentType. type AttachAppSecretJSONRequestBody = SecretAttach -// CreateSourceUploadJSONRequestBody defines body for CreateSourceUpload for application/json ContentType. -type CreateSourceUploadJSONRequestBody = SourceUploadCreate - // CreateGpuTypeJSONRequestBody defines body for CreateGpuType for application/json ContentType. type CreateGpuTypeJSONRequestBody = GpuTypeCreate @@ -1934,6 +1942,9 @@ type CreateSecretJSONRequestBody = SecretCreate // UpdateSecretJSONRequestBody defines body for UpdateSecret for application/json ContentType. type UpdateSecretJSONRequestBody = SecretUpdate +// CreateSourceUploadJSONRequestBody defines body for CreateSourceUpload for application/json ContentType. +type CreateSourceUploadJSONRequestBody = SourceUploadCreate + // AsCodeSourceUpsert returns the union data inside the AppSourceUpsert_Source as a CodeSourceUpsert func (t AppSourceUpsert_Source) AsCodeSourceUpsert() (CodeSourceUpsert, error) { var body CodeSourceUpsert @@ -2361,7 +2372,7 @@ type ClientInterface interface { // StartAsyncTaskWithBody Start a new async task // - // Starts a new async task on `appId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/apps/{appId}/tasks/{taskId}` for completion. Resubmitting a task id is answered with the task it already names rather than starting a second one, so the `202` can carry a task that has already finished: read its `status` instead of assuming `pending`, and note it may name a different `appId`. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. + // Starts a new async task on `appId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/apps/{appId}/tasks/{taskId}` for completion. Resubmitting a task id is answered with the task it already names rather than starting a second one, so the `202` can carry a task that has already finished: read its `status` instead of assuming `pending`, and note it may name a different `appId`. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. An organisation whose serverless tenancy is revoked, or has no tenancy receipt at all, returns `403 Forbidden`, distinguishing that from an app that does not exist. An organisation whose tenancy is still being provisioned returns `503 Service Unavailable` instead — that state is retryable, not a revocation, and clears once provisioning finishes. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. // // Takes any type of body and a specified content type. // @@ -2370,7 +2381,7 @@ type ClientInterface interface { // StartAsyncTask Start a new async task // - // Starts a new async task on `appId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/apps/{appId}/tasks/{taskId}` for completion. Resubmitting a task id is answered with the task it already names rather than starting a second one, so the `202` can carry a task that has already finished: read its `status` instead of assuming `pending`, and note it may name a different `appId`. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. + // Starts a new async task on `appId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/apps/{appId}/tasks/{taskId}` for completion. Resubmitting a task id is answered with the task it already names rather than starting a second one, so the `202` can carry a task that has already finished: read its `status` instead of assuming `pending`, and note it may name a different `appId`. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. An organisation whose serverless tenancy is revoked, or has no tenancy receipt at all, returns `403 Forbidden`, distinguishing that from an app that does not exist. An organisation whose tenancy is still being provisioned returns `503 Service Unavailable` instead — that state is retryable, not a revocation, and clears once provisioning finishes. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. // // Takes a body of the `application/json` content type. // @@ -2379,7 +2390,7 @@ type ClientInterface interface { // StartSyncTaskWithBody Start a new sync task // - // Starts a new sync task on `appId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`). Resubmitting a task id waits on the task it already names rather than starting a second one, so the `200` carries that task's result and may name a different `appId` — poll it under the one returned. A task that outlives the wait window is **not** a failure: the task is still queued or running, and the response is `202` carrying that task with `status: pending` — the same shape `invoke-async` returns, and it names the owning `appId` on a resubmission just as the `200` does. Poll `GET /v1/apps/{appId}/tasks/{taskId}` for its result. A request the platform cannot attribute to an accepted task fails instead, with no task to poll. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. + // Starts a new sync task on `appId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`). Resubmitting a task id waits on the task it already names rather than starting a second one, so the `200` carries that task's result and may name a different `appId` — poll it under the one returned. A task that outlives the wait window is **not** a failure: the task is still queued or running, and the response is `202` carrying that task with `status: pending` — the same shape `invoke-async` returns, and it names the owning `appId` on a resubmission just as the `200` does. Poll `GET /v1/apps/{appId}/tasks/{taskId}` for its result. A request the platform cannot attribute to an accepted task fails instead, with no task to poll. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. An organisation whose serverless tenancy is revoked, or has no tenancy receipt at all, returns `403 Forbidden`, distinguishing that from an app that does not exist. An organisation whose tenancy is still being provisioned returns `503 Service Unavailable` instead — that state is retryable, not a revocation, and clears once provisioning finishes. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. // // Takes any type of body and a specified content type. // @@ -2388,7 +2399,7 @@ type ClientInterface interface { // StartSyncTask Start a new sync task // - // Starts a new sync task on `appId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`). Resubmitting a task id waits on the task it already names rather than starting a second one, so the `200` carries that task's result and may name a different `appId` — poll it under the one returned. A task that outlives the wait window is **not** a failure: the task is still queued or running, and the response is `202` carrying that task with `status: pending` — the same shape `invoke-async` returns, and it names the owning `appId` on a resubmission just as the `200` does. Poll `GET /v1/apps/{appId}/tasks/{taskId}` for its result. A request the platform cannot attribute to an accepted task fails instead, with no task to poll. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. + // Starts a new sync task on `appId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`). Resubmitting a task id waits on the task it already names rather than starting a second one, so the `200` carries that task's result and may name a different `appId` — poll it under the one returned. A task that outlives the wait window is **not** a failure: the task is still queued or running, and the response is `202` carrying that task with `status: pending` — the same shape `invoke-async` returns, and it names the owning `appId` on a resubmission just as the `200` does. Poll `GET /v1/apps/{appId}/tasks/{taskId}` for its result. A request the platform cannot attribute to an accepted task fails instead, with no task to poll. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. An organisation whose serverless tenancy is revoked, or has no tenancy receipt at all, returns `403 Forbidden`, distinguishing that from an app that does not exist. An organisation whose tenancy is still being provisioned returns `503 Service Unavailable` instead — that state is retryable, not a revocation, and clears once provisioning finishes. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. // // Takes a body of the `application/json` content type. // @@ -2436,45 +2447,6 @@ type ClientInterface interface { // Corresponds with DELETE /v1/apps/{appId}/secrets/{secretName} (the `DetachAppSecret` operationId). DetachAppSecret(ctx context.Context, appId AppId, secretName SecretName, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateSourceUploadWithBody Create a source upload - // - // Creates an upload session for source intended for `appId`. The app does not need to exist yet. The response contains a short-lived transfer instruction for one exact staging object. Repeating the request with the same idempotency key and declaration while the session is pending and unexpired returns the same upload resource with a refreshed transfer instruction. Replays with a different declaration or after the session becomes ready, rejected, consumed, expired, or deleted return `409`. - // - // Takes any type of body and a specified content type. - // - // Corresponds with POST /v1/apps/{appId}/source-uploads (the `CreateSourceUpload` operationId). - CreateSourceUploadWithBody(ctx context.Context, appId AppId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - // CreateSourceUpload Create a source upload - // - // Creates an upload session for source intended for `appId`. The app does not need to exist yet. The response contains a short-lived transfer instruction for one exact staging object. Repeating the request with the same idempotency key and declaration while the session is pending and unexpired returns the same upload resource with a refreshed transfer instruction. Replays with a different declaration or after the session becomes ready, rejected, consumed, expired, or deleted return `409`. - // - // Takes a body of the `application/json` content type. - // - // Corresponds with POST /v1/apps/{appId}/source-uploads (the `CreateSourceUpload` operationId). - CreateSourceUpload(ctx context.Context, appId AppId, body CreateSourceUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteSourceUpload Abort a source upload - // - // Aborts an unconsumed upload and removes its staging object. The session remains as a deleted tombstone so its object key cannot be reused. Repeating a successful abort is idempotent. - // - // Corresponds with DELETE /v1/apps/{appId}/source-uploads/{uploadId} (the `DeleteSourceUpload` operationId). - DeleteSourceUpload(ctx context.Context, appId AppId, uploadId SourceUploadId, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetSourceUpload Get a source upload - // - // Returns the upload session belonging to the authenticated organization and `appId`. An upload belonging to another organization or app returns `404`. - // - // Corresponds with GET /v1/apps/{appId}/source-uploads/{uploadId} (the `GetSourceUpload` operationId). - GetSourceUpload(ctx context.Context, appId AppId, uploadId SourceUploadId, reqEditors ...RequestEditorFn) (*http.Response, error) - - // CompleteSourceUpload Complete a source upload - // - // Verifies the staging object's length, content type, and SHA-256 digest against the session declaration. A successful retry returns the existing ready resource. A rejected upload keeps its rejection so later retries return the same result. - // - // Corresponds with POST /v1/apps/{appId}/source-uploads/{uploadId}/complete (the `CompleteSourceUpload` operationId). - CompleteSourceUpload(ctx context.Context, appId AppId, uploadId SourceUploadId, reqEditors ...RequestEditorFn) (*http.Response, error) - // StopApp Stop an app // // Moves the app to `stopping` and returns `202` once that intent is persisted. Scale-to-zero and worker drain are performed asynchronously by the Scaler; `status` becomes `stopped` once all workers drain. In-flight tasks have a fixed, platform-managed grace period to complete; workers that exceed it are force-terminated and their tasks return to the queue per delivery guarantees. New task submissions remain accepted while `stopping`; after the app reaches `stopped`, submissions return `409 Conflict`. Precondition: `status = active`. @@ -2671,9 +2643,9 @@ type ClientInterface interface { // // Idempotent upsert for one customer organisation. The customer UUID is in the body — public paths never carry an organisation identifier (the authenticated API key names the *caller*, which for this route must be the Runware platform organisation). // - // `state: active` runs Ensure: a Cloud KMS CryptoKey named after the organisation UUID, a Kubernetes service account `org-` in the shared app namespace, and a decrypt IAM binding on that key for the KSA principal. `state: disabled` runs teardown: disable the key's primary version, drop the decrypt binding, delete the KSA. The key itself is not destroyed — a destroyed key makes every ciphertext under it permanently unreadable. The local row stays as a tombstone so a later Ensure converges on the same names. + // `state: active` runs Ensure: a Cloud KMS CryptoKey named after the organisation UUID, a Kubernetes service account `org-` in the shared app namespace, and a decrypt IAM binding on that key for the KSA principal. `state: disabled` runs teardown: disable the key's primary version, drop the decrypt binding, delete the KSA. It then stops the organisation's estate: every deployment that is `active` moves to `stopping` and has its drain enqueued, and that stop is one database transaction — the `200` is returned only once it has committed, so it guarantees every deployment that was active is on its way to `stopped`. The key itself is not destroyed — a destroyed key makes every ciphertext under it permanently unreadable. The local row stays as a tombstone so a later Ensure converges on the same names; a later Ensure does not resume the deployments this disable stopped — restoring the organisation's IAM is not the same decision as restarting its workload, and this route does not conflate them. A stopped deployment stays stopped until its own resume call, the same as one the customer stopped directly. // - // A retry after a partial failure converges rather than duplicating objects. `200` returns the resulting receipt. `503` when Cloud KMS key-admin is rate-limited (60 writes/min) or otherwise unavailable; the caller (admin-api Messenger) retries the same PUT. + // A retry after a partial failure converges rather than duplicating objects. `200` returns the resulting receipt. `503` when Cloud KMS key-admin is rate-limited (60 writes/min) or otherwise unavailable, or when the tenancy was disabled but the deployment stop could not be committed — the tenancy row is already `disabled` in that case, and the same PUT retried stops whatever is still active; the caller (admin-api Messenger) retries the same PUT either way. // // Takes any type of body and a specified content type. // @@ -2684,9 +2656,9 @@ type ClientInterface interface { // // Idempotent upsert for one customer organisation. The customer UUID is in the body — public paths never carry an organisation identifier (the authenticated API key names the *caller*, which for this route must be the Runware platform organisation). // - // `state: active` runs Ensure: a Cloud KMS CryptoKey named after the organisation UUID, a Kubernetes service account `org-` in the shared app namespace, and a decrypt IAM binding on that key for the KSA principal. `state: disabled` runs teardown: disable the key's primary version, drop the decrypt binding, delete the KSA. The key itself is not destroyed — a destroyed key makes every ciphertext under it permanently unreadable. The local row stays as a tombstone so a later Ensure converges on the same names. + // `state: active` runs Ensure: a Cloud KMS CryptoKey named after the organisation UUID, a Kubernetes service account `org-` in the shared app namespace, and a decrypt IAM binding on that key for the KSA principal. `state: disabled` runs teardown: disable the key's primary version, drop the decrypt binding, delete the KSA. It then stops the organisation's estate: every deployment that is `active` moves to `stopping` and has its drain enqueued, and that stop is one database transaction — the `200` is returned only once it has committed, so it guarantees every deployment that was active is on its way to `stopped`. The key itself is not destroyed — a destroyed key makes every ciphertext under it permanently unreadable. The local row stays as a tombstone so a later Ensure converges on the same names; a later Ensure does not resume the deployments this disable stopped — restoring the organisation's IAM is not the same decision as restarting its workload, and this route does not conflate them. A stopped deployment stays stopped until its own resume call, the same as one the customer stopped directly. // - // A retry after a partial failure converges rather than duplicating objects. `200` returns the resulting receipt. `503` when Cloud KMS key-admin is rate-limited (60 writes/min) or otherwise unavailable; the caller (admin-api Messenger) retries the same PUT. + // A retry after a partial failure converges rather than duplicating objects. `200` returns the resulting receipt. `503` when Cloud KMS key-admin is rate-limited (60 writes/min) or otherwise unavailable, or when the tenancy was disabled but the deployment stop could not be committed — the tenancy row is already `disabled` in that case, and the same PUT retried stops whatever is still active; the caller (admin-api Messenger) retries the same PUT either way. // // Takes a body of the `application/json` content type. // @@ -2739,6 +2711,52 @@ type ClientInterface interface { // Corresponds with PUT /v1/secrets/{secretName} (the `UpdateSecret` operationId). UpdateSecret(ctx context.Context, secretName SecretName, body UpdateSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateSourceUploadWithBody Create a source upload + // + // Creates an upload session for a source archive. The session belongs to the authenticated organization and names no app: an upload precedes any app, and the source it publishes may back several. The response contains a short-lived transfer instruction for one exact staging object. Repeating the request with the same idempotency key and declaration while the session is pending and unexpired returns the same upload resource with a refreshed transfer instruction. Replays with a different declaration, or after the session becomes ready, rejected, expired, or deleted, return `409`. + // + // Takes any type of body and a specified content type. + // + // Corresponds with POST /v1/source-uploads (the `CreateSourceUpload` operationId). + CreateSourceUploadWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateSourceUpload Create a source upload + // + // Creates an upload session for a source archive. The session belongs to the authenticated organization and names no app: an upload precedes any app, and the source it publishes may back several. The response contains a short-lived transfer instruction for one exact staging object. Repeating the request with the same idempotency key and declaration while the session is pending and unexpired returns the same upload resource with a refreshed transfer instruction. Replays with a different declaration, or after the session becomes ready, rejected, expired, or deleted, return `409`. + // + // Takes a body of the `application/json` content type. + // + // Corresponds with POST /v1/source-uploads (the `CreateSourceUpload` operationId). + CreateSourceUpload(ctx context.Context, body CreateSourceUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteSourceUpload Abort a source upload + // + // Aborts an upload that has not published its source and removes its staging object. The session remains as a deleted tombstone so its staging key cannot be reused. Repeating a successful abort is idempotent. A `ready` upload cannot be aborted: the source it published is a resource in its own right, and the request answers `409` with type `source-upload-completed`. + // + // Corresponds with DELETE /v1/source-uploads/{uploadId} (the `DeleteSourceUpload` operationId). + DeleteSourceUpload(ctx context.Context, uploadId SourceUploadId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetSourceUpload Get a source upload + // + // Returns the upload session belonging to the authenticated organization. Once the upload is `ready` the session carries the `sourceId` it published. An upload belonging to another organization returns `404`. + // + // Corresponds with GET /v1/source-uploads/{uploadId} (the `GetSourceUpload` operationId). + GetSourceUpload(ctx context.Context, uploadId SourceUploadId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CompleteSourceUpload Complete a source upload + // + // Verifies the staging object's length, content type, and SHA-256 digest against the session declaration, applies the archive rules for the source type, and publishes the verified bytes as an immutable source artifact. The first success creates the source and returns the ready session carrying its `sourceId`; a retry returns the same session and the same `sourceId`. A rejected upload keeps its rejection so later retries return the same result. + // + // Corresponds with POST /v1/source-uploads/{uploadId}/complete (the `CompleteSourceUpload` operationId). + CompleteSourceUpload(ctx context.Context, uploadId SourceUploadId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetSource Get a source + // + // Returns the immutable source artifact a completed upload published: its type and the length and digest upload completion verified. A source is organization-scoped and may be named by any number of apps and versions in that organization; one belonging to another organization returns `404`. There is no list and no delete. + // + // Corresponds with GET /v1/sources/{sourceId} (the `GetSource` operationId). + GetSource(ctx context.Context, sourceId SourceId, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListUsageEvents List usage events // // Append-only billing telemetry; one row per worker state transition. @@ -3191,7 +3209,7 @@ func (c *Client) FavouriteApp(ctx context.Context, appId AppId, reqEditors ...Re // StartAsyncTaskWithBody Start a new async task // -// Starts a new async task on `appId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/apps/{appId}/tasks/{taskId}` for completion. Resubmitting a task id is answered with the task it already names rather than starting a second one, so the `202` can carry a task that has already finished: read its `status` instead of assuming `pending`, and note it may name a different `appId`. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. +// Starts a new async task on `appId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/apps/{appId}/tasks/{taskId}` for completion. Resubmitting a task id is answered with the task it already names rather than starting a second one, so the `202` can carry a task that has already finished: read its `status` instead of assuming `pending`, and note it may name a different `appId`. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. An organisation whose serverless tenancy is revoked, or has no tenancy receipt at all, returns `403 Forbidden`, distinguishing that from an app that does not exist. An organisation whose tenancy is still being provisioned returns `503 Service Unavailable` instead — that state is retryable, not a revocation, and clears once provisioning finishes. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. // // Takes any type of body and a specified content type. // @@ -3210,7 +3228,7 @@ func (c *Client) StartAsyncTaskWithBody(ctx context.Context, appId AppId, endpoi // StartAsyncTask Start a new async task // -// Starts a new async task on `appId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/apps/{appId}/tasks/{taskId}` for completion. Resubmitting a task id is answered with the task it already names rather than starting a second one, so the `202` can carry a task that has already finished: read its `status` instead of assuming `pending`, and note it may name a different `appId`. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. +// Starts a new async task on `appId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/apps/{appId}/tasks/{taskId}` for completion. Resubmitting a task id is answered with the task it already names rather than starting a second one, so the `202` can carry a task that has already finished: read its `status` instead of assuming `pending`, and note it may name a different `appId`. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. An organisation whose serverless tenancy is revoked, or has no tenancy receipt at all, returns `403 Forbidden`, distinguishing that from an app that does not exist. An organisation whose tenancy is still being provisioned returns `503 Service Unavailable` instead — that state is retryable, not a revocation, and clears once provisioning finishes. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. // // Takes a body of the `application/json` content type. // @@ -3229,7 +3247,7 @@ func (c *Client) StartAsyncTask(ctx context.Context, appId AppId, endpointPath E // StartSyncTaskWithBody Start a new sync task // -// Starts a new sync task on `appId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`). Resubmitting a task id waits on the task it already names rather than starting a second one, so the `200` carries that task's result and may name a different `appId` — poll it under the one returned. A task that outlives the wait window is **not** a failure: the task is still queued or running, and the response is `202` carrying that task with `status: pending` — the same shape `invoke-async` returns, and it names the owning `appId` on a resubmission just as the `200` does. Poll `GET /v1/apps/{appId}/tasks/{taskId}` for its result. A request the platform cannot attribute to an accepted task fails instead, with no task to poll. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. +// Starts a new sync task on `appId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`). Resubmitting a task id waits on the task it already names rather than starting a second one, so the `200` carries that task's result and may name a different `appId` — poll it under the one returned. A task that outlives the wait window is **not** a failure: the task is still queued or running, and the response is `202` carrying that task with `status: pending` — the same shape `invoke-async` returns, and it names the owning `appId` on a resubmission just as the `200` does. Poll `GET /v1/apps/{appId}/tasks/{taskId}` for its result. A request the platform cannot attribute to an accepted task fails instead, with no task to poll. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. An organisation whose serverless tenancy is revoked, or has no tenancy receipt at all, returns `403 Forbidden`, distinguishing that from an app that does not exist. An organisation whose tenancy is still being provisioned returns `503 Service Unavailable` instead — that state is retryable, not a revocation, and clears once provisioning finishes. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. // // Takes any type of body and a specified content type. // @@ -3248,7 +3266,7 @@ func (c *Client) StartSyncTaskWithBody(ctx context.Context, appId AppId, endpoin // StartSyncTask Start a new sync task // -// Starts a new sync task on `appId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`). Resubmitting a task id waits on the task it already names rather than starting a second one, so the `200` carries that task's result and may name a different `appId` — poll it under the one returned. A task that outlives the wait window is **not** a failure: the task is still queued or running, and the response is `202` carrying that task with `status: pending` — the same shape `invoke-async` returns, and it names the owning `appId` on a resubmission just as the `200` does. Poll `GET /v1/apps/{appId}/tasks/{taskId}` for its result. A request the platform cannot attribute to an accepted task fails instead, with no task to poll. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. +// Starts a new sync task on `appId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`). Resubmitting a task id waits on the task it already names rather than starting a second one, so the `200` carries that task's result and may name a different `appId` — poll it under the one returned. A task that outlives the wait window is **not** a failure: the task is still queued or running, and the response is `202` carrying that task with `status: pending` — the same shape `invoke-async` returns, and it names the owning `appId` on a resubmission just as the `200` does. Poll `GET /v1/apps/{appId}/tasks/{taskId}` for its result. A request the platform cannot attribute to an accepted task fails instead, with no task to poll. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. An organisation whose serverless tenancy is revoked, or has no tenancy receipt at all, returns `403 Forbidden`, distinguishing that from an app that does not exist. An organisation whose tenancy is still being provisioned returns `503 Service Unavailable` instead — that state is retryable, not a revocation, and clears once provisioning finishes. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. // // Takes a body of the `application/json` content type. // @@ -3356,95 +3374,6 @@ func (c *Client) DetachAppSecret(ctx context.Context, appId AppId, secretName Se return c.Client.Do(req) } -// CreateSourceUploadWithBody Create a source upload -// -// Creates an upload session for source intended for `appId`. The app does not need to exist yet. The response contains a short-lived transfer instruction for one exact staging object. Repeating the request with the same idempotency key and declaration while the session is pending and unexpired returns the same upload resource with a refreshed transfer instruction. Replays with a different declaration or after the session becomes ready, rejected, consumed, expired, or deleted return `409`. -// -// Takes any type of body and a specified content type. -// -// Corresponds with POST /v1/apps/{appId}/source-uploads (the `CreateSourceUpload` operationId). -func (c *Client) CreateSourceUploadWithBody(ctx context.Context, appId AppId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateSourceUploadRequestWithBody(c.Server, appId, 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) -} - -// CreateSourceUpload Create a source upload -// -// Creates an upload session for source intended for `appId`. The app does not need to exist yet. The response contains a short-lived transfer instruction for one exact staging object. Repeating the request with the same idempotency key and declaration while the session is pending and unexpired returns the same upload resource with a refreshed transfer instruction. Replays with a different declaration or after the session becomes ready, rejected, consumed, expired, or deleted return `409`. -// -// Takes a body of the `application/json` content type. -// -// Corresponds with POST /v1/apps/{appId}/source-uploads (the `CreateSourceUpload` operationId). -func (c *Client) CreateSourceUpload(ctx context.Context, appId AppId, body CreateSourceUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateSourceUploadRequest(c.Server, appId, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -// DeleteSourceUpload Abort a source upload -// -// Aborts an unconsumed upload and removes its staging object. The session remains as a deleted tombstone so its object key cannot be reused. Repeating a successful abort is idempotent. -// -// Corresponds with DELETE /v1/apps/{appId}/source-uploads/{uploadId} (the `DeleteSourceUpload` operationId). -func (c *Client) DeleteSourceUpload(ctx context.Context, appId AppId, uploadId SourceUploadId, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteSourceUploadRequest(c.Server, appId, uploadId) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -// GetSourceUpload Get a source upload -// -// Returns the upload session belonging to the authenticated organization and `appId`. An upload belonging to another organization or app returns `404`. -// -// Corresponds with GET /v1/apps/{appId}/source-uploads/{uploadId} (the `GetSourceUpload` operationId). -func (c *Client) GetSourceUpload(ctx context.Context, appId AppId, uploadId SourceUploadId, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSourceUploadRequest(c.Server, appId, uploadId) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -// CompleteSourceUpload Complete a source upload -// -// Verifies the staging object's length, content type, and SHA-256 digest against the session declaration. A successful retry returns the existing ready resource. A rejected upload keeps its rejection so later retries return the same result. -// -// Corresponds with POST /v1/apps/{appId}/source-uploads/{uploadId}/complete (the `CompleteSourceUpload` operationId). -func (c *Client) CompleteSourceUpload(ctx context.Context, appId AppId, uploadId SourceUploadId, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCompleteSourceUploadRequest(c.Server, appId, uploadId) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - // StopApp Stop an app // // Moves the app to `stopping` and returns `202` once that intent is persisted. Scale-to-zero and worker drain are performed asynchronously by the Scaler; `status` becomes `stopped` once all workers drain. In-flight tasks have a fixed, platform-managed grace period to complete; workers that exceed it are force-terminated and their tasks return to the queue per delivery guarantees. New task submissions remain accepted while `stopping`; after the app reaches `stopped`, submissions return `409 Conflict`. Precondition: `status = active`. @@ -3881,9 +3810,9 @@ func (c *Client) GetMetricSeries(ctx context.Context, queryId QueryId, params *G // // Idempotent upsert for one customer organisation. The customer UUID is in the body — public paths never carry an organisation identifier (the authenticated API key names the *caller*, which for this route must be the Runware platform organisation). // -// `state: active` runs Ensure: a Cloud KMS CryptoKey named after the organisation UUID, a Kubernetes service account `org-` in the shared app namespace, and a decrypt IAM binding on that key for the KSA principal. `state: disabled` runs teardown: disable the key's primary version, drop the decrypt binding, delete the KSA. The key itself is not destroyed — a destroyed key makes every ciphertext under it permanently unreadable. The local row stays as a tombstone so a later Ensure converges on the same names. +// `state: active` runs Ensure: a Cloud KMS CryptoKey named after the organisation UUID, a Kubernetes service account `org-` in the shared app namespace, and a decrypt IAM binding on that key for the KSA principal. `state: disabled` runs teardown: disable the key's primary version, drop the decrypt binding, delete the KSA. It then stops the organisation's estate: every deployment that is `active` moves to `stopping` and has its drain enqueued, and that stop is one database transaction — the `200` is returned only once it has committed, so it guarantees every deployment that was active is on its way to `stopped`. The key itself is not destroyed — a destroyed key makes every ciphertext under it permanently unreadable. The local row stays as a tombstone so a later Ensure converges on the same names; a later Ensure does not resume the deployments this disable stopped — restoring the organisation's IAM is not the same decision as restarting its workload, and this route does not conflate them. A stopped deployment stays stopped until its own resume call, the same as one the customer stopped directly. // -// A retry after a partial failure converges rather than duplicating objects. `200` returns the resulting receipt. `503` when Cloud KMS key-admin is rate-limited (60 writes/min) or otherwise unavailable; the caller (admin-api Messenger) retries the same PUT. +// A retry after a partial failure converges rather than duplicating objects. `200` returns the resulting receipt. `503` when Cloud KMS key-admin is rate-limited (60 writes/min) or otherwise unavailable, or when the tenancy was disabled but the deployment stop could not be committed — the tenancy row is already `disabled` in that case, and the same PUT retried stops whatever is still active; the caller (admin-api Messenger) retries the same PUT either way. // // Takes any type of body and a specified content type. // @@ -3904,9 +3833,9 @@ func (c *Client) UpsertOrgTenancyWithBody(ctx context.Context, contentType strin // // Idempotent upsert for one customer organisation. The customer UUID is in the body — public paths never carry an organisation identifier (the authenticated API key names the *caller*, which for this route must be the Runware platform organisation). // -// `state: active` runs Ensure: a Cloud KMS CryptoKey named after the organisation UUID, a Kubernetes service account `org-` in the shared app namespace, and a decrypt IAM binding on that key for the KSA principal. `state: disabled` runs teardown: disable the key's primary version, drop the decrypt binding, delete the KSA. The key itself is not destroyed — a destroyed key makes every ciphertext under it permanently unreadable. The local row stays as a tombstone so a later Ensure converges on the same names. +// `state: active` runs Ensure: a Cloud KMS CryptoKey named after the organisation UUID, a Kubernetes service account `org-` in the shared app namespace, and a decrypt IAM binding on that key for the KSA principal. `state: disabled` runs teardown: disable the key's primary version, drop the decrypt binding, delete the KSA. It then stops the organisation's estate: every deployment that is `active` moves to `stopping` and has its drain enqueued, and that stop is one database transaction — the `200` is returned only once it has committed, so it guarantees every deployment that was active is on its way to `stopped`. The key itself is not destroyed — a destroyed key makes every ciphertext under it permanently unreadable. The local row stays as a tombstone so a later Ensure converges on the same names; a later Ensure does not resume the deployments this disable stopped — restoring the organisation's IAM is not the same decision as restarting its workload, and this route does not conflate them. A stopped deployment stays stopped until its own resume call, the same as one the customer stopped directly. // -// A retry after a partial failure converges rather than duplicating objects. `200` returns the resulting receipt. `503` when Cloud KMS key-admin is rate-limited (60 writes/min) or otherwise unavailable; the caller (admin-api Messenger) retries the same PUT. +// A retry after a partial failure converges rather than duplicating objects. `200` returns the resulting receipt. `503` when Cloud KMS key-admin is rate-limited (60 writes/min) or otherwise unavailable, or when the tenancy was disabled but the deployment stop could not be committed — the tenancy row is already `disabled` in that case, and the same PUT retried stops whatever is still active; the caller (admin-api Messenger) retries the same PUT either way. // // Takes a body of the `application/json` content type. // @@ -4029,6 +3958,112 @@ func (c *Client) UpdateSecret(ctx context.Context, secretName SecretName, body U return c.Client.Do(req) } +// CreateSourceUploadWithBody Create a source upload +// +// Creates an upload session for a source archive. The session belongs to the authenticated organization and names no app: an upload precedes any app, and the source it publishes may back several. The response contains a short-lived transfer instruction for one exact staging object. Repeating the request with the same idempotency key and declaration while the session is pending and unexpired returns the same upload resource with a refreshed transfer instruction. Replays with a different declaration, or after the session becomes ready, rejected, expired, or deleted, return `409`. +// +// Takes any type of body and a specified content type. +// +// Corresponds with POST /v1/source-uploads (the `CreateSourceUpload` operationId). +func (c *Client) CreateSourceUploadWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSourceUploadRequestWithBody(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) +} + +// CreateSourceUpload Create a source upload +// +// Creates an upload session for a source archive. The session belongs to the authenticated organization and names no app: an upload precedes any app, and the source it publishes may back several. The response contains a short-lived transfer instruction for one exact staging object. Repeating the request with the same idempotency key and declaration while the session is pending and unexpired returns the same upload resource with a refreshed transfer instruction. Replays with a different declaration, or after the session becomes ready, rejected, expired, or deleted, return `409`. +// +// Takes a body of the `application/json` content type. +// +// Corresponds with POST /v1/source-uploads (the `CreateSourceUpload` operationId). +func (c *Client) CreateSourceUpload(ctx context.Context, body CreateSourceUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSourceUploadRequest(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) +} + +// DeleteSourceUpload Abort a source upload +// +// Aborts an upload that has not published its source and removes its staging object. The session remains as a deleted tombstone so its staging key cannot be reused. Repeating a successful abort is idempotent. A `ready` upload cannot be aborted: the source it published is a resource in its own right, and the request answers `409` with type `source-upload-completed`. +// +// Corresponds with DELETE /v1/source-uploads/{uploadId} (the `DeleteSourceUpload` operationId). +func (c *Client) DeleteSourceUpload(ctx context.Context, uploadId SourceUploadId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteSourceUploadRequest(c.Server, uploadId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +// GetSourceUpload Get a source upload +// +// Returns the upload session belonging to the authenticated organization. Once the upload is `ready` the session carries the `sourceId` it published. An upload belonging to another organization returns `404`. +// +// Corresponds with GET /v1/source-uploads/{uploadId} (the `GetSourceUpload` operationId). +func (c *Client) GetSourceUpload(ctx context.Context, uploadId SourceUploadId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSourceUploadRequest(c.Server, uploadId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +// CompleteSourceUpload Complete a source upload +// +// Verifies the staging object's length, content type, and SHA-256 digest against the session declaration, applies the archive rules for the source type, and publishes the verified bytes as an immutable source artifact. The first success creates the source and returns the ready session carrying its `sourceId`; a retry returns the same session and the same `sourceId`. A rejected upload keeps its rejection so later retries return the same result. +// +// Corresponds with POST /v1/source-uploads/{uploadId}/complete (the `CompleteSourceUpload` operationId). +func (c *Client) CompleteSourceUpload(ctx context.Context, uploadId SourceUploadId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCompleteSourceUploadRequest(c.Server, uploadId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +// GetSource Get a source +// +// Returns the immutable source artifact a completed upload published: its type and the length and digest upload completion verified. A source is organization-scoped and may be named by any number of apps and versions in that organization; one belonging to another organization returns `404`. There is no list and no delete. +// +// Corresponds with GET /v1/sources/{sourceId} (the `GetSource` operationId). +func (c *Client) GetSource(ctx context.Context, sourceId SourceId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSourceRequest(c.Server, sourceId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + // ListUsageEvents List usage events // // Append-only billing telemetry; one row per worker state transition. @@ -5282,19 +5317,8 @@ func NewDetachAppSecretRequest(server string, appId AppId, secretName SecretName return req, nil } -// NewCreateSourceUploadRequest calls the generic CreateSourceUpload builder with application/json body -func NewCreateSourceUploadRequest(server string, appId AppId, body CreateSourceUploadJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateSourceUploadRequestWithBody(server, appId, "application/json", bodyReader) -} - -// NewCreateSourceUploadRequestWithBody constructs an http.Request for the CreateSourceUpload method, with any body, and a specified content type -func NewCreateSourceUploadRequestWithBody(server string, appId AppId, contentType string, body io.Reader) (*http.Request, error) { +// NewStopAppRequest constructs an http.Request for the StopApp method +func NewStopAppRequest(server string, appId AppId) (*http.Request, error) { var err error var pathParam0 string @@ -5309,7 +5333,7 @@ func NewCreateSourceUploadRequestWithBody(server string, appId AppId, contentTyp return nil, err } - operationPath := fmt.Sprintf("/v1/apps/%s/source-uploads", pathParam0) + operationPath := fmt.Sprintf("/v1/apps/%s/stop", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5319,18 +5343,16 @@ func NewCreateSourceUploadRequestWithBody(server string, appId AppId, contentTyp return nil, err } - req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewDeleteSourceUploadRequest constructs an http.Request for the DeleteSourceUpload method -func NewDeleteSourceUploadRequest(server string, appId AppId, uploadId SourceUploadId) (*http.Request, error) { +// NewListTasksRequest constructs an http.Request for the ListTasks method +func NewListTasksRequest(server string, appId AppId, params *ListTasksParams) (*http.Request, error) { var err error var pathParam0 string @@ -5340,169 +5362,12 @@ func NewDeleteSourceUploadRequest(server string, appId AppId, uploadId SourceUpl return nil, err } - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithOptions("simple", false, "uploadId", uploadId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/apps/%s/source-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 -} - -// NewGetSourceUploadRequest constructs an http.Request for the GetSourceUpload method -func NewGetSourceUploadRequest(server string, appId AppId, uploadId SourceUploadId) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "appId", appId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithOptions("simple", false, "uploadId", uploadId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/v1/apps/%s/source-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.MethodGet, queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewCompleteSourceUploadRequest constructs an http.Request for the CompleteSourceUpload method -func NewCompleteSourceUploadRequest(server string, appId AppId, uploadId SourceUploadId) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "appId", appId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithOptions("simple", false, "uploadId", uploadId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/v1/apps/%s/source-uploads/%s/complete", 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(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewStopAppRequest constructs an http.Request for the StopApp method -func NewStopAppRequest(server string, appId AppId) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "appId", appId, 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("/v1/apps/%s/stop", 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 -} - -// NewListTasksRequest constructs an http.Request for the ListTasks method -func NewListTasksRequest(server string, appId AppId, params *ListTasksParams) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "appId", appId, 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("/v1/apps/%s/tasks", pathParam0) + operationPath := fmt.Sprintf("/v1/apps/%s/tasks", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6802,8 +6667,19 @@ func NewUpdateSecretRequestWithBody(server string, secretName SecretName, conten return req, nil } -// NewListUsageEventsRequest constructs an http.Request for the ListUsageEvents method -func NewListUsageEventsRequest(server string, params *ListUsageEventsParams) (*http.Request, error) { +// NewCreateSourceUploadRequest calls the generic CreateSourceUpload builder with application/json body +func NewCreateSourceUploadRequest(server string, body CreateSourceUploadJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateSourceUploadRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateSourceUploadRequestWithBody constructs an http.Request for the CreateSourceUpload method, with any body, and a specified content type +func NewCreateSourceUploadRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -6811,7 +6687,7 @@ func NewListUsageEventsRequest(server string, params *ListUsageEventsParams) (*h return nil, err } - operationPath := fmt.Sprintf("/v1/usage") + operationPath := fmt.Sprintf("/v1/source-uploads") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6821,79 +6697,74 @@ func NewListUsageEventsRequest(server string, params *ListUsageEventsParams) (*h 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 + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) + if err != nil { + return nil, err + } - if params.Limit != nil { + req.Header.Add("Content-Type", contentType) - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int32"}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } + return req, nil +} - } +// NewDeleteSourceUploadRequest constructs an http.Request for the DeleteSourceUpload method +func NewDeleteSourceUploadRequest(server string, uploadId SourceUploadId) (*http.Request, error) { + var err error - if params.Cursor != nil { + var pathParam0 string - 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) - } - } + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "uploadId", uploadId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) + if err != nil { + return nil, err + } - } + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - if params.AppId != nil { + operationPath := fmt.Sprintf("/v1/source-uploads/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "appId", *params.AppId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } + 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 + } - if params.From != nil { + return req, nil +} - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "from", *params.From, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } +// NewGetSourceUploadRequest constructs an http.Request for the GetSourceUpload method +func NewGetSourceUploadRequest(server string, uploadId SourceUploadId) (*http.Request, error) { + var err error - } + var pathParam0 string - if params.To != nil { + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "uploadId", uploadId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) + if err != nil { + return nil, err + } - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "to", *params.To, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { - return nil, err - } else { - for _, qp := range strings.Split(queryFrag, "&") { - rawQueryFragments = append(rawQueryFragments, qp) - } - } + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - } + operationPath := fmt.Sprintf("/v1/source-uploads/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - if encoded := queryValues.Encode(); encoded != "" { - rawQueryFragments = append(rawQueryFragments, encoded) - } - queryURL.RawQuery = strings.Join(rawQueryFragments, "&") + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) @@ -6904,12 +6775,182 @@ func NewListUsageEventsRequest(server string, params *ListUsageEventsParams) (*h 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 - } - } +// NewCompleteSourceUploadRequest constructs an http.Request for the CompleteSourceUpload method +func NewCompleteSourceUploadRequest(server string, uploadId SourceUploadId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "uploadId", uploadId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/source-uploads/%s/complete", 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 +} + +// NewGetSourceRequest constructs an http.Request for the GetSource method +func NewGetSourceRequest(server string, sourceId SourceId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "sourceId", sourceId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/sources/%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 +} + +// NewListUsageEventsRequest constructs an http.Request for the ListUsageEvents method +func NewListUsageEventsRequest(server string, params *ListUsageEventsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/usage") + 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: "int32"}); 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.AppId != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "appId", *params.AppId, 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.From != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "from", *params.From, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.To != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "to", *params.To, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); 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 +} + +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 @@ -7202,7 +7243,7 @@ type ClientWithResponsesInterface interface { // StartAsyncTaskWithBodyWithResponse Start a new async task // - // Starts a new async task on `appId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/apps/{appId}/tasks/{taskId}` for completion. Resubmitting a task id is answered with the task it already names rather than starting a second one, so the `202` can carry a task that has already finished: read its `status` instead of assuming `pending`, and note it may name a different `appId`. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. + // Starts a new async task on `appId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/apps/{appId}/tasks/{taskId}` for completion. Resubmitting a task id is answered with the task it already names rather than starting a second one, so the `202` can carry a task that has already finished: read its `status` instead of assuming `pending`, and note it may name a different `appId`. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. An organisation whose serverless tenancy is revoked, or has no tenancy receipt at all, returns `403 Forbidden`, distinguishing that from an app that does not exist. An organisation whose tenancy is still being provisioned returns `503 Service Unavailable` instead — that state is retryable, not a revocation, and clears once provisioning finishes. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. // // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // @@ -7211,7 +7252,7 @@ type ClientWithResponsesInterface interface { // StartAsyncTaskWithResponse Start a new async task // - // Starts a new async task on `appId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/apps/{appId}/tasks/{taskId}` for completion. Resubmitting a task id is answered with the task it already names rather than starting a second one, so the `202` can carry a task that has already finished: read its `status` instead of assuming `pending`, and note it may name a different `appId`. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. + // Starts a new async task on `appId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/apps/{appId}/tasks/{taskId}` for completion. Resubmitting a task id is answered with the task it already names rather than starting a second one, so the `202` can carry a task that has already finished: read its `status` instead of assuming `pending`, and note it may name a different `appId`. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. An organisation whose serverless tenancy is revoked, or has no tenancy receipt at all, returns `403 Forbidden`, distinguishing that from an app that does not exist. An organisation whose tenancy is still being provisioned returns `503 Service Unavailable` instead — that state is retryable, not a revocation, and clears once provisioning finishes. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. // // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // @@ -7220,7 +7261,7 @@ type ClientWithResponsesInterface interface { // StartSyncTaskWithBodyWithResponse Start a new sync task // - // Starts a new sync task on `appId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`). Resubmitting a task id waits on the task it already names rather than starting a second one, so the `200` carries that task's result and may name a different `appId` — poll it under the one returned. A task that outlives the wait window is **not** a failure: the task is still queued or running, and the response is `202` carrying that task with `status: pending` — the same shape `invoke-async` returns, and it names the owning `appId` on a resubmission just as the `200` does. Poll `GET /v1/apps/{appId}/tasks/{taskId}` for its result. A request the platform cannot attribute to an accepted task fails instead, with no task to poll. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. + // Starts a new sync task on `appId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`). Resubmitting a task id waits on the task it already names rather than starting a second one, so the `200` carries that task's result and may name a different `appId` — poll it under the one returned. A task that outlives the wait window is **not** a failure: the task is still queued or running, and the response is `202` carrying that task with `status: pending` — the same shape `invoke-async` returns, and it names the owning `appId` on a resubmission just as the `200` does. Poll `GET /v1/apps/{appId}/tasks/{taskId}` for its result. A request the platform cannot attribute to an accepted task fails instead, with no task to poll. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. An organisation whose serverless tenancy is revoked, or has no tenancy receipt at all, returns `403 Forbidden`, distinguishing that from an app that does not exist. An organisation whose tenancy is still being provisioned returns `503 Service Unavailable` instead — that state is retryable, not a revocation, and clears once provisioning finishes. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. // // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // @@ -7229,7 +7270,7 @@ type ClientWithResponsesInterface interface { // StartSyncTaskWithResponse Start a new sync task // - // Starts a new sync task on `appId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`). Resubmitting a task id waits on the task it already names rather than starting a second one, so the `200` carries that task's result and may name a different `appId` — poll it under the one returned. A task that outlives the wait window is **not** a failure: the task is still queued or running, and the response is `202` carrying that task with `status: pending` — the same shape `invoke-async` returns, and it names the owning `appId` on a resubmission just as the `200` does. Poll `GET /v1/apps/{appId}/tasks/{taskId}` for its result. A request the platform cannot attribute to an accepted task fails instead, with no task to poll. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. + // Starts a new sync task on `appId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`). Resubmitting a task id waits on the task it already names rather than starting a second one, so the `200` carries that task's result and may name a different `appId` — poll it under the one returned. A task that outlives the wait window is **not** a failure: the task is still queued or running, and the response is `202` carrying that task with `status: pending` — the same shape `invoke-async` returns, and it names the owning `appId` on a resubmission just as the `200` does. Poll `GET /v1/apps/{appId}/tasks/{taskId}` for its result. A request the platform cannot attribute to an accepted task fails instead, with no task to poll. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. An organisation whose serverless tenancy is revoked, or has no tenancy receipt at all, returns `403 Forbidden`, distinguishing that from an app that does not exist. An organisation whose tenancy is still being provisioned returns `503 Service Unavailable` instead — that state is retryable, not a revocation, and clears once provisioning finishes. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. // // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // @@ -7283,51 +7324,6 @@ type ClientWithResponsesInterface interface { // Corresponds with DELETE /v1/apps/{appId}/secrets/{secretName} (the `DetachAppSecret` operationId). DetachAppSecretWithResponse(ctx context.Context, appId AppId, secretName SecretName, reqEditors ...RequestEditorFn) (*DetachAppSecretResponse, error) - // CreateSourceUploadWithBodyWithResponse Create a source upload - // - // Creates an upload session for source intended for `appId`. The app does not need to exist yet. The response contains a short-lived transfer instruction for one exact staging object. Repeating the request with the same idempotency key and declaration while the session is pending and unexpired returns the same upload resource with a refreshed transfer instruction. Replays with a different declaration or after the session becomes ready, rejected, consumed, expired, or deleted return `409`. - // - // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v1/apps/{appId}/source-uploads (the `CreateSourceUpload` operationId). - CreateSourceUploadWithBodyWithResponse(ctx context.Context, appId AppId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSourceUploadResponse, error) - - // CreateSourceUploadWithResponse Create a source upload - // - // Creates an upload session for source intended for `appId`. The app does not need to exist yet. The response contains a short-lived transfer instruction for one exact staging object. Repeating the request with the same idempotency key and declaration while the session is pending and unexpired returns the same upload resource with a refreshed transfer instruction. Replays with a different declaration or after the session becomes ready, rejected, consumed, expired, or deleted return `409`. - // - // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v1/apps/{appId}/source-uploads (the `CreateSourceUpload` operationId). - CreateSourceUploadWithResponse(ctx context.Context, appId AppId, body CreateSourceUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSourceUploadResponse, error) - - // DeleteSourceUploadWithResponse Abort a source upload - // - // Aborts an unconsumed upload and removes its staging object. The session remains as a deleted tombstone so its object key cannot be reused. Repeating a successful abort is idempotent. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with DELETE /v1/apps/{appId}/source-uploads/{uploadId} (the `DeleteSourceUpload` operationId). - DeleteSourceUploadWithResponse(ctx context.Context, appId AppId, uploadId SourceUploadId, reqEditors ...RequestEditorFn) (*DeleteSourceUploadResponse, error) - - // GetSourceUploadWithResponse Get a source upload - // - // Returns the upload session belonging to the authenticated organization and `appId`. An upload belonging to another organization or app returns `404`. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with GET /v1/apps/{appId}/source-uploads/{uploadId} (the `GetSourceUpload` operationId). - GetSourceUploadWithResponse(ctx context.Context, appId AppId, uploadId SourceUploadId, reqEditors ...RequestEditorFn) (*GetSourceUploadResponse, error) - - // CompleteSourceUploadWithResponse Complete a source upload - // - // Verifies the staging object's length, content type, and SHA-256 digest against the session declaration. A successful retry returns the existing ready resource. A rejected upload keeps its rejection so later retries return the same result. - // - // Returns a wrapper object for the known response body format(s). - // - // Corresponds with POST /v1/apps/{appId}/source-uploads/{uploadId}/complete (the `CompleteSourceUpload` operationId). - CompleteSourceUploadWithResponse(ctx context.Context, appId AppId, uploadId SourceUploadId, reqEditors ...RequestEditorFn) (*CompleteSourceUploadResponse, error) - // StopAppWithResponse Stop an app // // Moves the app to `stopping` and returns `202` once that intent is persisted. Scale-to-zero and worker drain are performed asynchronously by the Scaler; `status` becomes `stopped` once all workers drain. In-flight tasks have a fixed, platform-managed grace period to complete; workers that exceed it are force-terminated and their tasks return to the queue per delivery guarantees. New task submissions remain accepted while `stopping`; after the app reaches `stopped`, submissions return `409 Conflict`. Precondition: `status = active`. @@ -7556,9 +7552,9 @@ type ClientWithResponsesInterface interface { // // Idempotent upsert for one customer organisation. The customer UUID is in the body — public paths never carry an organisation identifier (the authenticated API key names the *caller*, which for this route must be the Runware platform organisation). // - // `state: active` runs Ensure: a Cloud KMS CryptoKey named after the organisation UUID, a Kubernetes service account `org-` in the shared app namespace, and a decrypt IAM binding on that key for the KSA principal. `state: disabled` runs teardown: disable the key's primary version, drop the decrypt binding, delete the KSA. The key itself is not destroyed — a destroyed key makes every ciphertext under it permanently unreadable. The local row stays as a tombstone so a later Ensure converges on the same names. + // `state: active` runs Ensure: a Cloud KMS CryptoKey named after the organisation UUID, a Kubernetes service account `org-` in the shared app namespace, and a decrypt IAM binding on that key for the KSA principal. `state: disabled` runs teardown: disable the key's primary version, drop the decrypt binding, delete the KSA. It then stops the organisation's estate: every deployment that is `active` moves to `stopping` and has its drain enqueued, and that stop is one database transaction — the `200` is returned only once it has committed, so it guarantees every deployment that was active is on its way to `stopped`. The key itself is not destroyed — a destroyed key makes every ciphertext under it permanently unreadable. The local row stays as a tombstone so a later Ensure converges on the same names; a later Ensure does not resume the deployments this disable stopped — restoring the organisation's IAM is not the same decision as restarting its workload, and this route does not conflate them. A stopped deployment stays stopped until its own resume call, the same as one the customer stopped directly. // - // A retry after a partial failure converges rather than duplicating objects. `200` returns the resulting receipt. `503` when Cloud KMS key-admin is rate-limited (60 writes/min) or otherwise unavailable; the caller (admin-api Messenger) retries the same PUT. + // A retry after a partial failure converges rather than duplicating objects. `200` returns the resulting receipt. `503` when Cloud KMS key-admin is rate-limited (60 writes/min) or otherwise unavailable, or when the tenancy was disabled but the deployment stop could not be committed — the tenancy row is already `disabled` in that case, and the same PUT retried stops whatever is still active; the caller (admin-api Messenger) retries the same PUT either way. // // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // @@ -7569,9 +7565,9 @@ type ClientWithResponsesInterface interface { // // Idempotent upsert for one customer organisation. The customer UUID is in the body — public paths never carry an organisation identifier (the authenticated API key names the *caller*, which for this route must be the Runware platform organisation). // - // `state: active` runs Ensure: a Cloud KMS CryptoKey named after the organisation UUID, a Kubernetes service account `org-` in the shared app namespace, and a decrypt IAM binding on that key for the KSA principal. `state: disabled` runs teardown: disable the key's primary version, drop the decrypt binding, delete the KSA. The key itself is not destroyed — a destroyed key makes every ciphertext under it permanently unreadable. The local row stays as a tombstone so a later Ensure converges on the same names. + // `state: active` runs Ensure: a Cloud KMS CryptoKey named after the organisation UUID, a Kubernetes service account `org-` in the shared app namespace, and a decrypt IAM binding on that key for the KSA principal. `state: disabled` runs teardown: disable the key's primary version, drop the decrypt binding, delete the KSA. It then stops the organisation's estate: every deployment that is `active` moves to `stopping` and has its drain enqueued, and that stop is one database transaction — the `200` is returned only once it has committed, so it guarantees every deployment that was active is on its way to `stopped`. The key itself is not destroyed — a destroyed key makes every ciphertext under it permanently unreadable. The local row stays as a tombstone so a later Ensure converges on the same names; a later Ensure does not resume the deployments this disable stopped — restoring the organisation's IAM is not the same decision as restarting its workload, and this route does not conflate them. A stopped deployment stays stopped until its own resume call, the same as one the customer stopped directly. // - // A retry after a partial failure converges rather than duplicating objects. `200` returns the resulting receipt. `503` when Cloud KMS key-admin is rate-limited (60 writes/min) or otherwise unavailable; the caller (admin-api Messenger) retries the same PUT. + // A retry after a partial failure converges rather than duplicating objects. `200` returns the resulting receipt. `503` when Cloud KMS key-admin is rate-limited (60 writes/min) or otherwise unavailable, or when the tenancy was disabled but the deployment stop could not be committed — the tenancy row is already `disabled` in that case, and the same PUT retried stops whatever is still active; the caller (admin-api Messenger) retries the same PUT either way. // // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // @@ -7628,6 +7624,60 @@ type ClientWithResponsesInterface interface { // Corresponds with PUT /v1/secrets/{secretName} (the `UpdateSecret` operationId). UpdateSecretWithResponse(ctx context.Context, secretName SecretName, body UpdateSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSecretResponse, error) + // CreateSourceUploadWithBodyWithResponse Create a source upload + // + // Creates an upload session for a source archive. The session belongs to the authenticated organization and names no app: an upload precedes any app, and the source it publishes may back several. The response contains a short-lived transfer instruction for one exact staging object. Repeating the request with the same idempotency key and declaration while the session is pending and unexpired returns the same upload resource with a refreshed transfer instruction. Replays with a different declaration, or after the session becomes ready, rejected, expired, or deleted, return `409`. + // + // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v1/source-uploads (the `CreateSourceUpload` operationId). + CreateSourceUploadWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSourceUploadResponse, error) + + // CreateSourceUploadWithResponse Create a source upload + // + // Creates an upload session for a source archive. The session belongs to the authenticated organization and names no app: an upload precedes any app, and the source it publishes may back several. The response contains a short-lived transfer instruction for one exact staging object. Repeating the request with the same idempotency key and declaration while the session is pending and unexpired returns the same upload resource with a refreshed transfer instruction. Replays with a different declaration, or after the session becomes ready, rejected, expired, or deleted, return `409`. + // + // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v1/source-uploads (the `CreateSourceUpload` operationId). + CreateSourceUploadWithResponse(ctx context.Context, body CreateSourceUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSourceUploadResponse, error) + + // DeleteSourceUploadWithResponse Abort a source upload + // + // Aborts an upload that has not published its source and removes its staging object. The session remains as a deleted tombstone so its staging key cannot be reused. Repeating a successful abort is idempotent. A `ready` upload cannot be aborted: the source it published is a resource in its own right, and the request answers `409` with type `source-upload-completed`. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with DELETE /v1/source-uploads/{uploadId} (the `DeleteSourceUpload` operationId). + DeleteSourceUploadWithResponse(ctx context.Context, uploadId SourceUploadId, reqEditors ...RequestEditorFn) (*DeleteSourceUploadResponse, error) + + // GetSourceUploadWithResponse Get a source upload + // + // Returns the upload session belonging to the authenticated organization. Once the upload is `ready` the session carries the `sourceId` it published. An upload belonging to another organization returns `404`. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /v1/source-uploads/{uploadId} (the `GetSourceUpload` operationId). + GetSourceUploadWithResponse(ctx context.Context, uploadId SourceUploadId, reqEditors ...RequestEditorFn) (*GetSourceUploadResponse, error) + + // CompleteSourceUploadWithResponse Complete a source upload + // + // Verifies the staging object's length, content type, and SHA-256 digest against the session declaration, applies the archive rules for the source type, and publishes the verified bytes as an immutable source artifact. The first success creates the source and returns the ready session carrying its `sourceId`; a retry returns the same session and the same `sourceId`. A rejected upload keeps its rejection so later retries return the same result. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with POST /v1/source-uploads/{uploadId}/complete (the `CompleteSourceUpload` operationId). + CompleteSourceUploadWithResponse(ctx context.Context, uploadId SourceUploadId, reqEditors ...RequestEditorFn) (*CompleteSourceUploadResponse, error) + + // GetSourceWithResponse Get a source + // + // Returns the immutable source artifact a completed upload published: its type and the length and digest upload completion verified. A source is organization-scoped and may be named by any number of apps and versions in that organization; one belonging to another organization returns `404`. There is no list and no delete. + // + // Returns a wrapper object for the known response body format(s). + // + // Corresponds with GET /v1/sources/{sourceId} (the `GetSource` operationId). + GetSourceWithResponse(ctx context.Context, sourceId SourceId, reqEditors ...RequestEditorFn) (*GetSourceResponse, error) + // ListUsageEventsWithResponse List usage events // // Append-only billing telemetry; one row per worker state transition. @@ -8117,6 +8167,8 @@ type ListBuildsResponse struct { // Summary Collection totals for this app's builds list. Independent of the page: the same values on every cursor, including a seek past the last row. `total` counts builds. `versions` counts versions on the same app — the same predicate as `listVersions` `summary.total`, excluding soft-deleted versions. Summary BuildListSummary `json:"summary"` } + // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response + ApplicationproblemJSON400 *BadRequest // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response @@ -8140,6 +8192,11 @@ func (r ListBuildsResponse) GetJSON200() *struct { return r.JSON200 } +// GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response +func (r ListBuildsResponse) GetApplicationproblemJSON400() *BadRequest { + return r.ApplicationproblemJSON400 +} + // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response func (r ListBuildsResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 @@ -8284,6 +8341,8 @@ type GetBuildResponse struct { HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *Build + // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response + ApplicationproblemJSON400 *BadRequest // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response @@ -8299,6 +8358,11 @@ func (r GetBuildResponse) GetJSON200() *Build { return r.JSON200 } +// GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response +func (r GetBuildResponse) GetApplicationproblemJSON400() *BadRequest { + return r.ApplicationproblemJSON400 +} + // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response func (r GetBuildResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 @@ -8624,6 +8688,8 @@ type ListAppEnvironmentVariablesResponse struct { // NextCursor Cursor for the next page; null when there are no more items. NextCursor *string `json:"nextCursor,omitempty"` } + // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response + ApplicationproblemJSON400 *BadRequest // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response @@ -8644,6 +8710,11 @@ func (r ListAppEnvironmentVariablesResponse) GetJSON200() *struct { return r.JSON200 } +// GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response +func (r ListAppEnvironmentVariablesResponse) GetApplicationproblemJSON400() *BadRequest { + return r.ApplicationproblemJSON400 +} + // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response func (r ListAppEnvironmentVariablesResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 @@ -8848,6 +8919,8 @@ type ListAppEventsResponse struct { // NextCursor Cursor for the next page; null when there are no more items. NextCursor *string `json:"nextCursor,omitempty"` } + // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response + ApplicationproblemJSON400 *BadRequest // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response @@ -8868,8 +8941,13 @@ func (r ListAppEventsResponse) GetJSON200() *struct { return r.JSON200 } -// GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r ListAppEventsResponse) GetApplicationproblemJSON401() *Unauthorized { +// GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response +func (r ListAppEventsResponse) GetApplicationproblemJSON400() *BadRequest { + return r.ApplicationproblemJSON400 +} + +// GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response +func (r ListAppEventsResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } @@ -9563,74 +9641,60 @@ func (r DetachAppSecretResponse) ContentType() string { return "" } -type CreateSourceUploadResponse struct { +type StopAppResponse struct { Body []byte HTTPResponse *http.Response - // JSON201 the response for an HTTP 201 `application/json` response - JSON201 *SourceUploadCreation - // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response - ApplicationproblemJSON400 *BadRequest + // JSON202 the response for an HTTP 202 `application/json` response + JSON202 *App // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *Forbidden + // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response + ApplicationproblemJSON404 *NotFound // ApplicationproblemJSON409 the response for an HTTP 409 `application/problem+json` response ApplicationproblemJSON409 *Conflict - // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response - ApplicationproblemJSON422 *ValidationError - // ApplicationproblemJSON502 the response for an HTTP 502 `application/problem+json` response - ApplicationproblemJSON502 *BadGateway // ApplicationproblemJSON503 the response for an HTTP 503 `application/problem+json` response ApplicationproblemJSON503 *ServiceUnavailable } -// GetJSON201 returns the response for an HTTP 201 `application/json` response -func (r CreateSourceUploadResponse) GetJSON201() *SourceUploadCreation { - return r.JSON201 -} - -// GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response -func (r CreateSourceUploadResponse) GetApplicationproblemJSON400() *BadRequest { - return r.ApplicationproblemJSON400 +// GetJSON202 returns the response for an HTTP 202 `application/json` response +func (r StopAppResponse) GetJSON202() *App { + return r.JSON202 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r CreateSourceUploadResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r StopAppResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r CreateSourceUploadResponse) GetApplicationproblemJSON403() *Forbidden { +func (r StopAppResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } -// GetApplicationproblemJSON409 returns the response for an HTTP 409 `application/problem+json` response -func (r CreateSourceUploadResponse) GetApplicationproblemJSON409() *Conflict { - return r.ApplicationproblemJSON409 -} - -// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response -func (r CreateSourceUploadResponse) GetApplicationproblemJSON422() *ValidationError { - return r.ApplicationproblemJSON422 +// GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response +func (r StopAppResponse) GetApplicationproblemJSON404() *NotFound { + return r.ApplicationproblemJSON404 } -// GetApplicationproblemJSON502 returns the response for an HTTP 502 `application/problem+json` response -func (r CreateSourceUploadResponse) GetApplicationproblemJSON502() *BadGateway { - return r.ApplicationproblemJSON502 +// GetApplicationproblemJSON409 returns the response for an HTTP 409 `application/problem+json` response +func (r StopAppResponse) GetApplicationproblemJSON409() *Conflict { + return r.ApplicationproblemJSON409 } // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r CreateSourceUploadResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r StopAppResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r CreateSourceUploadResponse) GetBody() []byte { +func (r StopAppResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r CreateSourceUploadResponse) Status() string { +func (r StopAppResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9638,7 +9702,7 @@ func (r CreateSourceUploadResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateSourceUploadResponse) StatusCode() int { +func (r StopAppResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -9646,16 +9710,23 @@ func (r CreateSourceUploadResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r CreateSourceUploadResponse) ContentType() string { +func (r StopAppResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type DeleteSourceUploadResponse struct { +type ListTasksResponse struct { Body []byte HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *struct { + Data *[]Task `json:"data,omitempty"` + + // NextCursor Cursor for the next page; null when there are no more items. + NextCursor *string `json:"nextCursor,omitempty"` + } // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response ApplicationproblemJSON400 *BadRequest // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response @@ -9664,63 +9735,59 @@ type DeleteSourceUploadResponse struct { ApplicationproblemJSON403 *Forbidden // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response ApplicationproblemJSON404 *NotFound - // ApplicationproblemJSON409 the response for an HTTP 409 `application/problem+json` response - ApplicationproblemJSON409 *Conflict // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ValidationError - // ApplicationproblemJSON502 the response for an HTTP 502 `application/problem+json` response - ApplicationproblemJSON502 *BadGateway // ApplicationproblemJSON503 the response for an HTTP 503 `application/problem+json` response ApplicationproblemJSON503 *ServiceUnavailable } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r ListTasksResponse) GetJSON200() *struct { + Data *[]Task `json:"data,omitempty"` + + // NextCursor Cursor for the next page; null when there are no more items. + NextCursor *string `json:"nextCursor,omitempty"` +} { + return r.JSON200 +} + // GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response -func (r DeleteSourceUploadResponse) GetApplicationproblemJSON400() *BadRequest { +func (r ListTasksResponse) GetApplicationproblemJSON400() *BadRequest { return r.ApplicationproblemJSON400 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r DeleteSourceUploadResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r ListTasksResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r DeleteSourceUploadResponse) GetApplicationproblemJSON403() *Forbidden { +func (r ListTasksResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r DeleteSourceUploadResponse) GetApplicationproblemJSON404() *NotFound { +func (r ListTasksResponse) GetApplicationproblemJSON404() *NotFound { return r.ApplicationproblemJSON404 } -// GetApplicationproblemJSON409 returns the response for an HTTP 409 `application/problem+json` response -func (r DeleteSourceUploadResponse) GetApplicationproblemJSON409() *Conflict { - return r.ApplicationproblemJSON409 -} - // GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response -func (r DeleteSourceUploadResponse) GetApplicationproblemJSON422() *ValidationError { +func (r ListTasksResponse) GetApplicationproblemJSON422() *ValidationError { return r.ApplicationproblemJSON422 } -// GetApplicationproblemJSON502 returns the response for an HTTP 502 `application/problem+json` response -func (r DeleteSourceUploadResponse) GetApplicationproblemJSON502() *BadGateway { - return r.ApplicationproblemJSON502 -} - // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r DeleteSourceUploadResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r ListTasksResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r DeleteSourceUploadResponse) GetBody() []byte { +func (r ListTasksResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r DeleteSourceUploadResponse) Status() string { +func (r ListTasksResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9728,7 +9795,7 @@ func (r DeleteSourceUploadResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteSourceUploadResponse) StatusCode() int { +func (r ListTasksResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -9736,74 +9803,60 @@ func (r DeleteSourceUploadResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r DeleteSourceUploadResponse) ContentType() string { +func (r ListTasksResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type GetSourceUploadResponse struct { +type GetTaskResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response - JSON200 *SourceUpload - // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response - ApplicationproblemJSON400 *BadRequest + JSON200 *Task // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *Forbidden // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response ApplicationproblemJSON404 *NotFound - // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response - ApplicationproblemJSON422 *ValidationError // ApplicationproblemJSON503 the response for an HTTP 503 `application/problem+json` response ApplicationproblemJSON503 *ServiceUnavailable } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetSourceUploadResponse) GetJSON200() *SourceUpload { +func (r GetTaskResponse) GetJSON200() *Task { return r.JSON200 } -// GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response -func (r GetSourceUploadResponse) GetApplicationproblemJSON400() *BadRequest { - return r.ApplicationproblemJSON400 -} - // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r GetSourceUploadResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r GetTaskResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r GetSourceUploadResponse) GetApplicationproblemJSON403() *Forbidden { +func (r GetTaskResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r GetSourceUploadResponse) GetApplicationproblemJSON404() *NotFound { +func (r GetTaskResponse) GetApplicationproblemJSON404() *NotFound { return r.ApplicationproblemJSON404 } -// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response -func (r GetSourceUploadResponse) GetApplicationproblemJSON422() *ValidationError { - return r.ApplicationproblemJSON422 -} - // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r GetSourceUploadResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r GetTaskResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r GetSourceUploadResponse) GetBody() []byte { +func (r GetTaskResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetSourceUploadResponse) Status() string { +func (r GetTaskResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9811,7 +9864,7 @@ func (r GetSourceUploadResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetSourceUploadResponse) StatusCode() int { +func (r GetTaskResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -9819,18 +9872,26 @@ func (r GetSourceUploadResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetSourceUploadResponse) ContentType() string { +func (r GetTaskResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type CompleteSourceUploadResponse struct { +type ListVersionsResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response - JSON200 *SourceUpload + JSON200 *struct { + Data []Version `json:"data"` + + // NextCursor Cursor for the next page; null when there are no more items. + NextCursor *string `json:"nextCursor,omitempty"` + + // Summary Collection totals for a paged list. Independent of the page: `total` is the COUNT of items in the collection and is the same value on every page, including a cursor that seeks past the last row. + Summary ListSummary `json:"summary"` + } // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response ApplicationproblemJSON400 *BadRequest // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response @@ -9839,68 +9900,55 @@ type CompleteSourceUploadResponse struct { ApplicationproblemJSON403 *Forbidden // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response ApplicationproblemJSON404 *NotFound - // ApplicationproblemJSON409 the response for an HTTP 409 `application/problem+json` response - ApplicationproblemJSON409 *Conflict - // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response - ApplicationproblemJSON422 *ValidationError - // ApplicationproblemJSON502 the response for an HTTP 502 `application/problem+json` response - ApplicationproblemJSON502 *BadGateway // ApplicationproblemJSON503 the response for an HTTP 503 `application/problem+json` response ApplicationproblemJSON503 *ServiceUnavailable } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r CompleteSourceUploadResponse) GetJSON200() *SourceUpload { +func (r ListVersionsResponse) GetJSON200() *struct { + Data []Version `json:"data"` + + // NextCursor Cursor for the next page; null when there are no more items. + NextCursor *string `json:"nextCursor,omitempty"` + + // Summary Collection totals for a paged list. Independent of the page: `total` is the COUNT of items in the collection and is the same value on every page, including a cursor that seeks past the last row. + Summary ListSummary `json:"summary"` +} { return r.JSON200 } // GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response -func (r CompleteSourceUploadResponse) GetApplicationproblemJSON400() *BadRequest { +func (r ListVersionsResponse) GetApplicationproblemJSON400() *BadRequest { return r.ApplicationproblemJSON400 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r CompleteSourceUploadResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r ListVersionsResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r CompleteSourceUploadResponse) GetApplicationproblemJSON403() *Forbidden { +func (r ListVersionsResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r CompleteSourceUploadResponse) GetApplicationproblemJSON404() *NotFound { +func (r ListVersionsResponse) GetApplicationproblemJSON404() *NotFound { return r.ApplicationproblemJSON404 } -// GetApplicationproblemJSON409 returns the response for an HTTP 409 `application/problem+json` response -func (r CompleteSourceUploadResponse) GetApplicationproblemJSON409() *Conflict { - return r.ApplicationproblemJSON409 -} - -// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response -func (r CompleteSourceUploadResponse) GetApplicationproblemJSON422() *ValidationError { - return r.ApplicationproblemJSON422 -} - -// GetApplicationproblemJSON502 returns the response for an HTTP 502 `application/problem+json` response -func (r CompleteSourceUploadResponse) GetApplicationproblemJSON502() *BadGateway { - return r.ApplicationproblemJSON502 -} - // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r CompleteSourceUploadResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r ListVersionsResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r CompleteSourceUploadResponse) GetBody() []byte { +func (r ListVersionsResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r CompleteSourceUploadResponse) Status() string { +func (r ListVersionsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9908,7 +9956,7 @@ func (r CompleteSourceUploadResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CompleteSourceUploadResponse) StatusCode() int { +func (r ListVersionsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -9916,18 +9964,18 @@ func (r CompleteSourceUploadResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r CompleteSourceUploadResponse) ContentType() string { +func (r ListVersionsResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type StopAppResponse struct { +type DeleteVersionResponse struct { Body []byte HTTPResponse *http.Response - // JSON202 the response for an HTTP 202 `application/json` response - JSON202 *App + // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response + ApplicationproblemJSON400 *BadRequest // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response @@ -9940,43 +9988,43 @@ type StopAppResponse struct { ApplicationproblemJSON503 *ServiceUnavailable } -// GetJSON202 returns the response for an HTTP 202 `application/json` response -func (r StopAppResponse) GetJSON202() *App { - return r.JSON202 +// GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response +func (r DeleteVersionResponse) GetApplicationproblemJSON400() *BadRequest { + return r.ApplicationproblemJSON400 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r StopAppResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r DeleteVersionResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r StopAppResponse) GetApplicationproblemJSON403() *Forbidden { +func (r DeleteVersionResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r StopAppResponse) GetApplicationproblemJSON404() *NotFound { +func (r DeleteVersionResponse) GetApplicationproblemJSON404() *NotFound { return r.ApplicationproblemJSON404 } // GetApplicationproblemJSON409 returns the response for an HTTP 409 `application/problem+json` response -func (r StopAppResponse) GetApplicationproblemJSON409() *Conflict { +func (r DeleteVersionResponse) GetApplicationproblemJSON409() *Conflict { return r.ApplicationproblemJSON409 } // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r StopAppResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r DeleteVersionResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r StopAppResponse) GetBody() []byte { +func (r DeleteVersionResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r StopAppResponse) Status() string { +func (r DeleteVersionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9984,7 +10032,7 @@ func (r StopAppResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r StopAppResponse) StatusCode() int { +func (r DeleteVersionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -9992,23 +10040,18 @@ func (r StopAppResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r StopAppResponse) ContentType() string { +func (r DeleteVersionResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type ListTasksResponse struct { +type GetVersionResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response - JSON200 *struct { - Data *[]Task `json:"data,omitempty"` - - // NextCursor Cursor for the next page; null when there are no more items. - NextCursor *string `json:"nextCursor,omitempty"` - } + JSON200 *Version // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response ApplicationproblemJSON400 *BadRequest // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response @@ -10017,59 +10060,47 @@ type ListTasksResponse struct { ApplicationproblemJSON403 *Forbidden // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response ApplicationproblemJSON404 *NotFound - // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response - ApplicationproblemJSON422 *ValidationError // ApplicationproblemJSON503 the response for an HTTP 503 `application/problem+json` response ApplicationproblemJSON503 *ServiceUnavailable } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r ListTasksResponse) GetJSON200() *struct { - Data *[]Task `json:"data,omitempty"` - - // NextCursor Cursor for the next page; null when there are no more items. - NextCursor *string `json:"nextCursor,omitempty"` -} { - return r.JSON200 -} +func (r GetVersionResponse) GetJSON200() *Version { + return r.JSON200 +} // GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response -func (r ListTasksResponse) GetApplicationproblemJSON400() *BadRequest { +func (r GetVersionResponse) GetApplicationproblemJSON400() *BadRequest { return r.ApplicationproblemJSON400 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r ListTasksResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r GetVersionResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r ListTasksResponse) GetApplicationproblemJSON403() *Forbidden { +func (r GetVersionResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r ListTasksResponse) GetApplicationproblemJSON404() *NotFound { +func (r GetVersionResponse) GetApplicationproblemJSON404() *NotFound { return r.ApplicationproblemJSON404 } -// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response -func (r ListTasksResponse) GetApplicationproblemJSON422() *ValidationError { - return r.ApplicationproblemJSON422 -} - // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r ListTasksResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r GetVersionResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r ListTasksResponse) GetBody() []byte { +func (r GetVersionResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r ListTasksResponse) Status() string { +func (r GetVersionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10077,7 +10108,7 @@ func (r ListTasksResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListTasksResponse) StatusCode() int { +func (r GetVersionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -10085,60 +10116,84 @@ func (r ListTasksResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r ListTasksResponse) ContentType() string { +func (r GetVersionResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type GetTaskResponse struct { +type ListWorkersResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response - JSON200 *Task + JSON200 *struct { + Data *[]Worker `json:"data,omitempty"` + + // NextCursor Cursor for the next page; null when there are no more items. + NextCursor *string `json:"nextCursor,omitempty"` + } + // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response + ApplicationproblemJSON400 *BadRequest // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *Forbidden // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response ApplicationproblemJSON404 *NotFound + // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response + ApplicationproblemJSON422 *ValidationError // ApplicationproblemJSON503 the response for an HTTP 503 `application/problem+json` response ApplicationproblemJSON503 *ServiceUnavailable } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetTaskResponse) GetJSON200() *Task { +func (r ListWorkersResponse) GetJSON200() *struct { + Data *[]Worker `json:"data,omitempty"` + + // NextCursor Cursor for the next page; null when there are no more items. + NextCursor *string `json:"nextCursor,omitempty"` +} { return r.JSON200 } +// GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response +func (r ListWorkersResponse) GetApplicationproblemJSON400() *BadRequest { + return r.ApplicationproblemJSON400 +} + // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r GetTaskResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r ListWorkersResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r GetTaskResponse) GetApplicationproblemJSON403() *Forbidden { +func (r ListWorkersResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r GetTaskResponse) GetApplicationproblemJSON404() *NotFound { +func (r ListWorkersResponse) GetApplicationproblemJSON404() *NotFound { return r.ApplicationproblemJSON404 } +// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response +func (r ListWorkersResponse) GetApplicationproblemJSON422() *ValidationError { + return r.ApplicationproblemJSON422 +} + // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r GetTaskResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r ListWorkersResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r GetTaskResponse) GetBody() []byte { +func (r ListWorkersResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetTaskResponse) Status() string { +func (r ListWorkersResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10146,7 +10201,7 @@ func (r GetTaskResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetTaskResponse) StatusCode() int { +func (r ListWorkersResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -10154,76 +10209,74 @@ func (r GetTaskResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetTaskResponse) ContentType() string { +func (r ListWorkersResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type ListVersionsResponse struct { +type GetWorkerResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response - JSON200 *struct { - Data []Version `json:"data"` - - // NextCursor Cursor for the next page; null when there are no more items. - NextCursor *string `json:"nextCursor,omitempty"` - - // Summary Collection totals for a paged list. Independent of the page: `total` is the COUNT of items in the collection and is the same value on every page, including a cursor that seeks past the last row. - Summary ListSummary `json:"summary"` - } + JSON200 *Worker + // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response + ApplicationproblemJSON400 *BadRequest // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *Forbidden // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response ApplicationproblemJSON404 *NotFound + // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response + ApplicationproblemJSON422 *ValidationError // ApplicationproblemJSON503 the response for an HTTP 503 `application/problem+json` response ApplicationproblemJSON503 *ServiceUnavailable } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r ListVersionsResponse) GetJSON200() *struct { - Data []Version `json:"data"` - - // NextCursor Cursor for the next page; null when there are no more items. - NextCursor *string `json:"nextCursor,omitempty"` - - // Summary Collection totals for a paged list. Independent of the page: `total` is the COUNT of items in the collection and is the same value on every page, including a cursor that seeks past the last row. - Summary ListSummary `json:"summary"` -} { +func (r GetWorkerResponse) GetJSON200() *Worker { return r.JSON200 } +// GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response +func (r GetWorkerResponse) GetApplicationproblemJSON400() *BadRequest { + return r.ApplicationproblemJSON400 +} + // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r ListVersionsResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r GetWorkerResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r ListVersionsResponse) GetApplicationproblemJSON403() *Forbidden { +func (r GetWorkerResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r ListVersionsResponse) GetApplicationproblemJSON404() *NotFound { +func (r GetWorkerResponse) GetApplicationproblemJSON404() *NotFound { return r.ApplicationproblemJSON404 } +// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response +func (r GetWorkerResponse) GetApplicationproblemJSON422() *ValidationError { + return r.ApplicationproblemJSON422 +} + // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r ListVersionsResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r GetWorkerResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r ListVersionsResponse) GetBody() []byte { +func (r GetWorkerResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r ListVersionsResponse) Status() string { +func (r GetWorkerResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10231,7 +10284,7 @@ func (r ListVersionsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListVersionsResponse) StatusCode() int { +func (r GetWorkerResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -10239,60 +10292,53 @@ func (r ListVersionsResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r ListVersionsResponse) ContentType() string { +func (r GetWorkerResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type DeleteVersionResponse struct { +type ListGpuTypesResponse struct { Body []byte HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *GpuTypeList // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *Forbidden - // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response - ApplicationproblemJSON404 *NotFound - // ApplicationproblemJSON409 the response for an HTTP 409 `application/problem+json` response - ApplicationproblemJSON409 *Conflict // ApplicationproblemJSON503 the response for an HTTP 503 `application/problem+json` response ApplicationproblemJSON503 *ServiceUnavailable } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r ListGpuTypesResponse) GetJSON200() *GpuTypeList { + return r.JSON200 +} + // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r DeleteVersionResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r ListGpuTypesResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r DeleteVersionResponse) GetApplicationproblemJSON403() *Forbidden { +func (r ListGpuTypesResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } -// GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r DeleteVersionResponse) GetApplicationproblemJSON404() *NotFound { - return r.ApplicationproblemJSON404 -} - -// GetApplicationproblemJSON409 returns the response for an HTTP 409 `application/problem+json` response -func (r DeleteVersionResponse) GetApplicationproblemJSON409() *Conflict { - return r.ApplicationproblemJSON409 -} - // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r DeleteVersionResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r ListGpuTypesResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r DeleteVersionResponse) GetBody() []byte { +func (r ListGpuTypesResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r DeleteVersionResponse) Status() string { +func (r ListGpuTypesResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10300,7 +10346,7 @@ func (r DeleteVersionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteVersionResponse) StatusCode() int { +func (r ListGpuTypesResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -10308,60 +10354,74 @@ func (r DeleteVersionResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r DeleteVersionResponse) ContentType() string { +func (r ListGpuTypesResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type GetVersionResponse struct { +type CreateGpuTypeResponse struct { Body []byte HTTPResponse *http.Response - // JSON200 the response for an HTTP 200 `application/json` response - JSON200 *Version + // JSON201 the response for an HTTP 201 `application/json` response + JSON201 *GpuType + // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response + ApplicationproblemJSON400 *BadRequest // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *Forbidden - // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response - ApplicationproblemJSON404 *NotFound + // ApplicationproblemJSON409 the response for an HTTP 409 `application/problem+json` response + ApplicationproblemJSON409 *Conflict + // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response + ApplicationproblemJSON422 *ValidationError // ApplicationproblemJSON503 the response for an HTTP 503 `application/problem+json` response ApplicationproblemJSON503 *ServiceUnavailable } -// GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetVersionResponse) GetJSON200() *Version { - return r.JSON200 +// GetJSON201 returns the response for an HTTP 201 `application/json` response +func (r CreateGpuTypeResponse) GetJSON201() *GpuType { + return r.JSON201 +} + +// GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response +func (r CreateGpuTypeResponse) GetApplicationproblemJSON400() *BadRequest { + return r.ApplicationproblemJSON400 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r GetVersionResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r CreateGpuTypeResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r GetVersionResponse) GetApplicationproblemJSON403() *Forbidden { +func (r CreateGpuTypeResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } -// GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r GetVersionResponse) GetApplicationproblemJSON404() *NotFound { - return r.ApplicationproblemJSON404 +// GetApplicationproblemJSON409 returns the response for an HTTP 409 `application/problem+json` response +func (r CreateGpuTypeResponse) GetApplicationproblemJSON409() *Conflict { + return r.ApplicationproblemJSON409 +} + +// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response +func (r CreateGpuTypeResponse) GetApplicationproblemJSON422() *ValidationError { + return r.ApplicationproblemJSON422 } // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r GetVersionResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r CreateGpuTypeResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r GetVersionResponse) GetBody() []byte { +func (r CreateGpuTypeResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetVersionResponse) Status() string { +func (r CreateGpuTypeResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10369,7 +10429,7 @@ func (r GetVersionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetVersionResponse) StatusCode() int { +func (r CreateGpuTypeResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -10377,84 +10437,67 @@ func (r GetVersionResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetVersionResponse) ContentType() string { +func (r CreateGpuTypeResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type ListWorkersResponse struct { +type DeleteGpuTypeResponse struct { Body []byte HTTPResponse *http.Response - // JSON200 the response for an HTTP 200 `application/json` response - JSON200 *struct { - Data *[]Worker `json:"data,omitempty"` - - // NextCursor Cursor for the next page; null when there are no more items. - NextCursor *string `json:"nextCursor,omitempty"` - } - // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response - ApplicationproblemJSON400 *BadRequest // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *Forbidden // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response ApplicationproblemJSON404 *NotFound + // ApplicationproblemJSON409 the response for an HTTP 409 `application/problem+json` response + ApplicationproblemJSON409 *Conflict // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ValidationError // ApplicationproblemJSON503 the response for an HTTP 503 `application/problem+json` response ApplicationproblemJSON503 *ServiceUnavailable } -// GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r ListWorkersResponse) GetJSON200() *struct { - Data *[]Worker `json:"data,omitempty"` - - // NextCursor Cursor for the next page; null when there are no more items. - NextCursor *string `json:"nextCursor,omitempty"` -} { - return r.JSON200 -} - -// GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response -func (r ListWorkersResponse) GetApplicationproblemJSON400() *BadRequest { - return r.ApplicationproblemJSON400 -} - // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r ListWorkersResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r DeleteGpuTypeResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r ListWorkersResponse) GetApplicationproblemJSON403() *Forbidden { +func (r DeleteGpuTypeResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r ListWorkersResponse) GetApplicationproblemJSON404() *NotFound { +func (r DeleteGpuTypeResponse) GetApplicationproblemJSON404() *NotFound { return r.ApplicationproblemJSON404 } +// GetApplicationproblemJSON409 returns the response for an HTTP 409 `application/problem+json` response +func (r DeleteGpuTypeResponse) GetApplicationproblemJSON409() *Conflict { + return r.ApplicationproblemJSON409 +} + // GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response -func (r ListWorkersResponse) GetApplicationproblemJSON422() *ValidationError { +func (r DeleteGpuTypeResponse) GetApplicationproblemJSON422() *ValidationError { return r.ApplicationproblemJSON422 } // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r ListWorkersResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r DeleteGpuTypeResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r ListWorkersResponse) GetBody() []byte { +func (r DeleteGpuTypeResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r ListWorkersResponse) Status() string { +func (r DeleteGpuTypeResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10462,7 +10505,7 @@ func (r ListWorkersResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListWorkersResponse) StatusCode() int { +func (r DeleteGpuTypeResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -10470,20 +10513,18 @@ func (r ListWorkersResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r ListWorkersResponse) ContentType() string { +func (r DeleteGpuTypeResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type GetWorkerResponse struct { +type GetGpuTypeResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response - JSON200 *Worker - // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response - ApplicationproblemJSON400 *BadRequest + JSON200 *GpuType // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response @@ -10497,47 +10538,42 @@ type GetWorkerResponse struct { } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetWorkerResponse) GetJSON200() *Worker { +func (r GetGpuTypeResponse) GetJSON200() *GpuType { return r.JSON200 } -// GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response -func (r GetWorkerResponse) GetApplicationproblemJSON400() *BadRequest { - return r.ApplicationproblemJSON400 -} - // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r GetWorkerResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r GetGpuTypeResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r GetWorkerResponse) GetApplicationproblemJSON403() *Forbidden { +func (r GetGpuTypeResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r GetWorkerResponse) GetApplicationproblemJSON404() *NotFound { +func (r GetGpuTypeResponse) GetApplicationproblemJSON404() *NotFound { return r.ApplicationproblemJSON404 } // GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response -func (r GetWorkerResponse) GetApplicationproblemJSON422() *ValidationError { +func (r GetGpuTypeResponse) GetApplicationproblemJSON422() *ValidationError { return r.ApplicationproblemJSON422 } // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r GetWorkerResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r GetGpuTypeResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r GetWorkerResponse) GetBody() []byte { +func (r GetGpuTypeResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetWorkerResponse) Status() string { +func (r GetGpuTypeResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10545,7 +10581,7 @@ func (r GetWorkerResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetWorkerResponse) StatusCode() int { +func (r GetGpuTypeResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -10553,53 +10589,74 @@ func (r GetWorkerResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetWorkerResponse) ContentType() string { +func (r GetGpuTypeResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type ListGpuTypesResponse struct { +type UpdateGpuTypeResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response - JSON200 *GpuTypeList + JSON200 *GpuType + // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response + ApplicationproblemJSON400 *BadRequest // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *Forbidden + // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response + ApplicationproblemJSON404 *NotFound + // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response + ApplicationproblemJSON422 *ValidationError // ApplicationproblemJSON503 the response for an HTTP 503 `application/problem+json` response ApplicationproblemJSON503 *ServiceUnavailable } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r ListGpuTypesResponse) GetJSON200() *GpuTypeList { +func (r UpdateGpuTypeResponse) GetJSON200() *GpuType { return r.JSON200 } +// GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response +func (r UpdateGpuTypeResponse) GetApplicationproblemJSON400() *BadRequest { + return r.ApplicationproblemJSON400 +} + // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r ListGpuTypesResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r UpdateGpuTypeResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r ListGpuTypesResponse) GetApplicationproblemJSON403() *Forbidden { +func (r UpdateGpuTypeResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } +// GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response +func (r UpdateGpuTypeResponse) GetApplicationproblemJSON404() *NotFound { + return r.ApplicationproblemJSON404 +} + +// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response +func (r UpdateGpuTypeResponse) GetApplicationproblemJSON422() *ValidationError { + return r.ApplicationproblemJSON422 +} + // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r ListGpuTypesResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r UpdateGpuTypeResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r ListGpuTypesResponse) GetBody() []byte { +func (r UpdateGpuTypeResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r ListGpuTypesResponse) Status() string { +func (r UpdateGpuTypeResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10607,7 +10664,7 @@ func (r ListGpuTypesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListGpuTypesResponse) StatusCode() int { +func (r UpdateGpuTypeResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -10615,74 +10672,77 @@ func (r ListGpuTypesResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r ListGpuTypesResponse) ContentType() string { +func (r UpdateGpuTypeResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type CreateGpuTypeResponse struct { +type ListGpuTypePricesResponse struct { Body []byte HTTPResponse *http.Response - // JSON201 the response for an HTTP 201 `application/json` response - JSON201 *GpuType + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *struct { + Data *[]GpuPricingListItem `json:"data,omitempty"` + + // NextCursor Cursor for the next page; null when there are no more items. + NextCursor *string `json:"nextCursor,omitempty"` + } // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response ApplicationproblemJSON400 *BadRequest // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *Forbidden - // ApplicationproblemJSON409 the response for an HTTP 409 `application/problem+json` response - ApplicationproblemJSON409 *Conflict + // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response + ApplicationproblemJSON404 *NotFound // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ValidationError - // ApplicationproblemJSON503 the response for an HTTP 503 `application/problem+json` response - ApplicationproblemJSON503 *ServiceUnavailable } -// GetJSON201 returns the response for an HTTP 201 `application/json` response -func (r CreateGpuTypeResponse) GetJSON201() *GpuType { - return r.JSON201 +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r ListGpuTypePricesResponse) GetJSON200() *struct { + Data *[]GpuPricingListItem `json:"data,omitempty"` + + // NextCursor Cursor for the next page; null when there are no more items. + NextCursor *string `json:"nextCursor,omitempty"` +} { + return r.JSON200 } // GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response -func (r CreateGpuTypeResponse) GetApplicationproblemJSON400() *BadRequest { +func (r ListGpuTypePricesResponse) GetApplicationproblemJSON400() *BadRequest { return r.ApplicationproblemJSON400 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r CreateGpuTypeResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r ListGpuTypePricesResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r CreateGpuTypeResponse) GetApplicationproblemJSON403() *Forbidden { +func (r ListGpuTypePricesResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } -// GetApplicationproblemJSON409 returns the response for an HTTP 409 `application/problem+json` response -func (r CreateGpuTypeResponse) GetApplicationproblemJSON409() *Conflict { - return r.ApplicationproblemJSON409 +// GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response +func (r ListGpuTypePricesResponse) GetApplicationproblemJSON404() *NotFound { + return r.ApplicationproblemJSON404 } // GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response -func (r CreateGpuTypeResponse) GetApplicationproblemJSON422() *ValidationError { +func (r ListGpuTypePricesResponse) GetApplicationproblemJSON422() *ValidationError { return r.ApplicationproblemJSON422 } -// GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r CreateGpuTypeResponse) GetApplicationproblemJSON503() *ServiceUnavailable { - return r.ApplicationproblemJSON503 -} - // GetBody returns the raw response body bytes -func (r CreateGpuTypeResponse) GetBody() []byte { +func (r ListGpuTypePricesResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r CreateGpuTypeResponse) Status() string { +func (r ListGpuTypePricesResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10690,7 +10750,7 @@ func (r CreateGpuTypeResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateGpuTypeResponse) StatusCode() int { +func (r ListGpuTypePricesResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -10698,16 +10758,20 @@ func (r CreateGpuTypeResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r CreateGpuTypeResponse) ContentType() string { +func (r ListGpuTypePricesResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type DeleteGpuTypeResponse struct { +type CreateGpuTypePriceResponse struct { Body []byte HTTPResponse *http.Response + // JSON201 the response for an HTTP 201 `application/json` response + JSON201 *GpuPricing + // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response + ApplicationproblemJSON400 *BadRequest // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response @@ -10718,47 +10782,50 @@ type DeleteGpuTypeResponse struct { ApplicationproblemJSON409 *Conflict // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ValidationError - // ApplicationproblemJSON503 the response for an HTTP 503 `application/problem+json` response - ApplicationproblemJSON503 *ServiceUnavailable +} + +// GetJSON201 returns the response for an HTTP 201 `application/json` response +func (r CreateGpuTypePriceResponse) GetJSON201() *GpuPricing { + return r.JSON201 +} + +// GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response +func (r CreateGpuTypePriceResponse) GetApplicationproblemJSON400() *BadRequest { + return r.ApplicationproblemJSON400 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r DeleteGpuTypeResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r CreateGpuTypePriceResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r DeleteGpuTypeResponse) GetApplicationproblemJSON403() *Forbidden { +func (r CreateGpuTypePriceResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r DeleteGpuTypeResponse) GetApplicationproblemJSON404() *NotFound { +func (r CreateGpuTypePriceResponse) GetApplicationproblemJSON404() *NotFound { return r.ApplicationproblemJSON404 } // GetApplicationproblemJSON409 returns the response for an HTTP 409 `application/problem+json` response -func (r DeleteGpuTypeResponse) GetApplicationproblemJSON409() *Conflict { +func (r CreateGpuTypePriceResponse) GetApplicationproblemJSON409() *Conflict { return r.ApplicationproblemJSON409 } // GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response -func (r DeleteGpuTypeResponse) GetApplicationproblemJSON422() *ValidationError { +func (r CreateGpuTypePriceResponse) GetApplicationproblemJSON422() *ValidationError { return r.ApplicationproblemJSON422 } -// GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r DeleteGpuTypeResponse) GetApplicationproblemJSON503() *ServiceUnavailable { - return r.ApplicationproblemJSON503 -} - // GetBody returns the raw response body bytes -func (r DeleteGpuTypeResponse) GetBody() []byte { +func (r CreateGpuTypePriceResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r DeleteGpuTypeResponse) Status() string { +func (r CreateGpuTypePriceResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10766,7 +10833,7 @@ func (r DeleteGpuTypeResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteGpuTypeResponse) StatusCode() int { +func (r CreateGpuTypePriceResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -10774,67 +10841,67 @@ func (r DeleteGpuTypeResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r DeleteGpuTypeResponse) ContentType() string { +func (r CreateGpuTypePriceResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type GetGpuTypeResponse struct { +type DeleteGpuTypePriceResponse struct { Body []byte HTTPResponse *http.Response - // JSON200 the response for an HTTP 200 `application/json` response - JSON200 *GpuType + // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response + ApplicationproblemJSON400 *BadRequest // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *Forbidden // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response ApplicationproblemJSON404 *NotFound + // ApplicationproblemJSON409 the response for an HTTP 409 `application/problem+json` response + ApplicationproblemJSON409 *Conflict // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ValidationError - // ApplicationproblemJSON503 the response for an HTTP 503 `application/problem+json` response - ApplicationproblemJSON503 *ServiceUnavailable } -// GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetGpuTypeResponse) GetJSON200() *GpuType { - return r.JSON200 +// GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response +func (r DeleteGpuTypePriceResponse) GetApplicationproblemJSON400() *BadRequest { + return r.ApplicationproblemJSON400 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r GetGpuTypeResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r DeleteGpuTypePriceResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r GetGpuTypeResponse) GetApplicationproblemJSON403() *Forbidden { +func (r DeleteGpuTypePriceResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r GetGpuTypeResponse) GetApplicationproblemJSON404() *NotFound { +func (r DeleteGpuTypePriceResponse) GetApplicationproblemJSON404() *NotFound { return r.ApplicationproblemJSON404 } -// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response -func (r GetGpuTypeResponse) GetApplicationproblemJSON422() *ValidationError { - return r.ApplicationproblemJSON422 +// GetApplicationproblemJSON409 returns the response for an HTTP 409 `application/problem+json` response +func (r DeleteGpuTypePriceResponse) GetApplicationproblemJSON409() *Conflict { + return r.ApplicationproblemJSON409 } -// GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r GetGpuTypeResponse) GetApplicationproblemJSON503() *ServiceUnavailable { - return r.ApplicationproblemJSON503 +// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response +func (r DeleteGpuTypePriceResponse) GetApplicationproblemJSON422() *ValidationError { + return r.ApplicationproblemJSON422 } // GetBody returns the raw response body bytes -func (r GetGpuTypeResponse) GetBody() []byte { +func (r DeleteGpuTypePriceResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetGpuTypeResponse) Status() string { +func (r DeleteGpuTypePriceResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10842,7 +10909,7 @@ func (r GetGpuTypeResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetGpuTypeResponse) StatusCode() int { +func (r DeleteGpuTypePriceResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -10850,18 +10917,18 @@ func (r GetGpuTypeResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetGpuTypeResponse) ContentType() string { +func (r DeleteGpuTypePriceResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type UpdateGpuTypeResponse struct { +type UpdateGpuTypePriceResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response - JSON200 *GpuType + JSON200 *GpuPricing // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response ApplicationproblemJSON400 *BadRequest // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response @@ -10870,54 +10937,54 @@ type UpdateGpuTypeResponse struct { ApplicationproblemJSON403 *Forbidden // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response ApplicationproblemJSON404 *NotFound + // ApplicationproblemJSON409 the response for an HTTP 409 `application/problem+json` response + ApplicationproblemJSON409 *Conflict // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ValidationError - // ApplicationproblemJSON503 the response for an HTTP 503 `application/problem+json` response - ApplicationproblemJSON503 *ServiceUnavailable } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r UpdateGpuTypeResponse) GetJSON200() *GpuType { +func (r UpdateGpuTypePriceResponse) GetJSON200() *GpuPricing { return r.JSON200 } // GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response -func (r UpdateGpuTypeResponse) GetApplicationproblemJSON400() *BadRequest { +func (r UpdateGpuTypePriceResponse) GetApplicationproblemJSON400() *BadRequest { return r.ApplicationproblemJSON400 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r UpdateGpuTypeResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r UpdateGpuTypePriceResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r UpdateGpuTypeResponse) GetApplicationproblemJSON403() *Forbidden { +func (r UpdateGpuTypePriceResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r UpdateGpuTypeResponse) GetApplicationproblemJSON404() *NotFound { +func (r UpdateGpuTypePriceResponse) GetApplicationproblemJSON404() *NotFound { return r.ApplicationproblemJSON404 } -// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response -func (r UpdateGpuTypeResponse) GetApplicationproblemJSON422() *ValidationError { - return r.ApplicationproblemJSON422 +// GetApplicationproblemJSON409 returns the response for an HTTP 409 `application/problem+json` response +func (r UpdateGpuTypePriceResponse) GetApplicationproblemJSON409() *Conflict { + return r.ApplicationproblemJSON409 } -// GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r UpdateGpuTypeResponse) GetApplicationproblemJSON503() *ServiceUnavailable { - return r.ApplicationproblemJSON503 +// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response +func (r UpdateGpuTypePriceResponse) GetApplicationproblemJSON422() *ValidationError { + return r.ApplicationproblemJSON422 } // GetBody returns the raw response body bytes -func (r UpdateGpuTypeResponse) GetBody() []byte { +func (r UpdateGpuTypePriceResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r UpdateGpuTypeResponse) Status() string { +func (r UpdateGpuTypePriceResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10925,7 +10992,7 @@ func (r UpdateGpuTypeResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateGpuTypeResponse) StatusCode() int { +func (r UpdateGpuTypePriceResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -10933,23 +11000,23 @@ func (r UpdateGpuTypeResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r UpdateGpuTypeResponse) ContentType() string { +func (r UpdateGpuTypePriceResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type ListGpuTypePricesResponse struct { +// GetLogEntriesResponse429Headers the declared response headers of an HTTP 429 response for GetLogEntries +type GetLogEntriesResponse429Headers struct { + RetryAfter int32 +} + +type GetLogEntriesResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response - JSON200 *struct { - Data *[]GpuPricingListItem `json:"data,omitempty"` - - // NextCursor Cursor for the next page; null when there are no more items. - NextCursor *string `json:"nextCursor,omitempty"` - } + JSON200 *LogEntryPage // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response ApplicationproblemJSON400 *BadRequest // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response @@ -10960,50 +11027,75 @@ type ListGpuTypePricesResponse struct { ApplicationproblemJSON404 *NotFound // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ValidationError + // ApplicationproblemJSON429 the response for an HTTP 429 `application/problem+json` response + ApplicationproblemJSON429 *TooManyRequests + // ApplicationproblemJSON502 the response for an HTTP 502 `application/problem+json` response + ApplicationproblemJSON502 *BadGateway + // ApplicationproblemJSON503 the response for an HTTP 503 `application/problem+json` response + ApplicationproblemJSON503 *ServiceUnavailable + // ApplicationproblemJSON504 the response for an HTTP 504 `application/problem+json` response + ApplicationproblemJSON504 *GatewayTimeout + // Headers429 the parsed response headers for an HTTP 429 response + Headers429 *GetLogEntriesResponse429Headers } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r ListGpuTypePricesResponse) GetJSON200() *struct { - Data *[]GpuPricingListItem `json:"data,omitempty"` - - // NextCursor Cursor for the next page; null when there are no more items. - NextCursor *string `json:"nextCursor,omitempty"` -} { +func (r GetLogEntriesResponse) GetJSON200() *LogEntryPage { return r.JSON200 } // GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response -func (r ListGpuTypePricesResponse) GetApplicationproblemJSON400() *BadRequest { +func (r GetLogEntriesResponse) GetApplicationproblemJSON400() *BadRequest { return r.ApplicationproblemJSON400 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r ListGpuTypePricesResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r GetLogEntriesResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r ListGpuTypePricesResponse) GetApplicationproblemJSON403() *Forbidden { +func (r GetLogEntriesResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r ListGpuTypePricesResponse) GetApplicationproblemJSON404() *NotFound { +func (r GetLogEntriesResponse) GetApplicationproblemJSON404() *NotFound { return r.ApplicationproblemJSON404 } // GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response -func (r ListGpuTypePricesResponse) GetApplicationproblemJSON422() *ValidationError { +func (r GetLogEntriesResponse) GetApplicationproblemJSON422() *ValidationError { return r.ApplicationproblemJSON422 } +// GetApplicationproblemJSON429 returns the response for an HTTP 429 `application/problem+json` response +func (r GetLogEntriesResponse) GetApplicationproblemJSON429() *TooManyRequests { + return r.ApplicationproblemJSON429 +} + +// GetApplicationproblemJSON502 returns the response for an HTTP 502 `application/problem+json` response +func (r GetLogEntriesResponse) GetApplicationproblemJSON502() *BadGateway { + return r.ApplicationproblemJSON502 +} + +// GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response +func (r GetLogEntriesResponse) GetApplicationproblemJSON503() *ServiceUnavailable { + return r.ApplicationproblemJSON503 +} + +// GetApplicationproblemJSON504 returns the response for an HTTP 504 `application/problem+json` response +func (r GetLogEntriesResponse) GetApplicationproblemJSON504() *GatewayTimeout { + return r.ApplicationproblemJSON504 +} + // GetBody returns the raw response body bytes -func (r ListGpuTypePricesResponse) GetBody() []byte { +func (r GetLogEntriesResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r ListGpuTypePricesResponse) Status() string { +func (r GetLogEntriesResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11011,7 +11103,7 @@ func (r ListGpuTypePricesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListGpuTypePricesResponse) StatusCode() int { +func (r GetLogEntriesResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -11019,18 +11111,99 @@ func (r ListGpuTypePricesResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r ListGpuTypePricesResponse) ContentType() string { +func (r GetLogEntriesResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type CreateGpuTypePriceResponse struct { +type ListInsightsQueriesResponse struct { Body []byte HTTPResponse *http.Response - // JSON201 the response for an HTTP 201 `application/json` response - JSON201 *GpuPricing + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *QueryCatalogue + // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response + ApplicationproblemJSON401 *Unauthorized + // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response + ApplicationproblemJSON403 *Forbidden + // ApplicationproblemJSON502 the response for an HTTP 502 `application/problem+json` response + ApplicationproblemJSON502 *BadGateway + // ApplicationproblemJSON503 the response for an HTTP 503 `application/problem+json` response + ApplicationproblemJSON503 *ServiceUnavailable + // ApplicationproblemJSON504 the response for an HTTP 504 `application/problem+json` response + ApplicationproblemJSON504 *GatewayTimeout +} + +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r ListInsightsQueriesResponse) GetJSON200() *QueryCatalogue { + return r.JSON200 +} + +// GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response +func (r ListInsightsQueriesResponse) GetApplicationproblemJSON401() *Unauthorized { + return r.ApplicationproblemJSON401 +} + +// GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response +func (r ListInsightsQueriesResponse) GetApplicationproblemJSON403() *Forbidden { + return r.ApplicationproblemJSON403 +} + +// GetApplicationproblemJSON502 returns the response for an HTTP 502 `application/problem+json` response +func (r ListInsightsQueriesResponse) GetApplicationproblemJSON502() *BadGateway { + return r.ApplicationproblemJSON502 +} + +// GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response +func (r ListInsightsQueriesResponse) GetApplicationproblemJSON503() *ServiceUnavailable { + return r.ApplicationproblemJSON503 +} + +// GetApplicationproblemJSON504 returns the response for an HTTP 504 `application/problem+json` response +func (r ListInsightsQueriesResponse) GetApplicationproblemJSON504() *GatewayTimeout { + return r.ApplicationproblemJSON504 +} + +// GetBody returns the raw response body bytes +func (r ListInsightsQueriesResponse) GetBody() []byte { + return r.Body +} + +// Status returns HTTPResponse.Status +func (r ListInsightsQueriesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListInsightsQueriesResponse) 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 ListInsightsQueriesResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +// GetMetricSeriesResponse429Headers the declared response headers of an HTTP 429 response for GetMetricSeries +type GetMetricSeriesResponse429Headers struct { + RetryAfter int32 +} + +type GetMetricSeriesResponse struct { + Body []byte + HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *MetricSeries // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response ApplicationproblemJSON400 *BadRequest // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response @@ -11039,54 +11212,77 @@ type CreateGpuTypePriceResponse struct { ApplicationproblemJSON403 *Forbidden // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response ApplicationproblemJSON404 *NotFound - // ApplicationproblemJSON409 the response for an HTTP 409 `application/problem+json` response - ApplicationproblemJSON409 *Conflict // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ValidationError + // ApplicationproblemJSON429 the response for an HTTP 429 `application/problem+json` response + ApplicationproblemJSON429 *TooManyRequests + // ApplicationproblemJSON502 the response for an HTTP 502 `application/problem+json` response + ApplicationproblemJSON502 *BadGateway + // ApplicationproblemJSON503 the response for an HTTP 503 `application/problem+json` response + ApplicationproblemJSON503 *ServiceUnavailable + // ApplicationproblemJSON504 the response for an HTTP 504 `application/problem+json` response + ApplicationproblemJSON504 *GatewayTimeout + // Headers429 the parsed response headers for an HTTP 429 response + Headers429 *GetMetricSeriesResponse429Headers } -// GetJSON201 returns the response for an HTTP 201 `application/json` response -func (r CreateGpuTypePriceResponse) GetJSON201() *GpuPricing { - return r.JSON201 +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r GetMetricSeriesResponse) GetJSON200() *MetricSeries { + return r.JSON200 } // GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response -func (r CreateGpuTypePriceResponse) GetApplicationproblemJSON400() *BadRequest { +func (r GetMetricSeriesResponse) GetApplicationproblemJSON400() *BadRequest { return r.ApplicationproblemJSON400 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r CreateGpuTypePriceResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r GetMetricSeriesResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r CreateGpuTypePriceResponse) GetApplicationproblemJSON403() *Forbidden { +func (r GetMetricSeriesResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r CreateGpuTypePriceResponse) GetApplicationproblemJSON404() *NotFound { +func (r GetMetricSeriesResponse) GetApplicationproblemJSON404() *NotFound { return r.ApplicationproblemJSON404 } -// GetApplicationproblemJSON409 returns the response for an HTTP 409 `application/problem+json` response -func (r CreateGpuTypePriceResponse) GetApplicationproblemJSON409() *Conflict { - return r.ApplicationproblemJSON409 -} - // GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response -func (r CreateGpuTypePriceResponse) GetApplicationproblemJSON422() *ValidationError { +func (r GetMetricSeriesResponse) GetApplicationproblemJSON422() *ValidationError { return r.ApplicationproblemJSON422 } +// GetApplicationproblemJSON429 returns the response for an HTTP 429 `application/problem+json` response +func (r GetMetricSeriesResponse) GetApplicationproblemJSON429() *TooManyRequests { + return r.ApplicationproblemJSON429 +} + +// GetApplicationproblemJSON502 returns the response for an HTTP 502 `application/problem+json` response +func (r GetMetricSeriesResponse) GetApplicationproblemJSON502() *BadGateway { + return r.ApplicationproblemJSON502 +} + +// GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response +func (r GetMetricSeriesResponse) GetApplicationproblemJSON503() *ServiceUnavailable { + return r.ApplicationproblemJSON503 +} + +// GetApplicationproblemJSON504 returns the response for an HTTP 504 `application/problem+json` response +func (r GetMetricSeriesResponse) GetApplicationproblemJSON504() *GatewayTimeout { + return r.ApplicationproblemJSON504 +} + // GetBody returns the raw response body bytes -func (r CreateGpuTypePriceResponse) GetBody() []byte { +func (r GetMetricSeriesResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r CreateGpuTypePriceResponse) Status() string { +func (r GetMetricSeriesResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11094,7 +11290,7 @@ func (r CreateGpuTypePriceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateGpuTypePriceResponse) StatusCode() int { +func (r GetMetricSeriesResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -11102,67 +11298,67 @@ func (r CreateGpuTypePriceResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r CreateGpuTypePriceResponse) ContentType() string { +func (r GetMetricSeriesResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type DeleteGpuTypePriceResponse struct { +type UpsertOrgTenancyResponse struct { Body []byte HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *OrgTenancy // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response ApplicationproblemJSON400 *BadRequest // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *Forbidden - // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response - ApplicationproblemJSON404 *NotFound - // ApplicationproblemJSON409 the response for an HTTP 409 `application/problem+json` response - ApplicationproblemJSON409 *Conflict // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ValidationError + // ApplicationproblemJSON503 the response for an HTTP 503 `application/problem+json` response + ApplicationproblemJSON503 *ServiceUnavailable +} + +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r UpsertOrgTenancyResponse) GetJSON200() *OrgTenancy { + return r.JSON200 } // GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response -func (r DeleteGpuTypePriceResponse) GetApplicationproblemJSON400() *BadRequest { +func (r UpsertOrgTenancyResponse) GetApplicationproblemJSON400() *BadRequest { return r.ApplicationproblemJSON400 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r DeleteGpuTypePriceResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r UpsertOrgTenancyResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r DeleteGpuTypePriceResponse) GetApplicationproblemJSON403() *Forbidden { +func (r UpsertOrgTenancyResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } -// GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r DeleteGpuTypePriceResponse) GetApplicationproblemJSON404() *NotFound { - return r.ApplicationproblemJSON404 -} - -// GetApplicationproblemJSON409 returns the response for an HTTP 409 `application/problem+json` response -func (r DeleteGpuTypePriceResponse) GetApplicationproblemJSON409() *Conflict { - return r.ApplicationproblemJSON409 -} - // GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response -func (r DeleteGpuTypePriceResponse) GetApplicationproblemJSON422() *ValidationError { +func (r UpsertOrgTenancyResponse) GetApplicationproblemJSON422() *ValidationError { return r.ApplicationproblemJSON422 } +// GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response +func (r UpsertOrgTenancyResponse) GetApplicationproblemJSON503() *ServiceUnavailable { + return r.ApplicationproblemJSON503 +} + // GetBody returns the raw response body bytes -func (r DeleteGpuTypePriceResponse) GetBody() []byte { +func (r UpsertOrgTenancyResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r DeleteGpuTypePriceResponse) Status() string { +func (r UpsertOrgTenancyResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11170,7 +11366,7 @@ func (r DeleteGpuTypePriceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteGpuTypePriceResponse) StatusCode() int { +func (r UpsertOrgTenancyResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -11178,74 +11374,77 @@ func (r DeleteGpuTypePriceResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r DeleteGpuTypePriceResponse) ContentType() string { +func (r UpsertOrgTenancyResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type UpdateGpuTypePriceResponse struct { +type ListSecretsResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response - JSON200 *GpuPricing + JSON200 *struct { + Data *[]Secret `json:"data,omitempty"` + + // NextCursor Cursor for the next page; null when there are no more items. + NextCursor *string `json:"nextCursor,omitempty"` + } // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response ApplicationproblemJSON400 *BadRequest // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *Forbidden - // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response - ApplicationproblemJSON404 *NotFound - // ApplicationproblemJSON409 the response for an HTTP 409 `application/problem+json` response - ApplicationproblemJSON409 *Conflict // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ValidationError + // ApplicationproblemJSON503 the response for an HTTP 503 `application/problem+json` response + ApplicationproblemJSON503 *ServiceUnavailable } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r UpdateGpuTypePriceResponse) GetJSON200() *GpuPricing { +func (r ListSecretsResponse) GetJSON200() *struct { + Data *[]Secret `json:"data,omitempty"` + + // NextCursor Cursor for the next page; null when there are no more items. + NextCursor *string `json:"nextCursor,omitempty"` +} { return r.JSON200 } // GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response -func (r UpdateGpuTypePriceResponse) GetApplicationproblemJSON400() *BadRequest { +func (r ListSecretsResponse) GetApplicationproblemJSON400() *BadRequest { return r.ApplicationproblemJSON400 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r UpdateGpuTypePriceResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r ListSecretsResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r UpdateGpuTypePriceResponse) GetApplicationproblemJSON403() *Forbidden { +func (r ListSecretsResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } -// GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r UpdateGpuTypePriceResponse) GetApplicationproblemJSON404() *NotFound { - return r.ApplicationproblemJSON404 -} - -// GetApplicationproblemJSON409 returns the response for an HTTP 409 `application/problem+json` response -func (r UpdateGpuTypePriceResponse) GetApplicationproblemJSON409() *Conflict { - return r.ApplicationproblemJSON409 -} - // GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response -func (r UpdateGpuTypePriceResponse) GetApplicationproblemJSON422() *ValidationError { +func (r ListSecretsResponse) GetApplicationproblemJSON422() *ValidationError { return r.ApplicationproblemJSON422 } +// GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response +func (r ListSecretsResponse) GetApplicationproblemJSON503() *ServiceUnavailable { + return r.ApplicationproblemJSON503 +} + // GetBody returns the raw response body bytes -func (r UpdateGpuTypePriceResponse) GetBody() []byte { +func (r ListSecretsResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r UpdateGpuTypePriceResponse) Status() string { +func (r ListSecretsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11253,7 +11452,7 @@ func (r UpdateGpuTypePriceResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateGpuTypePriceResponse) StatusCode() int { +func (r ListSecretsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -11261,102 +11460,74 @@ func (r UpdateGpuTypePriceResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r UpdateGpuTypePriceResponse) ContentType() string { +func (r ListSecretsResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -// GetLogEntriesResponse429Headers the declared response headers of an HTTP 429 response for GetLogEntries -type GetLogEntriesResponse429Headers struct { - RetryAfter int32 -} - -type GetLogEntriesResponse struct { +type CreateSecretResponse struct { Body []byte HTTPResponse *http.Response - // JSON200 the response for an HTTP 200 `application/json` response - JSON200 *LogEntryPage + // JSON201 the response for an HTTP 201 `application/json` response + JSON201 *Secret // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response ApplicationproblemJSON400 *BadRequest // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *Forbidden - // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response - ApplicationproblemJSON404 *NotFound + // ApplicationproblemJSON409 the response for an HTTP 409 `application/problem+json` response + ApplicationproblemJSON409 *Conflict // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ValidationError - // ApplicationproblemJSON429 the response for an HTTP 429 `application/problem+json` response - ApplicationproblemJSON429 *TooManyRequests - // ApplicationproblemJSON502 the response for an HTTP 502 `application/problem+json` response - ApplicationproblemJSON502 *BadGateway // ApplicationproblemJSON503 the response for an HTTP 503 `application/problem+json` response ApplicationproblemJSON503 *ServiceUnavailable - // ApplicationproblemJSON504 the response for an HTTP 504 `application/problem+json` response - ApplicationproblemJSON504 *GatewayTimeout - // Headers429 the parsed response headers for an HTTP 429 response - Headers429 *GetLogEntriesResponse429Headers } -// GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetLogEntriesResponse) GetJSON200() *LogEntryPage { - return r.JSON200 +// GetJSON201 returns the response for an HTTP 201 `application/json` response +func (r CreateSecretResponse) GetJSON201() *Secret { + return r.JSON201 } // GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response -func (r GetLogEntriesResponse) GetApplicationproblemJSON400() *BadRequest { +func (r CreateSecretResponse) GetApplicationproblemJSON400() *BadRequest { return r.ApplicationproblemJSON400 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r GetLogEntriesResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r CreateSecretResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r GetLogEntriesResponse) GetApplicationproblemJSON403() *Forbidden { +func (r CreateSecretResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } -// GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r GetLogEntriesResponse) GetApplicationproblemJSON404() *NotFound { - return r.ApplicationproblemJSON404 +// GetApplicationproblemJSON409 returns the response for an HTTP 409 `application/problem+json` response +func (r CreateSecretResponse) GetApplicationproblemJSON409() *Conflict { + return r.ApplicationproblemJSON409 } // GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response -func (r GetLogEntriesResponse) GetApplicationproblemJSON422() *ValidationError { +func (r CreateSecretResponse) GetApplicationproblemJSON422() *ValidationError { return r.ApplicationproblemJSON422 } -// GetApplicationproblemJSON429 returns the response for an HTTP 429 `application/problem+json` response -func (r GetLogEntriesResponse) GetApplicationproblemJSON429() *TooManyRequests { - return r.ApplicationproblemJSON429 -} - -// GetApplicationproblemJSON502 returns the response for an HTTP 502 `application/problem+json` response -func (r GetLogEntriesResponse) GetApplicationproblemJSON502() *BadGateway { - return r.ApplicationproblemJSON502 -} - // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r GetLogEntriesResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r CreateSecretResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } -// GetApplicationproblemJSON504 returns the response for an HTTP 504 `application/problem+json` response -func (r GetLogEntriesResponse) GetApplicationproblemJSON504() *GatewayTimeout { - return r.ApplicationproblemJSON504 -} - // GetBody returns the raw response body bytes -func (r GetLogEntriesResponse) GetBody() []byte { +func (r CreateSecretResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetLogEntriesResponse) Status() string { +func (r CreateSecretResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11364,7 +11535,7 @@ func (r GetLogEntriesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetLogEntriesResponse) StatusCode() int { +func (r CreateSecretResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -11372,67 +11543,67 @@ func (r GetLogEntriesResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetLogEntriesResponse) ContentType() string { +func (r CreateSecretResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type ListInsightsQueriesResponse struct { +type DeleteSecretResponse struct { Body []byte HTTPResponse *http.Response - // JSON200 the response for an HTTP 200 `application/json` response - JSON200 *QueryCatalogue // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *Forbidden - // ApplicationproblemJSON502 the response for an HTTP 502 `application/problem+json` response - ApplicationproblemJSON502 *BadGateway + // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response + ApplicationproblemJSON404 *NotFound + // ApplicationproblemJSON409 the response for an HTTP 409 `application/problem+json` response + ApplicationproblemJSON409 *Conflict + // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response + ApplicationproblemJSON422 *ValidationError // ApplicationproblemJSON503 the response for an HTTP 503 `application/problem+json` response ApplicationproblemJSON503 *ServiceUnavailable - // ApplicationproblemJSON504 the response for an HTTP 504 `application/problem+json` response - ApplicationproblemJSON504 *GatewayTimeout -} - -// GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r ListInsightsQueriesResponse) GetJSON200() *QueryCatalogue { - return r.JSON200 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r ListInsightsQueriesResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r DeleteSecretResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r ListInsightsQueriesResponse) GetApplicationproblemJSON403() *Forbidden { +func (r DeleteSecretResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } -// GetApplicationproblemJSON502 returns the response for an HTTP 502 `application/problem+json` response -func (r ListInsightsQueriesResponse) GetApplicationproblemJSON502() *BadGateway { - return r.ApplicationproblemJSON502 +// GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response +func (r DeleteSecretResponse) GetApplicationproblemJSON404() *NotFound { + return r.ApplicationproblemJSON404 } -// GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r ListInsightsQueriesResponse) GetApplicationproblemJSON503() *ServiceUnavailable { - return r.ApplicationproblemJSON503 +// GetApplicationproblemJSON409 returns the response for an HTTP 409 `application/problem+json` response +func (r DeleteSecretResponse) GetApplicationproblemJSON409() *Conflict { + return r.ApplicationproblemJSON409 } -// GetApplicationproblemJSON504 returns the response for an HTTP 504 `application/problem+json` response -func (r ListInsightsQueriesResponse) GetApplicationproblemJSON504() *GatewayTimeout { - return r.ApplicationproblemJSON504 +// GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response +func (r DeleteSecretResponse) GetApplicationproblemJSON422() *ValidationError { + return r.ApplicationproblemJSON422 +} + +// GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response +func (r DeleteSecretResponse) GetApplicationproblemJSON503() *ServiceUnavailable { + return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r ListInsightsQueriesResponse) GetBody() []byte { +func (r DeleteSecretResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r ListInsightsQueriesResponse) Status() string { +func (r DeleteSecretResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11440,7 +11611,7 @@ func (r ListInsightsQueriesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListInsightsQueriesResponse) StatusCode() int { +func (r DeleteSecretResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -11448,23 +11619,18 @@ func (r ListInsightsQueriesResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r ListInsightsQueriesResponse) ContentType() string { +func (r DeleteSecretResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -// GetMetricSeriesResponse429Headers the declared response headers of an HTTP 429 response for GetMetricSeries -type GetMetricSeriesResponse429Headers struct { - RetryAfter int32 -} - -type GetMetricSeriesResponse struct { +type UpdateSecretResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response - JSON200 *MetricSeries + JSON200 *Secret // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response ApplicationproblemJSON400 *BadRequest // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response @@ -11475,75 +11641,52 @@ type GetMetricSeriesResponse struct { ApplicationproblemJSON404 *NotFound // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ValidationError - // ApplicationproblemJSON429 the response for an HTTP 429 `application/problem+json` response - ApplicationproblemJSON429 *TooManyRequests - // ApplicationproblemJSON502 the response for an HTTP 502 `application/problem+json` response - ApplicationproblemJSON502 *BadGateway // ApplicationproblemJSON503 the response for an HTTP 503 `application/problem+json` response ApplicationproblemJSON503 *ServiceUnavailable - // ApplicationproblemJSON504 the response for an HTTP 504 `application/problem+json` response - ApplicationproblemJSON504 *GatewayTimeout - // Headers429 the parsed response headers for an HTTP 429 response - Headers429 *GetMetricSeriesResponse429Headers } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetMetricSeriesResponse) GetJSON200() *MetricSeries { +func (r UpdateSecretResponse) GetJSON200() *Secret { return r.JSON200 } // GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response -func (r GetMetricSeriesResponse) GetApplicationproblemJSON400() *BadRequest { +func (r UpdateSecretResponse) GetApplicationproblemJSON400() *BadRequest { return r.ApplicationproblemJSON400 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r GetMetricSeriesResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r UpdateSecretResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r GetMetricSeriesResponse) GetApplicationproblemJSON403() *Forbidden { +func (r UpdateSecretResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r GetMetricSeriesResponse) GetApplicationproblemJSON404() *NotFound { +func (r UpdateSecretResponse) GetApplicationproblemJSON404() *NotFound { return r.ApplicationproblemJSON404 } // GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response -func (r GetMetricSeriesResponse) GetApplicationproblemJSON422() *ValidationError { +func (r UpdateSecretResponse) GetApplicationproblemJSON422() *ValidationError { return r.ApplicationproblemJSON422 } -// GetApplicationproblemJSON429 returns the response for an HTTP 429 `application/problem+json` response -func (r GetMetricSeriesResponse) GetApplicationproblemJSON429() *TooManyRequests { - return r.ApplicationproblemJSON429 -} - -// GetApplicationproblemJSON502 returns the response for an HTTP 502 `application/problem+json` response -func (r GetMetricSeriesResponse) GetApplicationproblemJSON502() *BadGateway { - return r.ApplicationproblemJSON502 -} - // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r GetMetricSeriesResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r UpdateSecretResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } -// GetApplicationproblemJSON504 returns the response for an HTTP 504 `application/problem+json` response -func (r GetMetricSeriesResponse) GetApplicationproblemJSON504() *GatewayTimeout { - return r.ApplicationproblemJSON504 -} - // GetBody returns the raw response body bytes -func (r GetMetricSeriesResponse) GetBody() []byte { +func (r UpdateSecretResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetMetricSeriesResponse) Status() string { +func (r UpdateSecretResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11551,7 +11694,7 @@ func (r GetMetricSeriesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetMetricSeriesResponse) StatusCode() int { +func (r UpdateSecretResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -11559,67 +11702,81 @@ func (r GetMetricSeriesResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetMetricSeriesResponse) ContentType() string { +func (r UpdateSecretResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type UpsertOrgTenancyResponse struct { +type CreateSourceUploadResponse struct { Body []byte HTTPResponse *http.Response - // JSON200 the response for an HTTP 200 `application/json` response - JSON200 *OrgTenancy + // JSON201 the response for an HTTP 201 `application/json` response + JSON201 *SourceUploadCreation // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response ApplicationproblemJSON400 *BadRequest // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *Forbidden + // ApplicationproblemJSON409 the response for an HTTP 409 `application/problem+json` response + ApplicationproblemJSON409 *Conflict // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ValidationError + // ApplicationproblemJSON502 the response for an HTTP 502 `application/problem+json` response + ApplicationproblemJSON502 *BadGateway // ApplicationproblemJSON503 the response for an HTTP 503 `application/problem+json` response ApplicationproblemJSON503 *ServiceUnavailable } -// GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r UpsertOrgTenancyResponse) GetJSON200() *OrgTenancy { - return r.JSON200 +// GetJSON201 returns the response for an HTTP 201 `application/json` response +func (r CreateSourceUploadResponse) GetJSON201() *SourceUploadCreation { + return r.JSON201 } // GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response -func (r UpsertOrgTenancyResponse) GetApplicationproblemJSON400() *BadRequest { +func (r CreateSourceUploadResponse) GetApplicationproblemJSON400() *BadRequest { return r.ApplicationproblemJSON400 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r UpsertOrgTenancyResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r CreateSourceUploadResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r UpsertOrgTenancyResponse) GetApplicationproblemJSON403() *Forbidden { +func (r CreateSourceUploadResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } +// GetApplicationproblemJSON409 returns the response for an HTTP 409 `application/problem+json` response +func (r CreateSourceUploadResponse) GetApplicationproblemJSON409() *Conflict { + return r.ApplicationproblemJSON409 +} + // GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response -func (r UpsertOrgTenancyResponse) GetApplicationproblemJSON422() *ValidationError { +func (r CreateSourceUploadResponse) GetApplicationproblemJSON422() *ValidationError { return r.ApplicationproblemJSON422 } +// GetApplicationproblemJSON502 returns the response for an HTTP 502 `application/problem+json` response +func (r CreateSourceUploadResponse) GetApplicationproblemJSON502() *BadGateway { + return r.ApplicationproblemJSON502 +} + // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r UpsertOrgTenancyResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r CreateSourceUploadResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r UpsertOrgTenancyResponse) GetBody() []byte { +func (r CreateSourceUploadResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r UpsertOrgTenancyResponse) Status() string { +func (r CreateSourceUploadResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11627,7 +11784,7 @@ func (r UpsertOrgTenancyResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpsertOrgTenancyResponse) StatusCode() int { +func (r CreateSourceUploadResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -11635,77 +11792,81 @@ func (r UpsertOrgTenancyResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r UpsertOrgTenancyResponse) ContentType() string { +func (r CreateSourceUploadResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type ListSecretsResponse struct { +type DeleteSourceUploadResponse struct { Body []byte HTTPResponse *http.Response - // JSON200 the response for an HTTP 200 `application/json` response - JSON200 *struct { - Data *[]Secret `json:"data,omitempty"` - - // NextCursor Cursor for the next page; null when there are no more items. - NextCursor *string `json:"nextCursor,omitempty"` - } // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response ApplicationproblemJSON400 *BadRequest // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *Forbidden + // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response + ApplicationproblemJSON404 *NotFound + // ApplicationproblemJSON409 the response for an HTTP 409 `application/problem+json` response + ApplicationproblemJSON409 *Conflict // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ValidationError + // ApplicationproblemJSON502 the response for an HTTP 502 `application/problem+json` response + ApplicationproblemJSON502 *BadGateway // ApplicationproblemJSON503 the response for an HTTP 503 `application/problem+json` response ApplicationproblemJSON503 *ServiceUnavailable } -// GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r ListSecretsResponse) GetJSON200() *struct { - Data *[]Secret `json:"data,omitempty"` - - // NextCursor Cursor for the next page; null when there are no more items. - NextCursor *string `json:"nextCursor,omitempty"` -} { - return r.JSON200 -} - // GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response -func (r ListSecretsResponse) GetApplicationproblemJSON400() *BadRequest { +func (r DeleteSourceUploadResponse) GetApplicationproblemJSON400() *BadRequest { return r.ApplicationproblemJSON400 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r ListSecretsResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r DeleteSourceUploadResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r ListSecretsResponse) GetApplicationproblemJSON403() *Forbidden { +func (r DeleteSourceUploadResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } +// GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response +func (r DeleteSourceUploadResponse) GetApplicationproblemJSON404() *NotFound { + return r.ApplicationproblemJSON404 +} + +// GetApplicationproblemJSON409 returns the response for an HTTP 409 `application/problem+json` response +func (r DeleteSourceUploadResponse) GetApplicationproblemJSON409() *Conflict { + return r.ApplicationproblemJSON409 +} + // GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response -func (r ListSecretsResponse) GetApplicationproblemJSON422() *ValidationError { +func (r DeleteSourceUploadResponse) GetApplicationproblemJSON422() *ValidationError { return r.ApplicationproblemJSON422 } +// GetApplicationproblemJSON502 returns the response for an HTTP 502 `application/problem+json` response +func (r DeleteSourceUploadResponse) GetApplicationproblemJSON502() *BadGateway { + return r.ApplicationproblemJSON502 +} + // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r ListSecretsResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r DeleteSourceUploadResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r ListSecretsResponse) GetBody() []byte { +func (r DeleteSourceUploadResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r ListSecretsResponse) Status() string { +func (r DeleteSourceUploadResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11713,7 +11874,7 @@ func (r ListSecretsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListSecretsResponse) StatusCode() int { +func (r DeleteSourceUploadResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -11721,74 +11882,74 @@ func (r ListSecretsResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r ListSecretsResponse) ContentType() string { +func (r DeleteSourceUploadResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type CreateSecretResponse struct { +type GetSourceUploadResponse struct { Body []byte HTTPResponse *http.Response - // JSON201 the response for an HTTP 201 `application/json` response - JSON201 *Secret + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *SourceUpload // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response ApplicationproblemJSON400 *BadRequest // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response ApplicationproblemJSON403 *Forbidden - // ApplicationproblemJSON409 the response for an HTTP 409 `application/problem+json` response - ApplicationproblemJSON409 *Conflict + // ApplicationproblemJSON404 the response for an HTTP 404 `application/problem+json` response + ApplicationproblemJSON404 *NotFound // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ValidationError // ApplicationproblemJSON503 the response for an HTTP 503 `application/problem+json` response ApplicationproblemJSON503 *ServiceUnavailable } -// GetJSON201 returns the response for an HTTP 201 `application/json` response -func (r CreateSecretResponse) GetJSON201() *Secret { - return r.JSON201 +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r GetSourceUploadResponse) GetJSON200() *SourceUpload { + return r.JSON200 } // GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response -func (r CreateSecretResponse) GetApplicationproblemJSON400() *BadRequest { +func (r GetSourceUploadResponse) GetApplicationproblemJSON400() *BadRequest { return r.ApplicationproblemJSON400 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r CreateSecretResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r GetSourceUploadResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r CreateSecretResponse) GetApplicationproblemJSON403() *Forbidden { +func (r GetSourceUploadResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } -// GetApplicationproblemJSON409 returns the response for an HTTP 409 `application/problem+json` response -func (r CreateSecretResponse) GetApplicationproblemJSON409() *Conflict { - return r.ApplicationproblemJSON409 +// GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response +func (r GetSourceUploadResponse) GetApplicationproblemJSON404() *NotFound { + return r.ApplicationproblemJSON404 } // GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response -func (r CreateSecretResponse) GetApplicationproblemJSON422() *ValidationError { +func (r GetSourceUploadResponse) GetApplicationproblemJSON422() *ValidationError { return r.ApplicationproblemJSON422 } // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r CreateSecretResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r GetSourceUploadResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r CreateSecretResponse) GetBody() []byte { +func (r GetSourceUploadResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r CreateSecretResponse) Status() string { +func (r GetSourceUploadResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11796,7 +11957,7 @@ func (r CreateSecretResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateSecretResponse) StatusCode() int { +func (r GetSourceUploadResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -11804,16 +11965,20 @@ func (r CreateSecretResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r CreateSecretResponse) ContentType() string { +func (r GetSourceUploadResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type DeleteSecretResponse struct { +type CompleteSourceUploadResponse struct { Body []byte HTTPResponse *http.Response + // JSON200 the response for an HTTP 200 `application/json` response + JSON200 *SourceUpload + // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response + ApplicationproblemJSON400 *BadRequest // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response @@ -11824,47 +11989,64 @@ type DeleteSecretResponse struct { ApplicationproblemJSON409 *Conflict // ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response ApplicationproblemJSON422 *ValidationError + // ApplicationproblemJSON502 the response for an HTTP 502 `application/problem+json` response + ApplicationproblemJSON502 *BadGateway // ApplicationproblemJSON503 the response for an HTTP 503 `application/problem+json` response ApplicationproblemJSON503 *ServiceUnavailable } +// GetJSON200 returns the response for an HTTP 200 `application/json` response +func (r CompleteSourceUploadResponse) GetJSON200() *SourceUpload { + return r.JSON200 +} + +// GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response +func (r CompleteSourceUploadResponse) GetApplicationproblemJSON400() *BadRequest { + return r.ApplicationproblemJSON400 +} + // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r DeleteSecretResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r CompleteSourceUploadResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r DeleteSecretResponse) GetApplicationproblemJSON403() *Forbidden { +func (r CompleteSourceUploadResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r DeleteSecretResponse) GetApplicationproblemJSON404() *NotFound { +func (r CompleteSourceUploadResponse) GetApplicationproblemJSON404() *NotFound { return r.ApplicationproblemJSON404 } // GetApplicationproblemJSON409 returns the response for an HTTP 409 `application/problem+json` response -func (r DeleteSecretResponse) GetApplicationproblemJSON409() *Conflict { +func (r CompleteSourceUploadResponse) GetApplicationproblemJSON409() *Conflict { return r.ApplicationproblemJSON409 } // GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response -func (r DeleteSecretResponse) GetApplicationproblemJSON422() *ValidationError { +func (r CompleteSourceUploadResponse) GetApplicationproblemJSON422() *ValidationError { return r.ApplicationproblemJSON422 } +// GetApplicationproblemJSON502 returns the response for an HTTP 502 `application/problem+json` response +func (r CompleteSourceUploadResponse) GetApplicationproblemJSON502() *BadGateway { + return r.ApplicationproblemJSON502 +} + // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r DeleteSecretResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r CompleteSourceUploadResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r DeleteSecretResponse) GetBody() []byte { +func (r CompleteSourceUploadResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r DeleteSecretResponse) Status() string { +func (r CompleteSourceUploadResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11872,7 +12054,7 @@ func (r DeleteSecretResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteSecretResponse) StatusCode() int { +func (r CompleteSourceUploadResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -11880,18 +12062,18 @@ func (r DeleteSecretResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r DeleteSecretResponse) ContentType() string { +func (r CompleteSourceUploadResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type UpdateSecretResponse struct { +type GetSourceResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response - JSON200 *Secret + JSON200 *Source // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response ApplicationproblemJSON400 *BadRequest // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response @@ -11907,47 +12089,47 @@ type UpdateSecretResponse struct { } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r UpdateSecretResponse) GetJSON200() *Secret { +func (r GetSourceResponse) GetJSON200() *Source { return r.JSON200 } // GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response -func (r UpdateSecretResponse) GetApplicationproblemJSON400() *BadRequest { +func (r GetSourceResponse) GetApplicationproblemJSON400() *BadRequest { return r.ApplicationproblemJSON400 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r UpdateSecretResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r GetSourceResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r UpdateSecretResponse) GetApplicationproblemJSON403() *Forbidden { +func (r GetSourceResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r UpdateSecretResponse) GetApplicationproblemJSON404() *NotFound { +func (r GetSourceResponse) GetApplicationproblemJSON404() *NotFound { return r.ApplicationproblemJSON404 } // GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response -func (r UpdateSecretResponse) GetApplicationproblemJSON422() *ValidationError { +func (r GetSourceResponse) GetApplicationproblemJSON422() *ValidationError { return r.ApplicationproblemJSON422 } // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r UpdateSecretResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r GetSourceResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r UpdateSecretResponse) GetBody() []byte { +func (r GetSourceResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r UpdateSecretResponse) Status() string { +func (r GetSourceResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -11955,7 +12137,7 @@ func (r UpdateSecretResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateSecretResponse) StatusCode() int { +func (r GetSourceResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -11963,7 +12145,7 @@ func (r UpdateSecretResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r UpdateSecretResponse) ContentType() string { +func (r GetSourceResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } @@ -12433,7 +12615,7 @@ func (c *ClientWithResponses) FavouriteAppWithResponse(ctx context.Context, appI // StartAsyncTaskWithBodyWithResponse Start a new async task // -// Starts a new async task on `appId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/apps/{appId}/tasks/{taskId}` for completion. Resubmitting a task id is answered with the task it already names rather than starting a second one, so the `202` can carry a task that has already finished: read its `status` instead of assuming `pending`, and note it may name a different `appId`. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. +// Starts a new async task on `appId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/apps/{appId}/tasks/{taskId}` for completion. Resubmitting a task id is answered with the task it already names rather than starting a second one, so the `202` can carry a task that has already finished: read its `status` instead of assuming `pending`, and note it may name a different `appId`. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. An organisation whose serverless tenancy is revoked, or has no tenancy receipt at all, returns `403 Forbidden`, distinguishing that from an app that does not exist. An organisation whose tenancy is still being provisioned returns `503 Service Unavailable` instead — that state is retryable, not a revocation, and clears once provisioning finishes. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. // // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // @@ -12448,7 +12630,7 @@ func (c *ClientWithResponses) StartAsyncTaskWithBodyWithResponse(ctx context.Con // StartAsyncTaskWithResponse Start a new async task // -// Starts a new async task on `appId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/apps/{appId}/tasks/{taskId}` for completion. Resubmitting a task id is answered with the task it already names rather than starting a second one, so the `202` can carry a task that has already finished: read its `status` instead of assuming `pending`, and note it may name a different `appId`. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. +// Starts a new async task on `appId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/apps/{appId}/tasks/{taskId}` for completion. Resubmitting a task id is answered with the task it already names rather than starting a second one, so the `202` can carry a task that has already finished: read its `status` instead of assuming `pending`, and note it may name a different `appId`. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. An organisation whose serverless tenancy is revoked, or has no tenancy receipt at all, returns `403 Forbidden`, distinguishing that from an app that does not exist. An organisation whose tenancy is still being provisioned returns `503 Service Unavailable` instead — that state is retryable, not a revocation, and clears once provisioning finishes. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. // // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // @@ -12463,7 +12645,7 @@ func (c *ClientWithResponses) StartAsyncTaskWithResponse(ctx context.Context, ap // StartSyncTaskWithBodyWithResponse Start a new sync task // -// Starts a new sync task on `appId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`). Resubmitting a task id waits on the task it already names rather than starting a second one, so the `200` carries that task's result and may name a different `appId` — poll it under the one returned. A task that outlives the wait window is **not** a failure: the task is still queued or running, and the response is `202` carrying that task with `status: pending` — the same shape `invoke-async` returns, and it names the owning `appId` on a resubmission just as the `200` does. Poll `GET /v1/apps/{appId}/tasks/{taskId}` for its result. A request the platform cannot attribute to an accepted task fails instead, with no task to poll. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. +// Starts a new sync task on `appId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`). Resubmitting a task id waits on the task it already names rather than starting a second one, so the `200` carries that task's result and may name a different `appId` — poll it under the one returned. A task that outlives the wait window is **not** a failure: the task is still queued or running, and the response is `202` carrying that task with `status: pending` — the same shape `invoke-async` returns, and it names the owning `appId` on a resubmission just as the `200` does. Poll `GET /v1/apps/{appId}/tasks/{taskId}` for its result. A request the platform cannot attribute to an accepted task fails instead, with no task to poll. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. An organisation whose serverless tenancy is revoked, or has no tenancy receipt at all, returns `403 Forbidden`, distinguishing that from an app that does not exist. An organisation whose tenancy is still being provisioned returns `503 Service Unavailable` instead — that state is retryable, not a revocation, and clears once provisioning finishes. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. // // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // @@ -12478,7 +12660,7 @@ func (c *ClientWithResponses) StartSyncTaskWithBodyWithResponse(ctx context.Cont // StartSyncTaskWithResponse Start a new sync task // -// Starts a new sync task on `appId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`). Resubmitting a task id waits on the task it already names rather than starting a second one, so the `200` carries that task's result and may name a different `appId` — poll it under the one returned. A task that outlives the wait window is **not** a failure: the task is still queued or running, and the response is `202` carrying that task with `status: pending` — the same shape `invoke-async` returns, and it names the owning `appId` on a resubmission just as the `200` does. Poll `GET /v1/apps/{appId}/tasks/{taskId}` for its result. A request the platform cannot attribute to an accepted task fails instead, with no task to poll. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. +// Starts a new sync task on `appId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`). Resubmitting a task id waits on the task it already names rather than starting a second one, so the `200` carries that task's result and may name a different `appId` — poll it under the one returned. A task that outlives the wait window is **not** a failure: the task is still queued or running, and the response is `202` carrying that task with `status: pending` — the same shape `invoke-async` returns, and it names the owning `appId` on a resubmission just as the `200` does. Poll `GET /v1/apps/{appId}/tasks/{taskId}` for its result. A request the platform cannot attribute to an accepted task fails instead, with no task to poll. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. An organisation whose serverless tenancy is revoked, or has no tenancy receipt at all, returns `403 Forbidden`, distinguishing that from an app that does not exist. An organisation whose tenancy is still being provisioned returns `503 Service Unavailable` instead — that state is retryable, not a revocation, and clears once provisioning finishes. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns `404` whose `endpointPath` extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue. // // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // @@ -12512,135 +12694,60 @@ func (c *ClientWithResponses) ResumeAppWithResponse(ctx context.Context, appId A // // Corresponds with GET /v1/apps/{appId}/secrets (the `ListAppSecrets` operationId). func (c *ClientWithResponses) ListAppSecretsWithResponse(ctx context.Context, appId AppId, params *ListAppSecretsParams, reqEditors ...RequestEditorFn) (*ListAppSecretsResponse, error) { - rsp, err := c.ListAppSecrets(ctx, appId, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListAppSecretsResponse(rsp) -} - -// AttachAppSecretWithBodyWithResponse Attach a secret to an app -// -// Records that an organisation secret is attached to an app under a resolved env-var name. The next rollout injects the value into the worker. This operation does not roll workers. Returns `409` if the secret is already attached, or if another attach would use the same env-var name. -// The resolved name (`envVarName`, or `secretName` when omitted) must not already exist as a plain environment variable on this app (`deployment_configs.key`). Both sources use the same pod env namespace, so the server rejects the collision with `422` instead of allowing a last-wins override later. The reverse check applies when setting a plain environment variable. -// An app holds at most 100 environment bindings in total — plain environment variables plus attached secrets — the same combined ceiling as create and the single-key env-var route. Attaching when the app is already at that limit returns `422`. -// -// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). -// -// Corresponds with POST /v1/apps/{appId}/secrets (the `AttachAppSecret` operationId). -func (c *ClientWithResponses) AttachAppSecretWithBodyWithResponse(ctx context.Context, appId AppId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AttachAppSecretResponse, error) { - rsp, err := c.AttachAppSecretWithBody(ctx, appId, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseAttachAppSecretResponse(rsp) -} - -// AttachAppSecretWithResponse Attach a secret to an app -// -// Records that an organisation secret is attached to an app under a resolved env-var name. The next rollout injects the value into the worker. This operation does not roll workers. Returns `409` if the secret is already attached, or if another attach would use the same env-var name. -// The resolved name (`envVarName`, or `secretName` when omitted) must not already exist as a plain environment variable on this app (`deployment_configs.key`). Both sources use the same pod env namespace, so the server rejects the collision with `422` instead of allowing a last-wins override later. The reverse check applies when setting a plain environment variable. -// An app holds at most 100 environment bindings in total — plain environment variables plus attached secrets — the same combined ceiling as create and the single-key env-var route. Attaching when the app is already at that limit returns `422`. -// -// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). -// -// Corresponds with POST /v1/apps/{appId}/secrets (the `AttachAppSecret` operationId). -func (c *ClientWithResponses) AttachAppSecretWithResponse(ctx context.Context, appId AppId, body AttachAppSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*AttachAppSecretResponse, error) { - rsp, err := c.AttachAppSecret(ctx, appId, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseAttachAppSecretResponse(rsp) -} - -// DetachAppSecretWithResponse Detach a secret from an app -// -// Removes the attachment from the next rollout. This operation does not roll workers. Existing workers keep the value until they stop. -// -// Returns a wrapper object for the known response body format(s). -// -// Corresponds with DELETE /v1/apps/{appId}/secrets/{secretName} (the `DetachAppSecret` operationId). -func (c *ClientWithResponses) DetachAppSecretWithResponse(ctx context.Context, appId AppId, secretName SecretName, reqEditors ...RequestEditorFn) (*DetachAppSecretResponse, error) { - rsp, err := c.DetachAppSecret(ctx, appId, secretName, reqEditors...) - if err != nil { - return nil, err - } - return ParseDetachAppSecretResponse(rsp) -} - -// CreateSourceUploadWithBodyWithResponse Create a source upload -// -// Creates an upload session for source intended for `appId`. The app does not need to exist yet. The response contains a short-lived transfer instruction for one exact staging object. Repeating the request with the same idempotency key and declaration while the session is pending and unexpired returns the same upload resource with a refreshed transfer instruction. Replays with a different declaration or after the session becomes ready, rejected, consumed, expired, or deleted return `409`. -// -// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). -// -// Corresponds with POST /v1/apps/{appId}/source-uploads (the `CreateSourceUpload` operationId). -func (c *ClientWithResponses) CreateSourceUploadWithBodyWithResponse(ctx context.Context, appId AppId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSourceUploadResponse, error) { - rsp, err := c.CreateSourceUploadWithBody(ctx, appId, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateSourceUploadResponse(rsp) -} - -// CreateSourceUploadWithResponse Create a source upload -// -// Creates an upload session for source intended for `appId`. The app does not need to exist yet. The response contains a short-lived transfer instruction for one exact staging object. Repeating the request with the same idempotency key and declaration while the session is pending and unexpired returns the same upload resource with a refreshed transfer instruction. Replays with a different declaration or after the session becomes ready, rejected, consumed, expired, or deleted return `409`. -// -// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). -// -// Corresponds with POST /v1/apps/{appId}/source-uploads (the `CreateSourceUpload` operationId). -func (c *ClientWithResponses) CreateSourceUploadWithResponse(ctx context.Context, appId AppId, body CreateSourceUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSourceUploadResponse, error) { - rsp, err := c.CreateSourceUpload(ctx, appId, body, reqEditors...) + rsp, err := c.ListAppSecrets(ctx, appId, params, reqEditors...) if err != nil { return nil, err } - return ParseCreateSourceUploadResponse(rsp) + return ParseListAppSecretsResponse(rsp) } -// DeleteSourceUploadWithResponse Abort a source upload +// AttachAppSecretWithBodyWithResponse Attach a secret to an app // -// Aborts an unconsumed upload and removes its staging object. The session remains as a deleted tombstone so its object key cannot be reused. Repeating a successful abort is idempotent. +// Records that an organisation secret is attached to an app under a resolved env-var name. The next rollout injects the value into the worker. This operation does not roll workers. Returns `409` if the secret is already attached, or if another attach would use the same env-var name. +// The resolved name (`envVarName`, or `secretName` when omitted) must not already exist as a plain environment variable on this app (`deployment_configs.key`). Both sources use the same pod env namespace, so the server rejects the collision with `422` instead of allowing a last-wins override later. The reverse check applies when setting a plain environment variable. +// An app holds at most 100 environment bindings in total — plain environment variables plus attached secrets — the same combined ceiling as create and the single-key env-var route. Attaching when the app is already at that limit returns `422`. // -// Returns a wrapper object for the known response body format(s). +// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // -// Corresponds with DELETE /v1/apps/{appId}/source-uploads/{uploadId} (the `DeleteSourceUpload` operationId). -func (c *ClientWithResponses) DeleteSourceUploadWithResponse(ctx context.Context, appId AppId, uploadId SourceUploadId, reqEditors ...RequestEditorFn) (*DeleteSourceUploadResponse, error) { - rsp, err := c.DeleteSourceUpload(ctx, appId, uploadId, reqEditors...) +// Corresponds with POST /v1/apps/{appId}/secrets (the `AttachAppSecret` operationId). +func (c *ClientWithResponses) AttachAppSecretWithBodyWithResponse(ctx context.Context, appId AppId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AttachAppSecretResponse, error) { + rsp, err := c.AttachAppSecretWithBody(ctx, appId, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseDeleteSourceUploadResponse(rsp) + return ParseAttachAppSecretResponse(rsp) } -// GetSourceUploadWithResponse Get a source upload +// AttachAppSecretWithResponse Attach a secret to an app // -// Returns the upload session belonging to the authenticated organization and `appId`. An upload belonging to another organization or app returns `404`. +// Records that an organisation secret is attached to an app under a resolved env-var name. The next rollout injects the value into the worker. This operation does not roll workers. Returns `409` if the secret is already attached, or if another attach would use the same env-var name. +// The resolved name (`envVarName`, or `secretName` when omitted) must not already exist as a plain environment variable on this app (`deployment_configs.key`). Both sources use the same pod env namespace, so the server rejects the collision with `422` instead of allowing a last-wins override later. The reverse check applies when setting a plain environment variable. +// An app holds at most 100 environment bindings in total — plain environment variables plus attached secrets — the same combined ceiling as create and the single-key env-var route. Attaching when the app is already at that limit returns `422`. // -// Returns a wrapper object for the known response body format(s). +// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // -// Corresponds with GET /v1/apps/{appId}/source-uploads/{uploadId} (the `GetSourceUpload` operationId). -func (c *ClientWithResponses) GetSourceUploadWithResponse(ctx context.Context, appId AppId, uploadId SourceUploadId, reqEditors ...RequestEditorFn) (*GetSourceUploadResponse, error) { - rsp, err := c.GetSourceUpload(ctx, appId, uploadId, reqEditors...) +// Corresponds with POST /v1/apps/{appId}/secrets (the `AttachAppSecret` operationId). +func (c *ClientWithResponses) AttachAppSecretWithResponse(ctx context.Context, appId AppId, body AttachAppSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*AttachAppSecretResponse, error) { + rsp, err := c.AttachAppSecret(ctx, appId, body, reqEditors...) if err != nil { return nil, err } - return ParseGetSourceUploadResponse(rsp) + return ParseAttachAppSecretResponse(rsp) } -// CompleteSourceUploadWithResponse Complete a source upload +// DetachAppSecretWithResponse Detach a secret from an app // -// Verifies the staging object's length, content type, and SHA-256 digest against the session declaration. A successful retry returns the existing ready resource. A rejected upload keeps its rejection so later retries return the same result. +// Removes the attachment from the next rollout. This operation does not roll workers. Existing workers keep the value until they stop. // // Returns a wrapper object for the known response body format(s). // -// Corresponds with POST /v1/apps/{appId}/source-uploads/{uploadId}/complete (the `CompleteSourceUpload` operationId). -func (c *ClientWithResponses) CompleteSourceUploadWithResponse(ctx context.Context, appId AppId, uploadId SourceUploadId, reqEditors ...RequestEditorFn) (*CompleteSourceUploadResponse, error) { - rsp, err := c.CompleteSourceUpload(ctx, appId, uploadId, reqEditors...) +// Corresponds with DELETE /v1/apps/{appId}/secrets/{secretName} (the `DetachAppSecret` operationId). +func (c *ClientWithResponses) DetachAppSecretWithResponse(ctx context.Context, appId AppId, secretName SecretName, reqEditors ...RequestEditorFn) (*DetachAppSecretResponse, error) { + rsp, err := c.DetachAppSecret(ctx, appId, secretName, reqEditors...) if err != nil { return nil, err } - return ParseCompleteSourceUploadResponse(rsp) + return ParseDetachAppSecretResponse(rsp) } // StopAppWithResponse Stop an app @@ -13015,9 +13122,9 @@ func (c *ClientWithResponses) GetMetricSeriesWithResponse(ctx context.Context, q // // Idempotent upsert for one customer organisation. The customer UUID is in the body — public paths never carry an organisation identifier (the authenticated API key names the *caller*, which for this route must be the Runware platform organisation). // -// `state: active` runs Ensure: a Cloud KMS CryptoKey named after the organisation UUID, a Kubernetes service account `org-` in the shared app namespace, and a decrypt IAM binding on that key for the KSA principal. `state: disabled` runs teardown: disable the key's primary version, drop the decrypt binding, delete the KSA. The key itself is not destroyed — a destroyed key makes every ciphertext under it permanently unreadable. The local row stays as a tombstone so a later Ensure converges on the same names. +// `state: active` runs Ensure: a Cloud KMS CryptoKey named after the organisation UUID, a Kubernetes service account `org-` in the shared app namespace, and a decrypt IAM binding on that key for the KSA principal. `state: disabled` runs teardown: disable the key's primary version, drop the decrypt binding, delete the KSA. It then stops the organisation's estate: every deployment that is `active` moves to `stopping` and has its drain enqueued, and that stop is one database transaction — the `200` is returned only once it has committed, so it guarantees every deployment that was active is on its way to `stopped`. The key itself is not destroyed — a destroyed key makes every ciphertext under it permanently unreadable. The local row stays as a tombstone so a later Ensure converges on the same names; a later Ensure does not resume the deployments this disable stopped — restoring the organisation's IAM is not the same decision as restarting its workload, and this route does not conflate them. A stopped deployment stays stopped until its own resume call, the same as one the customer stopped directly. // -// A retry after a partial failure converges rather than duplicating objects. `200` returns the resulting receipt. `503` when Cloud KMS key-admin is rate-limited (60 writes/min) or otherwise unavailable; the caller (admin-api Messenger) retries the same PUT. +// A retry after a partial failure converges rather than duplicating objects. `200` returns the resulting receipt. `503` when Cloud KMS key-admin is rate-limited (60 writes/min) or otherwise unavailable, or when the tenancy was disabled but the deployment stop could not be committed — the tenancy row is already `disabled` in that case, and the same PUT retried stops whatever is still active; the caller (admin-api Messenger) retries the same PUT either way. // // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // @@ -13034,9 +13141,9 @@ func (c *ClientWithResponses) UpsertOrgTenancyWithBodyWithResponse(ctx context.C // // Idempotent upsert for one customer organisation. The customer UUID is in the body — public paths never carry an organisation identifier (the authenticated API key names the *caller*, which for this route must be the Runware platform organisation). // -// `state: active` runs Ensure: a Cloud KMS CryptoKey named after the organisation UUID, a Kubernetes service account `org-` in the shared app namespace, and a decrypt IAM binding on that key for the KSA principal. `state: disabled` runs teardown: disable the key's primary version, drop the decrypt binding, delete the KSA. The key itself is not destroyed — a destroyed key makes every ciphertext under it permanently unreadable. The local row stays as a tombstone so a later Ensure converges on the same names. +// `state: active` runs Ensure: a Cloud KMS CryptoKey named after the organisation UUID, a Kubernetes service account `org-` in the shared app namespace, and a decrypt IAM binding on that key for the KSA principal. `state: disabled` runs teardown: disable the key's primary version, drop the decrypt binding, delete the KSA. It then stops the organisation's estate: every deployment that is `active` moves to `stopping` and has its drain enqueued, and that stop is one database transaction — the `200` is returned only once it has committed, so it guarantees every deployment that was active is on its way to `stopped`. The key itself is not destroyed — a destroyed key makes every ciphertext under it permanently unreadable. The local row stays as a tombstone so a later Ensure converges on the same names; a later Ensure does not resume the deployments this disable stopped — restoring the organisation's IAM is not the same decision as restarting its workload, and this route does not conflate them. A stopped deployment stays stopped until its own resume call, the same as one the customer stopped directly. // -// A retry after a partial failure converges rather than duplicating objects. `200` returns the resulting receipt. `503` when Cloud KMS key-admin is rate-limited (60 writes/min) or otherwise unavailable; the caller (admin-api Messenger) retries the same PUT. +// A retry after a partial failure converges rather than duplicating objects. `200` returns the resulting receipt. `503` when Cloud KMS key-admin is rate-limited (60 writes/min) or otherwise unavailable, or when the tenancy was disabled but the deployment stop could not be committed — the tenancy row is already `disabled` in that case, and the same PUT retried stops whatever is still active; the caller (admin-api Messenger) retries the same PUT either way. // // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // @@ -13135,6 +13242,96 @@ func (c *ClientWithResponses) UpdateSecretWithResponse(ctx context.Context, secr return ParseUpdateSecretResponse(rsp) } +// CreateSourceUploadWithBodyWithResponse Create a source upload +// +// Creates an upload session for a source archive. The session belongs to the authenticated organization and names no app: an upload precedes any app, and the source it publishes may back several. The response contains a short-lived transfer instruction for one exact staging object. Repeating the request with the same idempotency key and declaration while the session is pending and unexpired returns the same upload resource with a refreshed transfer instruction. Replays with a different declaration, or after the session becomes ready, rejected, expired, or deleted, return `409`. +// +// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). +// +// Corresponds with POST /v1/source-uploads (the `CreateSourceUpload` operationId). +func (c *ClientWithResponses) CreateSourceUploadWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSourceUploadResponse, error) { + rsp, err := c.CreateSourceUploadWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSourceUploadResponse(rsp) +} + +// CreateSourceUploadWithResponse Create a source upload +// +// Creates an upload session for a source archive. The session belongs to the authenticated organization and names no app: an upload precedes any app, and the source it publishes may back several. The response contains a short-lived transfer instruction for one exact staging object. Repeating the request with the same idempotency key and declaration while the session is pending and unexpired returns the same upload resource with a refreshed transfer instruction. Replays with a different declaration, or after the session becomes ready, rejected, expired, or deleted, return `409`. +// +// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). +// +// Corresponds with POST /v1/source-uploads (the `CreateSourceUpload` operationId). +func (c *ClientWithResponses) CreateSourceUploadWithResponse(ctx context.Context, body CreateSourceUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSourceUploadResponse, error) { + rsp, err := c.CreateSourceUpload(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSourceUploadResponse(rsp) +} + +// DeleteSourceUploadWithResponse Abort a source upload +// +// Aborts an upload that has not published its source and removes its staging object. The session remains as a deleted tombstone so its staging key cannot be reused. Repeating a successful abort is idempotent. A `ready` upload cannot be aborted: the source it published is a resource in its own right, and the request answers `409` with type `source-upload-completed`. +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with DELETE /v1/source-uploads/{uploadId} (the `DeleteSourceUpload` operationId). +func (c *ClientWithResponses) DeleteSourceUploadWithResponse(ctx context.Context, uploadId SourceUploadId, reqEditors ...RequestEditorFn) (*DeleteSourceUploadResponse, error) { + rsp, err := c.DeleteSourceUpload(ctx, uploadId, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteSourceUploadResponse(rsp) +} + +// GetSourceUploadWithResponse Get a source upload +// +// Returns the upload session belonging to the authenticated organization. Once the upload is `ready` the session carries the `sourceId` it published. An upload belonging to another organization returns `404`. +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with GET /v1/source-uploads/{uploadId} (the `GetSourceUpload` operationId). +func (c *ClientWithResponses) GetSourceUploadWithResponse(ctx context.Context, uploadId SourceUploadId, reqEditors ...RequestEditorFn) (*GetSourceUploadResponse, error) { + rsp, err := c.GetSourceUpload(ctx, uploadId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetSourceUploadResponse(rsp) +} + +// CompleteSourceUploadWithResponse Complete a source upload +// +// Verifies the staging object's length, content type, and SHA-256 digest against the session declaration, applies the archive rules for the source type, and publishes the verified bytes as an immutable source artifact. The first success creates the source and returns the ready session carrying its `sourceId`; a retry returns the same session and the same `sourceId`. A rejected upload keeps its rejection so later retries return the same result. +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with POST /v1/source-uploads/{uploadId}/complete (the `CompleteSourceUpload` operationId). +func (c *ClientWithResponses) CompleteSourceUploadWithResponse(ctx context.Context, uploadId SourceUploadId, reqEditors ...RequestEditorFn) (*CompleteSourceUploadResponse, error) { + rsp, err := c.CompleteSourceUpload(ctx, uploadId, reqEditors...) + if err != nil { + return nil, err + } + return ParseCompleteSourceUploadResponse(rsp) +} + +// GetSourceWithResponse Get a source +// +// Returns the immutable source artifact a completed upload published: its type and the length and digest upload completion verified. A source is organization-scoped and may be named by any number of apps and versions in that organization; one belonging to another organization returns `404`. There is no list and no delete. +// +// Returns a wrapper object for the known response body format(s). +// +// Corresponds with GET /v1/sources/{sourceId} (the `GetSource` operationId). +func (c *ClientWithResponses) GetSourceWithResponse(ctx context.Context, sourceId SourceId, reqEditors ...RequestEditorFn) (*GetSourceResponse, error) { + rsp, err := c.GetSource(ctx, sourceId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetSourceResponse(rsp) +} + // ListUsageEventsWithResponse List usage events // // Append-only billing telemetry; one row per worker state transition. @@ -13550,6 +13747,13 @@ func ParseListBuildsResponse(rsp *http.Response) (*ListBuildsResponse, error) { } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest Unauthorized if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -13682,6 +13886,13 @@ func ParseGetBuildResponse(rsp *http.Response) (*GetBuildResponse, error) { } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest Unauthorized if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -13957,6 +14168,13 @@ func ParseListAppEnvironmentVariablesResponse(rsp *http.Response) (*ListAppEnvir } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest Unauthorized if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14134,6 +14352,13 @@ func ParseListAppEventsResponse(rsp *http.Response) (*ListAppEventsResponse, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest Unauthorized if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14694,33 +14919,26 @@ func ParseDetachAppSecretResponse(rsp *http.Response) (*DetachAppSecretResponse, return response, nil } -// ParseCreateSourceUploadResponse parses an HTTP response from a CreateSourceUploadWithResponse call -func ParseCreateSourceUploadResponse(rsp *http.Response) (*CreateSourceUploadResponse, error) { +// ParseStopAppResponse parses an HTTP response from a StopAppWithResponse call +func ParseStopAppResponse(rsp *http.Response) (*StopAppResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateSourceUploadResponse{ + response := &StopAppResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest SourceUploadCreation - 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 BadRequest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 202: + var dest App if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.ApplicationproblemJSON400 = &dest + response.JSON202 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest Unauthorized @@ -14736,26 +14954,19 @@ func ParseCreateSourceUploadResponse(rsp *http.Response) (*CreateSourceUploadRes } response.ApplicationproblemJSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: - var dest Conflict - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationproblemJSON409 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationError + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.ApplicationproblemJSON422 = &dest + response.ApplicationproblemJSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 502: - var dest BadGateway + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest Conflict if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.ApplicationproblemJSON502 = &dest + response.ApplicationproblemJSON409 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: var dest ServiceUnavailable @@ -14769,22 +14980,31 @@ func ParseCreateSourceUploadResponse(rsp *http.Response) (*CreateSourceUploadRes return response, nil } -// ParseDeleteSourceUploadResponse parses an HTTP response from a DeleteSourceUploadWithResponse call -func ParseDeleteSourceUploadResponse(rsp *http.Response) (*DeleteSourceUploadResponse, error) { +// ParseListTasksResponse parses an HTTP response from a ListTasksWithResponse call +func ParseListTasksResponse(rsp *http.Response) (*ListTasksResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteSourceUploadResponse{ + response := &ListTasksResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case rsp.StatusCode == 204: - break // No content-type + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Data *[]Task `json:"data,omitempty"` + + // NextCursor Cursor for the next page; null when there are no more items. + NextCursor *string `json:"nextCursor,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 BadRequest @@ -14814,26 +15034,66 @@ func ParseDeleteSourceUploadResponse(rsp *http.Response) (*DeleteSourceUploadRes } response.ApplicationproblemJSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: - var dest Conflict + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.ApplicationproblemJSON409 = &dest + response.ApplicationproblemJSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationError + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: + var dest ServiceUnavailable if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.ApplicationproblemJSON422 = &dest + response.ApplicationproblemJSON503 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 502: - var dest BadGateway + } + + return response, nil +} + +// ParseGetTaskResponse parses an HTTP response from a GetTaskWithResponse call +func ParseGetTaskResponse(rsp *http.Response) (*GetTaskResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetTaskResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Task if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.ApplicationproblemJSON502 = &dest + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest Unauthorized + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: var dest ServiceUnavailable @@ -14847,22 +15107,30 @@ func ParseDeleteSourceUploadResponse(rsp *http.Response) (*DeleteSourceUploadRes return response, nil } -// ParseGetSourceUploadResponse parses an HTTP response from a GetSourceUploadWithResponse call -func ParseGetSourceUploadResponse(rsp *http.Response) (*GetSourceUploadResponse, error) { +// ParseListVersionsResponse parses an HTTP response from a ListVersionsWithResponse call +func ParseListVersionsResponse(rsp *http.Response) (*ListVersionsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetSourceUploadResponse{ + response := &ListVersionsResponse{ Body: bodyBytes, HTTPResponse: rsp, } - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SourceUpload + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Data []Version `json:"data"` + + // NextCursor Cursor for the next page; null when there are no more items. + NextCursor *string `json:"nextCursor,omitempty"` + + // Summary Collection totals for a paged list. Independent of the page: `total` is the COUNT of items in the collection and is the same value on every page, including a cursor that seeks past the last row. + Summary ListSummary `json:"summary"` + } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -14896,13 +15164,6 @@ func ParseGetSourceUploadResponse(rsp *http.Response) (*GetSourceUploadResponse, } response.ApplicationproblemJSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationproblemJSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: var dest ServiceUnavailable if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14915,26 +15176,22 @@ func ParseGetSourceUploadResponse(rsp *http.Response) (*GetSourceUploadResponse, return response, nil } -// ParseCompleteSourceUploadResponse parses an HTTP response from a CompleteSourceUploadWithResponse call -func ParseCompleteSourceUploadResponse(rsp *http.Response) (*CompleteSourceUploadResponse, error) { +// ParseDeleteVersionResponse parses an HTTP response from a DeleteVersionWithResponse call +func ParseDeleteVersionResponse(rsp *http.Response) (*DeleteVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CompleteSourceUploadResponse{ + response := &DeleteVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SourceUpload - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest + case rsp.StatusCode == 204: + break // No content-type case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -14971,20 +15228,6 @@ func ParseCompleteSourceUploadResponse(rsp *http.Response) (*CompleteSourceUploa } response.ApplicationproblemJSON409 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationproblemJSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 502: - var dest BadGateway - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationproblemJSON502 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: var dest ServiceUnavailable if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -14997,26 +15240,33 @@ func ParseCompleteSourceUploadResponse(rsp *http.Response) (*CompleteSourceUploa return response, nil } -// ParseStopAppResponse parses an HTTP response from a StopAppWithResponse call -func ParseStopAppResponse(rsp *http.Response) (*StopAppResponse, error) { +// ParseGetVersionResponse parses an HTTP response from a GetVersionWithResponse call +func ParseGetVersionResponse(rsp *http.Response) (*GetVersionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &StopAppResponse{ + response := &GetVersionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 202: - var dest App + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Version if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON202 = &dest + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest Unauthorized @@ -15039,13 +15289,6 @@ func ParseStopAppResponse(rsp *http.Response) (*StopAppResponse, error) { } response.ApplicationproblemJSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: - var dest Conflict - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationproblemJSON409 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: var dest ServiceUnavailable if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15058,15 +15301,15 @@ func ParseStopAppResponse(rsp *http.Response) (*StopAppResponse, error) { return response, nil } -// ParseListTasksResponse parses an HTTP response from a ListTasksWithResponse call -func ParseListTasksResponse(rsp *http.Response) (*ListTasksResponse, error) { +// ParseListWorkersResponse parses an HTTP response from a ListWorkersWithResponse call +func ParseListWorkersResponse(rsp *http.Response) (*ListWorkersResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListTasksResponse{ + response := &ListWorkersResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -15074,7 +15317,7 @@ func ParseListTasksResponse(rsp *http.Response) (*ListTasksResponse, error) { switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Data *[]Task `json:"data,omitempty"` + Data *[]Worker `json:"data,omitempty"` // NextCursor Cursor for the next page; null when there are no more items. NextCursor *string `json:"nextCursor,omitempty"` @@ -15131,27 +15374,34 @@ func ParseListTasksResponse(rsp *http.Response) (*ListTasksResponse, error) { return response, nil } -// ParseGetTaskResponse parses an HTTP response from a GetTaskWithResponse call -func ParseGetTaskResponse(rsp *http.Response) (*GetTaskResponse, error) { +// ParseGetWorkerResponse parses an HTTP response from a GetWorkerWithResponse call +func ParseGetWorkerResponse(rsp *http.Response) (*GetWorkerResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetTaskResponse{ + response := &GetWorkerResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Task + var dest Worker 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 BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest Unauthorized if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15173,6 +15423,13 @@ func ParseGetTaskResponse(rsp *http.Response) (*GetTaskResponse, error) { } response.ApplicationproblemJSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: var dest ServiceUnavailable if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15185,30 +15442,22 @@ func ParseGetTaskResponse(rsp *http.Response) (*GetTaskResponse, error) { return response, nil } -// ParseListVersionsResponse parses an HTTP response from a ListVersionsWithResponse call -func ParseListVersionsResponse(rsp *http.Response) (*ListVersionsResponse, error) { +// ParseListGpuTypesResponse parses an HTTP response from a ListGpuTypesWithResponse call +func ParseListGpuTypesResponse(rsp *http.Response) (*ListGpuTypesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListVersionsResponse{ + response := &ListGpuTypesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Data []Version `json:"data"` - - // NextCursor Cursor for the next page; null when there are no more items. - NextCursor *string `json:"nextCursor,omitempty"` - - // Summary Collection totals for a paged list. Independent of the page: `total` is the COUNT of items in the collection and is the same value on every page, including a cursor that seeks past the last row. - Summary ListSummary `json:"summary"` - } + var dest GpuTypeList if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15228,13 +15477,6 @@ func ParseListVersionsResponse(rsp *http.Response) (*ListVersionsResponse, error } response.ApplicationproblemJSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationproblemJSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: var dest ServiceUnavailable if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15247,22 +15489,33 @@ func ParseListVersionsResponse(rsp *http.Response) (*ListVersionsResponse, error return response, nil } -// ParseDeleteVersionResponse parses an HTTP response from a DeleteVersionWithResponse call -func ParseDeleteVersionResponse(rsp *http.Response) (*DeleteVersionResponse, error) { +// ParseCreateGpuTypeResponse parses an HTTP response from a CreateGpuTypeWithResponse call +func ParseCreateGpuTypeResponse(rsp *http.Response) (*CreateGpuTypeResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteVersionResponse{ + response := &CreateGpuTypeResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case rsp.StatusCode == 204: - break // No content-type + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest GpuType + 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 BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest Unauthorized @@ -15278,19 +15531,19 @@ func ParseDeleteVersionResponse(rsp *http.Response) (*DeleteVersionResponse, err } response.ApplicationproblemJSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest Conflict if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.ApplicationproblemJSON404 = &dest + response.ApplicationproblemJSON409 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: - var dest Conflict + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.ApplicationproblemJSON409 = &dest + response.ApplicationproblemJSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: var dest ServiceUnavailable @@ -15304,26 +15557,22 @@ func ParseDeleteVersionResponse(rsp *http.Response) (*DeleteVersionResponse, err return response, nil } -// ParseGetVersionResponse parses an HTTP response from a GetVersionWithResponse call -func ParseGetVersionResponse(rsp *http.Response) (*GetVersionResponse, error) { +// ParseDeleteGpuTypeResponse parses an HTTP response from a DeleteGpuTypeWithResponse call +func ParseDeleteGpuTypeResponse(rsp *http.Response) (*DeleteGpuTypeResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetVersionResponse{ + response := &DeleteGpuTypeResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Version - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest + case rsp.StatusCode == 204: + break // No content-type case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest Unauthorized @@ -15346,6 +15595,20 @@ func ParseGetVersionResponse(rsp *http.Response) (*GetVersionResponse, error) { } response.ApplicationproblemJSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest Conflict + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON409 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: var dest ServiceUnavailable if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15358,39 +15621,27 @@ func ParseGetVersionResponse(rsp *http.Response) (*GetVersionResponse, error) { return response, nil } -// ParseListWorkersResponse parses an HTTP response from a ListWorkersWithResponse call -func ParseListWorkersResponse(rsp *http.Response) (*ListWorkersResponse, error) { +// ParseGetGpuTypeResponse parses an HTTP response from a GetGpuTypeWithResponse call +func ParseGetGpuTypeResponse(rsp *http.Response) (*GetGpuTypeResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListWorkersResponse{ + response := &GetGpuTypeResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Data *[]Worker `json:"data,omitempty"` - - // NextCursor Cursor for the next page; null when there are no more items. - NextCursor *string `json:"nextCursor,omitempty"` - } + var dest GpuType 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 BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationproblemJSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest Unauthorized if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15431,22 +15682,22 @@ func ParseListWorkersResponse(rsp *http.Response) (*ListWorkersResponse, error) return response, nil } -// ParseGetWorkerResponse parses an HTTP response from a GetWorkerWithResponse call -func ParseGetWorkerResponse(rsp *http.Response) (*GetWorkerResponse, error) { +// ParseUpdateGpuTypeResponse parses an HTTP response from a UpdateGpuTypeWithResponse call +func ParseUpdateGpuTypeResponse(rsp *http.Response) (*UpdateGpuTypeResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetWorkerResponse{ + response := &UpdateGpuTypeResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Worker + var dest GpuType if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15499,27 +15750,39 @@ func ParseGetWorkerResponse(rsp *http.Response) (*GetWorkerResponse, error) { return response, nil } -// ParseListGpuTypesResponse parses an HTTP response from a ListGpuTypesWithResponse call -func ParseListGpuTypesResponse(rsp *http.Response) (*ListGpuTypesResponse, error) { +// ParseListGpuTypePricesResponse parses an HTTP response from a ListGpuTypePricesWithResponse call +func ParseListGpuTypePricesResponse(rsp *http.Response) (*ListGpuTypePricesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListGpuTypesResponse{ + response := &ListGpuTypePricesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest GpuTypeList + var dest struct { + Data *[]GpuPricingListItem `json:"data,omitempty"` + + // NextCursor Cursor for the next page; null when there are no more items. + NextCursor *string `json:"nextCursor,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 BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest Unauthorized if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15534,34 +15797,41 @@ func ParseListGpuTypesResponse(rsp *http.Response) (*ListGpuTypesResponse, error } response.ApplicationproblemJSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: - var dest ServiceUnavailable + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.ApplicationproblemJSON503 = &dest + response.ApplicationproblemJSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON422 = &dest } return response, nil } -// ParseCreateGpuTypeResponse parses an HTTP response from a CreateGpuTypeWithResponse call -func ParseCreateGpuTypeResponse(rsp *http.Response) (*CreateGpuTypeResponse, error) { +// ParseCreateGpuTypePriceResponse parses an HTTP response from a CreateGpuTypePriceWithResponse call +func ParseCreateGpuTypePriceResponse(rsp *http.Response) (*CreateGpuTypePriceResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateGpuTypeResponse{ + response := &CreateGpuTypePriceResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest GpuType + var dest GpuPricing if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15586,7 +15856,14 @@ func ParseCreateGpuTypeResponse(rsp *http.Response) (*CreateGpuTypeResponse, err if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.ApplicationproblemJSON403 = &dest + response.ApplicationproblemJSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: var dest Conflict @@ -15602,27 +15879,20 @@ func ParseCreateGpuTypeResponse(rsp *http.Response) (*CreateGpuTypeResponse, err } response.ApplicationproblemJSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: - var dest ServiceUnavailable - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationproblemJSON503 = &dest - } return response, nil } -// ParseDeleteGpuTypeResponse parses an HTTP response from a DeleteGpuTypeWithResponse call -func ParseDeleteGpuTypeResponse(rsp *http.Response) (*DeleteGpuTypeResponse, error) { +// ParseDeleteGpuTypePriceResponse parses an HTTP response from a DeleteGpuTypePriceWithResponse call +func ParseDeleteGpuTypePriceResponse(rsp *http.Response) (*DeleteGpuTypePriceResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteGpuTypeResponse{ + response := &DeleteGpuTypePriceResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -15631,6 +15901,13 @@ func ParseDeleteGpuTypeResponse(rsp *http.Response) (*DeleteGpuTypeResponse, err case rsp.StatusCode == 204: break // No content-type + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest Unauthorized if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15666,39 +15943,39 @@ func ParseDeleteGpuTypeResponse(rsp *http.Response) (*DeleteGpuTypeResponse, err } response.ApplicationproblemJSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: - var dest ServiceUnavailable - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationproblemJSON503 = &dest - } return response, nil } -// ParseGetGpuTypeResponse parses an HTTP response from a GetGpuTypeWithResponse call -func ParseGetGpuTypeResponse(rsp *http.Response) (*GetGpuTypeResponse, error) { +// ParseUpdateGpuTypePriceResponse parses an HTTP response from a UpdateGpuTypePriceWithResponse call +func ParseUpdateGpuTypePriceResponse(rsp *http.Response) (*UpdateGpuTypePriceResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetGpuTypeResponse{ + response := &UpdateGpuTypePriceResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest GpuType + var dest GpuPricing 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 BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest Unauthorized if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15720,41 +15997,41 @@ func ParseGetGpuTypeResponse(rsp *http.Response) (*GetGpuTypeResponse, error) { } response.ApplicationproblemJSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationError + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest Conflict if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.ApplicationproblemJSON422 = &dest + response.ApplicationproblemJSON409 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: - var dest ServiceUnavailable + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.ApplicationproblemJSON503 = &dest + response.ApplicationproblemJSON422 = &dest } return response, nil } -// ParseUpdateGpuTypeResponse parses an HTTP response from a UpdateGpuTypeWithResponse call -func ParseUpdateGpuTypeResponse(rsp *http.Response) (*UpdateGpuTypeResponse, error) { +// ParseGetLogEntriesResponse parses an HTTP response from a GetLogEntriesWithResponse call +func ParseGetLogEntriesResponse(rsp *http.Response) (*GetLogEntriesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateGpuTypeResponse{ + response := &GetLogEntriesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest GpuType + var dest LogEntryPage if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -15795,6 +16072,20 @@ func ParseUpdateGpuTypeResponse(rsp *http.Response) (*UpdateGpuTypeResponse, err } response.ApplicationproblemJSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON429 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 502: + var dest BadGateway + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON502 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: var dest ServiceUnavailable if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15802,44 +16093,52 @@ func ParseUpdateGpuTypeResponse(rsp *http.Response) (*UpdateGpuTypeResponse, err } response.ApplicationproblemJSON503 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 504: + var dest GatewayTimeout + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON504 = &dest + + } + + switch { + case rsp.StatusCode == 429: + var headers GetLogEntriesResponse429Headers + if values := rsp.Header.Values("Retry-After"); len(values) > 0 { + var value int32 + if err := runtime.BindStyledParameterWithOptions("simple", "Retry-After", values[0], &value, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: true, Type: "integer", Format: "int32"}); err != nil { + return nil, err + } + headers.RetryAfter = value + } + response.Headers429 = &headers } return response, nil } -// ParseListGpuTypePricesResponse parses an HTTP response from a ListGpuTypePricesWithResponse call -func ParseListGpuTypePricesResponse(rsp *http.Response) (*ListGpuTypePricesResponse, error) { +// ParseListInsightsQueriesResponse parses an HTTP response from a ListInsightsQueriesWithResponse call +func ParseListInsightsQueriesResponse(rsp *http.Response) (*ListInsightsQueriesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListGpuTypePricesResponse{ + response := &ListInsightsQueriesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Data *[]GpuPricingListItem `json:"data,omitempty"` - - // NextCursor Cursor for the next page; null when there are no more items. - NextCursor *string `json:"nextCursor,omitempty"` - } + var dest QueryCatalogue 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 BadRequest - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationproblemJSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest Unauthorized if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -15854,45 +16153,52 @@ func ParseListGpuTypePricesResponse(rsp *http.Response) (*ListGpuTypePricesRespo } response.ApplicationproblemJSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 502: + var dest BadGateway if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.ApplicationproblemJSON404 = &dest + response.ApplicationproblemJSON502 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationError + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: + var dest ServiceUnavailable if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.ApplicationproblemJSON422 = &dest + response.ApplicationproblemJSON503 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 504: + var dest GatewayTimeout + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON504 = &dest } return response, nil } -// ParseCreateGpuTypePriceResponse parses an HTTP response from a CreateGpuTypePriceWithResponse call -func ParseCreateGpuTypePriceResponse(rsp *http.Response) (*CreateGpuTypePriceResponse, error) { +// ParseGetMetricSeriesResponse parses an HTTP response from a GetMetricSeriesWithResponse call +func ParseGetMetricSeriesResponse(rsp *http.Response) (*GetMetricSeriesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateGpuTypePriceResponse{ + response := &GetMetricSeriesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest GpuPricing + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest MetricSeries if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -15922,41 +16228,79 @@ func ParseCreateGpuTypePriceResponse(rsp *http.Response) (*CreateGpuTypePriceRes } response.ApplicationproblemJSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: - var dest Conflict + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.ApplicationproblemJSON409 = &dest + response.ApplicationproblemJSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationError + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.ApplicationproblemJSON422 = &dest + response.ApplicationproblemJSON429 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 502: + var dest BadGateway + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON502 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: + var dest ServiceUnavailable + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON503 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 504: + var dest GatewayTimeout + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON504 = &dest + + } + + switch { + case rsp.StatusCode == 429: + var headers GetMetricSeriesResponse429Headers + if values := rsp.Header.Values("Retry-After"); len(values) > 0 { + var value int32 + if err := runtime.BindStyledParameterWithOptions("simple", "Retry-After", values[0], &value, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: true, Type: "integer", Format: "int32"}); err != nil { + return nil, err + } + headers.RetryAfter = value + } + response.Headers429 = &headers } return response, nil } -// ParseDeleteGpuTypePriceResponse parses an HTTP response from a DeleteGpuTypePriceWithResponse call -func ParseDeleteGpuTypePriceResponse(rsp *http.Response) (*DeleteGpuTypePriceResponse, error) { +// ParseUpsertOrgTenancyResponse parses an HTTP response from a UpsertOrgTenancyWithResponse call +func ParseUpsertOrgTenancyResponse(rsp *http.Response) (*UpsertOrgTenancyResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteGpuTypePriceResponse{ + response := &UpsertOrgTenancyResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case rsp.StatusCode == 204: - break // No content-type + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest OrgTenancy + 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 BadRequest @@ -15979,48 +16323,46 @@ func ParseDeleteGpuTypePriceResponse(rsp *http.Response) (*DeleteGpuTypePriceRes } response.ApplicationproblemJSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationproblemJSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: - var dest Conflict + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.ApplicationproblemJSON409 = &dest + response.ApplicationproblemJSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationError + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: + var dest ServiceUnavailable if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.ApplicationproblemJSON422 = &dest + response.ApplicationproblemJSON503 = &dest } return response, nil } -// ParseUpdateGpuTypePriceResponse parses an HTTP response from a UpdateGpuTypePriceWithResponse call -func ParseUpdateGpuTypePriceResponse(rsp *http.Response) (*UpdateGpuTypePriceResponse, error) { +// ParseListSecretsResponse parses an HTTP response from a ListSecretsWithResponse call +func ParseListSecretsResponse(rsp *http.Response) (*ListSecretsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateGpuTypePriceResponse{ + response := &ListSecretsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest GpuPricing + var dest struct { + Data *[]Secret `json:"data,omitempty"` + + // NextCursor Cursor for the next page; null when there are no more items. + NextCursor *string `json:"nextCursor,omitempty"` + } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -16047,20 +16389,6 @@ func ParseUpdateGpuTypePriceResponse(rsp *http.Response) (*UpdateGpuTypePriceRes } response.ApplicationproblemJSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationproblemJSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: - var dest Conflict - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationproblemJSON409 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest ValidationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16068,31 +16396,38 @@ func ParseUpdateGpuTypePriceResponse(rsp *http.Response) (*UpdateGpuTypePriceRes } response.ApplicationproblemJSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: + var dest ServiceUnavailable + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON503 = &dest + } return response, nil } -// ParseGetLogEntriesResponse parses an HTTP response from a GetLogEntriesWithResponse call -func ParseGetLogEntriesResponse(rsp *http.Response) (*GetLogEntriesResponse, error) { +// ParseCreateSecretResponse parses an HTTP response from a CreateSecretWithResponse call +func ParseCreateSecretResponse(rsp *http.Response) (*CreateSecretResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetLogEntriesResponse{ + response := &CreateSecretResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest LogEntryPage + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest Secret if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -16115,12 +16450,12 @@ func ParseGetLogEntriesResponse(rsp *http.Response) (*GetLogEntriesResponse, err } response.ApplicationproblemJSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest Conflict if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.ApplicationproblemJSON404 = &dest + response.ApplicationproblemJSON409 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest ValidationError @@ -16129,20 +16464,6 @@ func ParseGetLogEntriesResponse(rsp *http.Response) (*GetLogEntriesResponse, err } response.ApplicationproblemJSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationproblemJSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 502: - var dest BadGateway - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationproblemJSON502 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: var dest ServiceUnavailable if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16150,51 +16471,27 @@ func ParseGetLogEntriesResponse(rsp *http.Response) (*GetLogEntriesResponse, err } response.ApplicationproblemJSON503 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 504: - var dest GatewayTimeout - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationproblemJSON504 = &dest - - } - - switch { - case rsp.StatusCode == 429: - var headers GetLogEntriesResponse429Headers - if values := rsp.Header.Values("Retry-After"); len(values) > 0 { - var value int32 - if err := runtime.BindStyledParameterWithOptions("simple", "Retry-After", values[0], &value, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: true, Type: "integer", Format: "int32"}); err != nil { - return nil, err - } - headers.RetryAfter = value - } - response.Headers429 = &headers } return response, nil } -// ParseListInsightsQueriesResponse parses an HTTP response from a ListInsightsQueriesWithResponse call -func ParseListInsightsQueriesResponse(rsp *http.Response) (*ListInsightsQueriesResponse, error) { +// ParseDeleteSecretResponse parses an HTTP response from a DeleteSecretWithResponse call +func ParseDeleteSecretResponse(rsp *http.Response) (*DeleteSecretResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListInsightsQueriesResponse{ + response := &DeleteSecretResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest QueryCatalogue - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest + case rsp.StatusCode == 204: + break // No content-type case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest Unauthorized @@ -16210,48 +16507,55 @@ func ParseListInsightsQueriesResponse(rsp *http.Response) (*ListInsightsQueriesR } response.ApplicationproblemJSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 502: - var dest BadGateway + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.ApplicationproblemJSON502 = &dest + response.ApplicationproblemJSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: - var dest ServiceUnavailable + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest Conflict if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.ApplicationproblemJSON503 = &dest + response.ApplicationproblemJSON409 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 504: - var dest GatewayTimeout + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.ApplicationproblemJSON504 = &dest + response.ApplicationproblemJSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: + var dest ServiceUnavailable + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON503 = &dest } return response, nil } -// ParseGetMetricSeriesResponse parses an HTTP response from a GetMetricSeriesWithResponse call -func ParseGetMetricSeriesResponse(rsp *http.Response) (*GetMetricSeriesResponse, error) { +// ParseUpdateSecretResponse parses an HTTP response from a UpdateSecretWithResponse call +func ParseUpdateSecretResponse(rsp *http.Response) (*UpdateSecretResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetMetricSeriesResponse{ + response := &UpdateSecretResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest MetricSeries + var dest Secret if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -16292,20 +16596,6 @@ func ParseGetMetricSeriesResponse(rsp *http.Response) (*GetMetricSeriesResponse, } response.ApplicationproblemJSON422 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest TooManyRequests - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationproblemJSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 502: - var dest BadGateway - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationproblemJSON502 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: var dest ServiceUnavailable if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16313,51 +16603,31 @@ func ParseGetMetricSeriesResponse(rsp *http.Response) (*GetMetricSeriesResponse, } response.ApplicationproblemJSON503 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 504: - var dest GatewayTimeout - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.ApplicationproblemJSON504 = &dest - - } - - switch { - case rsp.StatusCode == 429: - var headers GetMetricSeriesResponse429Headers - if values := rsp.Header.Values("Retry-After"); len(values) > 0 { - var value int32 - if err := runtime.BindStyledParameterWithOptions("simple", "Retry-After", values[0], &value, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: true, Type: "integer", Format: "int32"}); err != nil { - return nil, err - } - headers.RetryAfter = value - } - response.Headers429 = &headers } return response, nil } -// ParseUpsertOrgTenancyResponse parses an HTTP response from a UpsertOrgTenancyWithResponse call -func ParseUpsertOrgTenancyResponse(rsp *http.Response) (*UpsertOrgTenancyResponse, error) { +// ParseCreateSourceUploadResponse parses an HTTP response from a CreateSourceUploadWithResponse call +func ParseCreateSourceUploadResponse(rsp *http.Response) (*CreateSourceUploadResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpsertOrgTenancyResponse{ + response := &CreateSourceUploadResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest OrgTenancy + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest SourceUploadCreation if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -16380,6 +16650,13 @@ func ParseUpsertOrgTenancyResponse(rsp *http.Response) (*UpsertOrgTenancyRespons } response.ApplicationproblemJSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest Conflict + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON409 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest ValidationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16387,6 +16664,13 @@ func ParseUpsertOrgTenancyResponse(rsp *http.Response) (*UpsertOrgTenancyRespons } response.ApplicationproblemJSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 502: + var dest BadGateway + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON502 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: var dest ServiceUnavailable if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16399,31 +16683,22 @@ func ParseUpsertOrgTenancyResponse(rsp *http.Response) (*UpsertOrgTenancyRespons return response, nil } -// ParseListSecretsResponse parses an HTTP response from a ListSecretsWithResponse call -func ParseListSecretsResponse(rsp *http.Response) (*ListSecretsResponse, error) { +// ParseDeleteSourceUploadResponse parses an HTTP response from a DeleteSourceUploadWithResponse call +func ParseDeleteSourceUploadResponse(rsp *http.Response) (*DeleteSourceUploadResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListSecretsResponse{ + response := &DeleteSourceUploadResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Data *[]Secret `json:"data,omitempty"` - - // NextCursor Cursor for the next page; null when there are no more items. - NextCursor *string `json:"nextCursor,omitempty"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest + case rsp.StatusCode == 204: + break // No content-type case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -16446,6 +16721,20 @@ func ParseListSecretsResponse(rsp *http.Response) (*ListSecretsResponse, error) } response.ApplicationproblemJSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest Conflict + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON409 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest ValidationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16453,6 +16742,13 @@ func ParseListSecretsResponse(rsp *http.Response) (*ListSecretsResponse, error) } response.ApplicationproblemJSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 502: + var dest BadGateway + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON502 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: var dest ServiceUnavailable if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16465,26 +16761,26 @@ func ParseListSecretsResponse(rsp *http.Response) (*ListSecretsResponse, error) return response, nil } -// ParseCreateSecretResponse parses an HTTP response from a CreateSecretWithResponse call -func ParseCreateSecretResponse(rsp *http.Response) (*CreateSecretResponse, error) { +// ParseGetSourceUploadResponse parses an HTTP response from a GetSourceUploadWithResponse call +func ParseGetSourceUploadResponse(rsp *http.Response) (*GetSourceUploadResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateSecretResponse{ + response := &GetSourceUploadResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest Secret + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SourceUpload if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest @@ -16507,12 +16803,12 @@ func ParseCreateSecretResponse(rsp *http.Response) (*CreateSecretResponse, error } response.ApplicationproblemJSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: - var dest Conflict + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.ApplicationproblemJSON409 = &dest + response.ApplicationproblemJSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest ValidationError @@ -16533,22 +16829,33 @@ func ParseCreateSecretResponse(rsp *http.Response) (*CreateSecretResponse, error return response, nil } -// ParseDeleteSecretResponse parses an HTTP response from a DeleteSecretWithResponse call -func ParseDeleteSecretResponse(rsp *http.Response) (*DeleteSecretResponse, error) { +// ParseCompleteSourceUploadResponse parses an HTTP response from a CompleteSourceUploadWithResponse call +func ParseCompleteSourceUploadResponse(rsp *http.Response) (*CompleteSourceUploadResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteSecretResponse{ + response := &CompleteSourceUploadResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case rsp.StatusCode == 204: - break // No content-type + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SourceUpload + 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 BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest Unauthorized @@ -16585,6 +16892,13 @@ func ParseDeleteSecretResponse(rsp *http.Response) (*DeleteSecretResponse, error } response.ApplicationproblemJSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 502: + var dest BadGateway + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationproblemJSON502 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: var dest ServiceUnavailable if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -16597,22 +16911,22 @@ func ParseDeleteSecretResponse(rsp *http.Response) (*DeleteSecretResponse, error return response, nil } -// ParseUpdateSecretResponse parses an HTTP response from a UpdateSecretWithResponse call -func ParseUpdateSecretResponse(rsp *http.Response) (*UpdateSecretResponse, error) { +// ParseGetSourceResponse parses an HTTP response from a GetSourceWithResponse call +func ParseGetSourceResponse(rsp *http.Response) (*GetSourceResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateSecretResponse{ + response := &GetSourceResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Secret + var dest Source if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } diff --git a/internal/api/serverless/sourceuploads.go b/internal/api/serverless/sourceuploads.go index f85399e..9f06929 100644 --- a/internal/api/serverless/sourceuploads.go +++ b/internal/api/serverless/sourceuploads.go @@ -39,12 +39,12 @@ const SourceUploadStateReady = gen.SourceUploadStateReady // CreateSourceUpload opens an upload session for appId, which need not exist // yet, and returns it with a short-lived instruction for staging the archive. -func (c *Client) CreateSourceUpload(ctx context.Context, appID string, body SourceUploadCreate) (*SourceUploadCreation, error) { +func (c *Client) CreateSourceUpload(ctx context.Context, body SourceUploadCreate) (*SourceUploadCreation, error) { if c.apiKey == "" { return nil, transport.ErrNoAPIKey } - resp, err := c.inner.CreateSourceUploadWithResponse(ctx, appID, body) + resp, err := c.inner.CreateSourceUploadWithResponse(ctx, body) if err != nil { return nil, fmt.Errorf("create source upload: %w", err) } @@ -110,12 +110,12 @@ func (c *Client) StageSourceArchive(ctx context.Context, transfer SourceUploadTr // CompleteSourceUpload asks the API to verify the staged archive against the // session declaration and returns the session in its settled state. -func (c *Client) CompleteSourceUpload(ctx context.Context, appID string, uploadID SourceUploadID) (*SourceUpload, error) { +func (c *Client) CompleteSourceUpload(ctx context.Context, uploadID SourceUploadID) (*SourceUpload, error) { if c.apiKey == "" { return nil, transport.ErrNoAPIKey } - resp, err := c.inner.CompleteSourceUploadWithResponse(ctx, appID, uploadID) + resp, err := c.inner.CompleteSourceUploadWithResponse(ctx, uploadID) if err != nil { return nil, fmt.Errorf("complete source upload: %w", err) } @@ -147,12 +147,12 @@ func (c *Client) CompleteSourceUpload(ctx context.Context, appID string, uploadI // DeleteSourceUpload aborts an unconsumed session and removes its staging // object. Repeating a successful abort is idempotent. -func (c *Client) DeleteSourceUpload(ctx context.Context, appID string, uploadID SourceUploadID) error { +func (c *Client) DeleteSourceUpload(ctx context.Context, uploadID SourceUploadID) error { if c.apiKey == "" { return transport.ErrNoAPIKey } - resp, err := c.inner.DeleteSourceUploadWithResponse(ctx, appID, uploadID) + resp, err := c.inner.DeleteSourceUploadWithResponse(ctx, uploadID) if err != nil { return fmt.Errorf("delete source upload: %w", err) } diff --git a/internal/cmd/serverless/deploy.go b/internal/cmd/serverless/deploy.go index c9c1ba6..0e0d9cb 100644 --- a/internal/cmd/serverless/deploy.go +++ b/internal/cmd/serverless/deploy.go @@ -108,7 +108,7 @@ serverless init' is planned). Endpoints are derived server-side from the SDK.`, spin := cmdutil.NewSpinner(fmt.Sprintf("Uploading source for %s...", id)) spin.Start() - uploadID, err := uploadSource(cmd.Context(), client, id, archive, modelFile) + sourceID, err := uploadSource(cmd.Context(), client, archive) spin.Stop() if err != nil { return err @@ -117,7 +117,8 @@ serverless init' is planned). Endpoints are derived server-side from the SDK.`, source, err := serverlessapi.NewCodeAppSource(serverlessapi.CodeSourceUpsert{ BaseImage: baseImage, Codebase: serverlessapi.CodebaseSource{ - UploadId: uploadID, + SourceId: sourceID, + ModelFile: modelFile, }, Requirements: optionalStringSlice(requirements), }) diff --git a/internal/cmd/serverless/upload.go b/internal/cmd/serverless/upload.go index 1bce929..39f71c3 100644 --- a/internal/cmd/serverless/upload.go +++ b/internal/cmd/serverless/upload.go @@ -10,18 +10,18 @@ import ( serverlessapi "github.com/runware/runware-cli/internal/api/serverless" ) -// uploadSource stages an app's source archive and returns the id of the ready -// upload for the create request to consume. +// uploadSource stages a source archive and returns the id of the source the +// ready upload published, for the create request to consume. // // Three steps, because the archive never travels through the API itself: the // session declares what is coming, the bytes go straight to the staging object // the API names, and completion is what opens the archive and verifies it -// against the declaration. Only then does the upload id mean anything to a -// create. -func uploadSource(ctx context.Context, client *serverlessapi.Client, appID string, archive []byte, modelFile string) (uuid.UUID, error) { +// against the declaration. Only then does the published source mean anything to +// a create. +func uploadSource(ctx context.Context, client *serverlessapi.Client, archive []byte) (uuid.UUID, error) { digest := sha256.Sum256(archive) - created, err := client.CreateSourceUpload(ctx, appID, serverlessapi.SourceUploadCreate{ + created, err := client.CreateSourceUpload(ctx, serverlessapi.SourceUploadCreate{ DeclaredByteLength: int64(len(archive)), // Fresh per invocation, and deliberately not the archive's digest: a // session replays only while it is still pending, and answers 409 once @@ -30,7 +30,6 @@ func uploadSource(ctx context.Context, client *serverlessapi.Client, appID strin IdempotencyKey: uuid.NewString(), Sha256: hex.EncodeToString(digest[:]), SourceType: serverlessapi.AppSourceTypeCode, - ModelFile: &modelFile, }) if err != nil { return uuid.Nil, err @@ -40,18 +39,21 @@ func uploadSource(ctx context.Context, client *serverlessapi.Client, appID strin // The session holds a staging object that will now never be completed, // so give it back rather than leaving it to expire. A failure here is // not the one worth reporting. - _ = client.DeleteSourceUpload(ctx, appID, created.Upload.Id) + _ = client.DeleteSourceUpload(ctx, created.Upload.Id) return uuid.Nil, err } - upload, err := client.CompleteSourceUpload(ctx, appID, created.Upload.Id) + upload, err := client.CompleteSourceUpload(ctx, created.Upload.Id) if err != nil { return uuid.Nil, err } if upload.State != serverlessapi.SourceUploadStateReady { return uuid.Nil, fmt.Errorf("source upload %s: %s", upload.State, rejectionReason(upload)) } - return upload.Id, nil + if upload.SourceId == nil { + return uuid.Nil, fmt.Errorf("source upload %s: ready without a source id", upload.Id) + } + return *upload.SourceId, nil } // rejectionReason reports why completion refused an archive, for the states diff --git a/internal/cmd/serverless/upload_test.go b/internal/cmd/serverless/upload_test.go index 7f5a9cc..4ebe59a 100644 --- a/internal/cmd/serverless/upload_test.go +++ b/internal/cmd/serverless/upload_test.go @@ -16,8 +16,6 @@ import ( serverlessapi "github.com/runware/runware-cli/internal/api/serverless" ) -const uploadTestAppID = "my-app" - // TestUploadSource_StagesTheArchiveAndReturnsAReadyUpload walks the three steps // a deploy now takes before it can create an app, and pins what each one sends: // the declaration has to describe the archive the transfer then carries, or @@ -54,7 +52,7 @@ func TestUploadSource_StagesTheArchiveAndReturnsAReadyUpload(t *testing.T) { api := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { switch { - case r.Method == http.MethodPost && r.URL.Path == "/v1/apps/"+uploadTestAppID+"/source-uploads": + case r.Method == http.MethodPost && r.URL.Path == "/v1/source-uploads": if err := json.NewDecoder(r.Body).Decode(&declaration); err != nil { t.Fatalf("decode declaration: %v", err) } @@ -63,7 +61,6 @@ func TestUploadSource_StagesTheArchiveAndReturnsAReadyUpload(t *testing.T) { _, _ = w.Write([]byte(`{ "upload": { "id": "019c7654-8b21-7abc-9123-abcdef123456", - "appId": "` + uploadTestAppID + `", "declaredByteLength": 18, "sha256": "` + wantSHA + `", "sourceType": "code", @@ -86,10 +83,10 @@ func TestUploadSource_StagesTheArchiveAndReturnsAReadyUpload(t *testing.T) { w.WriteHeader(http.StatusOK) _, _ = w.Write([]byte(`{ "id": "019c7654-8b21-7abc-9123-abcdef123456", - "appId": "` + uploadTestAppID + `", "declaredByteLength": 18, "sha256": "` + wantSHA + `", "sourceType": "code", + "sourceId": "019c7654-8b21-7abc-9123-abcdef123456", "state": "ready", "expiresAt": "2026-09-02T12:00:00Z", "createdAt": "2026-09-02T11:00:00Z", @@ -103,13 +100,13 @@ func TestUploadSource_StagesTheArchiveAndReturnsAReadyUpload(t *testing.T) { defer api.Close() client := serverlessapi.NewClient("test-key", api.URL, slog.Default()) - id, err := uploadSource(context.Background(), client, uploadTestAppID, archive, "model.py") + id, err := uploadSource(context.Background(), client, archive) if err != nil { t.Fatalf("uploadSource: %v", err) } if id.String() != "019c7654-8b21-7abc-9123-abcdef123456" { - t.Errorf("upload id = %s, want the id completion settled", id) + t.Errorf("source id = %s, want the source completion published", id) } if !completed { t.Error("the upload was never completed, so no create could consume it") @@ -128,9 +125,6 @@ func TestUploadSource_StagesTheArchiveAndReturnsAReadyUpload(t *testing.T) { if declaration.DeclaredByteLength != int64(len(archive)) { t.Errorf("declared length = %d, want %d", declaration.DeclaredByteLength, len(archive)) } - if declaration.ModelFile == nil || *declaration.ModelFile != "model.py" { - t.Errorf("declared modelFile = %v, want model.py", declaration.ModelFile) - } if declaration.SourceType != serverlessapi.AppSourceTypeCode { t.Errorf("declared sourceType = %q, want code", declaration.SourceType) } @@ -153,7 +147,6 @@ func TestUploadSource_AbortsTheSessionWhenStagingFails(t *testing.T) { _, _ = w.Write([]byte(`{ "upload": { "id": "019c7654-8b21-7abc-9123-abcdef123456", - "appId": "` + uploadTestAppID + `", "declaredByteLength": 3, "sha256": "` + strings.Repeat("a", 64) + `", "sourceType": "code", @@ -180,7 +173,7 @@ func TestUploadSource_AbortsTheSessionWhenStagingFails(t *testing.T) { defer api.Close() client := serverlessapi.NewClient("test-key", api.URL, slog.Default()) - if _, err := uploadSource(context.Background(), client, uploadTestAppID, []byte("zip"), "model.py"); err == nil { + if _, err := uploadSource(context.Background(), client, []byte("zip")); err == nil { t.Fatal("uploadSource succeeded despite a refused transfer") } if !aborted { @@ -202,7 +195,6 @@ func TestUploadSource_ReportsARejectedArchive(t *testing.T) { w.WriteHeader(http.StatusOK) _, _ = w.Write([]byte(`{ "id": "019c7654-8b21-7abc-9123-abcdef123456", - "appId": "` + uploadTestAppID + `", "declaredByteLength": 3, "sha256": "` + strings.Repeat("a", 64) + `", "sourceType": "code", @@ -218,7 +210,6 @@ func TestUploadSource_ReportsARejectedArchive(t *testing.T) { _, _ = w.Write([]byte(`{ "upload": { "id": "019c7654-8b21-7abc-9123-abcdef123456", - "appId": "` + uploadTestAppID + `", "declaredByteLength": 3, "sha256": "` + strings.Repeat("a", 64) + `", "sourceType": "code", @@ -239,7 +230,7 @@ func TestUploadSource_ReportsARejectedArchive(t *testing.T) { defer api.Close() client := serverlessapi.NewClient("test-key", api.URL, slog.Default()) - _, err := uploadSource(context.Background(), client, uploadTestAppID, []byte("zip"), "model.py") + _, err := uploadSource(context.Background(), client, []byte("zip")) if err == nil { t.Fatal("uploadSource accepted a rejected archive") } @@ -266,10 +257,10 @@ func TestUploadSource_UsesAFreshKeyPerInvocation(t *testing.T) { w.WriteHeader(http.StatusOK) _, _ = w.Write([]byte(`{ "id": "019c7654-8b21-7abc-9123-abcdef123456", - "appId": "` + uploadTestAppID + `", "declaredByteLength": 18, "sha256": "` + strings.Repeat("a", 64) + `", "sourceType": "code", + "sourceId": "019c7654-8b21-7abc-9123-abcdef123456", "state": "ready", "expiresAt": "2026-09-02T12:00:00Z", "createdAt": "2026-09-02T11:00:00Z", @@ -286,7 +277,6 @@ func TestUploadSource_UsesAFreshKeyPerInvocation(t *testing.T) { _, _ = w.Write([]byte(`{ "upload": { "id": "019c7654-8b21-7abc-9123-abcdef123456", - "appId": "` + uploadTestAppID + `", "declaredByteLength": 18, "sha256": "` + strings.Repeat("a", 64) + `", "sourceType": "code", @@ -308,7 +298,7 @@ func TestUploadSource_UsesAFreshKeyPerInvocation(t *testing.T) { client := serverlessapi.NewClient("test-key", api.URL, slog.Default()) for range 2 { - if _, err := uploadSource(context.Background(), client, uploadTestAppID, archive, "model.py"); err != nil { + if _, err := uploadSource(context.Background(), client, archive); err != nil { t.Fatalf("uploadSource: %v", err) } }