def write()

in if/py/gen-py/fbnet/command_runner_asyncio/CommandRunner/ttypes.py [0:0]


  def write(self, oprot):
    if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None:
      oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0))
      return
    if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None:
      oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2))
      return
    oprot.writeStructBegin('SessionData')
    if self.subsystem != None:
      oprot.writeFieldBegin('subsystem', TType.STRING, 1)
      oprot.writeString(self.subsystem.encode('utf-8')) if UTF8STRINGS and not isinstance(self.subsystem, bytes) else oprot.writeString(self.subsystem)
      oprot.writeFieldEnd()
    if self.exec_command != None:
      oprot.writeFieldBegin('exec_command', TType.STRING, 2)
      oprot.writeString(self.exec_command.encode('utf-8')) if UTF8STRINGS and not isinstance(self.exec_command, bytes) else oprot.writeString(self.exec_command)
      oprot.writeFieldEnd()
    if self.extra_options != None:
      oprot.writeFieldBegin('extra_options', TType.MAP, 3)
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extra_options))
      for kiter9,viter10 in self.extra_options.items():
        oprot.writeString(kiter9.encode('utf-8')) if UTF8STRINGS and not isinstance(kiter9, bytes) else oprot.writeString(kiter9)
        oprot.writeString(viter10.encode('utf-8')) if UTF8STRINGS and not isinstance(viter10, bytes) else oprot.writeString(viter10)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()