Class: Mudbase::DashboardOverviewDataUptime
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Mudbase::DashboardOverviewDataUptime
- Defined in:
- lib/mudbase/models/dashboard_overview_data_uptime.rb
Overview
Organization-wide uptime KPI; platformProbe* is infra (Mongo); projectHttp* is this project only for comparison.
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#display_pct30d ⇒ Object
Returns the value of attribute display_pct30d.
-
#display_source ⇒ Object
Returns the value of attribute display_source.
-
#global_http_non5xx_pct30d ⇒ Object
Deprecated alias for orgHttpNon5xxPct30d.
-
#global_http_sampled30d ⇒ Object
Deprecated alias for orgHttpSampled30d.
-
#help ⇒ Object
Returns the value of attribute help.
-
#is_preliminary ⇒ Object
Returns the value of attribute is_preliminary.
-
#org_http5xx30d ⇒ Object
Metered 5xx count from UsageStat (trackApiCall).
-
#org_http_non5xx_pct30d ⇒ Object
Returns the value of attribute org_http_non5xx_pct30d.
-
#org_http_sampled30d ⇒ Object
Returns the value of attribute org_http_sampled30d.
-
#platform_ok_samples ⇒ Object
Returns the value of attribute platform_ok_samples.
-
#platform_probe_pct30d ⇒ Object
Returns the value of attribute platform_probe_pct30d.
-
#platform_samples ⇒ Object
Returns the value of attribute platform_samples.
-
#project_http5xx30d ⇒ Object
This project’s metered 5xx count (30d).
-
#project_http_non5xx_pct30d ⇒ Object
Returns the value of attribute project_http_non5xx_pct30d.
-
#project_http_sampled30d ⇒ Object
Returns the value of attribute project_http_sampled30d.
-
#request_non5xx_pct30d ⇒ Object
Deprecated alias for orgHttpNon5xxPct30d.
-
#request_sampled30d ⇒ Object
Deprecated alias for orgHttpSampled30d.
-
#scope ⇒ Object
Returns the value of attribute scope.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ DashboardOverviewDataUptime
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ DashboardOverviewDataUptime
Initializes the object
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 |
# File 'lib/mudbase/models/dashboard_overview_data_uptime.rb', line 155 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Mudbase::DashboardOverviewDataUptime` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Mudbase::DashboardOverviewDataUptime`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'scope') self.scope = attributes[:'scope'] end if attributes.key?(:'display_pct30d') self.display_pct30d = attributes[:'display_pct30d'] end if attributes.key?(:'display_source') self.display_source = attributes[:'display_source'] end if attributes.key?(:'is_preliminary') self.is_preliminary = attributes[:'is_preliminary'] end if attributes.key?(:'platform_probe_pct30d') self.platform_probe_pct30d = attributes[:'platform_probe_pct30d'] end if attributes.key?(:'platform_samples') self.platform_samples = attributes[:'platform_samples'] end if attributes.key?(:'platform_ok_samples') self.platform_ok_samples = attributes[:'platform_ok_samples'] end if attributes.key?(:'org_http_non5xx_pct30d') self.org_http_non5xx_pct30d = attributes[:'org_http_non5xx_pct30d'] end if attributes.key?(:'org_http_sampled30d') self.org_http_sampled30d = attributes[:'org_http_sampled30d'] end if attributes.key?(:'org_http5xx30d') self.org_http5xx30d = attributes[:'org_http5xx30d'] end if attributes.key?(:'project_http5xx30d') self.project_http5xx30d = attributes[:'project_http5xx30d'] end if attributes.key?(:'global_http_non5xx_pct30d') self.global_http_non5xx_pct30d = attributes[:'global_http_non5xx_pct30d'] end if attributes.key?(:'global_http_sampled30d') self.global_http_sampled30d = attributes[:'global_http_sampled30d'] end if attributes.key?(:'request_non5xx_pct30d') self.request_non5xx_pct30d = attributes[:'request_non5xx_pct30d'] end if attributes.key?(:'request_sampled30d') self.request_sampled30d = attributes[:'request_sampled30d'] end if attributes.key?(:'project_http_non5xx_pct30d') self.project_http_non5xx_pct30d = attributes[:'project_http_non5xx_pct30d'] end if attributes.key?(:'project_http_sampled30d') self.project_http_sampled30d = attributes[:'project_http_sampled30d'] end if attributes.key?(:'help') self.help = attributes[:'help'] end end |
Instance Attribute Details
#display_pct30d ⇒ Object
Returns the value of attribute display_pct30d.
21 22 23 |
# File 'lib/mudbase/models/dashboard_overview_data_uptime.rb', line 21 def display_pct30d @display_pct30d end |
#display_source ⇒ Object
Returns the value of attribute display_source.
23 24 25 |
# File 'lib/mudbase/models/dashboard_overview_data_uptime.rb', line 23 def display_source @display_source end |
#global_http_non5xx_pct30d ⇒ Object
Deprecated alias for orgHttpNon5xxPct30d
44 45 46 |
# File 'lib/mudbase/models/dashboard_overview_data_uptime.rb', line 44 def global_http_non5xx_pct30d @global_http_non5xx_pct30d end |
#global_http_sampled30d ⇒ Object
Deprecated alias for orgHttpSampled30d
47 48 49 |
# File 'lib/mudbase/models/dashboard_overview_data_uptime.rb', line 47 def global_http_sampled30d @global_http_sampled30d end |
#help ⇒ Object
Returns the value of attribute help.
59 60 61 |
# File 'lib/mudbase/models/dashboard_overview_data_uptime.rb', line 59 def help @help end |
#is_preliminary ⇒ Object
Returns the value of attribute is_preliminary.
25 26 27 |
# File 'lib/mudbase/models/dashboard_overview_data_uptime.rb', line 25 def is_preliminary @is_preliminary end |
#org_http5xx30d ⇒ Object
Metered 5xx count from UsageStat (trackApiCall)
38 39 40 |
# File 'lib/mudbase/models/dashboard_overview_data_uptime.rb', line 38 def org_http5xx30d @org_http5xx30d end |
#org_http_non5xx_pct30d ⇒ Object
Returns the value of attribute org_http_non5xx_pct30d.
33 34 35 |
# File 'lib/mudbase/models/dashboard_overview_data_uptime.rb', line 33 def org_http_non5xx_pct30d @org_http_non5xx_pct30d end |
#org_http_sampled30d ⇒ Object
Returns the value of attribute org_http_sampled30d.
35 36 37 |
# File 'lib/mudbase/models/dashboard_overview_data_uptime.rb', line 35 def org_http_sampled30d @org_http_sampled30d end |
#platform_ok_samples ⇒ Object
Returns the value of attribute platform_ok_samples.
31 32 33 |
# File 'lib/mudbase/models/dashboard_overview_data_uptime.rb', line 31 def platform_ok_samples @platform_ok_samples end |
#platform_probe_pct30d ⇒ Object
Returns the value of attribute platform_probe_pct30d.
27 28 29 |
# File 'lib/mudbase/models/dashboard_overview_data_uptime.rb', line 27 def platform_probe_pct30d @platform_probe_pct30d end |
#platform_samples ⇒ Object
Returns the value of attribute platform_samples.
29 30 31 |
# File 'lib/mudbase/models/dashboard_overview_data_uptime.rb', line 29 def platform_samples @platform_samples end |
#project_http5xx30d ⇒ Object
This project’s metered 5xx count (30d)
41 42 43 |
# File 'lib/mudbase/models/dashboard_overview_data_uptime.rb', line 41 def project_http5xx30d @project_http5xx30d end |
#project_http_non5xx_pct30d ⇒ Object
Returns the value of attribute project_http_non5xx_pct30d.
55 56 57 |
# File 'lib/mudbase/models/dashboard_overview_data_uptime.rb', line 55 def project_http_non5xx_pct30d @project_http_non5xx_pct30d end |
#project_http_sampled30d ⇒ Object
Returns the value of attribute project_http_sampled30d.
57 58 59 |
# File 'lib/mudbase/models/dashboard_overview_data_uptime.rb', line 57 def project_http_sampled30d @project_http_sampled30d end |
#request_non5xx_pct30d ⇒ Object
Deprecated alias for orgHttpNon5xxPct30d
50 51 52 |
# File 'lib/mudbase/models/dashboard_overview_data_uptime.rb', line 50 def request_non5xx_pct30d @request_non5xx_pct30d end |
#request_sampled30d ⇒ Object
Deprecated alias for orgHttpSampled30d
53 54 55 |
# File 'lib/mudbase/models/dashboard_overview_data_uptime.rb', line 53 def request_sampled30d @request_sampled30d end |
#scope ⇒ Object
Returns the value of attribute scope.
19 20 21 |
# File 'lib/mudbase/models/dashboard_overview_data_uptime.rb', line 19 def scope @scope end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
108 109 110 |
# File 'lib/mudbase/models/dashboard_overview_data_uptime.rb', line 108 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
113 114 115 |
# File 'lib/mudbase/models/dashboard_overview_data_uptime.rb', line 113 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/mudbase/models/dashboard_overview_data_uptime.rb', line 84 def self.attribute_map { :'scope' => :'scope', :'display_pct30d' => :'displayPct30d', :'display_source' => :'displaySource', :'is_preliminary' => :'isPreliminary', :'platform_probe_pct30d' => :'platformProbePct30d', :'platform_samples' => :'platformSamples', :'platform_ok_samples' => :'platformOkSamples', :'org_http_non5xx_pct30d' => :'orgHttpNon5xxPct30d', :'org_http_sampled30d' => :'orgHttpSampled30d', :'org_http5xx30d' => :'orgHttp5xx30d', :'project_http5xx30d' => :'projectHttp5xx30d', :'global_http_non5xx_pct30d' => :'globalHttpNon5xxPct30d', :'global_http_sampled30d' => :'globalHttpSampled30d', :'request_non5xx_pct30d' => :'requestNon5xxPct30d', :'request_sampled30d' => :'requestSampled30d', :'project_http_non5xx_pct30d' => :'projectHttpNon5xxPct30d', :'project_http_sampled30d' => :'projectHttpSampled30d', :'help' => :'help' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 |
# File 'lib/mudbase/models/dashboard_overview_data_uptime.rb', line 309 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
142 143 144 145 146 147 148 149 150 151 |
# File 'lib/mudbase/models/dashboard_overview_data_uptime.rb', line 142 def self.openapi_nullable Set.new([ :'display_pct30d', :'platform_probe_pct30d', :'org_http_non5xx_pct30d', :'global_http_non5xx_pct30d', :'request_non5xx_pct30d', :'project_http_non5xx_pct30d', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/mudbase/models/dashboard_overview_data_uptime.rb', line 118 def self.openapi_types { :'scope' => :'String', :'display_pct30d' => :'Float', :'display_source' => :'String', :'is_preliminary' => :'Boolean', :'platform_probe_pct30d' => :'Float', :'platform_samples' => :'Integer', :'platform_ok_samples' => :'Integer', :'org_http_non5xx_pct30d' => :'Float', :'org_http_sampled30d' => :'Integer', :'org_http5xx30d' => :'Integer', :'project_http5xx30d' => :'Integer', :'global_http_non5xx_pct30d' => :'Float', :'global_http_sampled30d' => :'Integer', :'request_non5xx_pct30d' => :'Float', :'request_sampled30d' => :'Integer', :'project_http_non5xx_pct30d' => :'Float', :'project_http_sampled30d' => :'Integer', :'help' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 |
# File 'lib/mudbase/models/dashboard_overview_data_uptime.rb', line 271 def ==(o) return true if self.equal?(o) self.class == o.class && scope == o.scope && display_pct30d == o.display_pct30d && display_source == o.display_source && is_preliminary == o.is_preliminary && platform_probe_pct30d == o.platform_probe_pct30d && platform_samples == o.platform_samples && platform_ok_samples == o.platform_ok_samples && org_http_non5xx_pct30d == o.org_http_non5xx_pct30d && org_http_sampled30d == o.org_http_sampled30d && org_http5xx30d == o.org_http5xx30d && project_http5xx30d == o.project_http5xx30d && global_http_non5xx_pct30d == o.global_http_non5xx_pct30d && global_http_sampled30d == o.global_http_sampled30d && request_non5xx_pct30d == o.request_non5xx_pct30d && request_sampled30d == o.request_sampled30d && project_http_non5xx_pct30d == o.project_http_non5xx_pct30d && project_http_sampled30d == o.project_http_sampled30d && help == o.help end |
#eql?(o) ⇒ Boolean
296 297 298 |
# File 'lib/mudbase/models/dashboard_overview_data_uptime.rb', line 296 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
302 303 304 |
# File 'lib/mudbase/models/dashboard_overview_data_uptime.rb', line 302 def hash [scope, display_pct30d, display_source, is_preliminary, platform_probe_pct30d, platform_samples, platform_ok_samples, org_http_non5xx_pct30d, org_http_sampled30d, org_http5xx30d, project_http5xx30d, global_http_non5xx_pct30d, global_http_sampled30d, request_non5xx_pct30d, request_sampled30d, project_http_non5xx_pct30d, project_http_sampled30d, help].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
244 245 246 247 248 |
# File 'lib/mudbase/models/dashboard_overview_data_uptime.rb', line 244 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
331 332 333 334 335 336 337 338 339 340 341 342 343 |
# File 'lib/mudbase/models/dashboard_overview_data_uptime.rb', line 331 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
252 253 254 255 256 257 |
# File 'lib/mudbase/models/dashboard_overview_data_uptime.rb', line 252 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' scope_validator = EnumAttributeValidator.new('String', ["organization"]) return false unless scope_validator.valid?(@scope) true end |