Class: OCI::DataFlow::Models::PoolMetrics
- Inherits:
- 
      Object
      
        - Object
- OCI::DataFlow::Models::PoolMetrics
 
- Defined in:
- lib/oci/data_flow/models/pool_metrics.rb
Overview
A collection of metrics related to a particular pool.
Instance Attribute Summary collapse
- 
  
    
      #active_runs_count  ⇒ Integer 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The number of runs that are currently running that are using this pool. 
- 
  
    
      #actively_used_node_count  ⇒ Array<OCI::DataFlow::Models::NodeCount> 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    A count of the nodes that are currently being used for each shape in this pool. 
- 
  
    
      #time_last_metrics_updated  ⇒ DateTime 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The last time the mertics were updated for this. 
- 
  
    
      #time_last_started  ⇒ DateTime 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The last time this pool was started. 
- 
  
    
      #time_last_stopped  ⇒ DateTime 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The last time this pool was stopped. 
- 
  
    
      #time_last_used  ⇒ DateTime 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The last time a run used this pool. 
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 = {})  ⇒ PoolMetrics 
    
    
  
  
  
    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 = {}) ⇒ PoolMetrics
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 | # File 'lib/oci/data_flow/models/pool_metrics.rb', line 82 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.time_last_started = attributes[:'timeLastStarted'] if attributes[:'timeLastStarted'] raise 'You cannot provide both :timeLastStarted and :time_last_started' if attributes.key?(:'timeLastStarted') && attributes.key?(:'time_last_started') self.time_last_started = attributes[:'time_last_started'] if attributes[:'time_last_started'] self.time_last_stopped = attributes[:'timeLastStopped'] if attributes[:'timeLastStopped'] raise 'You cannot provide both :timeLastStopped and :time_last_stopped' if attributes.key?(:'timeLastStopped') && attributes.key?(:'time_last_stopped') self.time_last_stopped = attributes[:'time_last_stopped'] if attributes[:'time_last_stopped'] self.time_last_used = attributes[:'timeLastUsed'] if attributes[:'timeLastUsed'] raise 'You cannot provide both :timeLastUsed and :time_last_used' if attributes.key?(:'timeLastUsed') && attributes.key?(:'time_last_used') self.time_last_used = attributes[:'time_last_used'] if attributes[:'time_last_used'] self.time_last_metrics_updated = attributes[:'timeLastMetricsUpdated'] if attributes[:'timeLastMetricsUpdated'] raise 'You cannot provide both :timeLastMetricsUpdated and :time_last_metrics_updated' if attributes.key?(:'timeLastMetricsUpdated') && attributes.key?(:'time_last_metrics_updated') self.time_last_metrics_updated = attributes[:'time_last_metrics_updated'] if attributes[:'time_last_metrics_updated'] self.active_runs_count = attributes[:'activeRunsCount'] if attributes[:'activeRunsCount'] raise 'You cannot provide both :activeRunsCount and :active_runs_count' if attributes.key?(:'activeRunsCount') && attributes.key?(:'active_runs_count') self.active_runs_count = attributes[:'active_runs_count'] if attributes[:'active_runs_count'] self.actively_used_node_count = attributes[:'activelyUsedNodeCount'] if attributes[:'activelyUsedNodeCount'] raise 'You cannot provide both :activelyUsedNodeCount and :actively_used_node_count' if attributes.key?(:'activelyUsedNodeCount') && attributes.key?(:'actively_used_node_count') self.actively_used_node_count = attributes[:'actively_used_node_count'] if attributes[:'actively_used_node_count'] end | 
Instance Attribute Details
#active_runs_count ⇒ Integer
The number of runs that are currently running that are using this pool.
| 35 36 37 | # File 'lib/oci/data_flow/models/pool_metrics.rb', line 35 def active_runs_count @active_runs_count end | 
#actively_used_node_count ⇒ Array<OCI::DataFlow::Models::NodeCount>
A count of the nodes that are currently being used for each shape in this pool.
| 40 41 42 | # File 'lib/oci/data_flow/models/pool_metrics.rb', line 40 def actively_used_node_count @actively_used_node_count end | 
#time_last_metrics_updated ⇒ DateTime
The last time the mertics were updated for this.
| 30 31 32 | # File 'lib/oci/data_flow/models/pool_metrics.rb', line 30 def time_last_metrics_updated @time_last_metrics_updated end | 
#time_last_started ⇒ DateTime
The last time this pool was started.
| 15 16 17 | # File 'lib/oci/data_flow/models/pool_metrics.rb', line 15 def time_last_started @time_last_started end | 
#time_last_stopped ⇒ DateTime
The last time this pool was stopped.
| 20 21 22 | # File 'lib/oci/data_flow/models/pool_metrics.rb', line 20 def time_last_stopped @time_last_stopped end | 
#time_last_used ⇒ DateTime
The last time a run used this pool.
| 25 26 27 | # File 'lib/oci/data_flow/models/pool_metrics.rb', line 25 def time_last_used @time_last_used end | 
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
| 43 44 45 46 47 48 49 50 51 52 53 54 | # File 'lib/oci/data_flow/models/pool_metrics.rb', line 43 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'time_last_started': :'timeLastStarted', 'time_last_stopped': :'timeLastStopped', 'time_last_used': :'timeLastUsed', 'time_last_metrics_updated': :'timeLastMetricsUpdated', 'active_runs_count': :'activeRunsCount', 'actively_used_node_count': :'activelyUsedNodeCount' # rubocop:enable Style/SymbolLiteral } end | 
.swagger_types ⇒ Object
Attribute type mapping.
| 57 58 59 60 61 62 63 64 65 66 67 68 | # File 'lib/oci/data_flow/models/pool_metrics.rb', line 57 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'time_last_started': :'DateTime', 'time_last_stopped': :'DateTime', 'time_last_used': :'DateTime', 'time_last_metrics_updated': :'DateTime', 'active_runs_count': :'Integer', 'actively_used_node_count': :'Array<OCI::DataFlow::Models::NodeCount>' # rubocop:enable Style/SymbolLiteral } end | 
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
| 132 133 134 135 136 137 138 139 140 141 142 | # File 'lib/oci/data_flow/models/pool_metrics.rb', line 132 def ==(other) return true if equal?(other) self.class == other.class && time_last_started == other.time_last_started && time_last_stopped == other.time_last_stopped && time_last_used == other.time_last_used && time_last_metrics_updated == other.time_last_metrics_updated && active_runs_count == other.active_runs_count && actively_used_node_count == other.actively_used_node_count end | 
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
| 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | # File 'lib/oci/data_flow/models/pool_metrics.rb', line 167 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
| 147 148 149 | # File 'lib/oci/data_flow/models/pool_metrics.rb', line 147 def eql?(other) self == other end | 
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
| 156 157 158 | # File 'lib/oci/data_flow/models/pool_metrics.rb', line 156 def hash [time_last_started, time_last_stopped, time_last_used, time_last_metrics_updated, active_runs_count, actively_used_node_count].hash end | 
#to_hash ⇒ Hash
Returns the object in the form of hash
| 200 201 202 203 204 205 206 207 208 209 | # File 'lib/oci/data_flow/models/pool_metrics.rb', line 200 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
| 194 195 196 | # File 'lib/oci/data_flow/models/pool_metrics.rb', line 194 def to_s to_hash.to_s end |