/var/www/flurhymez/vendor/google/apiclient-services/src/Storagetransfer/Resource
Edit: /var/www/flurhymez/vendor/google/apiclient-services/src/Storagetransfer/Resource/TransferJobs.php (4879B)
* $storagetransferService = new Google\Service\Storagetransfer(...);
* $transferJobs = $storagetransferService->transferJobs;
*
*/
class TransferJobs extends \Google\Service\Resource
{
/**
* Creates a transfer job that runs periodically. (transferJobs.create)
*
* @param TransferJob $postBody
* @param array $optParams Optional parameters.
* @return TransferJob
*/
public function create(TransferJob $postBody, $optParams = [])
{
$params = ['postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], TransferJob::class);
}
/**
* Gets a transfer job. (transferJobs.get)
*
* @param string $jobName Required. The job to get.
* @param string $projectId Required. The ID of the Google Cloud project that
* owns the job.
* @param array $optParams Optional parameters.
* @return TransferJob
*/
public function get($jobName, $projectId, $optParams = [])
{
$params = ['jobName' => $jobName, 'projectId' => $projectId];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], TransferJob::class);
}
/**
* Lists transfer jobs. (transferJobs.listTransferJobs)
*
* @param string $filter Required. A list of query parameters specified as JSON
* text in the form of: `{"projectId":"my_project_id",
* "jobNames":["jobid1","jobid2",...], "jobStatuses":["status1","status2",...]}`
* Since `jobNames` and `jobStatuses` support multiple values, their values must
* be specified with array notation. `projectId` is required. `jobNames` and
* `jobStatuses` are optional. The valid values for `jobStatuses` are case-
* insensitive: ENABLED, DISABLED, and DELETED.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The list page size. The max allowed value is 256.
* @opt_param string pageToken The list page token.
* @return ListTransferJobsResponse
*/
public function listTransferJobs($filter, $optParams = [])
{
$params = ['filter' => $filter];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListTransferJobsResponse::class);
}
/**
* Updates a transfer job. Updating a job's transfer spec does not affect
* transfer operations that are running already. **Note:** The job's status
* field can be modified using this RPC (for example, to set a job's status to
* DELETED, DISABLED, or ENABLED). (transferJobs.patch)
*
* @param string $jobName Required. The name of job to update.
* @param UpdateTransferJobRequest $postBody
* @param array $optParams Optional parameters.
* @return TransferJob
*/
public function patch($jobName, UpdateTransferJobRequest $postBody, $optParams = [])
{
$params = ['jobName' => $jobName, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('patch', [$params], TransferJob::class);
}
/**
* Attempts to start a new TransferOperation for the current TransferJob. A
* TransferJob has a maximum of one active TransferOperation. If this method is
* called while a TransferOperation is active, an error wil be returned.
* (transferJobs.run)
*
* @param string $jobName Required. The name of the transfer job.
* @param RunTransferJobRequest $postBody
* @param array $optParams Optional parameters.
* @return Operation
*/
public function run($jobName, RunTransferJobRequest $postBody, $optParams = [])
{
$params = ['jobName' => $jobName, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('run', [$params], Operation::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(TransferJobs::class, 'Google_Service_Storagetransfer_Resource_TransferJobs');