Class: OCI::DatabaseManagement::Models::EntityDiscovered
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::EntityDiscovered
- Defined in:
- lib/oci/database_management/models/entity_discovered.rb
Overview
The details of the base entity discovery. This class has direct subclasses. If you are using this class as input to a service operations then you should favor using a subclass over the base class
Direct Known Subclasses
ExternalDatabaseSystemDiscoverySummary, ExternalExadataInfrastructureDiscovery, ExternalExadataInfrastructureDiscoverySummary, ExternalStorageGridDiscoverySummary, ExternalStorageServerDiscoverySummary
Constant Summary collapse
- DISCOVER_STATUS_ENUM =
[ DISCOVER_STATUS_PREV_DISCOVERED = 'PREV_DISCOVERED'.freeze, DISCOVER_STATUS_NEW_DISCOVERED = 'NEW_DISCOVERED'.freeze, DISCOVER_STATUS_NOT_FOUND = 'NOT_FOUND'.freeze, DISCOVER_STATUS_DISCOVERING = 'DISCOVERING'.freeze, DISCOVER_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- ENTITY_TYPE_ENUM =
[ ENTITY_TYPE_STORAGE_SERVER_DISCOVER_SUMMARY = 'STORAGE_SERVER_DISCOVER_SUMMARY'.freeze, ENTITY_TYPE_STORAGE_GRID_DISCOVER_SUMMARY = 'STORAGE_GRID_DISCOVER_SUMMARY'.freeze, ENTITY_TYPE_DATABASE_SYSTEM_DISCOVER_SUMMARY = 'DATABASE_SYSTEM_DISCOVER_SUMMARY'.freeze, ENTITY_TYPE_INFRASTRUCTURE_DISCOVER_SUMMARY = 'INFRASTRUCTURE_DISCOVER_SUMMARY'.freeze, ENTITY_TYPE_INFRASTRUCTURE_DISCOVER = 'INFRASTRUCTURE_DISCOVER'.freeze, ENTITY_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#agent_id ⇒ String
The OCID of the agent used for monitoring.
-
#connector_id ⇒ String
The OCID of the associated connector.
-
#discover_error_code ⇒ String
The error code of the discovery.
-
#discover_error_msg ⇒ String
The error message of the discovery.
-
#discover_status ⇒ String
The status of the entity discovery.
-
#display_name ⇒ String
[Required] The name of the entity.
-
#entity_type ⇒ String
[Required] The type of discovered entities.
-
#id ⇒ String
The OCID of the entity discovered.
-
#internal_id ⇒ String
The internal identifier of the entity.
-
#status ⇒ String
The status of the entity.
-
#version ⇒ String
The version of the entity.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.get_subtype(object_hash) ⇒ Object
Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
-
.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 = {}) ⇒ EntityDiscovered
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 = {}) ⇒ EntityDiscovered
Initializes the object
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/oci/database_management/models/entity_discovered.rb', line 148 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.agent_id = attributes[:'agentId'] if attributes[:'agentId'] raise 'You cannot provide both :agentId and :agent_id' if attributes.key?(:'agentId') && attributes.key?(:'agent_id') self.agent_id = attributes[:'agent_id'] if attributes[:'agent_id'] self.connector_id = attributes[:'connectorId'] if attributes[:'connectorId'] raise 'You cannot provide both :connectorId and :connector_id' if attributes.key?(:'connectorId') && attributes.key?(:'connector_id') self.connector_id = attributes[:'connector_id'] if attributes[:'connector_id'] 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.version = attributes[:'version'] if attributes[:'version'] self.internal_id = attributes[:'internalId'] if attributes[:'internalId'] raise 'You cannot provide both :internalId and :internal_id' if attributes.key?(:'internalId') && attributes.key?(:'internal_id') self.internal_id = attributes[:'internal_id'] if attributes[:'internal_id'] self.status = attributes[:'status'] if attributes[:'status'] self.discover_status = attributes[:'discoverStatus'] if attributes[:'discoverStatus'] self.discover_status = "NEW_DISCOVERED" if discover_status.nil? && !attributes.key?(:'discoverStatus') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :discoverStatus and :discover_status' if attributes.key?(:'discoverStatus') && attributes.key?(:'discover_status') self.discover_status = attributes[:'discover_status'] if attributes[:'discover_status'] self.discover_status = "NEW_DISCOVERED" if discover_status.nil? && !attributes.key?(:'discoverStatus') && !attributes.key?(:'discover_status') # rubocop:disable Style/StringLiterals self.discover_error_code = attributes[:'discoverErrorCode'] if attributes[:'discoverErrorCode'] raise 'You cannot provide both :discoverErrorCode and :discover_error_code' if attributes.key?(:'discoverErrorCode') && attributes.key?(:'discover_error_code') self.discover_error_code = attributes[:'discover_error_code'] if attributes[:'discover_error_code'] self.discover_error_msg = attributes[:'discoverErrorMsg'] if attributes[:'discoverErrorMsg'] raise 'You cannot provide both :discoverErrorMsg and :discover_error_msg' if attributes.key?(:'discoverErrorMsg') && attributes.key?(:'discover_error_msg') self.discover_error_msg = attributes[:'discover_error_msg'] if attributes[:'discover_error_msg'] self.entity_type = attributes[:'entityType'] if attributes[:'entityType'] raise 'You cannot provide both :entityType and :entity_type' if attributes.key?(:'entityType') && attributes.key?(:'entity_type') self.entity_type = attributes[:'entity_type'] if attributes[:'entity_type'] end |
Instance Attribute Details
#agent_id ⇒ String
The OCID of the agent used for monitoring.
36 37 38 |
# File 'lib/oci/database_management/models/entity_discovered.rb', line 36 def agent_id @agent_id end |
#connector_id ⇒ String
The OCID of the associated connector.
40 41 42 |
# File 'lib/oci/database_management/models/entity_discovered.rb', line 40 def connector_id @connector_id end |
#discover_error_code ⇒ String
The error code of the discovery.
64 65 66 |
# File 'lib/oci/database_management/models/entity_discovered.rb', line 64 def discover_error_code @discover_error_code end |
#discover_error_msg ⇒ String
The error message of the discovery.
68 69 70 |
# File 'lib/oci/database_management/models/entity_discovered.rb', line 68 def discover_error_msg @discover_error_msg end |
#discover_status ⇒ String
The status of the entity discovery.
60 61 62 |
# File 'lib/oci/database_management/models/entity_discovered.rb', line 60 def discover_status @discover_status end |
#display_name ⇒ String
[Required] The name of the entity.
44 45 46 |
# File 'lib/oci/database_management/models/entity_discovered.rb', line 44 def display_name @display_name end |
#entity_type ⇒ String
[Required] The type of discovered entities.
72 73 74 |
# File 'lib/oci/database_management/models/entity_discovered.rb', line 72 def entity_type @entity_type end |
#id ⇒ String
The OCID of the entity discovered.
32 33 34 |
# File 'lib/oci/database_management/models/entity_discovered.rb', line 32 def id @id end |
#internal_id ⇒ String
The internal identifier of the entity.
52 53 54 |
# File 'lib/oci/database_management/models/entity_discovered.rb', line 52 def internal_id @internal_id end |
#status ⇒ String
The status of the entity.
56 57 58 |
# File 'lib/oci/database_management/models/entity_discovered.rb', line 56 def status @status end |
#version ⇒ String
The version of the entity.
48 49 50 |
# File 'lib/oci/database_management/models/entity_discovered.rb', line 48 def version @version end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/oci/database_management/models/entity_discovered.rb', line 75 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'agent_id': :'agentId', 'connector_id': :'connectorId', 'display_name': :'displayName', 'version': :'version', 'internal_id': :'internalId', 'status': :'status', 'discover_status': :'discoverStatus', 'discover_error_code': :'discoverErrorCode', 'discover_error_msg': :'discoverErrorMsg', 'entity_type': :'entityType' # rubocop:enable Style/SymbolLiteral } end |
.get_subtype(object_hash) ⇒ Object
Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/oci/database_management/models/entity_discovered.rb', line 117 def self.get_subtype(object_hash) type = object_hash[:'entityType'] # rubocop:disable Style/SymbolLiteral return 'OCI::DatabaseManagement::Models::ExternalStorageGridDiscoverySummary' if type == 'STORAGE_GRID_DISCOVER_SUMMARY' return 'OCI::DatabaseManagement::Models::ExternalExadataInfrastructureDiscovery' if type == 'INFRASTRUCTURE_DISCOVER' return 'OCI::DatabaseManagement::Models::ExternalDatabaseSystemDiscoverySummary' if type == 'DATABASE_SYSTEM_DISCOVER_SUMMARY' return 'OCI::DatabaseManagement::Models::ExternalExadataInfrastructureDiscoverySummary' if type == 'INFRASTRUCTURE_DISCOVER_SUMMARY' return 'OCI::DatabaseManagement::Models::ExternalStorageServerDiscoverySummary' if type == 'STORAGE_SERVER_DISCOVER_SUMMARY' # TODO: Log a warning when the subtype is not found. 'OCI::DatabaseManagement::Models::EntityDiscovered' end |
.swagger_types ⇒ Object
Attribute type mapping.
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/oci/database_management/models/entity_discovered.rb', line 94 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'agent_id': :'String', 'connector_id': :'String', 'display_name': :'String', 'version': :'String', 'internal_id': :'String', 'status': :'String', 'discover_status': :'String', 'discover_error_code': :'String', 'discover_error_msg': :'String', 'entity_type': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 |
# File 'lib/oci/database_management/models/entity_discovered.rb', line 244 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && agent_id == other.agent_id && connector_id == other.connector_id && display_name == other.display_name && version == other.version && internal_id == other.internal_id && status == other.status && discover_status == other.discover_status && discover_error_code == other.discover_error_code && discover_error_msg == other.discover_error_msg && entity_type == other.entity_type end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 |
# File 'lib/oci/database_management/models/entity_discovered.rb', line 284 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
264 265 266 |
# File 'lib/oci/database_management/models/entity_discovered.rb', line 264 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
273 274 275 |
# File 'lib/oci/database_management/models/entity_discovered.rb', line 273 def hash [id, agent_id, connector_id, display_name, version, internal_id, status, discover_status, discover_error_code, discover_error_msg, entity_type].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
317 318 319 320 321 322 323 324 325 326 |
# File 'lib/oci/database_management/models/entity_discovered.rb', line 317 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
311 312 313 |
# File 'lib/oci/database_management/models/entity_discovered.rb', line 311 def to_s to_hash.to_s end |