Class: FdxV660Api::CertificationMetricEntity
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- FdxV660Api::CertificationMetricEntity
- Defined in:
- lib/fdx_v660_api/models/certification_metric_entity.rb
Overview
A single certification performance metric
Instance Attribute Summary collapse
-
#average_up_time ⇒ Float
See the Certification Performance section that describes how this measurement will be calculated, defines the % of availability during the measurement.
-
#metrics_name ⇒ String
Any provider descriptive name for the measurement.
-
#operation_ids ⇒ Array[FdxResourceOperationId]
One or more Operation IDs for which these metrics apply.
-
#report_end_timestamp ⇒ DateTime
When the reported metrics period ended.
-
#report_start_timestamp ⇒ DateTime
When the reported metrics period began.
-
#report_timestamp ⇒ DateTime
Time when these performance and availability metrics were created.
-
#response_time_average ⇒ Float
The self-reported average response time in milliseconds for all combined data responses.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(report_start_timestamp: SKIP, report_end_timestamp: SKIP, metrics_name: SKIP, operation_ids: SKIP, response_time_average: SKIP, average_up_time: SKIP, report_timestamp: SKIP, additional_properties: nil) ⇒ CertificationMetricEntity
constructor
A new instance of CertificationMetricEntity.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_report_end_timestamp ⇒ Object
- #to_custom_report_start_timestamp ⇒ Object
- #to_custom_report_timestamp ⇒ Object
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(report_start_timestamp: SKIP, report_end_timestamp: SKIP, metrics_name: SKIP, operation_ids: SKIP, response_time_average: SKIP, average_up_time: SKIP, report_timestamp: SKIP, additional_properties: nil) ⇒ CertificationMetricEntity
Returns a new instance of CertificationMetricEntity.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/fdx_v660_api/models/certification_metric_entity.rb', line 77 def initialize(report_start_timestamp: SKIP, report_end_timestamp: SKIP, metrics_name: SKIP, operation_ids: SKIP, response_time_average: SKIP, average_up_time: SKIP, report_timestamp: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @report_start_timestamp = unless == SKIP @report_end_timestamp = unless == SKIP @metrics_name = metrics_name unless metrics_name == SKIP @operation_ids = operation_ids unless operation_ids == SKIP @response_time_average = response_time_average unless response_time_average == SKIP @average_up_time = average_up_time unless average_up_time == SKIP @report_timestamp = unless == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#average_up_time ⇒ Float
See the Certification Performance section that describes how this measurement will be calculated, defines the % of availability during the measurement
40 41 42 |
# File 'lib/fdx_v660_api/models/certification_metric_entity.rb', line 40 def average_up_time @average_up_time end |
#metrics_name ⇒ String
Any provider descriptive name for the measurement. Optional, can be omitted if operationIds are returned
24 25 26 |
# File 'lib/fdx_v660_api/models/certification_metric_entity.rb', line 24 def metrics_name @metrics_name end |
#operation_ids ⇒ Array[FdxResourceOperationId]
One or more Operation IDs for which these metrics apply. Optional, can be omitted if metricsName is returned
29 30 31 |
# File 'lib/fdx_v660_api/models/certification_metric_entity.rb', line 29 def operation_ids @operation_ids end |
#report_end_timestamp ⇒ DateTime
When the reported metrics period ended
19 20 21 |
# File 'lib/fdx_v660_api/models/certification_metric_entity.rb', line 19 def @report_end_timestamp end |
#report_start_timestamp ⇒ DateTime
When the reported metrics period began
15 16 17 |
# File 'lib/fdx_v660_api/models/certification_metric_entity.rb', line 15 def @report_start_timestamp end |
#report_timestamp ⇒ DateTime
Time when these performance and availability metrics were created
44 45 46 |
# File 'lib/fdx_v660_api/models/certification_metric_entity.rb', line 44 def @report_timestamp end |
#response_time_average ⇒ Float
The self-reported average response time in milliseconds for all combined data responses
34 35 36 |
# File 'lib/fdx_v660_api/models/certification_metric_entity.rb', line 34 def response_time_average @response_time_average end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/fdx_v660_api/models/certification_metric_entity.rb', line 95 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. = if hash.key?('reportStartTimestamp') (DateTimeHelper.from_rfc3339(hash['reportStartTimestamp']) if hash['reportStartTimestamp']) else SKIP end = if hash.key?('reportEndTimestamp') (DateTimeHelper.from_rfc3339(hash['reportEndTimestamp']) if hash['reportEndTimestamp']) else SKIP end metrics_name = hash.key?('metricsName') ? hash['metricsName'] : SKIP operation_ids = hash.key?('operationIds') ? hash['operationIds'] : SKIP response_time_average = hash.key?('responseTimeAverage') ? hash['responseTimeAverage'] : SKIP average_up_time = hash.key?('averageUpTime') ? hash['averageUpTime'] : SKIP = if hash.key?('reportTimestamp') (DateTimeHelper.from_rfc3339(hash['reportTimestamp']) if hash['reportTimestamp']) else SKIP end # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. CertificationMetricEntity.new(report_start_timestamp: , report_end_timestamp: , metrics_name: metrics_name, operation_ids: operation_ids, response_time_average: response_time_average, average_up_time: average_up_time, report_timestamp: , additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/fdx_v660_api/models/certification_metric_entity.rb', line 47 def self.names @_hash = {} if @_hash.nil? @_hash['report_start_timestamp'] = 'reportStartTimestamp' @_hash['report_end_timestamp'] = 'reportEndTimestamp' @_hash['metrics_name'] = 'metricsName' @_hash['operation_ids'] = 'operationIds' @_hash['response_time_average'] = 'responseTimeAverage' @_hash['average_up_time'] = 'averageUpTime' @_hash['report_timestamp'] = 'reportTimestamp' @_hash end |
.nullables ⇒ Object
An array for nullable fields
73 74 75 |
# File 'lib/fdx_v660_api/models/certification_metric_entity.rb', line 73 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/fdx_v660_api/models/certification_metric_entity.rb', line 60 def self.optionals %w[ report_start_timestamp report_end_timestamp metrics_name operation_ids response_time_average average_up_time report_timestamp ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
162 163 164 165 166 167 168 169 170 |
# File 'lib/fdx_v660_api/models/certification_metric_entity.rb', line 162 def inspect class_name = self.class.name.split('::').last "<#{class_name} report_start_timestamp: #{@report_start_timestamp.inspect},"\ " report_end_timestamp: #{@report_end_timestamp.inspect}, metrics_name:"\ " #{@metrics_name.inspect}, operation_ids: #{@operation_ids.inspect}, response_time_average:"\ " #{@response_time_average.inspect}, average_up_time: #{@average_up_time.inspect},"\ " report_timestamp: #{@report_timestamp.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_custom_report_end_timestamp ⇒ Object
143 144 145 |
# File 'lib/fdx_v660_api/models/certification_metric_entity.rb', line 143 def DateTimeHelper.to_rfc3339() end |
#to_custom_report_start_timestamp ⇒ Object
139 140 141 |
# File 'lib/fdx_v660_api/models/certification_metric_entity.rb', line 139 def DateTimeHelper.to_rfc3339() end |
#to_custom_report_timestamp ⇒ Object
147 148 149 |
# File 'lib/fdx_v660_api/models/certification_metric_entity.rb', line 147 def DateTimeHelper.to_rfc3339() end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
152 153 154 155 156 157 158 159 |
# File 'lib/fdx_v660_api/models/certification_metric_entity.rb', line 152 def to_s class_name = self.class.name.split('::').last "<#{class_name} report_start_timestamp: #{@report_start_timestamp}, report_end_timestamp:"\ " #{@report_end_timestamp}, metrics_name: #{@metrics_name}, operation_ids:"\ " #{@operation_ids}, response_time_average: #{@response_time_average}, average_up_time:"\ " #{@average_up_time}, report_timestamp: #{@report_timestamp}, additional_properties:"\ " #{@additional_properties}>" end |