Class: MistApi::IfStatPropertyServpInfo
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::IfStatPropertyServpInfo
- Defined in:
- lib/mist_api/models/if_stat_property_servp_info.rb
Overview
IfStatPropertyServpInfo Model.
Instance Attribute Summary collapse
-
#asn ⇒ String
TODO: Write general description for this method.
-
#city ⇒ String
TODO: Write general description for this method.
-
#country_code ⇒ String
TODO: Write general description for this method.
-
#latitude ⇒ Float
TODO: Write general description for this method.
-
#longitude ⇒ Float
TODO: Write general description for this method.
-
#org ⇒ String
TODO: Write general description for this method.
-
#region_code ⇒ String
TODO: Write general description for this method.
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(asn = SKIP, city = SKIP, country_code = SKIP, latitude = SKIP, longitude = SKIP, org = SKIP, region_code = SKIP) ⇒ IfStatPropertyServpInfo
constructor
A new instance of IfStatPropertyServpInfo.
-
#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(asn = SKIP, city = SKIP, country_code = SKIP, latitude = SKIP, longitude = SKIP, org = SKIP, region_code = SKIP) ⇒ IfStatPropertyServpInfo
Returns a new instance of IfStatPropertyServpInfo.
71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/mist_api/models/if_stat_property_servp_info.rb', line 71 def initialize(asn = SKIP, city = SKIP, country_code = SKIP, latitude = SKIP, longitude = SKIP, org = SKIP, region_code = SKIP) @asn = asn unless asn == SKIP @city = city unless city == SKIP @country_code = country_code unless country_code == SKIP @latitude = latitude unless latitude == SKIP @longitude = longitude unless longitude == SKIP @org = org unless org == SKIP @region_code = region_code unless region_code == SKIP end |
Instance Attribute Details
#asn ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/if_stat_property_servp_info.rb', line 14 def asn @asn end |
#city ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/if_stat_property_servp_info.rb', line 18 def city @city end |
#country_code ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/if_stat_property_servp_info.rb', line 22 def country_code @country_code end |
#latitude ⇒ Float
TODO: Write general description for this method
26 27 28 |
# File 'lib/mist_api/models/if_stat_property_servp_info.rb', line 26 def latitude @latitude end |
#longitude ⇒ Float
TODO: Write general description for this method
30 31 32 |
# File 'lib/mist_api/models/if_stat_property_servp_info.rb', line 30 def longitude @longitude end |
#org ⇒ String
TODO: Write general description for this method
34 35 36 |
# File 'lib/mist_api/models/if_stat_property_servp_info.rb', line 34 def org @org end |
#region_code ⇒ String
TODO: Write general description for this method
38 39 40 |
# File 'lib/mist_api/models/if_stat_property_servp_info.rb', line 38 def region_code @region_code end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/mist_api/models/if_stat_property_servp_info.rb', line 84 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. asn = hash.key?('asn') ? hash['asn'] : SKIP city = hash.key?('city') ? hash['city'] : SKIP country_code = hash.key?('country_code') ? hash['country_code'] : SKIP latitude = hash.key?('latitude') ? hash['latitude'] : SKIP longitude = hash.key?('longitude') ? hash['longitude'] : SKIP org = hash.key?('org') ? hash['org'] : SKIP region_code = hash.key?('region_code') ? hash['region_code'] : SKIP # Create object from extracted values. IfStatPropertyServpInfo.new(asn, city, country_code, latitude, longitude, org, region_code) end |
.names ⇒ Object
A mapping from model property names to API property names.
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/mist_api/models/if_stat_property_servp_info.rb', line 41 def self.names @_hash = {} if @_hash.nil? @_hash['asn'] = 'asn' @_hash['city'] = 'city' @_hash['country_code'] = 'country_code' @_hash['latitude'] = 'latitude' @_hash['longitude'] = 'longitude' @_hash['org'] = 'org' @_hash['region_code'] = 'region_code' @_hash end |
.nullables ⇒ Object
An array for nullable fields
67 68 69 |
# File 'lib/mist_api/models/if_stat_property_servp_info.rb', line 67 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/mist_api/models/if_stat_property_servp_info.rb', line 54 def self.optionals %w[ asn city country_code latitude longitude org region_code ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
114 115 116 117 118 119 |
# File 'lib/mist_api/models/if_stat_property_servp_info.rb', line 114 def inspect class_name = self.class.name.split('::').last "<#{class_name} asn: #{@asn.inspect}, city: #{@city.inspect}, country_code:"\ " #{@country_code.inspect}, latitude: #{@latitude.inspect}, longitude:"\ " #{@longitude.inspect}, org: #{@org.inspect}, region_code: #{@region_code.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
107 108 109 110 111 |
# File 'lib/mist_api/models/if_stat_property_servp_info.rb', line 107 def to_s class_name = self.class.name.split('::').last "<#{class_name} asn: #{@asn}, city: #{@city}, country_code: #{@country_code}, latitude:"\ " #{@latitude}, longitude: #{@longitude}, org: #{@org}, region_code: #{@region_code}>" end |