Class: OCI::StackMonitoring::Models::SearchMonitoredResourcesDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/stack_monitoring/models/search_monitored_resources_details.rb

Overview

The property search criteria for listing monitored resources.

Constant Summary collapse

SOURCE_TYPE_ENUM =
[
  SOURCE_TYPE_SM_MGMT_AGENT_MONITORED = 'SM_MGMT_AGENT_MONITORED'.freeze,
  SOURCE_TYPE_SM_REPO_ONLY = 'SM_REPO_ONLY'.freeze,
  SOURCE_TYPE_OCI_NATIVE = 'OCI_NATIVE'.freeze,
  SOURCE_TYPE_PROMETHEUS = 'PROMETHEUS'.freeze,
  SOURCE_TYPE_TELEGRAF = 'TELEGRAF'.freeze,
  SOURCE_TYPE_COLLECTD = 'COLLECTD'.freeze
].freeze
RESOURCE_CATEGORY_ENUM =
[
  RESOURCE_CATEGORY_APPLICATION = 'APPLICATION'.freeze,
  RESOURCE_CATEGORY_DATABASE = 'DATABASE'.freeze,
  RESOURCE_CATEGORY_MIDDLEWARE = 'MIDDLEWARE'.freeze,
  RESOURCE_CATEGORY_UNKNOWN = 'UNKNOWN'.freeze
].freeze
LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_CREATING = 'CREATING'.freeze,
  LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze,
  LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze,
  LIFECYCLE_STATE_DELETING = 'DELETING'.freeze,
  LIFECYCLE_STATE_DELETED = 'DELETED'.freeze,
  LIFECYCLE_STATE_FAILED = 'FAILED'.freeze
].freeze
LICENSE_ENUM =
[
  LICENSE_STANDARD_EDITION = 'STANDARD_EDITION'.freeze,
  LICENSE_ENTERPRISE_EDITION = 'ENTERPRISE_EDITION'.freeze
].freeze
SORT_ORDER_ENUM =
[
  SORT_ORDER_ASC = 'ASC'.freeze,
  SORT_ORDER_DESC = 'DESC'.freeze
].freeze
SORT_BY_ENUM =
[
  SORT_BY_TIME_CREATED = 'TIME_CREATED'.freeze,
  SORT_BY_RESOURCE_NAME = 'RESOURCE_NAME'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ SearchMonitoredResourcesDetails

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):

  • :compartment_id (String)

    The value to assign to the #compartment_id property

  • :compartment_ids (Array<String>)

    The value to assign to the #compartment_ids property

  • :lifecycle_states (Array<OCI::StackMonitoring::Models::ResourceLifecycleState>)

    The value to assign to the #lifecycle_states property

  • :source_type (String)

    The value to assign to the #source_type property

  • :resource_category (String)

    The value to assign to the #resource_category property

  • :name (String)

    The value to assign to the #name property

  • :name_contains (String)

    The value to assign to the #name_contains property

  • :type (String)

    The value to assign to the #type property

  • :host_name (String)

    The value to assign to the #host_name property

  • :external_id (String)

    The value to assign to the #external_id property

  • :host_name_contains (String)

    The value to assign to the #host_name_contains property

  • :management_agent_id (String)

    The value to assign to the #management_agent_id property

  • :lifecycle_state (String)

    The value to assign to the #lifecycle_state property

  • :license (String)

    The value to assign to the #license property

  • :time_created_greater_than_or_equal_to (DateTime)

    The value to assign to the #time_created_greater_than_or_equal_to property

  • :time_created_less_than (DateTime)

    The value to assign to the #time_created_less_than property

  • :time_updated_greater_than_or_equal_to (DateTime)

    The value to assign to the #time_updated_greater_than_or_equal_to property

  • :time_updated_less_than (DateTime)

    The value to assign to the #time_updated_less_than property

  • :resource_time_zone (String)

    The value to assign to the #resource_time_zone property

  • :sort_order (String)

    The value to assign to the #sort_order property

  • :sort_by (String)

    The value to assign to the #sort_by property

  • :property_equals (Hash<String, String>)

    The value to assign to the #property_equals property



