public class BatchJobHelper extends Object implements BatchJobHelperInterface<com.google.api.ads.adwords.axis.v201601.cm.Operation,com.google.api.ads.adwords.axis.v201601.cm.Operand,com.google.api.ads.adwords.axis.v201601.cm.ApiError,MutateResult,BatchJobMutateResponse>
BatchJob.| Constructor and Description |
|---|
BatchJobHelper(AdWordsSession session) |
| Modifier and Type | Method and Description |
|---|---|
BatchJobMutateResponse |
downloadBatchJobMutateResponse(String downloadUrl)
Downloads and returns the results from the attempted operations for a completed batch job.
|
BatchJobUploadResponse |
uploadBatchJobOperations(Iterable<com.google.api.ads.adwords.axis.v201601.cm.Operation> operations,
String uploadUrl)
Uploads the specified operations to the batch job.
|
BatchJobUploadResponse |
uploadIncrementalBatchJobOperations(Iterable<? extends com.google.api.ads.adwords.axis.v201601.cm.Operation> operations,
boolean isLastRequest,
BatchJobUploadStatus batchJobUploadStatus)
Uploads the specified operations to the batch job.
|
public BatchJobHelper(AdWordsSession session)
public BatchJobUploadResponse uploadBatchJobOperations(Iterable<com.google.api.ads.adwords.axis.v201601.cm.Operation> operations, String uploadUrl) throws BatchJobException
BatchJobHelperInterfaceACTIVE state.
Use this method if you want to upload all operations in a single request. To upload
operations across multiple requests, use BatchJobHelperInterface.uploadIncrementalBatchJobOperations(Iterable,
boolean, BatchJobUploadStatus)
instead.
uploadBatchJobOperations in interface BatchJobHelperInterface<com.google.api.ads.adwords.axis.v201601.cm.Operation,com.google.api.ads.adwords.axis.v201601.cm.Operand,com.google.api.ads.adwords.axis.v201601.cm.ApiError,MutateResult,BatchJobMutateResponse>operations - the operations to upload to the batch jobuploadUrl - the BatchJob#getUploadUrl()BatchJobException - if the request failedpublic BatchJobUploadResponse uploadIncrementalBatchJobOperations(Iterable<? extends com.google.api.ads.adwords.axis.v201601.cm.Operation> operations, boolean isLastRequest, BatchJobUploadStatus batchJobUploadStatus) throws BatchJobException
BatchJobHelperInterfaceBatchJobHelperInterface.uploadBatchJobOperations(Iterable, String)
instead.
If isLastRequest, then after this method returns successfully, the job will
transition to the ACTIVE state.
uploadIncrementalBatchJobOperations in interface BatchJobHelperInterface<com.google.api.ads.adwords.axis.v201601.cm.Operation,com.google.api.ads.adwords.axis.v201601.cm.Operand,com.google.api.ads.adwords.axis.v201601.cm.ApiError,MutateResult,BatchJobMutateResponse>operations - the operations to upload to the batch jobisLastRequest - if this is the last set of operations to upload for the jobbatchJobUploadStatus - the current upload status. If this is the first upload,
set the BatchJobUploadStatus.getResumableUploadUri() to the BatchJob#getUploadUrl().BatchJobException - if the request failedpublic BatchJobMutateResponse downloadBatchJobMutateResponse(String downloadUrl) throws BatchJobException
BatchJobHelperInterfacedownloadBatchJobMutateResponse in interface BatchJobHelperInterface<com.google.api.ads.adwords.axis.v201601.cm.Operation,com.google.api.ads.adwords.axis.v201601.cm.Operand,com.google.api.ads.adwords.axis.v201601.cm.ApiError,MutateResult,BatchJobMutateResponse>downloadUrl - the BatchJob.getDownloadUrl()BatchJobExceptionCopyright © 2016. All Rights Reserved.