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

namespace Google\Cloud\OsConfig\V1;

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

/**
 * A request message for getting inventory data for the specified VM.
 *
 * Generated from protobuf message <code>google.cloud.osconfig.v1.GetInventoryRequest</code>
 */
class GetInventoryRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. API resource name for inventory resource.
     * Format:
     * `projects/{project}/locations/{location}/instances/{instance}/inventory`
     * For `{project}`, either `project-number` or `project-id` can be provided.
     * For `{instance}`, either Compute Engine  `instance-id` or `instance-name`
     * can be provided.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $name = '';
    /**
     * Inventory view indicating what information should be included in the
     * inventory resource. If unspecified, the default view is BASIC.
     *
     * Generated from protobuf field <code>.google.cloud.osconfig.v1.InventoryView view = 2;</code>
     */
    private $view = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. API resource name for inventory resource.
     *           Format:
     *           `projects/{project}/locations/{location}/instances/{instance}/inventory`
     *           For `{project}`, either `project-number` or `project-id` can be provided.
     *           For `{instance}`, either Compute Engine  `instance-id` or `instance-name`
     *           can be provided.
     *     @type int $view
     *           Inventory view indicating what information should be included in the
     *           inventory resource. If unspecified, the default view is BASIC.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Osconfig\V1\Inventory::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. API resource name for inventory resource.
     * Format:
     * `projects/{project}/locations/{location}/instances/{instance}/inventory`
     * For `{project}`, either `project-number` or `project-id` can be provided.
     * For `{instance}`, either Compute Engine  `instance-id` or `instance-name`
     * can be provided.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. API resource name for inventory resource.
     * Format:
     * `projects/{project}/locations/{location}/instances/{instance}/inventory`
     * For `{project}`, either `project-number` or `project-id` can be provided.
     * For `{instance}`, either Compute Engine  `instance-id` or `instance-name`
     * can be provided.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Inventory view indicating what information should be included in the
     * inventory resource. If unspecified, the default view is BASIC.
     *
     * Generated from protobuf field <code>.google.cloud.osconfig.v1.InventoryView view = 2;</code>
     * @return int
     */
    public function getView()
    {
        return $this->view;
    }

    /**
     * Inventory view indicating what information should be included in the
     * inventory resource. If unspecified, the default view is BASIC.
     *
     * Generated from protobuf field <code>.google.cloud.osconfig.v1.InventoryView view = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setView($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\InventoryView::class);
        $this->view = $var;

        return $this;
    }

}

