Class: UntitledApi::ApiV1OrgsMxedgesUpgradeResponse3

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

Overview

ApiV1OrgsMxedgesUpgradeResponse3 Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(status = SKIP, strategy = SKIP, channel = SKIP, distro = SKIP, device_type = SKIP, create_at = SKIP, start_time = SKIP, reboot_at = SKIP, device_ids = SKIP, target_count = SKIP, max_failure_percentage = SKIP, max_failures = SKIP, is_distro_upgrade = SKIP, targets = SKIP, id = SKIP) ⇒ ApiV1OrgsMxedgesUpgradeResponse3

Returns a new instance of ApiV1OrgsMxedgesUpgradeResponse3.



119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# File 'lib/untitled_api/models/api_v1_orgs_mxedges_upgrade_response3.rb', line 119

def initialize(status = SKIP,
               strategy = SKIP,
               channel = SKIP,
               distro = SKIP,
               device_type = SKIP,
               create_at = SKIP,
               start_time = SKIP,
               reboot_at = SKIP,
               device_ids = SKIP,
               target_count = SKIP,
               max_failure_percentage = SKIP,
               max_failures = SKIP,
               is_distro_upgrade = SKIP,
               targets = SKIP,
               id = SKIP)
  @status = status unless status == SKIP
  @strategy = strategy unless strategy == SKIP
  @channel = channel unless channel == SKIP
  @distro = distro unless distro == SKIP
  @device_type = device_type unless device_type == SKIP
  @create_at = create_at unless create_at == SKIP
  @start_time = start_time unless start_time == SKIP
  @reboot_at = reboot_at unless reboot_at == SKIP
  @device_ids = device_ids unless device_ids == SKIP
  @target_count = target_count unless target_count == SKIP
  @max_failure_percentage = max_failure_percentage unless max_failure_percentage == SKIP
  @max_failures = max_failures unless max_failures == SKIP
  @is_distro_upgrade = is_distro_upgrade unless is_distro_upgrade == SKIP
  @targets = targets unless targets == SKIP
  @id = id unless id == SKIP
end

Instance Attribute Details

#channelString

TODO: Write general description for this method

Returns:

  • (String)


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

def channel
  @channel
end

#create_atFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def create_at
  @create_at
end

#device_idsObject

TODO: Write general description for this method

Returns:

  • (Object)


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

def device_ids
  @device_ids
end

#device_typeString

TODO: Write general description for this method

Returns:

  • (String)


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

def device_type
  @device_type
end

#distroString

TODO: Write general description for this method

Returns:

  • (String)


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

def distro
  @distro
end

#idString

TODO: Write general description for this method

Returns:

  • (String)


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

def id
  @id
end

#is_distro_upgradeObject

TODO: Write general description for this method

Returns:

  • (Object)


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

def is_distro_upgrade
  @is_distro_upgrade
end

#max_failure_percentageObject

TODO: Write general description for this method

Returns:

  • (Object)


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

def max_failure_percentage
  @max_failure_percentage
end

#max_failuresObject

TODO: Write general description for this method

Returns:

  • (Object)


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

def max_failures
  @max_failures
end

#reboot_atFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def reboot_at
  @reboot_at
end

#start_timeFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def start_time
  @start_time
end

#statusString

TODO: Write general description for this method

Returns:

  • (String)


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

def status
  @status
end

#strategyString

TODO: Write general description for this method

Returns:

  • (String)


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

def strategy
  @strategy
end

#target_countFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def target_count
  @target_count
end

#targetsObject

TODO: Write general description for this method

Returns:

  • (Object)


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

def targets
  @targets
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



152
153
154
155
156
157
158
159
160
161
162
163
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
# File 'lib/untitled_api/models/api_v1_orgs_mxedges_upgrade_response3.rb', line 152

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  status = hash.key?('status') ? hash['status'] : SKIP
  strategy = hash.key?('strategy') ? hash['strategy'] : SKIP
  channel = hash.key?('channel') ? hash['channel'] : SKIP
  distro = hash.key?('distro') ? hash['distro'] : SKIP
  device_type = hash.key?('device_type') ? hash['device_type'] : SKIP
  create_at = hash.key?('create_at') ? hash['create_at'] : SKIP
  start_time = hash.key?('start_time') ? hash['start_time'] : SKIP
  reboot_at = hash.key?('reboot_at') ? hash['reboot_at'] : SKIP
  device_ids = hash.key?('device_ids') ? hash['device_ids'] : SKIP
  target_count = hash.key?('target_count') ? hash['target_count'] : SKIP
  max_failure_percentage =
    hash.key?('max_failure_percentage') ? hash['max_failure_percentage'] : SKIP
  max_failures = hash.key?('max_failures') ? hash['max_failures'] : SKIP
  is_distro_upgrade =
    hash.key?('is_distro_upgrade') ? hash['is_distro_upgrade'] : SKIP
  targets = hash.key?('targets') ? hash['targets'] : SKIP
  id = hash.key?('id') ? hash['id'] : SKIP

  # Create object from extracted values.
  ApiV1OrgsMxedgesUpgradeResponse3.new(status,
                                       strategy,
                                       channel,
                                       distro,
                                       device_type,
                                       create_at,
                                       start_time,
                                       reboot_at,
                                       device_ids,
                                       target_count,
                                       max_failure_percentage,
                                       max_failures,
                                       is_distro_upgrade,
                                       targets,
                                       id)
end

.namesObject

A mapping from model property names to API property names.



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

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['status'] = 'status'
  @_hash['strategy'] = 'strategy'
  @_hash['channel'] = 'channel'
  @_hash['distro'] = 'distro'
  @_hash['device_type'] = 'device_type'
  @_hash['create_at'] = 'create_at'
  @_hash['start_time'] = 'start_time'
  @_hash['reboot_at'] = 'reboot_at'
  @_hash['device_ids'] = 'device_ids'
  @_hash['target_count'] = 'target_count'
  @_hash['max_failure_percentage'] = 'max_failure_percentage'
  @_hash['max_failures'] = 'max_failures'
  @_hash['is_distro_upgrade'] = 'is_distro_upgrade'
  @_hash['targets'] = 'targets'
  @_hash['id'] = 'id'
  @_hash
end

.nullablesObject

An array for nullable fields



115
116
117
# File 'lib/untitled_api/models/api_v1_orgs_mxedges_upgrade_response3.rb', line 115

def self.nullables
  []
end

.optionalsObject

An array for optional fields



94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# File 'lib/untitled_api/models/api_v1_orgs_mxedges_upgrade_response3.rb', line 94

def self.optionals
  %w[
    status
    strategy
    channel
    distro
    device_type
    create_at
    start_time
    reboot_at
    device_ids
    target_count
    max_failure_percentage
    max_failures
    is_distro_upgrade
    targets
    id
  ]
end