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

namespace PhpWA\Protocol\Proto;

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

/**
 * Generated from protobuf message <code>proto.StatusAttribution</code>
 */
class StatusAttribution extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional .proto.StatusAttribution.Type type = 1;</code>
     */
    protected $type = null;
    /**
     * Generated from protobuf field <code>optional string actionUrl = 2;</code>
     */
    protected $actionUrl = null;
    protected $attributionData;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $type
     *     @type string $actionUrl
     *     @type \PhpWA\Protocol\Proto\StatusAttribution\StatusReshare $statusReshare
     *     @type \PhpWA\Protocol\Proto\StatusAttribution\ExternalShare $externalShare
     *     @type \PhpWA\Protocol\Proto\StatusAttribution\Music $music
     *     @type \PhpWA\Protocol\Proto\StatusAttribution\GroupStatus $groupStatus
     *     @type \PhpWA\Protocol\Proto\StatusAttribution\RLAttribution $rlAttribution
     *     @type \PhpWA\Protocol\Proto\StatusAttribution\AiCreatedAttribution $aiCreatedAttribution
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional .proto.StatusAttribution.Type type = 1;</code>
     * @return int
     */
    public function getType()
    {
        return isset($this->type) ? $this->type : 0;
    }

    public function hasType()
    {
        return isset($this->type);
    }

    public function clearType()
    {
        unset($this->type);
    }

    /**
     * Generated from protobuf field <code>optional .proto.StatusAttribution.Type type = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\StatusAttribution\Type::class);
        $this->type = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string actionUrl = 2;</code>
     * @return string
     */
    public function getActionUrl()
    {
        return isset($this->actionUrl) ? $this->actionUrl : '';
    }

    public function hasActionUrl()
    {
        return isset($this->actionUrl);
    }

    public function clearActionUrl()
    {
        unset($this->actionUrl);
    }

    /**
     * Generated from protobuf field <code>optional string actionUrl = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setActionUrl($var)
    {
        GPBUtil::checkString($var, True);
        $this->actionUrl = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.proto.StatusAttribution.StatusReshare statusReshare = 3;</code>
     * @return \PhpWA\Protocol\Proto\StatusAttribution\StatusReshare|null
     */
    public function getStatusReshare()
    {
        return $this->readOneof(3);
    }

    public function hasStatusReshare()
    {
        return $this->hasOneof(3);
    }

    /**
     * Generated from protobuf field <code>.proto.StatusAttribution.StatusReshare statusReshare = 3;</code>
     * @param \PhpWA\Protocol\Proto\StatusAttribution\StatusReshare $var
     * @return $this
     */
    public function setStatusReshare($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\StatusAttribution\StatusReshare::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.proto.StatusAttribution.ExternalShare externalShare = 4;</code>
     * @return \PhpWA\Protocol\Proto\StatusAttribution\ExternalShare|null
     */
    public function getExternalShare()
    {
        return $this->readOneof(4);
    }

    public function hasExternalShare()
    {
        return $this->hasOneof(4);
    }

    /**
     * Generated from protobuf field <code>.proto.StatusAttribution.ExternalShare externalShare = 4;</code>
     * @param \PhpWA\Protocol\Proto\StatusAttribution\ExternalShare $var
     * @return $this
     */
    public function setExternalShare($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\StatusAttribution\ExternalShare::class);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.proto.StatusAttribution.Music music = 5;</code>
     * @return \PhpWA\Protocol\Proto\StatusAttribution\Music|null
     */
    public function getMusic()
    {
        return $this->readOneof(5);
    }

    public function hasMusic()
    {
        return $this->hasOneof(5);
    }

    /**
     * Generated from protobuf field <code>.proto.StatusAttribution.Music music = 5;</code>
     * @param \PhpWA\Protocol\Proto\StatusAttribution\Music $var
     * @return $this
     */
    public function setMusic($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\StatusAttribution\Music::class);
        $this->writeOneof(5, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.proto.StatusAttribution.GroupStatus groupStatus = 6;</code>
     * @return \PhpWA\Protocol\Proto\StatusAttribution\GroupStatus|null
     */
    public function getGroupStatus()
    {
        return $this->readOneof(6);
    }

    public function hasGroupStatus()
    {
        return $this->hasOneof(6);
    }

    /**
     * Generated from protobuf field <code>.proto.StatusAttribution.GroupStatus groupStatus = 6;</code>
     * @param \PhpWA\Protocol\Proto\StatusAttribution\GroupStatus $var
     * @return $this
     */
    public function setGroupStatus($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\StatusAttribution\GroupStatus::class);
        $this->writeOneof(6, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.proto.StatusAttribution.RLAttribution rlAttribution = 7;</code>
     * @return \PhpWA\Protocol\Proto\StatusAttribution\RLAttribution|null
     */
    public function getRlAttribution()
    {
        return $this->readOneof(7);
    }

    public function hasRlAttribution()
    {
        return $this->hasOneof(7);
    }

    /**
     * Generated from protobuf field <code>.proto.StatusAttribution.RLAttribution rlAttribution = 7;</code>
     * @param \PhpWA\Protocol\Proto\StatusAttribution\RLAttribution $var
     * @return $this
     */
    public function setRlAttribution($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\StatusAttribution\RLAttribution::class);
        $this->writeOneof(7, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.proto.StatusAttribution.AiCreatedAttribution aiCreatedAttribution = 8;</code>
     * @return \PhpWA\Protocol\Proto\StatusAttribution\AiCreatedAttribution|null
     */
    public function getAiCreatedAttribution()
    {
        return $this->readOneof(8);
    }

    public function hasAiCreatedAttribution()
    {
        return $this->hasOneof(8);
    }

    /**
     * Generated from protobuf field <code>.proto.StatusAttribution.AiCreatedAttribution aiCreatedAttribution = 8;</code>
     * @param \PhpWA\Protocol\Proto\StatusAttribution\AiCreatedAttribution $var
     * @return $this
     */
    public function setAiCreatedAttribution($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\StatusAttribution\AiCreatedAttribution::class);
        $this->writeOneof(8, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getAttributionData()
    {
        return $this->whichOneof("attributionData");
    }

}

