RAPP Platform API
 All Classes Namespaces Files Functions Variables Typedefs
CognitiveRecordPerformance.py
Go to the documentation of this file.
1 from RappCloud.Objects import (
2  File,
3  Payload)
4 
5 from Cloud import (
6  CloudMsg,
7  CloudRequest,
8  CloudResponse)
9 
10 
12  """ Cognitive Record Performance Cloud Message object """
13 
14  class Request(CloudRequest):
15  """ Cognitive Record Performance Cloud Request object.
16 
17  CognitiveRecordPerformance.Request
18  """
19  def __init__(self, **kwargs):
20  """!
21  Constructor
22 
23  @param **kwargs - Keyword arguments. Apply values to the request attributes.
24  - @ref test_instance
25  - @ref score
26  """
27 
28  ## Cognitive Exercise test instance. The full cognitive test entry
29  # name as obtained from CognitiveExerciseSelect
30  self.test_instance = ''
31  ## Performance score to record.
32  self.score = 0
33  super(CognitiveRecordPerformance.Request, self).__init__(**kwargs)
34 
35 
36  def make_payload(self):
37  """ Create and return the Payload of the Request. """
38  return Payload(
39  test_instance=self.test_instance,
40  score=self.score)
41 
42 
43  def make_files(self):
44  """ Create and return Array of File objects of the Request. """
45  return []
46 
47 
48  class Response(CloudResponse):
49  """ Cognitive Record Performance Cloud Response object.
50 
51  CognitiveRecordPerformance.Response
52  """
53  def __init__(self, **kwargs):
54  """!
55  Constructor
56 
57  @param **kwargs - Keyword arguments. Apply values to the request attributes.
58  - @ref error
59  - @ref performance_entry
60  """
61 
62  ## Error message
63  self.error = ''
64  ## Cognitive exercise ontology performance entry.
66  super(CognitiveRecordPerformance.Response, self).__init__(**kwargs)
67 
68 
69  def __init__(self, **kwargs):
70  """!
71  Constructor
72 
73  @param **kwargs - Keyword argumen.ts. Apply values to the request attributes.
74  - @ref Request.test_instance
75  - @ref Request.score
76  """
77 
78  # Create and hold the Request object for this CloudMsg
80  # Create and hold the Response object for this CloudMsg
82  super(CognitiveRecordPerformance, self).__init__(
83  svcname='cognitive_record_performance', **kwargs)
84 
85