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

namespace PhpWA\Protocol\Proto\StatusAttribution;

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

/**
 * Generated from protobuf message <code>proto.StatusAttribution.StatusReshare</code>
 */
class StatusReshare extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional .proto.StatusAttribution.StatusReshare.Source source = 1;</code>
     */
    protected $source = null;
    /**
     * Generated from protobuf field <code>optional .proto.StatusAttribution.StatusReshare.Metadata metadata = 2;</code>
     */
    protected $metadata = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $source
     *     @type \PhpWA\Protocol\Proto\StatusAttribution\StatusReshare\Metadata $metadata
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

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

    public function hasSource()
    {
        return isset($this->source);
    }

    public function clearSource()
    {
        unset($this->source);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.StatusAttribution.StatusReshare.Metadata metadata = 2;</code>
     * @return \PhpWA\Protocol\Proto\StatusAttribution\StatusReshare\Metadata|null
     */
    public function getMetadata()
    {
        return $this->metadata;
    }

    public function hasMetadata()
    {
        return isset($this->metadata);
    }

    public function clearMetadata()
    {
        unset($this->metadata);
    }

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

        return $this;
    }

}

