Class: Etna::Clients::Polyphemus::RedcapJobRequest

Inherits:
Struct
  • Object
show all
Includes:
JsonSerializableStruct
Defined in:
lib/etna/clients/polyphemus/models.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from JsonSerializableStruct

#as_json, included

Constructor Details

#initialize(**params) ⇒ RedcapJobRequest

Returns a new instance of RedcapJobRequest.



19
20
21
# File 'lib/etna/clients/polyphemus/models.rb', line 19

def initialize(**params)
  super({model_names: 'all', mode: nil, commit: false}.update(params))
end

Instance Attribute Details

#commitObject

Returns the value of attribute commit

Returns:

  • (Object)

    the current value of commit



16
17
18
# File 'lib/etna/clients/polyphemus/models.rb', line 16

def commit
  @commit
end

#modeObject

Returns the value of attribute mode

Returns:

  • (Object)

    the current value of mode



16
17
18
# File 'lib/etna/clients/polyphemus/models.rb', line 16

def mode
  @mode
end

#model_namesObject

Returns the value of attribute model_names

Returns:

  • (Object)

    the current value of model_names



16
17
18
# File 'lib/etna/clients/polyphemus/models.rb', line 16

def model_names
  @model_names
end

#project_nameObject

Returns the value of attribute project_name

Returns:

  • (Object)

    the current value of project_name



16
17
18
# File 'lib/etna/clients/polyphemus/models.rb', line 16

def project_name
  @project_name
end

#redcap_tokensObject

Returns the value of attribute redcap_tokens

Returns:

  • (Object)

    the current value of redcap_tokens



16
17
18
# File 'lib/etna/clients/polyphemus/models.rb', line 16

def redcap_tokens
  @redcap_tokens
end

Instance Method Details

#to_jsonObject



23
24
25
26
27
28
29
30
31
32
33
# File 'lib/etna/clients/polyphemus/models.rb', line 23

def to_json
  {
    job_type: Etna::Clients::Polyphemus::JobType::REDCAP,
    job_params: {
      commit: commit,
      model_names: model_names,
      redcap_tokens: redcap_tokens,
      mode: mode
    }
  }.to_json
end