UNPKG

google-ads-api-client

Version:

A friendly and exhaustive client to the google-ads-api, code generated directly from google's published protobuf schema.

121 lines 5.33 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ApiKeysClient = void 0; const apikeys_1 = require("./apikeys"); const runtime_rpc_1 = require("@protobuf-ts/runtime-rpc"); /** * Manages the API keys associated with projects. * * @generated from protobuf service google.api.apikeys.v2.ApiKeys */ class ApiKeysClient { constructor(_transport) { this._transport = _transport; this.typeName = apikeys_1.ApiKeys.typeName; this.methods = apikeys_1.ApiKeys.methods; this.options = apikeys_1.ApiKeys.options; } /** * Creates a new API key. * * NOTE: Key is a global resource; hence the only supported value for * location is `global`. * * @generated from protobuf rpc: CreateKey(google.api.apikeys.v2.CreateKeyRequest) returns (google.longrunning.Operation); */ createKey(input, options) { const method = this.methods[0], opt = this._transport.mergeOptions(options); return (0, runtime_rpc_1.stackIntercept)("unary", this._transport, method, opt, input); } /** * Lists the API keys owned by a project. The key string of the API key * isn't included in the response. * * NOTE: Key is a global resource; hence the only supported value for * location is `global`. * * @generated from protobuf rpc: ListKeys(google.api.apikeys.v2.ListKeysRequest) returns (google.api.apikeys.v2.ListKeysResponse); */ listKeys(input, options) { const method = this.methods[1], opt = this._transport.mergeOptions(options); return (0, runtime_rpc_1.stackIntercept)("unary", this._transport, method, opt, input); } /** * Gets the metadata for an API key. The key string of the API key * isn't included in the response. * * NOTE: Key is a global resource; hence the only supported value for * location is `global`. * * @generated from protobuf rpc: GetKey(google.api.apikeys.v2.GetKeyRequest) returns (google.api.apikeys.v2.Key); */ getKey(input, options) { const method = this.methods[2], opt = this._transport.mergeOptions(options); return (0, runtime_rpc_1.stackIntercept)("unary", this._transport, method, opt, input); } /** * Get the key string for an API key. * * NOTE: Key is a global resource; hence the only supported value for * location is `global`. * * @generated from protobuf rpc: GetKeyString(google.api.apikeys.v2.GetKeyStringRequest) returns (google.api.apikeys.v2.GetKeyStringResponse); */ getKeyString(input, options) { const method = this.methods[3], opt = this._transport.mergeOptions(options); return (0, runtime_rpc_1.stackIntercept)("unary", this._transport, method, opt, input); } /** * Patches the modifiable fields of an API key. * The key string of the API key isn't included in the response. * * NOTE: Key is a global resource; hence the only supported value for * location is `global`. * * @generated from protobuf rpc: UpdateKey(google.api.apikeys.v2.UpdateKeyRequest) returns (google.longrunning.Operation); */ updateKey(input, options) { const method = this.methods[4], opt = this._transport.mergeOptions(options); return (0, runtime_rpc_1.stackIntercept)("unary", this._transport, method, opt, input); } /** * Deletes an API key. Deleted key can be retrieved within 30 days of * deletion. Afterward, key will be purged from the project. * * NOTE: Key is a global resource; hence the only supported value for * location is `global`. * * @generated from protobuf rpc: DeleteKey(google.api.apikeys.v2.DeleteKeyRequest) returns (google.longrunning.Operation); */ deleteKey(input, options) { const method = this.methods[5], opt = this._transport.mergeOptions(options); return (0, runtime_rpc_1.stackIntercept)("unary", this._transport, method, opt, input); } /** * Undeletes an API key which was deleted within 30 days. * * NOTE: Key is a global resource; hence the only supported value for * location is `global`. * * @generated from protobuf rpc: UndeleteKey(google.api.apikeys.v2.UndeleteKeyRequest) returns (google.longrunning.Operation); */ undeleteKey(input, options) { const method = this.methods[6], opt = this._transport.mergeOptions(options); return (0, runtime_rpc_1.stackIntercept)("unary", this._transport, method, opt, input); } /** * Find the parent project and resource name of the API * key that matches the key string in the request. If the API key has been * purged, resource name will not be set. * The service account must have the `apikeys.keys.lookup` permission * on the parent project. * * @generated from protobuf rpc: LookupKey(google.api.apikeys.v2.LookupKeyRequest) returns (google.api.apikeys.v2.LookupKeyResponse); */ lookupKey(input, options) { const method = this.methods[7], opt = this._transport.mergeOptions(options); return (0, runtime_rpc_1.stackIntercept)("unary", this._transport, method, opt, input); } } exports.ApiKeysClient = ApiKeysClient; //# sourceMappingURL=apikeys.client.js.map