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.

88 lines 3.88 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CampaignDraftServiceClient = void 0; const campaign_draft_service_1 = require("./campaign_draft_service"); const runtime_rpc_1 = require("@protobuf-ts/runtime-rpc"); // Proto file describing the Campaign Draft service. /** * Service to manage campaign drafts. * * @generated from protobuf service google.ads.googleads.v11.services.CampaignDraftService */ class CampaignDraftServiceClient { constructor(_transport) { this._transport = _transport; this.typeName = campaign_draft_service_1.CampaignDraftService.typeName; this.methods = campaign_draft_service_1.CampaignDraftService.methods; this.options = campaign_draft_service_1.CampaignDraftService.options; } /** * Creates, updates, or removes campaign drafts. Operation statuses are * returned. * * List of thrown errors: * [AuthenticationError]() * [AuthorizationError]() * [CampaignDraftError]() * [DatabaseError]() * [FieldError]() * [HeaderError]() * [InternalError]() * [MutateError]() * [QuotaError]() * [RequestError]() * * @generated from protobuf rpc: MutateCampaignDrafts(google.ads.googleads.v11.services.MutateCampaignDraftsRequest) returns (google.ads.googleads.v11.services.MutateCampaignDraftsResponse); */ mutateCampaignDrafts(input, options) { const method = this.methods[0], opt = this._transport.mergeOptions(options); return (0, runtime_rpc_1.stackIntercept)("unary", this._transport, method, opt, input); } /** * Promotes the changes in a draft back to the base campaign. * * This method returns a Long Running Operation (LRO) indicating if the * Promote is done. Use [Operations.GetOperation] to poll the LRO until it * is done. Only a done status is returned in the response. See the status * in the Campaign Draft resource to determine if the promotion was * successful. If the LRO failed, use * [CampaignDraftService.ListCampaignDraftAsyncErrors][google.ads.googleads.v11.services.CampaignDraftService.ListCampaignDraftAsyncErrors] to view the list of * error reasons. * * List of thrown errors: * [AuthenticationError]() * [AuthorizationError]() * [CampaignDraftError]() * [HeaderError]() * [InternalError]() * [QuotaError]() * [RequestError]() * * @generated from protobuf rpc: PromoteCampaignDraft(google.ads.googleads.v11.services.PromoteCampaignDraftRequest) returns (google.longrunning.Operation); */ promoteCampaignDraft(input, options) { const method = this.methods[1], opt = this._transport.mergeOptions(options); return (0, runtime_rpc_1.stackIntercept)("unary", this._transport, method, opt, input); } /** * Returns all errors that occurred during CampaignDraft promote. Throws an * error if called before campaign draft is promoted. * Supports standard list paging. * * List of thrown errors: * [AuthenticationError]() * [AuthorizationError]() * [HeaderError]() * [InternalError]() * [QuotaError]() * [RequestError]() * * @generated from protobuf rpc: ListCampaignDraftAsyncErrors(google.ads.googleads.v11.services.ListCampaignDraftAsyncErrorsRequest) returns (google.ads.googleads.v11.services.ListCampaignDraftAsyncErrorsResponse); */ listCampaignDraftAsyncErrors(input, options) { const method = this.methods[2], opt = this._transport.mergeOptions(options); return (0, runtime_rpc_1.stackIntercept)("unary", this._transport, method, opt, input); } } exports.CampaignDraftServiceClient = CampaignDraftServiceClient; //# sourceMappingURL=campaign_draft_service.client.js.map