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

namespace Google\Cloud\Commerce\Consumer\Procurement\V1\AssignmentProtocol;

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

/**
 * Configuration for automatic assignments handled by data plane operations.
 *
 * Generated from protobuf message <code>google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType</code>
 */
class AutoAssignmentType extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. The time to live for an inactive license. After this time has
     * passed, the license will be automatically unassigned from the user. Must
     * be at least 7 days, if set. If unset, the license will never expire.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration inactive_license_ttl = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $inactive_license_ttl = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Protobuf\Duration $inactive_license_ttl
     *           Optional. The time to live for an inactive license. After this time has
     *           passed, the license will be automatically unassigned from the user. Must
     *           be at least 7 days, if set. If unset, the license will never expire.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Commerce\Consumer\Procurement\V1\LicenseManagementService::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. The time to live for an inactive license. After this time has
     * passed, the license will be automatically unassigned from the user. Must
     * be at least 7 days, if set. If unset, the license will never expire.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration inactive_license_ttl = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Duration|null
     */
    public function getInactiveLicenseTtl()
    {
        return $this->inactive_license_ttl;
    }

    public function hasInactiveLicenseTtl()
    {
        return isset($this->inactive_license_ttl);
    }

    public function clearInactiveLicenseTtl()
    {
        unset($this->inactive_license_ttl);
    }

    /**
     * Optional. The time to live for an inactive license. After this time has
     * passed, the license will be automatically unassigned from the user. Must
     * be at least 7 days, if set. If unset, the license will never expire.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration inactive_license_ttl = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Protobuf\Duration $var
     * @return $this
     */
    public function setInactiveLicenseTtl($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
        $this->inactive_license_ttl = $var;

        return $this;
    }

}


