Class: MistApi::ConstInsightMetricsProperty
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::ConstInsightMetricsProperty
- Defined in:
- lib/mist_api/models/const_insight_metrics_property.rb
Overview
ConstInsightMetricsProperty Model.
Instance Attribute Summary collapse
-
#ctype ⇒ Array[String]
TODO: Write general description for this method.
-
#description ⇒ String
TODO: Write general description for this method.
-
#example ⇒ ConstInsightMetricsPropertyExampleAnyOf
TODO: Write general description for this method.
-
#intervals ⇒ Hash[String, ConstInsightMetricsPropertyInterval]
Property key is the interval (e.g. 10m, 1h, …).
-
#keys ⇒ Object
Property key is the interval (e.g. 10m, 1h, …).
-
#params ⇒ Hash[String, ConstInsightMetricsPropertyParam]
Property key is the parameter name.
-
#report_durations ⇒ Hash[String, ConstInsightMetricsPropertyReportDuration]
Property key is the duration (e.g. 1d, 1w, …).
-
#report_scopes ⇒ Array[String]
Property key is the duration (e.g. 1d, 1w, …).
-
#scopes ⇒ Array[ConstInsightMetricsPropertyScopeEnum]
Property key is the duration (e.g. 1d, 1w, …).
-
#sle_baselined ⇒ TrueClass | FalseClass
Property key is the duration (e.g. 1d, 1w, …).
-
#sle_classifiers ⇒ Array[String]
Property key is the duration (e.g. 1d, 1w, …).
-
#type ⇒ String
Property key is the duration (e.g. 1d, 1w, …).
-
#unit ⇒ String
Property key is the duration (e.g. 1d, 1w, …).
-
#values ⇒ Object
Property key is the duration (e.g. 1d, 1w, …).
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(ctype = SKIP, description = SKIP, example = SKIP, intervals = SKIP, keys = SKIP, params = SKIP, report_durations = SKIP, report_scopes = SKIP, scopes = SKIP, sle_baselined = SKIP, sle_classifiers = SKIP, type = SKIP, unit = SKIP, values = SKIP) ⇒ ConstInsightMetricsProperty
constructor
A new instance of ConstInsightMetricsProperty.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#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(ctype = SKIP, description = SKIP, example = SKIP, intervals = SKIP, keys = SKIP, params = SKIP, report_durations = SKIP, report_scopes = SKIP, scopes = SKIP, sle_baselined = SKIP, sle_classifiers = SKIP, type = SKIP, unit = SKIP, values = SKIP) ⇒ ConstInsightMetricsProperty
Returns a new instance of ConstInsightMetricsProperty.
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/mist_api/models/const_insight_metrics_property.rb', line 113 def initialize(ctype = SKIP, description = SKIP, example = SKIP, intervals = SKIP, keys = SKIP, params = SKIP, report_durations = SKIP, report_scopes = SKIP, scopes = SKIP, sle_baselined = SKIP, sle_classifiers = SKIP, type = SKIP, unit = SKIP, values = SKIP) @ctype = ctype unless ctype == SKIP @description = description unless description == SKIP @example = example unless example == SKIP @intervals = intervals unless intervals == SKIP @keys = keys unless keys == SKIP @params = params unless params == SKIP @report_durations = report_durations unless report_durations == SKIP @report_scopes = report_scopes unless report_scopes == SKIP @scopes = scopes unless scopes == SKIP @sle_baselined = sle_baselined unless sle_baselined == SKIP @sle_classifiers = sle_classifiers unless sle_classifiers == SKIP @type = type unless type == SKIP @unit = unit unless unit == SKIP @values = values unless values == SKIP end |
Instance Attribute Details
#ctype ⇒ Array[String]
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/const_insight_metrics_property.rb', line 14 def ctype @ctype end |
#description ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/const_insight_metrics_property.rb', line 18 def description @description end |
#example ⇒ ConstInsightMetricsPropertyExampleAnyOf
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/const_insight_metrics_property.rb', line 22 def example @example end |
#intervals ⇒ Hash[String, ConstInsightMetricsPropertyInterval]
Property key is the interval (e.g. 10m, 1h, …)
26 27 28 |
# File 'lib/mist_api/models/const_insight_metrics_property.rb', line 26 def intervals @intervals end |
#keys ⇒ Object
Property key is the interval (e.g. 10m, 1h, …)
30 31 32 |
# File 'lib/mist_api/models/const_insight_metrics_property.rb', line 30 def keys @keys end |
#params ⇒ Hash[String, ConstInsightMetricsPropertyParam]
Property key is the parameter name
34 35 36 |
# File 'lib/mist_api/models/const_insight_metrics_property.rb', line 34 def params @params end |
#report_durations ⇒ Hash[String, ConstInsightMetricsPropertyReportDuration]
Property key is the duration (e.g. 1d, 1w, …)
38 39 40 |
# File 'lib/mist_api/models/const_insight_metrics_property.rb', line 38 def report_durations @report_durations end |
#report_scopes ⇒ Array[String]
Property key is the duration (e.g. 1d, 1w, …)
42 43 44 |
# File 'lib/mist_api/models/const_insight_metrics_property.rb', line 42 def report_scopes @report_scopes end |
#scopes ⇒ Array[ConstInsightMetricsPropertyScopeEnum]
Property key is the duration (e.g. 1d, 1w, …)
46 47 48 |
# File 'lib/mist_api/models/const_insight_metrics_property.rb', line 46 def scopes @scopes end |
#sle_baselined ⇒ TrueClass | FalseClass
Property key is the duration (e.g. 1d, 1w, …)
50 51 52 |
# File 'lib/mist_api/models/const_insight_metrics_property.rb', line 50 def sle_baselined @sle_baselined end |
#sle_classifiers ⇒ Array[String]
Property key is the duration (e.g. 1d, 1w, …)
54 55 56 |
# File 'lib/mist_api/models/const_insight_metrics_property.rb', line 54 def sle_classifiers @sle_classifiers end |
#type ⇒ String
Property key is the duration (e.g. 1d, 1w, …)
58 59 60 |
# File 'lib/mist_api/models/const_insight_metrics_property.rb', line 58 def type @type end |
#unit ⇒ String
Property key is the duration (e.g. 1d, 1w, …)
62 63 64 |
# File 'lib/mist_api/models/const_insight_metrics_property.rb', line 62 def unit @unit end |
#values ⇒ Object
Property key is the duration (e.g. 1d, 1w, …)
66 67 68 |
# File 'lib/mist_api/models/const_insight_metrics_property.rb', line 66 def values @values end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 177 178 179 180 181 |
# File 'lib/mist_api/models/const_insight_metrics_property.rb', line 135 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. ctype = hash.key?('ctype') ? hash['ctype'] : SKIP description = hash.key?('description') ? hash['description'] : SKIP example = hash.key?('example') ? APIHelper.deserialize_union_type( UnionTypeLookUp.get(:ConstInsightMetricsPropertyExampleAnyOf2), hash['example'] ) : SKIP intervals = ConstInsightMetricsPropertyInterval.from_hash(hash['intervals']) if hash['intervals'] intervals = SKIP unless hash.key?('intervals') keys = hash.key?('keys') ? hash['keys'] : SKIP params = ConstInsightMetricsPropertyParam.from_hash(hash['params']) if hash['params'] params = SKIP unless hash.key?('params') if hash['report_durations'] report_durations = ConstInsightMetricsPropertyReportDuration.from_hash(hash['report_durations']) end report_durations = SKIP unless hash.key?('report_durations') report_scopes = hash.key?('report_scopes') ? hash['report_scopes'] : SKIP scopes = hash.key?('scopes') ? hash['scopes'] : SKIP sle_baselined = hash.key?('sle_baselined') ? hash['sle_baselined'] : SKIP sle_classifiers = hash.key?('sle_classifiers') ? hash['sle_classifiers'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP unit = hash.key?('unit') ? hash['unit'] : SKIP values = hash.key?('values') ? hash['values'] : SKIP # Create object from extracted values. ConstInsightMetricsProperty.new(ctype, description, example, intervals, keys, params, report_durations, report_scopes, scopes, sle_baselined, sle_classifiers, type, unit, values) end |
.names ⇒ Object
A mapping from model property names to API property names.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/mist_api/models/const_insight_metrics_property.rb', line 69 def self.names @_hash = {} if @_hash.nil? @_hash['ctype'] = 'ctype' @_hash['description'] = 'description' @_hash['example'] = 'example' @_hash['intervals'] = 'intervals' @_hash['keys'] = 'keys' @_hash['params'] = 'params' @_hash['report_durations'] = 'report_durations' @_hash['report_scopes'] = 'report_scopes' @_hash['scopes'] = 'scopes' @_hash['sle_baselined'] = 'sle_baselined' @_hash['sle_classifiers'] = 'sle_classifiers' @_hash['type'] = 'type' @_hash['unit'] = 'unit' @_hash['values'] = 'values' @_hash end |
.nullables ⇒ Object
An array for nullable fields
109 110 111 |
# File 'lib/mist_api/models/const_insight_metrics_property.rb', line 109 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/mist_api/models/const_insight_metrics_property.rb', line 89 def self.optionals %w[ ctype description example intervals keys params report_durations report_scopes scopes sle_baselined sle_classifiers type unit values ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
185 186 187 188 189 190 191 |
# File 'lib/mist_api/models/const_insight_metrics_property.rb', line 185 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
204 205 206 207 208 209 210 211 212 |
# File 'lib/mist_api/models/const_insight_metrics_property.rb', line 204 def inspect class_name = self.class.name.split('::').last "<#{class_name} ctype: #{@ctype.inspect}, description: #{@description.inspect}, example:"\ " #{@example.inspect}, intervals: #{@intervals.inspect}, keys: #{@keys.inspect}, params:"\ " #{@params.inspect}, report_durations: #{@report_durations.inspect}, report_scopes:"\ " #{@report_scopes.inspect}, scopes: #{@scopes.inspect}, sle_baselined:"\ " #{@sle_baselined.inspect}, sle_classifiers: #{@sle_classifiers.inspect}, type:"\ " #{@type.inspect}, unit: #{@unit.inspect}, values: #{@values.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
194 195 196 197 198 199 200 201 |
# File 'lib/mist_api/models/const_insight_metrics_property.rb', line 194 def to_s class_name = self.class.name.split('::').last "<#{class_name} ctype: #{@ctype}, description: #{@description}, example: #{@example},"\ " intervals: #{@intervals}, keys: #{@keys}, params: #{@params}, report_durations:"\ " #{@report_durations}, report_scopes: #{@report_scopes}, scopes: #{@scopes}, sle_baselined:"\ " #{@sle_baselined}, sle_classifiers: #{@sle_classifiers}, type: #{@type}, unit: #{@unit},"\ " values: #{@values}>" end |