<?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;

/**
 * Response message for
 * [fetchInventory][google.cloud.vmmigration.v1.VmMigration.FetchInventory].
 *
 * Generated from protobuf message <code>google.cloud.vmmigration.v1.FetchInventoryResponse</code>
 */
class FetchInventoryResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The timestamp when the source was last queried (if the result
     * is from the cache).
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $update_time = null;
    protected $SourceVms;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\VMMigration\V1\VmwareVmsDetails $vmware_vms
     *           The description of the VMs in a Source of type Vmware.
     *     @type \Google\Cloud\VMMigration\V1\AwsVmsDetails $aws_vms
     *           The description of the VMs in a Source of type AWS.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Output only. The timestamp when the source was last queried (if the result
     *           is from the cache).
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce();
        parent::__construct($data);
    }

    /**
     * The description of the VMs in a Source of type Vmware.
     *
     * Generated from protobuf field <code>.google.cloud.vmmigration.v1.VmwareVmsDetails vmware_vms = 1;</code>
     * @return \Google\Cloud\VMMigration\V1\VmwareVmsDetails|null
     */
    public function getVmwareVms()
    {
        return $this->readOneof(1);
    }

    public function hasVmwareVms()
    {
        return $this->hasOneof(1);
    }

    /**
     * The description of the VMs in a Source of type Vmware.
     *
     * Generated from protobuf field <code>.google.cloud.vmmigration.v1.VmwareVmsDetails vmware_vms = 1;</code>
     * @param \Google\Cloud\VMMigration\V1\VmwareVmsDetails $var
     * @return $this
     */
    public function setVmwareVms($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\VmwareVmsDetails::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * The description of the VMs in a Source of type AWS.
     *
     * Generated from protobuf field <code>.google.cloud.vmmigration.v1.AwsVmsDetails aws_vms = 3;</code>
     * @return \Google\Cloud\VMMigration\V1\AwsVmsDetails|null
     */
    public function getAwsVms()
    {
        return $this->readOneof(3);
    }

    public function hasAwsVms()
    {
        return $this->hasOneof(3);
    }

    /**
     * The description of the VMs in a Source of type AWS.
     *
     * Generated from protobuf field <code>.google.cloud.vmmigration.v1.AwsVmsDetails aws_vms = 3;</code>
     * @param \Google\Cloud\VMMigration\V1\AwsVmsDetails $var
     * @return $this
     */
    public function setAwsVms($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AwsVmsDetails::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * Output only. The timestamp when the source was last queried (if the result
     * is from the cache).
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getUpdateTime()
    {
        return $this->update_time;
    }

    public function hasUpdateTime()
    {
        return isset($this->update_time);
    }

    public function clearUpdateTime()
    {
        unset($this->update_time);
    }

    /**
     * Output only. The timestamp when the source was last queried (if the result
     * is from the cache).
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setUpdateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->update_time = $var;

        return $this;
    }

    /**
     * @return string
     */
    public function getSourceVms()
    {
        return $this->whichOneof("SourceVms");
    }

}

