@alienplatform/sdk 1.14.1 → 2.0.0
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/dist/dist.js +371 -275
- package/dist/index.d.ts +22 -28
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -14356
- package/dist/native.d.ts +26 -0
- package/dist/native.d.ts.map +1 -0
- package/dist/native.js +2 -0
- package/dist/worker-runtime/channel.d.ts +25 -0
- package/dist/worker-runtime/channel.d.ts.map +1 -0
- package/dist/worker-runtime/errors.d.ts +79 -0
- package/dist/worker-runtime/errors.d.ts.map +1 -0
- package/dist/worker-runtime/event-loop.d.ts +43 -0
- package/dist/worker-runtime/event-loop.d.ts.map +1 -0
- package/dist/{generated → worker-runtime/generated}/control.d.ts +15 -15
- package/dist/worker-runtime/generated/control.d.ts.map +1 -0
- package/dist/worker-runtime/generated/google/protobuf/duration.d.ts.map +1 -0
- package/dist/worker-runtime/generated/google/protobuf/timestamp.d.ts.map +1 -0
- package/dist/{generated → worker-runtime/generated}/wait_until.d.ts +29 -29
- package/dist/worker-runtime/generated/wait_until.d.ts.map +1 -0
- package/dist/worker-runtime/grpc-utils.d.ts +23 -0
- package/dist/worker-runtime/grpc-utils.d.ts.map +1 -0
- package/dist/worker-runtime/index.d.ts +33 -0
- package/dist/worker-runtime/index.d.ts.map +1 -0
- package/dist/{src.js → worker-runtime/index.js} +9370 -4035
- package/dist/worker-runtime/registry.d.ts +169 -0
- package/dist/worker-runtime/registry.d.ts.map +1 -0
- package/dist/worker-runtime/service-definitions.d.ts +12 -0
- package/dist/worker-runtime/service-definitions.d.ts.map +1 -0
- package/dist/worker-runtime/wait-until-manager.d.ts +34 -0
- package/dist/worker-runtime/wait-until-manager.d.ts.map +1 -0
- package/package.json +18 -38
- package/.turbo/turbo-build.log +0 -30
- package/AGENTS.md +0 -70
- package/dist/bearerTokenAuthenticationPolicy.js +0 -3028
- package/dist/bindings/artifact-registry.d.ts +0 -88
- package/dist/bindings/artifact-registry.d.ts.map +0 -1
- package/dist/bindings/build.d.ts +0 -67
- package/dist/bindings/build.d.ts.map +0 -1
- package/dist/bindings/index.d.ts +0 -13
- package/dist/bindings/index.d.ts.map +0 -1
- package/dist/bindings/kv.d.ts +0 -113
- package/dist/bindings/kv.d.ts.map +0 -1
- package/dist/bindings/postgres.d.ts +0 -90
- package/dist/bindings/postgres.d.ts.map +0 -1
- package/dist/bindings/postgres.test.d.ts +0 -2
- package/dist/bindings/postgres.test.d.ts.map +0 -1
- package/dist/bindings/queue.d.ts +0 -81
- package/dist/bindings/queue.d.ts.map +0 -1
- package/dist/bindings/service-account.d.ts +0 -46
- package/dist/bindings/service-account.d.ts.map +0 -1
- package/dist/bindings/storage.d.ts +0 -164
- package/dist/bindings/storage.d.ts.map +0 -1
- package/dist/bindings/vault.d.ts +0 -65
- package/dist/bindings/vault.d.ts.map +0 -1
- package/dist/bindings/worker.d.ts +0 -72
- package/dist/bindings/worker.d.ts.map +0 -1
- package/dist/channel.d.ts +0 -39
- package/dist/channel.d.ts.map +0 -1
- package/dist/checksum.js +0 -6176
- package/dist/commands/client.d.ts +0 -47
- package/dist/commands/client.d.ts.map +0 -1
- package/dist/commands/errors.d.ts +0 -198
- package/dist/commands/errors.d.ts.map +0 -1
- package/dist/commands/index.d.ts +0 -23
- package/dist/commands/index.d.ts.map +0 -1
- package/dist/commands/index.js +0 -387
- package/dist/commands/types.d.ts +0 -40
- package/dist/commands/types.d.ts.map +0 -1
- package/dist/commands.d.ts +0 -55
- package/dist/commands.d.ts.map +0 -1
- package/dist/context.d.ts +0 -182
- package/dist/context.d.ts.map +0 -1
- package/dist/dist-cjs.js +0 -15258
- package/dist/dist2.js +0 -1239
- package/dist/errors.d.ts +0 -359
- package/dist/errors.d.ts.map +0 -1
- package/dist/es5.js +0 -1720
- package/dist/esm.js +0 -18068
- package/dist/esm2.js +0 -3166
- package/dist/event-streams.js +0 -770
- package/dist/events.d.ts +0 -163
- package/dist/events.d.ts.map +0 -1
- package/dist/generated/artifact_registry.d.ts +0 -302
- package/dist/generated/artifact_registry.d.ts.map +0 -1
- package/dist/generated/build.d.ts +0 -184
- package/dist/generated/build.d.ts.map +0 -1
- package/dist/generated/container.d.ts +0 -101
- package/dist/generated/container.d.ts.map +0 -1
- package/dist/generated/control.d.ts.map +0 -1
- package/dist/generated/google/protobuf/duration.d.ts.map +0 -1
- package/dist/generated/google/protobuf/timestamp.d.ts.map +0 -1
- package/dist/generated/kv.d.ts +0 -182
- package/dist/generated/kv.d.ts.map +0 -1
- package/dist/generated/queue.d.ts +0 -127
- package/dist/generated/queue.d.ts.map +0 -1
- package/dist/generated/service_account.d.ts +0 -112
- package/dist/generated/service_account.d.ts.map +0 -1
- package/dist/generated/storage.d.ts +0 -784
- package/dist/generated/storage.d.ts.map +0 -1
- package/dist/generated/vault.d.ts +0 -107
- package/dist/generated/vault.d.ts.map +0 -1
- package/dist/generated/wait_until.d.ts.map +0 -1
- package/dist/generated/worker.d.ts +0 -107
- package/dist/generated/worker.d.ts.map +0 -1
- package/dist/global.d.ts +0 -208
- package/dist/global.d.ts.map +0 -1
- package/dist/grpc-utils.d.ts +0 -25
- package/dist/grpc-utils.d.ts.map +0 -1
- package/dist/jws.js +0 -611
- package/dist/open.js +0 -461
- package/dist/rolldown-runtime.js +0 -44
- package/dist/src2.js +0 -114032
- package/dist/types.d.ts +0 -337
- package/dist/types.d.ts.map +0 -1
- package/dist/wait-until.d.ts +0 -115
- package/dist/wait-until.d.ts.map +0 -1
- package/scripts/generate-proto.sh +0 -46
- package/src/bindings/AGENTS.md +0 -105
- package/src/bindings/artifact-registry.ts +0 -317
- package/src/bindings/build.ts +0 -195
- package/src/bindings/index.ts +0 -13
- package/src/bindings/kv.ts +0 -240
- package/src/bindings/postgres.test.ts +0 -17
- package/src/bindings/postgres.ts +0 -446
- package/src/bindings/queue.ts +0 -191
- package/src/bindings/service-account.ts +0 -113
- package/src/bindings/storage.ts +0 -536
- package/src/bindings/vault.ts +0 -133
- package/src/bindings/worker.ts +0 -164
- package/src/channel.ts +0 -102
- package/src/commands/client.ts +0 -446
- package/src/commands/errors.ts +0 -126
- package/src/commands/index.ts +0 -41
- package/src/commands/types.ts +0 -52
- package/src/commands.ts +0 -76
- package/src/context.ts +0 -368
- package/src/errors.ts +0 -280
- package/src/events.ts +0 -511
- package/src/generated/artifact_registry.ts +0 -2096
- package/src/generated/build.ts +0 -1311
- package/src/generated/container.ts +0 -503
- package/src/generated/control.ts +0 -2018
- package/src/generated/google/protobuf/duration.ts +0 -196
- package/src/generated/google/protobuf/timestamp.ts +0 -226
- package/src/generated/kv.ts +0 -1169
- package/src/generated/queue.ts +0 -753
- package/src/generated/service_account.ts +0 -814
- package/src/generated/storage.ts +0 -3820
- package/src/generated/vault.ts +0 -543
- package/src/generated/wait_until.ts +0 -829
- package/src/generated/worker.ts +0 -759
- package/src/global.ts +0 -287
- package/src/grpc-utils.ts +0 -159
- package/src/index.ts +0 -160
- package/src/types.ts +0 -397
- package/src/wait-until.ts +0 -273
- package/tsconfig.json +0 -8
- package/tsdown.config.ts +0 -17
- /package/dist/{generated → worker-runtime/generated}/google/protobuf/duration.d.ts +0 -0
- /package/dist/{generated → worker-runtime/generated}/google/protobuf/timestamp.d.ts +0 -0
package/src/generated/storage.ts
DELETED
|
@@ -1,3820 +0,0 @@
|
|
|
1
|
-
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
-
// versions:
|
|
3
|
-
// protoc-gen-ts_proto v2.12.0
|
|
4
|
-
// protoc v7.34.1
|
|
5
|
-
// source: storage.proto
|
|
6
|
-
|
|
7
|
-
/* eslint-disable */
|
|
8
|
-
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
9
|
-
import type { CallContext, CallOptions } from "nice-grpc-common";
|
|
10
|
-
import { Timestamp } from "./google/protobuf/timestamp.js";
|
|
11
|
-
|
|
12
|
-
export const protobufPackage = "alien_bindings.storage";
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Defines the behavior for a put operation if the object already exists.
|
|
16
|
-
* Maps to object_store::PutMode.
|
|
17
|
-
*/
|
|
18
|
-
export enum StoragePutModeEnum {
|
|
19
|
-
/**
|
|
20
|
-
* PUT_MODE_OVERWRITE - Overwrites the object if it exists. This is the default behavior.
|
|
21
|
-
* Maps to object_store::PutMode::Overwrite.
|
|
22
|
-
*/
|
|
23
|
-
PUT_MODE_OVERWRITE = 0,
|
|
24
|
-
/**
|
|
25
|
-
* PUT_MODE_CREATE - Fails the operation if the object already exists.
|
|
26
|
-
* Maps to object_store::PutMode::Create.
|
|
27
|
-
*/
|
|
28
|
-
PUT_MODE_CREATE = 1,
|
|
29
|
-
/**
|
|
30
|
-
* PUT_MODE_UPDATE - Updates the object only if the provided version details match the existing object's version.
|
|
31
|
-
* Requires `update_version_details` in `StoragePutOptions`.
|
|
32
|
-
* Maps to object_store::PutMode::Update.
|
|
33
|
-
*/
|
|
34
|
-
PUT_MODE_UPDATE = 2,
|
|
35
|
-
UNRECOGNIZED = -1,
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export function storagePutModeEnumFromJSON(object: any): StoragePutModeEnum {
|
|
39
|
-
switch (object) {
|
|
40
|
-
case 0:
|
|
41
|
-
case "PUT_MODE_OVERWRITE":
|
|
42
|
-
return StoragePutModeEnum.PUT_MODE_OVERWRITE;
|
|
43
|
-
case 1:
|
|
44
|
-
case "PUT_MODE_CREATE":
|
|
45
|
-
return StoragePutModeEnum.PUT_MODE_CREATE;
|
|
46
|
-
case 2:
|
|
47
|
-
case "PUT_MODE_UPDATE":
|
|
48
|
-
return StoragePutModeEnum.PUT_MODE_UPDATE;
|
|
49
|
-
case -1:
|
|
50
|
-
case "UNRECOGNIZED":
|
|
51
|
-
default:
|
|
52
|
-
return StoragePutModeEnum.UNRECOGNIZED;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export function storagePutModeEnumToJSON(object: StoragePutModeEnum): string {
|
|
57
|
-
switch (object) {
|
|
58
|
-
case StoragePutModeEnum.PUT_MODE_OVERWRITE:
|
|
59
|
-
return "PUT_MODE_OVERWRITE";
|
|
60
|
-
case StoragePutModeEnum.PUT_MODE_CREATE:
|
|
61
|
-
return "PUT_MODE_CREATE";
|
|
62
|
-
case StoragePutModeEnum.PUT_MODE_UPDATE:
|
|
63
|
-
return "PUT_MODE_UPDATE";
|
|
64
|
-
case StoragePutModeEnum.UNRECOGNIZED:
|
|
65
|
-
default:
|
|
66
|
-
return "UNRECOGNIZED";
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/** HTTP method for signed URL requests. */
|
|
71
|
-
export enum StorageHttpMethod {
|
|
72
|
-
HTTP_METHOD_GET = 0,
|
|
73
|
-
HTTP_METHOD_PUT = 1,
|
|
74
|
-
HTTP_METHOD_POST = 2,
|
|
75
|
-
HTTP_METHOD_DELETE = 3,
|
|
76
|
-
HTTP_METHOD_HEAD = 4,
|
|
77
|
-
UNRECOGNIZED = -1,
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export function storageHttpMethodFromJSON(object: any): StorageHttpMethod {
|
|
81
|
-
switch (object) {
|
|
82
|
-
case 0:
|
|
83
|
-
case "HTTP_METHOD_GET":
|
|
84
|
-
return StorageHttpMethod.HTTP_METHOD_GET;
|
|
85
|
-
case 1:
|
|
86
|
-
case "HTTP_METHOD_PUT":
|
|
87
|
-
return StorageHttpMethod.HTTP_METHOD_PUT;
|
|
88
|
-
case 2:
|
|
89
|
-
case "HTTP_METHOD_POST":
|
|
90
|
-
return StorageHttpMethod.HTTP_METHOD_POST;
|
|
91
|
-
case 3:
|
|
92
|
-
case "HTTP_METHOD_DELETE":
|
|
93
|
-
return StorageHttpMethod.HTTP_METHOD_DELETE;
|
|
94
|
-
case 4:
|
|
95
|
-
case "HTTP_METHOD_HEAD":
|
|
96
|
-
return StorageHttpMethod.HTTP_METHOD_HEAD;
|
|
97
|
-
case -1:
|
|
98
|
-
case "UNRECOGNIZED":
|
|
99
|
-
default:
|
|
100
|
-
return StorageHttpMethod.UNRECOGNIZED;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export function storageHttpMethodToJSON(object: StorageHttpMethod): string {
|
|
105
|
-
switch (object) {
|
|
106
|
-
case StorageHttpMethod.HTTP_METHOD_GET:
|
|
107
|
-
return "HTTP_METHOD_GET";
|
|
108
|
-
case StorageHttpMethod.HTTP_METHOD_PUT:
|
|
109
|
-
return "HTTP_METHOD_PUT";
|
|
110
|
-
case StorageHttpMethod.HTTP_METHOD_POST:
|
|
111
|
-
return "HTTP_METHOD_POST";
|
|
112
|
-
case StorageHttpMethod.HTTP_METHOD_DELETE:
|
|
113
|
-
return "HTTP_METHOD_DELETE";
|
|
114
|
-
case StorageHttpMethod.HTTP_METHOD_HEAD:
|
|
115
|
-
return "HTTP_METHOD_HEAD";
|
|
116
|
-
case StorageHttpMethod.UNRECOGNIZED:
|
|
117
|
-
default:
|
|
118
|
-
return "UNRECOGNIZED";
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Represents a byte range for a get operation.
|
|
124
|
-
* Maps to std::ops::Range<usize> within object_store::GetRange::Bounded.
|
|
125
|
-
*/
|
|
126
|
-
export interface StorageRange {
|
|
127
|
-
/**
|
|
128
|
-
* Start of the range (inclusive), 0-indexed.
|
|
129
|
-
* Maps to the start of std::ops::Range<usize>.
|
|
130
|
-
*/
|
|
131
|
-
start: number;
|
|
132
|
-
/**
|
|
133
|
-
* End of the range (exclusive), 0-indexed.
|
|
134
|
-
* Maps to the end of std::ops::Range<usize>.
|
|
135
|
-
*/
|
|
136
|
-
end: number;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
/** Specifies a range for a get operation, mapping to object_store::GetRange. */
|
|
140
|
-
export interface StorageGetRangeOption {
|
|
141
|
-
/**
|
|
142
|
-
* A specific bounded range (e.g., bytes 0-99).
|
|
143
|
-
* Corresponds to object_store::GetRange::Bounded(start..end).
|
|
144
|
-
*/
|
|
145
|
-
bounded?:
|
|
146
|
-
| StorageRange
|
|
147
|
-
| undefined;
|
|
148
|
-
/**
|
|
149
|
-
* A range starting from an offset relative to the beginning of the object.
|
|
150
|
-
* Corresponds to object_store::GetRange::Offset(offset).
|
|
151
|
-
*/
|
|
152
|
-
offsetFromStart?:
|
|
153
|
-
| number
|
|
154
|
-
| undefined;
|
|
155
|
-
/**
|
|
156
|
-
* A range representing a suffix of the object with a specific length.
|
|
157
|
-
* Corresponds to object_store::GetRange::Suffix(length).
|
|
158
|
-
*/
|
|
159
|
-
suffixLength?: number | undefined;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/** Options for a get operation, mapping to object_store::GetOptions. */
|
|
163
|
-
export interface StorageGetOptions {
|
|
164
|
-
/**
|
|
165
|
-
* Succeeds if the object's ETag matches this value.
|
|
166
|
-
* Maps to object_store::GetOptions::if_match.
|
|
167
|
-
*/
|
|
168
|
-
ifMatch?:
|
|
169
|
-
| string
|
|
170
|
-
| undefined;
|
|
171
|
-
/**
|
|
172
|
-
* Succeeds if the object's ETag does not match this value.
|
|
173
|
-
* Maps to object_store::GetOptions::if_none_match.
|
|
174
|
-
*/
|
|
175
|
-
ifNoneMatch?:
|
|
176
|
-
| string
|
|
177
|
-
| undefined;
|
|
178
|
-
/**
|
|
179
|
-
* Succeeds if the object has been modified since this timestamp.
|
|
180
|
-
* Maps to object_store::GetOptions::if_modified_since.
|
|
181
|
-
*/
|
|
182
|
-
ifModifiedSince?:
|
|
183
|
-
| Date
|
|
184
|
-
| undefined;
|
|
185
|
-
/**
|
|
186
|
-
* Succeeds if the object has not been modified since this timestamp.
|
|
187
|
-
* Maps to object_store::GetOptions::if_unmodified_since.
|
|
188
|
-
*/
|
|
189
|
-
ifUnmodifiedSince?:
|
|
190
|
-
| Date
|
|
191
|
-
| undefined;
|
|
192
|
-
/**
|
|
193
|
-
* Specifies a byte range to retrieve.
|
|
194
|
-
* Maps to object_store::GetOptions::range.
|
|
195
|
-
*/
|
|
196
|
-
range?:
|
|
197
|
-
| StorageGetRangeOption
|
|
198
|
-
| undefined;
|
|
199
|
-
/**
|
|
200
|
-
* Retrieves a specific version of the object, if versioning is supported.
|
|
201
|
-
* Maps to object_store::GetOptions::version.
|
|
202
|
-
*/
|
|
203
|
-
version?:
|
|
204
|
-
| string
|
|
205
|
-
| undefined;
|
|
206
|
-
/**
|
|
207
|
-
* If true, only metadata is fetched (like a HEAD request), not the content.
|
|
208
|
-
* Maps to object_store::GetOptions::head.
|
|
209
|
-
*/
|
|
210
|
-
head: boolean;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* Specifies version details (ETag and/or version ID) for conditional updates.
|
|
215
|
-
* Maps to object_store::UpdateVersion.
|
|
216
|
-
*/
|
|
217
|
-
export interface StorageUpdateVersion {
|
|
218
|
-
/**
|
|
219
|
-
* The ETag of the object version to update.
|
|
220
|
-
* Maps to object_store::UpdateVersion::e_tag.
|
|
221
|
-
*/
|
|
222
|
-
eTag?:
|
|
223
|
-
| string
|
|
224
|
-
| undefined;
|
|
225
|
-
/**
|
|
226
|
-
* The version ID of the object version to update.
|
|
227
|
-
* Maps to object_store::UpdateVersion::version.
|
|
228
|
-
*/
|
|
229
|
-
version?: string | undefined;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
/**
|
|
233
|
-
* Represents a single tag (key-value pair).
|
|
234
|
-
* Maps to a key-value pair within object_store::TagSet.
|
|
235
|
-
*/
|
|
236
|
-
export interface StorageTag {
|
|
237
|
-
/** The tag key. */
|
|
238
|
-
key: string;
|
|
239
|
-
/** The tag value. */
|
|
240
|
-
value: string;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
/**
|
|
244
|
-
* A collection of tags.
|
|
245
|
-
* Maps to object_store::TagSet.
|
|
246
|
-
*/
|
|
247
|
-
export interface StorageTagSet {
|
|
248
|
-
/** List of tags. */
|
|
249
|
-
tags: StorageTag[];
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
/**
|
|
253
|
-
* Represents a key-value pair for an object attribute.
|
|
254
|
-
* Used to construct an object_store::Attributes map.
|
|
255
|
-
*/
|
|
256
|
-
export interface StorageAttributeKeyValuePair {
|
|
257
|
-
/**
|
|
258
|
-
* The attribute key.
|
|
259
|
-
* Standard keys map to specific object_store::Attribute variants:
|
|
260
|
-
* - "content-disposition" -> object_store::Attribute::ContentDisposition
|
|
261
|
-
* - "content-encoding" -> object_store::Attribute::ContentEncoding
|
|
262
|
-
* - "content-language" -> object_store::Attribute::ContentLanguage
|
|
263
|
-
* - "content-type" -> object_store::Attribute::ContentType
|
|
264
|
-
* - "cache-control" -> object_store::Attribute::CacheControl
|
|
265
|
-
* User-defined metadata keys must be prefixed with "metadata:".
|
|
266
|
-
* For example, "metadata:my_custom_key" will be mapped to
|
|
267
|
-
* object_store::Attribute::Metadata("my_custom_key").
|
|
268
|
-
*/
|
|
269
|
-
key: string;
|
|
270
|
-
/**
|
|
271
|
-
* The attribute value.
|
|
272
|
-
* Maps to object_store::AttributeValue.
|
|
273
|
-
*/
|
|
274
|
-
value: string;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
/** Represents a single HTTP header required by a signed URL request. */
|
|
278
|
-
export interface StorageHttpHeader {
|
|
279
|
-
/** Header name. */
|
|
280
|
-
key: string;
|
|
281
|
-
/** Header value. */
|
|
282
|
-
value: string;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
/**
|
|
286
|
-
* A collection of storage attributes.
|
|
287
|
-
* Maps to object_store::Attributes.
|
|
288
|
-
*/
|
|
289
|
-
export interface StorageAttributesMap {
|
|
290
|
-
/** List of attribute key-value pairs. */
|
|
291
|
-
pairs: StorageAttributeKeyValuePair[];
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
/**
|
|
295
|
-
* Options for non-streaming put (put_opts).
|
|
296
|
-
* Maps to object_store::PutOptions.
|
|
297
|
-
*/
|
|
298
|
-
export interface StoragePutOptions {
|
|
299
|
-
/**
|
|
300
|
-
* Specifies the behavior if the object already exists or if a specific version should be updated.
|
|
301
|
-
* Defaults to PUT_MODE_OVERWRITE.
|
|
302
|
-
* Maps to object_store::PutOptions::mode.
|
|
303
|
-
*/
|
|
304
|
-
mode: StoragePutModeEnum;
|
|
305
|
-
/**
|
|
306
|
-
* Details for conditional updates based on ETag or version.
|
|
307
|
-
* Only used if mode is PUT_MODE_UPDATE.
|
|
308
|
-
* Maps to the argument of object_store::PutMode::Update.
|
|
309
|
-
*/
|
|
310
|
-
updateVersionDetails?:
|
|
311
|
-
| StorageUpdateVersion
|
|
312
|
-
| undefined;
|
|
313
|
-
/**
|
|
314
|
-
* A set of tags to associate with the object.
|
|
315
|
-
* Maps to object_store::PutOptions::tags.
|
|
316
|
-
*/
|
|
317
|
-
tags?:
|
|
318
|
-
| StorageTagSet
|
|
319
|
-
| undefined;
|
|
320
|
-
/**
|
|
321
|
-
* Additional object attributes (e.g., Content-Type, Cache-Control, custom metadata).
|
|
322
|
-
* Maps to object_store::PutOptions::attributes.
|
|
323
|
-
*/
|
|
324
|
-
attributes?: StorageAttributesMap | undefined;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
/**
|
|
328
|
-
* Options for streaming put (put_multipart_opts).
|
|
329
|
-
* Maps to object_store::PutMultipartOpts.
|
|
330
|
-
*/
|
|
331
|
-
export interface StoragePutMultipartOptions {
|
|
332
|
-
/**
|
|
333
|
-
* A set of tags to associate with the object during a multipart upload.
|
|
334
|
-
* Maps to object_store::PutMultipartOpts::tags.
|
|
335
|
-
*/
|
|
336
|
-
tags?:
|
|
337
|
-
| StorageTagSet
|
|
338
|
-
| undefined;
|
|
339
|
-
/**
|
|
340
|
-
* Additional object attributes (e.g., Content-Type, Cache-Control, custom metadata)
|
|
341
|
-
* for a multipart upload. Maps to object_store::PutMultipartOpts::attributes.
|
|
342
|
-
*/
|
|
343
|
-
attributes?: StorageAttributesMap | undefined;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
/**
|
|
347
|
-
* StorageGet (replaces old StorageGet)
|
|
348
|
-
* Request for retrieving an object from storage.
|
|
349
|
-
*/
|
|
350
|
-
export interface StorageGetRequest {
|
|
351
|
-
/** Name of the storage binding to use. */
|
|
352
|
-
bindingName: string;
|
|
353
|
-
/**
|
|
354
|
-
* Path to the object within the binding.
|
|
355
|
-
* Maps to object_store::path::Path.
|
|
356
|
-
*/
|
|
357
|
-
path: string;
|
|
358
|
-
/**
|
|
359
|
-
* Optional parameters for the get operation.
|
|
360
|
-
* Maps to object_store::GetOptions.
|
|
361
|
-
*/
|
|
362
|
-
options?: StorageGetOptions | undefined;
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
/** New message for Get RPC stream */
|
|
366
|
-
export interface GetResponsePart {
|
|
367
|
-
/** First message in the stream */
|
|
368
|
-
metadata?:
|
|
369
|
-
| StorageObjectMeta
|
|
370
|
-
| undefined;
|
|
371
|
-
/** Subsequent data chunks */
|
|
372
|
-
chunkData?: Uint8Array | undefined;
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
/**
|
|
376
|
-
* StoragePutMultipart (replaces old StoragePutStream)
|
|
377
|
-
* A request part for a streaming multipart put operation.
|
|
378
|
-
* Can be either metadata (first message) or a data chunk.
|
|
379
|
-
*/
|
|
380
|
-
export interface StoragePutMultipartChunkRequest {
|
|
381
|
-
/** Metadata for the streaming put, must be the first message in the stream. */
|
|
382
|
-
metadata?:
|
|
383
|
-
| StoragePutMultipartMetadata
|
|
384
|
-
| undefined;
|
|
385
|
-
/**
|
|
386
|
-
* A chunk of the object's data for a part of the multipart upload.
|
|
387
|
-
* Corresponds to data passed to object_store::MultipartUpload::put_part.
|
|
388
|
-
*/
|
|
389
|
-
chunkData?: Uint8Array | undefined;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
/** Metadata for a streaming multipart put operation. */
|
|
393
|
-
export interface StoragePutMultipartMetadata {
|
|
394
|
-
/** Name of the storage binding to use. */
|
|
395
|
-
bindingName: string;
|
|
396
|
-
/**
|
|
397
|
-
* Path where the object will be stored.
|
|
398
|
-
* Maps to object_store::path::Path.
|
|
399
|
-
*/
|
|
400
|
-
path: string;
|
|
401
|
-
/**
|
|
402
|
-
* Optional parameters for the multipart put operation.
|
|
403
|
-
* Maps to object_store::PutMultipartOpts.
|
|
404
|
-
*/
|
|
405
|
-
options?: StoragePutMultipartOptions | undefined;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
/**
|
|
409
|
-
* Response for a put operation (both simple and streaming).
|
|
410
|
-
* Maps to object_store::PutResult.
|
|
411
|
-
*/
|
|
412
|
-
export interface StoragePutResponse {
|
|
413
|
-
/**
|
|
414
|
-
* The ETag of the uploaded object, if available.
|
|
415
|
-
* Maps to object_store::PutResult::e_tag.
|
|
416
|
-
*/
|
|
417
|
-
eTag?:
|
|
418
|
-
| string
|
|
419
|
-
| undefined;
|
|
420
|
-
/**
|
|
421
|
-
* The version ID of the uploaded object, if versioning is supported and available.
|
|
422
|
-
* Maps to object_store::PutResult::version.
|
|
423
|
-
*/
|
|
424
|
-
version?: string | undefined;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
/**
|
|
428
|
-
* StoragePut (replaces old StoragePutSimple)
|
|
429
|
-
* Request for uploading an object in a single message.
|
|
430
|
-
*/
|
|
431
|
-
export interface StoragePutRequest {
|
|
432
|
-
/** Name of the storage binding to use. */
|
|
433
|
-
bindingName: string;
|
|
434
|
-
/**
|
|
435
|
-
* Path where the object will be stored.
|
|
436
|
-
* Maps to object_store::path::Path.
|
|
437
|
-
*/
|
|
438
|
-
path: string;
|
|
439
|
-
/**
|
|
440
|
-
* The entire object data.
|
|
441
|
-
* Maps to object_store::PutPayload.
|
|
442
|
-
*/
|
|
443
|
-
data: Uint8Array;
|
|
444
|
-
/**
|
|
445
|
-
* Optional parameters for the put operation.
|
|
446
|
-
* Maps to object_store::PutOptions.
|
|
447
|
-
*/
|
|
448
|
-
options?: StoragePutOptions | undefined;
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
/**
|
|
452
|
-
* StorageDelete
|
|
453
|
-
* Request for deleting an object from storage.
|
|
454
|
-
*/
|
|
455
|
-
export interface StorageDeleteRequest {
|
|
456
|
-
/** Name of the storage binding to use. */
|
|
457
|
-
bindingName: string;
|
|
458
|
-
/**
|
|
459
|
-
* Path to the object to delete.
|
|
460
|
-
* Maps to object_store::path::Path.
|
|
461
|
-
*/
|
|
462
|
-
path: string;
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
/** Generic response for operations that don't return specific data on success (e.g., Delete, Copy, Rename). */
|
|
466
|
-
export interface StorageOperationResponse {
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
/**
|
|
470
|
-
* StorageList
|
|
471
|
-
* Request for listing objects in a storage binding.
|
|
472
|
-
*/
|
|
473
|
-
export interface StorageListRequest {
|
|
474
|
-
/** Name of the storage binding to use. */
|
|
475
|
-
bindingName: string;
|
|
476
|
-
/**
|
|
477
|
-
* Optional prefix to filter listed objects. Only objects whose paths start with this prefix will be returned.
|
|
478
|
-
* Maps to the `prefix` argument in object_store::ObjectStore::list.
|
|
479
|
-
*/
|
|
480
|
-
prefix?:
|
|
481
|
-
| string
|
|
482
|
-
| undefined;
|
|
483
|
-
/**
|
|
484
|
-
* Optional offset for pagination. If provided, listing will start after this object path.
|
|
485
|
-
* Maps to the `offset` argument in object_store::ObjectStore::list_with_offset.
|
|
486
|
-
*/
|
|
487
|
-
offset?: string | undefined;
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
/**
|
|
491
|
-
* Metadata for a single object in storage.
|
|
492
|
-
* Maps to object_store::ObjectMeta.
|
|
493
|
-
*/
|
|
494
|
-
export interface StorageObjectMeta {
|
|
495
|
-
/**
|
|
496
|
-
* The full path (location) of the object.
|
|
497
|
-
* Maps to object_store::ObjectMeta::location.
|
|
498
|
-
*/
|
|
499
|
-
location: string;
|
|
500
|
-
/**
|
|
501
|
-
* Timestamp of the last modification.
|
|
502
|
-
* Maps to object_store::ObjectMeta::last_modified.
|
|
503
|
-
*/
|
|
504
|
-
lastModified:
|
|
505
|
-
| Date
|
|
506
|
-
| undefined;
|
|
507
|
-
/**
|
|
508
|
-
* Size of the object in bytes.
|
|
509
|
-
* Maps to object_store::ObjectMeta::size.
|
|
510
|
-
*/
|
|
511
|
-
size: number;
|
|
512
|
-
/**
|
|
513
|
-
* The ETag of the object, if available.
|
|
514
|
-
* Maps to object_store::ObjectMeta::e_tag.
|
|
515
|
-
*/
|
|
516
|
-
eTag?:
|
|
517
|
-
| string
|
|
518
|
-
| undefined;
|
|
519
|
-
/**
|
|
520
|
-
* The version ID of the object, if versioning is supported and available.
|
|
521
|
-
* Maps to object_store::ObjectMeta::version.
|
|
522
|
-
*/
|
|
523
|
-
version?: string | undefined;
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
/**
|
|
527
|
-
* StorageListWithDelimiter
|
|
528
|
-
* Request for listing objects and common prefixes (simulating directories).
|
|
529
|
-
*/
|
|
530
|
-
export interface StorageListWithDelimiterRequest {
|
|
531
|
-
/** Name of the storage binding to use. */
|
|
532
|
-
bindingName: string;
|
|
533
|
-
/**
|
|
534
|
-
* Optional prefix to filter listed objects and common prefixes.
|
|
535
|
-
* Maps to the `prefix` argument in object_store::ObjectStore::list_with_delimiter.
|
|
536
|
-
*/
|
|
537
|
-
prefix?: string | undefined;
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
/**
|
|
541
|
-
* Result of a list operation with a delimiter.
|
|
542
|
-
* Maps to object_store::ListResult.
|
|
543
|
-
*/
|
|
544
|
-
export interface StorageListResultProto {
|
|
545
|
-
/**
|
|
546
|
-
* List of common prefixes (simulating directories) found under the specified prefix.
|
|
547
|
-
* Maps to object_store::ListResult::common_prefixes.
|
|
548
|
-
*/
|
|
549
|
-
commonPrefixes: string[];
|
|
550
|
-
/**
|
|
551
|
-
* List of object metadata found under the specified prefix (excluding those within common_prefixes).
|
|
552
|
-
* Maps to object_store::ListResult::objects.
|
|
553
|
-
*/
|
|
554
|
-
objects: StorageObjectMeta[];
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
/**
|
|
558
|
-
* StorageHead
|
|
559
|
-
* Request for retrieving metadata of an object.
|
|
560
|
-
*/
|
|
561
|
-
export interface StorageHeadRequest {
|
|
562
|
-
/** Name of the storage binding to use. */
|
|
563
|
-
bindingName: string;
|
|
564
|
-
/**
|
|
565
|
-
* Path to the object.
|
|
566
|
-
* Maps to object_store::path::Path.
|
|
567
|
-
*/
|
|
568
|
-
path: string;
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
/**
|
|
572
|
-
* StorageGetBaseDir
|
|
573
|
-
* Request for getting the base directory of a storage binding. (Alien specific)
|
|
574
|
-
*/
|
|
575
|
-
export interface StorageGetBaseDirRequest {
|
|
576
|
-
/** Name of the storage binding. */
|
|
577
|
-
bindingName: string;
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
/** Response containing the base directory path. (Alien specific) */
|
|
581
|
-
export interface StorageGetBaseDirResponse {
|
|
582
|
-
/** The base directory path. */
|
|
583
|
-
path: string;
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
/**
|
|
587
|
-
* StorageGetUrl
|
|
588
|
-
* Request for getting the underlying URL of a storage binding. (Alien specific)
|
|
589
|
-
*/
|
|
590
|
-
export interface StorageGetUrlRequest {
|
|
591
|
-
/** Name of the storage binding. */
|
|
592
|
-
bindingName: string;
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
/** Response containing the URL. (Alien specific) */
|
|
596
|
-
export interface StorageGetUrlResponse {
|
|
597
|
-
/** The underlying URL. */
|
|
598
|
-
url: string;
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
/**
|
|
602
|
-
* StorageCopy & StorageRename
|
|
603
|
-
* Request for copying an object.
|
|
604
|
-
*/
|
|
605
|
-
export interface StorageCopyRequest {
|
|
606
|
-
/** Name of the storage binding to use (operation is within the same binding). */
|
|
607
|
-
bindingName: string;
|
|
608
|
-
/**
|
|
609
|
-
* Path of the source object.
|
|
610
|
-
* Maps to object_store::path::Path.
|
|
611
|
-
*/
|
|
612
|
-
fromPath: string;
|
|
613
|
-
/**
|
|
614
|
-
* Path of the destination object.
|
|
615
|
-
* Maps to object_store::path::Path.
|
|
616
|
-
*/
|
|
617
|
-
toPath: string;
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
/** Request for renaming (moving) an object. */
|
|
621
|
-
export interface StorageRenameRequest {
|
|
622
|
-
/** Name of the storage binding to use (operation is within the same binding). */
|
|
623
|
-
bindingName: string;
|
|
624
|
-
/**
|
|
625
|
-
* Path of the source object.
|
|
626
|
-
* Maps to object_store::path::Path.
|
|
627
|
-
*/
|
|
628
|
-
fromPath: string;
|
|
629
|
-
/**
|
|
630
|
-
* Path of the destination object.
|
|
631
|
-
* Maps to object_store::path::Path.
|
|
632
|
-
*/
|
|
633
|
-
toPath: string;
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
/**
|
|
637
|
-
* StorageSignedUrlRequest
|
|
638
|
-
* Request for generating a signed URL for an object.
|
|
639
|
-
*/
|
|
640
|
-
export interface StorageSignedUrlRequest {
|
|
641
|
-
/** Name of the storage binding to use. */
|
|
642
|
-
bindingName: string;
|
|
643
|
-
/**
|
|
644
|
-
* Path to the object within the binding.
|
|
645
|
-
* Maps to object_store::path::Path.
|
|
646
|
-
*/
|
|
647
|
-
path: string;
|
|
648
|
-
/** HTTP method for the signed URL. */
|
|
649
|
-
httpMethod: StorageHttpMethod;
|
|
650
|
-
/** Expiration time for the signed URL. */
|
|
651
|
-
expirationTime: Date | undefined;
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
/**
|
|
655
|
-
* StorageSignedUrlResponse
|
|
656
|
-
* Response containing the generated signed URL.
|
|
657
|
-
*/
|
|
658
|
-
export interface StorageSignedUrlResponse {
|
|
659
|
-
/** The generated signed URL. */
|
|
660
|
-
url: string;
|
|
661
|
-
/** Headers that must be included when executing the signed request. */
|
|
662
|
-
headers: StorageHttpHeader[];
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
function createBaseStorageRange(): StorageRange {
|
|
666
|
-
return { start: 0, end: 0 };
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
export const StorageRange: MessageFns<StorageRange> = {
|
|
670
|
-
encode(message: StorageRange, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
671
|
-
if (message.start !== 0) {
|
|
672
|
-
writer.uint32(8).uint64(message.start);
|
|
673
|
-
}
|
|
674
|
-
if (message.end !== 0) {
|
|
675
|
-
writer.uint32(16).uint64(message.end);
|
|
676
|
-
}
|
|
677
|
-
return writer;
|
|
678
|
-
},
|
|
679
|
-
|
|
680
|
-
decode(input: BinaryReader | Uint8Array, length?: number): StorageRange {
|
|
681
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
682
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
683
|
-
const message = createBaseStorageRange();
|
|
684
|
-
while (reader.pos < end) {
|
|
685
|
-
const tag = reader.uint32();
|
|
686
|
-
switch (tag >>> 3) {
|
|
687
|
-
case 1: {
|
|
688
|
-
if (tag !== 8) {
|
|
689
|
-
break;
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
message.start = longToNumber(reader.uint64());
|
|
693
|
-
continue;
|
|
694
|
-
}
|
|
695
|
-
case 2: {
|
|
696
|
-
if (tag !== 16) {
|
|
697
|
-
break;
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
message.end = longToNumber(reader.uint64());
|
|
701
|
-
continue;
|
|
702
|
-
}
|
|
703
|
-
}
|
|
704
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
705
|
-
break;
|
|
706
|
-
}
|
|
707
|
-
reader.skip(tag & 7);
|
|
708
|
-
}
|
|
709
|
-
return message;
|
|
710
|
-
},
|
|
711
|
-
|
|
712
|
-
fromJSON(object: any): StorageRange {
|
|
713
|
-
return {
|
|
714
|
-
start: isSet(object.start) ? globalThis.Number(object.start) : 0,
|
|
715
|
-
end: isSet(object.end) ? globalThis.Number(object.end) : 0,
|
|
716
|
-
};
|
|
717
|
-
},
|
|
718
|
-
|
|
719
|
-
toJSON(message: StorageRange): unknown {
|
|
720
|
-
const obj: any = {};
|
|
721
|
-
if (message.start !== 0) {
|
|
722
|
-
obj.start = Math.round(message.start);
|
|
723
|
-
}
|
|
724
|
-
if (message.end !== 0) {
|
|
725
|
-
obj.end = Math.round(message.end);
|
|
726
|
-
}
|
|
727
|
-
return obj;
|
|
728
|
-
},
|
|
729
|
-
|
|
730
|
-
create(base?: DeepPartial<StorageRange>): StorageRange {
|
|
731
|
-
return StorageRange.fromPartial(base ?? {});
|
|
732
|
-
},
|
|
733
|
-
fromPartial(object: DeepPartial<StorageRange>): StorageRange {
|
|
734
|
-
const message = createBaseStorageRange();
|
|
735
|
-
message.start = object.start ?? 0;
|
|
736
|
-
message.end = object.end ?? 0;
|
|
737
|
-
return message;
|
|
738
|
-
},
|
|
739
|
-
};
|
|
740
|
-
|
|
741
|
-
function createBaseStorageGetRangeOption(): StorageGetRangeOption {
|
|
742
|
-
return { bounded: undefined, offsetFromStart: undefined, suffixLength: undefined };
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
export const StorageGetRangeOption: MessageFns<StorageGetRangeOption> = {
|
|
746
|
-
encode(message: StorageGetRangeOption, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
747
|
-
if (message.bounded !== undefined) {
|
|
748
|
-
StorageRange.encode(message.bounded, writer.uint32(10).fork()).join();
|
|
749
|
-
}
|
|
750
|
-
if (message.offsetFromStart !== undefined) {
|
|
751
|
-
writer.uint32(16).uint64(message.offsetFromStart);
|
|
752
|
-
}
|
|
753
|
-
if (message.suffixLength !== undefined) {
|
|
754
|
-
writer.uint32(24).uint64(message.suffixLength);
|
|
755
|
-
}
|
|
756
|
-
return writer;
|
|
757
|
-
},
|
|
758
|
-
|
|
759
|
-
decode(input: BinaryReader | Uint8Array, length?: number): StorageGetRangeOption {
|
|
760
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
761
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
762
|
-
const message = createBaseStorageGetRangeOption();
|
|
763
|
-
while (reader.pos < end) {
|
|
764
|
-
const tag = reader.uint32();
|
|
765
|
-
switch (tag >>> 3) {
|
|
766
|
-
case 1: {
|
|
767
|
-
if (tag !== 10) {
|
|
768
|
-
break;
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
message.bounded = StorageRange.decode(reader, reader.uint32());
|
|
772
|
-
continue;
|
|
773
|
-
}
|
|
774
|
-
case 2: {
|
|
775
|
-
if (tag !== 16) {
|
|
776
|
-
break;
|
|
777
|
-
}
|
|
778
|
-
|
|
779
|
-
message.offsetFromStart = longToNumber(reader.uint64());
|
|
780
|
-
continue;
|
|
781
|
-
}
|
|
782
|
-
case 3: {
|
|
783
|
-
if (tag !== 24) {
|
|
784
|
-
break;
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
message.suffixLength = longToNumber(reader.uint64());
|
|
788
|
-
continue;
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
792
|
-
break;
|
|
793
|
-
}
|
|
794
|
-
reader.skip(tag & 7);
|
|
795
|
-
}
|
|
796
|
-
return message;
|
|
797
|
-
},
|
|
798
|
-
|
|
799
|
-
fromJSON(object: any): StorageGetRangeOption {
|
|
800
|
-
return {
|
|
801
|
-
bounded: isSet(object.bounded) ? StorageRange.fromJSON(object.bounded) : undefined,
|
|
802
|
-
offsetFromStart: isSet(object.offsetFromStart)
|
|
803
|
-
? globalThis.Number(object.offsetFromStart)
|
|
804
|
-
: isSet(object.offset_from_start)
|
|
805
|
-
? globalThis.Number(object.offset_from_start)
|
|
806
|
-
: undefined,
|
|
807
|
-
suffixLength: isSet(object.suffixLength)
|
|
808
|
-
? globalThis.Number(object.suffixLength)
|
|
809
|
-
: isSet(object.suffix_length)
|
|
810
|
-
? globalThis.Number(object.suffix_length)
|
|
811
|
-
: undefined,
|
|
812
|
-
};
|
|
813
|
-
},
|
|
814
|
-
|
|
815
|
-
toJSON(message: StorageGetRangeOption): unknown {
|
|
816
|
-
const obj: any = {};
|
|
817
|
-
if (message.bounded !== undefined) {
|
|
818
|
-
obj.bounded = StorageRange.toJSON(message.bounded);
|
|
819
|
-
}
|
|
820
|
-
if (message.offsetFromStart !== undefined) {
|
|
821
|
-
obj.offsetFromStart = Math.round(message.offsetFromStart);
|
|
822
|
-
}
|
|
823
|
-
if (message.suffixLength !== undefined) {
|
|
824
|
-
obj.suffixLength = Math.round(message.suffixLength);
|
|
825
|
-
}
|
|
826
|
-
return obj;
|
|
827
|
-
},
|
|
828
|
-
|
|
829
|
-
create(base?: DeepPartial<StorageGetRangeOption>): StorageGetRangeOption {
|
|
830
|
-
return StorageGetRangeOption.fromPartial(base ?? {});
|
|
831
|
-
},
|
|
832
|
-
fromPartial(object: DeepPartial<StorageGetRangeOption>): StorageGetRangeOption {
|
|
833
|
-
const message = createBaseStorageGetRangeOption();
|
|
834
|
-
message.bounded = (object.bounded !== undefined && object.bounded !== null)
|
|
835
|
-
? StorageRange.fromPartial(object.bounded)
|
|
836
|
-
: undefined;
|
|
837
|
-
message.offsetFromStart = object.offsetFromStart ?? undefined;
|
|
838
|
-
message.suffixLength = object.suffixLength ?? undefined;
|
|
839
|
-
return message;
|
|
840
|
-
},
|
|
841
|
-
};
|
|
842
|
-
|
|
843
|
-
function createBaseStorageGetOptions(): StorageGetOptions {
|
|
844
|
-
return {
|
|
845
|
-
ifMatch: undefined,
|
|
846
|
-
ifNoneMatch: undefined,
|
|
847
|
-
ifModifiedSince: undefined,
|
|
848
|
-
ifUnmodifiedSince: undefined,
|
|
849
|
-
range: undefined,
|
|
850
|
-
version: undefined,
|
|
851
|
-
head: false,
|
|
852
|
-
};
|
|
853
|
-
}
|
|
854
|
-
|
|
855
|
-
export const StorageGetOptions: MessageFns<StorageGetOptions> = {
|
|
856
|
-
encode(message: StorageGetOptions, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
857
|
-
if (message.ifMatch !== undefined) {
|
|
858
|
-
writer.uint32(10).string(message.ifMatch);
|
|
859
|
-
}
|
|
860
|
-
if (message.ifNoneMatch !== undefined) {
|
|
861
|
-
writer.uint32(18).string(message.ifNoneMatch);
|
|
862
|
-
}
|
|
863
|
-
if (message.ifModifiedSince !== undefined) {
|
|
864
|
-
Timestamp.encode(toTimestamp(message.ifModifiedSince), writer.uint32(26).fork()).join();
|
|
865
|
-
}
|
|
866
|
-
if (message.ifUnmodifiedSince !== undefined) {
|
|
867
|
-
Timestamp.encode(toTimestamp(message.ifUnmodifiedSince), writer.uint32(34).fork()).join();
|
|
868
|
-
}
|
|
869
|
-
if (message.range !== undefined) {
|
|
870
|
-
StorageGetRangeOption.encode(message.range, writer.uint32(42).fork()).join();
|
|
871
|
-
}
|
|
872
|
-
if (message.version !== undefined) {
|
|
873
|
-
writer.uint32(50).string(message.version);
|
|
874
|
-
}
|
|
875
|
-
if (message.head !== false) {
|
|
876
|
-
writer.uint32(56).bool(message.head);
|
|
877
|
-
}
|
|
878
|
-
return writer;
|
|
879
|
-
},
|
|
880
|
-
|
|
881
|
-
decode(input: BinaryReader | Uint8Array, length?: number): StorageGetOptions {
|
|
882
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
883
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
884
|
-
const message = createBaseStorageGetOptions();
|
|
885
|
-
while (reader.pos < end) {
|
|
886
|
-
const tag = reader.uint32();
|
|
887
|
-
switch (tag >>> 3) {
|
|
888
|
-
case 1: {
|
|
889
|
-
if (tag !== 10) {
|
|
890
|
-
break;
|
|
891
|
-
}
|
|
892
|
-
|
|
893
|
-
message.ifMatch = reader.string();
|
|
894
|
-
continue;
|
|
895
|
-
}
|
|
896
|
-
case 2: {
|
|
897
|
-
if (tag !== 18) {
|
|
898
|
-
break;
|
|
899
|
-
}
|
|
900
|
-
|
|
901
|
-
message.ifNoneMatch = reader.string();
|
|
902
|
-
continue;
|
|
903
|
-
}
|
|
904
|
-
case 3: {
|
|
905
|
-
if (tag !== 26) {
|
|
906
|
-
break;
|
|
907
|
-
}
|
|
908
|
-
|
|
909
|
-
message.ifModifiedSince = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
910
|
-
continue;
|
|
911
|
-
}
|
|
912
|
-
case 4: {
|
|
913
|
-
if (tag !== 34) {
|
|
914
|
-
break;
|
|
915
|
-
}
|
|
916
|
-
|
|
917
|
-
message.ifUnmodifiedSince = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
918
|
-
continue;
|
|
919
|
-
}
|
|
920
|
-
case 5: {
|
|
921
|
-
if (tag !== 42) {
|
|
922
|
-
break;
|
|
923
|
-
}
|
|
924
|
-
|
|
925
|
-
message.range = StorageGetRangeOption.decode(reader, reader.uint32());
|
|
926
|
-
continue;
|
|
927
|
-
}
|
|
928
|
-
case 6: {
|
|
929
|
-
if (tag !== 50) {
|
|
930
|
-
break;
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
message.version = reader.string();
|
|
934
|
-
continue;
|
|
935
|
-
}
|
|
936
|
-
case 7: {
|
|
937
|
-
if (tag !== 56) {
|
|
938
|
-
break;
|
|
939
|
-
}
|
|
940
|
-
|
|
941
|
-
message.head = reader.bool();
|
|
942
|
-
continue;
|
|
943
|
-
}
|
|
944
|
-
}
|
|
945
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
946
|
-
break;
|
|
947
|
-
}
|
|
948
|
-
reader.skip(tag & 7);
|
|
949
|
-
}
|
|
950
|
-
return message;
|
|
951
|
-
},
|
|
952
|
-
|
|
953
|
-
fromJSON(object: any): StorageGetOptions {
|
|
954
|
-
return {
|
|
955
|
-
ifMatch: isSet(object.ifMatch)
|
|
956
|
-
? globalThis.String(object.ifMatch)
|
|
957
|
-
: isSet(object.if_match)
|
|
958
|
-
? globalThis.String(object.if_match)
|
|
959
|
-
: undefined,
|
|
960
|
-
ifNoneMatch: isSet(object.ifNoneMatch)
|
|
961
|
-
? globalThis.String(object.ifNoneMatch)
|
|
962
|
-
: isSet(object.if_none_match)
|
|
963
|
-
? globalThis.String(object.if_none_match)
|
|
964
|
-
: undefined,
|
|
965
|
-
ifModifiedSince: isSet(object.ifModifiedSince)
|
|
966
|
-
? fromJsonTimestamp(object.ifModifiedSince)
|
|
967
|
-
: isSet(object.if_modified_since)
|
|
968
|
-
? fromJsonTimestamp(object.if_modified_since)
|
|
969
|
-
: undefined,
|
|
970
|
-
ifUnmodifiedSince: isSet(object.ifUnmodifiedSince)
|
|
971
|
-
? fromJsonTimestamp(object.ifUnmodifiedSince)
|
|
972
|
-
: isSet(object.if_unmodified_since)
|
|
973
|
-
? fromJsonTimestamp(object.if_unmodified_since)
|
|
974
|
-
: undefined,
|
|
975
|
-
range: isSet(object.range) ? StorageGetRangeOption.fromJSON(object.range) : undefined,
|
|
976
|
-
version: isSet(object.version) ? globalThis.String(object.version) : undefined,
|
|
977
|
-
head: isSet(object.head) ? globalThis.Boolean(object.head) : false,
|
|
978
|
-
};
|
|
979
|
-
},
|
|
980
|
-
|
|
981
|
-
toJSON(message: StorageGetOptions): unknown {
|
|
982
|
-
const obj: any = {};
|
|
983
|
-
if (message.ifMatch !== undefined) {
|
|
984
|
-
obj.ifMatch = message.ifMatch;
|
|
985
|
-
}
|
|
986
|
-
if (message.ifNoneMatch !== undefined) {
|
|
987
|
-
obj.ifNoneMatch = message.ifNoneMatch;
|
|
988
|
-
}
|
|
989
|
-
if (message.ifModifiedSince !== undefined) {
|
|
990
|
-
obj.ifModifiedSince = message.ifModifiedSince.toISOString();
|
|
991
|
-
}
|
|
992
|
-
if (message.ifUnmodifiedSince !== undefined) {
|
|
993
|
-
obj.ifUnmodifiedSince = message.ifUnmodifiedSince.toISOString();
|
|
994
|
-
}
|
|
995
|
-
if (message.range !== undefined) {
|
|
996
|
-
obj.range = StorageGetRangeOption.toJSON(message.range);
|
|
997
|
-
}
|
|
998
|
-
if (message.version !== undefined) {
|
|
999
|
-
obj.version = message.version;
|
|
1000
|
-
}
|
|
1001
|
-
if (message.head !== false) {
|
|
1002
|
-
obj.head = message.head;
|
|
1003
|
-
}
|
|
1004
|
-
return obj;
|
|
1005
|
-
},
|
|
1006
|
-
|
|
1007
|
-
create(base?: DeepPartial<StorageGetOptions>): StorageGetOptions {
|
|
1008
|
-
return StorageGetOptions.fromPartial(base ?? {});
|
|
1009
|
-
},
|
|
1010
|
-
fromPartial(object: DeepPartial<StorageGetOptions>): StorageGetOptions {
|
|
1011
|
-
const message = createBaseStorageGetOptions();
|
|
1012
|
-
message.ifMatch = object.ifMatch ?? undefined;
|
|
1013
|
-
message.ifNoneMatch = object.ifNoneMatch ?? undefined;
|
|
1014
|
-
message.ifModifiedSince = object.ifModifiedSince ?? undefined;
|
|
1015
|
-
message.ifUnmodifiedSince = object.ifUnmodifiedSince ?? undefined;
|
|
1016
|
-
message.range = (object.range !== undefined && object.range !== null)
|
|
1017
|
-
? StorageGetRangeOption.fromPartial(object.range)
|
|
1018
|
-
: undefined;
|
|
1019
|
-
message.version = object.version ?? undefined;
|
|
1020
|
-
message.head = object.head ?? false;
|
|
1021
|
-
return message;
|
|
1022
|
-
},
|
|
1023
|
-
};
|
|
1024
|
-
|
|
1025
|
-
function createBaseStorageUpdateVersion(): StorageUpdateVersion {
|
|
1026
|
-
return { eTag: undefined, version: undefined };
|
|
1027
|
-
}
|
|
1028
|
-
|
|
1029
|
-
export const StorageUpdateVersion: MessageFns<StorageUpdateVersion> = {
|
|
1030
|
-
encode(message: StorageUpdateVersion, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1031
|
-
if (message.eTag !== undefined) {
|
|
1032
|
-
writer.uint32(10).string(message.eTag);
|
|
1033
|
-
}
|
|
1034
|
-
if (message.version !== undefined) {
|
|
1035
|
-
writer.uint32(18).string(message.version);
|
|
1036
|
-
}
|
|
1037
|
-
return writer;
|
|
1038
|
-
},
|
|
1039
|
-
|
|
1040
|
-
decode(input: BinaryReader | Uint8Array, length?: number): StorageUpdateVersion {
|
|
1041
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1042
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1043
|
-
const message = createBaseStorageUpdateVersion();
|
|
1044
|
-
while (reader.pos < end) {
|
|
1045
|
-
const tag = reader.uint32();
|
|
1046
|
-
switch (tag >>> 3) {
|
|
1047
|
-
case 1: {
|
|
1048
|
-
if (tag !== 10) {
|
|
1049
|
-
break;
|
|
1050
|
-
}
|
|
1051
|
-
|
|
1052
|
-
message.eTag = reader.string();
|
|
1053
|
-
continue;
|
|
1054
|
-
}
|
|
1055
|
-
case 2: {
|
|
1056
|
-
if (tag !== 18) {
|
|
1057
|
-
break;
|
|
1058
|
-
}
|
|
1059
|
-
|
|
1060
|
-
message.version = reader.string();
|
|
1061
|
-
continue;
|
|
1062
|
-
}
|
|
1063
|
-
}
|
|
1064
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1065
|
-
break;
|
|
1066
|
-
}
|
|
1067
|
-
reader.skip(tag & 7);
|
|
1068
|
-
}
|
|
1069
|
-
return message;
|
|
1070
|
-
},
|
|
1071
|
-
|
|
1072
|
-
fromJSON(object: any): StorageUpdateVersion {
|
|
1073
|
-
return {
|
|
1074
|
-
eTag: isSet(object.eTag)
|
|
1075
|
-
? globalThis.String(object.eTag)
|
|
1076
|
-
: isSet(object.e_tag)
|
|
1077
|
-
? globalThis.String(object.e_tag)
|
|
1078
|
-
: undefined,
|
|
1079
|
-
version: isSet(object.version) ? globalThis.String(object.version) : undefined,
|
|
1080
|
-
};
|
|
1081
|
-
},
|
|
1082
|
-
|
|
1083
|
-
toJSON(message: StorageUpdateVersion): unknown {
|
|
1084
|
-
const obj: any = {};
|
|
1085
|
-
if (message.eTag !== undefined) {
|
|
1086
|
-
obj.eTag = message.eTag;
|
|
1087
|
-
}
|
|
1088
|
-
if (message.version !== undefined) {
|
|
1089
|
-
obj.version = message.version;
|
|
1090
|
-
}
|
|
1091
|
-
return obj;
|
|
1092
|
-
},
|
|
1093
|
-
|
|
1094
|
-
create(base?: DeepPartial<StorageUpdateVersion>): StorageUpdateVersion {
|
|
1095
|
-
return StorageUpdateVersion.fromPartial(base ?? {});
|
|
1096
|
-
},
|
|
1097
|
-
fromPartial(object: DeepPartial<StorageUpdateVersion>): StorageUpdateVersion {
|
|
1098
|
-
const message = createBaseStorageUpdateVersion();
|
|
1099
|
-
message.eTag = object.eTag ?? undefined;
|
|
1100
|
-
message.version = object.version ?? undefined;
|
|
1101
|
-
return message;
|
|
1102
|
-
},
|
|
1103
|
-
};
|
|
1104
|
-
|
|
1105
|
-
function createBaseStorageTag(): StorageTag {
|
|
1106
|
-
return { key: "", value: "" };
|
|
1107
|
-
}
|
|
1108
|
-
|
|
1109
|
-
export const StorageTag: MessageFns<StorageTag> = {
|
|
1110
|
-
encode(message: StorageTag, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1111
|
-
if (message.key !== "") {
|
|
1112
|
-
writer.uint32(10).string(message.key);
|
|
1113
|
-
}
|
|
1114
|
-
if (message.value !== "") {
|
|
1115
|
-
writer.uint32(18).string(message.value);
|
|
1116
|
-
}
|
|
1117
|
-
return writer;
|
|
1118
|
-
},
|
|
1119
|
-
|
|
1120
|
-
decode(input: BinaryReader | Uint8Array, length?: number): StorageTag {
|
|
1121
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1122
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1123
|
-
const message = createBaseStorageTag();
|
|
1124
|
-
while (reader.pos < end) {
|
|
1125
|
-
const tag = reader.uint32();
|
|
1126
|
-
switch (tag >>> 3) {
|
|
1127
|
-
case 1: {
|
|
1128
|
-
if (tag !== 10) {
|
|
1129
|
-
break;
|
|
1130
|
-
}
|
|
1131
|
-
|
|
1132
|
-
message.key = reader.string();
|
|
1133
|
-
continue;
|
|
1134
|
-
}
|
|
1135
|
-
case 2: {
|
|
1136
|
-
if (tag !== 18) {
|
|
1137
|
-
break;
|
|
1138
|
-
}
|
|
1139
|
-
|
|
1140
|
-
message.value = reader.string();
|
|
1141
|
-
continue;
|
|
1142
|
-
}
|
|
1143
|
-
}
|
|
1144
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1145
|
-
break;
|
|
1146
|
-
}
|
|
1147
|
-
reader.skip(tag & 7);
|
|
1148
|
-
}
|
|
1149
|
-
return message;
|
|
1150
|
-
},
|
|
1151
|
-
|
|
1152
|
-
fromJSON(object: any): StorageTag {
|
|
1153
|
-
return {
|
|
1154
|
-
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
1155
|
-
value: isSet(object.value) ? globalThis.String(object.value) : "",
|
|
1156
|
-
};
|
|
1157
|
-
},
|
|
1158
|
-
|
|
1159
|
-
toJSON(message: StorageTag): unknown {
|
|
1160
|
-
const obj: any = {};
|
|
1161
|
-
if (message.key !== "") {
|
|
1162
|
-
obj.key = message.key;
|
|
1163
|
-
}
|
|
1164
|
-
if (message.value !== "") {
|
|
1165
|
-
obj.value = message.value;
|
|
1166
|
-
}
|
|
1167
|
-
return obj;
|
|
1168
|
-
},
|
|
1169
|
-
|
|
1170
|
-
create(base?: DeepPartial<StorageTag>): StorageTag {
|
|
1171
|
-
return StorageTag.fromPartial(base ?? {});
|
|
1172
|
-
},
|
|
1173
|
-
fromPartial(object: DeepPartial<StorageTag>): StorageTag {
|
|
1174
|
-
const message = createBaseStorageTag();
|
|
1175
|
-
message.key = object.key ?? "";
|
|
1176
|
-
message.value = object.value ?? "";
|
|
1177
|
-
return message;
|
|
1178
|
-
},
|
|
1179
|
-
};
|
|
1180
|
-
|
|
1181
|
-
function createBaseStorageTagSet(): StorageTagSet {
|
|
1182
|
-
return { tags: [] };
|
|
1183
|
-
}
|
|
1184
|
-
|
|
1185
|
-
export const StorageTagSet: MessageFns<StorageTagSet> = {
|
|
1186
|
-
encode(message: StorageTagSet, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1187
|
-
for (const v of message.tags) {
|
|
1188
|
-
StorageTag.encode(v!, writer.uint32(10).fork()).join();
|
|
1189
|
-
}
|
|
1190
|
-
return writer;
|
|
1191
|
-
},
|
|
1192
|
-
|
|
1193
|
-
decode(input: BinaryReader | Uint8Array, length?: number): StorageTagSet {
|
|
1194
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1195
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1196
|
-
const message = createBaseStorageTagSet();
|
|
1197
|
-
while (reader.pos < end) {
|
|
1198
|
-
const tag = reader.uint32();
|
|
1199
|
-
switch (tag >>> 3) {
|
|
1200
|
-
case 1: {
|
|
1201
|
-
if (tag !== 10) {
|
|
1202
|
-
break;
|
|
1203
|
-
}
|
|
1204
|
-
|
|
1205
|
-
message.tags.push(StorageTag.decode(reader, reader.uint32()));
|
|
1206
|
-
continue;
|
|
1207
|
-
}
|
|
1208
|
-
}
|
|
1209
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1210
|
-
break;
|
|
1211
|
-
}
|
|
1212
|
-
reader.skip(tag & 7);
|
|
1213
|
-
}
|
|
1214
|
-
return message;
|
|
1215
|
-
},
|
|
1216
|
-
|
|
1217
|
-
fromJSON(object: any): StorageTagSet {
|
|
1218
|
-
return { tags: globalThis.Array.isArray(object?.tags) ? object.tags.map((e: any) => StorageTag.fromJSON(e)) : [] };
|
|
1219
|
-
},
|
|
1220
|
-
|
|
1221
|
-
toJSON(message: StorageTagSet): unknown {
|
|
1222
|
-
const obj: any = {};
|
|
1223
|
-
if (message.tags?.length) {
|
|
1224
|
-
obj.tags = message.tags.map((e) => StorageTag.toJSON(e));
|
|
1225
|
-
}
|
|
1226
|
-
return obj;
|
|
1227
|
-
},
|
|
1228
|
-
|
|
1229
|
-
create(base?: DeepPartial<StorageTagSet>): StorageTagSet {
|
|
1230
|
-
return StorageTagSet.fromPartial(base ?? {});
|
|
1231
|
-
},
|
|
1232
|
-
fromPartial(object: DeepPartial<StorageTagSet>): StorageTagSet {
|
|
1233
|
-
const message = createBaseStorageTagSet();
|
|
1234
|
-
message.tags = object.tags?.map((e) => StorageTag.fromPartial(e)) || [];
|
|
1235
|
-
return message;
|
|
1236
|
-
},
|
|
1237
|
-
};
|
|
1238
|
-
|
|
1239
|
-
function createBaseStorageAttributeKeyValuePair(): StorageAttributeKeyValuePair {
|
|
1240
|
-
return { key: "", value: "" };
|
|
1241
|
-
}
|
|
1242
|
-
|
|
1243
|
-
export const StorageAttributeKeyValuePair: MessageFns<StorageAttributeKeyValuePair> = {
|
|
1244
|
-
encode(message: StorageAttributeKeyValuePair, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1245
|
-
if (message.key !== "") {
|
|
1246
|
-
writer.uint32(10).string(message.key);
|
|
1247
|
-
}
|
|
1248
|
-
if (message.value !== "") {
|
|
1249
|
-
writer.uint32(18).string(message.value);
|
|
1250
|
-
}
|
|
1251
|
-
return writer;
|
|
1252
|
-
},
|
|
1253
|
-
|
|
1254
|
-
decode(input: BinaryReader | Uint8Array, length?: number): StorageAttributeKeyValuePair {
|
|
1255
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1256
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1257
|
-
const message = createBaseStorageAttributeKeyValuePair();
|
|
1258
|
-
while (reader.pos < end) {
|
|
1259
|
-
const tag = reader.uint32();
|
|
1260
|
-
switch (tag >>> 3) {
|
|
1261
|
-
case 1: {
|
|
1262
|
-
if (tag !== 10) {
|
|
1263
|
-
break;
|
|
1264
|
-
}
|
|
1265
|
-
|
|
1266
|
-
message.key = reader.string();
|
|
1267
|
-
continue;
|
|
1268
|
-
}
|
|
1269
|
-
case 2: {
|
|
1270
|
-
if (tag !== 18) {
|
|
1271
|
-
break;
|
|
1272
|
-
}
|
|
1273
|
-
|
|
1274
|
-
message.value = reader.string();
|
|
1275
|
-
continue;
|
|
1276
|
-
}
|
|
1277
|
-
}
|
|
1278
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1279
|
-
break;
|
|
1280
|
-
}
|
|
1281
|
-
reader.skip(tag & 7);
|
|
1282
|
-
}
|
|
1283
|
-
return message;
|
|
1284
|
-
},
|
|
1285
|
-
|
|
1286
|
-
fromJSON(object: any): StorageAttributeKeyValuePair {
|
|
1287
|
-
return {
|
|
1288
|
-
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
1289
|
-
value: isSet(object.value) ? globalThis.String(object.value) : "",
|
|
1290
|
-
};
|
|
1291
|
-
},
|
|
1292
|
-
|
|
1293
|
-
toJSON(message: StorageAttributeKeyValuePair): unknown {
|
|
1294
|
-
const obj: any = {};
|
|
1295
|
-
if (message.key !== "") {
|
|
1296
|
-
obj.key = message.key;
|
|
1297
|
-
}
|
|
1298
|
-
if (message.value !== "") {
|
|
1299
|
-
obj.value = message.value;
|
|
1300
|
-
}
|
|
1301
|
-
return obj;
|
|
1302
|
-
},
|
|
1303
|
-
|
|
1304
|
-
create(base?: DeepPartial<StorageAttributeKeyValuePair>): StorageAttributeKeyValuePair {
|
|
1305
|
-
return StorageAttributeKeyValuePair.fromPartial(base ?? {});
|
|
1306
|
-
},
|
|
1307
|
-
fromPartial(object: DeepPartial<StorageAttributeKeyValuePair>): StorageAttributeKeyValuePair {
|
|
1308
|
-
const message = createBaseStorageAttributeKeyValuePair();
|
|
1309
|
-
message.key = object.key ?? "";
|
|
1310
|
-
message.value = object.value ?? "";
|
|
1311
|
-
return message;
|
|
1312
|
-
},
|
|
1313
|
-
};
|
|
1314
|
-
|
|
1315
|
-
function createBaseStorageHttpHeader(): StorageHttpHeader {
|
|
1316
|
-
return { key: "", value: "" };
|
|
1317
|
-
}
|
|
1318
|
-
|
|
1319
|
-
export const StorageHttpHeader: MessageFns<StorageHttpHeader> = {
|
|
1320
|
-
encode(message: StorageHttpHeader, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1321
|
-
if (message.key !== "") {
|
|
1322
|
-
writer.uint32(10).string(message.key);
|
|
1323
|
-
}
|
|
1324
|
-
if (message.value !== "") {
|
|
1325
|
-
writer.uint32(18).string(message.value);
|
|
1326
|
-
}
|
|
1327
|
-
return writer;
|
|
1328
|
-
},
|
|
1329
|
-
|
|
1330
|
-
decode(input: BinaryReader | Uint8Array, length?: number): StorageHttpHeader {
|
|
1331
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1332
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1333
|
-
const message = createBaseStorageHttpHeader();
|
|
1334
|
-
while (reader.pos < end) {
|
|
1335
|
-
const tag = reader.uint32();
|
|
1336
|
-
switch (tag >>> 3) {
|
|
1337
|
-
case 1: {
|
|
1338
|
-
if (tag !== 10) {
|
|
1339
|
-
break;
|
|
1340
|
-
}
|
|
1341
|
-
|
|
1342
|
-
message.key = reader.string();
|
|
1343
|
-
continue;
|
|
1344
|
-
}
|
|
1345
|
-
case 2: {
|
|
1346
|
-
if (tag !== 18) {
|
|
1347
|
-
break;
|
|
1348
|
-
}
|
|
1349
|
-
|
|
1350
|
-
message.value = reader.string();
|
|
1351
|
-
continue;
|
|
1352
|
-
}
|
|
1353
|
-
}
|
|
1354
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1355
|
-
break;
|
|
1356
|
-
}
|
|
1357
|
-
reader.skip(tag & 7);
|
|
1358
|
-
}
|
|
1359
|
-
return message;
|
|
1360
|
-
},
|
|
1361
|
-
|
|
1362
|
-
fromJSON(object: any): StorageHttpHeader {
|
|
1363
|
-
return {
|
|
1364
|
-
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
1365
|
-
value: isSet(object.value) ? globalThis.String(object.value) : "",
|
|
1366
|
-
};
|
|
1367
|
-
},
|
|
1368
|
-
|
|
1369
|
-
toJSON(message: StorageHttpHeader): unknown {
|
|
1370
|
-
const obj: any = {};
|
|
1371
|
-
if (message.key !== "") {
|
|
1372
|
-
obj.key = message.key;
|
|
1373
|
-
}
|
|
1374
|
-
if (message.value !== "") {
|
|
1375
|
-
obj.value = message.value;
|
|
1376
|
-
}
|
|
1377
|
-
return obj;
|
|
1378
|
-
},
|
|
1379
|
-
|
|
1380
|
-
create(base?: DeepPartial<StorageHttpHeader>): StorageHttpHeader {
|
|
1381
|
-
return StorageHttpHeader.fromPartial(base ?? {});
|
|
1382
|
-
},
|
|
1383
|
-
fromPartial(object: DeepPartial<StorageHttpHeader>): StorageHttpHeader {
|
|
1384
|
-
const message = createBaseStorageHttpHeader();
|
|
1385
|
-
message.key = object.key ?? "";
|
|
1386
|
-
message.value = object.value ?? "";
|
|
1387
|
-
return message;
|
|
1388
|
-
},
|
|
1389
|
-
};
|
|
1390
|
-
|
|
1391
|
-
function createBaseStorageAttributesMap(): StorageAttributesMap {
|
|
1392
|
-
return { pairs: [] };
|
|
1393
|
-
}
|
|
1394
|
-
|
|
1395
|
-
export const StorageAttributesMap: MessageFns<StorageAttributesMap> = {
|
|
1396
|
-
encode(message: StorageAttributesMap, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1397
|
-
for (const v of message.pairs) {
|
|
1398
|
-
StorageAttributeKeyValuePair.encode(v!, writer.uint32(10).fork()).join();
|
|
1399
|
-
}
|
|
1400
|
-
return writer;
|
|
1401
|
-
},
|
|
1402
|
-
|
|
1403
|
-
decode(input: BinaryReader | Uint8Array, length?: number): StorageAttributesMap {
|
|
1404
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1405
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1406
|
-
const message = createBaseStorageAttributesMap();
|
|
1407
|
-
while (reader.pos < end) {
|
|
1408
|
-
const tag = reader.uint32();
|
|
1409
|
-
switch (tag >>> 3) {
|
|
1410
|
-
case 1: {
|
|
1411
|
-
if (tag !== 10) {
|
|
1412
|
-
break;
|
|
1413
|
-
}
|
|
1414
|
-
|
|
1415
|
-
message.pairs.push(StorageAttributeKeyValuePair.decode(reader, reader.uint32()));
|
|
1416
|
-
continue;
|
|
1417
|
-
}
|
|
1418
|
-
}
|
|
1419
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1420
|
-
break;
|
|
1421
|
-
}
|
|
1422
|
-
reader.skip(tag & 7);
|
|
1423
|
-
}
|
|
1424
|
-
return message;
|
|
1425
|
-
},
|
|
1426
|
-
|
|
1427
|
-
fromJSON(object: any): StorageAttributesMap {
|
|
1428
|
-
return {
|
|
1429
|
-
pairs: globalThis.Array.isArray(object?.pairs)
|
|
1430
|
-
? object.pairs.map((e: any) => StorageAttributeKeyValuePair.fromJSON(e))
|
|
1431
|
-
: [],
|
|
1432
|
-
};
|
|
1433
|
-
},
|
|
1434
|
-
|
|
1435
|
-
toJSON(message: StorageAttributesMap): unknown {
|
|
1436
|
-
const obj: any = {};
|
|
1437
|
-
if (message.pairs?.length) {
|
|
1438
|
-
obj.pairs = message.pairs.map((e) => StorageAttributeKeyValuePair.toJSON(e));
|
|
1439
|
-
}
|
|
1440
|
-
return obj;
|
|
1441
|
-
},
|
|
1442
|
-
|
|
1443
|
-
create(base?: DeepPartial<StorageAttributesMap>): StorageAttributesMap {
|
|
1444
|
-
return StorageAttributesMap.fromPartial(base ?? {});
|
|
1445
|
-
},
|
|
1446
|
-
fromPartial(object: DeepPartial<StorageAttributesMap>): StorageAttributesMap {
|
|
1447
|
-
const message = createBaseStorageAttributesMap();
|
|
1448
|
-
message.pairs = object.pairs?.map((e) => StorageAttributeKeyValuePair.fromPartial(e)) || [];
|
|
1449
|
-
return message;
|
|
1450
|
-
},
|
|
1451
|
-
};
|
|
1452
|
-
|
|
1453
|
-
function createBaseStoragePutOptions(): StoragePutOptions {
|
|
1454
|
-
return { mode: 0, updateVersionDetails: undefined, tags: undefined, attributes: undefined };
|
|
1455
|
-
}
|
|
1456
|
-
|
|
1457
|
-
export const StoragePutOptions: MessageFns<StoragePutOptions> = {
|
|
1458
|
-
encode(message: StoragePutOptions, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1459
|
-
if (message.mode !== 0) {
|
|
1460
|
-
writer.uint32(8).int32(message.mode);
|
|
1461
|
-
}
|
|
1462
|
-
if (message.updateVersionDetails !== undefined) {
|
|
1463
|
-
StorageUpdateVersion.encode(message.updateVersionDetails, writer.uint32(18).fork()).join();
|
|
1464
|
-
}
|
|
1465
|
-
if (message.tags !== undefined) {
|
|
1466
|
-
StorageTagSet.encode(message.tags, writer.uint32(26).fork()).join();
|
|
1467
|
-
}
|
|
1468
|
-
if (message.attributes !== undefined) {
|
|
1469
|
-
StorageAttributesMap.encode(message.attributes, writer.uint32(34).fork()).join();
|
|
1470
|
-
}
|
|
1471
|
-
return writer;
|
|
1472
|
-
},
|
|
1473
|
-
|
|
1474
|
-
decode(input: BinaryReader | Uint8Array, length?: number): StoragePutOptions {
|
|
1475
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1476
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1477
|
-
const message = createBaseStoragePutOptions();
|
|
1478
|
-
while (reader.pos < end) {
|
|
1479
|
-
const tag = reader.uint32();
|
|
1480
|
-
switch (tag >>> 3) {
|
|
1481
|
-
case 1: {
|
|
1482
|
-
if (tag !== 8) {
|
|
1483
|
-
break;
|
|
1484
|
-
}
|
|
1485
|
-
|
|
1486
|
-
message.mode = reader.int32() as any;
|
|
1487
|
-
continue;
|
|
1488
|
-
}
|
|
1489
|
-
case 2: {
|
|
1490
|
-
if (tag !== 18) {
|
|
1491
|
-
break;
|
|
1492
|
-
}
|
|
1493
|
-
|
|
1494
|
-
message.updateVersionDetails = StorageUpdateVersion.decode(reader, reader.uint32());
|
|
1495
|
-
continue;
|
|
1496
|
-
}
|
|
1497
|
-
case 3: {
|
|
1498
|
-
if (tag !== 26) {
|
|
1499
|
-
break;
|
|
1500
|
-
}
|
|
1501
|
-
|
|
1502
|
-
message.tags = StorageTagSet.decode(reader, reader.uint32());
|
|
1503
|
-
continue;
|
|
1504
|
-
}
|
|
1505
|
-
case 4: {
|
|
1506
|
-
if (tag !== 34) {
|
|
1507
|
-
break;
|
|
1508
|
-
}
|
|
1509
|
-
|
|
1510
|
-
message.attributes = StorageAttributesMap.decode(reader, reader.uint32());
|
|
1511
|
-
continue;
|
|
1512
|
-
}
|
|
1513
|
-
}
|
|
1514
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1515
|
-
break;
|
|
1516
|
-
}
|
|
1517
|
-
reader.skip(tag & 7);
|
|
1518
|
-
}
|
|
1519
|
-
return message;
|
|
1520
|
-
},
|
|
1521
|
-
|
|
1522
|
-
fromJSON(object: any): StoragePutOptions {
|
|
1523
|
-
return {
|
|
1524
|
-
mode: isSet(object.mode) ? storagePutModeEnumFromJSON(object.mode) : 0,
|
|
1525
|
-
updateVersionDetails: isSet(object.updateVersionDetails)
|
|
1526
|
-
? StorageUpdateVersion.fromJSON(object.updateVersionDetails)
|
|
1527
|
-
: isSet(object.update_version_details)
|
|
1528
|
-
? StorageUpdateVersion.fromJSON(object.update_version_details)
|
|
1529
|
-
: undefined,
|
|
1530
|
-
tags: isSet(object.tags) ? StorageTagSet.fromJSON(object.tags) : undefined,
|
|
1531
|
-
attributes: isSet(object.attributes) ? StorageAttributesMap.fromJSON(object.attributes) : undefined,
|
|
1532
|
-
};
|
|
1533
|
-
},
|
|
1534
|
-
|
|
1535
|
-
toJSON(message: StoragePutOptions): unknown {
|
|
1536
|
-
const obj: any = {};
|
|
1537
|
-
if (message.mode !== 0) {
|
|
1538
|
-
obj.mode = storagePutModeEnumToJSON(message.mode);
|
|
1539
|
-
}
|
|
1540
|
-
if (message.updateVersionDetails !== undefined) {
|
|
1541
|
-
obj.updateVersionDetails = StorageUpdateVersion.toJSON(message.updateVersionDetails);
|
|
1542
|
-
}
|
|
1543
|
-
if (message.tags !== undefined) {
|
|
1544
|
-
obj.tags = StorageTagSet.toJSON(message.tags);
|
|
1545
|
-
}
|
|
1546
|
-
if (message.attributes !== undefined) {
|
|
1547
|
-
obj.attributes = StorageAttributesMap.toJSON(message.attributes);
|
|
1548
|
-
}
|
|
1549
|
-
return obj;
|
|
1550
|
-
},
|
|
1551
|
-
|
|
1552
|
-
create(base?: DeepPartial<StoragePutOptions>): StoragePutOptions {
|
|
1553
|
-
return StoragePutOptions.fromPartial(base ?? {});
|
|
1554
|
-
},
|
|
1555
|
-
fromPartial(object: DeepPartial<StoragePutOptions>): StoragePutOptions {
|
|
1556
|
-
const message = createBaseStoragePutOptions();
|
|
1557
|
-
message.mode = object.mode ?? 0;
|
|
1558
|
-
message.updateVersionDetails = (object.updateVersionDetails !== undefined && object.updateVersionDetails !== null)
|
|
1559
|
-
? StorageUpdateVersion.fromPartial(object.updateVersionDetails)
|
|
1560
|
-
: undefined;
|
|
1561
|
-
message.tags = (object.tags !== undefined && object.tags !== null)
|
|
1562
|
-
? StorageTagSet.fromPartial(object.tags)
|
|
1563
|
-
: undefined;
|
|
1564
|
-
message.attributes = (object.attributes !== undefined && object.attributes !== null)
|
|
1565
|
-
? StorageAttributesMap.fromPartial(object.attributes)
|
|
1566
|
-
: undefined;
|
|
1567
|
-
return message;
|
|
1568
|
-
},
|
|
1569
|
-
};
|
|
1570
|
-
|
|
1571
|
-
function createBaseStoragePutMultipartOptions(): StoragePutMultipartOptions {
|
|
1572
|
-
return { tags: undefined, attributes: undefined };
|
|
1573
|
-
}
|
|
1574
|
-
|
|
1575
|
-
export const StoragePutMultipartOptions: MessageFns<StoragePutMultipartOptions> = {
|
|
1576
|
-
encode(message: StoragePutMultipartOptions, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1577
|
-
if (message.tags !== undefined) {
|
|
1578
|
-
StorageTagSet.encode(message.tags, writer.uint32(10).fork()).join();
|
|
1579
|
-
}
|
|
1580
|
-
if (message.attributes !== undefined) {
|
|
1581
|
-
StorageAttributesMap.encode(message.attributes, writer.uint32(18).fork()).join();
|
|
1582
|
-
}
|
|
1583
|
-
return writer;
|
|
1584
|
-
},
|
|
1585
|
-
|
|
1586
|
-
decode(input: BinaryReader | Uint8Array, length?: number): StoragePutMultipartOptions {
|
|
1587
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1588
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1589
|
-
const message = createBaseStoragePutMultipartOptions();
|
|
1590
|
-
while (reader.pos < end) {
|
|
1591
|
-
const tag = reader.uint32();
|
|
1592
|
-
switch (tag >>> 3) {
|
|
1593
|
-
case 1: {
|
|
1594
|
-
if (tag !== 10) {
|
|
1595
|
-
break;
|
|
1596
|
-
}
|
|
1597
|
-
|
|
1598
|
-
message.tags = StorageTagSet.decode(reader, reader.uint32());
|
|
1599
|
-
continue;
|
|
1600
|
-
}
|
|
1601
|
-
case 2: {
|
|
1602
|
-
if (tag !== 18) {
|
|
1603
|
-
break;
|
|
1604
|
-
}
|
|
1605
|
-
|
|
1606
|
-
message.attributes = StorageAttributesMap.decode(reader, reader.uint32());
|
|
1607
|
-
continue;
|
|
1608
|
-
}
|
|
1609
|
-
}
|
|
1610
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1611
|
-
break;
|
|
1612
|
-
}
|
|
1613
|
-
reader.skip(tag & 7);
|
|
1614
|
-
}
|
|
1615
|
-
return message;
|
|
1616
|
-
},
|
|
1617
|
-
|
|
1618
|
-
fromJSON(object: any): StoragePutMultipartOptions {
|
|
1619
|
-
return {
|
|
1620
|
-
tags: isSet(object.tags) ? StorageTagSet.fromJSON(object.tags) : undefined,
|
|
1621
|
-
attributes: isSet(object.attributes) ? StorageAttributesMap.fromJSON(object.attributes) : undefined,
|
|
1622
|
-
};
|
|
1623
|
-
},
|
|
1624
|
-
|
|
1625
|
-
toJSON(message: StoragePutMultipartOptions): unknown {
|
|
1626
|
-
const obj: any = {};
|
|
1627
|
-
if (message.tags !== undefined) {
|
|
1628
|
-
obj.tags = StorageTagSet.toJSON(message.tags);
|
|
1629
|
-
}
|
|
1630
|
-
if (message.attributes !== undefined) {
|
|
1631
|
-
obj.attributes = StorageAttributesMap.toJSON(message.attributes);
|
|
1632
|
-
}
|
|
1633
|
-
return obj;
|
|
1634
|
-
},
|
|
1635
|
-
|
|
1636
|
-
create(base?: DeepPartial<StoragePutMultipartOptions>): StoragePutMultipartOptions {
|
|
1637
|
-
return StoragePutMultipartOptions.fromPartial(base ?? {});
|
|
1638
|
-
},
|
|
1639
|
-
fromPartial(object: DeepPartial<StoragePutMultipartOptions>): StoragePutMultipartOptions {
|
|
1640
|
-
const message = createBaseStoragePutMultipartOptions();
|
|
1641
|
-
message.tags = (object.tags !== undefined && object.tags !== null)
|
|
1642
|
-
? StorageTagSet.fromPartial(object.tags)
|
|
1643
|
-
: undefined;
|
|
1644
|
-
message.attributes = (object.attributes !== undefined && object.attributes !== null)
|
|
1645
|
-
? StorageAttributesMap.fromPartial(object.attributes)
|
|
1646
|
-
: undefined;
|
|
1647
|
-
return message;
|
|
1648
|
-
},
|
|
1649
|
-
};
|
|
1650
|
-
|
|
1651
|
-
function createBaseStorageGetRequest(): StorageGetRequest {
|
|
1652
|
-
return { bindingName: "", path: "", options: undefined };
|
|
1653
|
-
}
|
|
1654
|
-
|
|
1655
|
-
export const StorageGetRequest: MessageFns<StorageGetRequest> = {
|
|
1656
|
-
encode(message: StorageGetRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1657
|
-
if (message.bindingName !== "") {
|
|
1658
|
-
writer.uint32(10).string(message.bindingName);
|
|
1659
|
-
}
|
|
1660
|
-
if (message.path !== "") {
|
|
1661
|
-
writer.uint32(18).string(message.path);
|
|
1662
|
-
}
|
|
1663
|
-
if (message.options !== undefined) {
|
|
1664
|
-
StorageGetOptions.encode(message.options, writer.uint32(26).fork()).join();
|
|
1665
|
-
}
|
|
1666
|
-
return writer;
|
|
1667
|
-
},
|
|
1668
|
-
|
|
1669
|
-
decode(input: BinaryReader | Uint8Array, length?: number): StorageGetRequest {
|
|
1670
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1671
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1672
|
-
const message = createBaseStorageGetRequest();
|
|
1673
|
-
while (reader.pos < end) {
|
|
1674
|
-
const tag = reader.uint32();
|
|
1675
|
-
switch (tag >>> 3) {
|
|
1676
|
-
case 1: {
|
|
1677
|
-
if (tag !== 10) {
|
|
1678
|
-
break;
|
|
1679
|
-
}
|
|
1680
|
-
|
|
1681
|
-
message.bindingName = reader.string();
|
|
1682
|
-
continue;
|
|
1683
|
-
}
|
|
1684
|
-
case 2: {
|
|
1685
|
-
if (tag !== 18) {
|
|
1686
|
-
break;
|
|
1687
|
-
}
|
|
1688
|
-
|
|
1689
|
-
message.path = reader.string();
|
|
1690
|
-
continue;
|
|
1691
|
-
}
|
|
1692
|
-
case 3: {
|
|
1693
|
-
if (tag !== 26) {
|
|
1694
|
-
break;
|
|
1695
|
-
}
|
|
1696
|
-
|
|
1697
|
-
message.options = StorageGetOptions.decode(reader, reader.uint32());
|
|
1698
|
-
continue;
|
|
1699
|
-
}
|
|
1700
|
-
}
|
|
1701
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1702
|
-
break;
|
|
1703
|
-
}
|
|
1704
|
-
reader.skip(tag & 7);
|
|
1705
|
-
}
|
|
1706
|
-
return message;
|
|
1707
|
-
},
|
|
1708
|
-
|
|
1709
|
-
fromJSON(object: any): StorageGetRequest {
|
|
1710
|
-
return {
|
|
1711
|
-
bindingName: isSet(object.bindingName)
|
|
1712
|
-
? globalThis.String(object.bindingName)
|
|
1713
|
-
: isSet(object.binding_name)
|
|
1714
|
-
? globalThis.String(object.binding_name)
|
|
1715
|
-
: "",
|
|
1716
|
-
path: isSet(object.path) ? globalThis.String(object.path) : "",
|
|
1717
|
-
options: isSet(object.options) ? StorageGetOptions.fromJSON(object.options) : undefined,
|
|
1718
|
-
};
|
|
1719
|
-
},
|
|
1720
|
-
|
|
1721
|
-
toJSON(message: StorageGetRequest): unknown {
|
|
1722
|
-
const obj: any = {};
|
|
1723
|
-
if (message.bindingName !== "") {
|
|
1724
|
-
obj.bindingName = message.bindingName;
|
|
1725
|
-
}
|
|
1726
|
-
if (message.path !== "") {
|
|
1727
|
-
obj.path = message.path;
|
|
1728
|
-
}
|
|
1729
|
-
if (message.options !== undefined) {
|
|
1730
|
-
obj.options = StorageGetOptions.toJSON(message.options);
|
|
1731
|
-
}
|
|
1732
|
-
return obj;
|
|
1733
|
-
},
|
|
1734
|
-
|
|
1735
|
-
create(base?: DeepPartial<StorageGetRequest>): StorageGetRequest {
|
|
1736
|
-
return StorageGetRequest.fromPartial(base ?? {});
|
|
1737
|
-
},
|
|
1738
|
-
fromPartial(object: DeepPartial<StorageGetRequest>): StorageGetRequest {
|
|
1739
|
-
const message = createBaseStorageGetRequest();
|
|
1740
|
-
message.bindingName = object.bindingName ?? "";
|
|
1741
|
-
message.path = object.path ?? "";
|
|
1742
|
-
message.options = (object.options !== undefined && object.options !== null)
|
|
1743
|
-
? StorageGetOptions.fromPartial(object.options)
|
|
1744
|
-
: undefined;
|
|
1745
|
-
return message;
|
|
1746
|
-
},
|
|
1747
|
-
};
|
|
1748
|
-
|
|
1749
|
-
function createBaseGetResponsePart(): GetResponsePart {
|
|
1750
|
-
return { metadata: undefined, chunkData: undefined };
|
|
1751
|
-
}
|
|
1752
|
-
|
|
1753
|
-
export const GetResponsePart: MessageFns<GetResponsePart> = {
|
|
1754
|
-
encode(message: GetResponsePart, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1755
|
-
if (message.metadata !== undefined) {
|
|
1756
|
-
StorageObjectMeta.encode(message.metadata, writer.uint32(10).fork()).join();
|
|
1757
|
-
}
|
|
1758
|
-
if (message.chunkData !== undefined) {
|
|
1759
|
-
writer.uint32(18).bytes(message.chunkData);
|
|
1760
|
-
}
|
|
1761
|
-
return writer;
|
|
1762
|
-
},
|
|
1763
|
-
|
|
1764
|
-
decode(input: BinaryReader | Uint8Array, length?: number): GetResponsePart {
|
|
1765
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1766
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1767
|
-
const message = createBaseGetResponsePart();
|
|
1768
|
-
while (reader.pos < end) {
|
|
1769
|
-
const tag = reader.uint32();
|
|
1770
|
-
switch (tag >>> 3) {
|
|
1771
|
-
case 1: {
|
|
1772
|
-
if (tag !== 10) {
|
|
1773
|
-
break;
|
|
1774
|
-
}
|
|
1775
|
-
|
|
1776
|
-
message.metadata = StorageObjectMeta.decode(reader, reader.uint32());
|
|
1777
|
-
continue;
|
|
1778
|
-
}
|
|
1779
|
-
case 2: {
|
|
1780
|
-
if (tag !== 18) {
|
|
1781
|
-
break;
|
|
1782
|
-
}
|
|
1783
|
-
|
|
1784
|
-
message.chunkData = reader.bytes();
|
|
1785
|
-
continue;
|
|
1786
|
-
}
|
|
1787
|
-
}
|
|
1788
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1789
|
-
break;
|
|
1790
|
-
}
|
|
1791
|
-
reader.skip(tag & 7);
|
|
1792
|
-
}
|
|
1793
|
-
return message;
|
|
1794
|
-
},
|
|
1795
|
-
|
|
1796
|
-
fromJSON(object: any): GetResponsePart {
|
|
1797
|
-
return {
|
|
1798
|
-
metadata: isSet(object.metadata) ? StorageObjectMeta.fromJSON(object.metadata) : undefined,
|
|
1799
|
-
chunkData: isSet(object.chunkData)
|
|
1800
|
-
? bytesFromBase64(object.chunkData)
|
|
1801
|
-
: isSet(object.chunk_data)
|
|
1802
|
-
? bytesFromBase64(object.chunk_data)
|
|
1803
|
-
: undefined,
|
|
1804
|
-
};
|
|
1805
|
-
},
|
|
1806
|
-
|
|
1807
|
-
toJSON(message: GetResponsePart): unknown {
|
|
1808
|
-
const obj: any = {};
|
|
1809
|
-
if (message.metadata !== undefined) {
|
|
1810
|
-
obj.metadata = StorageObjectMeta.toJSON(message.metadata);
|
|
1811
|
-
}
|
|
1812
|
-
if (message.chunkData !== undefined) {
|
|
1813
|
-
obj.chunkData = base64FromBytes(message.chunkData);
|
|
1814
|
-
}
|
|
1815
|
-
return obj;
|
|
1816
|
-
},
|
|
1817
|
-
|
|
1818
|
-
create(base?: DeepPartial<GetResponsePart>): GetResponsePart {
|
|
1819
|
-
return GetResponsePart.fromPartial(base ?? {});
|
|
1820
|
-
},
|
|
1821
|
-
fromPartial(object: DeepPartial<GetResponsePart>): GetResponsePart {
|
|
1822
|
-
const message = createBaseGetResponsePart();
|
|
1823
|
-
message.metadata = (object.metadata !== undefined && object.metadata !== null)
|
|
1824
|
-
? StorageObjectMeta.fromPartial(object.metadata)
|
|
1825
|
-
: undefined;
|
|
1826
|
-
message.chunkData = object.chunkData ?? undefined;
|
|
1827
|
-
return message;
|
|
1828
|
-
},
|
|
1829
|
-
};
|
|
1830
|
-
|
|
1831
|
-
function createBaseStoragePutMultipartChunkRequest(): StoragePutMultipartChunkRequest {
|
|
1832
|
-
return { metadata: undefined, chunkData: undefined };
|
|
1833
|
-
}
|
|
1834
|
-
|
|
1835
|
-
export const StoragePutMultipartChunkRequest: MessageFns<StoragePutMultipartChunkRequest> = {
|
|
1836
|
-
encode(message: StoragePutMultipartChunkRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1837
|
-
if (message.metadata !== undefined) {
|
|
1838
|
-
StoragePutMultipartMetadata.encode(message.metadata, writer.uint32(10).fork()).join();
|
|
1839
|
-
}
|
|
1840
|
-
if (message.chunkData !== undefined) {
|
|
1841
|
-
writer.uint32(18).bytes(message.chunkData);
|
|
1842
|
-
}
|
|
1843
|
-
return writer;
|
|
1844
|
-
},
|
|
1845
|
-
|
|
1846
|
-
decode(input: BinaryReader | Uint8Array, length?: number): StoragePutMultipartChunkRequest {
|
|
1847
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1848
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1849
|
-
const message = createBaseStoragePutMultipartChunkRequest();
|
|
1850
|
-
while (reader.pos < end) {
|
|
1851
|
-
const tag = reader.uint32();
|
|
1852
|
-
switch (tag >>> 3) {
|
|
1853
|
-
case 1: {
|
|
1854
|
-
if (tag !== 10) {
|
|
1855
|
-
break;
|
|
1856
|
-
}
|
|
1857
|
-
|
|
1858
|
-
message.metadata = StoragePutMultipartMetadata.decode(reader, reader.uint32());
|
|
1859
|
-
continue;
|
|
1860
|
-
}
|
|
1861
|
-
case 2: {
|
|
1862
|
-
if (tag !== 18) {
|
|
1863
|
-
break;
|
|
1864
|
-
}
|
|
1865
|
-
|
|
1866
|
-
message.chunkData = reader.bytes();
|
|
1867
|
-
continue;
|
|
1868
|
-
}
|
|
1869
|
-
}
|
|
1870
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1871
|
-
break;
|
|
1872
|
-
}
|
|
1873
|
-
reader.skip(tag & 7);
|
|
1874
|
-
}
|
|
1875
|
-
return message;
|
|
1876
|
-
},
|
|
1877
|
-
|
|
1878
|
-
fromJSON(object: any): StoragePutMultipartChunkRequest {
|
|
1879
|
-
return {
|
|
1880
|
-
metadata: isSet(object.metadata) ? StoragePutMultipartMetadata.fromJSON(object.metadata) : undefined,
|
|
1881
|
-
chunkData: isSet(object.chunkData)
|
|
1882
|
-
? bytesFromBase64(object.chunkData)
|
|
1883
|
-
: isSet(object.chunk_data)
|
|
1884
|
-
? bytesFromBase64(object.chunk_data)
|
|
1885
|
-
: undefined,
|
|
1886
|
-
};
|
|
1887
|
-
},
|
|
1888
|
-
|
|
1889
|
-
toJSON(message: StoragePutMultipartChunkRequest): unknown {
|
|
1890
|
-
const obj: any = {};
|
|
1891
|
-
if (message.metadata !== undefined) {
|
|
1892
|
-
obj.metadata = StoragePutMultipartMetadata.toJSON(message.metadata);
|
|
1893
|
-
}
|
|
1894
|
-
if (message.chunkData !== undefined) {
|
|
1895
|
-
obj.chunkData = base64FromBytes(message.chunkData);
|
|
1896
|
-
}
|
|
1897
|
-
return obj;
|
|
1898
|
-
},
|
|
1899
|
-
|
|
1900
|
-
create(base?: DeepPartial<StoragePutMultipartChunkRequest>): StoragePutMultipartChunkRequest {
|
|
1901
|
-
return StoragePutMultipartChunkRequest.fromPartial(base ?? {});
|
|
1902
|
-
},
|
|
1903
|
-
fromPartial(object: DeepPartial<StoragePutMultipartChunkRequest>): StoragePutMultipartChunkRequest {
|
|
1904
|
-
const message = createBaseStoragePutMultipartChunkRequest();
|
|
1905
|
-
message.metadata = (object.metadata !== undefined && object.metadata !== null)
|
|
1906
|
-
? StoragePutMultipartMetadata.fromPartial(object.metadata)
|
|
1907
|
-
: undefined;
|
|
1908
|
-
message.chunkData = object.chunkData ?? undefined;
|
|
1909
|
-
return message;
|
|
1910
|
-
},
|
|
1911
|
-
};
|
|
1912
|
-
|
|
1913
|
-
function createBaseStoragePutMultipartMetadata(): StoragePutMultipartMetadata {
|
|
1914
|
-
return { bindingName: "", path: "", options: undefined };
|
|
1915
|
-
}
|
|
1916
|
-
|
|
1917
|
-
export const StoragePutMultipartMetadata: MessageFns<StoragePutMultipartMetadata> = {
|
|
1918
|
-
encode(message: StoragePutMultipartMetadata, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1919
|
-
if (message.bindingName !== "") {
|
|
1920
|
-
writer.uint32(10).string(message.bindingName);
|
|
1921
|
-
}
|
|
1922
|
-
if (message.path !== "") {
|
|
1923
|
-
writer.uint32(18).string(message.path);
|
|
1924
|
-
}
|
|
1925
|
-
if (message.options !== undefined) {
|
|
1926
|
-
StoragePutMultipartOptions.encode(message.options, writer.uint32(26).fork()).join();
|
|
1927
|
-
}
|
|
1928
|
-
return writer;
|
|
1929
|
-
},
|
|
1930
|
-
|
|
1931
|
-
decode(input: BinaryReader | Uint8Array, length?: number): StoragePutMultipartMetadata {
|
|
1932
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1933
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1934
|
-
const message = createBaseStoragePutMultipartMetadata();
|
|
1935
|
-
while (reader.pos < end) {
|
|
1936
|
-
const tag = reader.uint32();
|
|
1937
|
-
switch (tag >>> 3) {
|
|
1938
|
-
case 1: {
|
|
1939
|
-
if (tag !== 10) {
|
|
1940
|
-
break;
|
|
1941
|
-
}
|
|
1942
|
-
|
|
1943
|
-
message.bindingName = reader.string();
|
|
1944
|
-
continue;
|
|
1945
|
-
}
|
|
1946
|
-
case 2: {
|
|
1947
|
-
if (tag !== 18) {
|
|
1948
|
-
break;
|
|
1949
|
-
}
|
|
1950
|
-
|
|
1951
|
-
message.path = reader.string();
|
|
1952
|
-
continue;
|
|
1953
|
-
}
|
|
1954
|
-
case 3: {
|
|
1955
|
-
if (tag !== 26) {
|
|
1956
|
-
break;
|
|
1957
|
-
}
|
|
1958
|
-
|
|
1959
|
-
message.options = StoragePutMultipartOptions.decode(reader, reader.uint32());
|
|
1960
|
-
continue;
|
|
1961
|
-
}
|
|
1962
|
-
}
|
|
1963
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1964
|
-
break;
|
|
1965
|
-
}
|
|
1966
|
-
reader.skip(tag & 7);
|
|
1967
|
-
}
|
|
1968
|
-
return message;
|
|
1969
|
-
},
|
|
1970
|
-
|
|
1971
|
-
fromJSON(object: any): StoragePutMultipartMetadata {
|
|
1972
|
-
return {
|
|
1973
|
-
bindingName: isSet(object.bindingName)
|
|
1974
|
-
? globalThis.String(object.bindingName)
|
|
1975
|
-
: isSet(object.binding_name)
|
|
1976
|
-
? globalThis.String(object.binding_name)
|
|
1977
|
-
: "",
|
|
1978
|
-
path: isSet(object.path) ? globalThis.String(object.path) : "",
|
|
1979
|
-
options: isSet(object.options) ? StoragePutMultipartOptions.fromJSON(object.options) : undefined,
|
|
1980
|
-
};
|
|
1981
|
-
},
|
|
1982
|
-
|
|
1983
|
-
toJSON(message: StoragePutMultipartMetadata): unknown {
|
|
1984
|
-
const obj: any = {};
|
|
1985
|
-
if (message.bindingName !== "") {
|
|
1986
|
-
obj.bindingName = message.bindingName;
|
|
1987
|
-
}
|
|
1988
|
-
if (message.path !== "") {
|
|
1989
|
-
obj.path = message.path;
|
|
1990
|
-
}
|
|
1991
|
-
if (message.options !== undefined) {
|
|
1992
|
-
obj.options = StoragePutMultipartOptions.toJSON(message.options);
|
|
1993
|
-
}
|
|
1994
|
-
return obj;
|
|
1995
|
-
},
|
|
1996
|
-
|
|
1997
|
-
create(base?: DeepPartial<StoragePutMultipartMetadata>): StoragePutMultipartMetadata {
|
|
1998
|
-
return StoragePutMultipartMetadata.fromPartial(base ?? {});
|
|
1999
|
-
},
|
|
2000
|
-
fromPartial(object: DeepPartial<StoragePutMultipartMetadata>): StoragePutMultipartMetadata {
|
|
2001
|
-
const message = createBaseStoragePutMultipartMetadata();
|
|
2002
|
-
message.bindingName = object.bindingName ?? "";
|
|
2003
|
-
message.path = object.path ?? "";
|
|
2004
|
-
message.options = (object.options !== undefined && object.options !== null)
|
|
2005
|
-
? StoragePutMultipartOptions.fromPartial(object.options)
|
|
2006
|
-
: undefined;
|
|
2007
|
-
return message;
|
|
2008
|
-
},
|
|
2009
|
-
};
|
|
2010
|
-
|
|
2011
|
-
function createBaseStoragePutResponse(): StoragePutResponse {
|
|
2012
|
-
return { eTag: undefined, version: undefined };
|
|
2013
|
-
}
|
|
2014
|
-
|
|
2015
|
-
export const StoragePutResponse: MessageFns<StoragePutResponse> = {
|
|
2016
|
-
encode(message: StoragePutResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2017
|
-
if (message.eTag !== undefined) {
|
|
2018
|
-
writer.uint32(10).string(message.eTag);
|
|
2019
|
-
}
|
|
2020
|
-
if (message.version !== undefined) {
|
|
2021
|
-
writer.uint32(18).string(message.version);
|
|
2022
|
-
}
|
|
2023
|
-
return writer;
|
|
2024
|
-
},
|
|
2025
|
-
|
|
2026
|
-
decode(input: BinaryReader | Uint8Array, length?: number): StoragePutResponse {
|
|
2027
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2028
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2029
|
-
const message = createBaseStoragePutResponse();
|
|
2030
|
-
while (reader.pos < end) {
|
|
2031
|
-
const tag = reader.uint32();
|
|
2032
|
-
switch (tag >>> 3) {
|
|
2033
|
-
case 1: {
|
|
2034
|
-
if (tag !== 10) {
|
|
2035
|
-
break;
|
|
2036
|
-
}
|
|
2037
|
-
|
|
2038
|
-
message.eTag = reader.string();
|
|
2039
|
-
continue;
|
|
2040
|
-
}
|
|
2041
|
-
case 2: {
|
|
2042
|
-
if (tag !== 18) {
|
|
2043
|
-
break;
|
|
2044
|
-
}
|
|
2045
|
-
|
|
2046
|
-
message.version = reader.string();
|
|
2047
|
-
continue;
|
|
2048
|
-
}
|
|
2049
|
-
}
|
|
2050
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2051
|
-
break;
|
|
2052
|
-
}
|
|
2053
|
-
reader.skip(tag & 7);
|
|
2054
|
-
}
|
|
2055
|
-
return message;
|
|
2056
|
-
},
|
|
2057
|
-
|
|
2058
|
-
fromJSON(object: any): StoragePutResponse {
|
|
2059
|
-
return {
|
|
2060
|
-
eTag: isSet(object.eTag)
|
|
2061
|
-
? globalThis.String(object.eTag)
|
|
2062
|
-
: isSet(object.e_tag)
|
|
2063
|
-
? globalThis.String(object.e_tag)
|
|
2064
|
-
: undefined,
|
|
2065
|
-
version: isSet(object.version) ? globalThis.String(object.version) : undefined,
|
|
2066
|
-
};
|
|
2067
|
-
},
|
|
2068
|
-
|
|
2069
|
-
toJSON(message: StoragePutResponse): unknown {
|
|
2070
|
-
const obj: any = {};
|
|
2071
|
-
if (message.eTag !== undefined) {
|
|
2072
|
-
obj.eTag = message.eTag;
|
|
2073
|
-
}
|
|
2074
|
-
if (message.version !== undefined) {
|
|
2075
|
-
obj.version = message.version;
|
|
2076
|
-
}
|
|
2077
|
-
return obj;
|
|
2078
|
-
},
|
|
2079
|
-
|
|
2080
|
-
create(base?: DeepPartial<StoragePutResponse>): StoragePutResponse {
|
|
2081
|
-
return StoragePutResponse.fromPartial(base ?? {});
|
|
2082
|
-
},
|
|
2083
|
-
fromPartial(object: DeepPartial<StoragePutResponse>): StoragePutResponse {
|
|
2084
|
-
const message = createBaseStoragePutResponse();
|
|
2085
|
-
message.eTag = object.eTag ?? undefined;
|
|
2086
|
-
message.version = object.version ?? undefined;
|
|
2087
|
-
return message;
|
|
2088
|
-
},
|
|
2089
|
-
};
|
|
2090
|
-
|
|
2091
|
-
function createBaseStoragePutRequest(): StoragePutRequest {
|
|
2092
|
-
return { bindingName: "", path: "", data: new Uint8Array(0), options: undefined };
|
|
2093
|
-
}
|
|
2094
|
-
|
|
2095
|
-
export const StoragePutRequest: MessageFns<StoragePutRequest> = {
|
|
2096
|
-
encode(message: StoragePutRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2097
|
-
if (message.bindingName !== "") {
|
|
2098
|
-
writer.uint32(10).string(message.bindingName);
|
|
2099
|
-
}
|
|
2100
|
-
if (message.path !== "") {
|
|
2101
|
-
writer.uint32(18).string(message.path);
|
|
2102
|
-
}
|
|
2103
|
-
if (message.data.length !== 0) {
|
|
2104
|
-
writer.uint32(26).bytes(message.data);
|
|
2105
|
-
}
|
|
2106
|
-
if (message.options !== undefined) {
|
|
2107
|
-
StoragePutOptions.encode(message.options, writer.uint32(34).fork()).join();
|
|
2108
|
-
}
|
|
2109
|
-
return writer;
|
|
2110
|
-
},
|
|
2111
|
-
|
|
2112
|
-
decode(input: BinaryReader | Uint8Array, length?: number): StoragePutRequest {
|
|
2113
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2114
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2115
|
-
const message = createBaseStoragePutRequest();
|
|
2116
|
-
while (reader.pos < end) {
|
|
2117
|
-
const tag = reader.uint32();
|
|
2118
|
-
switch (tag >>> 3) {
|
|
2119
|
-
case 1: {
|
|
2120
|
-
if (tag !== 10) {
|
|
2121
|
-
break;
|
|
2122
|
-
}
|
|
2123
|
-
|
|
2124
|
-
message.bindingName = reader.string();
|
|
2125
|
-
continue;
|
|
2126
|
-
}
|
|
2127
|
-
case 2: {
|
|
2128
|
-
if (tag !== 18) {
|
|
2129
|
-
break;
|
|
2130
|
-
}
|
|
2131
|
-
|
|
2132
|
-
message.path = reader.string();
|
|
2133
|
-
continue;
|
|
2134
|
-
}
|
|
2135
|
-
case 3: {
|
|
2136
|
-
if (tag !== 26) {
|
|
2137
|
-
break;
|
|
2138
|
-
}
|
|
2139
|
-
|
|
2140
|
-
message.data = reader.bytes();
|
|
2141
|
-
continue;
|
|
2142
|
-
}
|
|
2143
|
-
case 4: {
|
|
2144
|
-
if (tag !== 34) {
|
|
2145
|
-
break;
|
|
2146
|
-
}
|
|
2147
|
-
|
|
2148
|
-
message.options = StoragePutOptions.decode(reader, reader.uint32());
|
|
2149
|
-
continue;
|
|
2150
|
-
}
|
|
2151
|
-
}
|
|
2152
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2153
|
-
break;
|
|
2154
|
-
}
|
|
2155
|
-
reader.skip(tag & 7);
|
|
2156
|
-
}
|
|
2157
|
-
return message;
|
|
2158
|
-
},
|
|
2159
|
-
|
|
2160
|
-
fromJSON(object: any): StoragePutRequest {
|
|
2161
|
-
return {
|
|
2162
|
-
bindingName: isSet(object.bindingName)
|
|
2163
|
-
? globalThis.String(object.bindingName)
|
|
2164
|
-
: isSet(object.binding_name)
|
|
2165
|
-
? globalThis.String(object.binding_name)
|
|
2166
|
-
: "",
|
|
2167
|
-
path: isSet(object.path) ? globalThis.String(object.path) : "",
|
|
2168
|
-
data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0),
|
|
2169
|
-
options: isSet(object.options) ? StoragePutOptions.fromJSON(object.options) : undefined,
|
|
2170
|
-
};
|
|
2171
|
-
},
|
|
2172
|
-
|
|
2173
|
-
toJSON(message: StoragePutRequest): unknown {
|
|
2174
|
-
const obj: any = {};
|
|
2175
|
-
if (message.bindingName !== "") {
|
|
2176
|
-
obj.bindingName = message.bindingName;
|
|
2177
|
-
}
|
|
2178
|
-
if (message.path !== "") {
|
|
2179
|
-
obj.path = message.path;
|
|
2180
|
-
}
|
|
2181
|
-
if (message.data.length !== 0) {
|
|
2182
|
-
obj.data = base64FromBytes(message.data);
|
|
2183
|
-
}
|
|
2184
|
-
if (message.options !== undefined) {
|
|
2185
|
-
obj.options = StoragePutOptions.toJSON(message.options);
|
|
2186
|
-
}
|
|
2187
|
-
return obj;
|
|
2188
|
-
},
|
|
2189
|
-
|
|
2190
|
-
create(base?: DeepPartial<StoragePutRequest>): StoragePutRequest {
|
|
2191
|
-
return StoragePutRequest.fromPartial(base ?? {});
|
|
2192
|
-
},
|
|
2193
|
-
fromPartial(object: DeepPartial<StoragePutRequest>): StoragePutRequest {
|
|
2194
|
-
const message = createBaseStoragePutRequest();
|
|
2195
|
-
message.bindingName = object.bindingName ?? "";
|
|
2196
|
-
message.path = object.path ?? "";
|
|
2197
|
-
message.data = object.data ?? new Uint8Array(0);
|
|
2198
|
-
message.options = (object.options !== undefined && object.options !== null)
|
|
2199
|
-
? StoragePutOptions.fromPartial(object.options)
|
|
2200
|
-
: undefined;
|
|
2201
|
-
return message;
|
|
2202
|
-
},
|
|
2203
|
-
};
|
|
2204
|
-
|
|
2205
|
-
function createBaseStorageDeleteRequest(): StorageDeleteRequest {
|
|
2206
|
-
return { bindingName: "", path: "" };
|
|
2207
|
-
}
|
|
2208
|
-
|
|
2209
|
-
export const StorageDeleteRequest: MessageFns<StorageDeleteRequest> = {
|
|
2210
|
-
encode(message: StorageDeleteRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2211
|
-
if (message.bindingName !== "") {
|
|
2212
|
-
writer.uint32(10).string(message.bindingName);
|
|
2213
|
-
}
|
|
2214
|
-
if (message.path !== "") {
|
|
2215
|
-
writer.uint32(18).string(message.path);
|
|
2216
|
-
}
|
|
2217
|
-
return writer;
|
|
2218
|
-
},
|
|
2219
|
-
|
|
2220
|
-
decode(input: BinaryReader | Uint8Array, length?: number): StorageDeleteRequest {
|
|
2221
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2222
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2223
|
-
const message = createBaseStorageDeleteRequest();
|
|
2224
|
-
while (reader.pos < end) {
|
|
2225
|
-
const tag = reader.uint32();
|
|
2226
|
-
switch (tag >>> 3) {
|
|
2227
|
-
case 1: {
|
|
2228
|
-
if (tag !== 10) {
|
|
2229
|
-
break;
|
|
2230
|
-
}
|
|
2231
|
-
|
|
2232
|
-
message.bindingName = reader.string();
|
|
2233
|
-
continue;
|
|
2234
|
-
}
|
|
2235
|
-
case 2: {
|
|
2236
|
-
if (tag !== 18) {
|
|
2237
|
-
break;
|
|
2238
|
-
}
|
|
2239
|
-
|
|
2240
|
-
message.path = reader.string();
|
|
2241
|
-
continue;
|
|
2242
|
-
}
|
|
2243
|
-
}
|
|
2244
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2245
|
-
break;
|
|
2246
|
-
}
|
|
2247
|
-
reader.skip(tag & 7);
|
|
2248
|
-
}
|
|
2249
|
-
return message;
|
|
2250
|
-
},
|
|
2251
|
-
|
|
2252
|
-
fromJSON(object: any): StorageDeleteRequest {
|
|
2253
|
-
return {
|
|
2254
|
-
bindingName: isSet(object.bindingName)
|
|
2255
|
-
? globalThis.String(object.bindingName)
|
|
2256
|
-
: isSet(object.binding_name)
|
|
2257
|
-
? globalThis.String(object.binding_name)
|
|
2258
|
-
: "",
|
|
2259
|
-
path: isSet(object.path) ? globalThis.String(object.path) : "",
|
|
2260
|
-
};
|
|
2261
|
-
},
|
|
2262
|
-
|
|
2263
|
-
toJSON(message: StorageDeleteRequest): unknown {
|
|
2264
|
-
const obj: any = {};
|
|
2265
|
-
if (message.bindingName !== "") {
|
|
2266
|
-
obj.bindingName = message.bindingName;
|
|
2267
|
-
}
|
|
2268
|
-
if (message.path !== "") {
|
|
2269
|
-
obj.path = message.path;
|
|
2270
|
-
}
|
|
2271
|
-
return obj;
|
|
2272
|
-
},
|
|
2273
|
-
|
|
2274
|
-
create(base?: DeepPartial<StorageDeleteRequest>): StorageDeleteRequest {
|
|
2275
|
-
return StorageDeleteRequest.fromPartial(base ?? {});
|
|
2276
|
-
},
|
|
2277
|
-
fromPartial(object: DeepPartial<StorageDeleteRequest>): StorageDeleteRequest {
|
|
2278
|
-
const message = createBaseStorageDeleteRequest();
|
|
2279
|
-
message.bindingName = object.bindingName ?? "";
|
|
2280
|
-
message.path = object.path ?? "";
|
|
2281
|
-
return message;
|
|
2282
|
-
},
|
|
2283
|
-
};
|
|
2284
|
-
|
|
2285
|
-
function createBaseStorageOperationResponse(): StorageOperationResponse {
|
|
2286
|
-
return {};
|
|
2287
|
-
}
|
|
2288
|
-
|
|
2289
|
-
export const StorageOperationResponse: MessageFns<StorageOperationResponse> = {
|
|
2290
|
-
encode(_: StorageOperationResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2291
|
-
return writer;
|
|
2292
|
-
},
|
|
2293
|
-
|
|
2294
|
-
decode(input: BinaryReader | Uint8Array, length?: number): StorageOperationResponse {
|
|
2295
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2296
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2297
|
-
const message = createBaseStorageOperationResponse();
|
|
2298
|
-
while (reader.pos < end) {
|
|
2299
|
-
const tag = reader.uint32();
|
|
2300
|
-
switch (tag >>> 3) {
|
|
2301
|
-
}
|
|
2302
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2303
|
-
break;
|
|
2304
|
-
}
|
|
2305
|
-
reader.skip(tag & 7);
|
|
2306
|
-
}
|
|
2307
|
-
return message;
|
|
2308
|
-
},
|
|
2309
|
-
|
|
2310
|
-
fromJSON(_: any): StorageOperationResponse {
|
|
2311
|
-
return {};
|
|
2312
|
-
},
|
|
2313
|
-
|
|
2314
|
-
toJSON(_: StorageOperationResponse): unknown {
|
|
2315
|
-
const obj: any = {};
|
|
2316
|
-
return obj;
|
|
2317
|
-
},
|
|
2318
|
-
|
|
2319
|
-
create(base?: DeepPartial<StorageOperationResponse>): StorageOperationResponse {
|
|
2320
|
-
return StorageOperationResponse.fromPartial(base ?? {});
|
|
2321
|
-
},
|
|
2322
|
-
fromPartial(_: DeepPartial<StorageOperationResponse>): StorageOperationResponse {
|
|
2323
|
-
const message = createBaseStorageOperationResponse();
|
|
2324
|
-
return message;
|
|
2325
|
-
},
|
|
2326
|
-
};
|
|
2327
|
-
|
|
2328
|
-
function createBaseStorageListRequest(): StorageListRequest {
|
|
2329
|
-
return { bindingName: "", prefix: undefined, offset: undefined };
|
|
2330
|
-
}
|
|
2331
|
-
|
|
2332
|
-
export const StorageListRequest: MessageFns<StorageListRequest> = {
|
|
2333
|
-
encode(message: StorageListRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2334
|
-
if (message.bindingName !== "") {
|
|
2335
|
-
writer.uint32(10).string(message.bindingName);
|
|
2336
|
-
}
|
|
2337
|
-
if (message.prefix !== undefined) {
|
|
2338
|
-
writer.uint32(18).string(message.prefix);
|
|
2339
|
-
}
|
|
2340
|
-
if (message.offset !== undefined) {
|
|
2341
|
-
writer.uint32(26).string(message.offset);
|
|
2342
|
-
}
|
|
2343
|
-
return writer;
|
|
2344
|
-
},
|
|
2345
|
-
|
|
2346
|
-
decode(input: BinaryReader | Uint8Array, length?: number): StorageListRequest {
|
|
2347
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2348
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2349
|
-
const message = createBaseStorageListRequest();
|
|
2350
|
-
while (reader.pos < end) {
|
|
2351
|
-
const tag = reader.uint32();
|
|
2352
|
-
switch (tag >>> 3) {
|
|
2353
|
-
case 1: {
|
|
2354
|
-
if (tag !== 10) {
|
|
2355
|
-
break;
|
|
2356
|
-
}
|
|
2357
|
-
|
|
2358
|
-
message.bindingName = reader.string();
|
|
2359
|
-
continue;
|
|
2360
|
-
}
|
|
2361
|
-
case 2: {
|
|
2362
|
-
if (tag !== 18) {
|
|
2363
|
-
break;
|
|
2364
|
-
}
|
|
2365
|
-
|
|
2366
|
-
message.prefix = reader.string();
|
|
2367
|
-
continue;
|
|
2368
|
-
}
|
|
2369
|
-
case 3: {
|
|
2370
|
-
if (tag !== 26) {
|
|
2371
|
-
break;
|
|
2372
|
-
}
|
|
2373
|
-
|
|
2374
|
-
message.offset = reader.string();
|
|
2375
|
-
continue;
|
|
2376
|
-
}
|
|
2377
|
-
}
|
|
2378
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2379
|
-
break;
|
|
2380
|
-
}
|
|
2381
|
-
reader.skip(tag & 7);
|
|
2382
|
-
}
|
|
2383
|
-
return message;
|
|
2384
|
-
},
|
|
2385
|
-
|
|
2386
|
-
fromJSON(object: any): StorageListRequest {
|
|
2387
|
-
return {
|
|
2388
|
-
bindingName: isSet(object.bindingName)
|
|
2389
|
-
? globalThis.String(object.bindingName)
|
|
2390
|
-
: isSet(object.binding_name)
|
|
2391
|
-
? globalThis.String(object.binding_name)
|
|
2392
|
-
: "",
|
|
2393
|
-
prefix: isSet(object.prefix) ? globalThis.String(object.prefix) : undefined,
|
|
2394
|
-
offset: isSet(object.offset) ? globalThis.String(object.offset) : undefined,
|
|
2395
|
-
};
|
|
2396
|
-
},
|
|
2397
|
-
|
|
2398
|
-
toJSON(message: StorageListRequest): unknown {
|
|
2399
|
-
const obj: any = {};
|
|
2400
|
-
if (message.bindingName !== "") {
|
|
2401
|
-
obj.bindingName = message.bindingName;
|
|
2402
|
-
}
|
|
2403
|
-
if (message.prefix !== undefined) {
|
|
2404
|
-
obj.prefix = message.prefix;
|
|
2405
|
-
}
|
|
2406
|
-
if (message.offset !== undefined) {
|
|
2407
|
-
obj.offset = message.offset;
|
|
2408
|
-
}
|
|
2409
|
-
return obj;
|
|
2410
|
-
},
|
|
2411
|
-
|
|
2412
|
-
create(base?: DeepPartial<StorageListRequest>): StorageListRequest {
|
|
2413
|
-
return StorageListRequest.fromPartial(base ?? {});
|
|
2414
|
-
},
|
|
2415
|
-
fromPartial(object: DeepPartial<StorageListRequest>): StorageListRequest {
|
|
2416
|
-
const message = createBaseStorageListRequest();
|
|
2417
|
-
message.bindingName = object.bindingName ?? "";
|
|
2418
|
-
message.prefix = object.prefix ?? undefined;
|
|
2419
|
-
message.offset = object.offset ?? undefined;
|
|
2420
|
-
return message;
|
|
2421
|
-
},
|
|
2422
|
-
};
|
|
2423
|
-
|
|
2424
|
-
function createBaseStorageObjectMeta(): StorageObjectMeta {
|
|
2425
|
-
return { location: "", lastModified: undefined, size: 0, eTag: undefined, version: undefined };
|
|
2426
|
-
}
|
|
2427
|
-
|
|
2428
|
-
export const StorageObjectMeta: MessageFns<StorageObjectMeta> = {
|
|
2429
|
-
encode(message: StorageObjectMeta, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2430
|
-
if (message.location !== "") {
|
|
2431
|
-
writer.uint32(10).string(message.location);
|
|
2432
|
-
}
|
|
2433
|
-
if (message.lastModified !== undefined) {
|
|
2434
|
-
Timestamp.encode(toTimestamp(message.lastModified), writer.uint32(18).fork()).join();
|
|
2435
|
-
}
|
|
2436
|
-
if (message.size !== 0) {
|
|
2437
|
-
writer.uint32(24).uint64(message.size);
|
|
2438
|
-
}
|
|
2439
|
-
if (message.eTag !== undefined) {
|
|
2440
|
-
writer.uint32(34).string(message.eTag);
|
|
2441
|
-
}
|
|
2442
|
-
if (message.version !== undefined) {
|
|
2443
|
-
writer.uint32(42).string(message.version);
|
|
2444
|
-
}
|
|
2445
|
-
return writer;
|
|
2446
|
-
},
|
|
2447
|
-
|
|
2448
|
-
decode(input: BinaryReader | Uint8Array, length?: number): StorageObjectMeta {
|
|
2449
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2450
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2451
|
-
const message = createBaseStorageObjectMeta();
|
|
2452
|
-
while (reader.pos < end) {
|
|
2453
|
-
const tag = reader.uint32();
|
|
2454
|
-
switch (tag >>> 3) {
|
|
2455
|
-
case 1: {
|
|
2456
|
-
if (tag !== 10) {
|
|
2457
|
-
break;
|
|
2458
|
-
}
|
|
2459
|
-
|
|
2460
|
-
message.location = reader.string();
|
|
2461
|
-
continue;
|
|
2462
|
-
}
|
|
2463
|
-
case 2: {
|
|
2464
|
-
if (tag !== 18) {
|
|
2465
|
-
break;
|
|
2466
|
-
}
|
|
2467
|
-
|
|
2468
|
-
message.lastModified = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
2469
|
-
continue;
|
|
2470
|
-
}
|
|
2471
|
-
case 3: {
|
|
2472
|
-
if (tag !== 24) {
|
|
2473
|
-
break;
|
|
2474
|
-
}
|
|
2475
|
-
|
|
2476
|
-
message.size = longToNumber(reader.uint64());
|
|
2477
|
-
continue;
|
|
2478
|
-
}
|
|
2479
|
-
case 4: {
|
|
2480
|
-
if (tag !== 34) {
|
|
2481
|
-
break;
|
|
2482
|
-
}
|
|
2483
|
-
|
|
2484
|
-
message.eTag = reader.string();
|
|
2485
|
-
continue;
|
|
2486
|
-
}
|
|
2487
|
-
case 5: {
|
|
2488
|
-
if (tag !== 42) {
|
|
2489
|
-
break;
|
|
2490
|
-
}
|
|
2491
|
-
|
|
2492
|
-
message.version = reader.string();
|
|
2493
|
-
continue;
|
|
2494
|
-
}
|
|
2495
|
-
}
|
|
2496
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2497
|
-
break;
|
|
2498
|
-
}
|
|
2499
|
-
reader.skip(tag & 7);
|
|
2500
|
-
}
|
|
2501
|
-
return message;
|
|
2502
|
-
},
|
|
2503
|
-
|
|
2504
|
-
fromJSON(object: any): StorageObjectMeta {
|
|
2505
|
-
return {
|
|
2506
|
-
location: isSet(object.location) ? globalThis.String(object.location) : "",
|
|
2507
|
-
lastModified: isSet(object.lastModified)
|
|
2508
|
-
? fromJsonTimestamp(object.lastModified)
|
|
2509
|
-
: isSet(object.last_modified)
|
|
2510
|
-
? fromJsonTimestamp(object.last_modified)
|
|
2511
|
-
: undefined,
|
|
2512
|
-
size: isSet(object.size) ? globalThis.Number(object.size) : 0,
|
|
2513
|
-
eTag: isSet(object.eTag)
|
|
2514
|
-
? globalThis.String(object.eTag)
|
|
2515
|
-
: isSet(object.e_tag)
|
|
2516
|
-
? globalThis.String(object.e_tag)
|
|
2517
|
-
: undefined,
|
|
2518
|
-
version: isSet(object.version) ? globalThis.String(object.version) : undefined,
|
|
2519
|
-
};
|
|
2520
|
-
},
|
|
2521
|
-
|
|
2522
|
-
toJSON(message: StorageObjectMeta): unknown {
|
|
2523
|
-
const obj: any = {};
|
|
2524
|
-
if (message.location !== "") {
|
|
2525
|
-
obj.location = message.location;
|
|
2526
|
-
}
|
|
2527
|
-
if (message.lastModified !== undefined) {
|
|
2528
|
-
obj.lastModified = message.lastModified.toISOString();
|
|
2529
|
-
}
|
|
2530
|
-
if (message.size !== 0) {
|
|
2531
|
-
obj.size = Math.round(message.size);
|
|
2532
|
-
}
|
|
2533
|
-
if (message.eTag !== undefined) {
|
|
2534
|
-
obj.eTag = message.eTag;
|
|
2535
|
-
}
|
|
2536
|
-
if (message.version !== undefined) {
|
|
2537
|
-
obj.version = message.version;
|
|
2538
|
-
}
|
|
2539
|
-
return obj;
|
|
2540
|
-
},
|
|
2541
|
-
|
|
2542
|
-
create(base?: DeepPartial<StorageObjectMeta>): StorageObjectMeta {
|
|
2543
|
-
return StorageObjectMeta.fromPartial(base ?? {});
|
|
2544
|
-
},
|
|
2545
|
-
fromPartial(object: DeepPartial<StorageObjectMeta>): StorageObjectMeta {
|
|
2546
|
-
const message = createBaseStorageObjectMeta();
|
|
2547
|
-
message.location = object.location ?? "";
|
|
2548
|
-
message.lastModified = object.lastModified ?? undefined;
|
|
2549
|
-
message.size = object.size ?? 0;
|
|
2550
|
-
message.eTag = object.eTag ?? undefined;
|
|
2551
|
-
message.version = object.version ?? undefined;
|
|
2552
|
-
return message;
|
|
2553
|
-
},
|
|
2554
|
-
};
|
|
2555
|
-
|
|
2556
|
-
function createBaseStorageListWithDelimiterRequest(): StorageListWithDelimiterRequest {
|
|
2557
|
-
return { bindingName: "", prefix: undefined };
|
|
2558
|
-
}
|
|
2559
|
-
|
|
2560
|
-
export const StorageListWithDelimiterRequest: MessageFns<StorageListWithDelimiterRequest> = {
|
|
2561
|
-
encode(message: StorageListWithDelimiterRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2562
|
-
if (message.bindingName !== "") {
|
|
2563
|
-
writer.uint32(10).string(message.bindingName);
|
|
2564
|
-
}
|
|
2565
|
-
if (message.prefix !== undefined) {
|
|
2566
|
-
writer.uint32(18).string(message.prefix);
|
|
2567
|
-
}
|
|
2568
|
-
return writer;
|
|
2569
|
-
},
|
|
2570
|
-
|
|
2571
|
-
decode(input: BinaryReader | Uint8Array, length?: number): StorageListWithDelimiterRequest {
|
|
2572
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2573
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2574
|
-
const message = createBaseStorageListWithDelimiterRequest();
|
|
2575
|
-
while (reader.pos < end) {
|
|
2576
|
-
const tag = reader.uint32();
|
|
2577
|
-
switch (tag >>> 3) {
|
|
2578
|
-
case 1: {
|
|
2579
|
-
if (tag !== 10) {
|
|
2580
|
-
break;
|
|
2581
|
-
}
|
|
2582
|
-
|
|
2583
|
-
message.bindingName = reader.string();
|
|
2584
|
-
continue;
|
|
2585
|
-
}
|
|
2586
|
-
case 2: {
|
|
2587
|
-
if (tag !== 18) {
|
|
2588
|
-
break;
|
|
2589
|
-
}
|
|
2590
|
-
|
|
2591
|
-
message.prefix = reader.string();
|
|
2592
|
-
continue;
|
|
2593
|
-
}
|
|
2594
|
-
}
|
|
2595
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2596
|
-
break;
|
|
2597
|
-
}
|
|
2598
|
-
reader.skip(tag & 7);
|
|
2599
|
-
}
|
|
2600
|
-
return message;
|
|
2601
|
-
},
|
|
2602
|
-
|
|
2603
|
-
fromJSON(object: any): StorageListWithDelimiterRequest {
|
|
2604
|
-
return {
|
|
2605
|
-
bindingName: isSet(object.bindingName)
|
|
2606
|
-
? globalThis.String(object.bindingName)
|
|
2607
|
-
: isSet(object.binding_name)
|
|
2608
|
-
? globalThis.String(object.binding_name)
|
|
2609
|
-
: "",
|
|
2610
|
-
prefix: isSet(object.prefix) ? globalThis.String(object.prefix) : undefined,
|
|
2611
|
-
};
|
|
2612
|
-
},
|
|
2613
|
-
|
|
2614
|
-
toJSON(message: StorageListWithDelimiterRequest): unknown {
|
|
2615
|
-
const obj: any = {};
|
|
2616
|
-
if (message.bindingName !== "") {
|
|
2617
|
-
obj.bindingName = message.bindingName;
|
|
2618
|
-
}
|
|
2619
|
-
if (message.prefix !== undefined) {
|
|
2620
|
-
obj.prefix = message.prefix;
|
|
2621
|
-
}
|
|
2622
|
-
return obj;
|
|
2623
|
-
},
|
|
2624
|
-
|
|
2625
|
-
create(base?: DeepPartial<StorageListWithDelimiterRequest>): StorageListWithDelimiterRequest {
|
|
2626
|
-
return StorageListWithDelimiterRequest.fromPartial(base ?? {});
|
|
2627
|
-
},
|
|
2628
|
-
fromPartial(object: DeepPartial<StorageListWithDelimiterRequest>): StorageListWithDelimiterRequest {
|
|
2629
|
-
const message = createBaseStorageListWithDelimiterRequest();
|
|
2630
|
-
message.bindingName = object.bindingName ?? "";
|
|
2631
|
-
message.prefix = object.prefix ?? undefined;
|
|
2632
|
-
return message;
|
|
2633
|
-
},
|
|
2634
|
-
};
|
|
2635
|
-
|
|
2636
|
-
function createBaseStorageListResultProto(): StorageListResultProto {
|
|
2637
|
-
return { commonPrefixes: [], objects: [] };
|
|
2638
|
-
}
|
|
2639
|
-
|
|
2640
|
-
export const StorageListResultProto: MessageFns<StorageListResultProto> = {
|
|
2641
|
-
encode(message: StorageListResultProto, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2642
|
-
for (const v of message.commonPrefixes) {
|
|
2643
|
-
writer.uint32(10).string(v!);
|
|
2644
|
-
}
|
|
2645
|
-
for (const v of message.objects) {
|
|
2646
|
-
StorageObjectMeta.encode(v!, writer.uint32(18).fork()).join();
|
|
2647
|
-
}
|
|
2648
|
-
return writer;
|
|
2649
|
-
},
|
|
2650
|
-
|
|
2651
|
-
decode(input: BinaryReader | Uint8Array, length?: number): StorageListResultProto {
|
|
2652
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2653
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2654
|
-
const message = createBaseStorageListResultProto();
|
|
2655
|
-
while (reader.pos < end) {
|
|
2656
|
-
const tag = reader.uint32();
|
|
2657
|
-
switch (tag >>> 3) {
|
|
2658
|
-
case 1: {
|
|
2659
|
-
if (tag !== 10) {
|
|
2660
|
-
break;
|
|
2661
|
-
}
|
|
2662
|
-
|
|
2663
|
-
message.commonPrefixes.push(reader.string());
|
|
2664
|
-
continue;
|
|
2665
|
-
}
|
|
2666
|
-
case 2: {
|
|
2667
|
-
if (tag !== 18) {
|
|
2668
|
-
break;
|
|
2669
|
-
}
|
|
2670
|
-
|
|
2671
|
-
message.objects.push(StorageObjectMeta.decode(reader, reader.uint32()));
|
|
2672
|
-
continue;
|
|
2673
|
-
}
|
|
2674
|
-
}
|
|
2675
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2676
|
-
break;
|
|
2677
|
-
}
|
|
2678
|
-
reader.skip(tag & 7);
|
|
2679
|
-
}
|
|
2680
|
-
return message;
|
|
2681
|
-
},
|
|
2682
|
-
|
|
2683
|
-
fromJSON(object: any): StorageListResultProto {
|
|
2684
|
-
return {
|
|
2685
|
-
commonPrefixes: globalThis.Array.isArray(object?.commonPrefixes)
|
|
2686
|
-
? object.commonPrefixes.map((e: any) => globalThis.String(e))
|
|
2687
|
-
: globalThis.Array.isArray(object?.common_prefixes)
|
|
2688
|
-
? object.common_prefixes.map((e: any) => globalThis.String(e))
|
|
2689
|
-
: [],
|
|
2690
|
-
objects: globalThis.Array.isArray(object?.objects)
|
|
2691
|
-
? object.objects.map((e: any) => StorageObjectMeta.fromJSON(e))
|
|
2692
|
-
: [],
|
|
2693
|
-
};
|
|
2694
|
-
},
|
|
2695
|
-
|
|
2696
|
-
toJSON(message: StorageListResultProto): unknown {
|
|
2697
|
-
const obj: any = {};
|
|
2698
|
-
if (message.commonPrefixes?.length) {
|
|
2699
|
-
obj.commonPrefixes = message.commonPrefixes;
|
|
2700
|
-
}
|
|
2701
|
-
if (message.objects?.length) {
|
|
2702
|
-
obj.objects = message.objects.map((e) => StorageObjectMeta.toJSON(e));
|
|
2703
|
-
}
|
|
2704
|
-
return obj;
|
|
2705
|
-
},
|
|
2706
|
-
|
|
2707
|
-
create(base?: DeepPartial<StorageListResultProto>): StorageListResultProto {
|
|
2708
|
-
return StorageListResultProto.fromPartial(base ?? {});
|
|
2709
|
-
},
|
|
2710
|
-
fromPartial(object: DeepPartial<StorageListResultProto>): StorageListResultProto {
|
|
2711
|
-
const message = createBaseStorageListResultProto();
|
|
2712
|
-
message.commonPrefixes = object.commonPrefixes?.map((e) => e) || [];
|
|
2713
|
-
message.objects = object.objects?.map((e) => StorageObjectMeta.fromPartial(e)) || [];
|
|
2714
|
-
return message;
|
|
2715
|
-
},
|
|
2716
|
-
};
|
|
2717
|
-
|
|
2718
|
-
function createBaseStorageHeadRequest(): StorageHeadRequest {
|
|
2719
|
-
return { bindingName: "", path: "" };
|
|
2720
|
-
}
|
|
2721
|
-
|
|
2722
|
-
export const StorageHeadRequest: MessageFns<StorageHeadRequest> = {
|
|
2723
|
-
encode(message: StorageHeadRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2724
|
-
if (message.bindingName !== "") {
|
|
2725
|
-
writer.uint32(10).string(message.bindingName);
|
|
2726
|
-
}
|
|
2727
|
-
if (message.path !== "") {
|
|
2728
|
-
writer.uint32(18).string(message.path);
|
|
2729
|
-
}
|
|
2730
|
-
return writer;
|
|
2731
|
-
},
|
|
2732
|
-
|
|
2733
|
-
decode(input: BinaryReader | Uint8Array, length?: number): StorageHeadRequest {
|
|
2734
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2735
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2736
|
-
const message = createBaseStorageHeadRequest();
|
|
2737
|
-
while (reader.pos < end) {
|
|
2738
|
-
const tag = reader.uint32();
|
|
2739
|
-
switch (tag >>> 3) {
|
|
2740
|
-
case 1: {
|
|
2741
|
-
if (tag !== 10) {
|
|
2742
|
-
break;
|
|
2743
|
-
}
|
|
2744
|
-
|
|
2745
|
-
message.bindingName = reader.string();
|
|
2746
|
-
continue;
|
|
2747
|
-
}
|
|
2748
|
-
case 2: {
|
|
2749
|
-
if (tag !== 18) {
|
|
2750
|
-
break;
|
|
2751
|
-
}
|
|
2752
|
-
|
|
2753
|
-
message.path = reader.string();
|
|
2754
|
-
continue;
|
|
2755
|
-
}
|
|
2756
|
-
}
|
|
2757
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2758
|
-
break;
|
|
2759
|
-
}
|
|
2760
|
-
reader.skip(tag & 7);
|
|
2761
|
-
}
|
|
2762
|
-
return message;
|
|
2763
|
-
},
|
|
2764
|
-
|
|
2765
|
-
fromJSON(object: any): StorageHeadRequest {
|
|
2766
|
-
return {
|
|
2767
|
-
bindingName: isSet(object.bindingName)
|
|
2768
|
-
? globalThis.String(object.bindingName)
|
|
2769
|
-
: isSet(object.binding_name)
|
|
2770
|
-
? globalThis.String(object.binding_name)
|
|
2771
|
-
: "",
|
|
2772
|
-
path: isSet(object.path) ? globalThis.String(object.path) : "",
|
|
2773
|
-
};
|
|
2774
|
-
},
|
|
2775
|
-
|
|
2776
|
-
toJSON(message: StorageHeadRequest): unknown {
|
|
2777
|
-
const obj: any = {};
|
|
2778
|
-
if (message.bindingName !== "") {
|
|
2779
|
-
obj.bindingName = message.bindingName;
|
|
2780
|
-
}
|
|
2781
|
-
if (message.path !== "") {
|
|
2782
|
-
obj.path = message.path;
|
|
2783
|
-
}
|
|
2784
|
-
return obj;
|
|
2785
|
-
},
|
|
2786
|
-
|
|
2787
|
-
create(base?: DeepPartial<StorageHeadRequest>): StorageHeadRequest {
|
|
2788
|
-
return StorageHeadRequest.fromPartial(base ?? {});
|
|
2789
|
-
},
|
|
2790
|
-
fromPartial(object: DeepPartial<StorageHeadRequest>): StorageHeadRequest {
|
|
2791
|
-
const message = createBaseStorageHeadRequest();
|
|
2792
|
-
message.bindingName = object.bindingName ?? "";
|
|
2793
|
-
message.path = object.path ?? "";
|
|
2794
|
-
return message;
|
|
2795
|
-
},
|
|
2796
|
-
};
|
|
2797
|
-
|
|
2798
|
-
function createBaseStorageGetBaseDirRequest(): StorageGetBaseDirRequest {
|
|
2799
|
-
return { bindingName: "" };
|
|
2800
|
-
}
|
|
2801
|
-
|
|
2802
|
-
export const StorageGetBaseDirRequest: MessageFns<StorageGetBaseDirRequest> = {
|
|
2803
|
-
encode(message: StorageGetBaseDirRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2804
|
-
if (message.bindingName !== "") {
|
|
2805
|
-
writer.uint32(10).string(message.bindingName);
|
|
2806
|
-
}
|
|
2807
|
-
return writer;
|
|
2808
|
-
},
|
|
2809
|
-
|
|
2810
|
-
decode(input: BinaryReader | Uint8Array, length?: number): StorageGetBaseDirRequest {
|
|
2811
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2812
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2813
|
-
const message = createBaseStorageGetBaseDirRequest();
|
|
2814
|
-
while (reader.pos < end) {
|
|
2815
|
-
const tag = reader.uint32();
|
|
2816
|
-
switch (tag >>> 3) {
|
|
2817
|
-
case 1: {
|
|
2818
|
-
if (tag !== 10) {
|
|
2819
|
-
break;
|
|
2820
|
-
}
|
|
2821
|
-
|
|
2822
|
-
message.bindingName = reader.string();
|
|
2823
|
-
continue;
|
|
2824
|
-
}
|
|
2825
|
-
}
|
|
2826
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2827
|
-
break;
|
|
2828
|
-
}
|
|
2829
|
-
reader.skip(tag & 7);
|
|
2830
|
-
}
|
|
2831
|
-
return message;
|
|
2832
|
-
},
|
|
2833
|
-
|
|
2834
|
-
fromJSON(object: any): StorageGetBaseDirRequest {
|
|
2835
|
-
return {
|
|
2836
|
-
bindingName: isSet(object.bindingName)
|
|
2837
|
-
? globalThis.String(object.bindingName)
|
|
2838
|
-
: isSet(object.binding_name)
|
|
2839
|
-
? globalThis.String(object.binding_name)
|
|
2840
|
-
: "",
|
|
2841
|
-
};
|
|
2842
|
-
},
|
|
2843
|
-
|
|
2844
|
-
toJSON(message: StorageGetBaseDirRequest): unknown {
|
|
2845
|
-
const obj: any = {};
|
|
2846
|
-
if (message.bindingName !== "") {
|
|
2847
|
-
obj.bindingName = message.bindingName;
|
|
2848
|
-
}
|
|
2849
|
-
return obj;
|
|
2850
|
-
},
|
|
2851
|
-
|
|
2852
|
-
create(base?: DeepPartial<StorageGetBaseDirRequest>): StorageGetBaseDirRequest {
|
|
2853
|
-
return StorageGetBaseDirRequest.fromPartial(base ?? {});
|
|
2854
|
-
},
|
|
2855
|
-
fromPartial(object: DeepPartial<StorageGetBaseDirRequest>): StorageGetBaseDirRequest {
|
|
2856
|
-
const message = createBaseStorageGetBaseDirRequest();
|
|
2857
|
-
message.bindingName = object.bindingName ?? "";
|
|
2858
|
-
return message;
|
|
2859
|
-
},
|
|
2860
|
-
};
|
|
2861
|
-
|
|
2862
|
-
function createBaseStorageGetBaseDirResponse(): StorageGetBaseDirResponse {
|
|
2863
|
-
return { path: "" };
|
|
2864
|
-
}
|
|
2865
|
-
|
|
2866
|
-
export const StorageGetBaseDirResponse: MessageFns<StorageGetBaseDirResponse> = {
|
|
2867
|
-
encode(message: StorageGetBaseDirResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2868
|
-
if (message.path !== "") {
|
|
2869
|
-
writer.uint32(10).string(message.path);
|
|
2870
|
-
}
|
|
2871
|
-
return writer;
|
|
2872
|
-
},
|
|
2873
|
-
|
|
2874
|
-
decode(input: BinaryReader | Uint8Array, length?: number): StorageGetBaseDirResponse {
|
|
2875
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2876
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2877
|
-
const message = createBaseStorageGetBaseDirResponse();
|
|
2878
|
-
while (reader.pos < end) {
|
|
2879
|
-
const tag = reader.uint32();
|
|
2880
|
-
switch (tag >>> 3) {
|
|
2881
|
-
case 1: {
|
|
2882
|
-
if (tag !== 10) {
|
|
2883
|
-
break;
|
|
2884
|
-
}
|
|
2885
|
-
|
|
2886
|
-
message.path = reader.string();
|
|
2887
|
-
continue;
|
|
2888
|
-
}
|
|
2889
|
-
}
|
|
2890
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2891
|
-
break;
|
|
2892
|
-
}
|
|
2893
|
-
reader.skip(tag & 7);
|
|
2894
|
-
}
|
|
2895
|
-
return message;
|
|
2896
|
-
},
|
|
2897
|
-
|
|
2898
|
-
fromJSON(object: any): StorageGetBaseDirResponse {
|
|
2899
|
-
return { path: isSet(object.path) ? globalThis.String(object.path) : "" };
|
|
2900
|
-
},
|
|
2901
|
-
|
|
2902
|
-
toJSON(message: StorageGetBaseDirResponse): unknown {
|
|
2903
|
-
const obj: any = {};
|
|
2904
|
-
if (message.path !== "") {
|
|
2905
|
-
obj.path = message.path;
|
|
2906
|
-
}
|
|
2907
|
-
return obj;
|
|
2908
|
-
},
|
|
2909
|
-
|
|
2910
|
-
create(base?: DeepPartial<StorageGetBaseDirResponse>): StorageGetBaseDirResponse {
|
|
2911
|
-
return StorageGetBaseDirResponse.fromPartial(base ?? {});
|
|
2912
|
-
},
|
|
2913
|
-
fromPartial(object: DeepPartial<StorageGetBaseDirResponse>): StorageGetBaseDirResponse {
|
|
2914
|
-
const message = createBaseStorageGetBaseDirResponse();
|
|
2915
|
-
message.path = object.path ?? "";
|
|
2916
|
-
return message;
|
|
2917
|
-
},
|
|
2918
|
-
};
|
|
2919
|
-
|
|
2920
|
-
function createBaseStorageGetUrlRequest(): StorageGetUrlRequest {
|
|
2921
|
-
return { bindingName: "" };
|
|
2922
|
-
}
|
|
2923
|
-
|
|
2924
|
-
export const StorageGetUrlRequest: MessageFns<StorageGetUrlRequest> = {
|
|
2925
|
-
encode(message: StorageGetUrlRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2926
|
-
if (message.bindingName !== "") {
|
|
2927
|
-
writer.uint32(10).string(message.bindingName);
|
|
2928
|
-
}
|
|
2929
|
-
return writer;
|
|
2930
|
-
},
|
|
2931
|
-
|
|
2932
|
-
decode(input: BinaryReader | Uint8Array, length?: number): StorageGetUrlRequest {
|
|
2933
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2934
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2935
|
-
const message = createBaseStorageGetUrlRequest();
|
|
2936
|
-
while (reader.pos < end) {
|
|
2937
|
-
const tag = reader.uint32();
|
|
2938
|
-
switch (tag >>> 3) {
|
|
2939
|
-
case 1: {
|
|
2940
|
-
if (tag !== 10) {
|
|
2941
|
-
break;
|
|
2942
|
-
}
|
|
2943
|
-
|
|
2944
|
-
message.bindingName = reader.string();
|
|
2945
|
-
continue;
|
|
2946
|
-
}
|
|
2947
|
-
}
|
|
2948
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2949
|
-
break;
|
|
2950
|
-
}
|
|
2951
|
-
reader.skip(tag & 7);
|
|
2952
|
-
}
|
|
2953
|
-
return message;
|
|
2954
|
-
},
|
|
2955
|
-
|
|
2956
|
-
fromJSON(object: any): StorageGetUrlRequest {
|
|
2957
|
-
return {
|
|
2958
|
-
bindingName: isSet(object.bindingName)
|
|
2959
|
-
? globalThis.String(object.bindingName)
|
|
2960
|
-
: isSet(object.binding_name)
|
|
2961
|
-
? globalThis.String(object.binding_name)
|
|
2962
|
-
: "",
|
|
2963
|
-
};
|
|
2964
|
-
},
|
|
2965
|
-
|
|
2966
|
-
toJSON(message: StorageGetUrlRequest): unknown {
|
|
2967
|
-
const obj: any = {};
|
|
2968
|
-
if (message.bindingName !== "") {
|
|
2969
|
-
obj.bindingName = message.bindingName;
|
|
2970
|
-
}
|
|
2971
|
-
return obj;
|
|
2972
|
-
},
|
|
2973
|
-
|
|
2974
|
-
create(base?: DeepPartial<StorageGetUrlRequest>): StorageGetUrlRequest {
|
|
2975
|
-
return StorageGetUrlRequest.fromPartial(base ?? {});
|
|
2976
|
-
},
|
|
2977
|
-
fromPartial(object: DeepPartial<StorageGetUrlRequest>): StorageGetUrlRequest {
|
|
2978
|
-
const message = createBaseStorageGetUrlRequest();
|
|
2979
|
-
message.bindingName = object.bindingName ?? "";
|
|
2980
|
-
return message;
|
|
2981
|
-
},
|
|
2982
|
-
};
|
|
2983
|
-
|
|
2984
|
-
function createBaseStorageGetUrlResponse(): StorageGetUrlResponse {
|
|
2985
|
-
return { url: "" };
|
|
2986
|
-
}
|
|
2987
|
-
|
|
2988
|
-
export const StorageGetUrlResponse: MessageFns<StorageGetUrlResponse> = {
|
|
2989
|
-
encode(message: StorageGetUrlResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2990
|
-
if (message.url !== "") {
|
|
2991
|
-
writer.uint32(10).string(message.url);
|
|
2992
|
-
}
|
|
2993
|
-
return writer;
|
|
2994
|
-
},
|
|
2995
|
-
|
|
2996
|
-
decode(input: BinaryReader | Uint8Array, length?: number): StorageGetUrlResponse {
|
|
2997
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2998
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2999
|
-
const message = createBaseStorageGetUrlResponse();
|
|
3000
|
-
while (reader.pos < end) {
|
|
3001
|
-
const tag = reader.uint32();
|
|
3002
|
-
switch (tag >>> 3) {
|
|
3003
|
-
case 1: {
|
|
3004
|
-
if (tag !== 10) {
|
|
3005
|
-
break;
|
|
3006
|
-
}
|
|
3007
|
-
|
|
3008
|
-
message.url = reader.string();
|
|
3009
|
-
continue;
|
|
3010
|
-
}
|
|
3011
|
-
}
|
|
3012
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
3013
|
-
break;
|
|
3014
|
-
}
|
|
3015
|
-
reader.skip(tag & 7);
|
|
3016
|
-
}
|
|
3017
|
-
return message;
|
|
3018
|
-
},
|
|
3019
|
-
|
|
3020
|
-
fromJSON(object: any): StorageGetUrlResponse {
|
|
3021
|
-
return { url: isSet(object.url) ? globalThis.String(object.url) : "" };
|
|
3022
|
-
},
|
|
3023
|
-
|
|
3024
|
-
toJSON(message: StorageGetUrlResponse): unknown {
|
|
3025
|
-
const obj: any = {};
|
|
3026
|
-
if (message.url !== "") {
|
|
3027
|
-
obj.url = message.url;
|
|
3028
|
-
}
|
|
3029
|
-
return obj;
|
|
3030
|
-
},
|
|
3031
|
-
|
|
3032
|
-
create(base?: DeepPartial<StorageGetUrlResponse>): StorageGetUrlResponse {
|
|
3033
|
-
return StorageGetUrlResponse.fromPartial(base ?? {});
|
|
3034
|
-
},
|
|
3035
|
-
fromPartial(object: DeepPartial<StorageGetUrlResponse>): StorageGetUrlResponse {
|
|
3036
|
-
const message = createBaseStorageGetUrlResponse();
|
|
3037
|
-
message.url = object.url ?? "";
|
|
3038
|
-
return message;
|
|
3039
|
-
},
|
|
3040
|
-
};
|
|
3041
|
-
|
|
3042
|
-
function createBaseStorageCopyRequest(): StorageCopyRequest {
|
|
3043
|
-
return { bindingName: "", fromPath: "", toPath: "" };
|
|
3044
|
-
}
|
|
3045
|
-
|
|
3046
|
-
export const StorageCopyRequest: MessageFns<StorageCopyRequest> = {
|
|
3047
|
-
encode(message: StorageCopyRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3048
|
-
if (message.bindingName !== "") {
|
|
3049
|
-
writer.uint32(10).string(message.bindingName);
|
|
3050
|
-
}
|
|
3051
|
-
if (message.fromPath !== "") {
|
|
3052
|
-
writer.uint32(18).string(message.fromPath);
|
|
3053
|
-
}
|
|
3054
|
-
if (message.toPath !== "") {
|
|
3055
|
-
writer.uint32(26).string(message.toPath);
|
|
3056
|
-
}
|
|
3057
|
-
return writer;
|
|
3058
|
-
},
|
|
3059
|
-
|
|
3060
|
-
decode(input: BinaryReader | Uint8Array, length?: number): StorageCopyRequest {
|
|
3061
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3062
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3063
|
-
const message = createBaseStorageCopyRequest();
|
|
3064
|
-
while (reader.pos < end) {
|
|
3065
|
-
const tag = reader.uint32();
|
|
3066
|
-
switch (tag >>> 3) {
|
|
3067
|
-
case 1: {
|
|
3068
|
-
if (tag !== 10) {
|
|
3069
|
-
break;
|
|
3070
|
-
}
|
|
3071
|
-
|
|
3072
|
-
message.bindingName = reader.string();
|
|
3073
|
-
continue;
|
|
3074
|
-
}
|
|
3075
|
-
case 2: {
|
|
3076
|
-
if (tag !== 18) {
|
|
3077
|
-
break;
|
|
3078
|
-
}
|
|
3079
|
-
|
|
3080
|
-
message.fromPath = reader.string();
|
|
3081
|
-
continue;
|
|
3082
|
-
}
|
|
3083
|
-
case 3: {
|
|
3084
|
-
if (tag !== 26) {
|
|
3085
|
-
break;
|
|
3086
|
-
}
|
|
3087
|
-
|
|
3088
|
-
message.toPath = reader.string();
|
|
3089
|
-
continue;
|
|
3090
|
-
}
|
|
3091
|
-
}
|
|
3092
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
3093
|
-
break;
|
|
3094
|
-
}
|
|
3095
|
-
reader.skip(tag & 7);
|
|
3096
|
-
}
|
|
3097
|
-
return message;
|
|
3098
|
-
},
|
|
3099
|
-
|
|
3100
|
-
fromJSON(object: any): StorageCopyRequest {
|
|
3101
|
-
return {
|
|
3102
|
-
bindingName: isSet(object.bindingName)
|
|
3103
|
-
? globalThis.String(object.bindingName)
|
|
3104
|
-
: isSet(object.binding_name)
|
|
3105
|
-
? globalThis.String(object.binding_name)
|
|
3106
|
-
: "",
|
|
3107
|
-
fromPath: isSet(object.fromPath)
|
|
3108
|
-
? globalThis.String(object.fromPath)
|
|
3109
|
-
: isSet(object.from_path)
|
|
3110
|
-
? globalThis.String(object.from_path)
|
|
3111
|
-
: "",
|
|
3112
|
-
toPath: isSet(object.toPath)
|
|
3113
|
-
? globalThis.String(object.toPath)
|
|
3114
|
-
: isSet(object.to_path)
|
|
3115
|
-
? globalThis.String(object.to_path)
|
|
3116
|
-
: "",
|
|
3117
|
-
};
|
|
3118
|
-
},
|
|
3119
|
-
|
|
3120
|
-
toJSON(message: StorageCopyRequest): unknown {
|
|
3121
|
-
const obj: any = {};
|
|
3122
|
-
if (message.bindingName !== "") {
|
|
3123
|
-
obj.bindingName = message.bindingName;
|
|
3124
|
-
}
|
|
3125
|
-
if (message.fromPath !== "") {
|
|
3126
|
-
obj.fromPath = message.fromPath;
|
|
3127
|
-
}
|
|
3128
|
-
if (message.toPath !== "") {
|
|
3129
|
-
obj.toPath = message.toPath;
|
|
3130
|
-
}
|
|
3131
|
-
return obj;
|
|
3132
|
-
},
|
|
3133
|
-
|
|
3134
|
-
create(base?: DeepPartial<StorageCopyRequest>): StorageCopyRequest {
|
|
3135
|
-
return StorageCopyRequest.fromPartial(base ?? {});
|
|
3136
|
-
},
|
|
3137
|
-
fromPartial(object: DeepPartial<StorageCopyRequest>): StorageCopyRequest {
|
|
3138
|
-
const message = createBaseStorageCopyRequest();
|
|
3139
|
-
message.bindingName = object.bindingName ?? "";
|
|
3140
|
-
message.fromPath = object.fromPath ?? "";
|
|
3141
|
-
message.toPath = object.toPath ?? "";
|
|
3142
|
-
return message;
|
|
3143
|
-
},
|
|
3144
|
-
};
|
|
3145
|
-
|
|
3146
|
-
function createBaseStorageRenameRequest(): StorageRenameRequest {
|
|
3147
|
-
return { bindingName: "", fromPath: "", toPath: "" };
|
|
3148
|
-
}
|
|
3149
|
-
|
|
3150
|
-
export const StorageRenameRequest: MessageFns<StorageRenameRequest> = {
|
|
3151
|
-
encode(message: StorageRenameRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3152
|
-
if (message.bindingName !== "") {
|
|
3153
|
-
writer.uint32(10).string(message.bindingName);
|
|
3154
|
-
}
|
|
3155
|
-
if (message.fromPath !== "") {
|
|
3156
|
-
writer.uint32(18).string(message.fromPath);
|
|
3157
|
-
}
|
|
3158
|
-
if (message.toPath !== "") {
|
|
3159
|
-
writer.uint32(26).string(message.toPath);
|
|
3160
|
-
}
|
|
3161
|
-
return writer;
|
|
3162
|
-
},
|
|
3163
|
-
|
|
3164
|
-
decode(input: BinaryReader | Uint8Array, length?: number): StorageRenameRequest {
|
|
3165
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3166
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3167
|
-
const message = createBaseStorageRenameRequest();
|
|
3168
|
-
while (reader.pos < end) {
|
|
3169
|
-
const tag = reader.uint32();
|
|
3170
|
-
switch (tag >>> 3) {
|
|
3171
|
-
case 1: {
|
|
3172
|
-
if (tag !== 10) {
|
|
3173
|
-
break;
|
|
3174
|
-
}
|
|
3175
|
-
|
|
3176
|
-
message.bindingName = reader.string();
|
|
3177
|
-
continue;
|
|
3178
|
-
}
|
|
3179
|
-
case 2: {
|
|
3180
|
-
if (tag !== 18) {
|
|
3181
|
-
break;
|
|
3182
|
-
}
|
|
3183
|
-
|
|
3184
|
-
message.fromPath = reader.string();
|
|
3185
|
-
continue;
|
|
3186
|
-
}
|
|
3187
|
-
case 3: {
|
|
3188
|
-
if (tag !== 26) {
|
|
3189
|
-
break;
|
|
3190
|
-
}
|
|
3191
|
-
|
|
3192
|
-
message.toPath = reader.string();
|
|
3193
|
-
continue;
|
|
3194
|
-
}
|
|
3195
|
-
}
|
|
3196
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
3197
|
-
break;
|
|
3198
|
-
}
|
|
3199
|
-
reader.skip(tag & 7);
|
|
3200
|
-
}
|
|
3201
|
-
return message;
|
|
3202
|
-
},
|
|
3203
|
-
|
|
3204
|
-
fromJSON(object: any): StorageRenameRequest {
|
|
3205
|
-
return {
|
|
3206
|
-
bindingName: isSet(object.bindingName)
|
|
3207
|
-
? globalThis.String(object.bindingName)
|
|
3208
|
-
: isSet(object.binding_name)
|
|
3209
|
-
? globalThis.String(object.binding_name)
|
|
3210
|
-
: "",
|
|
3211
|
-
fromPath: isSet(object.fromPath)
|
|
3212
|
-
? globalThis.String(object.fromPath)
|
|
3213
|
-
: isSet(object.from_path)
|
|
3214
|
-
? globalThis.String(object.from_path)
|
|
3215
|
-
: "",
|
|
3216
|
-
toPath: isSet(object.toPath)
|
|
3217
|
-
? globalThis.String(object.toPath)
|
|
3218
|
-
: isSet(object.to_path)
|
|
3219
|
-
? globalThis.String(object.to_path)
|
|
3220
|
-
: "",
|
|
3221
|
-
};
|
|
3222
|
-
},
|
|
3223
|
-
|
|
3224
|
-
toJSON(message: StorageRenameRequest): unknown {
|
|
3225
|
-
const obj: any = {};
|
|
3226
|
-
if (message.bindingName !== "") {
|
|
3227
|
-
obj.bindingName = message.bindingName;
|
|
3228
|
-
}
|
|
3229
|
-
if (message.fromPath !== "") {
|
|
3230
|
-
obj.fromPath = message.fromPath;
|
|
3231
|
-
}
|
|
3232
|
-
if (message.toPath !== "") {
|
|
3233
|
-
obj.toPath = message.toPath;
|
|
3234
|
-
}
|
|
3235
|
-
return obj;
|
|
3236
|
-
},
|
|
3237
|
-
|
|
3238
|
-
create(base?: DeepPartial<StorageRenameRequest>): StorageRenameRequest {
|
|
3239
|
-
return StorageRenameRequest.fromPartial(base ?? {});
|
|
3240
|
-
},
|
|
3241
|
-
fromPartial(object: DeepPartial<StorageRenameRequest>): StorageRenameRequest {
|
|
3242
|
-
const message = createBaseStorageRenameRequest();
|
|
3243
|
-
message.bindingName = object.bindingName ?? "";
|
|
3244
|
-
message.fromPath = object.fromPath ?? "";
|
|
3245
|
-
message.toPath = object.toPath ?? "";
|
|
3246
|
-
return message;
|
|
3247
|
-
},
|
|
3248
|
-
};
|
|
3249
|
-
|
|
3250
|
-
function createBaseStorageSignedUrlRequest(): StorageSignedUrlRequest {
|
|
3251
|
-
return { bindingName: "", path: "", httpMethod: 0, expirationTime: undefined };
|
|
3252
|
-
}
|
|
3253
|
-
|
|
3254
|
-
export const StorageSignedUrlRequest: MessageFns<StorageSignedUrlRequest> = {
|
|
3255
|
-
encode(message: StorageSignedUrlRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3256
|
-
if (message.bindingName !== "") {
|
|
3257
|
-
writer.uint32(10).string(message.bindingName);
|
|
3258
|
-
}
|
|
3259
|
-
if (message.path !== "") {
|
|
3260
|
-
writer.uint32(18).string(message.path);
|
|
3261
|
-
}
|
|
3262
|
-
if (message.httpMethod !== 0) {
|
|
3263
|
-
writer.uint32(24).int32(message.httpMethod);
|
|
3264
|
-
}
|
|
3265
|
-
if (message.expirationTime !== undefined) {
|
|
3266
|
-
Timestamp.encode(toTimestamp(message.expirationTime), writer.uint32(34).fork()).join();
|
|
3267
|
-
}
|
|
3268
|
-
return writer;
|
|
3269
|
-
},
|
|
3270
|
-
|
|
3271
|
-
decode(input: BinaryReader | Uint8Array, length?: number): StorageSignedUrlRequest {
|
|
3272
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3273
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3274
|
-
const message = createBaseStorageSignedUrlRequest();
|
|
3275
|
-
while (reader.pos < end) {
|
|
3276
|
-
const tag = reader.uint32();
|
|
3277
|
-
switch (tag >>> 3) {
|
|
3278
|
-
case 1: {
|
|
3279
|
-
if (tag !== 10) {
|
|
3280
|
-
break;
|
|
3281
|
-
}
|
|
3282
|
-
|
|
3283
|
-
message.bindingName = reader.string();
|
|
3284
|
-
continue;
|
|
3285
|
-
}
|
|
3286
|
-
case 2: {
|
|
3287
|
-
if (tag !== 18) {
|
|
3288
|
-
break;
|
|
3289
|
-
}
|
|
3290
|
-
|
|
3291
|
-
message.path = reader.string();
|
|
3292
|
-
continue;
|
|
3293
|
-
}
|
|
3294
|
-
case 3: {
|
|
3295
|
-
if (tag !== 24) {
|
|
3296
|
-
break;
|
|
3297
|
-
}
|
|
3298
|
-
|
|
3299
|
-
message.httpMethod = reader.int32() as any;
|
|
3300
|
-
continue;
|
|
3301
|
-
}
|
|
3302
|
-
case 4: {
|
|
3303
|
-
if (tag !== 34) {
|
|
3304
|
-
break;
|
|
3305
|
-
}
|
|
3306
|
-
|
|
3307
|
-
message.expirationTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
3308
|
-
continue;
|
|
3309
|
-
}
|
|
3310
|
-
}
|
|
3311
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
3312
|
-
break;
|
|
3313
|
-
}
|
|
3314
|
-
reader.skip(tag & 7);
|
|
3315
|
-
}
|
|
3316
|
-
return message;
|
|
3317
|
-
},
|
|
3318
|
-
|
|
3319
|
-
fromJSON(object: any): StorageSignedUrlRequest {
|
|
3320
|
-
return {
|
|
3321
|
-
bindingName: isSet(object.bindingName)
|
|
3322
|
-
? globalThis.String(object.bindingName)
|
|
3323
|
-
: isSet(object.binding_name)
|
|
3324
|
-
? globalThis.String(object.binding_name)
|
|
3325
|
-
: "",
|
|
3326
|
-
path: isSet(object.path) ? globalThis.String(object.path) : "",
|
|
3327
|
-
httpMethod: isSet(object.httpMethod)
|
|
3328
|
-
? storageHttpMethodFromJSON(object.httpMethod)
|
|
3329
|
-
: isSet(object.http_method)
|
|
3330
|
-
? storageHttpMethodFromJSON(object.http_method)
|
|
3331
|
-
: 0,
|
|
3332
|
-
expirationTime: isSet(object.expirationTime)
|
|
3333
|
-
? fromJsonTimestamp(object.expirationTime)
|
|
3334
|
-
: isSet(object.expiration_time)
|
|
3335
|
-
? fromJsonTimestamp(object.expiration_time)
|
|
3336
|
-
: undefined,
|
|
3337
|
-
};
|
|
3338
|
-
},
|
|
3339
|
-
|
|
3340
|
-
toJSON(message: StorageSignedUrlRequest): unknown {
|
|
3341
|
-
const obj: any = {};
|
|
3342
|
-
if (message.bindingName !== "") {
|
|
3343
|
-
obj.bindingName = message.bindingName;
|
|
3344
|
-
}
|
|
3345
|
-
if (message.path !== "") {
|
|
3346
|
-
obj.path = message.path;
|
|
3347
|
-
}
|
|
3348
|
-
if (message.httpMethod !== 0) {
|
|
3349
|
-
obj.httpMethod = storageHttpMethodToJSON(message.httpMethod);
|
|
3350
|
-
}
|
|
3351
|
-
if (message.expirationTime !== undefined) {
|
|
3352
|
-
obj.expirationTime = message.expirationTime.toISOString();
|
|
3353
|
-
}
|
|
3354
|
-
return obj;
|
|
3355
|
-
},
|
|
3356
|
-
|
|
3357
|
-
create(base?: DeepPartial<StorageSignedUrlRequest>): StorageSignedUrlRequest {
|
|
3358
|
-
return StorageSignedUrlRequest.fromPartial(base ?? {});
|
|
3359
|
-
},
|
|
3360
|
-
fromPartial(object: DeepPartial<StorageSignedUrlRequest>): StorageSignedUrlRequest {
|
|
3361
|
-
const message = createBaseStorageSignedUrlRequest();
|
|
3362
|
-
message.bindingName = object.bindingName ?? "";
|
|
3363
|
-
message.path = object.path ?? "";
|
|
3364
|
-
message.httpMethod = object.httpMethod ?? 0;
|
|
3365
|
-
message.expirationTime = object.expirationTime ?? undefined;
|
|
3366
|
-
return message;
|
|
3367
|
-
},
|
|
3368
|
-
};
|
|
3369
|
-
|
|
3370
|
-
function createBaseStorageSignedUrlResponse(): StorageSignedUrlResponse {
|
|
3371
|
-
return { url: "", headers: [] };
|
|
3372
|
-
}
|
|
3373
|
-
|
|
3374
|
-
export const StorageSignedUrlResponse: MessageFns<StorageSignedUrlResponse> = {
|
|
3375
|
-
encode(message: StorageSignedUrlResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3376
|
-
if (message.url !== "") {
|
|
3377
|
-
writer.uint32(10).string(message.url);
|
|
3378
|
-
}
|
|
3379
|
-
for (const v of message.headers) {
|
|
3380
|
-
StorageHttpHeader.encode(v!, writer.uint32(18).fork()).join();
|
|
3381
|
-
}
|
|
3382
|
-
return writer;
|
|
3383
|
-
},
|
|
3384
|
-
|
|
3385
|
-
decode(input: BinaryReader | Uint8Array, length?: number): StorageSignedUrlResponse {
|
|
3386
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3387
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3388
|
-
const message = createBaseStorageSignedUrlResponse();
|
|
3389
|
-
while (reader.pos < end) {
|
|
3390
|
-
const tag = reader.uint32();
|
|
3391
|
-
switch (tag >>> 3) {
|
|
3392
|
-
case 1: {
|
|
3393
|
-
if (tag !== 10) {
|
|
3394
|
-
break;
|
|
3395
|
-
}
|
|
3396
|
-
|
|
3397
|
-
message.url = reader.string();
|
|
3398
|
-
continue;
|
|
3399
|
-
}
|
|
3400
|
-
case 2: {
|
|
3401
|
-
if (tag !== 18) {
|
|
3402
|
-
break;
|
|
3403
|
-
}
|
|
3404
|
-
|
|
3405
|
-
message.headers.push(StorageHttpHeader.decode(reader, reader.uint32()));
|
|
3406
|
-
continue;
|
|
3407
|
-
}
|
|
3408
|
-
}
|
|
3409
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
3410
|
-
break;
|
|
3411
|
-
}
|
|
3412
|
-
reader.skip(tag & 7);
|
|
3413
|
-
}
|
|
3414
|
-
return message;
|
|
3415
|
-
},
|
|
3416
|
-
|
|
3417
|
-
fromJSON(object: any): StorageSignedUrlResponse {
|
|
3418
|
-
return {
|
|
3419
|
-
url: isSet(object.url) ? globalThis.String(object.url) : "",
|
|
3420
|
-
headers: globalThis.Array.isArray(object?.headers)
|
|
3421
|
-
? object.headers.map((e: any) => StorageHttpHeader.fromJSON(e))
|
|
3422
|
-
: [],
|
|
3423
|
-
};
|
|
3424
|
-
},
|
|
3425
|
-
|
|
3426
|
-
toJSON(message: StorageSignedUrlResponse): unknown {
|
|
3427
|
-
const obj: any = {};
|
|
3428
|
-
if (message.url !== "") {
|
|
3429
|
-
obj.url = message.url;
|
|
3430
|
-
}
|
|
3431
|
-
if (message.headers?.length) {
|
|
3432
|
-
obj.headers = message.headers.map((e) => StorageHttpHeader.toJSON(e));
|
|
3433
|
-
}
|
|
3434
|
-
return obj;
|
|
3435
|
-
},
|
|
3436
|
-
|
|
3437
|
-
create(base?: DeepPartial<StorageSignedUrlResponse>): StorageSignedUrlResponse {
|
|
3438
|
-
return StorageSignedUrlResponse.fromPartial(base ?? {});
|
|
3439
|
-
},
|
|
3440
|
-
fromPartial(object: DeepPartial<StorageSignedUrlResponse>): StorageSignedUrlResponse {
|
|
3441
|
-
const message = createBaseStorageSignedUrlResponse();
|
|
3442
|
-
message.url = object.url ?? "";
|
|
3443
|
-
message.headers = object.headers?.map((e) => StorageHttpHeader.fromPartial(e)) || [];
|
|
3444
|
-
return message;
|
|
3445
|
-
},
|
|
3446
|
-
};
|
|
3447
|
-
|
|
3448
|
-
/** Service to interact with Storage bindings. */
|
|
3449
|
-
export type StorageServiceDefinition = typeof StorageServiceDefinition;
|
|
3450
|
-
export const StorageServiceDefinition = {
|
|
3451
|
-
name: "StorageService",
|
|
3452
|
-
fullName: "alien_bindings.storage.StorageService",
|
|
3453
|
-
methods: {
|
|
3454
|
-
/**
|
|
3455
|
-
* Retrieves data for a given object in a storage binding, with options.
|
|
3456
|
-
* The first part of the stream will be GetResponsePart.Metadata, followed by GetResponsePart.ChunkData.
|
|
3457
|
-
*/
|
|
3458
|
-
get: {
|
|
3459
|
-
name: "Get",
|
|
3460
|
-
requestType: StorageGetRequest as typeof StorageGetRequest,
|
|
3461
|
-
requestStream: false,
|
|
3462
|
-
responseType: GetResponsePart as typeof GetResponsePart,
|
|
3463
|
-
responseStream: true,
|
|
3464
|
-
options: {},
|
|
3465
|
-
},
|
|
3466
|
-
/**
|
|
3467
|
-
* Uploads data to a storage binding using a stream.
|
|
3468
|
-
* The first chunk in the stream must be metadata including PutMultipartOptions.
|
|
3469
|
-
*/
|
|
3470
|
-
putMultipart: {
|
|
3471
|
-
name: "PutMultipart",
|
|
3472
|
-
requestType: StoragePutMultipartChunkRequest as typeof StoragePutMultipartChunkRequest,
|
|
3473
|
-
requestStream: true,
|
|
3474
|
-
responseType: StoragePutResponse as typeof StoragePutResponse,
|
|
3475
|
-
responseStream: false,
|
|
3476
|
-
options: {},
|
|
3477
|
-
},
|
|
3478
|
-
/** Uploads data to a storage binding in a single message, with PutOptions. */
|
|
3479
|
-
put: {
|
|
3480
|
-
name: "Put",
|
|
3481
|
-
requestType: StoragePutRequest as typeof StoragePutRequest,
|
|
3482
|
-
requestStream: false,
|
|
3483
|
-
responseType: StoragePutResponse as typeof StoragePutResponse,
|
|
3484
|
-
responseStream: false,
|
|
3485
|
-
options: {},
|
|
3486
|
-
},
|
|
3487
|
-
/** Deletes an object from a storage binding. */
|
|
3488
|
-
delete: {
|
|
3489
|
-
name: "Delete",
|
|
3490
|
-
requestType: StorageDeleteRequest as typeof StorageDeleteRequest,
|
|
3491
|
-
requestStream: false,
|
|
3492
|
-
responseType: StorageOperationResponse as typeof StorageOperationResponse,
|
|
3493
|
-
responseStream: false,
|
|
3494
|
-
options: {},
|
|
3495
|
-
},
|
|
3496
|
-
/**
|
|
3497
|
-
* Lists objects in a storage binding, optionally filtered by a prefix and offset.
|
|
3498
|
-
* Returns a stream of object metadata.
|
|
3499
|
-
*/
|
|
3500
|
-
list: {
|
|
3501
|
-
name: "List",
|
|
3502
|
-
requestType: StorageListRequest as typeof StorageListRequest,
|
|
3503
|
-
requestStream: false,
|
|
3504
|
-
responseType: StorageObjectMeta as typeof StorageObjectMeta,
|
|
3505
|
-
responseStream: true,
|
|
3506
|
-
options: {},
|
|
3507
|
-
},
|
|
3508
|
-
/** Lists objects and common prefixes (directories) with a delimiter. */
|
|
3509
|
-
listWithDelimiter: {
|
|
3510
|
-
name: "ListWithDelimiter",
|
|
3511
|
-
requestType: StorageListWithDelimiterRequest as typeof StorageListWithDelimiterRequest,
|
|
3512
|
-
requestStream: false,
|
|
3513
|
-
responseType: StorageListResultProto as typeof StorageListResultProto,
|
|
3514
|
-
responseStream: false,
|
|
3515
|
-
options: {},
|
|
3516
|
-
},
|
|
3517
|
-
/** Retrieves metadata for an object in a storage binding. */
|
|
3518
|
-
head: {
|
|
3519
|
-
name: "Head",
|
|
3520
|
-
requestType: StorageHeadRequest as typeof StorageHeadRequest,
|
|
3521
|
-
requestStream: false,
|
|
3522
|
-
responseType: StorageObjectMeta as typeof StorageObjectMeta,
|
|
3523
|
-
responseStream: false,
|
|
3524
|
-
options: {},
|
|
3525
|
-
},
|
|
3526
|
-
/** Gets the base directory path for a storage binding. */
|
|
3527
|
-
getBaseDir: {
|
|
3528
|
-
name: "GetBaseDir",
|
|
3529
|
-
requestType: StorageGetBaseDirRequest as typeof StorageGetBaseDirRequest,
|
|
3530
|
-
requestStream: false,
|
|
3531
|
-
responseType: StorageGetBaseDirResponse as typeof StorageGetBaseDirResponse,
|
|
3532
|
-
responseStream: false,
|
|
3533
|
-
options: {},
|
|
3534
|
-
},
|
|
3535
|
-
/** Gets the underlying URL for a storage binding. */
|
|
3536
|
-
getUrl: {
|
|
3537
|
-
name: "GetUrl",
|
|
3538
|
-
requestType: StorageGetUrlRequest as typeof StorageGetUrlRequest,
|
|
3539
|
-
requestStream: false,
|
|
3540
|
-
responseType: StorageGetUrlResponse as typeof StorageGetUrlResponse,
|
|
3541
|
-
responseStream: false,
|
|
3542
|
-
options: {},
|
|
3543
|
-
},
|
|
3544
|
-
/** Copies an object within the same storage binding. */
|
|
3545
|
-
copy: {
|
|
3546
|
-
name: "Copy",
|
|
3547
|
-
requestType: StorageCopyRequest as typeof StorageCopyRequest,
|
|
3548
|
-
requestStream: false,
|
|
3549
|
-
responseType: StorageOperationResponse as typeof StorageOperationResponse,
|
|
3550
|
-
responseStream: false,
|
|
3551
|
-
options: {},
|
|
3552
|
-
},
|
|
3553
|
-
/** Renames (moves) an object within the same storage binding. */
|
|
3554
|
-
rename: {
|
|
3555
|
-
name: "Rename",
|
|
3556
|
-
requestType: StorageRenameRequest as typeof StorageRenameRequest,
|
|
3557
|
-
requestStream: false,
|
|
3558
|
-
responseType: StorageOperationResponse as typeof StorageOperationResponse,
|
|
3559
|
-
responseStream: false,
|
|
3560
|
-
options: {},
|
|
3561
|
-
},
|
|
3562
|
-
/** Copies an object if the destination does not exist. */
|
|
3563
|
-
copyIfNotExists: {
|
|
3564
|
-
name: "CopyIfNotExists",
|
|
3565
|
-
requestType: StorageCopyRequest as typeof StorageCopyRequest,
|
|
3566
|
-
requestStream: false,
|
|
3567
|
-
responseType: StorageOperationResponse as typeof StorageOperationResponse,
|
|
3568
|
-
responseStream: false,
|
|
3569
|
-
options: {},
|
|
3570
|
-
},
|
|
3571
|
-
/** Renames (moves) an object if the destination does not exist. */
|
|
3572
|
-
renameIfNotExists: {
|
|
3573
|
-
name: "RenameIfNotExists",
|
|
3574
|
-
requestType: StorageRenameRequest as typeof StorageRenameRequest,
|
|
3575
|
-
requestStream: false,
|
|
3576
|
-
responseType: StorageOperationResponse as typeof StorageOperationResponse,
|
|
3577
|
-
responseStream: false,
|
|
3578
|
-
options: {},
|
|
3579
|
-
},
|
|
3580
|
-
/** Generates a signed URL for an object that allows access without authentication. */
|
|
3581
|
-
signedUrl: {
|
|
3582
|
-
name: "SignedUrl",
|
|
3583
|
-
requestType: StorageSignedUrlRequest as typeof StorageSignedUrlRequest,
|
|
3584
|
-
requestStream: false,
|
|
3585
|
-
responseType: StorageSignedUrlResponse as typeof StorageSignedUrlResponse,
|
|
3586
|
-
responseStream: false,
|
|
3587
|
-
options: {},
|
|
3588
|
-
},
|
|
3589
|
-
},
|
|
3590
|
-
} as const;
|
|
3591
|
-
|
|
3592
|
-
export interface StorageServiceImplementation<CallContextExt = {}> {
|
|
3593
|
-
/**
|
|
3594
|
-
* Retrieves data for a given object in a storage binding, with options.
|
|
3595
|
-
* The first part of the stream will be GetResponsePart.Metadata, followed by GetResponsePart.ChunkData.
|
|
3596
|
-
*/
|
|
3597
|
-
get(
|
|
3598
|
-
request: StorageGetRequest,
|
|
3599
|
-
context: CallContext & CallContextExt,
|
|
3600
|
-
): ServerStreamingMethodResult<DeepPartial<GetResponsePart>>;
|
|
3601
|
-
/**
|
|
3602
|
-
* Uploads data to a storage binding using a stream.
|
|
3603
|
-
* The first chunk in the stream must be metadata including PutMultipartOptions.
|
|
3604
|
-
*/
|
|
3605
|
-
putMultipart(
|
|
3606
|
-
request: AsyncIterable<StoragePutMultipartChunkRequest>,
|
|
3607
|
-
context: CallContext & CallContextExt,
|
|
3608
|
-
): Promise<DeepPartial<StoragePutResponse>>;
|
|
3609
|
-
/** Uploads data to a storage binding in a single message, with PutOptions. */
|
|
3610
|
-
put(request: StoragePutRequest, context: CallContext & CallContextExt): Promise<DeepPartial<StoragePutResponse>>;
|
|
3611
|
-
/** Deletes an object from a storage binding. */
|
|
3612
|
-
delete(
|
|
3613
|
-
request: StorageDeleteRequest,
|
|
3614
|
-
context: CallContext & CallContextExt,
|
|
3615
|
-
): Promise<DeepPartial<StorageOperationResponse>>;
|
|
3616
|
-
/**
|
|
3617
|
-
* Lists objects in a storage binding, optionally filtered by a prefix and offset.
|
|
3618
|
-
* Returns a stream of object metadata.
|
|
3619
|
-
*/
|
|
3620
|
-
list(
|
|
3621
|
-
request: StorageListRequest,
|
|
3622
|
-
context: CallContext & CallContextExt,
|
|
3623
|
-
): ServerStreamingMethodResult<DeepPartial<StorageObjectMeta>>;
|
|
3624
|
-
/** Lists objects and common prefixes (directories) with a delimiter. */
|
|
3625
|
-
listWithDelimiter(
|
|
3626
|
-
request: StorageListWithDelimiterRequest,
|
|
3627
|
-
context: CallContext & CallContextExt,
|
|
3628
|
-
): Promise<DeepPartial<StorageListResultProto>>;
|
|
3629
|
-
/** Retrieves metadata for an object in a storage binding. */
|
|
3630
|
-
head(request: StorageHeadRequest, context: CallContext & CallContextExt): Promise<DeepPartial<StorageObjectMeta>>;
|
|
3631
|
-
/** Gets the base directory path for a storage binding. */
|
|
3632
|
-
getBaseDir(
|
|
3633
|
-
request: StorageGetBaseDirRequest,
|
|
3634
|
-
context: CallContext & CallContextExt,
|
|
3635
|
-
): Promise<DeepPartial<StorageGetBaseDirResponse>>;
|
|
3636
|
-
/** Gets the underlying URL for a storage binding. */
|
|
3637
|
-
getUrl(
|
|
3638
|
-
request: StorageGetUrlRequest,
|
|
3639
|
-
context: CallContext & CallContextExt,
|
|
3640
|
-
): Promise<DeepPartial<StorageGetUrlResponse>>;
|
|
3641
|
-
/** Copies an object within the same storage binding. */
|
|
3642
|
-
copy(
|
|
3643
|
-
request: StorageCopyRequest,
|
|
3644
|
-
context: CallContext & CallContextExt,
|
|
3645
|
-
): Promise<DeepPartial<StorageOperationResponse>>;
|
|
3646
|
-
/** Renames (moves) an object within the same storage binding. */
|
|
3647
|
-
rename(
|
|
3648
|
-
request: StorageRenameRequest,
|
|
3649
|
-
context: CallContext & CallContextExt,
|
|
3650
|
-
): Promise<DeepPartial<StorageOperationResponse>>;
|
|
3651
|
-
/** Copies an object if the destination does not exist. */
|
|
3652
|
-
copyIfNotExists(
|
|
3653
|
-
request: StorageCopyRequest,
|
|
3654
|
-
context: CallContext & CallContextExt,
|
|
3655
|
-
): Promise<DeepPartial<StorageOperationResponse>>;
|
|
3656
|
-
/** Renames (moves) an object if the destination does not exist. */
|
|
3657
|
-
renameIfNotExists(
|
|
3658
|
-
request: StorageRenameRequest,
|
|
3659
|
-
context: CallContext & CallContextExt,
|
|
3660
|
-
): Promise<DeepPartial<StorageOperationResponse>>;
|
|
3661
|
-
/** Generates a signed URL for an object that allows access without authentication. */
|
|
3662
|
-
signedUrl(
|
|
3663
|
-
request: StorageSignedUrlRequest,
|
|
3664
|
-
context: CallContext & CallContextExt,
|
|
3665
|
-
): Promise<DeepPartial<StorageSignedUrlResponse>>;
|
|
3666
|
-
}
|
|
3667
|
-
|
|
3668
|
-
export interface StorageServiceClient<CallOptionsExt = {}> {
|
|
3669
|
-
/**
|
|
3670
|
-
* Retrieves data for a given object in a storage binding, with options.
|
|
3671
|
-
* The first part of the stream will be GetResponsePart.Metadata, followed by GetResponsePart.ChunkData.
|
|
3672
|
-
*/
|
|
3673
|
-
get(request: DeepPartial<StorageGetRequest>, options?: CallOptions & CallOptionsExt): AsyncIterable<GetResponsePart>;
|
|
3674
|
-
/**
|
|
3675
|
-
* Uploads data to a storage binding using a stream.
|
|
3676
|
-
* The first chunk in the stream must be metadata including PutMultipartOptions.
|
|
3677
|
-
*/
|
|
3678
|
-
putMultipart(
|
|
3679
|
-
request: AsyncIterable<DeepPartial<StoragePutMultipartChunkRequest>>,
|
|
3680
|
-
options?: CallOptions & CallOptionsExt,
|
|
3681
|
-
): Promise<StoragePutResponse>;
|
|
3682
|
-
/** Uploads data to a storage binding in a single message, with PutOptions. */
|
|
3683
|
-
put(request: DeepPartial<StoragePutRequest>, options?: CallOptions & CallOptionsExt): Promise<StoragePutResponse>;
|
|
3684
|
-
/** Deletes an object from a storage binding. */
|
|
3685
|
-
delete(
|
|
3686
|
-
request: DeepPartial<StorageDeleteRequest>,
|
|
3687
|
-
options?: CallOptions & CallOptionsExt,
|
|
3688
|
-
): Promise<StorageOperationResponse>;
|
|
3689
|
-
/**
|
|
3690
|
-
* Lists objects in a storage binding, optionally filtered by a prefix and offset.
|
|
3691
|
-
* Returns a stream of object metadata.
|
|
3692
|
-
*/
|
|
3693
|
-
list(
|
|
3694
|
-
request: DeepPartial<StorageListRequest>,
|
|
3695
|
-
options?: CallOptions & CallOptionsExt,
|
|
3696
|
-
): AsyncIterable<StorageObjectMeta>;
|
|
3697
|
-
/** Lists objects and common prefixes (directories) with a delimiter. */
|
|
3698
|
-
listWithDelimiter(
|
|
3699
|
-
request: DeepPartial<StorageListWithDelimiterRequest>,
|
|
3700
|
-
options?: CallOptions & CallOptionsExt,
|
|
3701
|
-
): Promise<StorageListResultProto>;
|
|
3702
|
-
/** Retrieves metadata for an object in a storage binding. */
|
|
3703
|
-
head(request: DeepPartial<StorageHeadRequest>, options?: CallOptions & CallOptionsExt): Promise<StorageObjectMeta>;
|
|
3704
|
-
/** Gets the base directory path for a storage binding. */
|
|
3705
|
-
getBaseDir(
|
|
3706
|
-
request: DeepPartial<StorageGetBaseDirRequest>,
|
|
3707
|
-
options?: CallOptions & CallOptionsExt,
|
|
3708
|
-
): Promise<StorageGetBaseDirResponse>;
|
|
3709
|
-
/** Gets the underlying URL for a storage binding. */
|
|
3710
|
-
getUrl(
|
|
3711
|
-
request: DeepPartial<StorageGetUrlRequest>,
|
|
3712
|
-
options?: CallOptions & CallOptionsExt,
|
|
3713
|
-
): Promise<StorageGetUrlResponse>;
|
|
3714
|
-
/** Copies an object within the same storage binding. */
|
|
3715
|
-
copy(
|
|
3716
|
-
request: DeepPartial<StorageCopyRequest>,
|
|
3717
|
-
options?: CallOptions & CallOptionsExt,
|
|
3718
|
-
): Promise<StorageOperationResponse>;
|
|
3719
|
-
/** Renames (moves) an object within the same storage binding. */
|
|
3720
|
-
rename(
|
|
3721
|
-
request: DeepPartial<StorageRenameRequest>,
|
|
3722
|
-
options?: CallOptions & CallOptionsExt,
|
|
3723
|
-
): Promise<StorageOperationResponse>;
|
|
3724
|
-
/** Copies an object if the destination does not exist. */
|
|
3725
|
-
copyIfNotExists(
|
|
3726
|
-
request: DeepPartial<StorageCopyRequest>,
|
|
3727
|
-
options?: CallOptions & CallOptionsExt,
|
|
3728
|
-
): Promise<StorageOperationResponse>;
|
|
3729
|
-
/** Renames (moves) an object if the destination does not exist. */
|
|
3730
|
-
renameIfNotExists(
|
|
3731
|
-
request: DeepPartial<StorageRenameRequest>,
|
|
3732
|
-
options?: CallOptions & CallOptionsExt,
|
|
3733
|
-
): Promise<StorageOperationResponse>;
|
|
3734
|
-
/** Generates a signed URL for an object that allows access without authentication. */
|
|
3735
|
-
signedUrl(
|
|
3736
|
-
request: DeepPartial<StorageSignedUrlRequest>,
|
|
3737
|
-
options?: CallOptions & CallOptionsExt,
|
|
3738
|
-
): Promise<StorageSignedUrlResponse>;
|
|
3739
|
-
}
|
|
3740
|
-
|
|
3741
|
-
function bytesFromBase64(b64: string): Uint8Array {
|
|
3742
|
-
if ((globalThis as any).Buffer) {
|
|
3743
|
-
return Uint8Array.from((globalThis as any).Buffer.from(b64, "base64"));
|
|
3744
|
-
} else {
|
|
3745
|
-
const bin = globalThis.atob(b64);
|
|
3746
|
-
const arr = new Uint8Array(bin.length);
|
|
3747
|
-
for (let i = 0; i < bin.length; ++i) {
|
|
3748
|
-
arr[i] = bin.charCodeAt(i);
|
|
3749
|
-
}
|
|
3750
|
-
return arr;
|
|
3751
|
-
}
|
|
3752
|
-
}
|
|
3753
|
-
|
|
3754
|
-
function base64FromBytes(arr: Uint8Array): string {
|
|
3755
|
-
if ((globalThis as any).Buffer) {
|
|
3756
|
-
return (globalThis as any).Buffer.from(arr).toString("base64");
|
|
3757
|
-
} else {
|
|
3758
|
-
const bin: string[] = [];
|
|
3759
|
-
arr.forEach((byte) => {
|
|
3760
|
-
bin.push(globalThis.String.fromCharCode(byte));
|
|
3761
|
-
});
|
|
3762
|
-
return globalThis.btoa(bin.join(""));
|
|
3763
|
-
}
|
|
3764
|
-
}
|
|
3765
|
-
|
|
3766
|
-
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
3767
|
-
|
|
3768
|
-
export type DeepPartial<T> = T extends Builtin ? T
|
|
3769
|
-
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
3770
|
-
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
3771
|
-
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
3772
|
-
: Partial<T>;
|
|
3773
|
-
|
|
3774
|
-
function toTimestamp(date: Date): Timestamp {
|
|
3775
|
-
const seconds = Math.trunc(date.getTime() / 1_000);
|
|
3776
|
-
const nanos = (date.getTime() % 1_000) * 1_000_000;
|
|
3777
|
-
return { seconds, nanos };
|
|
3778
|
-
}
|
|
3779
|
-
|
|
3780
|
-
function fromTimestamp(t: Timestamp): Date {
|
|
3781
|
-
let millis = (t.seconds || 0) * 1_000;
|
|
3782
|
-
millis += (t.nanos || 0) / 1_000_000;
|
|
3783
|
-
return new globalThis.Date(millis);
|
|
3784
|
-
}
|
|
3785
|
-
|
|
3786
|
-
function fromJsonTimestamp(o: any): Date {
|
|
3787
|
-
if (o instanceof globalThis.Date) {
|
|
3788
|
-
return o;
|
|
3789
|
-
} else if (typeof o === "string") {
|
|
3790
|
-
return new globalThis.Date(o);
|
|
3791
|
-
} else {
|
|
3792
|
-
return fromTimestamp(Timestamp.fromJSON(o));
|
|
3793
|
-
}
|
|
3794
|
-
}
|
|
3795
|
-
|
|
3796
|
-
function longToNumber(int64: { toString(): string }): number {
|
|
3797
|
-
const num = globalThis.Number(int64.toString());
|
|
3798
|
-
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
3799
|
-
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
3800
|
-
}
|
|
3801
|
-
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
3802
|
-
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
3803
|
-
}
|
|
3804
|
-
return num;
|
|
3805
|
-
}
|
|
3806
|
-
|
|
3807
|
-
function isSet(value: any): boolean {
|
|
3808
|
-
return value !== null && value !== undefined;
|
|
3809
|
-
}
|
|
3810
|
-
|
|
3811
|
-
export type ServerStreamingMethodResult<Response> = { [Symbol.asyncIterator](): AsyncIterator<Response, void> };
|
|
3812
|
-
|
|
3813
|
-
export interface MessageFns<T> {
|
|
3814
|
-
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
3815
|
-
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
3816
|
-
fromJSON(object: any): T;
|
|
3817
|
-
toJSON(message: T): unknown;
|
|
3818
|
-
create(base?: DeepPartial<T>): T;
|
|
3819
|
-
fromPartial(object: DeepPartial<T>): T;
|
|
3820
|
-
}
|