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.

153 lines 6.38 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ExperimentServiceClient = void 0; const experiment_service_1 = require("./experiment_service"); const runtime_rpc_1 = require("@protobuf-ts/runtime-rpc"); // Proto file describing the Experiment service. /** * Service to manage experiments. * * @generated from protobuf service google.ads.googleads.v11.services.ExperimentService */ class ExperimentServiceClient { constructor(_transport) { this._transport = _transport; this.typeName = experiment_service_1.ExperimentService.typeName; this.methods = experiment_service_1.ExperimentService.methods; this.options = experiment_service_1.ExperimentService.options; } /** * Creates, updates, or removes experiments. Operation statuses are returned. * * List of thrown errors: * [AuthenticationError]() * [AuthorizationError]() * [ExperimentError]() * [HeaderError]() * [InternalError]() * [QuotaError]() * [RequestError]() * * @generated from protobuf rpc: MutateExperiments(google.ads.googleads.v11.services.MutateExperimentsRequest) returns (google.ads.googleads.v11.services.MutateExperimentsResponse); */ mutateExperiments(input, options) { const method = this.methods[0], opt = this._transport.mergeOptions(options); return (0, runtime_rpc_1.stackIntercept)("unary", this._transport, method, opt, input); } /** * Immediately ends an experiment, changing the experiment's scheduled * end date and without waiting for end of day. End date is updated to be the * time of the request. * * List of thrown errors: * [AuthenticationError]() * [AuthorizationError]() * [ExperimentError]() * [HeaderError]() * [InternalError]() * [QuotaError]() * [RequestError]() * * @generated from protobuf rpc: EndExperiment(google.ads.googleads.v11.services.EndExperimentRequest) returns (google.protobuf.Empty); */ endExperiment(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 the last Experiment update (either * scheduling or promotion). * Supports standard list paging. * * List of thrown errors: * [AuthenticationError]() * [AuthorizationError]() * [HeaderError]() * [InternalError]() * [QuotaError]() * [RequestError]() * * @generated from protobuf rpc: ListExperimentAsyncErrors(google.ads.googleads.v11.services.ListExperimentAsyncErrorsRequest) returns (google.ads.googleads.v11.services.ListExperimentAsyncErrorsResponse); */ listExperimentAsyncErrors(input, options) { const method = this.methods[2], opt = this._transport.mergeOptions(options); return (0, runtime_rpc_1.stackIntercept)("unary", this._transport, method, opt, input); } /** * Graduates an experiment to a full campaign. * * List of thrown errors: * [AuthenticationError]() * [AuthorizationError]() * [ExperimentError]() * [HeaderError]() * [InternalError]() * [MutateError]() * [QuotaError]() * [RequestError]() * * @generated from protobuf rpc: GraduateExperiment(google.ads.googleads.v11.services.GraduateExperimentRequest) returns (google.protobuf.Empty); */ graduateExperiment(input, options) { const method = this.methods[3], opt = this._transport.mergeOptions(options); return (0, runtime_rpc_1.stackIntercept)("unary", this._transport, method, opt, input); } /** * Schedule an experiment. The in design campaign * will be converted into a real campaign (called the experiment campaign) * that will begin serving ads if successfully created. * * The experiment is scheduled immediately with status INITIALIZING. * This method returns a long running operation that tracks the forking of the * in design campaign. If the forking fails, a list of errors can be retrieved * using the ListExperimentAsyncErrors method. The operation's * metadata will be a string containing the resource name of the created * experiment. * * List of thrown errors: * [AuthenticationError]() * [AuthorizationError]() * [ExperimentError]() * [DatabaseError]() * [DateError]() * [DateRangeError]() * [FieldError]() * [HeaderError]() * [InternalError]() * [QuotaError]() * [RangeError]() * [RequestError]() * * @generated from protobuf rpc: ScheduleExperiment(google.ads.googleads.v11.services.ScheduleExperimentRequest) returns (google.longrunning.Operation); */ scheduleExperiment(input, options) { const method = this.methods[4], opt = this._transport.mergeOptions(options); return (0, runtime_rpc_1.stackIntercept)("unary", this._transport, method, opt, input); } /** * Promotes the trial campaign thus applying changes in the trial campaign * to the base campaign. * This method returns a long running operation that tracks the promotion of * the experiment campaign. If it fails, a list of errors can be retrieved * using the ListExperimentAsyncErrors method. The operation's * metadata will be a string containing the resource name of the created * experiment. * * List of thrown errors: * [AuthenticationError]() * [AuthorizationError]() * [ExperimentError]() * [HeaderError]() * [InternalError]() * [QuotaError]() * [RequestError]() * * @generated from protobuf rpc: PromoteExperiment(google.ads.googleads.v11.services.PromoteExperimentRequest) returns (google.longrunning.Operation); */ promoteExperiment(input, options) { const method = this.methods[5], opt = this._transport.mergeOptions(options); return (0, runtime_rpc_1.stackIntercept)("unary", this._transport, method, opt, input); } } exports.ExperimentServiceClient = ExperimentServiceClient; //# sourceMappingURL=experiment_service.client.js.map