Exemplo n.º 1
0
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("SquareEventSendMessage");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (SquareChatMid != null && __isset.squareChatMid)
         {
             field.Name = "squareChatMid";
             field.Type = TType.String;
             field.ID   = 1;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(SquareChatMid);
             oprot.WriteFieldEnd();
         }
         if (SquareMessage != null && __isset.squareMessage)
         {
             field.Name = "squareMessage";
             field.Type = TType.Struct;
             field.ID   = 2;
             oprot.WriteFieldBegin(field);
             SquareMessage.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (__isset.reqSeq)
         {
             field.Name = "reqSeq";
             field.Type = TType.I32;
             field.ID   = 3;
             oprot.WriteFieldBegin(field);
             oprot.WriteI32(ReqSeq);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }
Exemplo n.º 2
0
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("SquareEventNotificationMessage");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (SquareChatMid != null && __isset.squareChatMid)
         {
             field.Name = "squareChatMid";
             field.Type = TType.String;
             field.ID   = 1;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(SquareChatMid);
             oprot.WriteFieldEnd();
         }
         if (SquareMessage != null && __isset.squareMessage)
         {
             field.Name = "squareMessage";
             field.Type = TType.Struct;
             field.ID   = 2;
             oprot.WriteFieldBegin(field);
             SquareMessage.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (SenderDisplayName != null && __isset.senderDisplayName)
         {
             field.Name = "senderDisplayName";
             field.Type = TType.String;
             field.ID   = 3;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(SenderDisplayName);
             oprot.WriteFieldEnd();
         }
         if (__isset.unreadCount)
         {
             field.Name = "unreadCount";
             field.Type = TType.I32;
             field.ID   = 4;
             oprot.WriteFieldBegin(field);
             oprot.WriteI32(UnreadCount);
             oprot.WriteFieldEnd();
         }
         if (__isset.requiredToFetchChatEvents)
         {
             field.Name = "requiredToFetchChatEvents";
             field.Type = TType.Bool;
             field.ID   = 5;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(RequiredToFetchChatEvents);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }