Class: OCI::DataCatalog::Models::JobMetricSummary
- Inherits:
-
Object
- Object
- OCI::DataCatalog::Models::JobMetricSummary
- Defined in:
- lib/oci/data_catalog/models/job_metric_summary.rb
Overview
Job metric summary.
Instance Attribute Summary collapse
-
#batch_key ⇒ String
Batch key for grouping, may be null.
-
#category ⇒ String
Category of this metric.
-
#description ⇒ String
Detailed description of the metric.
-
#display_name ⇒ String
A user-friendly display name.
-
#job_execution_key ⇒ String
The unique key of the parent job execution for which the job metric resource was created.
-
#key ⇒ String
[Required] Key of the job metric that is immutable.
-
#sub_category ⇒ String
Sub category of this metric under the category.
-
#time_created ⇒ DateTime
The date and time the job metric was created, in the format defined by [RFC3339](tools.ietf.org/html/rfc3339).
-
#time_inserted ⇒ DateTime
The time the metric was logged or captured in the system where the job executed.
-
#unit ⇒ String
Unit of this metric.
-
#uri ⇒ String
URI to the job metric instance in the API.
-
#value ⇒ String
Value of this metric.
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 = {}) ⇒ JobMetricSummary
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 = {}) ⇒ JobMetricSummary
Initializes the object
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 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 122 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.key = attributes[:'key'] if attributes[:'key'] self.description = attributes[:'description'] if attributes[:'description'] self.job_execution_key = attributes[:'jobExecutionKey'] if attributes[:'jobExecutionKey'] raise 'You cannot provide both :jobExecutionKey and :job_execution_key' if attributes.key?(:'jobExecutionKey') && attributes.key?(:'job_execution_key') self.job_execution_key = attributes[:'job_execution_key'] if attributes[:'job_execution_key'] self.uri = attributes[:'uri'] if attributes[:'uri'] self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated'] raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created') self.time_created = attributes[:'time_created'] if attributes[:'time_created'] self.time_inserted = attributes[:'timeInserted'] if attributes[:'timeInserted'] raise 'You cannot provide both :timeInserted and :time_inserted' if attributes.key?(:'timeInserted') && attributes.key?(:'time_inserted') self.time_inserted = attributes[:'time_inserted'] if attributes[:'time_inserted'] self.category = attributes[:'category'] if attributes[:'category'] self.display_name = attributes[:'displayName'] if attributes[:'displayName'] raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name') self.display_name = attributes[:'display_name'] if attributes[:'display_name'] self.sub_category = attributes[:'subCategory'] if attributes[:'subCategory'] raise 'You cannot provide both :subCategory and :sub_category' if attributes.key?(:'subCategory') && attributes.key?(:'sub_category') self.sub_category = attributes[:'sub_category'] if attributes[:'sub_category'] self.unit = attributes[:'unit'] if attributes[:'unit'] self.value = attributes[:'value'] if attributes[:'value'] self.batch_key = attributes[:'batchKey'] if attributes[:'batchKey'] raise 'You cannot provide both :batchKey and :batch_key' if attributes.key?(:'batchKey') && attributes.key?(:'batch_key') self.batch_key = attributes[:'batch_key'] if attributes[:'batch_key'] end |
Instance Attribute Details
#batch_key ⇒ String
Batch key for grouping, may be null.
62 63 64 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 62 def batch_key @batch_key end |
#category ⇒ String
Category of this metric.
40 41 42 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 40 def category @category end |
#description ⇒ String
Detailed description of the metric.
16 17 18 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 16 def description @description end |
#display_name ⇒ String
A user-friendly display name. Does not have to be unique, and it’s changeable. Avoid entering confidential information.
46 47 48 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 46 def display_name @display_name end |
#job_execution_key ⇒ String
The unique key of the parent job execution for which the job metric resource was created.
20 21 22 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 20 def job_execution_key @job_execution_key end |
#key ⇒ String
[Required] Key of the job metric that is immutable.
12 13 14 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 12 def key @key end |
#sub_category ⇒ String
Sub category of this metric under the category. Used for aggregating values. May be null.
50 51 52 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 50 def sub_category @sub_category end |
#time_created ⇒ DateTime
The date and time the job metric was created, in the format defined by [RFC3339](tools.ietf.org/html/rfc3339). Example: ‘2019-03-25T21:10:29.600Z`
30 31 32 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 30 def time_created @time_created end |
#time_inserted ⇒ DateTime
The time the metric was logged or captured in the system where the job executed. An [RFC3339](tools.ietf.org/html/rfc3339) formatted datetime string.
36 37 38 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 36 def time_inserted @time_inserted end |
#unit ⇒ String
Unit of this metric.
54 55 56 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 54 def unit @unit end |
#uri ⇒ String
URI to the job metric instance in the API.
24 25 26 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 24 def uri @uri end |
#value ⇒ String
Value of this metric.
58 59 60 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 58 def value @value end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 65 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'key': :'key', 'description': :'description', 'job_execution_key': :'jobExecutionKey', 'uri': :'uri', 'time_created': :'timeCreated', 'time_inserted': :'timeInserted', 'category': :'category', 'display_name': :'displayName', 'sub_category': :'subCategory', 'unit': :'unit', 'value': :'value', 'batch_key': :'batchKey' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 85 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'key': :'String', 'description': :'String', 'job_execution_key': :'String', 'uri': :'String', 'time_created': :'DateTime', 'time_inserted': :'DateTime', 'category': :'String', 'display_name': :'String', 'sub_category': :'String', 'unit': :'String', 'value': :'String', 'batch_key': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 184 def ==(other) return true if equal?(other) self.class == other.class && key == other.key && description == other.description && job_execution_key == other.job_execution_key && uri == other.uri && time_created == other.time_created && time_inserted == other.time_inserted && category == other.category && display_name == other.display_name && sub_category == other.sub_category && unit == other.unit && value == other.value && batch_key == other.batch_key end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 225 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
205 206 207 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 205 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
214 215 216 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 214 def hash [key, description, job_execution_key, uri, time_created, time_inserted, category, display_name, sub_category, unit, value, batch_key].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
258 259 260 261 262 263 264 265 266 267 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 258 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
252 253 254 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 252 def to_s to_hash.to_s end |