Class: UntitledApi::ApiV1SitesSyntheticTestResponse1

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/untitled_api/models/api_v1_sites_synthetic_test_response1.rb

Overview

ApiV1SitesSyntheticTestResponse1 Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(id = SKIP, start_time = SKIP, end_time = SKIP, status = SKIP, report_url = SKIP) ⇒ ApiV1SitesSyntheticTestResponse1

Returns a new instance of ApiV1SitesSyntheticTestResponse1.



59
60
61
62
63
64
65
66
67
68
69
# File 'lib/untitled_api/models/api_v1_sites_synthetic_test_response1.rb', line 59

def initialize(id = SKIP,
               start_time = SKIP,
               end_time = SKIP,
               status = SKIP,
               report_url = SKIP)
  @id = id unless id == SKIP
  @start_time = start_time unless start_time == SKIP
  @end_time = end_time unless end_time == SKIP
  @status = status unless status == SKIP
  @report_url = report_url unless report_url == SKIP
end

Instance Attribute Details

#end_timeFloat

TODO: Write general description for this method

Returns:

  • (Float)


22
23
24
# File 'lib/untitled_api/models/api_v1_sites_synthetic_test_response1.rb', line 22

def end_time
  @end_time
end

#idString

TODO: Write general description for this method

Returns:

  • (String)


14
15
16
# File 'lib/untitled_api/models/api_v1_sites_synthetic_test_response1.rb', line 14

def id
  @id
end

#report_urlString

TODO: Write general description for this method

Returns:

  • (String)


30
31
32
# File 'lib/untitled_api/models/api_v1_sites_synthetic_test_response1.rb', line 30

def report_url
  @report_url
end

#start_timeFloat

TODO: Write general description for this method

Returns:

  • (Float)


18
19
20
# File 'lib/untitled_api/models/api_v1_sites_synthetic_test_response1.rb', line 18

def start_time
  @start_time
end

#statusString

TODO: Write general description for this method

Returns:

  • (String)


26
27
28
# File 'lib/untitled_api/models/api_v1_sites_synthetic_test_response1.rb', line 26

def status
  @status
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/untitled_api/models/api_v1_sites_synthetic_test_response1.rb', line 72

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  id = hash.key?('id') ? hash['id'] : SKIP
  start_time = hash.key?('start_time') ? hash['start_time'] : SKIP
  end_time = hash.key?('end_time') ? hash['end_time'] : SKIP
  status = hash.key?('status') ? hash['status'] : SKIP
  report_url = hash.key?('report_url') ? hash['report_url'] : SKIP

  # Create object from extracted values.
  ApiV1SitesSyntheticTestResponse1.new(id,
                                       start_time,
                                       end_time,
                                       status,
                                       report_url)
end

.namesObject

A mapping from model property names to API property names.



33
34
35
36
37
38
39
40
41
# File 'lib/untitled_api/models/api_v1_sites_synthetic_test_response1.rb', line 33

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['id'] = 'id'
  @_hash['start_time'] = 'start_time'
  @_hash['end_time'] = 'end_time'
  @_hash['status'] = 'status'
  @_hash['report_url'] = 'report_url'
  @_hash
end

.nullablesObject

An array for nullable fields



55
56
57
# File 'lib/untitled_api/models/api_v1_sites_synthetic_test_response1.rb', line 55

def self.nullables
  []
end

.optionalsObject

An array for optional fields



44
45
46
47
48
49
50
51
52
# File 'lib/untitled_api/models/api_v1_sites_synthetic_test_response1.rb', line 44

def self.optionals
  %w[
    id
    start_time
    end_time
    status
    report_url
  ]
end