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

namespace Google\Cloud\VMMigration\V1;

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

/**
 * Request message for
 * [fetchInventory][google.cloud.vmmigration.v1.VmMigration.FetchInventory].
 *
 * Generated from protobuf message <code>google.cloud.vmmigration.v1.FetchInventoryRequest</code>
 */
class FetchInventoryRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The name of the Source.
     *
     * Generated from protobuf field <code>string source = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $source = '';
    /**
     * If this flag is set to true, the source will be queried instead of using
     * cached results. Using this flag will make the call slower.
     *
     * Generated from protobuf field <code>bool force_refresh = 2;</code>
     */
    private $force_refresh = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $source
     *           Required. The name of the Source.
     *     @type bool $force_refresh
     *           If this flag is set to true, the source will be queried instead of using
     *           cached results. Using this flag will make the call slower.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The name of the Source.
     *
     * Generated from protobuf field <code>string source = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getSource()
    {
        return $this->source;
    }

    /**
     * Required. The name of the Source.
     *
     * Generated from protobuf field <code>string source = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setSource($var)
    {
        GPBUtil::checkString($var, True);
        $this->source = $var;

        return $this;
    }

    /**
     * If this flag is set to true, the source will be queried instead of using
     * cached results. Using this flag will make the call slower.
     *
     * Generated from protobuf field <code>bool force_refresh = 2;</code>
     * @return bool
     */
    public function getForceRefresh()
    {
        return $this->force_refresh;
    }

    /**
     * If this flag is set to true, the source will be queried instead of using
     * cached results. Using this flag will make the call slower.
     *
     * Generated from protobuf field <code>bool force_refresh = 2;</code>
     * @param bool $var
     * @return $this
     */
    public function setForceRefresh($var)
    {
        GPBUtil::checkBool($var);
        $this->force_refresh = $var;

        return $this;
    }

}