275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
# File 'lib/oci/stack_monitoring/models/search_monitored_resources_details.rb', line 275

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.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']

  raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')

  self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']

  self.compartment_ids = attributes[:'compartmentIds'] if attributes[:'compartmentIds']

  raise 'You cannot provide both :compartmentIds and :compartment_ids' if attributes.key?(:'compartmentIds') && attributes.key?(:'compartment_ids')

  self.compartment_ids = attributes[:'compartment_ids'] if attributes[:'compartment_ids']

  self.lifecycle_states = attributes[:'lifecycleStates'] if attributes[:'lifecycleStates']

  raise 'You cannot provide both :lifecycleStates and :lifecycle_states' if attributes.key?(:'lifecycleStates') && attributes.key?(:'lifecycle_states')

  self.lifecycle_states = attributes[:'lifecycle_states'] if attributes[:'lifecycle_states']

  self.source_type = attributes[:'sourceType'] if attributes[:'sourceType']

  raise 'You cannot provide both :sourceType and :source_type' if attributes.key?(:'sourceType') && attributes.key?(:'source_type')

  self.source_type = attributes[:'source_type'] if attributes[:'source_type']

  self.resource_category = attributes[:'resourceCategory'] if attributes[:'resourceCategory']

  raise 'You cannot provide both :resourceCategory and :resource_category' if attributes.key?(:'resourceCategory') && attributes.key?(:'resource_category')

  self.resource_category = attributes[:'resource_category'] if attributes[:'resource_category']

  self.name = attributes[:'name'] if attributes[:'name']

  self.name_contains = attributes[:'nameContains'] if attributes[:'nameContains']

  raise 'You cannot provide both :nameContains and :name_contains' if attributes.key?(:'nameContains') && attributes.key?(:'name_contains')

  self.name_contains = attributes[:'name_contains'] if attributes[:'name_contains']

  self.type = attributes[:'type'] if attributes[:'type']

  self.host_name = attributes[:'hostName'] if attributes[:'hostName']

  raise 'You cannot provide both :hostName and :host_name' if attributes.key?(:'hostName') && attributes.key?(:'host_name')

  self.host_name = attributes[:'host_name'] if attributes[:'host_name']

  self.external_id = attributes[:'externalId'] if attributes[:'externalId']

  raise 'You cannot provide both :externalId and :external_id' if attributes.key?(:'externalId') && attributes.key?(:'external_id')

  self.external_id = attributes[:'external_id'] if attributes[:'external_id']

  self.host_name_contains = attributes[:'hostNameContains'] if attributes[:'hostNameContains']

  raise 'You cannot provide both :hostNameContains and :host_name_contains' if attributes.key?(:'hostNameContains') && attributes.key?(:'host_name_contains')

  self.host_name_contains = attributes[:'host_name_contains'] if attributes[:'host_name_contains']

  self.management_agent_id = attributes[:'managementAgentId'] if attributes[:'managementAgentId']

  raise 'You cannot provide both :managementAgentId and :management_agent_id' if attributes.key?(:'managementAgentId') && attributes.key?(:'management_agent_id')

  self.management_agent_id = attributes[:'management_agent_id'] if attributes[:'management_agent_id']

  self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']

  raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state')

  self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state']

  self.license = attributes[:'license'] if attributes[:'license']

  self.time_created_greater_than_or_equal_to = attributes[:'timeCreatedGreaterThanOrEqualTo'] if attributes[:'timeCreatedGreaterThanOrEqualTo']

  raise 'You cannot provide both :timeCreatedGreaterThanOrEqualTo and :time_created_greater_than_or_equal_to' if attributes.key?(:'timeCreatedGreaterThanOrEqualTo') && attributes.key?(:'time_created_greater_than_or_equal_to')

  self.time_created_greater_than_or_equal_to = attributes[:'time_created_greater_than_or_equal_to'] if attributes[:'time_created_greater_than_or_equal_to']

  self.time_created_less_than = attributes[:'timeCreatedLessThan'] if attributes[:'timeCreatedLessThan']

  raise 'You cannot provide both :timeCreatedLessThan and :time_created_less_than' if attributes.key?(:'timeCreatedLessThan') && attributes.key?(:'time_created_less_than')

  self.time_created_less_than = attributes[:'time_created_less_than'] if attributes[:'time_created_less_than']

  self.time_updated_greater_than_or_equal_to = attributes[:'timeUpdatedGreaterThanOrEqualTo'] if attributes[:'timeUpdatedGreaterThanOrEqualTo']

  raise 'You cannot provide both :timeUpdatedGreaterThanOrEqualTo and :time_updated_greater_than_or_equal_to' if attributes.key?(:'timeUpdatedGreaterThanOrEqualTo') && attributes.key?(:'time_updated_greater_than_or_equal_to')

  self.time_updated_greater_than_or_equal_to = attributes[:'time_updated_greater_than_or_equal_to'] if attributes[:'time_updated_greater_than_or_equal_to']

  self.time_updated_less_than = attributes[:'timeUpdatedLessThan'] if attributes[:'timeUpdatedLessThan']

  raise 'You cannot provide both :timeUpdatedLessThan and :time_updated_less_than' if attributes.key?(:'timeUpdatedLessThan') && attributes.key?(:'time_updated_less_than')

  self.time_updated_less_than = attributes[:'time_updated_less_than'] if attributes[:'time_updated_less_than']

  self.resource_time_zone = attributes[:'resourceTimeZone'] if attributes[:'resourceTimeZone']
  self.resource_time_zone = "Etc/UTC" if resource_time_zone.nil? && !attributes.key?(:'resourceTimeZone') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :resourceTimeZone and :resource_time_zone' if attributes.key?(:'resourceTimeZone') && attributes.key?(:'resource_time_zone')

  self.resource_time_zone = attributes[:'resource_time_zone'] if attributes[:'resource_time_zone']
  self.resource_time_zone = "Etc/UTC" if resource_time_zone.nil? && !attributes.key?(:'resourceTimeZone') && !attributes.key?(:'resource_time_zone') # rubocop:disable Style/StringLiterals

  self.sort_order = attributes[:'sortOrder'] if attributes[:'sortOrder']

  raise 'You cannot provide both :sortOrder and :sort_order' if attributes.key?(:'sortOrder') && attributes.key?(:'sort_order')

  self.sort_order = attributes[:'sort_order'] if attributes[:'sort_order']

  self.sort_by = attributes[:'sortBy'] if attributes[:'sortBy']
  self.sort_by = "TIME_CREATED" if sort_by.nil? && !attributes.key?(:'sortBy') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :sortBy and :sort_by' if attributes.key?(:'sortBy') && attributes.key?(:'sort_by')

  self.sort_by = attributes[:'sort_by'] if attributes[:'sort_by']
  self.sort_by = "TIME_CREATED" if sort_by.nil? && !attributes.key?(:'sortBy') && !attributes.key?(:'sort_by') # rubocop:disable Style/StringLiterals

  self.property_equals = attributes[:'propertyEquals'] if attributes[:'propertyEquals']

  raise 'You cannot provide both :propertyEquals and :property_equals' if attributes.key?(:'propertyEquals') && attributes.key?(:'property_equals')

  self.property_equals = attributes[:'property_equals'] if attributes[:'property_equals']
