Class: Verizon::GetWirelessCoverageRequestFwa
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::GetWirelessCoverageRequestFwa
- Defined in:
- lib/verizon/models/get_wireless_coverage_request_fwa.rb
Overview
Get wireless coverage FWA.
Instance Attribute Summary collapse
-
#account_name ⇒ String
Account name.
-
#location_type ⇒ String
Type of location detail.
-
#locations ⇒ Locations
Type of location detail.
-
#network_types_list ⇒ Array[NetworkTypeObject]
Type of location detail.
-
#request_type ⇒ String
Type of request made.
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(account_name:, request_type:, location_type:, locations:, network_types_list:) ⇒ GetWirelessCoverageRequestFwa
constructor
A new instance of GetWirelessCoverageRequestFwa.
-
#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:, request_type:, location_type:, locations:, network_types_list:) ⇒ GetWirelessCoverageRequestFwa
Returns a new instance of GetWirelessCoverageRequestFwa.
54 55 56 57 58 59 60 61 |
# File 'lib/verizon/models/get_wireless_coverage_request_fwa.rb', line 54 def initialize(account_name:, request_type:, location_type:, locations:, network_types_list:) @account_name = account_name @request_type = request_type @location_type = location_type @locations = locations @network_types_list = network_types_list end |
Instance Attribute Details
#account_name ⇒ String
Account name.
14 15 16 |
# File 'lib/verizon/models/get_wireless_coverage_request_fwa.rb', line 14 def account_name @account_name end |
#location_type ⇒ String
Type of location detail.
23 24 25 |
# File 'lib/verizon/models/get_wireless_coverage_request_fwa.rb', line 23 def location_type @location_type end |
#locations ⇒ Locations
Type of location detail.
27 28 29 |
# File 'lib/verizon/models/get_wireless_coverage_request_fwa.rb', line 27 def locations @locations end |
#network_types_list ⇒ Array[NetworkTypeObject]
Type of location detail.
31 32 33 |
# File 'lib/verizon/models/get_wireless_coverage_request_fwa.rb', line 31 def network_types_list @network_types_list end |
#request_type ⇒ String
Type of request made. FWA for address qualification and NW for Nationwide coverage.
19 20 21 |
# File 'lib/verizon/models/get_wireless_coverage_request_fwa.rb', line 19 def request_type @request_type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/verizon/models/get_wireless_coverage_request_fwa.rb', line 64 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_name = hash.key?('accountName') ? hash['accountName'] : nil request_type = hash.key?('requestType') ? hash['requestType'] : nil location_type = hash.key?('locationType') ? hash['locationType'] : nil locations = Locations.from_hash(hash['locations']) if hash['locations'] # Parameter is an array, so we need to iterate through it network_types_list = nil unless hash['networkTypesList'].nil? network_types_list = [] hash['networkTypesList'].each do |structure| network_types_list << (NetworkTypeObject.from_hash(structure) if structure) end end network_types_list = nil unless hash.key?('networkTypesList') # Create object from extracted values. GetWirelessCoverageRequestFwa.new(account_name: account_name, request_type: request_type, location_type: location_type, locations: locations, network_types_list: network_types_list) end |
.names ⇒ Object
A mapping from model property names to API property names.
34 35 36 37 38 39 40 41 42 |
# File 'lib/verizon/models/get_wireless_coverage_request_fwa.rb', line 34 def self.names @_hash = {} if @_hash.nil? @_hash['account_name'] = 'accountName' @_hash['request_type'] = 'requestType' @_hash['location_type'] = 'locationType' @_hash['locations'] = 'locations' @_hash['network_types_list'] = 'networkTypesList' @_hash end |
.nullables ⇒ Object
An array for nullable fields
50 51 52 |
# File 'lib/verizon/models/get_wireless_coverage_request_fwa.rb', line 50 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
45 46 47 |
# File 'lib/verizon/models/get_wireless_coverage_request_fwa.rb', line 45 def self.optionals [] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
93 94 95 96 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 |
# File 'lib/verizon/models/get_wireless_coverage_request_fwa.rb', line 93 def self.validate(value) if value.instance_of? self return ( APIHelper.valid_type?(value.account_name, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.request_type, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.location_type, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.locations, ->(val) { Locations.validate(val) }, is_model_hash: true) and APIHelper.valid_type?(value.network_types_list, ->(val) { NetworkTypeObject.validate(val) }, is_model_hash: true, is_inner_model_hash: true) ) end return false unless value.instance_of? Hash ( APIHelper.valid_type?(value['accountName'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['requestType'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['locationType'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['locations'], ->(val) { Locations.validate(val) }, is_model_hash: true) and APIHelper.valid_type?(value['networkTypesList'], ->(val) { NetworkTypeObject.validate(val) }, is_model_hash: true, is_inner_model_hash: true) ) end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
140 141 142 143 144 145 |
# File 'lib/verizon/models/get_wireless_coverage_request_fwa.rb', line 140 def inspect class_name = self.class.name.split('::').last "<#{class_name} account_name: #{@account_name.inspect}, request_type:"\ " #{@request_type.inspect}, location_type: #{@location_type.inspect}, locations:"\ " #{@locations.inspect}, network_types_list: #{@network_types_list.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
132 133 134 135 136 137 |
# File 'lib/verizon/models/get_wireless_coverage_request_fwa.rb', line 132 def to_s class_name = self.class.name.split('::').last "<#{class_name} account_name: #{@account_name}, request_type: #{@request_type},"\ " location_type: #{@location_type}, locations: #{@locations}, network_types_list:"\ " #{@network_types_list}>" end |