Class: BatchlyApi::CreateJobRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/batchly_api/models/create_job_request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name) ⇒ Object



43
44
45
# File 'lib/batchly_api/models/create_job_request.rb', line 43

def method_missing (method_name)
  puts "there's no method called '#{method_name}'"
end

Instance Attribute Details

#data_source_idString

Identifier of the DataSource from which data is extracted for processing

Returns:



20
21
22
# File 'lib/batchly_api/models/create_job_request.rb', line 20

def data_source_id
  @data_source_id
end

#destination_idString

Identifier fo the DataSource into which processed data is sent

Returns:



24
25
26
# File 'lib/batchly_api/models/create_job_request.rb', line 24

def destination_id
  @destination_id
end

#nameString

Name of the job

Returns:



8
9
10
# File 'lib/batchly_api/models/create_job_request.rb', line 8

def name
  @name
end

#parametersmixed

Parameter name and values that should be sent to the processor. The values can be changed for each run when calling the “Execute” endpoint.

Returns:



40
41
42
# File 'lib/batchly_api/models/create_job_request.rb', line 40

def parameters
  @parameters
end

#processor_idString

Identifier of the Processor that processes the data

Returns:



16
17
18
# File 'lib/batchly_api/models/create_job_request.rb', line 16

def processor_id
  @processor_id
end

#project_idString

Identifier of the Project under which the job should execute

Returns:



12
13
14
# File 'lib/batchly_api/models/create_job_request.rb', line 12

def project_id
  @project_id
end

#regionString

Default Region in which the job should execute. You can change region for each run when calling “Execute” endpoint.

Returns:



32
33
34
# File 'lib/batchly_api/models/create_job_request.rb', line 32

def region
  @region
end

#scheduleJobSchedule

Schedule information of Job if it should be managed by Scheduler

Returns:



28
29
30
# File 'lib/batchly_api/models/create_job_request.rb', line 28

def schedule
  @schedule
end

#slaDouble

Default SLA for the job execution. You can change SLA for each run when calling the “Execute” endpoint.

Returns:



36
37
38
# File 'lib/batchly_api/models/create_job_request.rb', line 36

def sla
  @sla
end

Instance Method Details

#key_mapObject

Defines the key map for json serialization



54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/batchly_api/models/create_job_request.rb', line 54

def key_map
  hash = {}
  hash['Name'] = self.name
  hash['ProjectId'] = self.project_id
  hash['ProcessorId'] = self.processor_id
  hash['DataSourceId'] = self.data_source_id
  hash['DestinationId'] = self.destination_id
  hash['Schedule'] = self.schedule
  hash['Region'] = self.region
  hash['SLA'] = self.sla
  hash['Parameters'] = self.parameters
  hash
end

#to_jsonObject

Creates JSON of the curent object



48
49
50
51
# File 'lib/batchly_api/models/create_job_request.rb', line 48

def to_json
  hash = self.key_map()
  hash.to_json
end