<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: gradido/TransactionBody.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.TransactionBody</code>
 */
class TransactionBody extends \Google\Protobuf\Internal\Message
{
    /**
     * max 150 chars
     *
     * Generated from protobuf field <code>string memo = 1;</code>
     */
    private $memo = '';
    /**
     * Generated from protobuf field <code>.proto.gradido.TimestampSeconds created = 2;</code>
     */
    private $created = null;
    /**
     * Generated from protobuf field <code>uint64 version_number = 3;</code>
     */
    private $version_number = 0;
    protected $data;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $memo
     *           max 150 chars
     *     @type \Proto\Gradido\TimestampSeconds $created
     *     @type int|string $version_number
     *     @type \Proto\Gradido\GradidoTransfer $transfer
     *     @type \Proto\Gradido\GradidoCreation $creation
     *     @type \Proto\Gradido\GroupFriendsUpdate $group_friends_update
     *     @type \Proto\Gradido\GroupMemberUpdate $group_member_update
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Gradido\TransactionBody::initOnce();
        parent::__construct($data);
    }

    /**
     * max 150 chars
     *
     * Generated from protobuf field <code>string memo = 1;</code>
     * @return string
     */
    public function getMemo()
    {
        return $this->memo;
    }

    /**
     * max 150 chars
     *
     * Generated from protobuf field <code>string memo = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setMemo($var)
    {
        GPBUtil::checkString($var, True);
        $this->memo = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.proto.gradido.TimestampSeconds created = 2;</code>
     * @return \Proto\Gradido\TimestampSeconds
     */
    public function getCreated()
    {
        return $this->created;
    }

    /**
     * Generated from protobuf field <code>.proto.gradido.TimestampSeconds created = 2;</code>
     * @param \Proto\Gradido\TimestampSeconds $var
     * @return $this
     */
    public function setCreated($var)
    {
        GPBUtil::checkMessage($var, \Proto\Gradido\TimestampSeconds::class);
        $this->created = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint64 version_number = 3;</code>
     * @return int|string
     */
    public function getVersionNumber()
    {
        return $this->version_number;
    }

    /**
     * Generated from protobuf field <code>uint64 version_number = 3;</code>
     * @param int|string $var
     * @return $this
     */
    public function setVersionNumber($var)
    {
        GPBUtil::checkUint64($var);
        $this->version_number = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.proto.gradido.GradidoTransfer transfer = 6;</code>
     * @return \Proto\Gradido\GradidoTransfer
     */
    public function getTransfer()
    {
        return $this->readOneof(6);
    }

    /**
     * Generated from protobuf field <code>.proto.gradido.GradidoTransfer transfer = 6;</code>
     * @param \Proto\Gradido\GradidoTransfer $var
     * @return $this
     */
    public function setTransfer($var)
    {
        GPBUtil::checkMessage($var, \Proto\Gradido\GradidoTransfer::class);
        $this->writeOneof(6, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.proto.gradido.GradidoCreation creation = 7;</code>
     * @return \Proto\Gradido\GradidoCreation
     */
    public function getCreation()
    {
        return $this->readOneof(7);
    }

    /**
     * Generated from protobuf field <code>.proto.gradido.GradidoCreation creation = 7;</code>
     * @param \Proto\Gradido\GradidoCreation $var
     * @return $this
     */
    public function setCreation($var)
    {
        GPBUtil::checkMessage($var, \Proto\Gradido\GradidoCreation::class);
        $this->writeOneof(7, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.proto.gradido.GroupFriendsUpdate group_friends_update = 8;</code>
     * @return \Proto\Gradido\GroupFriendsUpdate
     */
    public function getGroupFriendsUpdate()
    {
        return $this->readOneof(8);
    }

    /**
     * Generated from protobuf field <code>.proto.gradido.GroupFriendsUpdate group_friends_update = 8;</code>
     * @param \Proto\Gradido\GroupFriendsUpdate $var
     * @return $this
     */
    public function setGroupFriendsUpdate($var)
    {
        GPBUtil::checkMessage($var, \Proto\Gradido\GroupFriendsUpdate::class);
        $this->writeOneof(8, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.proto.gradido.GroupMemberUpdate group_member_update = 9;</code>
     * @return \Proto\Gradido\GroupMemberUpdate
     */
    public function getGroupMemberUpdate()
    {
        return $this->readOneof(9);
    }

    /**
     * Generated from protobuf field <code>.proto.gradido.GroupMemberUpdate group_member_update = 9;</code>
     * @param \Proto\Gradido\GroupMemberUpdate $var
     * @return $this
     */
    public function setGroupMemberUpdate($var)
    {
        GPBUtil::checkMessage($var, \Proto\Gradido\GroupMemberUpdate::class);
        $this->writeOneof(9, $var);

        return $this;
    }

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

}

