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

namespace Google\Cloud\Channel\V1;

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

/**
 * TransferableSku represents information a reseller needs to view existing
 * provisioned services for a customer that they do not own.
 * Read-only.
 *
 * Generated from protobuf message <code>google.cloud.channel.v1.TransferableSku</code>
 */
class TransferableSku extends \Google\Protobuf\Internal\Message
{
    /**
     * Whether a transferable SKU is commitment-based or not.
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue is_commitment = 6;</code>
     */
    private $is_commitment = null;
    /**
     * Commitment end timestamp.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp commitment_end_timestamp = 7;</code>
     */
    private $commitment_end_timestamp = null;
    /**
     * Describes the transfer eligibility of a SKU.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.TransferEligibility transfer_eligibility = 9;</code>
     */
    private $transfer_eligibility = null;
    /**
     * The SKU pertaining to the provisioning resource as specified in the Offer.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.Sku sku = 11;</code>
     */
    private $sku = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Protobuf\BoolValue $is_commitment
     *           Whether a transferable SKU is commitment-based or not.
     *     @type \Google\Protobuf\Timestamp $commitment_end_timestamp
     *           Commitment end timestamp.
     *     @type \Google\Cloud\Channel\V1\TransferEligibility $transfer_eligibility
     *           Describes the transfer eligibility of a SKU.
     *     @type \Google\Cloud\Channel\V1\Sku $sku
     *           The SKU pertaining to the provisioning resource as specified in the Offer.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Channel\V1\Entitlements::initOnce();
        parent::__construct($data);
    }

    /**
     * Whether a transferable SKU is commitment-based or not.
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue is_commitment = 6;</code>
     * @return \Google\Protobuf\BoolValue
     */
    public function getIsCommitment()
    {
        return isset($this->is_commitment) ? $this->is_commitment : null;
    }

    public function hasIsCommitment()
    {
        return isset($this->is_commitment);
    }

    public function clearIsCommitment()
    {
        unset($this->is_commitment);
    }

    /**
     * Returns the unboxed value from <code>getIsCommitment()</code>

     * Whether a transferable SKU is commitment-based or not.
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue is_commitment = 6;</code>
     * @return bool|null
     */
    public function getIsCommitmentValue()
    {
        return $this->readWrapperValue("is_commitment");
    }

    /**
     * Whether a transferable SKU is commitment-based or not.
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue is_commitment = 6;</code>
     * @param \Google\Protobuf\BoolValue $var
     * @return $this
     */
    public function setIsCommitment($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class);
        $this->is_commitment = $var;

        return $this;
    }

    /**
     * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object.

     * Whether a transferable SKU is commitment-based or not.
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue is_commitment = 6;</code>
     * @param bool|null $var
     * @return $this
     */
    public function setIsCommitmentValue($var)
    {
        $this->writeWrapperValue("is_commitment", $var);
        return $this;}

    /**
     * Commitment end timestamp.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp commitment_end_timestamp = 7;</code>
     * @return \Google\Protobuf\Timestamp
     */
    public function getCommitmentEndTimestamp()
    {
        return isset($this->commitment_end_timestamp) ? $this->commitment_end_timestamp : null;
    }

    public function hasCommitmentEndTimestamp()
    {
        return isset($this->commitment_end_timestamp);
    }

    public function clearCommitmentEndTimestamp()
    {
        unset($this->commitment_end_timestamp);
    }

    /**
     * Commitment end timestamp.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp commitment_end_timestamp = 7;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCommitmentEndTimestamp($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->commitment_end_timestamp = $var;

        return $this;
    }

    /**
     * Describes the transfer eligibility of a SKU.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.TransferEligibility transfer_eligibility = 9;</code>
     * @return \Google\Cloud\Channel\V1\TransferEligibility
     */
    public function getTransferEligibility()
    {
        return isset($this->transfer_eligibility) ? $this->transfer_eligibility : null;
    }

    public function hasTransferEligibility()
    {
        return isset($this->transfer_eligibility);
    }

    public function clearTransferEligibility()
    {
        unset($this->transfer_eligibility);
    }

    /**
     * Describes the transfer eligibility of a SKU.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.TransferEligibility transfer_eligibility = 9;</code>
     * @param \Google\Cloud\Channel\V1\TransferEligibility $var
     * @return $this
     */
    public function setTransferEligibility($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Channel\V1\TransferEligibility::class);
        $this->transfer_eligibility = $var;

        return $this;
    }

    /**
     * The SKU pertaining to the provisioning resource as specified in the Offer.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.Sku sku = 11;</code>
     * @return \Google\Cloud\Channel\V1\Sku
     */
    public function getSku()
    {
        return isset($this->sku) ? $this->sku : null;
    }

    public function hasSku()
    {
        return isset($this->sku);
    }

    public function clearSku()
    {
        unset($this->sku);
    }

    /**
     * The SKU pertaining to the provisioning resource as specified in the Offer.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.Sku sku = 11;</code>
     * @param \Google\Cloud\Channel\V1\Sku $var
     * @return $this
     */
    public function setSku($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Channel\V1\Sku::class);
        $this->sku = $var;

        return $this;
    }

}

