shipeasy-sdk 2.1.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/docs/skill/SKILL.md +6 -2
- data/lib/generators/shipeasy/install/USAGE +24 -0
- data/lib/generators/shipeasy/install/install_generator.rb +86 -0
- data/lib/generators/shipeasy/install/templates/initializer.rb.tt +41 -0
- data/lib/shipeasy/admin.rb +85 -0
- data/lib/shipeasy/sdk/version.rb +1 -1
- data/lib/shipeasy_admin/api/alert_rules_api.rb +292 -0
- data/lib/shipeasy_admin/api/attributes_api.rb +82 -0
- data/lib/shipeasy_admin/api/configs_api.rb +680 -0
- data/lib/shipeasy_admin/api/events_api.rb +438 -0
- data/lib/shipeasy_admin/api/experiments_api.rb +727 -0
- data/lib/shipeasy_admin/api/gates_api.rb +438 -0
- data/lib/shipeasy_admin/api/i18n_api.rb +507 -0
- data/lib/shipeasy_admin/api/killswitches_api.rb +526 -0
- data/lib/shipeasy_admin/api/metrics_api.rb +281 -0
- data/lib/shipeasy_admin/api/ops_api.rb +525 -0
- data/lib/shipeasy_admin/api/projects_api.rb +153 -0
- data/lib/shipeasy_admin/api/universes_api.rb +306 -0
- data/lib/shipeasy_admin/api_client.rb +441 -0
- data/lib/shipeasy_admin/api_error.rb +58 -0
- data/lib/shipeasy_admin/api_model_base.rb +88 -0
- data/lib/shipeasy_admin/configuration.rb +397 -0
- data/lib/shipeasy_admin/models/approve_event_request.rb +198 -0
- data/lib/shipeasy_admin/models/approve_event_response.rb +166 -0
- data/lib/shipeasy_admin/models/create_alert_rule_request.rb +408 -0
- data/lib/shipeasy_admin/models/create_alert_rule_response.rb +165 -0
- data/lib/shipeasy_admin/models/create_config_request.rb +280 -0
- data/lib/shipeasy_admin/models/create_config_response.rb +201 -0
- data/lib/shipeasy_admin/models/create_event_request.rb +253 -0
- data/lib/shipeasy_admin/models/create_event_response.rb +193 -0
- data/lib/shipeasy_admin/models/create_experiment_request.rb +869 -0
- data/lib/shipeasy_admin/models/create_experiment_request_goal_metric.rb +336 -0
- data/lib/shipeasy_admin/models/create_experiment_response.rb +212 -0
- data/lib/shipeasy_admin/models/create_gate_request.rb +529 -0
- data/lib/shipeasy_admin/models/create_gate_response.rb +212 -0
- data/lib/shipeasy_admin/models/create_i18n_profile_request.rb +188 -0
- data/lib/shipeasy_admin/models/create_i18n_profile_response.rb +193 -0
- data/lib/shipeasy_admin/models/create_killswitch_request.rb +263 -0
- data/lib/shipeasy_admin/models/create_killswitch_response.rb +201 -0
- data/lib/shipeasy_admin/models/create_metric_request.rb +415 -0
- data/lib/shipeasy_admin/models/create_metric_response.rb +193 -0
- data/lib/shipeasy_admin/models/create_ops_item_request.rb +287 -0
- data/lib/shipeasy_admin/models/create_ops_item_response.rb +177 -0
- data/lib/shipeasy_admin/models/create_universe_request.rb +289 -0
- data/lib/shipeasy_admin/models/create_universe_response.rb +212 -0
- data/lib/shipeasy_admin/models/delete_alert_rule_response.rb +188 -0
- data/lib/shipeasy_admin/models/delete_config_response.rb +188 -0
- data/lib/shipeasy_admin/models/delete_event_response.rb +189 -0
- data/lib/shipeasy_admin/models/delete_experiment_response.rb +188 -0
- data/lib/shipeasy_admin/models/delete_gate_response.rb +188 -0
- data/lib/shipeasy_admin/models/delete_killswitch_response.rb +188 -0
- data/lib/shipeasy_admin/models/delete_metric_response.rb +189 -0
- data/lib/shipeasy_admin/models/delete_universe_response.rb +188 -0
- data/lib/shipeasy_admin/models/disable_gate_response.rb +190 -0
- data/lib/shipeasy_admin/models/discard_config_draft_request.rb +190 -0
- data/lib/shipeasy_admin/models/discard_config_draft_response.rb +188 -0
- data/lib/shipeasy_admin/models/enable_gate_response.rb +190 -0
- data/lib/shipeasy_admin/models/error_response.rb +185 -0
- data/lib/shipeasy_admin/models/get_config_response.rb +351 -0
- data/lib/shipeasy_admin/models/get_current_project_response.rb +606 -0
- data/lib/shipeasy_admin/models/get_current_project_response_module_translations.rb +104 -0
- data/lib/shipeasy_admin/models/get_event_response.rb +344 -0
- data/lib/shipeasy_admin/models/get_experiment_response.rb +688 -0
- data/lib/shipeasy_admin/models/get_experiment_results_response.rb +243 -0
- data/lib/shipeasy_admin/models/get_experiment_results_response_experiment.rb +248 -0
- data/lib/shipeasy_admin/models/get_experiment_results_response_results_inner.rb +252 -0
- data/lib/shipeasy_admin/models/get_experiment_timeseries_response.rb +192 -0
- data/lib/shipeasy_admin/models/get_experiment_timeseries_response_experiment.rb +261 -0
- data/lib/shipeasy_admin/models/get_experiment_timeseries_response_series_inner.rb +278 -0
- data/lib/shipeasy_admin/models/get_killswitch_response.rb +270 -0
- data/lib/shipeasy_admin/models/get_metric_response.rb +378 -0
- data/lib/shipeasy_admin/models/get_ops_item_response.rb +349 -0
- data/lib/shipeasy_admin/models/link_pr_to_ops_item_request.rb +186 -0
- data/lib/shipeasy_admin/models/link_pr_to_ops_item_response.rb +166 -0
- data/lib/shipeasy_admin/models/list_alert_rules_response_inner.rb +478 -0
- data/lib/shipeasy_admin/models/list_alert_rules_response_inner_notify.rb +177 -0
- data/lib/shipeasy_admin/models/list_alert_rules_response_inner_notify_slack_channel.rb +211 -0
- data/lib/shipeasy_admin/models/list_attributes_response_inner.rb +176 -0
- data/lib/shipeasy_admin/models/list_config_activity_response_inner.rb +280 -0
- data/lib/shipeasy_admin/models/list_configs_response.rb +178 -0
- data/lib/shipeasy_admin/models/list_configs_response_data_inner.rb +351 -0
- data/lib/shipeasy_admin/models/list_configs_response_data_inner_drafts_value.rb +237 -0
- data/lib/shipeasy_admin/models/list_configs_response_data_inner_envs_value.rb +237 -0
- data/lib/shipeasy_admin/models/list_events_response_inner.rb +344 -0
- data/lib/shipeasy_admin/models/list_events_response_inner_properties_inner.rb +289 -0
- data/lib/shipeasy_admin/models/list_experiments_response.rb +178 -0
- data/lib/shipeasy_admin/models/list_experiments_response_data_inner.rb +688 -0
- data/lib/shipeasy_admin/models/list_experiments_response_data_inner_groups_inner.rb +258 -0
- data/lib/shipeasy_admin/models/list_gates_response.rb +178 -0
- data/lib/shipeasy_admin/models/list_gates_response_data_inner.rb +395 -0
- data/lib/shipeasy_admin/models/list_gates_response_data_inner_enabled.rb +104 -0
- data/lib/shipeasy_admin/models/list_gates_response_data_inner_rules_inner.rb +238 -0
- data/lib/shipeasy_admin/models/list_gates_response_data_inner_stack_inner.rb +105 -0
- data/lib/shipeasy_admin/models/list_gates_response_data_inner_stack_inner_one_of.rb +375 -0
- data/lib/shipeasy_admin/models/list_gates_response_data_inner_stack_inner_one_of1.rb +331 -0
- data/lib/shipeasy_admin/models/list_gates_response_data_inner_stack_inner_one_of_ramp.rb +319 -0
- data/lib/shipeasy_admin/models/list_i18n_drafts_response_inner.rb +272 -0
- data/lib/shipeasy_admin/models/list_i18n_keys_response.rb +195 -0
- data/lib/shipeasy_admin/models/list_i18n_keys_response_keys_inner.rb +284 -0
- data/lib/shipeasy_admin/models/list_i18n_profiles_response_inner.rb +224 -0
- data/lib/shipeasy_admin/models/list_killswitches_response.rb +178 -0
- data/lib/shipeasy_admin/models/list_killswitches_response_data_inner.rb +270 -0
- data/lib/shipeasy_admin/models/list_killswitches_response_data_inner_envs_value.rb +248 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner.rb +378 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir.rb +295 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg.rb +113 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of.rb +188 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of1.rb +188 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of2.rb +188 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of3.rb +188 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of4.rb +188 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of5.rb +188 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of6.rb +188 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of7.rb +217 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of8.rb +233 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of9.rb +240 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of9_numerator.rb +266 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of9_numerator_filters_inner.rb +264 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_group_by.rb +228 -0
- data/lib/shipeasy_admin/models/list_ops_items_response_inner.rb +349 -0
- data/lib/shipeasy_admin/models/list_slack_channels_response.rb +195 -0
- data/lib/shipeasy_admin/models/list_slack_channels_response_channels_inner.rb +203 -0
- data/lib/shipeasy_admin/models/list_universes_response.rb +178 -0
- data/lib/shipeasy_admin/models/list_universes_response_data_inner.rb +305 -0
- data/lib/shipeasy_admin/models/notify_ops_request.rb +261 -0
- data/lib/shipeasy_admin/models/notify_ops_response.rb +193 -0
- data/lib/shipeasy_admin/models/publish_config_draft_request.rb +190 -0
- data/lib/shipeasy_admin/models/publish_config_draft_response.rb +260 -0
- data/lib/shipeasy_admin/models/publish_i18n_profile_request.rb +149 -0
- data/lib/shipeasy_admin/models/publish_i18n_profile_response.rb +404 -0
- data/lib/shipeasy_admin/models/push_i18n_keys_request.rb +205 -0
- data/lib/shipeasy_admin/models/push_i18n_keys_request_keys_inner.rb +192 -0
- data/lib/shipeasy_admin/models/push_i18n_keys_response.rb +261 -0
- data/lib/shipeasy_admin/models/reanalyze_experiment_response.rb +214 -0
- data/lib/shipeasy_admin/models/save_config_draft_request.rb +202 -0
- data/lib/shipeasy_admin/models/save_config_draft_response.rb +286 -0
- data/lib/shipeasy_admin/models/set_experiment_metrics_request.rb +168 -0
- data/lib/shipeasy_admin/models/set_experiment_metrics_request_metrics_inner.rb +216 -0
- data/lib/shipeasy_admin/models/set_experiment_metrics_response.rb +179 -0
- data/lib/shipeasy_admin/models/set_experiment_metrics_response_metrics_inner.rb +201 -0
- data/lib/shipeasy_admin/models/set_experiment_status_request.rb +190 -0
- data/lib/shipeasy_admin/models/set_experiment_status_response.rb +214 -0
- data/lib/shipeasy_admin/models/set_killswitch_switch_request.rb +264 -0
- data/lib/shipeasy_admin/models/set_killswitch_switch_response.rb +288 -0
- data/lib/shipeasy_admin/models/unset_killswitch_switch_request.rb +237 -0
- data/lib/shipeasy_admin/models/unset_killswitch_switch_response.rb +289 -0
- data/lib/shipeasy_admin/models/update_alert_rule_request.rb +306 -0
- data/lib/shipeasy_admin/models/update_alert_rule_response.rb +165 -0
- data/lib/shipeasy_admin/models/update_config_request.rb +198 -0
- data/lib/shipeasy_admin/models/update_config_response.rb +165 -0
- data/lib/shipeasy_admin/models/update_event_request.rb +198 -0
- data/lib/shipeasy_admin/models/update_event_response.rb +166 -0
- data/lib/shipeasy_admin/models/update_experiment_request.rb +746 -0
- data/lib/shipeasy_admin/models/update_experiment_response.rb +165 -0
- data/lib/shipeasy_admin/models/update_gate_request.rb +403 -0
- data/lib/shipeasy_admin/models/update_gate_response.rb +166 -0
- data/lib/shipeasy_admin/models/update_i18n_key_request.rb +176 -0
- data/lib/shipeasy_admin/models/update_i18n_key_response.rb +166 -0
- data/lib/shipeasy_admin/models/update_killswitch_request.rb +224 -0
- data/lib/shipeasy_admin/models/update_killswitch_response.rb +165 -0
- data/lib/shipeasy_admin/models/update_ops_item_request.rb +205 -0
- data/lib/shipeasy_admin/models/update_ops_item_response.rb +166 -0
- data/lib/shipeasy_admin/models/update_universe_request.rb +213 -0
- data/lib/shipeasy_admin/models/update_universe_response.rb +165 -0
- data/lib/shipeasy_admin/models/upsert_project_request.rb +222 -0
- data/lib/shipeasy_admin/models/upsert_project_response.rb +260 -0
- data/lib/shipeasy_admin/version.rb +15 -0
- data/lib/shipeasy_admin.rb +196 -0
- metadata +230 -2
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Shipeasy Admin API
|
|
3
|
+
|
|
4
|
+
#REST API for managing feature gates, experiments, configs, universes, and killswitches in a Shipeasy project. Authenticate with an admin SDK key (`Authorization: Bearer sdk_admin_…`) and scope every request to a project via the `X-Project-Id` header. Mint admin keys via `POST /api/admin/keys` with `type: \"admin\"`. Keys expire after 90 days; rotate with the `revoke` action.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.23.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Shipeasy::Admin::Generated
|
|
17
|
+
# A metric definition.
|
|
18
|
+
class ListMetricsResponseInner < ApiModelBase
|
|
19
|
+
# Stable opaque metric id.
|
|
20
|
+
attr_accessor :id
|
|
21
|
+
|
|
22
|
+
# Metric key.
|
|
23
|
+
attr_accessor :name
|
|
24
|
+
|
|
25
|
+
# Folder grouping the metric, or `null`.
|
|
26
|
+
attr_accessor :folder
|
|
27
|
+
|
|
28
|
+
# Source event name (camelCase in response).
|
|
29
|
+
attr_accessor :event_name
|
|
30
|
+
|
|
31
|
+
# Legacy aggregation enum derived from the IR (`count_users`, `sum`, `ratio`, …).
|
|
32
|
+
attr_accessor :aggregation
|
|
33
|
+
|
|
34
|
+
# Numeric value label for sum/avg metrics, or `null`.
|
|
35
|
+
attr_accessor :value_path
|
|
36
|
+
|
|
37
|
+
# Rendered DSL text form of the query, or `null` if it could not be rendered.
|
|
38
|
+
attr_accessor :query
|
|
39
|
+
|
|
40
|
+
attr_accessor :query_ir
|
|
41
|
+
|
|
42
|
+
# Desired direction of movement. `higher_better` (default), `lower_better`, or `neutral` (guardrail).
|
|
43
|
+
attr_accessor :direction
|
|
44
|
+
|
|
45
|
+
# Winsorise percentile applied to the metric.
|
|
46
|
+
attr_accessor :winsorize_pct
|
|
47
|
+
|
|
48
|
+
# Configured MDE, or `null`.
|
|
49
|
+
attr_accessor :min_detectable_effect
|
|
50
|
+
|
|
51
|
+
# ISO-8601 creation timestamp.
|
|
52
|
+
attr_accessor :created_at
|
|
53
|
+
|
|
54
|
+
# ISO-8601 last-update timestamp.
|
|
55
|
+
attr_accessor :updated_at
|
|
56
|
+
|
|
57
|
+
class EnumAttributeValidator
|
|
58
|
+
attr_reader :datatype
|
|
59
|
+
attr_reader :allowable_values
|
|
60
|
+
|
|
61
|
+
def initialize(datatype, allowable_values)
|
|
62
|
+
@allowable_values = allowable_values.map do |value|
|
|
63
|
+
case datatype.to_s
|
|
64
|
+
when /Integer/i
|
|
65
|
+
value.to_i
|
|
66
|
+
when /Float/i
|
|
67
|
+
value.to_f
|
|
68
|
+
else
|
|
69
|
+
value
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def valid?(value)
|
|
75
|
+
!value || allowable_values.include?(value)
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
80
|
+
def self.attribute_map
|
|
81
|
+
{
|
|
82
|
+
:'id' => :'id',
|
|
83
|
+
:'name' => :'name',
|
|
84
|
+
:'folder' => :'folder',
|
|
85
|
+
:'event_name' => :'eventName',
|
|
86
|
+
:'aggregation' => :'aggregation',
|
|
87
|
+
:'value_path' => :'valuePath',
|
|
88
|
+
:'query' => :'query',
|
|
89
|
+
:'query_ir' => :'queryIr',
|
|
90
|
+
:'direction' => :'direction',
|
|
91
|
+
:'winsorize_pct' => :'winsorizePct',
|
|
92
|
+
:'min_detectable_effect' => :'minDetectableEffect',
|
|
93
|
+
:'created_at' => :'createdAt',
|
|
94
|
+
:'updated_at' => :'updatedAt'
|
|
95
|
+
}
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Returns attribute mapping this model knows about
|
|
99
|
+
def self.acceptable_attribute_map
|
|
100
|
+
attribute_map
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Returns all the JSON keys this model knows about
|
|
104
|
+
def self.acceptable_attributes
|
|
105
|
+
acceptable_attribute_map.values
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Attribute type mapping.
|
|
109
|
+
def self.openapi_types
|
|
110
|
+
{
|
|
111
|
+
:'id' => :'String',
|
|
112
|
+
:'name' => :'String',
|
|
113
|
+
:'folder' => :'String',
|
|
114
|
+
:'event_name' => :'String',
|
|
115
|
+
:'aggregation' => :'String',
|
|
116
|
+
:'value_path' => :'String',
|
|
117
|
+
:'query' => :'String',
|
|
118
|
+
:'query_ir' => :'ListMetricsResponseInnerQueryIr',
|
|
119
|
+
:'direction' => :'String',
|
|
120
|
+
:'winsorize_pct' => :'Float',
|
|
121
|
+
:'min_detectable_effect' => :'Float',
|
|
122
|
+
:'created_at' => :'String',
|
|
123
|
+
:'updated_at' => :'String'
|
|
124
|
+
}
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# List of attributes with nullable: true
|
|
128
|
+
def self.openapi_nullable
|
|
129
|
+
Set.new([
|
|
130
|
+
:'folder',
|
|
131
|
+
:'value_path',
|
|
132
|
+
:'query',
|
|
133
|
+
:'min_detectable_effect',
|
|
134
|
+
])
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Initializes the object
|
|
138
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
139
|
+
def initialize(attributes = {})
|
|
140
|
+
if (!attributes.is_a?(Hash))
|
|
141
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Shipeasy::Admin::Generated::ListMetricsResponseInner` initialize method"
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
145
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
146
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
147
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
148
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Shipeasy::Admin::Generated::ListMetricsResponseInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
149
|
+
end
|
|
150
|
+
h[k.to_sym] = v
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
if attributes.key?(:'id')
|
|
154
|
+
self.id = attributes[:'id']
|
|
155
|
+
else
|
|
156
|
+
self.id = nil
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
if attributes.key?(:'name')
|
|
160
|
+
self.name = attributes[:'name']
|
|
161
|
+
else
|
|
162
|
+
self.name = nil
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
if attributes.key?(:'folder')
|
|
166
|
+
self.folder = attributes[:'folder']
|
|
167
|
+
else
|
|
168
|
+
self.folder = nil
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
if attributes.key?(:'event_name')
|
|
172
|
+
self.event_name = attributes[:'event_name']
|
|
173
|
+
else
|
|
174
|
+
self.event_name = nil
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
if attributes.key?(:'aggregation')
|
|
178
|
+
self.aggregation = attributes[:'aggregation']
|
|
179
|
+
else
|
|
180
|
+
self.aggregation = nil
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
if attributes.key?(:'value_path')
|
|
184
|
+
self.value_path = attributes[:'value_path']
|
|
185
|
+
else
|
|
186
|
+
self.value_path = nil
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
if attributes.key?(:'query')
|
|
190
|
+
self.query = attributes[:'query']
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
if attributes.key?(:'query_ir')
|
|
194
|
+
self.query_ir = attributes[:'query_ir']
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
if attributes.key?(:'direction')
|
|
198
|
+
self.direction = attributes[:'direction']
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
if attributes.key?(:'winsorize_pct')
|
|
202
|
+
self.winsorize_pct = attributes[:'winsorize_pct']
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
if attributes.key?(:'min_detectable_effect')
|
|
206
|
+
self.min_detectable_effect = attributes[:'min_detectable_effect']
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
if attributes.key?(:'created_at')
|
|
210
|
+
self.created_at = attributes[:'created_at']
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
if attributes.key?(:'updated_at')
|
|
214
|
+
self.updated_at = attributes[:'updated_at']
|
|
215
|
+
end
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
219
|
+
# @return Array for valid properties with the reasons
|
|
220
|
+
def list_invalid_properties
|
|
221
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
222
|
+
invalid_properties = Array.new
|
|
223
|
+
if @id.nil?
|
|
224
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
if @name.nil?
|
|
228
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
if @event_name.nil?
|
|
232
|
+
invalid_properties.push('invalid value for "event_name", event_name cannot be nil.')
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
if @aggregation.nil?
|
|
236
|
+
invalid_properties.push('invalid value for "aggregation", aggregation cannot be nil.')
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
invalid_properties
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
# Check to see if the all the properties in the model are valid
|
|
243
|
+
# @return true if the model is valid
|
|
244
|
+
def valid?
|
|
245
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
246
|
+
return false if @id.nil?
|
|
247
|
+
return false if @name.nil?
|
|
248
|
+
return false if @event_name.nil?
|
|
249
|
+
return false if @aggregation.nil?
|
|
250
|
+
direction_validator = EnumAttributeValidator.new('String', ["higher_better", "lower_better", "neutral"])
|
|
251
|
+
return false unless direction_validator.valid?(@direction)
|
|
252
|
+
true
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# Custom attribute writer method with validation
|
|
256
|
+
# @param [Object] id Value to be assigned
|
|
257
|
+
def id=(id)
|
|
258
|
+
if id.nil?
|
|
259
|
+
fail ArgumentError, 'id cannot be nil'
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
@id = id
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
# Custom attribute writer method with validation
|
|
266
|
+
# @param [Object] name Value to be assigned
|
|
267
|
+
def name=(name)
|
|
268
|
+
if name.nil?
|
|
269
|
+
fail ArgumentError, 'name cannot be nil'
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
@name = name
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
# Custom attribute writer method with validation
|
|
276
|
+
# @param [Object] event_name Value to be assigned
|
|
277
|
+
def event_name=(event_name)
|
|
278
|
+
if event_name.nil?
|
|
279
|
+
fail ArgumentError, 'event_name cannot be nil'
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
@event_name = event_name
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
# Custom attribute writer method with validation
|
|
286
|
+
# @param [Object] aggregation Value to be assigned
|
|
287
|
+
def aggregation=(aggregation)
|
|
288
|
+
if aggregation.nil?
|
|
289
|
+
fail ArgumentError, 'aggregation cannot be nil'
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
@aggregation = aggregation
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
296
|
+
# @param [Object] direction Object to be assigned
|
|
297
|
+
def direction=(direction)
|
|
298
|
+
validator = EnumAttributeValidator.new('String', ["higher_better", "lower_better", "neutral"])
|
|
299
|
+
unless validator.valid?(direction)
|
|
300
|
+
fail ArgumentError, "invalid value for \"direction\", must be one of #{validator.allowable_values}."
|
|
301
|
+
end
|
|
302
|
+
@direction = direction
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
# Checks equality by comparing each attribute.
|
|
306
|
+
# @param [Object] Object to be compared
|
|
307
|
+
def ==(o)
|
|
308
|
+
return true if self.equal?(o)
|
|
309
|
+
self.class == o.class &&
|
|
310
|
+
id == o.id &&
|
|
311
|
+
name == o.name &&
|
|
312
|
+
folder == o.folder &&
|
|
313
|
+
event_name == o.event_name &&
|
|
314
|
+
aggregation == o.aggregation &&
|
|
315
|
+
value_path == o.value_path &&
|
|
316
|
+
query == o.query &&
|
|
317
|
+
query_ir == o.query_ir &&
|
|
318
|
+
direction == o.direction &&
|
|
319
|
+
winsorize_pct == o.winsorize_pct &&
|
|
320
|
+
min_detectable_effect == o.min_detectable_effect &&
|
|
321
|
+
created_at == o.created_at &&
|
|
322
|
+
updated_at == o.updated_at
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
# @see the `==` method
|
|
326
|
+
# @param [Object] Object to be compared
|
|
327
|
+
def eql?(o)
|
|
328
|
+
self == o
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
# Calculates hash code according to all attributes.
|
|
332
|
+
# @return [Integer] Hash code
|
|
333
|
+
def hash
|
|
334
|
+
[id, name, folder, event_name, aggregation, value_path, query, query_ir, direction, winsorize_pct, min_detectable_effect, created_at, updated_at].hash
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
# Builds the object from hash
|
|
338
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
339
|
+
# @return [Object] Returns the model itself
|
|
340
|
+
def self.build_from_hash(attributes)
|
|
341
|
+
return nil unless attributes.is_a?(Hash)
|
|
342
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
343
|
+
transformed_hash = {}
|
|
344
|
+
openapi_types.each_pair do |key, type|
|
|
345
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
346
|
+
transformed_hash["#{key}"] = nil
|
|
347
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
348
|
+
# check to ensure the input is an array given that the attribute
|
|
349
|
+
# is documented as an array but the input is not
|
|
350
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
351
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
352
|
+
end
|
|
353
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
354
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
355
|
+
end
|
|
356
|
+
end
|
|
357
|
+
new(transformed_hash)
|
|
358
|
+
end
|
|
359
|
+
|
|
360
|
+
# Returns the object in the form of hash
|
|
361
|
+
# @return [Hash] Returns the object in the form of hash
|
|
362
|
+
def to_hash
|
|
363
|
+
hash = {}
|
|
364
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
365
|
+
value = self.send(attr)
|
|
366
|
+
if value.nil?
|
|
367
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
368
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
hash[param] = _to_hash(value)
|
|
372
|
+
end
|
|
373
|
+
hash
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
end
|
|
377
|
+
|
|
378
|
+
end
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Shipeasy Admin API
|
|
3
|
+
|
|
4
|
+
#REST API for managing feature gates, experiments, configs, universes, and killswitches in a Shipeasy project. Authenticate with an admin SDK key (`Authorization: Bearer sdk_admin_…`) and scope every request to a project via the `X-Project-Id` header. Mint admin keys via `POST /api/admin/keys` with `type: \"admin\"`. Keys expire after 90 days; rotate with the `revoke` action.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.23.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Shipeasy::Admin::Generated
|
|
17
|
+
# Typed query IR stored for the metric.
|
|
18
|
+
class ListMetricsResponseInnerQueryIr < ApiModelBase
|
|
19
|
+
attr_accessor :agg
|
|
20
|
+
|
|
21
|
+
# Source event name (must equal `event_name`).
|
|
22
|
+
attr_accessor :metric
|
|
23
|
+
|
|
24
|
+
# Numeric property summed/averaged for `sum`/`avg`/quantile aggregations.
|
|
25
|
+
attr_accessor :value_label
|
|
26
|
+
|
|
27
|
+
# Label filters on the event.
|
|
28
|
+
attr_accessor :filters
|
|
29
|
+
|
|
30
|
+
attr_accessor :group_by
|
|
31
|
+
|
|
32
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
33
|
+
def self.attribute_map
|
|
34
|
+
{
|
|
35
|
+
:'agg' => :'agg',
|
|
36
|
+
:'metric' => :'metric',
|
|
37
|
+
:'value_label' => :'valueLabel',
|
|
38
|
+
:'filters' => :'filters',
|
|
39
|
+
:'group_by' => :'groupBy'
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Returns attribute mapping this model knows about
|
|
44
|
+
def self.acceptable_attribute_map
|
|
45
|
+
attribute_map
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Returns all the JSON keys this model knows about
|
|
49
|
+
def self.acceptable_attributes
|
|
50
|
+
acceptable_attribute_map.values
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Attribute type mapping.
|
|
54
|
+
def self.openapi_types
|
|
55
|
+
{
|
|
56
|
+
:'agg' => :'ListMetricsResponseInnerQueryIrAgg',
|
|
57
|
+
:'metric' => :'String',
|
|
58
|
+
:'value_label' => :'String',
|
|
59
|
+
:'filters' => :'Array<ListMetricsResponseInnerQueryIrAggOneOf9NumeratorFiltersInner>',
|
|
60
|
+
:'group_by' => :'ListMetricsResponseInnerQueryIrGroupBy'
|
|
61
|
+
}
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# List of attributes with nullable: true
|
|
65
|
+
def self.openapi_nullable
|
|
66
|
+
Set.new([
|
|
67
|
+
])
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Initializes the object
|
|
71
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
72
|
+
def initialize(attributes = {})
|
|
73
|
+
if (!attributes.is_a?(Hash))
|
|
74
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Shipeasy::Admin::Generated::ListMetricsResponseInnerQueryIr` initialize method"
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
78
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
79
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
80
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
81
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Shipeasy::Admin::Generated::ListMetricsResponseInnerQueryIr`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
82
|
+
end
|
|
83
|
+
h[k.to_sym] = v
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'agg')
|
|
87
|
+
self.agg = attributes[:'agg']
|
|
88
|
+
else
|
|
89
|
+
self.agg = nil
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'metric')
|
|
93
|
+
self.metric = attributes[:'metric']
|
|
94
|
+
else
|
|
95
|
+
self.metric = nil
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'value_label')
|
|
99
|
+
self.value_label = attributes[:'value_label']
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'filters')
|
|
103
|
+
if (value = attributes[:'filters']).is_a?(Array)
|
|
104
|
+
self.filters = value
|
|
105
|
+
end
|
|
106
|
+
else
|
|
107
|
+
self.filters = nil
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'group_by')
|
|
111
|
+
self.group_by = attributes[:'group_by']
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
116
|
+
# @return Array for valid properties with the reasons
|
|
117
|
+
def list_invalid_properties
|
|
118
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
119
|
+
invalid_properties = Array.new
|
|
120
|
+
if @agg.nil?
|
|
121
|
+
invalid_properties.push('invalid value for "agg", agg cannot be nil.')
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if @metric.nil?
|
|
125
|
+
invalid_properties.push('invalid value for "metric", metric cannot be nil.')
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if @metric.to_s.length > 128
|
|
129
|
+
invalid_properties.push('invalid value for "metric", the character length must be smaller than or equal to 128.')
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if @metric.to_s.length < 1
|
|
133
|
+
invalid_properties.push('invalid value for "metric", the character length must be greater than or equal to 1.')
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if !@value_label.nil? && @value_label.to_s.length > 128
|
|
137
|
+
invalid_properties.push('invalid value for "value_label", the character length must be smaller than or equal to 128.')
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
if !@value_label.nil? && @value_label.to_s.length < 1
|
|
141
|
+
invalid_properties.push('invalid value for "value_label", the character length must be greater than or equal to 1.')
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
if @filters.nil?
|
|
145
|
+
invalid_properties.push('invalid value for "filters", filters cannot be nil.')
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
if @filters.length > 16
|
|
149
|
+
invalid_properties.push('invalid value for "filters", number of items must be less than or equal to 16.')
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
invalid_properties
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Check to see if the all the properties in the model are valid
|
|
156
|
+
# @return true if the model is valid
|
|
157
|
+
def valid?
|
|
158
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
159
|
+
return false if @agg.nil?
|
|
160
|
+
return false if @metric.nil?
|
|
161
|
+
return false if @metric.to_s.length > 128
|
|
162
|
+
return false if @metric.to_s.length < 1
|
|
163
|
+
return false if !@value_label.nil? && @value_label.to_s.length > 128
|
|
164
|
+
return false if !@value_label.nil? && @value_label.to_s.length < 1
|
|
165
|
+
return false if @filters.nil?
|
|
166
|
+
return false if @filters.length > 16
|
|
167
|
+
true
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Custom attribute writer method with validation
|
|
171
|
+
# @param [Object] agg Value to be assigned
|
|
172
|
+
def agg=(agg)
|
|
173
|
+
if agg.nil?
|
|
174
|
+
fail ArgumentError, 'agg cannot be nil'
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
@agg = agg
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Custom attribute writer method with validation
|
|
181
|
+
# @param [Object] metric Value to be assigned
|
|
182
|
+
def metric=(metric)
|
|
183
|
+
if metric.nil?
|
|
184
|
+
fail ArgumentError, 'metric cannot be nil'
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
if metric.to_s.length > 128
|
|
188
|
+
fail ArgumentError, 'invalid value for "metric", the character length must be smaller than or equal to 128.'
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
if metric.to_s.length < 1
|
|
192
|
+
fail ArgumentError, 'invalid value for "metric", the character length must be greater than or equal to 1.'
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
@metric = metric
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Custom attribute writer method with validation
|
|
199
|
+
# @param [Object] value_label Value to be assigned
|
|
200
|
+
def value_label=(value_label)
|
|
201
|
+
if value_label.nil?
|
|
202
|
+
fail ArgumentError, 'value_label cannot be nil'
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
if value_label.to_s.length > 128
|
|
206
|
+
fail ArgumentError, 'invalid value for "value_label", the character length must be smaller than or equal to 128.'
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
if value_label.to_s.length < 1
|
|
210
|
+
fail ArgumentError, 'invalid value for "value_label", the character length must be greater than or equal to 1.'
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
@value_label = value_label
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Custom attribute writer method with validation
|
|
217
|
+
# @param [Object] filters Value to be assigned
|
|
218
|
+
def filters=(filters)
|
|
219
|
+
if filters.nil?
|
|
220
|
+
fail ArgumentError, 'filters cannot be nil'
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
if filters.length > 16
|
|
224
|
+
fail ArgumentError, 'invalid value for "filters", number of items must be less than or equal to 16.'
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
@filters = filters
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# Checks equality by comparing each attribute.
|
|
231
|
+
# @param [Object] Object to be compared
|
|
232
|
+
def ==(o)
|
|
233
|
+
return true if self.equal?(o)
|
|
234
|
+
self.class == o.class &&
|
|
235
|
+
agg == o.agg &&
|
|
236
|
+
metric == o.metric &&
|
|
237
|
+
value_label == o.value_label &&
|
|
238
|
+
filters == o.filters &&
|
|
239
|
+
group_by == o.group_by
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
# @see the `==` method
|
|
243
|
+
# @param [Object] Object to be compared
|
|
244
|
+
def eql?(o)
|
|
245
|
+
self == o
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# Calculates hash code according to all attributes.
|
|
249
|
+
# @return [Integer] Hash code
|
|
250
|
+
def hash
|
|
251
|
+
[agg, metric, value_label, filters, group_by].hash
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
# Builds the object from hash
|
|
255
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
256
|
+
# @return [Object] Returns the model itself
|
|
257
|
+
def self.build_from_hash(attributes)
|
|
258
|
+
return nil unless attributes.is_a?(Hash)
|
|
259
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
260
|
+
transformed_hash = {}
|
|
261
|
+
openapi_types.each_pair do |key, type|
|
|
262
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
263
|
+
transformed_hash["#{key}"] = nil
|
|
264
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
265
|
+
# check to ensure the input is an array given that the attribute
|
|
266
|
+
# is documented as an array but the input is not
|
|
267
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
268
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
269
|
+
end
|
|
270
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
271
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
272
|
+
end
|
|
273
|
+
end
|
|
274
|
+
new(transformed_hash)
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
# Returns the object in the form of hash
|
|
278
|
+
# @return [Hash] Returns the object in the form of hash
|
|
279
|
+
def to_hash
|
|
280
|
+
hash = {}
|
|
281
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
282
|
+
value = self.send(attr)
|
|
283
|
+
if value.nil?
|
|
284
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
285
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
hash[param] = _to_hash(value)
|
|
289
|
+
end
|
|
290
|
+
hash
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
end
|