Class: UntitledApi::ApiV1OrgsSsrUpgradeResponse2

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

Overview

Response data

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(create_at = SKIP, strategy = SKIP, target_count = SKIP, versions = SKIP, reboot_at = SKIP, device_type = SKIP, start_time = SKIP, last_device_status_update_time = SKIP, status = SKIP, channel = SKIP, device_ids = SKIP, download_start_time = SKIP, audit_id = SKIP, ttl = SKIP, id = SKIP, targets = SKIP) ⇒ ApiV1OrgsSsrUpgradeResponse2



126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# File 'lib/untitled_api/models/api_v1_orgs_ssr_upgrade_response2.rb', line 126

def initialize(create_at = SKIP,
               strategy = SKIP,
               target_count = SKIP,
               versions = SKIP,
               reboot_at = SKIP,
               device_type = SKIP,
               start_time = SKIP,
               last_device_status_update_time = SKIP,
               status = SKIP,
               channel = SKIP,
               device_ids = SKIP,
               download_start_time = SKIP,
               audit_id = SKIP,
               ttl = SKIP,
               id = SKIP,
               targets = SKIP)
  @create_at = create_at unless create_at == SKIP
  @strategy = strategy unless strategy == SKIP
  @target_count = target_count unless target_count == SKIP
  @versions = versions unless versions == SKIP
  @reboot_at = reboot_at unless reboot_at == SKIP
  @device_type = device_type unless device_type == SKIP
  @start_time = start_time unless start_time == SKIP
  unless last_device_status_update_time == SKIP
    @last_device_status_update_time =
      last_device_status_update_time
  end
  @status = status unless status == SKIP
  @channel = channel unless channel == SKIP
  @device_ids = device_ids unless device_ids == SKIP
  @download_start_time = download_start_time unless download_start_time == SKIP
  @audit_id = audit_id unless audit_id == SKIP
  @ttl = ttl unless ttl == SKIP
  @id = id unless id == SKIP
  @targets = targets unless targets == SKIP
end

Instance Attribute Details

#audit_idString

TODO: Write general description for this method



62
63
64
# File 'lib/untitled_api/models/api_v1_orgs_ssr_upgrade_response2.rb', line 62

def audit_id
  @audit_id
end

#channelString

TODO: Write general description for this method



50
51
52
# File 'lib/untitled_api/models/api_v1_orgs_ssr_upgrade_response2.rb', line 50

def channel
  @channel
end

#create_atFloat

TODO: Write general description for this method



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

def create_at
  @create_at
end

#device_idsObject

TODO: Write general description for this method



54
55
56
# File 'lib/untitled_api/models/api_v1_orgs_ssr_upgrade_response2.rb', line 54

def device_ids
  @device_ids
end

#device_typeString

TODO: Write general description for this method



34
35
36
# File 'lib/untitled_api/models/api_v1_orgs_ssr_upgrade_response2.rb', line 34

def device_type
  @device_type
end

#download_start_timeFloat

TODO: Write general description for this method



58
59
60
# File 'lib/untitled_api/models/api_v1_orgs_ssr_upgrade_response2.rb', line 58

def download_start_time
  @download_start_time
end

#idString

TODO: Write general description for this method



70
71
72
# File 'lib/untitled_api/models/api_v1_orgs_ssr_upgrade_response2.rb', line 70

def id
  @id
end

#last_device_status_update_timeFloat

TODO: Write general description for this method



42
43
44
# File 'lib/untitled_api/models/api_v1_orgs_ssr_upgrade_response2.rb', line 42

def last_device_status_update_time
  @last_device_status_update_time
end

#reboot_atFloat

TODO: Write general description for this method



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

def reboot_at
  @reboot_at
end

#start_timeFloat

TODO: Write general description for this method



38
39
40
# File 'lib/untitled_api/models/api_v1_orgs_ssr_upgrade_response2.rb', line 38

def start_time
  @start_time
end

#statusString

TODO: Write general description for this method



46
47
48
# File 'lib/untitled_api/models/api_v1_orgs_ssr_upgrade_response2.rb', line 46

