Class: OCI::ApmSynthetics::Models::Node
- Inherits:
- 
      Object
      
        - Object
- OCI::ApmSynthetics::Models::Node
 
- Defined in:
- lib/oci/apm_synthetics/models/node.rb
Overview
Details of the network node.
Constant Summary collapse
- TYPE_ENUM =
- [ TYPE_SOURCE = 'SOURCE'.freeze, TYPE_DESTINATION = 'DESTINATION'.freeze, TYPE_ANONYMOUS = 'ANONYMOUS'.freeze, TYPE_INTERNAL = 'INTERNAL'.freeze, TYPE_DANGLING = 'DANGLING'.freeze, TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze 
Instance Attribute Summary collapse
- 
  
    
      #avg_packet_loss_percent  ⇒ Float 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Percentage of the average packet loss. 
- 
  
    
      #avg_packet_response_time_in_ms  ⇒ Float 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Average packet response time in milliseconds. 
- 
  
    
      #consecutive_anonymous_count  ⇒ Integer 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Number of consecutive anonymous network nodes. 
- 
  
    
      #display_name  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Display name of the network node. 
- 
  
    
      #geo_info  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Geographical information of the network node. 
- 
  
    
      #id  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    [Required] ID of the network node. 
- 
  
    
      #ip_address  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    IP address of the network node. 
- 
  
    
      #level  ⇒ Integer 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Level of the network node. 
- 
  
    
      #outgoing_links  ⇒ Array<String> 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Outgoing links from the network node. 
- 
  
    
      #type  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Type of network node. 
Class Method Summary collapse
- 
  
    
      .attribute_map  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Attribute mapping from ruby-style variable name to JSON key. 
- 
  
    
      .swagger_types  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Attribute type mapping. 
Instance Method Summary collapse
- 
  
    
      #==(other)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Checks equality by comparing each attribute. 
- 
  
    
      #build_from_hash(attributes)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Builds the object from hash. 
- #eql?(other) ⇒ Boolean
- 
  
    
      #hash  ⇒ Fixnum 
    
    
  
  
  
  
  
  
  
  
  
    Calculates hash code according to all attributes. 
- 
  
    
      #initialize(attributes = {})  ⇒ Node 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    Initializes the object. 
- 
  
    
      #to_hash  ⇒ Hash 
    
    
  
  
  
  
  
  
  
  
  
    Returns the object in the form of hash. 
- 
  
    
      #to_s  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    Returns the string representation of the object. 
Constructor Details
#initialize(attributes = {}) ⇒ Node
Initializes the object
| 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | # File 'lib/oci/apm_synthetics/models/node.rb', line 113 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.id = attributes[:'id'] if attributes[:'id'] self.ip_address = attributes[:'ipAddress'] if attributes[:'ipAddress'] raise 'You cannot provide both :ipAddress and :ip_address' if attributes.key?(:'ipAddress') && attributes.key?(:'ip_address') self.ip_address = attributes[:'ip_address'] if attributes[:'ip_address'] self.display_name = attributes[:'displayName'] if attributes[:'displayName'] raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name') self.display_name = attributes[:'display_name'] if attributes[:'display_name'] self.geo_info = attributes[:'geoInfo'] if attributes[:'geoInfo'] raise 'You cannot provide both :geoInfo and :geo_info' if attributes.key?(:'geoInfo') && attributes.key?(:'geo_info') self.geo_info = attributes[:'geo_info'] if attributes[:'geo_info'] self.outgoing_links = attributes[:'outgoingLinks'] if attributes[:'outgoingLinks'] raise 'You cannot provide both :outgoingLinks and :outgoing_links' if attributes.key?(:'outgoingLinks') && attributes.key?(:'outgoing_links') self.outgoing_links = attributes[:'outgoing_links'] if attributes[:'outgoing_links'] self.consecutive_anonymous_count = attributes[:'consecutiveAnonymousCount'] if attributes[:'consecutiveAnonymousCount'] raise 'You cannot provide both :consecutiveAnonymousCount and :consecutive_anonymous_count' if attributes.key?(:'consecutiveAnonymousCount') && attributes.key?(:'consecutive_anonymous_count') self.consecutive_anonymous_count = attributes[:'consecutive_anonymous_count'] if attributes[:'consecutive_anonymous_count'] self.level = attributes[:'level'] if attributes[:'level'] self.avg_packet_response_time_in_ms = attributes[:'avgPacketResponseTimeInMs'] if attributes[:'avgPacketResponseTimeInMs'] raise 'You cannot provide both :avgPacketResponseTimeInMs and :avg_packet_response_time_in_ms' if attributes.key?(:'avgPacketResponseTimeInMs') && attributes.key?(:'avg_packet_response_time_in_ms') self.avg_packet_response_time_in_ms = attributes[:'avg_packet_response_time_in_ms'] if attributes[:'avg_packet_response_time_in_ms'] self.avg_packet_loss_percent = attributes[:'avgPacketLossPercent'] if attributes[:'avgPacketLossPercent'] raise 'You cannot provide both :avgPacketLossPercent and :avg_packet_loss_percent' if attributes.key?(:'avgPacketLossPercent') && attributes.key?(:'avg_packet_loss_percent') self.avg_packet_loss_percent = attributes[:'avg_packet_loss_percent'] if attributes[:'avg_packet_loss_percent'] self.type = attributes[:'type'] if attributes[:'type'] end | 
Instance Attribute Details
#avg_packet_loss_percent ⇒ Float
Percentage of the average packet loss.
| 55 56 57 | # File 'lib/oci/apm_synthetics/models/node.rb', line 55 def avg_packet_loss_percent @avg_packet_loss_percent end | 
#avg_packet_response_time_in_ms ⇒ Float
Average packet response time in milliseconds.
| 51 52 53 | # File 'lib/oci/apm_synthetics/models/node.rb', line 51 def avg_packet_response_time_in_ms @avg_packet_response_time_in_ms end | 
#consecutive_anonymous_count ⇒ Integer
Number of consecutive anonymous network nodes.
| 43 44 45 | # File 'lib/oci/apm_synthetics/models/node.rb', line 43 def consecutive_anonymous_count @consecutive_anonymous_count end | 
#display_name ⇒ String
Display name of the network node.
| 31 32 33 | # File 'lib/oci/apm_synthetics/models/node.rb', line 31 def display_name @display_name end | 
#geo_info ⇒ String
Geographical information of the network node.
| 35 36 37 | # File 'lib/oci/apm_synthetics/models/node.rb', line 35 def geo_info @geo_info end | 
#id ⇒ String
[Required] ID of the network node.
| 23 24 25 | # File 'lib/oci/apm_synthetics/models/node.rb', line 23 def id @id end | 
#ip_address ⇒ String
IP address of the network node.
| 27 28 29 | # File 'lib/oci/apm_synthetics/models/node.rb', line 27 def ip_address @ip_address end | 
#level ⇒ Integer
Level of the network node.
| 47 48 49 | # File 'lib/oci/apm_synthetics/models/node.rb', line 47 def level @level end | 
#outgoing_links ⇒ Array<String>
Outgoing links from the network node.
| 39 40 41 | # File 'lib/oci/apm_synthetics/models/node.rb', line 39 def outgoing_links @outgoing_links end | 
#type ⇒ String
Type of network node.
| 59 60 61 | # File 'lib/oci/apm_synthetics/models/node.rb', line 59 def type @type end | 
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
| 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | # File 'lib/oci/apm_synthetics/models/node.rb', line 62 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'ip_address': :'ipAddress', 'display_name': :'displayName', 'geo_info': :'geoInfo', 'outgoing_links': :'outgoingLinks', 'consecutive_anonymous_count': :'consecutiveAnonymousCount', 'level': :'level', 'avg_packet_response_time_in_ms': :'avgPacketResponseTimeInMs', 'avg_packet_loss_percent': :'avgPacketLossPercent', 'type': :'type' # rubocop:enable Style/SymbolLiteral } end | 
.swagger_types ⇒ Object
Attribute type mapping.
| 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | # File 'lib/oci/apm_synthetics/models/node.rb', line 80 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'ip_address': :'String', 'display_name': :'String', 'geo_info': :'String', 'outgoing_links': :'Array<String>', 'consecutive_anonymous_count': :'Integer', 'level': :'Integer', 'avg_packet_response_time_in_ms': :'Float', 'avg_packet_loss_percent': :'Float', 'type': :'String' # rubocop:enable Style/SymbolLiteral } end | 
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
| 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 | # File 'lib/oci/apm_synthetics/models/node.rb', line 188 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && ip_address == other.ip_address && display_name == other.display_name && geo_info == other.geo_info && outgoing_links == other.outgoing_links && consecutive_anonymous_count == other.consecutive_anonymous_count && level == other.level && avg_packet_response_time_in_ms == other.avg_packet_response_time_in_ms && avg_packet_loss_percent == other.avg_packet_loss_percent && type == other.type end | 
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
| 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | # File 'lib/oci/apm_synthetics/models/node.rb', line 227 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end | 
#eql?(other) ⇒ Boolean
| 207 208 209 | # File 'lib/oci/apm_synthetics/models/node.rb', line 207 def eql?(other) self == other end | 
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
| 216 217 218 | # File 'lib/oci/apm_synthetics/models/node.rb', line 216 def hash [id, ip_address, display_name, geo_info, outgoing_links, consecutive_anonymous_count, level, avg_packet_response_time_in_ms, avg_packet_loss_percent, type].hash end | 
#to_hash ⇒ Hash
Returns the object in the form of hash
| 260 261 262 263 264 265 266 267 268 269 | # File 'lib/oci/apm_synthetics/models/node.rb', line 260 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end | 
#to_s ⇒ String
Returns the string representation of the object
| 254 255 256 | # File 'lib/oci/apm_synthetics/models/node.rb', line 254 def to_s to_hash.to_s end |