end

Instance Attribute Details

#compartment_idString

[Required] Compartment Identifier OCID.

Returns:

  • (String)


54
55
56
# File 'lib/oci/stack_monitoring/models/search_monitored_resources_details.rb', line 54

def compartment_id
  @compartment_id
end

#compartment_idsArray<String>

Multiple compartment identifiers OCID.

Returns:

  • (Array<String>)


59
60
61
# File 'lib/oci/stack_monitoring/models/search_monitored_resources_details.rb', line 59

def compartment_ids
  @compartment_ids
end

#external_idString

External resource is any OCI resource identifier OCID which is not a Stack Monitoring service resource. Currently supports only following resource types - Container database, non-container database, pluggable database and OCI compute instance.

Returns:

  • (String)


99
100
101
# File 'lib/oci/stack_monitoring/models/search_monitored_resources_details.rb', line 99

def external_id
  @external_id
end

#host_nameString

A filter to return resources with host name match.

Returns:

  • (String)


91
92
93
# File 'lib/oci/stack_monitoring/models/search_monitored_resources_details.rb', line 91

def host_name
  @host_name
end

#host_name_containsString

A filter to return resources with host name pattern.

Returns:

  • (String)


104
105
106
# File 'lib/oci/stack_monitoring/models/search_monitored_resources_details.rb', line 104

def host_name_contains
  @host_name_contains
end

#licenseString

License edition of the monitored resource.

Returns:

  • (String)


116
117
118
# File 'lib/oci/stack_monitoring/models/search_monitored_resources_details.rb', line 116

def license
  @license
end

#lifecycle_stateString

A filter to return resources with matching lifecycle state.

Returns:

  • (String)


112
113
114
# File 'lib/oci/stack_monitoring/models/search_monitored_resources_details.rb', line 112

def lifecycle_state
  @lifecycle_state
end

#lifecycle_statesArray<OCI::StackMonitoring::Models::ResourceLifecycleState>

Multiple lifecycle states filter.

Returns:

  • (Array<OCI::StackMonitoring::Models::ResourceLifecycleState>)


64
65
66
# File 'lib/oci/stack_monitoring/models/search_monitored_resources_details.rb', line 64

