Class: Verizon::PrivateNetworkApns
- Defined in:
- lib/verizon/models/private_network_apns.rb
Overview
PrivateNetworkApns Model.
Instance Attribute Summary collapse
-
#address_assignment_method ⇒ String
The method used for address assignment.
-
#apn_name ⇒ String
the Access Point Name.
-
#ipaddress ⇒ String
A IPv4 address.
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(apn_name = SKIP, address_assignment_method = SKIP, ipaddress = SKIP) ⇒ PrivateNetworkApns
constructor
A new instance of PrivateNetworkApns.
-
#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(apn_name = SKIP, address_assignment_method = SKIP, ipaddress = SKIP) ⇒ PrivateNetworkApns
Returns a new instance of PrivateNetworkApns.
51 52 53 54 55 56 57 58 59 |
# File 'lib/verizon/models/private_network_apns.rb', line 51 def initialize(apn_name = SKIP, address_assignment_method = SKIP, ipaddress = SKIP) @apn_name = apn_name unless apn_name == SKIP unless address_assignment_method == SKIP @address_assignment_method = address_assignment_method end @ipaddress = ipaddress unless ipaddress == SKIP end |
Instance Attribute Details
#address_assignment_method ⇒ String
The method used for address assignment.
18 19 20 |
# File 'lib/verizon/models/private_network_apns.rb', line 18 def address_assignment_method @address_assignment_method end |
#apn_name ⇒ String
the Access Point Name
14 15 16 |
# File 'lib/verizon/models/private_network_apns.rb', line 14 def apn_name @apn_name end |
#ipaddress ⇒ String
A IPv4 address
22 23 24 |
# File 'lib/verizon/models/private_network_apns.rb', line 22 def ipaddress @ipaddress end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/verizon/models/private_network_apns.rb', line 62 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. apn_name = hash.key?('apnName') ? hash['apnName'] : SKIP address_assignment_method = hash.key?('addressAssignmentMethod') ? hash['addressAssignmentMethod'] : SKIP ipaddress = hash.key?('ipAddress') ? hash['ipAddress'] : SKIP # Create object from extracted values. PrivateNetworkApns.new(apn_name, address_assignment_method, ipaddress) end |
.names ⇒ Object
A mapping from model property names to API property names.
25 26 27 28 29 30 31 |
# File 'lib/verizon/models/private_network_apns.rb', line 25 def self.names @_hash = {} if @_hash.nil? @_hash['apn_name'] = 'apnName' @_hash['address_assignment_method'] = 'addressAssignmentMethod' @_hash['ipaddress'] = 'ipAddress' @_hash end |
.nullables ⇒ Object
An array for nullable fields
43 44 45 46 47 48 49 |
# File 'lib/verizon/models/private_network_apns.rb', line 43 def self.nullables %w[ apn_name address_assignment_method ipaddress ] end |
.optionals ⇒ Object
An array for optional fields
34 35 36 37 38 39 40 |
# File 'lib/verizon/models/private_network_apns.rb', line 34 def self.optionals %w[ apn_name address_assignment_method ipaddress ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
85 86 87 88 89 |
# File 'lib/verizon/models/private_network_apns.rb', line 85 def inspect class_name = self.class.name.split('::').last "<#{class_name} apn_name: #{@apn_name.inspect}, address_assignment_method:"\ " #{@address_assignment_method.inspect}, ipaddress: #{@ipaddress.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
78 79 80 81 82 |
# File 'lib/verizon/models/private_network_apns.rb', line 78 def to_s class_name = self.class.name.split('::').last "<#{class_name} apn_name: #{@apn_name}, address_assignment_method:"\ " #{@address_assignment_method}, ipaddress: #{@ipaddress}>" end |