public class BatchJobHelper extends Object implements BatchJobHelperInterface<com.google.api.ads.adwords.jaxws.v201710.cm.Operation,com.google.api.ads.adwords.jaxws.v201710.cm.Operand,com.google.api.ads.adwords.jaxws.v201710.cm.ApiError,MutateResult,BatchJobMutateResponse>
BatchJobHelperInterface
for JAX-WS v201710.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.jaxws.v201710.cm.Operation> operations,
String uploadUrl)
Uploads the specified operations to the batch job.
|
BatchJobUploadResponse |
uploadIncrementalBatchJobOperations(Iterable<? extends com.google.api.ads.adwords.jaxws.v201710.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.jaxws.v201710.cm.Operation> operations, String uploadUrl) throws BatchJobException
BatchJobHelperInterface
ACTIVE
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.jaxws.v201710.cm.Operation,com.google.api.ads.adwords.jaxws.v201710.cm.Operand,com.google.api.ads.adwords.jaxws.v201710.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.jaxws.v201710.cm.Operation> operations, boolean isLastRequest, BatchJobUploadStatus batchJobUploadStatus) throws BatchJobException
BatchJobHelperInterface
BatchJobHelperInterface.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.jaxws.v201710.cm.Operation,com.google.api.ads.adwords.jaxws.v201710.cm.Operand,com.google.api.ads.adwords.jaxws.v201710.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
BatchJobHelperInterface
downloadBatchJobMutateResponse
in interface BatchJobHelperInterface<com.google.api.ads.adwords.jaxws.v201710.cm.Operation,com.google.api.ads.adwords.jaxws.v201710.cm.Operand,com.google.api.ads.adwords.jaxws.v201710.cm.ApiError,MutateResult,BatchJobMutateResponse>
downloadUrl
- the BatchJob.getDownloadUrl()
BatchJobException
Copyright © 2018. All Rights Reserved.