google-ads-api-client
Version:
A friendly and exhaustive client to the google-ads-api, code generated directly from google's published protobuf schema.
190 lines (189 loc) • 8.41 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 { CustomerAsset } from "../resources/customer_asset";
import { FieldMask } from "../../google/protobuf/field_mask";
import { ResponseContentTypeEnum_ResponseContentType } from "../enums/response_content_type";
/**
* Request message for [CustomerAssetService.MutateCustomerAssets][google.ads.googleads.v11.services.CustomerAssetService.MutateCustomerAssets].
*
* @generated from protobuf message google.ads.googleads.v11.services.MutateCustomerAssetsRequest
*/
export interface MutateCustomerAssetsRequest {
/**
* Required. The ID of the customer whose customer assets are being modified.
*
* @generated from protobuf field: string customer_id = 1;
*/
customerId: string;
/**
* Required. The list of operations to perform on individual customer assets.
*
* @generated from protobuf field: repeated google.ads.googleads.v11.services.CustomerAssetOperation operations = 2;
*/
operations: CustomerAssetOperation[];
/**
* 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 customer asset.
*
* @generated from protobuf message google.ads.googleads.v11.services.CustomerAssetOperation
*/
export interface CustomerAssetOperation {
/**
* 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 customer
* asset.
*
* @generated from protobuf field: google.ads.googleads.v11.resources.CustomerAsset create = 1;
*/
create: CustomerAsset;
} | {
oneofKind: "update";
/**
* Update operation: The customer asset is expected to have a valid resource
* name.
*
* @generated from protobuf field: google.ads.googleads.v11.resources.CustomerAsset update = 3;
*/
update: CustomerAsset;
} | {
oneofKind: "remove";
/**
* Remove operation: A resource name for the removed customer asset is
* expected, in this format:
*
* `customers/{customer_id}/customerAssets/{asset_id}~{field_type}`
*
* @generated from protobuf field: string remove = 2;
*/
remove: string;
} | {
oneofKind: undefined;
};
}
/**
* Response message for a customer asset mutate.
*
* @generated from protobuf message google.ads.googleads.v11.services.MutateCustomerAssetsResponse
*/
export interface MutateCustomerAssetsResponse {
/**
* 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.MutateCustomerAssetResult results = 2;
*/
results: MutateCustomerAssetResult[];
}
/**
* The result for the customer asset mutate.
*
* @generated from protobuf message google.ads.googleads.v11.services.MutateCustomerAssetResult
*/
export interface MutateCustomerAssetResult {
/**
* Returned for successful operations.
*
* @generated from protobuf field: string resource_name = 1;
*/
resourceName: string;
/**
* The mutated customer asset 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.CustomerAsset customer_asset = 2;
*/
customerAsset?: CustomerAsset;
}
declare class MutateCustomerAssetsRequest$Type extends MessageType<MutateCustomerAssetsRequest> {
constructor();
create(value?: PartialMessage<MutateCustomerAssetsRequest>): MutateCustomerAssetsRequest;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MutateCustomerAssetsRequest): MutateCustomerAssetsRequest;
internalBinaryWrite(message: MutateCustomerAssetsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.MutateCustomerAssetsRequest
*/
export declare const MutateCustomerAssetsRequest: MutateCustomerAssetsRequest$Type;
declare class CustomerAssetOperation$Type extends MessageType<CustomerAssetOperation> {
constructor();
create(value?: PartialMessage<CustomerAssetOperation>): CustomerAssetOperation;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CustomerAssetOperation): CustomerAssetOperation;
internalBinaryWrite(message: CustomerAssetOperation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.CustomerAssetOperation
*/
export declare const CustomerAssetOperation: CustomerAssetOperation$Type;
declare class MutateCustomerAssetsResponse$Type extends MessageType<MutateCustomerAssetsResponse> {
constructor();
create(value?: PartialMessage<MutateCustomerAssetsResponse>): MutateCustomerAssetsResponse;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MutateCustomerAssetsResponse): MutateCustomerAssetsResponse;
internalBinaryWrite(message: MutateCustomerAssetsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.MutateCustomerAssetsResponse
*/
export declare const MutateCustomerAssetsResponse: MutateCustomerAssetsResponse$Type;
declare class MutateCustomerAssetResult$Type extends MessageType<MutateCustomerAssetResult> {
constructor();
create(value?: PartialMessage<MutateCustomerAssetResult>): MutateCustomerAssetResult;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MutateCustomerAssetResult): MutateCustomerAssetResult;
internalBinaryWrite(message: MutateCustomerAssetResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.MutateCustomerAssetResult
*/
export declare const MutateCustomerAssetResult: MutateCustomerAssetResult$Type;
/**
* @generated ServiceType for protobuf service google.ads.googleads.v11.services.CustomerAssetService
*/
export declare const CustomerAssetService: ServiceType;
export {};