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.
-
#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
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 176 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 123 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.
63 64 65 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 63 def batch_key @batch_key end |
#category ⇒ String
Category of this metric.
41 42 43 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 41 def category @category end |
#description ⇒ String
Detailed description of the metric.
17 18 19 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 17 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.
47 48 49 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 47 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.
21 22 23 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 21 def job_execution_key @job_execution_key end |
#key ⇒ String
[Required] Key of the job metric that is immutable.
13 14 15 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 13 def key @key end |
#sub_category ⇒ String
Sub category of this metric under the category. Used for aggregating values. May be null.
51 52 53 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 51 def sub_category @sub_category end |
#time_created ⇒ DateTime
The date and time the job metric was created, in the format defined by RFC3339. Example: 2019-03-25T21:10:29.600Z
31 32 33 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 31 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 formatted datetime string.
37 38 39 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 37 def time_inserted @time_inserted end |
#unit ⇒ String
Unit of this metric.
55 56 57 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 55 def unit @unit end |
#uri ⇒ String
URI to the job metric instance in the API.
25 26 27 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 25 def uri @uri end |
#value ⇒ String
Value of this metric.
59 60 61 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 59 def value @value end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 66 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.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 86 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.
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 185 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
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 226 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
206 207 208 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 206 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
215 216 217 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 215 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
259 260 261 262 263 264 265 266 267 268 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 259 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
253 254 255 |
# File 'lib/oci/data_catalog/models/job_metric_summary.rb', line 253 def to_s to_hash.to_s end |