Method: Allq::JobResponse#initialize

Defined in:
lib/allq_client/models/job_response.rb

#initialize(attributes = {}) ⇒ JobResponse

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/allq_client/models/job_response.rb', line 57

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  if attributes.has_key?(:'id')
    self.id = attributes[:'id']
  end

  if attributes.has_key?(:'body')
    self.body = attributes[:'body']
  end

  if attributes.has_key?(:'tube')
    self.tube = attributes[:'tube']
  end

  if attributes.has_key?(:'expireds')
    self.expireds = attributes[:'expireds']
  else
    self.expireds = 0
  end

  if attributes.has_key?(:'releases')
    self.releases = attributes[:'releases']
  else
    self.releases = 0
  end
end