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

namespace Google\Cloud\OsConfig\V1\OSPolicy;

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

/**
 * Filtering criteria to select VMs based on inventory details.
 *
 * Generated from protobuf message <code>google.cloud.osconfig.v1.OSPolicy.InventoryFilter</code>
 */
class InventoryFilter extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The OS short name
     *
     * Generated from protobuf field <code>string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $os_short_name = '';
    /**
     * The OS version
     * Prefix matches are supported if asterisk(*) is provided as the
     * last character. For example, to match all versions with a major
     * version of `7`, specify the following value for this field `7.*`
     * An empty string matches all OS versions.
     *
     * Generated from protobuf field <code>string os_version = 2;</code>
     */
    private $os_version = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $os_short_name
     *           Required. The OS short name
     *     @type string $os_version
     *           The OS version
     *           Prefix matches are supported if asterisk(*) is provided as the
     *           last character. For example, to match all versions with a major
     *           version of `7`, specify the following value for this field `7.*`
     *           An empty string matches all OS versions.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The OS short name
     *
     * Generated from protobuf field <code>string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getOsShortName()
    {
        return $this->os_short_name;
    }

    /**
     * Required. The OS short name
     *
     * Generated from protobuf field <code>string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setOsShortName($var)
    {
        GPBUtil::checkString($var, True);
        $this->os_short_name = $var;

        return $this;
    }

    /**
     * The OS version
     * Prefix matches are supported if asterisk(*) is provided as the
     * last character. For example, to match all versions with a major
     * version of `7`, specify the following value for this field `7.*`
     * An empty string matches all OS versions.
     *
     * Generated from protobuf field <code>string os_version = 2;</code>
     * @return string
     */
    public function getOsVersion()
    {
        return $this->os_version;
    }

    /**
     * The OS version
     * Prefix matches are supported if asterisk(*) is provided as the
     * last character. For example, to match all versions with a major
     * version of `7`, specify the following value for this field `7.*`
     * An empty string matches all OS versions.
     *
     * Generated from protobuf field <code>string os_version = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setOsVersion($var)
    {
        GPBUtil::checkString($var, True);
        $this->os_version = $var;

        return $this;
    }

}


