Class: Verizon::ResourcesServiceEndpoint
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::ResourcesServiceEndpoint
- Defined in:
- lib/verizon/models/resources_service_endpoint.rb
Overview
Service Endpoint path, address, and port.
Instance Attribute Summary collapse
-
#fqdn ⇒ String
FQDN of Service Endpoint if available.
-
#i_pv4_address ⇒ String
IPv4 Address of Service Endpoint if available.
-
#i_pv6_address ⇒ String
IPv6 Address of Service Endpoint if available.
-
#port ⇒ Integer
Port information of Service Endpoint if IPv4 or IPv6 is mentioned.
-
#uri ⇒ String
URI of Service Endpoint if available.
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(uri: SKIP, fqdn: SKIP, i_pv4_address: SKIP, i_pv6_address: SKIP, port: SKIP) ⇒ ResourcesServiceEndpoint
constructor
A new instance of ResourcesServiceEndpoint.
-
#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(uri: SKIP, fqdn: SKIP, i_pv4_address: SKIP, i_pv6_address: SKIP, port: SKIP) ⇒ ResourcesServiceEndpoint
Returns a new instance of ResourcesServiceEndpoint.
59 60 61 62 63 64 65 66 |
# File 'lib/verizon/models/resources_service_endpoint.rb', line 59 def initialize(uri: SKIP, fqdn: SKIP, i_pv4_address: SKIP, i_pv6_address: SKIP, port: SKIP) @uri = uri unless uri == SKIP @fqdn = fqdn unless fqdn == SKIP @i_pv4_address = i_pv4_address unless i_pv4_address == SKIP @i_pv6_address = i_pv6_address unless i_pv6_address == SKIP @port = port unless port == SKIP end |
Instance Attribute Details
#fqdn ⇒ String
FQDN of Service Endpoint if available.
18 19 20 |
# File 'lib/verizon/models/resources_service_endpoint.rb', line 18 def fqdn @fqdn end |
#i_pv4_address ⇒ String
IPv4 Address of Service Endpoint if available.
22 23 24 |
# File 'lib/verizon/models/resources_service_endpoint.rb', line 22 def i_pv4_address @i_pv4_address end |
#i_pv6_address ⇒ String
IPv6 Address of Service Endpoint if available.
26 27 28 |
# File 'lib/verizon/models/resources_service_endpoint.rb', line 26 def i_pv6_address @i_pv6_address end |
#port ⇒ Integer
Port information of Service Endpoint if IPv4 or IPv6 is mentioned.
30 31 32 |
# File 'lib/verizon/models/resources_service_endpoint.rb', line 30 def port @port end |
#uri ⇒ String
URI of Service Endpoint if available.
14 15 16 |
# File 'lib/verizon/models/resources_service_endpoint.rb', line 14 def uri @uri end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/verizon/models/resources_service_endpoint.rb', line 69 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. uri = hash.key?('URI') ? hash['URI'] : SKIP fqdn = hash.key?('FQDN') ? hash['FQDN'] : SKIP i_pv4_address = hash.key?('IPv4Address') ? hash['IPv4Address'] : SKIP i_pv6_address = hash.key?('IPv6Address') ? hash['IPv6Address'] : SKIP port = hash.key?('port') ? hash['port'] : SKIP # Create object from extracted values. ResourcesServiceEndpoint.new(uri: uri, fqdn: fqdn, i_pv4_address: i_pv4_address, i_pv6_address: i_pv6_address, port: port) end |
.names ⇒ Object
A mapping from model property names to API property names.
33 34 35 36 37 38 39 40 41 |
# File 'lib/verizon/models/resources_service_endpoint.rb', line 33 def self.names @_hash = {} if @_hash.nil? @_hash['uri'] = 'URI' @_hash['fqdn'] = 'FQDN' @_hash['i_pv4_address'] = 'IPv4Address' @_hash['i_pv6_address'] = 'IPv6Address' @_hash['port'] = 'port' @_hash end |
.nullables ⇒ Object
An array for nullable fields
55 56 57 |
# File 'lib/verizon/models/resources_service_endpoint.rb', line 55 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
44 45 46 47 48 49 50 51 52 |
# File 'lib/verizon/models/resources_service_endpoint.rb', line 44 def self.optionals %w[ uri fqdn i_pv4_address i_pv6_address port ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
95 96 97 98 99 100 |
# File 'lib/verizon/models/resources_service_endpoint.rb', line 95 def inspect class_name = self.class.name.split('::').last "<#{class_name} uri: #{@uri.inspect}, fqdn: #{@fqdn.inspect}, i_pv4_address:"\ " #{@i_pv4_address.inspect}, i_pv6_address: #{@i_pv6_address.inspect}, port:"\ " #{@port.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
88 89 90 91 92 |
# File 'lib/verizon/models/resources_service_endpoint.rb', line 88 def to_s class_name = self.class.name.split('::').last "<#{class_name} uri: #{@uri}, fqdn: #{@fqdn}, i_pv4_address: #{@i_pv4_address},"\ " i_pv6_address: #{@i_pv6_address}, port: #{@port}>" end |