<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: gradido/GroupMemberUpdate.proto

namespace Proto\Gradido;

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

/**
 * Generated from protobuf message <code>proto.gradido.GroupMemberUpdate</code>
 */
class GroupMemberUpdate extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>bytes user_pubkey = 1;</code>
     */
    private $user_pubkey = '';
    /**
     * Generated from protobuf field <code>.proto.gradido.GroupMemberUpdate.MemberUpdateType member_update_type = 2;</code>
     */
    private $member_update_type = 0;
    /**
     * this only makes sense for user move, TODO: probably restructure
     *
     * Generated from protobuf field <code>.proto.gradido.Timestamp paired_transaction_id = 3;</code>
     */
    private $paired_transaction_id = null;
    /**
     * Generated from protobuf field <code>string target_group = 4;</code>
     */
    private $target_group = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $user_pubkey
     *     @type int $member_update_type
     *     @type \Proto\Gradido\Timestamp $paired_transaction_id
     *           this only makes sense for user move, TODO: probably restructure
     *     @type string $target_group
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Gradido\GroupMemberUpdate::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>bytes user_pubkey = 1;</code>
     * @return string
     */
    public function getUserPubkey()
    {
        return $this->user_pubkey;
    }

    /**
     * Generated from protobuf field <code>bytes user_pubkey = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setUserPubkey($var)
    {
        GPBUtil::checkString($var, False);
        $this->user_pubkey = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.proto.gradido.GroupMemberUpdate.MemberUpdateType member_update_type = 2;</code>
     * @return int
     */
    public function getMemberUpdateType()
    {
        return $this->member_update_type;
    }

    /**
     * Generated from protobuf field <code>.proto.gradido.GroupMemberUpdate.MemberUpdateType member_update_type = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setMemberUpdateType($var)
    {
        GPBUtil::checkEnum($var, \Proto\Gradido\GroupMemberUpdate_MemberUpdateType::class);
        $this->member_update_type = $var;

        return $this;
    }

    /**
     * this only makes sense for user move, TODO: probably restructure
     *
     * Generated from protobuf field <code>.proto.gradido.Timestamp paired_transaction_id = 3;</code>
     * @return \Proto\Gradido\Timestamp
     */
    public function getPairedTransactionId()
    {
        return $this->paired_transaction_id;
    }

    /**
     * this only makes sense for user move, TODO: probably restructure
     *
     * Generated from protobuf field <code>.proto.gradido.Timestamp paired_transaction_id = 3;</code>
     * @param \Proto\Gradido\Timestamp $var
     * @return $this
     */
    public function setPairedTransactionId($var)
    {
        GPBUtil::checkMessage($var, \Proto\Gradido\Timestamp::class);
        $this->paired_transaction_id = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string target_group = 4;</code>
     * @return string
     */
    public function getTargetGroup()
    {
        return $this->target_group;
    }

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

        return $this;
    }

}

