Class: OCI::StackMonitoring::Models::RequestSummarizedMetricExtensionsResourcesDetails
- Inherits:
-
Object
- Object
- OCI::StackMonitoring::Models::RequestSummarizedMetricExtensionsResourcesDetails
- Defined in:
- lib/oci/stack_monitoring/models/request_summarized_metric_extensions_resources_details.rb
Overview
Filtering criteria data to be specified in the request. Either metricExtensionId or compartmentId must be passed even when no other filter property is passed.
Constant Summary collapse
- ASSOCIATION_STATUS_ENUM =
[ ASSOCIATION_STATUS_ENABLED = 'ENABLED'.freeze, ASSOCIATION_STATUS_DISABLED = 'DISABLED'.freeze ].freeze
- GROUP_BY_ENUM =
[ GROUP_BY_METRIC_EXTENSION_ID = 'METRIC_EXTENSION_ID'.freeze ].freeze
- SORT_BY_ENUM =
[ SORT_BY_COUNT = 'COUNT'.freeze ].freeze
- SORT_ORDER_ENUM =
[ SORT_ORDER_ASC = 'ASC'.freeze, SORT_ORDER_DESC = 'DESC'.freeze ].freeze
Instance Attribute Summary collapse
-
#association_status ⇒ String
Filter to return metric extensions based on input enable status i.e.
-
#compartment_id ⇒ String
Compartment Identifier OCID.
-
#group_by ⇒ String
The field to group by.
-
#metric_extension_id ⇒ String
The OCID of Metric Extension resource.
-
#resource_id ⇒ String
The OCID of Monitored Resource.
-
#resource_type ⇒ String
Resource type to which Metric Extension applies.
-
#sort_by ⇒ String
Result will ne sorted by this parameter value.
-
#sort_order ⇒ String
Sort orders.
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 = {}) ⇒ RequestSummarizedMetricExtensionsResourcesDetails
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 = {}) ⇒ RequestSummarizedMetricExtensionsResourcesDetails
Initializes the object
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 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 |
# File 'lib/oci/stack_monitoring/models/request_summarized_metric_extensions_resources_details.rb', line 107 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.metric_extension_id = attributes[:'metricExtensionId'] if attributes[:'metricExtensionId'] raise 'You cannot provide both :metricExtensionId and :metric_extension_id' if attributes.key?(:'metricExtensionId') && attributes.key?(:'metric_extension_id') self.metric_extension_id = attributes[:'metric_extension_id'] if attributes[:'metric_extension_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.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.association_status = attributes[:'associationStatus'] if attributes[:'associationStatus'] raise 'You cannot provide both :associationStatus and :association_status' if attributes.key?(:'associationStatus') && attributes.key?(:'association_status') self.association_status = attributes[:'association_status'] if attributes[:'association_status'] self.resource_id = attributes[:'resourceId'] if attributes[:'resourceId'] raise 'You cannot provide both :resourceId and :resource_id' if attributes.key?(:'resourceId') && attributes.key?(:'resource_id') self.resource_id = attributes[:'resource_id'] if attributes[:'resource_id'] self.group_by = attributes[:'groupBy'] if attributes[:'groupBy'] raise 'You cannot provide both :groupBy and :group_by' if attributes.key?(:'groupBy') && attributes.key?(:'group_by') self.group_by = attributes[:'group_by'] if attributes[:'group_by'] self.sort_by = attributes[:'sortBy'] if attributes[:'sortBy'] 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_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'] end |
Instance Attribute Details
#association_status ⇒ String
Filter to return metric extensions based on input enable status i.e. Enabled/Disabled
43 44 45 |
# File 'lib/oci/stack_monitoring/models/request_summarized_metric_extensions_resources_details.rb', line 43 def association_status @association_status end |
#compartment_id ⇒ String
Compartment Identifier OCID
39 40 41 |
# File 'lib/oci/stack_monitoring/models/request_summarized_metric_extensions_resources_details.rb', line 39 def compartment_id @compartment_id end |
#group_by ⇒ String
The field to group by
51 52 53 |
# File 'lib/oci/stack_monitoring/models/request_summarized_metric_extensions_resources_details.rb', line 51 def group_by @group_by end |
#metric_extension_id ⇒ String
The OCID of Metric Extension resource
31 32 33 |
# File 'lib/oci/stack_monitoring/models/request_summarized_metric_extensions_resources_details.rb', line 31 def metric_extension_id @metric_extension_id end |
#resource_id ⇒ String
The OCID of Monitored Resource
47 48 49 |
# File 'lib/oci/stack_monitoring/models/request_summarized_metric_extensions_resources_details.rb', line 47 def resource_id @resource_id end |
#resource_type ⇒ String
Resource type to which Metric Extension applies
35 36 37 |
# File 'lib/oci/stack_monitoring/models/request_summarized_metric_extensions_resources_details.rb', line 35 def resource_type @resource_type end |
#sort_by ⇒ String
Result will ne sorted by this parameter value
55 56 57 |
# File 'lib/oci/stack_monitoring/models/request_summarized_metric_extensions_resources_details.rb', line 55 def sort_by @sort_by end |
#sort_order ⇒ String
Sort orders
59 60 61 |
# File 'lib/oci/stack_monitoring/models/request_summarized_metric_extensions_resources_details.rb', line 59 def sort_order @sort_order 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 |
# File 'lib/oci/stack_monitoring/models/request_summarized_metric_extensions_resources_details.rb', line 62 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'metric_extension_id': :'metricExtensionId', 'resource_type': :'resourceType', 'compartment_id': :'compartmentId', 'association_status': :'associationStatus', 'resource_id': :'resourceId', 'group_by': :'groupBy', 'sort_by': :'sortBy', 'sort_order': :'sortOrder' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/oci/stack_monitoring/models/request_summarized_metric_extensions_resources_details.rb', line 78 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'metric_extension_id': :'String', 'resource_type': :'String', 'compartment_id': :'String', 'association_status': :'String', 'resource_id': :'String', 'group_by': :'String', 'sort_by': :'String', 'sort_order': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
201 202 203 204 205 206 207 208 209 210 211 212 213 |
# File 'lib/oci/stack_monitoring/models/request_summarized_metric_extensions_resources_details.rb', line 201 def ==(other) return true if equal?(other) self.class == other.class && metric_extension_id == other.metric_extension_id && resource_type == other.resource_type && compartment_id == other.compartment_id && association_status == other.association_status && resource_id == other.resource_id && group_by == other.group_by && sort_by == other.sort_by && sort_order == other.sort_order end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 |
# File 'lib/oci/stack_monitoring/models/request_summarized_metric_extensions_resources_details.rb', line 238 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
218 219 220 |
# File 'lib/oci/stack_monitoring/models/request_summarized_metric_extensions_resources_details.rb', line 218 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
227 228 229 |
# File 'lib/oci/stack_monitoring/models/request_summarized_metric_extensions_resources_details.rb', line 227 def hash [metric_extension_id, resource_type, compartment_id, association_status, resource_id, group_by, sort_by, sort_order].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
271 272 273 274 275 276 277 278 279 280 |
# File 'lib/oci/stack_monitoring/models/request_summarized_metric_extensions_resources_details.rb', line 271 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
265 266 267 |
# File 'lib/oci/stack_monitoring/models/request_summarized_metric_extensions_resources_details.rb', line 265 def to_s to_hash.to_s end |