'Construct a new Gate request status.
Args:
operation: [AgentOperation] The operation this status is for.
original_response: [string] The original JSON with the status identifier.'

def __init__(self, operation, original_response=None):

    super(GateTaskStatus, self).__init__(operation, original_response)
    if (not original_response.ok()):
        self._bind_error(original_response.error_message)
        self.current_state = 'HTTP_ERROR'
        return
    doc = None
    try:
        doc = json.JSONDecoder().decode(original_response.output)
    except (ValueError, TypeError):
        pass
    if isinstance(doc, dict):
        self._bind_detail_path(doc['ref'])
        self._bind_id(self.detail_path)
    else:
        self._bind_error("Invalid    response='{0}'".format(original_response))
        self.current_state = 'CITEST_INTERNAL_ERROR'
