Class: LaunchDarklyApi::AiConfigsMetricDenominatorRep
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- LaunchDarklyApi::AiConfigsMetricDenominatorRep
- Defined in:
- lib/launchdarkly_api/models/ai_configs_metric_denominator_rep.rb
Instance Attribute Summary collapse
-
#data_source ⇒ Object
Returns the value of attribute data_source.
-
#event_name ⇒ Object
The warehouse event column for the denominator.
-
#filters ⇒ Object
Returns the value of attribute filters.
-
#is_numeric ⇒ Object
Whether the denominator aggregates a numeric value.
-
#unit_aggregation_field ⇒ Object
The column to count distinct values of; required when unitAggregationType is count_distinct.
-
#unit_aggregation_type ⇒ Object
How individual unit values are aggregated for the denominator.
-
#window_end_offset ⇒ Object
End of the measurement window in milliseconds.
-
#window_start_offset ⇒ Object
Start of the measurement window in milliseconds.
-
#winsor_exclude_imputed ⇒ Object
Deprecated and ignored.
-
#winsor_include_imputed ⇒ Object
When true, the percentile bound calculation includes imputed zeros.
-
#winsor_lower_percentile ⇒ Object
Lower winsorization percentile in the open interval (0, 100).
-
#winsor_upper_percentile ⇒ Object
Upper winsorization percentile in the open interval (0, 100).
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 = {}) ⇒ AiConfigsMetricDenominatorRep
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 = {}) ⇒ AiConfigsMetricDenominatorRep
Initializes the object
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 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 |
# File 'lib/launchdarkly_api/models/ai_configs_metric_denominator_rep.rb', line 106 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `LaunchDarklyApi::AiConfigsMetricDenominatorRep` 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 `LaunchDarklyApi::AiConfigsMetricDenominatorRep`. 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?(:'event_name') self.event_name = attributes[:'event_name'] end if attributes.key?(:'is_numeric') self.is_numeric = attributes[:'is_numeric'] end if attributes.key?(:'unit_aggregation_type') self.unit_aggregation_type = attributes[:'unit_aggregation_type'] end if attributes.key?(:'unit_aggregation_field') self.unit_aggregation_field = attributes[:'unit_aggregation_field'] end if attributes.key?(:'data_source') self.data_source = attributes[:'data_source'] end if attributes.key?(:'filters') self.filters = attributes[:'filters'] end if attributes.key?(:'window_start_offset') self.window_start_offset = attributes[:'window_start_offset'] end if attributes.key?(:'window_end_offset') self.window_end_offset = attributes[:'window_end_offset'] end if attributes.key?(:'winsor_lower_percentile') self.winsor_lower_percentile = attributes[:'winsor_lower_percentile'] end if attributes.key?(:'winsor_upper_percentile') self.winsor_upper_percentile = attributes[:'winsor_upper_percentile'] end if attributes.key?(:'winsor_exclude_imputed') self.winsor_exclude_imputed = attributes[:'winsor_exclude_imputed'] end if attributes.key?(:'winsor_include_imputed') self.winsor_include_imputed = attributes[:'winsor_include_imputed'] end end |
Instance Attribute Details
#data_source ⇒ Object
Returns the value of attribute data_source.
30 31 32 |
# File 'lib/launchdarkly_api/models/ai_configs_metric_denominator_rep.rb', line 30 def data_source @data_source end |
#event_name ⇒ Object
The warehouse event column for the denominator
19 20 21 |
# File 'lib/launchdarkly_api/models/ai_configs_metric_denominator_rep.rb', line 19 def event_name @event_name end |
#filters ⇒ Object
Returns the value of attribute filters.
32 33 34 |
# File 'lib/launchdarkly_api/models/ai_configs_metric_denominator_rep.rb', line 32 def filters @filters end |
#is_numeric ⇒ Object
Whether the denominator aggregates a numeric value
22 23 24 |
# File 'lib/launchdarkly_api/models/ai_configs_metric_denominator_rep.rb', line 22 def is_numeric @is_numeric end |
#unit_aggregation_field ⇒ Object
The column to count distinct values of; required when unitAggregationType is count_distinct
28 29 30 |
# File 'lib/launchdarkly_api/models/ai_configs_metric_denominator_rep.rb', line 28 def unit_aggregation_field @unit_aggregation_field end |
#unit_aggregation_type ⇒ Object
How individual unit values are aggregated for the denominator
25 26 27 |
# File 'lib/launchdarkly_api/models/ai_configs_metric_denominator_rep.rb', line 25 def unit_aggregation_type @unit_aggregation_type end |
#window_end_offset ⇒ Object
End of the measurement window in milliseconds
38 39 40 |
# File 'lib/launchdarkly_api/models/ai_configs_metric_denominator_rep.rb', line 38 def window_end_offset @window_end_offset end |
#window_start_offset ⇒ Object
Start of the measurement window in milliseconds
35 36 37 |
# File 'lib/launchdarkly_api/models/ai_configs_metric_denominator_rep.rb', line 35 def window_start_offset @window_start_offset end |
#winsor_exclude_imputed ⇒ Object
Deprecated and ignored. Use winsorIncludeImputed instead.
47 48 49 |
# File 'lib/launchdarkly_api/models/ai_configs_metric_denominator_rep.rb', line 47 def winsor_exclude_imputed @winsor_exclude_imputed end |
#winsor_include_imputed ⇒ Object
When true, the percentile bound calculation includes imputed zeros
50 51 52 |
# File 'lib/launchdarkly_api/models/ai_configs_metric_denominator_rep.rb', line 50 def winsor_include_imputed @winsor_include_imputed end |
#winsor_lower_percentile ⇒ Object
Lower winsorization percentile in the open interval (0, 100)
41 42 43 |
# File 'lib/launchdarkly_api/models/ai_configs_metric_denominator_rep.rb', line 41 def winsor_lower_percentile @winsor_lower_percentile end |
#winsor_upper_percentile ⇒ Object
Upper winsorization percentile in the open interval (0, 100)
44 45 46 |
# File 'lib/launchdarkly_api/models/ai_configs_metric_denominator_rep.rb', line 44 def winsor_upper_percentile @winsor_upper_percentile end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
71 72 73 |
# File 'lib/launchdarkly_api/models/ai_configs_metric_denominator_rep.rb', line 71 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
76 77 78 |
# File 'lib/launchdarkly_api/models/ai_configs_metric_denominator_rep.rb', line 76 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/launchdarkly_api/models/ai_configs_metric_denominator_rep.rb', line 53 def self.attribute_map { :'event_name' => :'eventName', :'is_numeric' => :'isNumeric', :'unit_aggregation_type' => :'unitAggregationType', :'unit_aggregation_field' => :'unitAggregationField', :'data_source' => :'dataSource', :'filters' => :'filters', :'window_start_offset' => :'windowStartOffset', :'window_end_offset' => :'windowEndOffset', :'winsor_lower_percentile' => :'winsorLowerPercentile', :'winsor_upper_percentile' => :'winsorUpperPercentile', :'winsor_exclude_imputed' => :'winsorExcludeImputed', :'winsor_include_imputed' => :'winsorIncludeImputed' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/launchdarkly_api/models/ai_configs_metric_denominator_rep.rb', line 218 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
99 100 101 102 |
# File 'lib/launchdarkly_api/models/ai_configs_metric_denominator_rep.rb', line 99 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/launchdarkly_api/models/ai_configs_metric_denominator_rep.rb', line 81 def self.openapi_types { :'event_name' => :'String', :'is_numeric' => :'Boolean', :'unit_aggregation_type' => :'String', :'unit_aggregation_field' => :'String', :'data_source' => :'AiConfigsMetricDataSourceRefRep', :'filters' => :'AiConfigsFilter', :'window_start_offset' => :'Integer', :'window_end_offset' => :'Integer', :'winsor_lower_percentile' => :'Float', :'winsor_upper_percentile' => :'Float', :'winsor_exclude_imputed' => :'Boolean', :'winsor_include_imputed' => :'Boolean' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
# File 'lib/launchdarkly_api/models/ai_configs_metric_denominator_rep.rb', line 186 def ==(o) return true if self.equal?(o) self.class == o.class && event_name == o.event_name && is_numeric == o.is_numeric && unit_aggregation_type == o.unit_aggregation_type && unit_aggregation_field == o.unit_aggregation_field && data_source == o.data_source && filters == o.filters && window_start_offset == o.window_start_offset && window_end_offset == o.window_end_offset && winsor_lower_percentile == o.winsor_lower_percentile && winsor_upper_percentile == o.winsor_upper_percentile && winsor_exclude_imputed == o.winsor_exclude_imputed && winsor_include_imputed == o.winsor_include_imputed end |
#eql?(o) ⇒ Boolean
205 206 207 |
# File 'lib/launchdarkly_api/models/ai_configs_metric_denominator_rep.rb', line 205 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
211 212 213 |
# File 'lib/launchdarkly_api/models/ai_configs_metric_denominator_rep.rb', line 211 def hash [event_name, is_numeric, unit_aggregation_type, unit_aggregation_field, data_source, filters, window_start_offset, window_end_offset, winsor_lower_percentile, winsor_upper_percentile, winsor_exclude_imputed, winsor_include_imputed].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
171 172 173 174 175 |
# File 'lib/launchdarkly_api/models/ai_configs_metric_denominator_rep.rb', line 171 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
240 241 242 243 244 245 246 247 248 249 250 251 252 |
# File 'lib/launchdarkly_api/models/ai_configs_metric_denominator_rep.rb', line 240 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
179 180 181 182 |
# File 'lib/launchdarkly_api/models/ai_configs_metric_denominator_rep.rb', line 179 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' true end |