Class: OCI::Opsi::Models::HostIoUsage
- Inherits:
-
HostPerformanceMetricGroup
- Object
- HostPerformanceMetricGroup
- OCI::Opsi::Models::HostIoUsage
- Defined in:
- lib/oci/opsi/models/host_io_usage.rb
Overview
Host IO Performance Metrics
Constant Summary
Constants inherited from HostPerformanceMetricGroup
OCI::Opsi::Models::HostPerformanceMetricGroup::METRIC_NAME_ENUM
Instance Attribute Summary collapse
-
#disk_bytes_read ⇒ Float
Bytes Read.
-
#disk_bytes_written ⇒ Float
Bytes Written.
-
#disk_iops ⇒ Float
IO Transactions per second.
-
#disk_iops_read ⇒ Float
Read transactions per second.
-
#disk_iops_written ⇒ Float
Write transactions per second.
-
#mount_point ⇒ String
Mount point.
Attributes inherited from HostPerformanceMetricGroup
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 = {}) ⇒ HostIoUsage
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.
Methods inherited from HostPerformanceMetricGroup
Constructor Details
#initialize(attributes = {}) ⇒ HostIoUsage
Initializes the object
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 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 |
# File 'lib/oci/opsi/models/host_io_usage.rb', line 82 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['metricName'] = 'HOST_IO_USAGE' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.mount_point = attributes[:'mountPoint'] if attributes[:'mountPoint'] raise 'You cannot provide both :mountPoint and :mount_point' if attributes.key?(:'mountPoint') && attributes.key?(:'mount_point') self.mount_point = attributes[:'mount_point'] if attributes[:'mount_point'] self.disk_bytes_read = attributes[:'diskBytesRead'] if attributes[:'diskBytesRead'] raise 'You cannot provide both :diskBytesRead and :disk_bytes_read' if attributes.key?(:'diskBytesRead') && attributes.key?(:'disk_bytes_read') self.disk_bytes_read = attributes[:'disk_bytes_read'] if attributes[:'disk_bytes_read'] self.disk_bytes_written = attributes[:'diskBytesWritten'] if attributes[:'diskBytesWritten'] raise 'You cannot provide both :diskBytesWritten and :disk_bytes_written' if attributes.key?(:'diskBytesWritten') && attributes.key?(:'disk_bytes_written') self.disk_bytes_written = attributes[:'disk_bytes_written'] if attributes[:'disk_bytes_written'] self.disk_iops_read = attributes[:'diskIopsRead'] if attributes[:'diskIopsRead'] raise 'You cannot provide both :diskIopsRead and :disk_iops_read' if attributes.key?(:'diskIopsRead') && attributes.key?(:'disk_iops_read') self.disk_iops_read = attributes[:'disk_iops_read'] if attributes[:'disk_iops_read'] self.disk_iops_written = attributes[:'diskIopsWritten'] if attributes[:'diskIopsWritten'] raise 'You cannot provide both :diskIopsWritten and :disk_iops_written' if attributes.key?(:'diskIopsWritten') && attributes.key?(:'disk_iops_written') self.disk_iops_written = attributes[:'disk_iops_written'] if attributes[:'disk_iops_written'] self.disk_iops = attributes[:'diskIops'] if attributes[:'diskIops'] raise 'You cannot provide both :diskIops and :disk_iops' if attributes.key?(:'diskIops') && attributes.key?(:'disk_iops') self.disk_iops = attributes[:'disk_iops'] if attributes[:'disk_iops'] end |
Instance Attribute Details
#disk_bytes_read ⇒ Float
Bytes Read
19 20 21 |
# File 'lib/oci/opsi/models/host_io_usage.rb', line 19 def disk_bytes_read @disk_bytes_read end |
#disk_bytes_written ⇒ Float
Bytes Written
23 24 25 |
# File 'lib/oci/opsi/models/host_io_usage.rb', line 23 def disk_bytes_written @disk_bytes_written end |
#disk_iops ⇒ Float
IO Transactions per second
35 36 37 |
# File 'lib/oci/opsi/models/host_io_usage.rb', line 35 def disk_iops @disk_iops end |
#disk_iops_read ⇒ Float
Read transactions per second
27 28 29 |
# File 'lib/oci/opsi/models/host_io_usage.rb', line 27 def disk_iops_read @disk_iops_read end |
#disk_iops_written ⇒ Float
Write transactions per second
31 32 33 |
# File 'lib/oci/opsi/models/host_io_usage.rb', line 31 def disk_iops_written @disk_iops_written end |
#mount_point ⇒ String
Mount point
15 16 17 |
# File 'lib/oci/opsi/models/host_io_usage.rb', line 15 def mount_point @mount_point end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/oci/opsi/models/host_io_usage.rb', line 38 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'metric_name': :'metricName', 'time_collected': :'timeCollected', 'mount_point': :'mountPoint', 'disk_bytes_read': :'diskBytesRead', 'disk_bytes_written': :'diskBytesWritten', 'disk_iops_read': :'diskIopsRead', 'disk_iops_written': :'diskIopsWritten', 'disk_iops': :'diskIops' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/oci/opsi/models/host_io_usage.rb', line 54 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'metric_name': :'String', 'time_collected': :'DateTime', 'mount_point': :'String', 'disk_bytes_read': :'Float', 'disk_bytes_written': :'Float', 'disk_iops_read': :'Float', 'disk_iops_written': :'Float', 'disk_iops': :'Float' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/oci/opsi/models/host_io_usage.rb', line 136 def ==(other) return true if equal?(other) self.class == other.class && metric_name == other.metric_name && time_collected == other.time_collected && mount_point == other.mount_point && disk_bytes_read == other.disk_bytes_read && disk_bytes_written == other.disk_bytes_written && disk_iops_read == other.disk_iops_read && disk_iops_written == other.disk_iops_written && disk_iops == other.disk_iops end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'lib/oci/opsi/models/host_io_usage.rb', line 173 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
153 154 155 |
# File 'lib/oci/opsi/models/host_io_usage.rb', line 153 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
162 163 164 |
# File 'lib/oci/opsi/models/host_io_usage.rb', line 162 def hash [metric_name, time_collected, mount_point, disk_bytes_read, disk_bytes_written, disk_iops_read, disk_iops_written, disk_iops].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
206 207 208 209 210 211 212 213 214 215 |
# File 'lib/oci/opsi/models/host_io_usage.rb', line 206 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
200 201 202 |
# File 'lib/oci/opsi/models/host_io_usage.rb', line 200 def to_s to_hash.to_s end |