<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: WAProto.proto

namespace PhpWA\Protocol\Proto\SyncActionValue;

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

/**
 * Generated from protobuf message <code>proto.SyncActionValue.SubscriptionAction</code>
 */
class SubscriptionAction extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional bool isDeactivated = 1;</code>
     */
    protected $isDeactivated = null;
    /**
     * Generated from protobuf field <code>optional bool isAutoRenewing = 2;</code>
     */
    protected $isAutoRenewing = null;
    /**
     * Generated from protobuf field <code>optional int64 expirationDate = 3;</code>
     */
    protected $expirationDate = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $isDeactivated
     *     @type bool $isAutoRenewing
     *     @type int|string $expirationDate
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional bool isDeactivated = 1;</code>
     * @return bool
     */
    public function getIsDeactivated()
    {
        return isset($this->isDeactivated) ? $this->isDeactivated : false;
    }

    public function hasIsDeactivated()
    {
        return isset($this->isDeactivated);
    }

    public function clearIsDeactivated()
    {
        unset($this->isDeactivated);
    }

    /**
     * Generated from protobuf field <code>optional bool isDeactivated = 1;</code>
     * @param bool $var
     * @return $this
     */
    public function setIsDeactivated($var)
    {
        GPBUtil::checkBool($var);
        $this->isDeactivated = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional bool isAutoRenewing = 2;</code>
     * @return bool
     */
    public function getIsAutoRenewing()
    {
        return isset($this->isAutoRenewing) ? $this->isAutoRenewing : false;
    }

    public function hasIsAutoRenewing()
    {
        return isset($this->isAutoRenewing);
    }

    public function clearIsAutoRenewing()
    {
        unset($this->isAutoRenewing);
    }

    /**
     * Generated from protobuf field <code>optional bool isAutoRenewing = 2;</code>
     * @param bool $var
     * @return $this
     */
    public function setIsAutoRenewing($var)
    {
        GPBUtil::checkBool($var);
        $this->isAutoRenewing = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional int64 expirationDate = 3;</code>
     * @return int|string
     */
    public function getExpirationDate()
    {
        return isset($this->expirationDate) ? $this->expirationDate : 0;
    }

    public function hasExpirationDate()
    {
        return isset($this->expirationDate);
    }

    public function clearExpirationDate()
    {
        unset($this->expirationDate);
    }

    /**
     * Generated from protobuf field <code>optional int64 expirationDate = 3;</code>
     * @param int|string $var
     * @return $this
     */
    public function setExpirationDate($var)
    {
        GPBUtil::checkInt64($var);
        $this->expirationDate = $var;

        return $this;
    }

}

