Class: OCI::StackMonitoring::Models::DiscoveryDetails
- Inherits:
-
Object
- Object
- OCI::StackMonitoring::Models::DiscoveryDetails
- Defined in:
- lib/oci/stack_monitoring/models/discovery_details.rb
Overview
The request of DiscoveryJob Resource details.
Constant Summary collapse
- RESOURCE_TYPE_ENUM =
[ RESOURCE_TYPE_WEBLOGIC_DOMAIN = 'WEBLOGIC_DOMAIN'.freeze, RESOURCE_TYPE_EBS_INSTANCE = 'EBS_INSTANCE'.freeze, RESOURCE_TYPE_SQL_SERVER = 'SQL_SERVER'.freeze, RESOURCE_TYPE_APACHE_TOMCAT = 'APACHE_TOMCAT'.freeze, RESOURCE_TYPE_ORACLE_DATABASE = 'ORACLE_DATABASE'.freeze, RESOURCE_TYPE_OCI_ORACLE_DB = 'OCI_ORACLE_DB'.freeze, RESOURCE_TYPE_OCI_ORACLE_CDB = 'OCI_ORACLE_CDB'.freeze, RESOURCE_TYPE_OCI_ORACLE_PDB = 'OCI_ORACLE_PDB'.freeze, RESOURCE_TYPE_HOST = 'HOST'.freeze, RESOURCE_TYPE_ORACLE_PSFT = 'ORACLE_PSFT'.freeze, RESOURCE_TYPE_ORACLE_MFT = 'ORACLE_MFT'.freeze, RESOURCE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- LICENSE_ENUM =
[ LICENSE_STANDARD_EDITION = 'STANDARD_EDITION'.freeze, LICENSE_ENTERPRISE_EDITION = 'ENTERPRISE_EDITION'.freeze, LICENSE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#agent_id ⇒ String
[Required] The OCID of Management Agent.
- #credentials ⇒ OCI::StackMonitoring::Models::CredentialCollection
-
#license ⇒ String
License edition of the monitored resource.
-
#properties ⇒ OCI::StackMonitoring::Models::PropertyDetails
This attribute is required.
-
#resource_name ⇒ String
[Required] The Name of resource type.
-
#resource_type ⇒ String
[Required] Resource Type.
- #tags ⇒ OCI::StackMonitoring::Models::PropertyDetails
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 = {}) ⇒ DiscoveryDetails
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 = {}) ⇒ DiscoveryDetails
Initializes the object
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/oci/stack_monitoring/models/discovery_details.rb', line 102 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.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.resource_type = attributes[:'resourceType'] if attributes[:'resourceType'] raise 'You cannot provide both :resourceType and :resource_type' if attributes.key?(:'resourceType') && attributes.key?(:'resource_type') self.resource_type = attributes[:'resource_type'] if attributes[:'resource_type'] self.resource_name = attributes[:'resourceName'] if attributes[:'resourceName'] raise 'You cannot provide both :resourceName and :resource_name' if attributes.key?(:'resourceName') && attributes.key?(:'resource_name') self.resource_name = attributes[:'resource_name'] if attributes[:'resource_name'] self.license = attributes[:'license'] if attributes[:'license'] self.properties = attributes[:'properties'] if attributes[:'properties'] self.credentials = attributes[:'credentials'] if attributes[:'credentials'] self. = attributes[:'tags'] if attributes[:'tags'] end |
Instance Attribute Details
#agent_id ⇒ String
[Required] The OCID of Management Agent
35 36 37 |
# File 'lib/oci/stack_monitoring/models/discovery_details.rb', line 35 def agent_id @agent_id end |
#credentials ⇒ OCI::StackMonitoring::Models::CredentialCollection
54 55 56 |
# File 'lib/oci/stack_monitoring/models/discovery_details.rb', line 54 def credentials @credentials end |
#license ⇒ String
License edition of the monitored resource.
47 48 49 |
# File 'lib/oci/stack_monitoring/models/discovery_details.rb', line 47 def license @license end |
#properties ⇒ OCI::StackMonitoring::Models::PropertyDetails
This attribute is required.
51 52 53 |
# File 'lib/oci/stack_monitoring/models/discovery_details.rb', line 51 def properties @properties end |
#resource_name ⇒ String
[Required] The Name of resource type
43 44 45 |
# File 'lib/oci/stack_monitoring/models/discovery_details.rb', line 43 def resource_name @resource_name end |
#resource_type ⇒ String
[Required] Resource Type.
39 40 41 |
# File 'lib/oci/stack_monitoring/models/discovery_details.rb', line 39 def resource_type @resource_type end |
#tags ⇒ OCI::StackMonitoring::Models::PropertyDetails
57 58 59 |
# File 'lib/oci/stack_monitoring/models/discovery_details.rb', line 57 def @tags end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/oci/stack_monitoring/models/discovery_details.rb', line 60 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'agent_id': :'agentId', 'resource_type': :'resourceType', 'resource_name': :'resourceName', 'license': :'license', 'properties': :'properties', 'credentials': :'credentials', 'tags': :'tags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/oci/stack_monitoring/models/discovery_details.rb', line 75 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'agent_id': :'String', 'resource_type': :'String', 'resource_name': :'String', 'license': :'String', 'properties': :'OCI::StackMonitoring::Models::PropertyDetails', 'credentials': :'OCI::StackMonitoring::Models::CredentialCollection', 'tags': :'OCI::StackMonitoring::Models::PropertyDetails' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
168 169 170 171 172 173 174 175 176 177 178 179 |
# File 'lib/oci/stack_monitoring/models/discovery_details.rb', line 168 def ==(other) return true if equal?(other) self.class == other.class && agent_id == other.agent_id && resource_type == other.resource_type && resource_name == other.resource_name && license == other.license && properties == other.properties && credentials == other.credentials && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
# File 'lib/oci/stack_monitoring/models/discovery_details.rb', line 204 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
184 185 186 |
# File 'lib/oci/stack_monitoring/models/discovery_details.rb', line 184 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
193 194 195 |
# File 'lib/oci/stack_monitoring/models/discovery_details.rb', line 193 def hash [agent_id, resource_type, resource_name, license, properties, credentials, ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
237 238 239 240 241 242 243 244 245 246 |
# File 'lib/oci/stack_monitoring/models/discovery_details.rb', line 237 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
231 232 233 |
# File 'lib/oci/stack_monitoring/models/discovery_details.rb', line 231 def to_s to_hash.to_s end |