Class: Verizon::DevicesConsentResult
- Defined in:
- lib/verizon/models/devices_consent_result.rb
Overview
DevicesConsentResult Model.
Instance Attribute Summary collapse
-
#account_name ⇒ String
Account identifier in “##########-#####”.
-
#all_device ⇒ TrueClass | FalseClass
Exclude all devices or not?.
-
#exclusion ⇒ Array[String]
Device ID list.
-
#has_more_data ⇒ TrueClass | FalseClass
Are there more devices to retrieve or not?.
-
#total_count ⇒ Integer
Total number of excluded devices in the account.
-
#update_time ⇒ String
Last update time.
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(account_name: SKIP, all_device: SKIP, has_more_data: SKIP, total_count: SKIP, update_time: SKIP, exclusion: SKIP, additional_properties: nil) ⇒ DevicesConsentResult
constructor
A new instance of DevicesConsentResult.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(account_name: SKIP, all_device: SKIP, has_more_data: SKIP, total_count: SKIP, update_time: SKIP, exclusion: SKIP, additional_properties: nil) ⇒ DevicesConsentResult
Returns a new instance of DevicesConsentResult.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/verizon/models/devices_consent_result.rb', line 65 def initialize(account_name: SKIP, all_device: SKIP, has_more_data: SKIP, total_count: SKIP, update_time: SKIP, exclusion: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @account_name = account_name unless account_name == SKIP @all_device = all_device unless all_device == SKIP @has_more_data = has_more_data unless has_more_data == SKIP @total_count = total_count unless total_count == SKIP @update_time = update_time unless update_time == SKIP @exclusion = exclusion unless exclusion == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#account_name ⇒ String
Account identifier in “##########-#####”.
14 15 16 |
# File 'lib/verizon/models/devices_consent_result.rb', line 14 def account_name @account_name end |
#all_device ⇒ TrueClass | FalseClass
Exclude all devices or not?
18 19 20 |
# File 'lib/verizon/models/devices_consent_result.rb', line 18 def all_device @all_device end |
#exclusion ⇒ Array[String]
Device ID list.
34 35 36 |
# File 'lib/verizon/models/devices_consent_result.rb', line 34 def exclusion @exclusion end |
#has_more_data ⇒ TrueClass | FalseClass
Are there more devices to retrieve or not?
22 23 24 |
# File 'lib/verizon/models/devices_consent_result.rb', line 22 def has_more_data @has_more_data end |
#total_count ⇒ Integer
Total number of excluded devices in the account.
26 27 28 |
# File 'lib/verizon/models/devices_consent_result.rb', line 26 def total_count @total_count end |
#update_time ⇒ String
Last update time.
30 31 32 |
# File 'lib/verizon/models/devices_consent_result.rb', line 30 def update_time @update_time end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/verizon/models/devices_consent_result.rb', line 81 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_name = hash.key?('accountName') ? hash['accountName'] : SKIP all_device = hash.key?('allDevice') ? hash['allDevice'] : SKIP has_more_data = hash.key?('hasMoreData') ? hash['hasMoreData'] : SKIP total_count = hash.key?('totalCount') ? hash['totalCount'] : SKIP update_time = hash.key?('updateTime') ? hash['updateTime'] : SKIP exclusion = hash.key?('exclusion') ? hash['exclusion'] : 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. DevicesConsentResult.new(account_name: account_name, all_device: all_device, has_more_data: has_more_data, total_count: total_count, update_time: update_time, exclusion: exclusion, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/verizon/models/devices_consent_result.rb', line 37 def self.names @_hash = {} if @_hash.nil? @_hash['account_name'] = 'accountName' @_hash['all_device'] = 'allDevice' @_hash['has_more_data'] = 'hasMoreData' @_hash['total_count'] = 'totalCount' @_hash['update_time'] = 'updateTime' @_hash['exclusion'] = 'exclusion' @_hash end |
.nullables ⇒ Object
An array for nullable fields
61 62 63 |
# File 'lib/verizon/models/devices_consent_result.rb', line 61 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
49 50 51 52 53 54 55 56 57 58 |
# File 'lib/verizon/models/devices_consent_result.rb', line 49 def self.optionals %w[ account_name all_device has_more_data total_count update_time exclusion ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
118 119 120 121 122 123 124 |
# File 'lib/verizon/models/devices_consent_result.rb', line 118 def inspect class_name = self.class.name.split('::').last "<#{class_name} account_name: #{@account_name.inspect}, all_device: #{@all_device.inspect},"\ " has_more_data: #{@has_more_data.inspect}, total_count: #{@total_count.inspect},"\ " update_time: #{@update_time.inspect}, exclusion: #{@exclusion.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
110 111 112 113 114 115 |
# File 'lib/verizon/models/devices_consent_result.rb', line 110 def to_s class_name = self.class.name.split('::').last "<#{class_name} account_name: #{@account_name}, all_device: #{@all_device}, has_more_data:"\ " #{@has_more_data}, total_count: #{@total_count}, update_time: #{@update_time}, exclusion:"\ " #{@exclusion}, additional_properties: #{@additional_properties}>" end |