def lifecycle_states
  @lifecycle_states
end

#management_agent_idString

A filter to return resources with matching management agent id.

Returns:

  • (String)


108
109
110
# File 'lib/oci/stack_monitoring/models/search_monitored_resources_details.rb', line 108

def management_agent_id
  @management_agent_id
end

#nameString

A filter to return resources that match exact resource name.

Returns:

  • (String)


77
78
79
# File 'lib/oci/stack_monitoring/models/search_monitored_resources_details.rb', line 77

def name
  @name
end

#name_containsString

A filter to return resources that match resource name pattern given. The match is not case sensitive.

Returns:

  • (String)


81
82
83
# File 'lib/oci/stack_monitoring/models/search_monitored_resources_details.rb', line 81

def name_contains
  @name_contains
end

#property_equalsHash<String, String>

Criteria based on resource property.

Returns:

  • (Hash<String, String>)


185
186
187
# File 'lib/oci/stack_monitoring/models/search_monitored_resources_details.rb', line 185

def property_equals
  @property_equals
end

#resource_categoryString

Resource category filter.

Returns:

  • (String)


72
73
74
# File 'lib/oci/stack_monitoring/models/search_monitored_resources_details.rb', line 72

def resource_category
  @resource_category
end

#resource_time_zoneString

Time zone in the form of tz database canonical zone ID. Specifies the preference with a value that uses the IANA Time Zone Database format (x-obmcs-time-zone). For example - America/Los_Angeles

Returns:

  • (String)


171
172
173
# File 'lib/oci/stack_monitoring/models/search_monitored_resources_details.rb', line 171

def resource_time_zone
  @resource_time_zone
end

#sort_byString

The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for resources is ascending.

Returns:

  • (String)


181
182
183
# File 'lib/oci/stack_monitoring/models/search_monitored_resources_details.rb', line 181

def sort_by
  @sort_by
end

#sort_orderString

The sort order to use, either 'ASC' or 'DESC'.

Returns:

  • (String)


175
176
177
# File 'lib/oci/stack_monitoring/models/search_monitored_resources_details.rb', line 175

def sort_order
  @sort_order
end

#source_typeString

Source type filter.

Returns:

  • (String)


68
69
70
# File 'lib/oci/stack_monitoring/models/search_monitored_resources_details.rb', line 68

def source_type
  @source_type
end

#time_created_greater_than_or_equal_toDateTime

Search for resources that were created within a specific date range, using this parameter to specify the earliest creation date for the returned list (inclusive). Specifying this parameter without the corresponding timeCreatedLessThan parameter will retrieve resources created from the given timeCreatedGreaterThanOrEqualTo to the current time, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

Example: 2016-12-19T16:39:57.600Z

Returns:

  • (DateTime)


128
129
130
# File 'lib/oci/stack_monitoring/models/search_monitored_resources_details.rb', line 128

def time_created_greater_than_or_equal_to
  @time_created_greater_than_or_equal_to
end

#time_created_less_thanDateTime

Search for resources that were created within a specific date range, using this parameter to specify the latest creation date for the returned list (exclusive). Specifying this parameter without the corresponding timeCreatedGreaterThanOrEqualTo parameter will retrieve all resources created before the specified end date, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

Example: 2016-12-19T16:39:57.600Z

Returns:

  • (DateTime)


140
141
142
# File 'lib/oci/stack_monitoring/models/search_monitored_resources_details.rb', line 140

def time_created_less_than
  @time_created_less_than
end

#time_updated_greater_than_or_equal_toDateTime

Search for resources that were updated within a specific date range, using this parameter to specify the earliest update date for the returned list (inclusive). Specifying this parameter without the corresponding timeUpdatedLessThan parameter will retrieve resources updated from the given timeUpdatedGreaterThanOrEqualTo to the current time, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

Example: 2016-12-19T16:39:57.600Z

Returns:

  • (DateTime)


152
153
154
# File 'lib/oci/stack_monitoring/models/search_monitored_resources_details.rb', line 152

def time_updated_greater_than_or_equal_to
  @time_updated_greater_than_or_equal_to
end

#time_updated_less_thanDateTime

Search for resources that were updated within a specific date range, using this parameter to specify the latest creation date for the returned list (exclusive). Specifying this parameter without the corresponding timeUpdatedGreaterThanOrEqualTo parameter will retrieve all resources updated before the specified end date, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

Example: 2016-12-19T16:39:57.600Z

Returns:

  • (DateTime)


164
165
166
# File 'lib/oci/stack_monitoring/models/search_monitored_resources_details.rb', line 164

