<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/storagetransfer/v1/transfer.proto

namespace Google\Cloud\StorageTransfer\V1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Request passed to CreateTransferJob.
 *
 * Generated from protobuf message <code>google.storagetransfer.v1.CreateTransferJobRequest</code>
 */
class CreateTransferJobRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The job to create.
     *
     * Generated from protobuf field <code>.google.storagetransfer.v1.TransferJob transfer_job = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $transfer_job = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\StorageTransfer\V1\TransferJob $transfer_job
     *           Required. The job to create.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The job to create.
     *
     * Generated from protobuf field <code>.google.storagetransfer.v1.TransferJob transfer_job = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\StorageTransfer\V1\TransferJob|null
     */
    public function getTransferJob()
    {
        return $this->transfer_job;
    }

    public function hasTransferJob()
    {
        return isset($this->transfer_job);
    }

    public function clearTransferJob()
    {
        unset($this->transfer_job);
    }

    /**
     * Required. The job to create.
     *
     * Generated from protobuf field <code>.google.storagetransfer.v1.TransferJob transfer_job = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\StorageTransfer\V1\TransferJob $var
     * @return $this
     */
    public function setTransferJob($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\TransferJob::class);
        $this->transfer_job = $var;

        return $this;
    }

}

