<?php
namespace pecl\protocolbuffers;

// @@protoc_insertion_point(namespace:.pecl.protocolbuffers.User)

/**
 * Generated by the protocol buffer compiler.  DO NOT EDIT!
 * source: proto/user.proto
 *
 * -*- magic methods -*-
 *
 * @method string getUserId()
 * @method void setUserId(string $value)
 * @method string getName()
 * @method void setName(string $value)
 */
class User extends \ProtocolBuffers\Message
{
  // @@protoc_insertion_point(traits:.pecl.protocolbuffers.User)
  
  /**
   * @var string $user_id
   * @tag 1
   * @label optional
   * @type \ProtocolBuffers::TYPE_INT64
   **/
  protected $user_id;
  
  /**
   * @var string $name
   * @tag 2
   * @label optional
   * @type \ProtocolBuffers::TYPE_BYTES
   **/
  protected $name;
  
  
  // @@protoc_insertion_point(properties_scope:.pecl.protocolbuffers.User)

  // @@protoc_insertion_point(class_scope:.pecl.protocolbuffers.User)

  /**
   * get descriptor for protocol buffers
   * 
   * @return \ProtocolBuffersDescriptor
   */
  public static function getDescriptor()
  {
    static $descriptor;
    
    if (!isset($descriptor)) {
      $desc = new \ProtocolBuffers\DescriptorBuilder();
      $desc->addField(1, new \ProtocolBuffers\FieldDescriptor(array(
        "type"     => \ProtocolBuffers::TYPE_INT64,
        "name"     => "user_id",
        "required" => false,
        "optional" => true,
        "repeated" => false,
        "packable" => false,
        "default"  => null,
      )));
      $desc->addField(2, new \ProtocolBuffers\FieldDescriptor(array(
        "type"     => \ProtocolBuffers::TYPE_BYTES,
        "name"     => "name",
        "required" => false,
        "optional" => true,
        "repeated" => false,
        "packable" => false,
        "default"  => null,
      )));
      // @@protoc_insertion_point(builder_scope:.pecl.protocolbuffers.User)

      $descriptor = $desc->build();
    }
    return $descriptor;
  }

}
