@distilled.cloud/namespacelabs 0.0.0-stage → 1.0.0-rc.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +125 -2
- package/lib/.lazy.json +1 -0
- package/lib/_bundle/lazy.js +4 -0
- package/lib/_bundle/sdk.js +2 -0
- package/lib/_bundle/sdk.js.map +1 -0
- package/lib/credentials.d.ts +55 -0
- package/lib/credentials.d.ts.map +1 -0
- package/lib/credentials.js +1 -0
- package/lib/errors.d.ts +33 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +1 -0
- package/lib/index.d.ts +42 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +7 -0
- package/lib/index.lazy.js +7 -0
- package/lib/index.lazy.js.map +1 -0
- package/lib/pagination.d.ts +2 -0
- package/lib/pagination.d.ts.map +1 -0
- package/lib/pagination.js +1 -0
- package/lib/protocol.d.ts +15 -0
- package/lib/protocol.d.ts.map +1 -0
- package/lib/protocol.js +1 -0
- package/lib/retry.d.ts +12 -0
- package/lib/retry.d.ts.map +1 -0
- package/lib/retry.js +1 -0
- package/lib/services/artifacts.d.ts +260 -0
- package/lib/services/artifacts.d.ts.map +1 -0
- package/lib/services/artifacts.js +2 -0
- package/lib/services/artifacts.js.map +1 -0
- package/lib/services/audit.d.ts +149 -0
- package/lib/services/audit.d.ts.map +1 -0
- package/lib/services/audit.js +2 -0
- package/lib/services/audit.js.map +1 -0
- package/lib/services/bazel.d.ts +173 -0
- package/lib/services/bazel.d.ts.map +1 -0
- package/lib/services/bazel.js +2 -0
- package/lib/services/bazel.js.map +1 -0
- package/lib/services/bazel_cache.d.ts +118 -0
- package/lib/services/bazel_cache.d.ts.map +1 -0
- package/lib/services/bazel_cache.js +2 -0
- package/lib/services/bazel_cache.js.map +1 -0
- package/lib/services/builder.d.ts +234 -0
- package/lib/services/builder.d.ts.map +1 -0
- package/lib/services/builder.js +2 -0
- package/lib/services/builder.js.map +1 -0
- package/lib/services/buildkite_jobs.d.ts +121 -0
- package/lib/services/buildkite_jobs.d.ts.map +1 -0
- package/lib/services/buildkite_jobs.js +2 -0
- package/lib/services/buildkite_jobs.js.map +1 -0
- package/lib/services/buildkite_queue.d.ts +178 -0
- package/lib/services/buildkite_queue.d.ts.map +1 -0
- package/lib/services/buildkite_queue.js +2 -0
- package/lib/services/buildkite_queue.js.map +1 -0
- package/lib/services/compute.d.ts +1057 -0
- package/lib/services/compute.d.ts.map +1 -0
- package/lib/services/compute.js +43 -0
- package/lib/services/compute.js.map +1 -0
- package/lib/services/compute_command.d.ts +112 -0
- package/lib/services/compute_command.d.ts.map +1 -0
- package/lib/services/compute_command.js +2 -0
- package/lib/services/compute_command.js.map +1 -0
- package/lib/services/compute_observability.d.ts +157 -0
- package/lib/services/compute_observability.d.ts.map +1 -0
- package/lib/services/compute_observability.js +2 -0
- package/lib/services/compute_observability.js.map +1 -0
- package/lib/services/compute_storage.d.ts +371 -0
- package/lib/services/compute_storage.d.ts.map +1 -0
- package/lib/services/compute_storage.js +33 -0
- package/lib/services/compute_storage.js.map +1 -0
- package/lib/services/compute_usage.d.ts +275 -0
- package/lib/services/compute_usage.d.ts.map +1 -0
- package/lib/services/compute_usage.js +2 -0
- package/lib/services/compute_usage.js.map +1 -0
- package/lib/services/egress.d.ts +183 -0
- package/lib/services/egress.d.ts.map +1 -0
- package/lib/services/egress.js +2 -0
- package/lib/services/egress.js.map +1 -0
- package/lib/services/experimental_compute_reservation.d.ts +662 -0
- package/lib/services/experimental_compute_reservation.d.ts.map +1 -0
- package/lib/services/experimental_compute_reservation.js +23 -0
- package/lib/services/experimental_compute_reservation.js.map +1 -0
- package/lib/services/experimental_remote_results.d.ts +488 -0
- package/lib/services/experimental_remote_results.d.ts.map +1 -0
- package/lib/services/experimental_remote_results.js +2 -0
- package/lib/services/experimental_remote_results.js.map +1 -0
- package/lib/services/github_image.d.ts +154 -0
- package/lib/services/github_image.d.ts.map +1 -0
- package/lib/services/github_image.js +2 -0
- package/lib/services/github_image.js.map +1 -0
- package/lib/services/github_jobs.d.ts +175 -0
- package/lib/services/github_jobs.d.ts.map +1 -0
- package/lib/services/github_jobs.js +2 -0
- package/lib/services/github_jobs.js.map +1 -0
- package/lib/services/github_profile.d.ts +288 -0
- package/lib/services/github_profile.d.ts.map +1 -0
- package/lib/services/github_profile.js +2 -0
- package/lib/services/github_profile.js.map +1 -0
- package/lib/services/gradle_cache.d.ts +117 -0
- package/lib/services/gradle_cache.d.ts.map +1 -0
- package/lib/services/gradle_cache.js +2 -0
- package/lib/services/gradle_cache.js.map +1 -0
- package/lib/services/httpcache.d.ts +117 -0
- package/lib/services/httpcache.d.ts.map +1 -0
- package/lib/services/httpcache.js +2 -0
- package/lib/services/httpcache.js.map +1 -0
- package/lib/services/iam_tenant.d.ts +373 -0
- package/lib/services/iam_tenant.d.ts.map +1 -0
- package/lib/services/iam_tenant.js +39 -0
- package/lib/services/iam_tenant.js.map +1 -0
- package/lib/services/iam_tenant_membership.d.ts +106 -0
- package/lib/services/iam_tenant_membership.d.ts.map +1 -0
- package/lib/services/iam_tenant_membership.js +2 -0
- package/lib/services/iam_tenant_membership.js.map +1 -0
- package/lib/services/iam_token.d.ts +249 -0
- package/lib/services/iam_token.d.ts.map +1 -0
- package/lib/services/iam_token.js +2 -0
- package/lib/services/iam_token.js.map +1 -0
- package/lib/services/image.d.ts +214 -0
- package/lib/services/image.d.ts.map +1 -0
- package/lib/services/image.js +2 -0
- package/lib/services/image.js.map +1 -0
- package/lib/services/index.d.ts +30 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +29 -0
- package/lib/services/private_devbox.d.ts +1156 -0
- package/lib/services/private_devbox.d.ts.map +1 -0
- package/lib/services/private_devbox.js +81 -0
- package/lib/services/private_devbox.js.map +1 -0
- package/lib/services/private_user_sessions.d.ts +137 -0
- package/lib/services/private_user_sessions.d.ts.map +1 -0
- package/lib/services/private_user_sessions.js +2 -0
- package/lib/services/private_user_sessions.js.map +1 -0
- package/lib/services/registry.d.ts +365 -0
- package/lib/services/registry.d.ts.map +1 -0
- package/lib/services/registry.js +34 -0
- package/lib/services/registry.js.map +1 -0
- package/lib/services/testing.d.ts +152 -0
- package/lib/services/testing.d.ts.map +1 -0
- package/lib/services/testing.js +2 -0
- package/lib/services/testing.js.map +1 -0
- package/lib/services/vault.d.ts +195 -0
- package/lib/services/vault.d.ts.map +1 -0
- package/lib/services/vault.js +2 -0
- package/lib/services/vault.js.map +1 -0
- package/lib/services.lazy/artifacts.js +1 -0
- package/lib/services.lazy/audit.js +1 -0
- package/lib/services.lazy/bazel.js +1 -0
- package/lib/services.lazy/bazel_cache.js +1 -0
- package/lib/services.lazy/builder.js +1 -0
- package/lib/services.lazy/buildkite_jobs.js +1 -0
- package/lib/services.lazy/buildkite_queue.js +1 -0
- package/lib/services.lazy/compute.js +4 -0
- package/lib/services.lazy/compute_command.js +1 -0
- package/lib/services.lazy/compute_observability.js +1 -0
- package/lib/services.lazy/compute_storage.js +4 -0
- package/lib/services.lazy/compute_usage.js +1 -0
- package/lib/services.lazy/egress.js +1 -0
- package/lib/services.lazy/experimental_compute_reservation.js +4 -0
- package/lib/services.lazy/experimental_remote_results.js +1 -0
- package/lib/services.lazy/github_image.js +1 -0
- package/lib/services.lazy/github_jobs.js +1 -0
- package/lib/services.lazy/github_profile.js +1 -0
- package/lib/services.lazy/gradle_cache.js +1 -0
- package/lib/services.lazy/httpcache.js +1 -0
- package/lib/services.lazy/iam_tenant.js +4 -0
- package/lib/services.lazy/iam_tenant_membership.js +1 -0
- package/lib/services.lazy/iam_token.js +1 -0
- package/lib/services.lazy/image.js +1 -0
- package/lib/services.lazy/index.js +3 -0
- package/lib/services.lazy/private_devbox.js +4 -0
- package/lib/services.lazy/private_user_sessions.js +1 -0
- package/lib/services.lazy/registry.js +4 -0
- package/lib/services.lazy/testing.js +1 -0
- package/lib/services.lazy/vault.js +1 -0
- package/lib/traits.d.ts +3 -0
- package/lib/traits.d.ts.map +1 -0
- package/lib/traits.js +1 -0
- package/package.json +87 -3
- package/src/credentials.ts +164 -0
- package/src/errors.ts +47 -0
- package/src/index.ts +48 -0
- package/src/pagination.ts +1 -0
- package/src/protocol.ts +82 -0
- package/src/retry.ts +28 -0
- package/src/services/artifacts.ts +761 -0
- package/src/services/audit.ts +315 -0
- package/src/services/bazel.ts +415 -0
- package/src/services/bazel_cache.ts +211 -0
- package/src/services/builder.ts +568 -0
- package/src/services/buildkite_jobs.ts +222 -0
- package/src/services/buildkite_queue.ts +445 -0
- package/src/services/compute.ts +2794 -0
- package/src/services/compute_command.ts +212 -0
- package/src/services/compute_observability.ts +428 -0
- package/src/services/compute_storage.ts +1159 -0
- package/src/services/compute_usage.ts +730 -0
- package/src/services/egress.ts +508 -0
- package/src/services/experimental_compute_reservation.ts +1488 -0
- package/src/services/experimental_remote_results.ts +1157 -0
- package/src/services/github_image.ts +293 -0
- package/src/services/github_jobs.ts +381 -0
- package/src/services/github_profile.ts +721 -0
- package/src/services/gradle_cache.ts +263 -0
- package/src/services/httpcache.ts +263 -0
- package/src/services/iam_tenant.ts +1355 -0
- package/src/services/iam_tenant_membership.ts +245 -0
- package/src/services/iam_token.ts +780 -0
- package/src/services/image.ts +594 -0
- package/src/services/index.ts +30 -0
- package/src/services/private_devbox.ts +4217 -0
- package/src/services/private_user_sessions.ts +402 -0
- package/src/services/registry.ts +1234 -0
- package/src/services/testing.ts +386 -0
- package/src/services/vault.ts +514 -0
- package/src/traits.ts +36 -0
|
@@ -0,0 +1,730 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
2
|
+
import * as C from "@distilled.cloud/core/category";
|
|
3
|
+
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (buf.build/namespace/cloud -> smithy). Do not edit.
|
|
4
|
+
import * as S from "@distilled.cloud/core/schema-lite";
|
|
5
|
+
import * as __L from "@distilled.cloud/core/schema-lite";
|
|
6
|
+
import { UnknownNamespaceLabsError } from "../errors.ts";
|
|
7
|
+
import {
|
|
8
|
+
NamespaceLabsProtocol,
|
|
9
|
+
type NamespaceLabsOpError,
|
|
10
|
+
type NamespaceLabsOpContext,
|
|
11
|
+
} from "../protocol.ts";
|
|
12
|
+
import * as Retry from "../retry.ts";
|
|
13
|
+
import * as T from "../traits.ts";
|
|
14
|
+
// Schema table, filled on first reach (see __S at the end).
|
|
15
|
+
const __s: any[] = [];
|
|
16
|
+
|
|
17
|
+
export type { NamespaceLabsOpError, NamespaceLabsOpContext };
|
|
18
|
+
|
|
19
|
+
/** Span facts shared by every operation (com.distilled.telemetry#service). */
|
|
20
|
+
const TELEMETRY = {
|
|
21
|
+
system: "namespacelabs-api",
|
|
22
|
+
responseHeaders: [
|
|
23
|
+
{ header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
|
|
24
|
+
{ header: "request-id", name: "http.response.header.request-id", transform: "list" },
|
|
25
|
+
],
|
|
26
|
+
prefix: "Namespacelabs",
|
|
27
|
+
service: "UsageService",
|
|
28
|
+
propagate: "w3c",
|
|
29
|
+
} as const;
|
|
30
|
+
|
|
31
|
+
export class AlreadyExists
|
|
32
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
33
|
+
/*@__PURE__*/ S.TaggedError<AlreadyExists>()("AlreadyExists", {
|
|
34
|
+
message: S.String,
|
|
35
|
+
body: S.Unknown,
|
|
36
|
+
}).pipe(C.withConflictError),
|
|
37
|
+
[{ status: 409, body: { "/code": "already_exists" } }],
|
|
38
|
+
) {}
|
|
39
|
+
|
|
40
|
+
export class FailedPrecondition
|
|
41
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
42
|
+
/*@__PURE__*/ S.TaggedError<FailedPrecondition>()("FailedPrecondition", {
|
|
43
|
+
message: S.String,
|
|
44
|
+
body: S.Unknown,
|
|
45
|
+
}).pipe(C.withBadRequestError),
|
|
46
|
+
[{ status: 400, body: { "/code": "failed_precondition" } }],
|
|
47
|
+
) {}
|
|
48
|
+
|
|
49
|
+
export class InvalidArgument
|
|
50
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
51
|
+
/*@__PURE__*/ S.TaggedError<InvalidArgument>()("InvalidArgument", {
|
|
52
|
+
message: S.String,
|
|
53
|
+
body: S.Unknown,
|
|
54
|
+
}).pipe(C.withBadRequestError),
|
|
55
|
+
[{ status: 400, body: { "/code": "invalid_argument" } }],
|
|
56
|
+
) {}
|
|
57
|
+
|
|
58
|
+
export class NotFound
|
|
59
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
60
|
+
/*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
|
|
61
|
+
message: S.String,
|
|
62
|
+
body: S.Unknown,
|
|
63
|
+
}).pipe(C.withBadRequestError),
|
|
64
|
+
[{ status: 404 }],
|
|
65
|
+
) {}
|
|
66
|
+
|
|
67
|
+
export class PermissionDenied
|
|
68
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
69
|
+
/*@__PURE__*/ S.TaggedError<PermissionDenied>()("PermissionDenied", {
|
|
70
|
+
message: S.String,
|
|
71
|
+
body: S.Unknown,
|
|
72
|
+
}).pipe(C.withAuthError),
|
|
73
|
+
[{ status: 403 }],
|
|
74
|
+
) {}
|
|
75
|
+
|
|
76
|
+
export class ResourceExhausted
|
|
77
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
78
|
+
/*@__PURE__*/ S.TaggedError<ResourceExhausted>()("ResourceExhausted", {
|
|
79
|
+
message: S.String,
|
|
80
|
+
body: S.Unknown,
|
|
81
|
+
}).pipe(C.withThrottlingError),
|
|
82
|
+
[{ status: 429 }],
|
|
83
|
+
) {}
|
|
84
|
+
|
|
85
|
+
export class Unauthenticated
|
|
86
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
87
|
+
/*@__PURE__*/ S.TaggedError<Unauthenticated>()("Unauthenticated", {
|
|
88
|
+
message: S.String,
|
|
89
|
+
body: S.Unknown,
|
|
90
|
+
}).pipe(C.withAuthError),
|
|
91
|
+
[{ status: 401 }],
|
|
92
|
+
) {}
|
|
93
|
+
|
|
94
|
+
export interface GetUsageRequestDate {
|
|
95
|
+
/** e.g. 2023 */
|
|
96
|
+
year?: number | undefined;
|
|
97
|
+
/** 1-12 */
|
|
98
|
+
month?: number | undefined;
|
|
99
|
+
/** 1-31 */
|
|
100
|
+
day?: number | undefined;
|
|
101
|
+
}
|
|
102
|
+
/** ArtifactProduct enumerates the object storage products reported by GetArtifactUsage. */
|
|
103
|
+
export type ArtifactProduct =
|
|
104
|
+
| "ARTIFACT_PRODUCT_UNSPECIFIED"
|
|
105
|
+
| "ARTIFACT_PRODUCT_REGISTRY"
|
|
106
|
+
| "ARTIFACT_PRODUCT_TURBOREPO"
|
|
107
|
+
| "ARTIFACT_PRODUCT_GITHUB_ARTIFACTS"
|
|
108
|
+
| "ARTIFACT_PRODUCT_BAZEL"
|
|
109
|
+
| "ARTIFACT_PRODUCT_GRADLE"
|
|
110
|
+
| "ARTIFACT_PRODUCT_ARTIFACTS";
|
|
111
|
+
export type ArtifactProductList = Array<ArtifactProduct | (string & {})>;
|
|
112
|
+
export interface GetArtifactUsageRequest {
|
|
113
|
+
/** Optional: If no start date is provided, then return usage starting from the first day of the current month. Period start is inclusive. */
|
|
114
|
+
periodStart?: GetUsageRequestDate | undefined;
|
|
115
|
+
/** Optional: Limits the time range of the returned results. Period end is inclusive. Period end has to be in the same month as period start. */
|
|
116
|
+
periodEnd?: GetUsageRequestDate | undefined;
|
|
117
|
+
/** Optional: Restricts the results to the given products. If empty, usage for all known object storage products is returned. ARTIFACT_PRODUCT_UNSPECIFIED is not a valid entry. */
|
|
118
|
+
products?: ArtifactProductList | undefined;
|
|
119
|
+
}
|
|
120
|
+
export interface GetArtifactUsageResponseProductUsage {
|
|
121
|
+
/** The object storage product. */
|
|
122
|
+
product: ArtifactProduct;
|
|
123
|
+
/** At-rest storage, in GB-minutes. Divide by (60 * 24 * 30) for GB-months. */
|
|
124
|
+
storageGbMinutes: string;
|
|
125
|
+
/** Reads (bytes sent), in bytes. */
|
|
126
|
+
readsBytes: string;
|
|
127
|
+
}
|
|
128
|
+
export type GetArtifactUsageResponseProductUsageList = Array<GetArtifactUsageResponseProductUsage>;
|
|
129
|
+
export interface GetArtifactUsageResponse {
|
|
130
|
+
/** Per-product object storage usage for the requested period. */
|
|
131
|
+
products: GetArtifactUsageResponseProductUsageList;
|
|
132
|
+
}
|
|
133
|
+
export interface GetConcurrencyRequest {}
|
|
134
|
+
export type StringList = Array<string>;
|
|
135
|
+
export interface UsagePolicyConcurrencyLimits {
|
|
136
|
+
maxCpu: string;
|
|
137
|
+
maxMemoryMb: string;
|
|
138
|
+
maxInstanceCount: string;
|
|
139
|
+
}
|
|
140
|
+
export interface PlatformConcurrencyActiveConcurrency {
|
|
141
|
+
instanceCount: string;
|
|
142
|
+
cpu: string;
|
|
143
|
+
memoryMb: string;
|
|
144
|
+
}
|
|
145
|
+
export interface PlatformConcurrency {
|
|
146
|
+
/** e.g "Linux" */
|
|
147
|
+
name: string;
|
|
148
|
+
/** Platforms covered by this pool, e.g. "linux/amd64". Empty means all enabled platforms. */
|
|
149
|
+
platforms: StringList;
|
|
150
|
+
limits?: UsagePolicyConcurrencyLimits | undefined;
|
|
151
|
+
activeConcurrency?: PlatformConcurrencyActiveConcurrency | undefined;
|
|
152
|
+
}
|
|
153
|
+
export type PlatformConcurrencyList = Array<PlatformConcurrency>;
|
|
154
|
+
export interface GetConcurrencyResponse {
|
|
155
|
+
/** Current usage and limits for each concurrency pool. */
|
|
156
|
+
concurrency: PlatformConcurrencyList;
|
|
157
|
+
}
|
|
158
|
+
export type StringMatcherOperator = "OPERATOR_UNKNOWN" | "IS_ANY_OF" | "IS_NOT";
|
|
159
|
+
export interface StringMatcher {
|
|
160
|
+
values?: StringList | undefined;
|
|
161
|
+
op?: StringMatcherOperator | (string & {}) | undefined;
|
|
162
|
+
}
|
|
163
|
+
export interface GetUsageRequest {
|
|
164
|
+
/** Optional: If no start date is provided, then return the compute usage starting from first day of the current month. Period start is inclusive. */
|
|
165
|
+
periodStart?: GetUsageRequestDate | undefined;
|
|
166
|
+
/** Optional: Limits the time range of the returned results. Period end is inclusive. Period end has to be in the same month as period start. */
|
|
167
|
+
periodEnd?: GetUsageRequestDate | undefined;
|
|
168
|
+
/** Optional: Only include usage from instances matching the specified platform (e.g. "linux/amd64"). */
|
|
169
|
+
matchPlatform?: StringMatcher | undefined;
|
|
170
|
+
/** Optional: Only include usage from instances matching the specified shape (e.g. "2x8"). */
|
|
171
|
+
matchShape?: StringMatcher | undefined;
|
|
172
|
+
/** Optional: Only include usage from instances matching the specified GitHub profile. */
|
|
173
|
+
matchGithubProfile?: StringMatcher | undefined;
|
|
174
|
+
/** Optional: Only include usage from instances matching the specified GitHub repository. */
|
|
175
|
+
matchGithubRepository?: StringMatcher | undefined;
|
|
176
|
+
}
|
|
177
|
+
export interface UsageRecordMinutes {
|
|
178
|
+
/** A compute unit represents using 1 vCPU and 2GB of RAM for a minute. E.g. An instance with 4 vCPU and 8GB RAM that runs for two minutes amounts for two wall minutes and eight unit minutes. */
|
|
179
|
+
unit: string;
|
|
180
|
+
/** Wall minutes represent the total elapsed time for which instances have been running. */
|
|
181
|
+
wall: string;
|
|
182
|
+
}
|
|
183
|
+
export interface UsageRecordBuilds {
|
|
184
|
+
/** The count represents the amount of build requests that were processed in the given period. */
|
|
185
|
+
count: string;
|
|
186
|
+
/** A build unit represents using a build machine with 1 vCPU and 2GB of RAM for a minute. E.g. An builder with 4 vCPU and 8GB RAM that runs for two minutes amounts for two wall minutes and eight unit minutes. */
|
|
187
|
+
unitMinutes: string;
|
|
188
|
+
/** Wall minutes represent the total elapsed time for which build machines have been running. E.g. A build starts at 12:30 and lasts 5 minutes. Another build starts at 12:32 and lasts 7 minutes, the reported wall time is 9 minutes, as the build machine is used from 12:30 until 12:39. */
|
|
189
|
+
wallMinutes: string;
|
|
190
|
+
}
|
|
191
|
+
export interface UsageRecordUsage {
|
|
192
|
+
instanceMinutes?: UsageRecordMinutes | undefined;
|
|
193
|
+
builds?: UsageRecordBuilds | undefined;
|
|
194
|
+
}
|
|
195
|
+
export interface UsageRecord {
|
|
196
|
+
/** e.g. 2023 */
|
|
197
|
+
year: number;
|
|
198
|
+
/** 1-12 */
|
|
199
|
+
month: number;
|
|
200
|
+
/** 1-31 */
|
|
201
|
+
day: number;
|
|
202
|
+
total?: UsageRecordUsage | undefined;
|
|
203
|
+
}
|
|
204
|
+
export type UsageRecordList = Array<UsageRecord>;
|
|
205
|
+
export interface GetUsageResponse {
|
|
206
|
+
/** Cumulated usage summary for the current billing period. */
|
|
207
|
+
total?: UsageRecordUsage | undefined;
|
|
208
|
+
/** Detailed usage summary for the current billing period, broken down per day. */
|
|
209
|
+
perDay: UsageRecordList;
|
|
210
|
+
}
|
|
211
|
+
export interface GetUsageTimeSeriesRequestUsageFilter {
|
|
212
|
+
platform?: StringMatcher | undefined;
|
|
213
|
+
shape?: StringMatcher | undefined;
|
|
214
|
+
purpose?: StringMatcher | undefined;
|
|
215
|
+
githubRepository?: StringMatcher | undefined;
|
|
216
|
+
githubBranch?: StringMatcher | undefined;
|
|
217
|
+
githubWorkflowName?: StringMatcher | undefined;
|
|
218
|
+
githubJobName?: StringMatcher | undefined;
|
|
219
|
+
githubProfile?: StringMatcher | undefined;
|
|
220
|
+
githubJobConclusion?: StringMatcher | undefined;
|
|
221
|
+
buildkiteOrgId?: StringMatcher | undefined;
|
|
222
|
+
buildkitePipelineId?: StringMatcher | undefined;
|
|
223
|
+
buildkitePipelineSlug?: StringMatcher | undefined;
|
|
224
|
+
buildkiteRepository?: StringMatcher | undefined;
|
|
225
|
+
buildkiteBranch?: StringMatcher | undefined;
|
|
226
|
+
buildkiteJobName?: StringMatcher | undefined;
|
|
227
|
+
buildkiteJobState?: StringMatcher | undefined;
|
|
228
|
+
}
|
|
229
|
+
export interface GetUsageTimeSeriesRequest {
|
|
230
|
+
/** Required: Start of the time range (inclusive). */
|
|
231
|
+
startTime?: string | undefined;
|
|
232
|
+
/** Required: End of the time range (exclusive). */
|
|
233
|
+
endTime?: string | undefined;
|
|
234
|
+
/** Optional: Filter the usage data. */
|
|
235
|
+
filter?: GetUsageTimeSeriesRequestUsageFilter | undefined;
|
|
236
|
+
/** Optional: Break down results by the given dimension names. When set, the response will contain a separate time series per unique combination of breakdown values. Valid values: "platform", "shape", "purpose", "github_repository", "github_branch", "github_workflow_name", "github_job_name", "buildkite_org_id", "buildkite_pipeline_id", "buildkite_pipeline_slug", "buildkite_repository", "buildkite_branch", "buildkite_job_name", "buildkite_job_state". */
|
|
237
|
+
breakdownBy?: StringList | undefined;
|
|
238
|
+
}
|
|
239
|
+
export type DoubleList = Array<number>;
|
|
240
|
+
export interface TimeSeriesDoubles {
|
|
241
|
+
values: DoubleList;
|
|
242
|
+
}
|
|
243
|
+
export type TimeSeriesDoublesMap = { [key: string]: TimeSeriesDoubles | undefined };
|
|
244
|
+
export interface TimeSeriesIntegers {
|
|
245
|
+
values: StringList;
|
|
246
|
+
}
|
|
247
|
+
export type TimeSeriesIntegersMap = { [key: string]: TimeSeriesIntegers | undefined };
|
|
248
|
+
export type TimeSeriesStrings = TimeSeriesIntegers;
|
|
249
|
+
export type TimeSeriesStringsMap = { [key: string]: TimeSeriesIntegers | undefined };
|
|
250
|
+
/** Represents a time series of data, associating multiple string-keyed data points to each timestamp. Each data point N has a timestamp stored in timestamps[N]. Data associated with that timestamp is then stored in: - doubles[key].values[N] if the data is represented as a double - integers[key].values[N] if the data is represented as a int64 - strings[key].values[N] if the data is represented as a string The API that returns a TimeSeries describes which keys will be present. */
|
|
251
|
+
export interface TimeSeries {
|
|
252
|
+
/** timestamps are represented as the number of nanoseconds elapsed since January 1, 1970 UTC. */
|
|
253
|
+
timestamps: StringList;
|
|
254
|
+
doubles: TimeSeriesDoublesMap;
|
|
255
|
+
integers: TimeSeriesIntegersMap;
|
|
256
|
+
strings: TimeSeriesStringsMap;
|
|
257
|
+
}
|
|
258
|
+
export interface GetUsageTimeSeriesResponse {
|
|
259
|
+
timeSeries?: TimeSeries | undefined;
|
|
260
|
+
}
|
|
261
|
+
export interface GetVolumeUsageRequest {
|
|
262
|
+
/** Optional: If no start date is provided, then return usage starting from the first day of the current month. Period start is inclusive. */
|
|
263
|
+
periodStart?: GetUsageRequestDate | undefined;
|
|
264
|
+
/** Optional: Limits the time range of the returned results. Period end is inclusive. Period end has to be in the same month as period start. */
|
|
265
|
+
periodEnd?: GetUsageRequestDate | undefined;
|
|
266
|
+
}
|
|
267
|
+
export interface GetVolumeUsageResponseVolumeUsage {
|
|
268
|
+
/** Active cache volume snapshot usage, in GB-minutes. Divide by 60 for GB-hours. */
|
|
269
|
+
cacheSnapshotGbMinutes: string;
|
|
270
|
+
/** At-rest cache volume storage, in MB-minutes. Divide by (1024 * 60 * 24) for GB-days. */
|
|
271
|
+
cacheStorageMbMinutes: string;
|
|
272
|
+
/** At-rest persistent (block) volume storage, in GB-minutes. Divide by (60 * 24) for GB-days. */
|
|
273
|
+
persistentVolumeStorageGbMinutes: string;
|
|
274
|
+
}
|
|
275
|
+
export interface GetVolumeUsageResponse {
|
|
276
|
+
/** Cumulated volume usage for the requested period. */
|
|
277
|
+
total?: GetVolumeUsageResponseVolumeUsage | undefined;
|
|
278
|
+
}
|
|
279
|
+
export type GetArtifactUsageError =
|
|
280
|
+
| InvalidArgument
|
|
281
|
+
| FailedPrecondition
|
|
282
|
+
| Unauthenticated
|
|
283
|
+
| PermissionDenied
|
|
284
|
+
| NotFound
|
|
285
|
+
| AlreadyExists
|
|
286
|
+
| ResourceExhausted
|
|
287
|
+
| NamespaceLabsOpError;
|
|
288
|
+
/** Returns object storage usage per product (at-rest storage and reads) of a tenant starting from the provided start date. If no start date is provided, then it returns usage starting from the first day of the current month. */
|
|
289
|
+
export const getArtifactUsage: API.OperationMethod<
|
|
290
|
+
GetArtifactUsageRequest,
|
|
291
|
+
GetArtifactUsageResponse,
|
|
292
|
+
GetArtifactUsageError,
|
|
293
|
+
NamespaceLabsOpContext
|
|
294
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
295
|
+
input: __S(33, __c2, 1) as any as S.Schema<GetArtifactUsageRequest>,
|
|
296
|
+
output: __S(36, __c2, 4) as any as S.Schema<GetArtifactUsageResponse>,
|
|
297
|
+
errors: [
|
|
298
|
+
InvalidArgument,
|
|
299
|
+
FailedPrecondition,
|
|
300
|
+
Unauthenticated,
|
|
301
|
+
PermissionDenied,
|
|
302
|
+
NotFound,
|
|
303
|
+
AlreadyExists,
|
|
304
|
+
ResourceExhausted,
|
|
305
|
+
UnknownNamespaceLabsError,
|
|
306
|
+
],
|
|
307
|
+
protocol: NamespaceLabsProtocol,
|
|
308
|
+
retry: Retry.Retry,
|
|
309
|
+
telemetry: TELEMETRY,
|
|
310
|
+
span: "GetArtifactUsage",
|
|
311
|
+
}));
|
|
312
|
+
|
|
313
|
+
export type GetConcurrencyError =
|
|
314
|
+
| InvalidArgument
|
|
315
|
+
| FailedPrecondition
|
|
316
|
+
| Unauthenticated
|
|
317
|
+
| PermissionDenied
|
|
318
|
+
| NotFound
|
|
319
|
+
| AlreadyExists
|
|
320
|
+
| ResourceExhausted
|
|
321
|
+
| NamespaceLabsOpError;
|
|
322
|
+
/** Returns a point-in-time view of active compute resources and limits, grouped by concurrency pool. Pools can overlap, so clients should not sum their usage. */
|
|
323
|
+
export const getConcurrency: API.OperationMethod<
|
|
324
|
+
GetConcurrencyRequest,
|
|
325
|
+
GetConcurrencyResponse,
|
|
326
|
+
GetConcurrencyError,
|
|
327
|
+
NamespaceLabsOpContext
|
|
328
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
329
|
+
input: __S(64, __c4, 0) as any as S.Schema<GetConcurrencyRequest>,
|
|
330
|
+
output: __S(69, __c4, 5) as any as S.Schema<GetConcurrencyResponse>,
|
|
331
|
+
errors: [
|
|
332
|
+
InvalidArgument,
|
|
333
|
+
FailedPrecondition,
|
|
334
|
+
Unauthenticated,
|
|
335
|
+
PermissionDenied,
|
|
336
|
+
NotFound,
|
|
337
|
+
AlreadyExists,
|
|
338
|
+
ResourceExhausted,
|
|
339
|
+
UnknownNamespaceLabsError,
|
|
340
|
+
],
|
|
341
|
+
protocol: NamespaceLabsProtocol,
|
|
342
|
+
retry: Retry.Retry,
|
|
343
|
+
telemetry: TELEMETRY,
|
|
344
|
+
span: "GetConcurrency",
|
|
345
|
+
}));
|
|
346
|
+
|
|
347
|
+
export type GetUsageError =
|
|
348
|
+
| InvalidArgument
|
|
349
|
+
| FailedPrecondition
|
|
350
|
+
| Unauthenticated
|
|
351
|
+
| PermissionDenied
|
|
352
|
+
| NotFound
|
|
353
|
+
| AlreadyExists
|
|
354
|
+
| ResourceExhausted
|
|
355
|
+
| NamespaceLabsOpError;
|
|
356
|
+
/** Returns the compute usage of a tenant starting from the provided start date. If no start date is provided, then it returns the compute usage starting from first day of the current month. */
|
|
357
|
+
export const getUsage: API.OperationMethod<
|
|
358
|
+
GetUsageRequest,
|
|
359
|
+
GetUsageResponse,
|
|
360
|
+
GetUsageError,
|
|
361
|
+
NamespaceLabsOpContext
|
|
362
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
363
|
+
input: __S(96, __c6, 0) as any as S.Schema<GetUsageRequest>,
|
|
364
|
+
output: __S(102, __c6, 6) as any as S.Schema<GetUsageResponse>,
|
|
365
|
+
errors: [
|
|
366
|
+
InvalidArgument,
|
|
367
|
+
FailedPrecondition,
|
|
368
|
+
Unauthenticated,
|
|
369
|
+
PermissionDenied,
|
|
370
|
+
NotFound,
|
|
371
|
+
AlreadyExists,
|
|
372
|
+
ResourceExhausted,
|
|
373
|
+
UnknownNamespaceLabsError,
|
|
374
|
+
],
|
|
375
|
+
protocol: NamespaceLabsProtocol,
|
|
376
|
+
retry: Retry.Retry,
|
|
377
|
+
telemetry: TELEMETRY,
|
|
378
|
+
span: "GetUsage",
|
|
379
|
+
}));
|
|
380
|
+
|
|
381
|
+
export type GetUsageTimeSeriesError =
|
|
382
|
+
| InvalidArgument
|
|
383
|
+
| FailedPrecondition
|
|
384
|
+
| Unauthenticated
|
|
385
|
+
| PermissionDenied
|
|
386
|
+
| NotFound
|
|
387
|
+
| AlreadyExists
|
|
388
|
+
| ResourceExhausted
|
|
389
|
+
| NamespaceLabsOpError;
|
|
390
|
+
/** Returns compute usage as a time series for the specified time range. Supports filtering and breaking down results by various dimensions. */
|
|
391
|
+
export const getUsageTimeSeries: API.OperationMethod<
|
|
392
|
+
GetUsageTimeSeriesRequest,
|
|
393
|
+
GetUsageTimeSeriesResponse,
|
|
394
|
+
GetUsageTimeSeriesError,
|
|
395
|
+
NamespaceLabsOpContext
|
|
396
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
397
|
+
input: __S(1, __c0, 1) as any as S.Schema<GetUsageTimeSeriesRequest>,
|
|
398
|
+
output: __S(8, __c0, 8) as any as S.Schema<GetUsageTimeSeriesResponse>,
|
|
399
|
+
errors: [
|
|
400
|
+
InvalidArgument,
|
|
401
|
+
FailedPrecondition,
|
|
402
|
+
Unauthenticated,
|
|
403
|
+
PermissionDenied,
|
|
404
|
+
NotFound,
|
|
405
|
+
AlreadyExists,
|
|
406
|
+
ResourceExhausted,
|
|
407
|
+
UnknownNamespaceLabsError,
|
|
408
|
+
],
|
|
409
|
+
protocol: NamespaceLabsProtocol,
|
|
410
|
+
retry: Retry.Retry,
|
|
411
|
+
telemetry: TELEMETRY,
|
|
412
|
+
span: "GetUsageTimeSeries",
|
|
413
|
+
}));
|
|
414
|
+
|
|
415
|
+
export type GetVolumeUsageError =
|
|
416
|
+
| InvalidArgument
|
|
417
|
+
| FailedPrecondition
|
|
418
|
+
| Unauthenticated
|
|
419
|
+
| PermissionDenied
|
|
420
|
+
| NotFound
|
|
421
|
+
| AlreadyExists
|
|
422
|
+
| ResourceExhausted
|
|
423
|
+
| NamespaceLabsOpError;
|
|
424
|
+
/** Returns volume usage of a tenant starting from the provided start date. This covers both cache volumes (active snapshot and at-rest storage) and persistent (block) volumes (at-rest storage). If no start date is provided, then it returns usage starting from the first day of the current month. */
|
|
425
|
+
export const getVolumeUsage: API.OperationMethod<
|
|
426
|
+
GetVolumeUsageRequest,
|
|
427
|
+
GetVolumeUsageResponse,
|
|
428
|
+
GetVolumeUsageError,
|
|
429
|
+
NamespaceLabsOpContext
|
|
430
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
431
|
+
input: __S(16, __c1, 0) as any as S.Schema<GetVolumeUsageRequest>,
|
|
432
|
+
output: __S(18, __c1, 2) as any as S.Schema<GetVolumeUsageResponse>,
|
|
433
|
+
errors: [
|
|
434
|
+
InvalidArgument,
|
|
435
|
+
FailedPrecondition,
|
|
436
|
+
Unauthenticated,
|
|
437
|
+
PermissionDenied,
|
|
438
|
+
NotFound,
|
|
439
|
+
AlreadyExists,
|
|
440
|
+
ResourceExhausted,
|
|
441
|
+
UnknownNamespaceLabsError,
|
|
442
|
+
],
|
|
443
|
+
protocol: NamespaceLabsProtocol,
|
|
444
|
+
retry: Retry.Retry,
|
|
445
|
+
telemetry: TELEMETRY,
|
|
446
|
+
span: "GetVolumeUsage",
|
|
447
|
+
}));
|
|
448
|
+
|
|
449
|
+
// Schema builders: each runs one schema initializer, on that schema's first use.
|
|
450
|
+
function __c0(j: number): any {
|
|
451
|
+
switch (j) {
|
|
452
|
+
case 0:
|
|
453
|
+
return S.suspend(() =>
|
|
454
|
+
S.Struct({
|
|
455
|
+
platform: S.optional(__S(112, __c7, 0)),
|
|
456
|
+
shape: S.optional(__S(112, __c7, 0)),
|
|
457
|
+
purpose: S.optional(__S(112, __c7, 0)),
|
|
458
|
+
githubRepository: S.optional(__S(112, __c7, 0)),
|
|
459
|
+
githubBranch: S.optional(__S(112, __c7, 0)),
|
|
460
|
+
githubWorkflowName: S.optional(__S(112, __c7, 0)),
|
|
461
|
+
githubJobName: S.optional(__S(112, __c7, 0)),
|
|
462
|
+
githubProfile: S.optional(__S(112, __c7, 0)),
|
|
463
|
+
githubJobConclusion: S.optional(__S(112, __c7, 0)),
|
|
464
|
+
buildkiteOrgId: S.optional(__S(112, __c7, 0)),
|
|
465
|
+
buildkitePipelineId: S.optional(__S(112, __c7, 0)),
|
|
466
|
+
buildkitePipelineSlug: S.optional(__S(112, __c7, 0)),
|
|
467
|
+
buildkiteRepository: S.optional(__S(112, __c7, 0)),
|
|
468
|
+
buildkiteBranch: S.optional(__S(112, __c7, 0)),
|
|
469
|
+
buildkiteJobName: S.optional(__S(112, __c7, 0)),
|
|
470
|
+
buildkiteJobState: S.optional(__S(112, __c7, 0)),
|
|
471
|
+
}),
|
|
472
|
+
).annotate({ identifier: "GetUsageTimeSeriesRequestUsageFilter" });
|
|
473
|
+
case 1:
|
|
474
|
+
return S.suspend(() =>
|
|
475
|
+
S.Struct({
|
|
476
|
+
startTime: S.optional(S.String),
|
|
477
|
+
endTime: S.optional(S.String),
|
|
478
|
+
filter: S.optional(__S(0, __c0, 0)),
|
|
479
|
+
breakdownBy: S.optional(__S(80, __c5, 0)),
|
|
480
|
+
}).pipe(
|
|
481
|
+
T.Http({
|
|
482
|
+
method: "POST",
|
|
483
|
+
uri: "/namespace.cloud.compute.v1beta.UsageService/GetUsageTimeSeries",
|
|
484
|
+
code: 200,
|
|
485
|
+
}),
|
|
486
|
+
),
|
|
487
|
+
).annotate({ identifier: "GetUsageTimeSeriesRequest" });
|
|
488
|
+
case 2:
|
|
489
|
+
return S.Array(S.Number);
|
|
490
|
+
case 3:
|
|
491
|
+
return S.suspend(() =>
|
|
492
|
+
S.Struct({
|
|
493
|
+
values: __S(2, __c0, 2),
|
|
494
|
+
}),
|
|
495
|
+
).annotate({ identifier: "TimeSeriesDoubles" });
|
|
496
|
+
case 4:
|
|
497
|
+
return S.Record(S.String, __S(3, __c0, 3));
|
|
498
|
+
case 5:
|
|
499
|
+
return S.suspend(() =>
|
|
500
|
+
S.Struct({
|
|
501
|
+
values: __S(80, __c5, 0),
|
|
502
|
+
}),
|
|
503
|
+
).annotate({ identifier: "TimeSeriesIntegers" });
|
|
504
|
+
case 6:
|
|
505
|
+
return S.Record(S.String, __S(5, __c0, 5));
|
|
506
|
+
case 7:
|
|
507
|
+
return S.suspend(() =>
|
|
508
|
+
S.Struct({
|
|
509
|
+
timestamps: __S(80, __c5, 0),
|
|
510
|
+
doubles: __S(4, __c0, 4),
|
|
511
|
+
integers: __S(6, __c0, 6),
|
|
512
|
+
strings: __S(6, __c0, 6),
|
|
513
|
+
}),
|
|
514
|
+
).annotate({ identifier: "TimeSeries" });
|
|
515
|
+
case 8:
|
|
516
|
+
return S.suspend(() =>
|
|
517
|
+
S.Struct({
|
|
518
|
+
timeSeries: S.optional(__S(7, __c0, 7)),
|
|
519
|
+
}),
|
|
520
|
+
).annotate({ identifier: "GetUsageTimeSeriesResponse" });
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
function __c1(j: number): any {
|
|
524
|
+
switch (j) {
|
|
525
|
+
case 0:
|
|
526
|
+
return S.suspend(() =>
|
|
527
|
+
S.Struct({
|
|
528
|
+
periodStart: S.optional(__S(48, __c3, 0)),
|
|
529
|
+
periodEnd: S.optional(__S(48, __c3, 0)),
|
|
530
|
+
}).pipe(
|
|
531
|
+
T.Http({
|
|
532
|
+
method: "POST",
|
|
533
|
+
uri: "/namespace.cloud.compute.v1beta.UsageService/GetVolumeUsage",
|
|
534
|
+
code: 200,
|
|
535
|
+
}),
|
|
536
|
+
),
|
|
537
|
+
).annotate({ identifier: "GetVolumeUsageRequest" });
|
|
538
|
+
case 1:
|
|
539
|
+
return S.suspend(() =>
|
|
540
|
+
S.Struct({
|
|
541
|
+
cacheSnapshotGbMinutes: S.String,
|
|
542
|
+
cacheStorageMbMinutes: S.String,
|
|
543
|
+
persistentVolumeStorageGbMinutes: S.String,
|
|
544
|
+
}),
|
|
545
|
+
).annotate({ identifier: "GetVolumeUsageResponseVolumeUsage" });
|
|
546
|
+
case 2:
|
|
547
|
+
return S.suspend(() =>
|
|
548
|
+
S.Struct({
|
|
549
|
+
total: S.optional(__S(17, __c1, 1)),
|
|
550
|
+
}),
|
|
551
|
+
).annotate({ identifier: "GetVolumeUsageResponse" });
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
function __c2(j: number): any {
|
|
555
|
+
switch (j) {
|
|
556
|
+
case 0:
|
|
557
|
+
return S.Array(S.String);
|
|
558
|
+
case 1:
|
|
559
|
+
return S.suspend(() =>
|
|
560
|
+
S.Struct({
|
|
561
|
+
periodStart: S.optional(__S(48, __c3, 0)),
|
|
562
|
+
periodEnd: S.optional(__S(48, __c3, 0)),
|
|
563
|
+
products: S.optional(__S(32, __c2, 0)),
|
|
564
|
+
}).pipe(
|
|
565
|
+
T.Http({
|
|
566
|
+
method: "POST",
|
|
567
|
+
uri: "/namespace.cloud.compute.v1beta.UsageService/GetArtifactUsage",
|
|
568
|
+
code: 200,
|
|
569
|
+
}),
|
|
570
|
+
),
|
|
571
|
+
).annotate({ identifier: "GetArtifactUsageRequest" });
|
|
572
|
+
case 2:
|
|
573
|
+
return S.suspend(() =>
|
|
574
|
+
S.Struct({
|
|
575
|
+
product: S.String,
|
|
576
|
+
storageGbMinutes: S.String,
|
|
577
|
+
readsBytes: S.String,
|
|
578
|
+
}),
|
|
579
|
+
).annotate({ identifier: "GetArtifactUsageResponseProductUsage" });
|
|
580
|
+
case 3:
|
|
581
|
+
return S.Array(__S(34, __c2, 2));
|
|
582
|
+
case 4:
|
|
583
|
+
return S.suspend(() =>
|
|
584
|
+
S.Struct({
|
|
585
|
+
products: __S(35, __c2, 3),
|
|
586
|
+
}),
|
|
587
|
+
).annotate({ identifier: "GetArtifactUsageResponse" });
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
function __c3(j: number): any {
|
|
591
|
+
switch (j) {
|
|
592
|
+
case 0:
|
|
593
|
+
return S.suspend(() =>
|
|
594
|
+
S.Struct({
|
|
595
|
+
year: S.optional(S.Number),
|
|
596
|
+
month: S.optional(S.Number),
|
|
597
|
+
day: S.optional(S.Number),
|
|
598
|
+
}),
|
|
599
|
+
).annotate({ identifier: "GetUsageRequestDate" });
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
function __c4(j: number): any {
|
|
603
|
+
switch (j) {
|
|
604
|
+
case 0:
|
|
605
|
+
return S.suspend(() =>
|
|
606
|
+
S.Struct({}).pipe(
|
|
607
|
+
T.Http({
|
|
608
|
+
method: "POST",
|
|
609
|
+
uri: "/namespace.cloud.compute.v1beta.UsageService/GetConcurrency",
|
|
610
|
+
code: 200,
|
|
611
|
+
}),
|
|
612
|
+
),
|
|
613
|
+
).annotate({ identifier: "GetConcurrencyRequest" });
|
|
614
|
+
case 1:
|
|
615
|
+
return S.suspend(() =>
|
|
616
|
+
S.Struct({
|
|
617
|
+
maxCpu: S.String,
|
|
618
|
+
maxMemoryMb: S.String,
|
|
619
|
+
maxInstanceCount: S.String,
|
|
620
|
+
}),
|
|
621
|
+
).annotate({ identifier: "UsagePolicyConcurrencyLimits" });
|
|
622
|
+
case 2:
|
|
623
|
+
return S.suspend(() =>
|
|
624
|
+
S.Struct({
|
|
625
|
+
instanceCount: S.String,
|
|
626
|
+
cpu: S.String,
|
|
627
|
+
memoryMb: S.String,
|
|
628
|
+
}),
|
|
629
|
+
).annotate({ identifier: "PlatformConcurrencyActiveConcurrency" });
|
|
630
|
+
case 3:
|
|
631
|
+
return S.suspend(() =>
|
|
632
|
+
S.Struct({
|
|
633
|
+
name: S.String,
|
|
634
|
+
platforms: __S(80, __c5, 0),
|
|
635
|
+
limits: S.optional(__S(65, __c4, 1)),
|
|
636
|
+
activeConcurrency: S.optional(__S(66, __c4, 2)),
|
|
637
|
+
}),
|
|
638
|
+
).annotate({ identifier: "PlatformConcurrency" });
|
|
639
|
+
case 4:
|
|
640
|
+
return S.Array(__S(67, __c4, 3));
|
|
641
|
+
case 5:
|
|
642
|
+
return S.suspend(() =>
|
|
643
|
+
S.Struct({
|
|
644
|
+
concurrency: __S(68, __c4, 4),
|
|
645
|
+
}),
|
|
646
|
+
).annotate({ identifier: "GetConcurrencyResponse" });
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
function __c5(j: number): any {
|
|
650
|
+
switch (j) {
|
|
651
|
+
case 0:
|
|
652
|
+
return S.Array(S.String);
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
function __c6(j: number): any {
|
|
656
|
+
switch (j) {
|
|
657
|
+
case 0:
|
|
658
|
+
return S.suspend(() =>
|
|
659
|
+
S.Struct({
|
|
660
|
+
periodStart: S.optional(__S(48, __c3, 0)),
|
|
661
|
+
periodEnd: S.optional(__S(48, __c3, 0)),
|
|
662
|
+
matchPlatform: S.optional(__S(112, __c7, 0)),
|
|
663
|
+
matchShape: S.optional(__S(112, __c7, 0)),
|
|
664
|
+
matchGithubProfile: S.optional(__S(112, __c7, 0)),
|
|
665
|
+
matchGithubRepository: S.optional(__S(112, __c7, 0)),
|
|
666
|
+
}).pipe(
|
|
667
|
+
T.Http({
|
|
668
|
+
method: "POST",
|
|
669
|
+
uri: "/namespace.cloud.compute.v1beta.UsageService/GetUsage",
|
|
670
|
+
code: 200,
|
|
671
|
+
}),
|
|
672
|
+
),
|
|
673
|
+
).annotate({ identifier: "GetUsageRequest" });
|
|
674
|
+
case 1:
|
|
675
|
+
return S.suspend(() =>
|
|
676
|
+
S.Struct({
|
|
677
|
+
unit: S.String,
|
|
678
|
+
wall: S.String,
|
|
679
|
+
}),
|
|
680
|
+
).annotate({ identifier: "UsageRecordMinutes" });
|
|
681
|
+
case 2:
|
|
682
|
+
return S.suspend(() =>
|
|
683
|
+
S.Struct({
|
|
684
|
+
count: S.String,
|
|
685
|
+
unitMinutes: S.String,
|
|
686
|
+
wallMinutes: S.String,
|
|
687
|
+
}),
|
|
688
|
+
).annotate({ identifier: "UsageRecordBuilds" });
|
|
689
|
+
case 3:
|
|
690
|
+
return S.suspend(() =>
|
|
691
|
+
S.Struct({
|
|
692
|
+
instanceMinutes: S.optional(__S(97, __c6, 1)),
|
|
693
|
+
builds: S.optional(__S(98, __c6, 2)),
|
|
694
|
+
}),
|
|
695
|
+
).annotate({ identifier: "UsageRecordUsage" });
|
|
696
|
+
case 4:
|
|
697
|
+
return S.suspend(() =>
|
|
698
|
+
S.Struct({
|
|
699
|
+
year: S.Number,
|
|
700
|
+
month: S.Number,
|
|
701
|
+
day: S.Number,
|
|
702
|
+
total: S.optional(__S(99, __c6, 3)),
|
|
703
|
+
}),
|
|
704
|
+
).annotate({ identifier: "UsageRecord" });
|
|
705
|
+
case 5:
|
|
706
|
+
return S.Array(__S(100, __c6, 4));
|
|
707
|
+
case 6:
|
|
708
|
+
return S.suspend(() =>
|
|
709
|
+
S.Struct({
|
|
710
|
+
total: S.optional(__S(99, __c6, 3)),
|
|
711
|
+
perDay: __S(101, __c6, 5),
|
|
712
|
+
}),
|
|
713
|
+
).annotate({ identifier: "GetUsageResponse" });
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
function __c7(j: number): any {
|
|
717
|
+
switch (j) {
|
|
718
|
+
case 0:
|
|
719
|
+
return S.suspend(() =>
|
|
720
|
+
S.Struct({
|
|
721
|
+
values: S.optional(__S(80, __c5, 0)),
|
|
722
|
+
op: S.optional(S.String),
|
|
723
|
+
}),
|
|
724
|
+
).annotate({ identifier: "StringMatcher" });
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
// Schema table: entry i is schema j of builder f, made on first reach.
|
|
728
|
+
function __S(i: number, f: (j: number) => unknown, j: number): any {
|
|
729
|
+
return (__s[i] ??= __L.at(f, j));
|
|
730
|
+
}
|