Class: Verizon::UploadAndScheduleFileResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::UploadAndScheduleFileResponse
- Defined in:
- lib/verizon/models/upload_and_schedule_file_response.rb
Overview
UploadAndScheduleFileResponse Model.
Instance Attribute Summary collapse
-
#account_name ⇒ String
Account identifer.
-
#campaign_name ⇒ String
The campaign name.
-
#device_list ⇒ Array[String]
Device IMEI list.
-
#distribution_type ⇒ String
Valid values.
-
#download_after_date ⇒ String
Specifies the starting date the client should download the package.
-
#download_time_window_list ⇒ Array[DownloadTimeWindow]
List of allowed download time windows.
-
#end_date ⇒ String
Campaign end date.
-
#file_name ⇒ String
The name of the file you are upgrading to.
-
#file_version ⇒ String
The version of the file you are upgrading to.
-
#id ⇒ String
Updgrade identifier.
-
#install_after_date ⇒ String
The date after which you install the package.
-
#install_time_window_list ⇒ Array[DownloadTimeWindow]
List of allowed install time windows.
-
#make ⇒ String
Applicable make.
-
#model ⇒ String
Applicable model.
-
#software_from ⇒ String
Old software name.
-
#software_name ⇒ String
Software name.
-
#software_to ⇒ String
New software name.
-
#start_date ⇒ String
Campaign start date.
-
#status ⇒ String
Software update status.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(id = SKIP, account_name = SKIP, campaign_name = SKIP, software_name = SKIP, software_from = SKIP, software_to = SKIP, file_name = SKIP, file_version = SKIP, distribution_type = SKIP, make = SKIP, model = SKIP, start_date = SKIP, end_date = SKIP, download_after_date = SKIP, download_time_window_list = SKIP, install_after_date = SKIP, install_time_window_list = SKIP, device_list = SKIP, status = SKIP) ⇒ UploadAndScheduleFileResponse
constructor
A new instance of UploadAndScheduleFileResponse.
Methods inherited from BaseModel
Constructor Details
#initialize(id = SKIP, account_name = SKIP, campaign_name = SKIP, software_name = SKIP, software_from = SKIP, software_to = SKIP, file_name = SKIP, file_version = SKIP, distribution_type = SKIP, make = SKIP, model = SKIP, start_date = SKIP, end_date = SKIP, download_after_date = SKIP, download_time_window_list = SKIP, install_after_date = SKIP, install_time_window_list = SKIP, device_list = SKIP, status = SKIP) ⇒ UploadAndScheduleFileResponse
Returns a new instance of UploadAndScheduleFileResponse.
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/verizon/models/upload_and_schedule_file_response.rb', line 145 def initialize(id = SKIP, account_name = SKIP, campaign_name = SKIP, software_name = SKIP, software_from = SKIP, software_to = SKIP, file_name = SKIP, file_version = SKIP, distribution_type = SKIP, make = SKIP, model = SKIP, start_date = SKIP, end_date = SKIP, download_after_date = SKIP, download_time_window_list = SKIP, install_after_date = SKIP, install_time_window_list = SKIP, device_list = SKIP, status = SKIP) @id = id unless id == SKIP @account_name = account_name unless account_name == SKIP @campaign_name = campaign_name unless campaign_name == SKIP @software_name = software_name unless software_name == SKIP @software_from = software_from unless software_from == SKIP @software_to = software_to unless software_to == SKIP @file_name = file_name unless file_name == SKIP @file_version = file_version unless file_version == SKIP @distribution_type = distribution_type unless distribution_type == SKIP @make = make unless make == SKIP @model = model unless model == SKIP @start_date = start_date unless start_date == SKIP @end_date = end_date unless end_date == SKIP @download_after_date = download_after_date unless download_after_date == SKIP unless download_time_window_list == SKIP @download_time_window_list = download_time_window_list end @install_after_date = install_after_date unless install_after_date == SKIP @install_time_window_list = install_time_window_list unless install_time_window_list == SKIP @device_list = device_list unless device_list == SKIP @status = status unless status == SKIP end |
Instance Attribute Details
#account_name ⇒ String
Account identifer.
18 19 20 |
# File 'lib/verizon/models/upload_and_schedule_file_response.rb', line 18 def account_name @account_name end |
#campaign_name ⇒ String
The campaign name.
22 23 24 |
# File 'lib/verizon/models/upload_and_schedule_file_response.rb', line 22 def campaign_name @campaign_name end |
#device_list ⇒ Array[String]
Device IMEI list.
84 85 86 |
# File 'lib/verizon/models/upload_and_schedule_file_response.rb', line 84 def device_list @device_list end |
#distribution_type ⇒ String
Valid values
46 47 48 |
# File 'lib/verizon/models/upload_and_schedule_file_response.rb', line 46 def distribution_type @distribution_type end |
#download_after_date ⇒ String
Specifies the starting date the client should download the package. If null, client downloads as soon as possible.
67 68 69 |
# File 'lib/verizon/models/upload_and_schedule_file_response.rb', line 67 def download_after_date @download_after_date end |
#download_time_window_list ⇒ Array[DownloadTimeWindow]
List of allowed download time windows.
71 72 73 |
# File 'lib/verizon/models/upload_and_schedule_file_response.rb', line 71 def download_time_window_list @download_time_window_list end |
#end_date ⇒ String
Campaign end date.
62 63 64 |
# File 'lib/verizon/models/upload_and_schedule_file_response.rb', line 62 def end_date @end_date end |
#file_name ⇒ String
The name of the file you are upgrading to.
38 39 40 |
# File 'lib/verizon/models/upload_and_schedule_file_response.rb', line 38 def file_name @file_name end |
#file_version ⇒ String
The version of the file you are upgrading to.
42 43 44 |
# File 'lib/verizon/models/upload_and_schedule_file_response.rb', line 42 def file_version @file_version end |
#id ⇒ String
Updgrade identifier.
14 15 16 |
# File 'lib/verizon/models/upload_and_schedule_file_response.rb', line 14 def id @id end |
#install_after_date ⇒ String
The date after which you install the package. If null, install as soon as possible.
76 77 78 |
# File 'lib/verizon/models/upload_and_schedule_file_response.rb', line 76 def install_after_date @install_after_date end |
#install_time_window_list ⇒ Array[DownloadTimeWindow]
List of allowed install time windows.
80 81 82 |
# File 'lib/verizon/models/upload_and_schedule_file_response.rb', line 80 def install_time_window_list @install_time_window_list end |
#make ⇒ String
Applicable make.
50 51 52 |
# File 'lib/verizon/models/upload_and_schedule_file_response.rb', line 50 def make @make end |
#model ⇒ String
Applicable model.
54 55 56 |
# File 'lib/verizon/models/upload_and_schedule_file_response.rb', line 54 def model @model end |
#software_from ⇒ String
Old software name.
30 31 32 |
# File 'lib/verizon/models/upload_and_schedule_file_response.rb', line 30 def software_from @software_from end |
#software_name ⇒ String
Software name.
26 27 28 |
# File 'lib/verizon/models/upload_and_schedule_file_response.rb', line 26 def software_name @software_name end |
#software_to ⇒ String
New software name.
34 35 36 |
# File 'lib/verizon/models/upload_and_schedule_file_response.rb', line 34 def software_to @software_to end |
#start_date ⇒ String
Campaign start date.
58 59 60 |
# File 'lib/verizon/models/upload_and_schedule_file_response.rb', line 58 def start_date @start_date end |
#status ⇒ String
Software update status.
88 89 90 |
# File 'lib/verizon/models/upload_and_schedule_file_response.rb', line 88 def status @status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
# File 'lib/verizon/models/upload_and_schedule_file_response.rb', line 178 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. id = hash.key?('id') ? hash['id'] : SKIP account_name = hash.key?('accountName') ? hash['accountName'] : SKIP campaign_name = hash.key?('campaignName') ? hash['campaignName'] : SKIP software_name = hash.key?('softwareName') ? hash['softwareName'] : SKIP software_from = hash.key?('softwareFrom') ? hash['softwareFrom'] : SKIP software_to = hash.key?('softwareTo') ? hash['softwareTo'] : SKIP file_name = hash.key?('fileName') ? hash['fileName'] : SKIP file_version = hash.key?('fileVersion') ? hash['fileVersion'] : SKIP distribution_type = hash.key?('distributionType') ? hash['distributionType'] : SKIP make = hash.key?('make') ? hash['make'] : SKIP model = hash.key?('model') ? hash['model'] : SKIP start_date = hash.key?('startDate') ? hash['startDate'] : SKIP end_date = hash.key?('endDate') ? hash['endDate'] : SKIP download_after_date = hash.key?('downloadAfterDate') ? hash['downloadAfterDate'] : SKIP # Parameter is an array, so we need to iterate through it download_time_window_list = nil unless hash['downloadTimeWindowList'].nil? download_time_window_list = [] hash['downloadTimeWindowList'].each do |structure| download_time_window_list << (DownloadTimeWindow.from_hash(structure) if structure) end end download_time_window_list = SKIP unless hash.key?('downloadTimeWindowList') install_after_date = hash.key?('installAfterDate') ? hash['installAfterDate'] : SKIP # Parameter is an array, so we need to iterate through it install_time_window_list = nil unless hash['installTimeWindowList'].nil? install_time_window_list = [] hash['installTimeWindowList'].each do |structure| install_time_window_list << (DownloadTimeWindow.from_hash(structure) if structure) end end install_time_window_list = SKIP unless hash.key?('installTimeWindowList') device_list = hash.key?('deviceList') ? hash['deviceList'] : SKIP status = hash.key?('status') ? hash['status'] : SKIP # Create object from extracted values. UploadAndScheduleFileResponse.new(id, account_name, campaign_name, software_name, software_from, software_to, file_name, file_version, distribution_type, make, model, start_date, end_date, download_after_date, download_time_window_list, install_after_date, install_time_window_list, device_list, status) end |
.names ⇒ Object
A mapping from model property names to API property names.
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/verizon/models/upload_and_schedule_file_response.rb', line 91 def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['account_name'] = 'accountName' @_hash['campaign_name'] = 'campaignName' @_hash['software_name'] = 'softwareName' @_hash['software_from'] = 'softwareFrom' @_hash['software_to'] = 'softwareTo' @_hash['file_name'] = 'fileName' @_hash['file_version'] = 'fileVersion' @_hash['distribution_type'] = 'distributionType' @_hash['make'] = 'make' @_hash['model'] = 'model' @_hash['start_date'] = 'startDate' @_hash['end_date'] = 'endDate' @_hash['download_after_date'] = 'downloadAfterDate' @_hash['download_time_window_list'] = 'downloadTimeWindowList' @_hash['install_after_date'] = 'installAfterDate' @_hash['install_time_window_list'] = 'installTimeWindowList' @_hash['device_list'] = 'deviceList' @_hash['status'] = 'status' @_hash end |
.nullables ⇒ Object
An array for nullable fields
141 142 143 |
# File 'lib/verizon/models/upload_and_schedule_file_response.rb', line 141 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/verizon/models/upload_and_schedule_file_response.rb', line 116 def self.optionals %w[ id account_name campaign_name software_name software_from software_to file_name file_version distribution_type make model start_date end_date download_after_date download_time_window_list install_after_date install_time_window_list device_list status ] end |