1 | import { ServiceObject, MetadataCallback, SetMetadataResponse } from './nodejs-common/index.js';
|
2 | import { BaseMetadata, SetMetadataOptions } from './nodejs-common/service-object.js';
|
3 | import { Storage } from './storage.js';
|
4 | export interface HmacKeyOptions {
|
5 | projectId?: string;
|
6 | }
|
7 | export interface HmacKeyMetadata extends BaseMetadata {
|
8 | accessId?: string;
|
9 | etag?: string;
|
10 | projectId?: string;
|
11 | serviceAccountEmail?: string;
|
12 | state?: string;
|
13 | timeCreated?: string;
|
14 | updated?: string;
|
15 | }
|
16 | export interface SetHmacKeyMetadataOptions {
|
17 | |
18 |
|
19 |
|
20 | userProject?: string;
|
21 | }
|
22 | export interface SetHmacKeyMetadata {
|
23 | state?: 'ACTIVE' | 'INACTIVE';
|
24 | etag?: string;
|
25 | }
|
26 | export interface HmacKeyMetadataCallback {
|
27 | (err: Error | null, metadata?: HmacKeyMetadata, apiResponse?: unknown): void;
|
28 | }
|
29 | export type HmacKeyMetadataResponse = [HmacKeyMetadata, unknown];
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 | export declare class HmacKey extends ServiceObject<HmacKey, HmacKeyMetadata> {
|
49 | |
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 | storage: Storage;
|
56 | private instanceRetryValue?;
|
57 | |
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 | |
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 |
|
74 |
|
75 |
|
76 |
|
77 |
|
78 |
|
79 |
|
80 | constructor(storage: Storage, accessId: string, options?: HmacKeyOptions);
|
81 | /**
|
82 | * Set the metadata for this object.
|
83 | *
|
84 | * @param {object} metadata - The metadata to set on this object.
|
85 | * @param {object=} options - Configuration options.
|
86 | * @param {function=} callback - The callback function.
|
87 | * @param {?error} callback.err - An error returned while making this request.
|
88 | * @param {object} callback.apiResponse - The full API response.
|
89 | */
|
90 | setMetadata(metadata: HmacKeyMetadata, options?: SetMetadataOptions): Promise<SetMetadataResponse<HmacKeyMetadata>>;
|
91 | setMetadata(metadata: HmacKeyMetadata, callback: MetadataCallback<HmacKeyMetadata>): void;
|
92 | setMetadata(metadata: HmacKeyMetadata, options: SetMetadataOptions, callback: MetadataCallback<HmacKeyMetadata>): void;
|
93 | }
|