google-ads-api-client
Version:
A friendly and exhaustive client to the google-ads-api, code generated directly from google's published protobuf schema.
452 lines (451 loc) • 19.9 kB
TypeScript
import { ServiceType } from "@protobuf-ts/runtime-rpc";
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
import type { IBinaryWriter } from "@protobuf-ts/runtime";
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
import type { IBinaryReader } from "@protobuf-ts/runtime";
import type { PartialMessage } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime";
import { Status } from "../../google/rpc/status";
import { Experiment } from "../resources/experiment";
import { FieldMask } from "../../google/protobuf/field_mask";
/**
* Request message for [ExperimentService.MutateExperiments][google.ads.googleads.v11.services.ExperimentService.MutateExperiments].
*
* @generated from protobuf message google.ads.googleads.v11.services.MutateExperimentsRequest
*/
export interface MutateExperimentsRequest {
/**
* Required. The ID of the customer whose experiments are being modified.
*
* @generated from protobuf field: string customer_id = 1;
*/
customerId: string;
/**
* Required. The list of operations to perform on individual experiments.
*
* @generated from protobuf field: repeated google.ads.googleads.v11.services.ExperimentOperation operations = 2;
*/
operations: ExperimentOperation[];
/**
* If true, successful operations will be carried out and invalid
* operations will return errors. If false, all operations will be carried
* out in one transaction if and only if they are all valid.
* Default is false.
*
* @generated from protobuf field: bool partial_failure = 3;
*/
partialFailure: boolean;
/**
* If true, the request is validated but not executed. Only errors are
* returned, not results.
*
* @generated from protobuf field: bool validate_only = 4;
*/
validateOnly: boolean;
}
/**
* A single operation on an experiment.
*
* @generated from protobuf message google.ads.googleads.v11.services.ExperimentOperation
*/
export interface ExperimentOperation {
/**
* FieldMask that determines which resource fields are modified in an update.
*
* @generated from protobuf field: google.protobuf.FieldMask update_mask = 4;
*/
updateMask?: FieldMask;
/**
* @generated from protobuf oneof: operation
*/
operation: {
oneofKind: "create";
/**
* Create operation
*
* @generated from protobuf field: google.ads.googleads.v11.resources.Experiment create = 1;
*/
create: Experiment;
} | {
oneofKind: "update";
/**
* Update operation: The experiment is expected to have a valid
* resource name.
*
* @generated from protobuf field: google.ads.googleads.v11.resources.Experiment update = 2;
*/
update: Experiment;
} | {
oneofKind: "remove";
/**
* Remove operation: The experiment is expected to have a valid
* resource name, in this format:
*
* `customers/{customer_id}/experiments/{campaign_experiment_id}`
*
* @generated from protobuf field: string remove = 3;
*/
remove: string;
} | {
oneofKind: undefined;
};
}
/**
* Response message for experiment mutate.
*
* @generated from protobuf message google.ads.googleads.v11.services.MutateExperimentsResponse
*/
export interface MutateExperimentsResponse {
/**
* Errors that pertain to operation failures in the partial failure mode.
* Returned only when partial_failure = true and all errors occur inside the
* operations. If any errors occur outside the operations (for example, auth
* errors), we return an RPC level error.
*
* @generated from protobuf field: google.rpc.Status partial_failure_error = 1;
*/
partialFailureError?: Status;
/**
* All results for the mutate.
*
* @generated from protobuf field: repeated google.ads.googleads.v11.services.MutateExperimentResult results = 2;
*/
results: MutateExperimentResult[];
}
/**
* The result for the campaign experiment mutate.
*
* @generated from protobuf message google.ads.googleads.v11.services.MutateExperimentResult
*/
export interface MutateExperimentResult {
/**
* Returned for successful operations.
*
* @generated from protobuf field: string resource_name = 1;
*/
resourceName: string;
}
/**
* Request message for [ExperimentService.EndExperiment][google.ads.googleads.v11.services.ExperimentService.EndExperiment].
*
* @generated from protobuf message google.ads.googleads.v11.services.EndExperimentRequest
*/
export interface EndExperimentRequest {
/**
* Required. The resource name of the campaign experiment to end.
*
* @generated from protobuf field: string experiment = 1;
*/
experiment: string;
/**
* If true, the request is validated but not executed. Only errors are
* returned, not results.
*
* @generated from protobuf field: bool validate_only = 2;
*/
validateOnly: boolean;
}
/**
* Request message for
* [ExperimentService.ListExperimentAsyncErrors][google.ads.googleads.v11.services.ExperimentService.ListExperimentAsyncErrors].
*
* @generated from protobuf message google.ads.googleads.v11.services.ListExperimentAsyncErrorsRequest
*/
export interface ListExperimentAsyncErrorsRequest {
/**
* Required. The name of the experiment from which to retrieve the async
* errors.
*
* @generated from protobuf field: string resource_name = 1;
*/
resourceName: string;
/**
* Token of the page to retrieve. If not specified, the first
* page of results will be returned. Use the value obtained from
* `next_page_token` in the previous response in order to request
* the next page of results.
*
* @generated from protobuf field: string page_token = 2;
*/
pageToken: string;
/**
* Number of elements to retrieve in a single page.
* When a page request is too large, the server may decide to
* further limit the number of returned resources.
* The maximum page size is 1000.
*
* @generated from protobuf field: int32 page_size = 3;
*/
pageSize: number;
}
/**
* Response message for
* [ExperimentService.ListExperimentAsyncErrors][google.ads.googleads.v11.services.ExperimentService.ListExperimentAsyncErrors].
*
* @generated from protobuf message google.ads.googleads.v11.services.ListExperimentAsyncErrorsResponse
*/
export interface ListExperimentAsyncErrorsResponse {
/**
* details of the errors when performing the asynchronous operation.
*
* @generated from protobuf field: repeated google.rpc.Status errors = 1;
*/
errors: Status[];
/**
* Pagination token used to retrieve the next page of results.
* Pass the content of this string as the `page_token` attribute of
* the next request. `next_page_token` is not returned for the last
* page.
*
* @generated from protobuf field: string next_page_token = 2;
*/
nextPageToken: string;
}
/**
* Request message for [ExperimentService.GraduateExperiment][google.ads.googleads.v11.services.ExperimentService.GraduateExperiment].
*
* @generated from protobuf message google.ads.googleads.v11.services.GraduateExperimentRequest
*/
export interface GraduateExperimentRequest {
/**
* Required. The experiment to be graduated.
*
* @generated from protobuf field: string experiment = 1;
*/
experiment: string;
/**
* Required. List of campaign budget mappings for graduation. Each campaign that
* appears here will graduate, and will be assigned a new budget that is
* paired with it in the mapping. The maximum size is one.
*
* @generated from protobuf field: repeated google.ads.googleads.v11.services.CampaignBudgetMapping campaign_budget_mappings = 2;
*/
campaignBudgetMappings: CampaignBudgetMapping[];
/**
* If true, the request is validated but not executed. Only errors are
* returned, not results.
*
* @generated from protobuf field: bool validate_only = 3;
*/
validateOnly: boolean;
}
/**
* The mapping of experiment campaign and budget to be graduated.
*
* @generated from protobuf message google.ads.googleads.v11.services.CampaignBudgetMapping
*/
export interface CampaignBudgetMapping {
/**
* Required. The experiment campaign to graduate.
*
* @generated from protobuf field: string experiment_campaign = 1;
*/
experimentCampaign: string;
/**
* Required. The budget that should be attached to the graduating experiment campaign.
*
* @generated from protobuf field: string campaign_budget = 2;
*/
campaignBudget: string;
}
/**
* Request message for [ExperimentService.ScheduleExperiment][google.ads.googleads.v11.services.ExperimentService.ScheduleExperiment].
*
* @generated from protobuf message google.ads.googleads.v11.services.ScheduleExperimentRequest
*/
export interface ScheduleExperimentRequest {
/**
* Required. The scheduled experiment.
*
* @generated from protobuf field: string resource_name = 1;
*/
resourceName: string;
/**
* If true, the request is validated but not executed. Only errors are
* returned, not results.
*
* @generated from protobuf field: bool validate_only = 2;
*/
validateOnly: boolean;
}
/**
* The metadata of the scheduled experiment.
*
* @generated from protobuf message google.ads.googleads.v11.services.ScheduleExperimentMetadata
*/
export interface ScheduleExperimentMetadata {
/**
* Required. The scheduled experiment.
*
* @generated from protobuf field: string experiment = 1;
*/
experiment: string;
}
/**
* Request message for [ExperimentService.PromoteExperiment][google.ads.googleads.v11.services.ExperimentService.PromoteExperiment].
*
* @generated from protobuf message google.ads.googleads.v11.services.PromoteExperimentRequest
*/
export interface PromoteExperimentRequest {
/**
* Required. The resource name of the experiment to promote.
*
* @generated from protobuf field: string resource_name = 1;
*/
resourceName: string;
/**
* If true, the request is validated but not executed. Only errors are
* returned, not results.
*
* @generated from protobuf field: bool validate_only = 2;
*/
validateOnly: boolean;
}
/**
* The metadata of the promoted experiment.
*
* @generated from protobuf message google.ads.googleads.v11.services.PromoteExperimentMetadata
*/
export interface PromoteExperimentMetadata {
/**
* Required. The promoted experiment.
*
* @generated from protobuf field: string experiment = 1;
*/
experiment: string;
}
declare class MutateExperimentsRequest$Type extends MessageType<MutateExperimentsRequest> {
constructor();
create(value?: PartialMessage<MutateExperimentsRequest>): MutateExperimentsRequest;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MutateExperimentsRequest): MutateExperimentsRequest;
internalBinaryWrite(message: MutateExperimentsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.MutateExperimentsRequest
*/
export declare const MutateExperimentsRequest: MutateExperimentsRequest$Type;
declare class ExperimentOperation$Type extends MessageType<ExperimentOperation> {
constructor();
create(value?: PartialMessage<ExperimentOperation>): ExperimentOperation;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExperimentOperation): ExperimentOperation;
internalBinaryWrite(message: ExperimentOperation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.ExperimentOperation
*/
export declare const ExperimentOperation: ExperimentOperation$Type;
declare class MutateExperimentsResponse$Type extends MessageType<MutateExperimentsResponse> {
constructor();
create(value?: PartialMessage<MutateExperimentsResponse>): MutateExperimentsResponse;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MutateExperimentsResponse): MutateExperimentsResponse;
internalBinaryWrite(message: MutateExperimentsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.MutateExperimentsResponse
*/
export declare const MutateExperimentsResponse: MutateExperimentsResponse$Type;
declare class MutateExperimentResult$Type extends MessageType<MutateExperimentResult> {
constructor();
create(value?: PartialMessage<MutateExperimentResult>): MutateExperimentResult;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MutateExperimentResult): MutateExperimentResult;
internalBinaryWrite(message: MutateExperimentResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.MutateExperimentResult
*/
export declare const MutateExperimentResult: MutateExperimentResult$Type;
declare class EndExperimentRequest$Type extends MessageType<EndExperimentRequest> {
constructor();
create(value?: PartialMessage<EndExperimentRequest>): EndExperimentRequest;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EndExperimentRequest): EndExperimentRequest;
internalBinaryWrite(message: EndExperimentRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.EndExperimentRequest
*/
export declare const EndExperimentRequest: EndExperimentRequest$Type;
declare class ListExperimentAsyncErrorsRequest$Type extends MessageType<ListExperimentAsyncErrorsRequest> {
constructor();
create(value?: PartialMessage<ListExperimentAsyncErrorsRequest>): ListExperimentAsyncErrorsRequest;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListExperimentAsyncErrorsRequest): ListExperimentAsyncErrorsRequest;
internalBinaryWrite(message: ListExperimentAsyncErrorsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.ListExperimentAsyncErrorsRequest
*/
export declare const ListExperimentAsyncErrorsRequest: ListExperimentAsyncErrorsRequest$Type;
declare class ListExperimentAsyncErrorsResponse$Type extends MessageType<ListExperimentAsyncErrorsResponse> {
constructor();
create(value?: PartialMessage<ListExperimentAsyncErrorsResponse>): ListExperimentAsyncErrorsResponse;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListExperimentAsyncErrorsResponse): ListExperimentAsyncErrorsResponse;
internalBinaryWrite(message: ListExperimentAsyncErrorsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.ListExperimentAsyncErrorsResponse
*/
export declare const ListExperimentAsyncErrorsResponse: ListExperimentAsyncErrorsResponse$Type;
declare class GraduateExperimentRequest$Type extends MessageType<GraduateExperimentRequest> {
constructor();
create(value?: PartialMessage<GraduateExperimentRequest>): GraduateExperimentRequest;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GraduateExperimentRequest): GraduateExperimentRequest;
internalBinaryWrite(message: GraduateExperimentRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.GraduateExperimentRequest
*/
export declare const GraduateExperimentRequest: GraduateExperimentRequest$Type;
declare class CampaignBudgetMapping$Type extends MessageType<CampaignBudgetMapping> {
constructor();
create(value?: PartialMessage<CampaignBudgetMapping>): CampaignBudgetMapping;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CampaignBudgetMapping): CampaignBudgetMapping;
internalBinaryWrite(message: CampaignBudgetMapping, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.CampaignBudgetMapping
*/
export declare const CampaignBudgetMapping: CampaignBudgetMapping$Type;
declare class ScheduleExperimentRequest$Type extends MessageType<ScheduleExperimentRequest> {
constructor();
create(value?: PartialMessage<ScheduleExperimentRequest>): ScheduleExperimentRequest;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ScheduleExperimentRequest): ScheduleExperimentRequest;
internalBinaryWrite(message: ScheduleExperimentRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.ScheduleExperimentRequest
*/
export declare const ScheduleExperimentRequest: ScheduleExperimentRequest$Type;
declare class ScheduleExperimentMetadata$Type extends MessageType<ScheduleExperimentMetadata> {
constructor();
create(value?: PartialMessage<ScheduleExperimentMetadata>): ScheduleExperimentMetadata;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ScheduleExperimentMetadata): ScheduleExperimentMetadata;
internalBinaryWrite(message: ScheduleExperimentMetadata, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.ScheduleExperimentMetadata
*/
export declare const ScheduleExperimentMetadata: ScheduleExperimentMetadata$Type;
declare class PromoteExperimentRequest$Type extends MessageType<PromoteExperimentRequest> {
constructor();
create(value?: PartialMessage<PromoteExperimentRequest>): PromoteExperimentRequest;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PromoteExperimentRequest): PromoteExperimentRequest;
internalBinaryWrite(message: PromoteExperimentRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.PromoteExperimentRequest
*/
export declare const PromoteExperimentRequest: PromoteExperimentRequest$Type;
declare class PromoteExperimentMetadata$Type extends MessageType<PromoteExperimentMetadata> {
constructor();
create(value?: PartialMessage<PromoteExperimentMetadata>): PromoteExperimentMetadata;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PromoteExperimentMetadata): PromoteExperimentMetadata;
internalBinaryWrite(message: PromoteExperimentMetadata, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.PromoteExperimentMetadata
*/
export declare const PromoteExperimentMetadata: PromoteExperimentMetadata$Type;
/**
* @generated ServiceType for protobuf service google.ads.googleads.v11.services.ExperimentService
*/
export declare const ExperimentService: ServiceType;
export {};