shipeasy-sdk 2.3.0 → 2.3.1
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/lib/shipeasy/admin.rb +14 -8
- data/lib/shipeasy/sdk/version.rb +1 -1
- data/lib/shipeasy_admin/api/{alert_rules_api.rb → alerts_api.rb} +77 -17
- data/lib/shipeasy_admin/api/api_keys_api.rb +229 -0
- data/lib/shipeasy_admin/api/attributes_api.rb +1 -1
- data/lib/shipeasy_admin/api/configs_api.rb +78 -1
- data/lib/shipeasy_admin/api/connectors_api.rb +497 -0
- data/lib/shipeasy_admin/api/drafts_api.rb +82 -0
- data/lib/shipeasy_admin/api/errors_api.rb +389 -0
- data/lib/shipeasy_admin/api/events_api.rb +1 -1
- data/lib/shipeasy_admin/api/experiments_api.rb +1 -1
- data/lib/shipeasy_admin/api/{gates_api.rb → flags_api.rb} +27 -27
- data/lib/shipeasy_admin/api/{i18n_api.rb → keys_api.rb} +54 -244
- data/lib/shipeasy_admin/api/{killswitches_api.rb → killswitch_api.rb} +110 -33
- data/lib/shipeasy_admin/api/metrics_api.rb +1 -1
- data/lib/shipeasy_admin/api/ops_api.rb +3 -63
- data/lib/shipeasy_admin/api/profiles_api.rb +226 -0
- data/lib/shipeasy_admin/api/projects_api.rb +64 -1
- data/lib/shipeasy_admin/api/universes_api.rb +1 -1
- data/lib/shipeasy_admin/api_client.rb +1 -1
- data/lib/shipeasy_admin/api_error.rb +1 -1
- data/lib/shipeasy_admin/api_model_base.rb +1 -1
- data/lib/shipeasy_admin/configuration.rb +1 -1
- data/lib/shipeasy_admin/models/approve_event_request.rb +2 -2
- data/lib/shipeasy_admin/models/approve_event_response.rb +1 -1
- data/lib/shipeasy_admin/models/claude_trigger_config.rb +204 -0
- data/lib/shipeasy_admin/models/connector_event.rb +40 -0
- data/lib/shipeasy_admin/models/connector_provider.rb +45 -0
- data/lib/shipeasy_admin/models/connector_record.rb +468 -0
- data/lib/shipeasy_admin/models/copilot_trigger_config.rb +276 -0
- data/lib/shipeasy_admin/models/create_alert_rule_request.rb +6 -31
- data/lib/shipeasy_admin/models/create_alert_rule_response.rb +1 -1
- data/lib/shipeasy_admin/models/create_claude_trigger_request.rb +309 -0
- data/lib/shipeasy_admin/models/create_config_request.rb +14 -3
- data/lib/shipeasy_admin/models/create_config_response.rb +1 -1
- data/lib/shipeasy_admin/models/create_connector_request.rb +64 -0
- data/lib/shipeasy_admin/models/create_connector_response.rb +165 -0
- data/lib/shipeasy_admin/models/create_copilot_trigger_request.rb +316 -0
- data/lib/shipeasy_admin/models/create_cursor_trigger_request.rb +352 -0
- data/lib/shipeasy_admin/models/create_event_request.rb +2 -19
- data/lib/shipeasy_admin/models/create_event_response.rb +1 -1
- data/lib/shipeasy_admin/models/create_experiment_request.rb +39 -101
- data/lib/shipeasy_admin/models/create_experiment_response.rb +1 -1
- data/lib/shipeasy_admin/models/create_gate_request.rb +6 -43
- data/lib/shipeasy_admin/models/create_gate_response.rb +1 -1
- data/lib/shipeasy_admin/models/create_i18n_profile_request.rb +1 -1
- data/lib/shipeasy_admin/models/create_i18n_profile_response.rb +1 -1
- data/lib/shipeasy_admin/models/create_jules_trigger_request.rb +352 -0
- data/lib/shipeasy_admin/models/create_key_request.rb +297 -0
- data/lib/shipeasy_admin/models/create_key_response.rb +286 -0
- data/lib/shipeasy_admin/models/create_killswitch_request.rb +14 -3
- data/lib/shipeasy_admin/models/create_killswitch_response.rb +1 -1
- data/lib/shipeasy_admin/models/create_metric_request.rb +6 -18
- data/lib/shipeasy_admin/models/create_metric_response.rb +1 -1
- data/lib/shipeasy_admin/models/create_o_auth_connector_request.rb +273 -0
- data/lib/shipeasy_admin/models/create_ops_item_request.rb +2 -2
- data/lib/shipeasy_admin/models/create_ops_item_response.rb +2 -2
- data/lib/shipeasy_admin/models/create_universe_request.rb +6 -23
- data/lib/shipeasy_admin/models/create_universe_response.rb +1 -1
- data/lib/shipeasy_admin/models/cursor_trigger_config.rb +231 -0
- data/lib/shipeasy_admin/models/delete_alert_rule_response.rb +1 -1
- data/lib/shipeasy_admin/models/delete_config_response.rb +1 -1
- data/lib/shipeasy_admin/models/delete_connector_response.rb +188 -0
- data/lib/shipeasy_admin/models/delete_event_response.rb +1 -1
- data/lib/shipeasy_admin/models/delete_experiment_response.rb +1 -1
- data/lib/shipeasy_admin/models/delete_gate_response.rb +1 -1
- data/lib/shipeasy_admin/models/delete_killswitch_response.rb +1 -1
- data/lib/shipeasy_admin/models/delete_metric_response.rb +1 -1
- data/lib/shipeasy_admin/models/delete_universe_response.rb +1 -1
- data/lib/shipeasy_admin/models/disable_gate_response.rb +1 -1
- data/lib/shipeasy_admin/models/discard_config_draft_request.rb +7 -10
- data/lib/shipeasy_admin/models/discard_config_draft_response.rb +1 -1
- data/lib/shipeasy_admin/models/enable_gate_response.rb +1 -1
- data/lib/shipeasy_admin/models/env.rb +41 -0
- data/lib/shipeasy_admin/models/{error_response.rb → error.rb} +29 -7
- data/lib/shipeasy_admin/models/error_code.rb +52 -0
- data/lib/shipeasy_admin/models/error_record.rb +597 -0
- data/lib/shipeasy_admin/models/error_series_request.rb +251 -0
- data/lib/shipeasy_admin/models/error_series_response.rb +195 -0
- data/lib/shipeasy_admin/models/error_series_response_rows_inner.rb +192 -0
- data/lib/shipeasy_admin/models/{create_experiment_request_goal_metric.rb → experiment_inline_metric.rb} +9 -8
- data/lib/shipeasy_admin/models/file_error_ticket_response.rb +193 -0
- data/lib/shipeasy_admin/models/fire_connector_request.rb +149 -0
- data/lib/shipeasy_admin/models/fire_connector_response.rb +176 -0
- data/lib/shipeasy_admin/models/get_config_response.rb +1 -1
- data/lib/shipeasy_admin/models/get_current_project_response.rb +1 -1
- data/lib/shipeasy_admin/models/get_current_project_response_module_translations.rb +1 -1
- data/lib/shipeasy_admin/models/get_event_response.rb +1 -1
- data/lib/shipeasy_admin/models/get_experiment_response.rb +1 -1
- data/lib/shipeasy_admin/models/get_experiment_results_response.rb +1 -1
- data/lib/shipeasy_admin/models/get_experiment_results_response_experiment.rb +1 -1
- data/lib/shipeasy_admin/models/get_experiment_results_response_results_inner.rb +1 -1
- data/lib/shipeasy_admin/models/get_experiment_timeseries_response.rb +1 -1
- data/lib/shipeasy_admin/models/get_experiment_timeseries_response_experiment.rb +1 -1
- data/lib/shipeasy_admin/models/get_experiment_timeseries_response_series_inner.rb +1 -1
- data/lib/shipeasy_admin/models/get_killswitch_response.rb +1 -1
- data/lib/shipeasy_admin/models/get_metric_response.rb +1 -1
- data/lib/shipeasy_admin/models/get_ops_item_response.rb +1 -1
- data/lib/shipeasy_admin/models/jules_trigger_config.rb +240 -0
- data/lib/shipeasy_admin/models/key_record.rb +353 -0
- data/lib/shipeasy_admin/models/killswitch_value.rb +178 -0
- data/lib/shipeasy_admin/models/link_pr_to_ops_item_request.rb +1 -1
- data/lib/shipeasy_admin/models/link_pr_to_ops_item_response.rb +1 -1
- data/lib/shipeasy_admin/models/list_alert_rules_response_inner.rb +2 -2
- data/lib/shipeasy_admin/models/list_attributes_response_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_config_activity_response_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_configs_response.rb +1 -1
- data/lib/shipeasy_admin/models/list_configs_response_data_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_configs_response_data_inner_drafts_value.rb +1 -1
- data/lib/shipeasy_admin/models/list_configs_response_data_inner_envs_value.rb +1 -1
- data/lib/shipeasy_admin/models/list_events_response_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_events_response_inner_properties_inner.rb +1 -31
- data/lib/shipeasy_admin/models/list_experiments_response.rb +1 -1
- data/lib/shipeasy_admin/models/list_experiments_response_data_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_experiments_response_data_inner_groups_inner.rb +1 -18
- data/lib/shipeasy_admin/models/list_gates_response.rb +1 -1
- data/lib/shipeasy_admin/models/list_gates_response_data_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_gates_response_data_inner_enabled.rb +1 -1
- data/lib/shipeasy_admin/models/list_gates_response_data_inner_rules_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_gates_response_data_inner_stack_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_gates_response_data_inner_stack_inner_one_of.rb +1 -18
- data/lib/shipeasy_admin/models/list_gates_response_data_inner_stack_inner_one_of1.rb +1 -1
- data/lib/shipeasy_admin/models/list_gates_response_data_inner_stack_inner_one_of_ramp.rb +1 -1
- data/lib/shipeasy_admin/models/list_i18n_drafts_response_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_i18n_keys_response.rb +1 -1
- data/lib/shipeasy_admin/models/list_i18n_keys_response_keys_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_i18n_profiles_response_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_keys_response.rb +180 -0
- data/lib/shipeasy_admin/models/list_killswitches_response.rb +1 -1
- data/lib/shipeasy_admin/models/list_killswitches_response_data_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_killswitches_response_data_inner_envs_value.rb +1 -1
- data/lib/shipeasy_admin/models/list_metrics_response_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir.rb +3 -10
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg.rb +1 -1
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of.rb +1 -1
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of1.rb +1 -1
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of2.rb +1 -1
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of3.rb +1 -1
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of4.rb +1 -1
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of5.rb +1 -1
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of6.rb +1 -1
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of7.rb +1 -1
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of8.rb +1 -1
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of9.rb +1 -1
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of9_numerator.rb +1 -1
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of9_numerator_filters_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_group_by.rb +1 -1
- data/lib/shipeasy_admin/models/list_ops_items_response_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_slack_channels_response.rb +1 -1
- data/lib/shipeasy_admin/models/list_slack_channels_response_channels_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_universes_response.rb +1 -1
- data/lib/shipeasy_admin/models/list_universes_response_data_inner.rb +1 -1
- data/lib/shipeasy_admin/models/{list_alert_rules_response_inner_notify.rb → notification_target.rb} +6 -24
- data/lib/shipeasy_admin/models/{list_alert_rules_response_inner_notify_slack_channel.rb → notification_target_slack_channel.rb} +4 -7
- data/lib/shipeasy_admin/models/notify_ops_request.rb +1 -1
- data/lib/shipeasy_admin/models/notify_ops_response.rb +1 -1
- data/lib/shipeasy_admin/models/publish_config_draft_request.rb +7 -10
- data/lib/shipeasy_admin/models/publish_config_draft_response.rb +7 -10
- data/lib/shipeasy_admin/models/publish_i18n_profile_request.rb +1 -1
- data/lib/shipeasy_admin/models/publish_i18n_profile_response.rb +1 -1
- data/lib/shipeasy_admin/models/push_i18n_keys_request.rb +1 -1
- data/lib/shipeasy_admin/models/push_i18n_keys_request_keys_inner.rb +1 -1
- data/lib/shipeasy_admin/models/push_i18n_keys_response.rb +1 -1
- data/lib/shipeasy_admin/models/reanalyze_experiment_response.rb +1 -1
- data/lib/shipeasy_admin/models/revoke_key_response.rb +216 -0
- data/lib/shipeasy_admin/models/save_config_draft_request.rb +7 -10
- data/lib/shipeasy_admin/models/save_config_draft_response.rb +7 -10
- data/lib/shipeasy_admin/models/search_hit.rb +284 -0
- data/lib/shipeasy_admin/models/search_response.rb +167 -0
- data/lib/shipeasy_admin/models/set_experiment_metrics_request.rb +1 -1
- data/lib/shipeasy_admin/models/set_experiment_metrics_request_metrics_inner.rb +1 -1
- data/lib/shipeasy_admin/models/set_experiment_metrics_response.rb +1 -1
- data/lib/shipeasy_admin/models/set_experiment_metrics_response_metrics_inner.rb +1 -1
- data/lib/shipeasy_admin/models/set_experiment_status_request.rb +1 -1
- data/lib/shipeasy_admin/models/set_experiment_status_response.rb +1 -1
- data/lib/shipeasy_admin/models/set_i18n_label_request.rb +213 -0
- data/lib/shipeasy_admin/models/set_i18n_label_response.rb +472 -0
- data/lib/shipeasy_admin/models/set_killswitch_switch_request.rb +7 -10
- data/lib/shipeasy_admin/models/set_killswitch_switch_response.rb +7 -10
- data/lib/shipeasy_admin/models/set_killswitch_value_request.rb +214 -0
- data/lib/shipeasy_admin/models/set_killswitch_value_response.rb +283 -0
- data/lib/shipeasy_admin/models/test_connector_response.rb +189 -0
- data/lib/shipeasy_admin/models/unset_killswitch_switch_request.rb +7 -10
- data/lib/shipeasy_admin/models/unset_killswitch_switch_response.rb +7 -10
- data/lib/shipeasy_admin/models/update_alert_rule_request.rb +2 -4
- data/lib/shipeasy_admin/models/update_alert_rule_response.rb +1 -1
- data/lib/shipeasy_admin/models/update_config_request.rb +2 -2
- data/lib/shipeasy_admin/models/update_config_response.rb +1 -1
- data/lib/shipeasy_admin/models/update_config_schema_request.rb +168 -0
- data/lib/shipeasy_admin/models/update_config_schema_response.rb +165 -0
- data/lib/shipeasy_admin/models/update_connector_request.rb +211 -0
- data/lib/shipeasy_admin/models/update_connector_response.rb +166 -0
- data/lib/shipeasy_admin/models/update_error_status_request.rb +190 -0
- data/lib/shipeasy_admin/models/update_event_request.rb +2 -2
- data/lib/shipeasy_admin/models/update_event_response.rb +1 -1
- data/lib/shipeasy_admin/models/update_experiment_request.rb +5 -4
- data/lib/shipeasy_admin/models/update_experiment_response.rb +1 -1
- data/lib/shipeasy_admin/models/update_gate_request.rb +2 -2
- data/lib/shipeasy_admin/models/update_gate_response.rb +1 -1
- data/lib/shipeasy_admin/models/update_i18n_key_request.rb +1 -1
- data/lib/shipeasy_admin/models/update_i18n_key_response.rb +1 -1
- data/lib/shipeasy_admin/models/update_killswitch_request.rb +2 -2
- data/lib/shipeasy_admin/models/update_killswitch_response.rb +1 -1
- data/lib/shipeasy_admin/models/update_ops_item_request.rb +1 -1
- data/lib/shipeasy_admin/models/update_ops_item_response.rb +1 -1
- data/lib/shipeasy_admin/models/update_universe_request.rb +2 -2
- data/lib/shipeasy_admin/models/update_universe_response.rb +1 -1
- data/lib/shipeasy_admin/models/upsert_project_request.rb +1 -1
- data/lib/shipeasy_admin/models/upsert_project_response.rb +1 -1
- data/lib/shipeasy_admin/version.rb +1 -1
- data/lib/shipeasy_admin.rb +56 -9
- metadata +56 -9
|
@@ -0,0 +1,251 @@
|
|
|
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: 2.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
|
+
# Time window for the occurrence series. Bounds are epoch **seconds** (Analytics Engine stores the occurrence timestamp in seconds). `to` must be strictly greater than `from`.
|
|
18
|
+
class ErrorSeriesRequest < ApiModelBase
|
|
19
|
+
# Window start, epoch seconds (inclusive).
|
|
20
|
+
attr_accessor :from
|
|
21
|
+
|
|
22
|
+
# Window end, epoch seconds (exclusive). Must be greater than `from`.
|
|
23
|
+
attr_accessor :to
|
|
24
|
+
|
|
25
|
+
# Bucket width in seconds (60s–86400s/1d). Defaults to `3600` (hourly). Each returned point is floor-aligned to this width.
|
|
26
|
+
attr_accessor :bucket
|
|
27
|
+
|
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'from' => :'from',
|
|
32
|
+
:'to' => :'to',
|
|
33
|
+
:'bucket' => :'bucket'
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns attribute mapping this model knows about
|
|
38
|
+
def self.acceptable_attribute_map
|
|
39
|
+
attribute_map
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Returns all the JSON keys this model knows about
|
|
43
|
+
def self.acceptable_attributes
|
|
44
|
+
acceptable_attribute_map.values
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Attribute type mapping.
|
|
48
|
+
def self.openapi_types
|
|
49
|
+
{
|
|
50
|
+
:'from' => :'Integer',
|
|
51
|
+
:'to' => :'Integer',
|
|
52
|
+
:'bucket' => :'Integer'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# List of attributes with nullable: true
|
|
57
|
+
def self.openapi_nullable
|
|
58
|
+
Set.new([
|
|
59
|
+
])
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Initializes the object
|
|
63
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
64
|
+
def initialize(attributes = {})
|
|
65
|
+
if (!attributes.is_a?(Hash))
|
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Shipeasy::Admin::Generated::ErrorSeriesRequest` initialize method"
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
70
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
72
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
73
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Shipeasy::Admin::Generated::ErrorSeriesRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
74
|
+
end
|
|
75
|
+
h[k.to_sym] = v
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'from')
|
|
79
|
+
self.from = attributes[:'from']
|
|
80
|
+
else
|
|
81
|
+
self.from = nil
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'to')
|
|
85
|
+
self.to = attributes[:'to']
|
|
86
|
+
else
|
|
87
|
+
self.to = nil
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'bucket')
|
|
91
|
+
self.bucket = attributes[:'bucket']
|
|
92
|
+
else
|
|
93
|
+
self.bucket = 3600
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
98
|
+
# @return Array for valid properties with the reasons
|
|
99
|
+
def list_invalid_properties
|
|
100
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
101
|
+
invalid_properties = Array.new
|
|
102
|
+
if @from.nil?
|
|
103
|
+
invalid_properties.push('invalid value for "from", from cannot be nil.')
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if @from < 0
|
|
107
|
+
invalid_properties.push('invalid value for "from", must be greater than or equal to 0.')
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if @to.nil?
|
|
111
|
+
invalid_properties.push('invalid value for "to", to cannot be nil.')
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if @to < 0
|
|
115
|
+
invalid_properties.push('invalid value for "to", must be greater than or equal to 0.')
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if !@bucket.nil? && @bucket > 86400
|
|
119
|
+
invalid_properties.push('invalid value for "bucket", must be smaller than or equal to 86400.')
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if !@bucket.nil? && @bucket < 60
|
|
123
|
+
invalid_properties.push('invalid value for "bucket", must be greater than or equal to 60.')
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
invalid_properties
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Check to see if the all the properties in the model are valid
|
|
130
|
+
# @return true if the model is valid
|
|
131
|
+
def valid?
|
|
132
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
133
|
+
return false if @from.nil?
|
|
134
|
+
return false if @from < 0
|
|
135
|
+
return false if @to.nil?
|
|
136
|
+
return false if @to < 0
|
|
137
|
+
return false if !@bucket.nil? && @bucket > 86400
|
|
138
|
+
return false if !@bucket.nil? && @bucket < 60
|
|
139
|
+
true
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Custom attribute writer method with validation
|
|
143
|
+
# @param [Object] from Value to be assigned
|
|
144
|
+
def from=(from)
|
|
145
|
+
if from.nil?
|
|
146
|
+
fail ArgumentError, 'from cannot be nil'
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if from < 0
|
|
150
|
+
fail ArgumentError, 'invalid value for "from", must be greater than or equal to 0.'
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
@from = from
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Custom attribute writer method with validation
|
|
157
|
+
# @param [Object] to Value to be assigned
|
|
158
|
+
def to=(to)
|
|
159
|
+
if to.nil?
|
|
160
|
+
fail ArgumentError, 'to cannot be nil'
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if to < 0
|
|
164
|
+
fail ArgumentError, 'invalid value for "to", must be greater than or equal to 0.'
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
@to = to
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Custom attribute writer method with validation
|
|
171
|
+
# @param [Object] bucket Value to be assigned
|
|
172
|
+
def bucket=(bucket)
|
|
173
|
+
if bucket.nil?
|
|
174
|
+
fail ArgumentError, 'bucket cannot be nil'
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
if bucket > 86400
|
|
178
|
+
fail ArgumentError, 'invalid value for "bucket", must be smaller than or equal to 86400.'
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
if bucket < 60
|
|
182
|
+
fail ArgumentError, 'invalid value for "bucket", must be greater than or equal to 60.'
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
@bucket = bucket
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Checks equality by comparing each attribute.
|
|
189
|
+
# @param [Object] Object to be compared
|
|
190
|
+
def ==(o)
|
|
191
|
+
return true if self.equal?(o)
|
|
192
|
+
self.class == o.class &&
|
|
193
|
+
from == o.from &&
|
|
194
|
+
to == o.to &&
|
|
195
|
+
bucket == o.bucket
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# @see the `==` method
|
|
199
|
+
# @param [Object] Object to be compared
|
|
200
|
+
def eql?(o)
|
|
201
|
+
self == o
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Calculates hash code according to all attributes.
|
|
205
|
+
# @return [Integer] Hash code
|
|
206
|
+
def hash
|
|
207
|
+
[from, to, bucket].hash
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Builds the object from hash
|
|
211
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
212
|
+
# @return [Object] Returns the model itself
|
|
213
|
+
def self.build_from_hash(attributes)
|
|
214
|
+
return nil unless attributes.is_a?(Hash)
|
|
215
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
216
|
+
transformed_hash = {}
|
|
217
|
+
openapi_types.each_pair do |key, type|
|
|
218
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
219
|
+
transformed_hash["#{key}"] = nil
|
|
220
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
221
|
+
# check to ensure the input is an array given that the attribute
|
|
222
|
+
# is documented as an array but the input is not
|
|
223
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
224
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
225
|
+
end
|
|
226
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
227
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
228
|
+
end
|
|
229
|
+
end
|
|
230
|
+
new(transformed_hash)
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# Returns the object in the form of hash
|
|
234
|
+
# @return [Hash] Returns the object in the form of hash
|
|
235
|
+
def to_hash
|
|
236
|
+
hash = {}
|
|
237
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
238
|
+
value = self.send(attr)
|
|
239
|
+
if value.nil?
|
|
240
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
241
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
hash[param] = _to_hash(value)
|
|
245
|
+
end
|
|
246
|
+
hash
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
end
|
|
@@ -0,0 +1,195 @@
|
|
|
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: 2.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
|
+
# Bucketed occurrence counts for one tracked error (by its fingerprint), plus the Analytics Engine SQL that produced them.
|
|
18
|
+
class ErrorSeriesResponse < ApiModelBase
|
|
19
|
+
# The Analytics Engine SQL executed to produce `rows` (echoed for transparency / debugging).
|
|
20
|
+
attr_accessor :sql
|
|
21
|
+
|
|
22
|
+
# Bucketed occurrence series, ordered by `t` ascending.
|
|
23
|
+
attr_accessor :rows
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'sql' => :'sql',
|
|
29
|
+
:'rows' => :'rows'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns attribute mapping this model knows about
|
|
34
|
+
def self.acceptable_attribute_map
|
|
35
|
+
attribute_map
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Returns all the JSON keys this model knows about
|
|
39
|
+
def self.acceptable_attributes
|
|
40
|
+
acceptable_attribute_map.values
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Attribute type mapping.
|
|
44
|
+
def self.openapi_types
|
|
45
|
+
{
|
|
46
|
+
:'sql' => :'String',
|
|
47
|
+
:'rows' => :'Array<ErrorSeriesResponseRowsInner>'
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# List of attributes with nullable: true
|
|
52
|
+
def self.openapi_nullable
|
|
53
|
+
Set.new([
|
|
54
|
+
])
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Initializes the object
|
|
58
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
59
|
+
def initialize(attributes = {})
|
|
60
|
+
if (!attributes.is_a?(Hash))
|
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Shipeasy::Admin::Generated::ErrorSeriesResponse` initialize method"
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
65
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
66
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
67
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Shipeasy::Admin::Generated::ErrorSeriesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
69
|
+
end
|
|
70
|
+
h[k.to_sym] = v
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if attributes.key?(:'sql')
|
|
74
|
+
self.sql = attributes[:'sql']
|
|
75
|
+
else
|
|
76
|
+
self.sql = nil
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'rows')
|
|
80
|
+
if (value = attributes[:'rows']).is_a?(Array)
|
|
81
|
+
self.rows = value
|
|
82
|
+
end
|
|
83
|
+
else
|
|
84
|
+
self.rows = nil
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
89
|
+
# @return Array for valid properties with the reasons
|
|
90
|
+
def list_invalid_properties
|
|
91
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
92
|
+
invalid_properties = Array.new
|
|
93
|
+
if @sql.nil?
|
|
94
|
+
invalid_properties.push('invalid value for "sql", sql cannot be nil.')
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if @rows.nil?
|
|
98
|
+
invalid_properties.push('invalid value for "rows", rows cannot be nil.')
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
invalid_properties
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Check to see if the all the properties in the model are valid
|
|
105
|
+
# @return true if the model is valid
|
|
106
|
+
def valid?
|
|
107
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
108
|
+
return false if @sql.nil?
|
|
109
|
+
return false if @rows.nil?
|
|
110
|
+
true
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Custom attribute writer method with validation
|
|
114
|
+
# @param [Object] sql Value to be assigned
|
|
115
|
+
def sql=(sql)
|
|
116
|
+
if sql.nil?
|
|
117
|
+
fail ArgumentError, 'sql cannot be nil'
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
@sql = sql
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Custom attribute writer method with validation
|
|
124
|
+
# @param [Object] rows Value to be assigned
|
|
125
|
+
def rows=(rows)
|
|
126
|
+
if rows.nil?
|
|
127
|
+
fail ArgumentError, 'rows cannot be nil'
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
@rows = rows
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Checks equality by comparing each attribute.
|
|
134
|
+
# @param [Object] Object to be compared
|
|
135
|
+
def ==(o)
|
|
136
|
+
return true if self.equal?(o)
|
|
137
|
+
self.class == o.class &&
|
|
138
|
+
sql == o.sql &&
|
|
139
|
+
rows == o.rows
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# @see the `==` method
|
|
143
|
+
# @param [Object] Object to be compared
|
|
144
|
+
def eql?(o)
|
|
145
|
+
self == o
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Calculates hash code according to all attributes.
|
|
149
|
+
# @return [Integer] Hash code
|
|
150
|
+
def hash
|
|
151
|
+
[sql, rows].hash
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Builds the object from hash
|
|
155
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
156
|
+
# @return [Object] Returns the model itself
|
|
157
|
+
def self.build_from_hash(attributes)
|
|
158
|
+
return nil unless attributes.is_a?(Hash)
|
|
159
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
160
|
+
transformed_hash = {}
|
|
161
|
+
openapi_types.each_pair do |key, type|
|
|
162
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
163
|
+
transformed_hash["#{key}"] = nil
|
|
164
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
165
|
+
# check to ensure the input is an array given that the attribute
|
|
166
|
+
# is documented as an array but the input is not
|
|
167
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
168
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
169
|
+
end
|
|
170
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
171
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
new(transformed_hash)
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Returns the object in the form of hash
|
|
178
|
+
# @return [Hash] Returns the object in the form of hash
|
|
179
|
+
def to_hash
|
|
180
|
+
hash = {}
|
|
181
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
182
|
+
value = self.send(attr)
|
|
183
|
+
if value.nil?
|
|
184
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
185
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
hash[param] = _to_hash(value)
|
|
189
|
+
end
|
|
190
|
+
hash
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
end
|
|
@@ -0,0 +1,192 @@
|
|
|
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: 2.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
|
+
class ErrorSeriesResponseRowsInner < ApiModelBase
|
|
18
|
+
# Bucket start, epoch seconds, floor-aligned to `bucket`.
|
|
19
|
+
attr_accessor :t
|
|
20
|
+
|
|
21
|
+
# Occurrence count in the bucket (sample-interval weighted).
|
|
22
|
+
attr_accessor :v
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'t' => :'t',
|
|
28
|
+
:'v' => :'v'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns attribute mapping this model knows about
|
|
33
|
+
def self.acceptable_attribute_map
|
|
34
|
+
attribute_map
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
|
38
|
+
def self.acceptable_attributes
|
|
39
|
+
acceptable_attribute_map.values
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Attribute type mapping.
|
|
43
|
+
def self.openapi_types
|
|
44
|
+
{
|
|
45
|
+
:'t' => :'Integer',
|
|
46
|
+
:'v' => :'Float'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# List of attributes with nullable: true
|
|
51
|
+
def self.openapi_nullable
|
|
52
|
+
Set.new([
|
|
53
|
+
])
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Initializes the object
|
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
58
|
+
def initialize(attributes = {})
|
|
59
|
+
if (!attributes.is_a?(Hash))
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Shipeasy::Admin::Generated::ErrorSeriesResponseRowsInner` initialize method"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
66
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Shipeasy::Admin::Generated::ErrorSeriesResponseRowsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
68
|
+
end
|
|
69
|
+
h[k.to_sym] = v
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'t')
|
|
73
|
+
self.t = attributes[:'t']
|
|
74
|
+
else
|
|
75
|
+
self.t = nil
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'v')
|
|
79
|
+
self.v = attributes[:'v']
|
|
80
|
+
else
|
|
81
|
+
self.v = nil
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
86
|
+
# @return Array for valid properties with the reasons
|
|
87
|
+
def list_invalid_properties
|
|
88
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
89
|
+
invalid_properties = Array.new
|
|
90
|
+
if @t.nil?
|
|
91
|
+
invalid_properties.push('invalid value for "t", t cannot be nil.')
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if @v.nil?
|
|
95
|
+
invalid_properties.push('invalid value for "v", v cannot be nil.')
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
invalid_properties
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Check to see if the all the properties in the model are valid
|
|
102
|
+
# @return true if the model is valid
|
|
103
|
+
def valid?
|
|
104
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
105
|
+
return false if @t.nil?
|
|
106
|
+
return false if @v.nil?
|
|
107
|
+
true
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Custom attribute writer method with validation
|
|
111
|
+
# @param [Object] t Value to be assigned
|
|
112
|
+
def t=(t)
|
|
113
|
+
if t.nil?
|
|
114
|
+
fail ArgumentError, 't cannot be nil'
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
@t = t
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Custom attribute writer method with validation
|
|
121
|
+
# @param [Object] v Value to be assigned
|
|
122
|
+
def v=(v)
|
|
123
|
+
if v.nil?
|
|
124
|
+
fail ArgumentError, 'v cannot be nil'
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
@v = v
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Checks equality by comparing each attribute.
|
|
131
|
+
# @param [Object] Object to be compared
|
|
132
|
+
def ==(o)
|
|
133
|
+
return true if self.equal?(o)
|
|
134
|
+
self.class == o.class &&
|
|
135
|
+
t == o.t &&
|
|
136
|
+
v == o.v
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# @see the `==` method
|
|
140
|
+
# @param [Object] Object to be compared
|
|
141
|
+
def eql?(o)
|
|
142
|
+
self == o
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Calculates hash code according to all attributes.
|
|
146
|
+
# @return [Integer] Hash code
|
|
147
|
+
def hash
|
|
148
|
+
[t, v].hash
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Builds the object from hash
|
|
152
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
153
|
+
# @return [Object] Returns the model itself
|
|
154
|
+
def self.build_from_hash(attributes)
|
|
155
|
+
return nil unless attributes.is_a?(Hash)
|
|
156
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
157
|
+
transformed_hash = {}
|
|
158
|
+
openapi_types.each_pair do |key, type|
|
|
159
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
160
|
+
transformed_hash["#{key}"] = nil
|
|
161
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
162
|
+
# check to ensure the input is an array given that the attribute
|
|
163
|
+
# is documented as an array but the input is not
|
|
164
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
165
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
166
|
+
end
|
|
167
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
168
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
new(transformed_hash)
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Returns the object in the form of hash
|
|
175
|
+
# @return [Hash] Returns the object in the form of hash
|
|
176
|
+
def to_hash
|
|
177
|
+
hash = {}
|
|
178
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
179
|
+
value = self.send(attr)
|
|
180
|
+
if value.nil?
|
|
181
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
182
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
hash[param] = _to_hash(value)
|
|
186
|
+
end
|
|
187
|
+
hash
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
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
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.23.0
|
|
@@ -14,20 +14,21 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Shipeasy::Admin::Generated
|
|
17
|
-
#
|
|
18
|
-
class
|
|
17
|
+
# Inline metric — a DSL `query`, or an `event` (+ `aggregation`/`value`) the server compiles into one.
|
|
18
|
+
class ExperimentInlineMetric < ApiModelBase
|
|
19
|
+
# Stable metric key. Single segment or `folder.name`; lowercase letters, digits, `_`/`-`; max 128 chars.
|
|
19
20
|
attr_accessor :name
|
|
20
21
|
|
|
21
|
-
# Metric DSL string
|
|
22
|
+
# Metric DSL string. Provide this OR `event`.
|
|
22
23
|
attr_accessor :query
|
|
23
24
|
|
|
24
|
-
# Event name to build the metric from server-side
|
|
25
|
+
# Event name to build the metric from server-side. Auto-created if missing.
|
|
25
26
|
attr_accessor :event
|
|
26
27
|
|
|
27
28
|
# Reducer for the `event` form. Defaults to `count_users`.
|
|
28
29
|
attr_accessor :aggregation
|
|
29
30
|
|
|
30
|
-
# Numeric event property for `sum`/`avg`
|
|
31
|
+
# Numeric event property for `sum`/`avg` (with `event`).
|
|
31
32
|
attr_accessor :value
|
|
32
33
|
|
|
33
34
|
class EnumAttributeValidator
|
|
@@ -94,14 +95,14 @@ module Shipeasy::Admin::Generated
|
|
|
94
95
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
95
96
|
def initialize(attributes = {})
|
|
96
97
|
if (!attributes.is_a?(Hash))
|
|
97
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Shipeasy::Admin::Generated::
|
|
98
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Shipeasy::Admin::Generated::ExperimentInlineMetric` initialize method"
|
|
98
99
|
end
|
|
99
100
|
|
|
100
101
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
101
102
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
102
103
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
103
104
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
104
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Shipeasy::Admin::Generated::
|
|
105
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Shipeasy::Admin::Generated::ExperimentInlineMetric`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
105
106
|
end
|
|
106
107
|
h[k.to_sym] = v
|
|
107
108
|
}
|