def status
  @status
end

#strategyString

TODO: Write general description for this method



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

def strategy
  @strategy
end

#target_countFloat

TODO: Write general description for this method



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

def target_count
  @target_count
end

#targetsObject

TODO: Write general description for this method



74
75
76
# File 'lib/untitled_api/models/api_v1_orgs_ssr_upgrade_response2.rb', line 74

def targets
  @targets
end

#ttlFloat

TODO: Write general description for this method



66
67
68
# File 'lib/untitled_api/models/api_v1_orgs_ssr_upgrade_response2.rb', line 66

def ttl
  @ttl
end

#versionsObject

TODO: Write general description for this method



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

def versions
  @versions
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
# File 'lib/untitled_api/models/api_v1_orgs_ssr_upgrade_response2.rb', line 164

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  create_at = hash.key?('create_at') ? hash['create_at'] : SKIP
  strategy = hash.key?('strategy') ? hash['strategy'] : SKIP
  target_count = hash.key?('target_count') ? hash['target_count'] : SKIP
  versions = hash.key?('versions') ? hash['versions'] : SKIP
  reboot_at = hash.key?('reboot_at') ? hash['reboot_at'] : SKIP
  device_type = hash.key?('device_type') ? hash['device_type'] : SKIP
  start_time = hash.key?('start_time') ? hash['start_time'] : SKIP
  last_device_status_update_time =
    hash.key?('last_device_status_update_time') ? hash['last_device_status_update_time'] : SKIP
  status = hash.key?('status') ? hash['status'] : SKIP
  channel = hash.key?('channel') ? hash['channel'] : SKIP
  device_ids = hash.key?('device_ids') ? hash['device_ids'] : SKIP
  download_start_time =
    hash.key?('download_start_time') ? hash['download_start_time'] : SKIP
  audit_id = hash.key?('audit_id') ? hash['audit_id'] : SKIP
  ttl = hash.key?('_ttl') ? hash['_ttl'] : SKIP
  id = hash.key?('_id') ? hash['_id'] : SKIP
  targets = hash.key?('targets') ? hash['targets'] : SKIP

  # Create object from extracted values.
  ApiV1OrgsSsrUpgradeResponse2.new(create_at,
                                   strategy,
                                   target_count,
                                   versions,
                                   reboot_at,
                                   device_type,
                                   start_time,
                                   last_device_status_update_time,
                                   status,
                                   channel,
                                   device_ids,
                                   download_start_time,
                                   audit_id,
                                   ttl,
                                   id,
                                   targets)
end

.namesObject

A mapping from model property names to API property names.



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/untitled_api/models/api_v1_orgs_ssr_upgrade_response2.rb', line 77

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['create_at'] = 'create_at'
  @_hash['strategy'] = 'strategy'
  @_hash['target_count'] = 'target_count'
  @_hash['versions'] = 'versions'
  @_hash['reboot_at'] = 'reboot_at'
  @_hash['device_type'] = 'device_type'
  @_hash['start_time'] = 'start_time'
  @_hash['last_device_status_update_time'] =
    'last_device_status_update_time'
  @_hash['status'] = 'status'
  @_hash['channel'] = 'channel'
  @_hash['device_ids'] = 'device_ids'
  @_hash['download_start_time'] = 'download_start_time'
  @_hash['audit_id'] = 'audit_id'
  @_hash['ttl'] = '_ttl'
  @_hash['id'] = '_id'
  @_hash['targets'] = 'targets'
  @_hash
end

.nullablesObject

An array for nullable fields



122
123
124
# File 'lib/untitled_api/models/api_v1_orgs_ssr_upgrade_response2.rb', line 122

def self.nullables
  []
end

.optionalsObject

An array for optional fields



100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# File 'lib/untitled_api/models/api_v1_orgs_ssr_upgrade_response2.rb', line 100

def self.optionals
  %w[
    create_at
    strategy
    target_count
    versions
    reboot_at
    device_type
    start_time
    last_device_status_update_time
    status
    channel
    device_ids
    download_start_time
    audit_id
    ttl
    id
    targets
  ]
end