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

namespace Google\Cloud\CloudDms\V1;

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

/**
 * Request message for 'SearchBackgroundJobs' request.
 *
 * Generated from protobuf message <code>google.cloud.clouddms.v1.SearchBackgroundJobsRequest</code>
 */
class SearchBackgroundJobsRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Name of the conversion workspace resource whose jobs are listed,
     * in the form of:
     * projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
     *
     * Generated from protobuf field <code>string conversion_workspace = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $conversion_workspace = '';
    /**
     * Optional. Whether or not to return just the most recent job per job type,
     *
     * Generated from protobuf field <code>bool return_most_recent_per_job_type = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $return_most_recent_per_job_type = false;
    /**
     * Optional. The maximum number of jobs to return. The service may return
     * fewer than this value. If unspecified, at most 100 jobs are
     * returned. The maximum value is 100; values above 100 are coerced to
     * 100.
     *
     * Generated from protobuf field <code>int32 max_size = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $max_size = 0;
    /**
     * Optional. If provided, only returns jobs that completed until (not
     * including) the given timestamp.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp completed_until_time = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $completed_until_time = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $conversion_workspace
     *           Required. Name of the conversion workspace resource whose jobs are listed,
     *           in the form of:
     *           projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
     *     @type bool $return_most_recent_per_job_type
     *           Optional. Whether or not to return just the most recent job per job type,
     *     @type int $max_size
     *           Optional. The maximum number of jobs to return. The service may return
     *           fewer than this value. If unspecified, at most 100 jobs are
     *           returned. The maximum value is 100; values above 100 are coerced to
     *           100.
     *     @type \Google\Protobuf\Timestamp $completed_until_time
     *           Optional. If provided, only returns jobs that completed until (not
     *           including) the given timestamp.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Clouddms\V1\Clouddms::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Name of the conversion workspace resource whose jobs are listed,
     * in the form of:
     * projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
     *
     * Generated from protobuf field <code>string conversion_workspace = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getConversionWorkspace()
    {
        return $this->conversion_workspace;
    }

    /**
     * Required. Name of the conversion workspace resource whose jobs are listed,
     * in the form of:
     * projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
     *
     * Generated from protobuf field <code>string conversion_workspace = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setConversionWorkspace($var)
    {
        GPBUtil::checkString($var, True);
        $this->conversion_workspace = $var;

        return $this;
    }

    /**
     * Optional. Whether or not to return just the most recent job per job type,
     *
     * Generated from protobuf field <code>bool return_most_recent_per_job_type = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getReturnMostRecentPerJobType()
    {
        return $this->return_most_recent_per_job_type;
    }

    /**
     * Optional. Whether or not to return just the most recent job per job type,
     *
     * Generated from protobuf field <code>bool return_most_recent_per_job_type = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setReturnMostRecentPerJobType($var)
    {
        GPBUtil::checkBool($var);
        $this->return_most_recent_per_job_type = $var;

        return $this;
    }

    /**
     * Optional. The maximum number of jobs to return. The service may return
     * fewer than this value. If unspecified, at most 100 jobs are
     * returned. The maximum value is 100; values above 100 are coerced to
     * 100.
     *
     * Generated from protobuf field <code>int32 max_size = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getMaxSize()
    {
        return $this->max_size;
    }

    /**
     * Optional. The maximum number of jobs to return. The service may return
     * fewer than this value. If unspecified, at most 100 jobs are
     * returned. The maximum value is 100; values above 100 are coerced to
     * 100.
     *
     * Generated from protobuf field <code>int32 max_size = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setMaxSize($var)
    {
        GPBUtil::checkInt32($var);
        $this->max_size = $var;

        return $this;
    }

    /**
     * Optional. If provided, only returns jobs that completed until (not
     * including) the given timestamp.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp completed_until_time = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getCompletedUntilTime()
    {
        return $this->completed_until_time;
    }

    public function hasCompletedUntilTime()
    {
        return isset($this->completed_until_time);
    }

    public function clearCompletedUntilTime()
    {
        unset($this->completed_until_time);
    }

    /**
     * Optional. If provided, only returns jobs that completed until (not
     * including) the given timestamp.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp completed_until_time = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCompletedUntilTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->completed_until_time = $var;

        return $this;
    }

}

