google-ads-api-client
Version:
A friendly and exhaustive client to the google-ads-api, code generated directly from google's published protobuf schema.
189 lines (188 loc) • 8.32 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 { CampaignFeed } from "../resources/campaign_feed";
import { FieldMask } from "../../google/protobuf/field_mask";
import { ResponseContentTypeEnum_ResponseContentType } from "../enums/response_content_type";
/**
* Request message for [CampaignFeedService.MutateCampaignFeeds][google.ads.googleads.v11.services.CampaignFeedService.MutateCampaignFeeds].
*
* @generated from protobuf message google.ads.googleads.v11.services.MutateCampaignFeedsRequest
*/
export interface MutateCampaignFeedsRequest {
/**
* Required. The ID of the customer whose campaign feeds are being modified.
*
* @generated from protobuf field: string customer_id = 1;
*/
customerId: string;
/**
* Required. The list of operations to perform on individual campaign feeds.
*
* @generated from protobuf field: repeated google.ads.googleads.v11.services.CampaignFeedOperation operations = 2;
*/
operations: CampaignFeedOperation[];
/**
* 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;
/**
* The response content type setting. Determines whether the mutable resource
* or just the resource name should be returned post mutation.
*
* @generated from protobuf field: google.ads.googleads.v11.enums.ResponseContentTypeEnum.ResponseContentType response_content_type = 5;
*/
responseContentType: ResponseContentTypeEnum_ResponseContentType;
}
/**
* A single operation (create, update, remove) on a campaign feed.
*
* @generated from protobuf message google.ads.googleads.v11.services.CampaignFeedOperation
*/
export interface CampaignFeedOperation {
/**
* 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: No resource name is expected for the new campaign feed.
*
* @generated from protobuf field: google.ads.googleads.v11.resources.CampaignFeed create = 1;
*/
create: CampaignFeed;
} | {
oneofKind: "update";
/**
* Update operation: The campaign feed is expected to have a valid resource
* name.
*
* @generated from protobuf field: google.ads.googleads.v11.resources.CampaignFeed update = 2;
*/
update: CampaignFeed;
} | {
oneofKind: "remove";
/**
* Remove operation: A resource name for the removed campaign feed is
* expected, in this format:
*
* `customers/{customer_id}/campaignFeeds/{campaign_id}~{feed_id}`
*
* @generated from protobuf field: string remove = 3;
*/
remove: string;
} | {
oneofKind: undefined;
};
}
/**
* Response message for a campaign feed mutate.
*
* @generated from protobuf message google.ads.googleads.v11.services.MutateCampaignFeedsResponse
*/
export interface MutateCampaignFeedsResponse {
/**
* 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 = 3;
*/
partialFailureError?: Status;
/**
* All results for the mutate.
*
* @generated from protobuf field: repeated google.ads.googleads.v11.services.MutateCampaignFeedResult results = 2;
*/
results: MutateCampaignFeedResult[];
}
/**
* The result for the campaign feed mutate.
*
* @generated from protobuf message google.ads.googleads.v11.services.MutateCampaignFeedResult
*/
export interface MutateCampaignFeedResult {
/**
* Returned for successful operations.
*
* @generated from protobuf field: string resource_name = 1;
*/
resourceName: string;
/**
* The mutated campaign feed with only mutable fields after mutate. The field
* will only be returned when response_content_type is set to
* "MUTABLE_RESOURCE".
*
* @generated from protobuf field: google.ads.googleads.v11.resources.CampaignFeed campaign_feed = 2;
*/
campaignFeed?: CampaignFeed;
}
declare class MutateCampaignFeedsRequest$Type extends MessageType<MutateCampaignFeedsRequest> {
constructor();
create(value?: PartialMessage<MutateCampaignFeedsRequest>): MutateCampaignFeedsRequest;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MutateCampaignFeedsRequest): MutateCampaignFeedsRequest;
internalBinaryWrite(message: MutateCampaignFeedsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.MutateCampaignFeedsRequest
*/
export declare const MutateCampaignFeedsRequest: MutateCampaignFeedsRequest$Type;
declare class CampaignFeedOperation$Type extends MessageType<CampaignFeedOperation> {
constructor();
create(value?: PartialMessage<CampaignFeedOperation>): CampaignFeedOperation;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CampaignFeedOperation): CampaignFeedOperation;
internalBinaryWrite(message: CampaignFeedOperation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.CampaignFeedOperation
*/
export declare const CampaignFeedOperation: CampaignFeedOperation$Type;
declare class MutateCampaignFeedsResponse$Type extends MessageType<MutateCampaignFeedsResponse> {
constructor();
create(value?: PartialMessage<MutateCampaignFeedsResponse>): MutateCampaignFeedsResponse;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MutateCampaignFeedsResponse): MutateCampaignFeedsResponse;
internalBinaryWrite(message: MutateCampaignFeedsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.MutateCampaignFeedsResponse
*/
export declare const MutateCampaignFeedsResponse: MutateCampaignFeedsResponse$Type;
declare class MutateCampaignFeedResult$Type extends MessageType<MutateCampaignFeedResult> {
constructor();
create(value?: PartialMessage<MutateCampaignFeedResult>): MutateCampaignFeedResult;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MutateCampaignFeedResult): MutateCampaignFeedResult;
internalBinaryWrite(message: MutateCampaignFeedResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.MutateCampaignFeedResult
*/
export declare const MutateCampaignFeedResult: MutateCampaignFeedResult$Type;
/**
* @generated ServiceType for protobuf service google.ads.googleads.v11.services.CampaignFeedService
*/
export declare const CampaignFeedService: ServiceType;
export {};