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,178 @@
|
|
|
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
|
+
class ListKillswitchesResponse < ApiModelBase
|
|
18
|
+
attr_accessor :data
|
|
19
|
+
|
|
20
|
+
attr_accessor :next_cursor
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'data' => :'data',
|
|
26
|
+
:'next_cursor' => :'next_cursor'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Returns attribute mapping this model knows about
|
|
31
|
+
def self.acceptable_attribute_map
|
|
32
|
+
attribute_map
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns all the JSON keys this model knows about
|
|
36
|
+
def self.acceptable_attributes
|
|
37
|
+
acceptable_attribute_map.values
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.openapi_types
|
|
42
|
+
{
|
|
43
|
+
:'data' => :'Array<ListKillswitchesResponseDataInner>',
|
|
44
|
+
:'next_cursor' => :'String'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# List of attributes with nullable: true
|
|
49
|
+
def self.openapi_nullable
|
|
50
|
+
Set.new([
|
|
51
|
+
:'next_cursor'
|
|
52
|
+
])
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Initializes the object
|
|
56
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
57
|
+
def initialize(attributes = {})
|
|
58
|
+
if (!attributes.is_a?(Hash))
|
|
59
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Shipeasy::Admin::Generated::ListKillswitchesResponse` initialize method"
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
63
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
64
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
65
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Shipeasy::Admin::Generated::ListKillswitchesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
67
|
+
end
|
|
68
|
+
h[k.to_sym] = v
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if attributes.key?(:'data')
|
|
72
|
+
if (value = attributes[:'data']).is_a?(Array)
|
|
73
|
+
self.data = value
|
|
74
|
+
end
|
|
75
|
+
else
|
|
76
|
+
self.data = nil
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'next_cursor')
|
|
80
|
+
self.next_cursor = attributes[:'next_cursor']
|
|
81
|
+
else
|
|
82
|
+
self.next_cursor = nil
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
87
|
+
# @return Array for valid properties with the reasons
|
|
88
|
+
def list_invalid_properties
|
|
89
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
90
|
+
invalid_properties = Array.new
|
|
91
|
+
if @data.nil?
|
|
92
|
+
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
invalid_properties
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Check to see if the all the properties in the model are valid
|
|
99
|
+
# @return true if the model is valid
|
|
100
|
+
def valid?
|
|
101
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
102
|
+
return false if @data.nil?
|
|
103
|
+
true
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Custom attribute writer method with validation
|
|
107
|
+
# @param [Object] data Value to be assigned
|
|
108
|
+
def data=(data)
|
|
109
|
+
if data.nil?
|
|
110
|
+
fail ArgumentError, 'data cannot be nil'
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
@data = data
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Checks equality by comparing each attribute.
|
|
117
|
+
# @param [Object] Object to be compared
|
|
118
|
+
def ==(o)
|
|
119
|
+
return true if self.equal?(o)
|
|
120
|
+
self.class == o.class &&
|
|
121
|
+
data == o.data &&
|
|
122
|
+
next_cursor == o.next_cursor
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# @see the `==` method
|
|
126
|
+
# @param [Object] Object to be compared
|
|
127
|
+
def eql?(o)
|
|
128
|
+
self == o
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Calculates hash code according to all attributes.
|
|
132
|
+
# @return [Integer] Hash code
|
|
133
|
+
def hash
|
|
134
|
+
[data, next_cursor].hash
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Builds the object from hash
|
|
138
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
139
|
+
# @return [Object] Returns the model itself
|
|
140
|
+
def self.build_from_hash(attributes)
|
|
141
|
+
return nil unless attributes.is_a?(Hash)
|
|
142
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
143
|
+
transformed_hash = {}
|
|
144
|
+
openapi_types.each_pair do |key, type|
|
|
145
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
146
|
+
transformed_hash["#{key}"] = nil
|
|
147
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
148
|
+
# check to ensure the input is an array given that the attribute
|
|
149
|
+
# is documented as an array but the input is not
|
|
150
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
151
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
152
|
+
end
|
|
153
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
154
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
new(transformed_hash)
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Returns the object in the form of hash
|
|
161
|
+
# @return [Hash] Returns the object in the form of hash
|
|
162
|
+
def to_hash
|
|
163
|
+
hash = {}
|
|
164
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
165
|
+
value = self.send(attr)
|
|
166
|
+
if value.nil?
|
|
167
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
168
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
hash[param] = _to_hash(value)
|
|
172
|
+
end
|
|
173
|
+
hash
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
end
|
|
@@ -0,0 +1,270 @@
|
|
|
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
|
+
class ListKillswitchesResponseDataInner < ApiModelBase
|
|
18
|
+
# Stable opaque killswitch id.
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
# Stable config key in `folder.name` form (two lowercase segments separated by a dot, e.g. `pricing.tiers`). Used by SDKs as `Shipeasy.getConfig('<name>')`. Immutable after create.
|
|
22
|
+
attr_accessor :name
|
|
23
|
+
|
|
24
|
+
# Free-form description or `null`.
|
|
25
|
+
attr_accessor :description
|
|
26
|
+
|
|
27
|
+
# ISO-8601 timestamp of last mutation.
|
|
28
|
+
attr_accessor :updated_at
|
|
29
|
+
|
|
30
|
+
# Per-env latest value, switches, version, and publish timestamp.
|
|
31
|
+
attr_accessor :envs
|
|
32
|
+
|
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
34
|
+
def self.attribute_map
|
|
35
|
+
{
|
|
36
|
+
:'id' => :'id',
|
|
37
|
+
:'name' => :'name',
|
|
38
|
+
:'description' => :'description',
|
|
39
|
+
:'updated_at' => :'updatedAt',
|
|
40
|
+
:'envs' => :'envs'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Returns attribute mapping this model knows about
|
|
45
|
+
def self.acceptable_attribute_map
|
|
46
|
+
attribute_map
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Returns all the JSON keys this model knows about
|
|
50
|
+
def self.acceptable_attributes
|
|
51
|
+
acceptable_attribute_map.values
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Attribute type mapping.
|
|
55
|
+
def self.openapi_types
|
|
56
|
+
{
|
|
57
|
+
:'id' => :'String',
|
|
58
|
+
:'name' => :'String',
|
|
59
|
+
:'description' => :'String',
|
|
60
|
+
:'updated_at' => :'String',
|
|
61
|
+
:'envs' => :'Hash<String, ListKillswitchesResponseDataInnerEnvsValue>'
|
|
62
|
+
}
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# List of attributes with nullable: true
|
|
66
|
+
def self.openapi_nullable
|
|
67
|
+
Set.new([
|
|
68
|
+
:'description',
|
|
69
|
+
])
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Initializes the object
|
|
73
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
74
|
+
def initialize(attributes = {})
|
|
75
|
+
if (!attributes.is_a?(Hash))
|
|
76
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Shipeasy::Admin::Generated::ListKillswitchesResponseDataInner` initialize method"
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
80
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
81
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
82
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
83
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Shipeasy::Admin::Generated::ListKillswitchesResponseDataInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
84
|
+
end
|
|
85
|
+
h[k.to_sym] = v
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'id')
|
|
89
|
+
self.id = attributes[:'id']
|
|
90
|
+
else
|
|
91
|
+
self.id = nil
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'name')
|
|
95
|
+
self.name = attributes[:'name']
|
|
96
|
+
else
|
|
97
|
+
self.name = nil
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'description')
|
|
101
|
+
self.description = attributes[:'description']
|
|
102
|
+
else
|
|
103
|
+
self.description = nil
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'updated_at')
|
|
107
|
+
self.updated_at = attributes[:'updated_at']
|
|
108
|
+
else
|
|
109
|
+
self.updated_at = nil
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if attributes.key?(:'envs')
|
|
113
|
+
if (value = attributes[:'envs']).is_a?(Hash)
|
|
114
|
+
self.envs = value
|
|
115
|
+
end
|
|
116
|
+
else
|
|
117
|
+
self.envs = nil
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
122
|
+
# @return Array for valid properties with the reasons
|
|
123
|
+
def list_invalid_properties
|
|
124
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
125
|
+
invalid_properties = Array.new
|
|
126
|
+
if @id.nil?
|
|
127
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if @name.nil?
|
|
131
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if @name.to_s.length > 128
|
|
135
|
+
invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 128.')
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
if @updated_at.nil?
|
|
139
|
+
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
if @envs.nil?
|
|
143
|
+
invalid_properties.push('invalid value for "envs", envs cannot be nil.')
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
invalid_properties
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Check to see if the all the properties in the model are valid
|
|
150
|
+
# @return true if the model is valid
|
|
151
|
+
def valid?
|
|
152
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
153
|
+
return false if @id.nil?
|
|
154
|
+
return false if @name.nil?
|
|
155
|
+
return false if @name.to_s.length > 128
|
|
156
|
+
return false if @updated_at.nil?
|
|
157
|
+
return false if @envs.nil?
|
|
158
|
+
true
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Custom attribute writer method with validation
|
|
162
|
+
# @param [Object] id Value to be assigned
|
|
163
|
+
def id=(id)
|
|
164
|
+
if id.nil?
|
|
165
|
+
fail ArgumentError, 'id cannot be nil'
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
@id = id
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Custom attribute writer method with validation
|
|
172
|
+
# @param [Object] name Value to be assigned
|
|
173
|
+
def name=(name)
|
|
174
|
+
if name.nil?
|
|
175
|
+
fail ArgumentError, 'name cannot be nil'
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
if name.to_s.length > 128
|
|
179
|
+
fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 128.'
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
@name = name
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Custom attribute writer method with validation
|
|
186
|
+
# @param [Object] updated_at Value to be assigned
|
|
187
|
+
def updated_at=(updated_at)
|
|
188
|
+
if updated_at.nil?
|
|
189
|
+
fail ArgumentError, 'updated_at cannot be nil'
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
@updated_at = updated_at
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# Custom attribute writer method with validation
|
|
196
|
+
# @param [Object] envs Value to be assigned
|
|
197
|
+
def envs=(envs)
|
|
198
|
+
if envs.nil?
|
|
199
|
+
fail ArgumentError, 'envs cannot be nil'
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
@envs = envs
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# Checks equality by comparing each attribute.
|
|
206
|
+
# @param [Object] Object to be compared
|
|
207
|
+
def ==(o)
|
|
208
|
+
return true if self.equal?(o)
|
|
209
|
+
self.class == o.class &&
|
|
210
|
+
id == o.id &&
|
|
211
|
+
name == o.name &&
|
|
212
|
+
description == o.description &&
|
|
213
|
+
updated_at == o.updated_at &&
|
|
214
|
+
envs == o.envs
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# @see the `==` method
|
|
218
|
+
# @param [Object] Object to be compared
|
|
219
|
+
def eql?(o)
|
|
220
|
+
self == o
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# Calculates hash code according to all attributes.
|
|
224
|
+
# @return [Integer] Hash code
|
|
225
|
+
def hash
|
|
226
|
+
[id, name, description, updated_at, envs].hash
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# Builds the object from hash
|
|
230
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
231
|
+
# @return [Object] Returns the model itself
|
|
232
|
+
def self.build_from_hash(attributes)
|
|
233
|
+
return nil unless attributes.is_a?(Hash)
|
|
234
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
235
|
+
transformed_hash = {}
|
|
236
|
+
openapi_types.each_pair do |key, type|
|
|
237
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
238
|
+
transformed_hash["#{key}"] = nil
|
|
239
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
240
|
+
# check to ensure the input is an array given that the attribute
|
|
241
|
+
# is documented as an array but the input is not
|
|
242
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
243
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
244
|
+
end
|
|
245
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
246
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
247
|
+
end
|
|
248
|
+
end
|
|
249
|
+
new(transformed_hash)
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
# Returns the object in the form of hash
|
|
253
|
+
# @return [Hash] Returns the object in the form of hash
|
|
254
|
+
def to_hash
|
|
255
|
+
hash = {}
|
|
256
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
257
|
+
value = self.send(attr)
|
|
258
|
+
if value.nil?
|
|
259
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
260
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
hash[param] = _to_hash(value)
|
|
264
|
+
end
|
|
265
|
+
hash
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
end
|
|
@@ -0,0 +1,248 @@
|
|
|
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
|
+
class ListKillswitchesResponseDataInnerEnvsValue < ApiModelBase
|
|
18
|
+
# Flat boolean published for this env.
|
|
19
|
+
attr_accessor :value
|
|
20
|
+
|
|
21
|
+
attr_accessor :switches
|
|
22
|
+
|
|
23
|
+
# Monotonically increasing version per env.
|
|
24
|
+
attr_accessor :version
|
|
25
|
+
|
|
26
|
+
# ISO-8601 publish timestamp for this version.
|
|
27
|
+
attr_accessor :published_at
|
|
28
|
+
|
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
30
|
+
def self.attribute_map
|
|
31
|
+
{
|
|
32
|
+
:'value' => :'value',
|
|
33
|
+
:'switches' => :'switches',
|
|
34
|
+
:'version' => :'version',
|
|
35
|
+
:'published_at' => :'publishedAt'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns attribute mapping this model knows about
|
|
40
|
+
def self.acceptable_attribute_map
|
|
41
|
+
attribute_map
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Returns all the JSON keys this model knows about
|
|
45
|
+
def self.acceptable_attributes
|
|
46
|
+
acceptable_attribute_map.values
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Attribute type mapping.
|
|
50
|
+
def self.openapi_types
|
|
51
|
+
{
|
|
52
|
+
:'value' => :'Boolean',
|
|
53
|
+
:'switches' => :'Hash<String, Boolean>',
|
|
54
|
+
:'version' => :'Integer',
|
|
55
|
+
:'published_at' => :'String'
|
|
56
|
+
}
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# List of attributes with nullable: true
|
|
60
|
+
def self.openapi_nullable
|
|
61
|
+
Set.new([
|
|
62
|
+
])
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Initializes the object
|
|
66
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
67
|
+
def initialize(attributes = {})
|
|
68
|
+
if (!attributes.is_a?(Hash))
|
|
69
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Shipeasy::Admin::Generated::ListKillswitchesResponseDataInnerEnvsValue` initialize method"
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
73
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
74
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
75
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
76
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Shipeasy::Admin::Generated::ListKillswitchesResponseDataInnerEnvsValue`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
77
|
+
end
|
|
78
|
+
h[k.to_sym] = v
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if attributes.key?(:'value')
|
|
82
|
+
self.value = attributes[:'value']
|
|
83
|
+
else
|
|
84
|
+
self.value = nil
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'switches')
|
|
88
|
+
if (value = attributes[:'switches']).is_a?(Hash)
|
|
89
|
+
self.switches = value
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
if attributes.key?(:'version')
|
|
94
|
+
self.version = attributes[:'version']
|
|
95
|
+
else
|
|
96
|
+
self.version = nil
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'published_at')
|
|
100
|
+
self.published_at = attributes[:'published_at']
|
|
101
|
+
else
|
|
102
|
+
self.published_at = nil
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
107
|
+
# @return Array for valid properties with the reasons
|
|
108
|
+
def list_invalid_properties
|
|
109
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
110
|
+
invalid_properties = Array.new
|
|
111
|
+
if @value.nil?
|
|
112
|
+
invalid_properties.push('invalid value for "value", value cannot be nil.')
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if @version.nil?
|
|
116
|
+
invalid_properties.push('invalid value for "version", version cannot be nil.')
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if @version > 9007199254740991
|
|
120
|
+
invalid_properties.push('invalid value for "version", must be smaller than or equal to 9007199254740991.')
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if @version < -9007199254740991
|
|
124
|
+
invalid_properties.push('invalid value for "version", must be greater than or equal to -9007199254740991.')
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if @published_at.nil?
|
|
128
|
+
invalid_properties.push('invalid value for "published_at", published_at cannot be nil.')
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
invalid_properties
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Check to see if the all the properties in the model are valid
|
|
135
|
+
# @return true if the model is valid
|
|
136
|
+
def valid?
|
|
137
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
138
|
+
return false if @value.nil?
|
|
139
|
+
return false if @version.nil?
|
|
140
|
+
return false if @version > 9007199254740991
|
|
141
|
+
return false if @version < -9007199254740991
|
|
142
|
+
return false if @published_at.nil?
|
|
143
|
+
true
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Custom attribute writer method with validation
|
|
147
|
+
# @param [Object] value Value to be assigned
|
|
148
|
+
def value=(value)
|
|
149
|
+
if value.nil?
|
|
150
|
+
fail ArgumentError, 'value cannot be nil'
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
@value = value
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Custom attribute writer method with validation
|
|
157
|
+
# @param [Object] version Value to be assigned
|
|
158
|
+
def version=(version)
|
|
159
|
+
if version.nil?
|
|
160
|
+
fail ArgumentError, 'version cannot be nil'
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if version > 9007199254740991
|
|
164
|
+
fail ArgumentError, 'invalid value for "version", must be smaller than or equal to 9007199254740991.'
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
if version < -9007199254740991
|
|
168
|
+
fail ArgumentError, 'invalid value for "version", must be greater than or equal to -9007199254740991.'
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
@version = version
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Custom attribute writer method with validation
|
|
175
|
+
# @param [Object] published_at Value to be assigned
|
|
176
|
+
def published_at=(published_at)
|
|
177
|
+
if published_at.nil?
|
|
178
|
+
fail ArgumentError, 'published_at cannot be nil'
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
@published_at = published_at
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Checks equality by comparing each attribute.
|
|
185
|
+
# @param [Object] Object to be compared
|
|
186
|
+
def ==(o)
|
|
187
|
+
return true if self.equal?(o)
|
|
188
|
+
self.class == o.class &&
|
|
189
|
+
value == o.value &&
|
|
190
|
+
switches == o.switches &&
|
|
191
|
+
version == o.version &&
|
|
192
|
+
published_at == o.published_at
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# @see the `==` method
|
|
196
|
+
# @param [Object] Object to be compared
|
|
197
|
+
def eql?(o)
|
|
198
|
+
self == o
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Calculates hash code according to all attributes.
|
|
202
|
+
# @return [Integer] Hash code
|
|
203
|
+
def hash
|
|
204
|
+
[value, switches, version, published_at].hash
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# Builds the object from hash
|
|
208
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
209
|
+
# @return [Object] Returns the model itself
|
|
210
|
+
def self.build_from_hash(attributes)
|
|
211
|
+
return nil unless attributes.is_a?(Hash)
|
|
212
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
213
|
+
transformed_hash = {}
|
|
214
|
+
openapi_types.each_pair do |key, type|
|
|
215
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
216
|
+
transformed_hash["#{key}"] = nil
|
|
217
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
218
|
+
# check to ensure the input is an array given that the attribute
|
|
219
|
+
# is documented as an array but the input is not
|
|
220
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
221
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
222
|
+
end
|
|
223
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
224
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
225
|
+
end
|
|
226
|
+
end
|
|
227
|
+
new(transformed_hash)
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# Returns the object in the form of hash
|
|
231
|
+
# @return [Hash] Returns the object in the form of hash
|
|
232
|
+
def to_hash
|
|
233
|
+
hash = {}
|
|
234
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
235
|
+
value = self.send(attr)
|
|
236
|
+
if value.nil?
|
|
237
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
238
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
hash[param] = _to_hash(value)
|
|
242
|
+
end
|
|
243
|
+
hash
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
end
|