Class: Verizon::RetrievesAvailableFilesResponse

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/verizon/models/retrieves_available_files_response.rb

Overview

RetrievesAvailableFilesResponse Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(file_name: SKIP, file_version: SKIP, release_note: SKIP, make: SKIP, model: SKIP, local_target_path: SKIP, distribution_type: SKIP, device_platform_id: SKIP, additional_properties: nil) ⇒ RetrievesAvailableFilesResponse

Returns a new instance of RetrievesAvailableFilesResponse.



78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/verizon/models/retrieves_available_files_response.rb', line 78

def initialize(file_name: SKIP, file_version: SKIP, release_note: SKIP,
               make: SKIP, model: SKIP, local_target_path: SKIP,
               distribution_type: SKIP, device_platform_id: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @file_name = file_name unless file_name == SKIP
  @file_version = file_version unless file_version == SKIP
  @release_note = release_note unless release_note == SKIP
  @make = make unless make == SKIP
  @model = model unless model == SKIP
  @local_target_path = local_target_path unless local_target_path == SKIP
  @distribution_type = distribution_type unless distribution_type == SKIP
  @device_platform_id = device_platform_id unless device_platform_id == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#device_platform_idString

The platform (Android, iOS, etc.,) that the software can be applied to.

Returns:

  • (String)


43
44
45
# File 'lib/verizon/models/retrieves_available_files_response.rb', line 43

def device_platform_id
  @device_platform_id
end

#distribution_typeString

Valid values

Returns:

  • (String)


39
40
41
# File 'lib/verizon/models/retrieves_available_files_response.rb', line 39

def distribution_type
  @distribution_type
end

#file_nameString

ThingSpace-generated name of the file. You will use this name when listing or scheduling campaigns for the file.

Returns:

  • (String)


15
16
17
# File 'lib/verizon/models/retrieves_available_files_response.rb', line 15

def file_name
  @file_name
end

#file_versionString

Version of the file.

Returns:

  • (String)


19
20
21
# File 'lib/verizon/models/retrieves_available_files_response.rb', line 19

def file_version
  @file_version
end

#local_target_pathString

Local target path on the device.

Returns:

  • (String)


35
36
37
# File 'lib/verizon/models/retrieves_available_files_response.rb', line 35

def local_target_path
  @local_target_path
end

#makeString

The software-applicable device make.

Returns:

  • (String)


27
28
29
# File 'lib/verizon/models/retrieves_available_files_response.rb', line 27

def make
  @make
end

#modelString

The software-applicable device model.

Returns:

  • (String)


31
32
33
# File 'lib/verizon/models/retrieves_available_files_response.rb', line 31

def model
  @model
end

#release_noteString

Software release note.

Returns:

  • (String)


23
24
25
# File 'lib/verizon/models/retrieves_available_files_response.rb', line 23

def release_note
  @release_note
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# File 'lib/verizon/models/retrieves_available_files_response.rb', line 97

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  file_name = hash.key?('fileName') ? hash['fileName'] : SKIP
  file_version = hash.key?('fileVersion') ? hash['fileVersion'] : SKIP
  release_note = hash.key?('releaseNote') ? hash['releaseNote'] : SKIP
  make = hash.key?('make') ? hash['make'] : SKIP
  model = hash.key?('model') ? hash['model'] : SKIP
  local_target_path =
    hash.key?('localTargetPath') ? hash['localTargetPath'] : SKIP
  distribution_type =
    hash.key?('distributionType') ? hash['distributionType'] : SKIP
  device_platform_id =
    hash.key?('devicePlatformId') ? hash['devicePlatformId'] : SKIP

  # Create a new hash for additional properties, removing known properties.
  new_hash = hash.reject { |k, _| names.value?(k) }

  additional_properties = APIHelper.get_additional_properties(
    new_hash, proc { |value| value }
  )

  # Create object from extracted values.
  RetrievesAvailableFilesResponse.new(file_name: file_name,
                                      file_version: file_version,
                                      release_note: release_note,
                                      make: make,
                                      model: model,
                                      local_target_path: local_target_path,
                                      distribution_type: distribution_type,
                                      device_platform_id: device_platform_id,
                                      additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/verizon/models/retrieves_available_files_response.rb', line 46

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['file_name'] = 'fileName'
  @_hash['file_version'] = 'fileVersion'
  @_hash['release_note'] = 'releaseNote'
  @_hash['make'] = 'make'
  @_hash['model'] = 'model'
  @_hash['local_target_path'] = 'localTargetPath'
  @_hash['distribution_type'] = 'distributionType'
  @_hash['device_platform_id'] = 'devicePlatformId'
  @_hash
end

.nullablesObject

An array for nullable fields



74
75
76
# File 'lib/verizon/models/retrieves_available_files_response.rb', line 74

def self.nullables
  []
end

.optionalsObject

An array for optional fields



60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/verizon/models/retrieves_available_files_response.rb', line 60

def self.optionals
  %w[
    file_name
    file_version
    release_note
    make
    model
    local_target_path
    distribution_type
    device_platform_id
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



142
143
144
145
146
147
148
149
# File 'lib/verizon/models/retrieves_available_files_response.rb', line 142

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} file_name: #{@file_name.inspect}, file_version: #{@file_version.inspect},"\
  " release_note: #{@release_note.inspect}, make: #{@make.inspect}, model: #{@model.inspect},"\
  " local_target_path: #{@local_target_path.inspect}, distribution_type:"\
  " #{@distribution_type.inspect}, device_platform_id: #{@device_platform_id.inspect},"\
  " additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



133
134
135
136
137
138
139
# File 'lib/verizon/models/retrieves_available_files_response.rb', line 133

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} file_name: #{@file_name}, file_version: #{@file_version}, release_note:"\
  " #{@release_note}, make: #{@make}, model: #{@model}, local_target_path:"\
  " #{@local_target_path}, distribution_type: #{@distribution_type}, device_platform_id:"\
  " #{@device_platform_id}, additional_properties: #{@additional_properties}>"
end