def time_updated_less_than
  @time_updated_less_than
end

#typeString

A filter to return resources that match resource type.

Returns:

  • (String)


86
87
88
# File 'lib/oci/stack_monitoring/models/search_monitored_resources_details.rb', line 86

def type
  @type
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
# File 'lib/oci/stack_monitoring/models/search_monitored_resources_details.rb', line 188

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'compartment_id': :'compartmentId',
    'compartment_ids': :'compartmentIds',
    'lifecycle_states': :'lifecycleStates',
    'source_type': :'sourceType',
    'resource_category': :'resourceCategory',
    'name': :'name',
    'name_contains': :'nameContains',
    'type': :'type',
    'host_name': :'hostName',
    'external_id': :'externalId',
    'host_name_contains': :'hostNameContains',
    'management_agent_id': :'managementAgentId',
    'lifecycle_state': :'lifecycleState',
    'license': :'license',
    'time_created_greater_than_or_equal_to': :'timeCreatedGreaterThanOrEqualTo',
    'time_created_less_than': :'timeCreatedLessThan',
    'time_updated_greater_than_or_equal_to': :'timeUpdatedGreaterThanOrEqualTo',
    'time_updated_less_than': :'timeUpdatedLessThan',
    'resource_time_zone': :'resourceTimeZone',
    'sort_order': :'sortOrder',
    'sort_by': :'sortBy',
    'property_equals': :'propertyEquals'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
# File 'lib/oci/stack_monitoring/models/search_monitored_resources_details.rb', line 218

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'compartment_id': :'String',
    'compartment_ids': :'Array<String>',
    'lifecycle_states': :'Array<OCI::StackMonitoring::Models::ResourceLifecycleState>',
    'source_type': :'String',
    'resource_category': :'String',
    'name': :'String',
    'name_contains': :'String',
    'type': :'String',
    'host_name': :'String',
    'external_id': :'String',
    'host_name_contains': :'String',
    'management_agent_id': :'String',
    'lifecycle_state': :'String',
    'license': :'String',
    'time_created_greater_than_or_equal_to': :'DateTime',
    'time_created_less_than': :'DateTime',
    'time_updated_greater_than_or_equal_to': :'DateTime',
    'time_updated_less_than': :'DateTime',
    'resource_time_zone': :'String',
    'sort_order': :'String',
    'sort_by': :'String',
    'property_equals': :'Hash<String, String>'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
# File 'lib/oci/stack_monitoring/models/search_monitored_resources_details.rb', line 461

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    compartment_id == other.compartment_id &&
    compartment_ids == other.compartment_ids &&
    lifecycle_states == other.lifecycle_states &&
    source_type == other.source_type &&
    resource_category == other.resource_category &&
    name == other.name &&
    name_contains == other.name_contains &&
    type == other.type &&
    host_name == other.host_name &&
    external_id == other.external_id &&
    host_name_contains == other.host_name_contains &&
    management_agent_id == other.management_agent_id &&
    lifecycle_state == other.lifecycle_state &&
    license == other.license &&
    time_created_greater_than_or_equal_to == other.time_created_greater_than_or_equal_to &&
    time_created_less_than == other.time_created_less_than &&
    time_updated_greater_than_or_equal_to == other.time_updated_greater_than_or_equal_to &&
    time_updated_less_than == other.time_updated_less_than &&
    resource_time_zone == other.resource_time_zone &&
    sort_order == other.sort_order &&
    sort_by == other.sort_by &&
    property_equals == other.property_equals
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
# File 'lib/oci/stack_monitoring/models/search_monitored_resources_details.rb', line 512

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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


492
493
494
# File 'lib/oci/stack_monitoring/models/search_monitored_resources_details.rb', line 492

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



501
502
503
# File 'lib/oci/stack_monitoring/models/search_monitored_resources_details.rb', line 501

def hash
  [compartment_id, compartment_ids, lifecycle_states, source_type, resource_category, name, name_contains, type, host_name, external_id, host_name_contains, management_agent_id, lifecycle_state, license, time_created_greater_than_or_equal_to, time_created_less_than, time_updated_greater_than_or_equal_to, time_updated_less_than, resource_time_zone, sort_order, sort_by, property_equals].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



545
546
547
548
549
550
551
552
553
554
# File 'lib/oci/stack_monitoring/models/search_monitored_resources_details.rb', line 545

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



539
540
541
# File 'lib/oci/stack_monitoring/models/search_monitored_resources_details.rb', line 539

def to_s
  to_hash.to_s
end