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



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

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:

  • (String)


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:

  • (String)


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

def destination_id
  @destination_id
end

#nameString

Name of the job

Returns:

  • (String)


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

def name
  @name
end

#parameter_group_idString

Identifier of the Parameter Group that contains the key-value pairs

Returns:

  • (String)


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

def parameter_group_id
  @parameter_group_id
end

#processor_idString

Identifier of the Processor that processes the data

Returns:

  • (String)


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:

  • (String)


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:

  • (String)


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

def region
  @region
end

#slaDouble

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

Returns:

  • (Double)


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



50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/batchly_api/models/create_job_request.rb', line 50

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['ParameterGroupId'] = self.parameter_group_id
  hash['DestinationId'] = self.destination_id
  hash['Region'] = self.region
  hash['SLA'] = self.sla
  hash
end

#to_jsonObject

Creates JSON of the curent object



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

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