Added JobProgressAdapter

This commit is contained in:
mjames-upc 2018-09-06 20:14:11 -06:00
parent b66bd7af3e
commit e3b4fc8060

View file

@ -0,0 +1,34 @@
##
##
#
# Adapter for com.raytheon.uf.common.dataplugin.gfe.svcbu.JobProgress
#
#
# SOFTWARE HISTORY
#
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# 06/22/2015 4573 randerso Initial creation
#
#
#
from thrift.Thrift import TType
from dynamicserialize.dstypes.com.raytheon.uf.common.dataplugin.gfe.svcbu import JobProgress
ClassAdapter = 'com.raytheon.uf.common.dataplugin.gfe.svcbu.JobProgress'
def serialize(context, mode):
context.protocol.writeFieldBegin('__enumValue__', TType.STRING, 0)
context.writeString(mode.value)
def deserialize(context):
result = JobProgress()
# Read the TType.STRING, "__enumValue__", and id.
# We're not interested in any of those, so just discard them.
context.protocol.readFieldBegin()
# now get the actual enum value
result.value = context.readString()
return result