api-sdk-rb 1.11.111 → 1.11.133

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.
Files changed (180) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +207 -381
  3. data/docs/{GetPartnerCreditTransactions200Response.md → AccountCreditTransactionListResponse.md} +2 -2
  4. data/docs/{GetUserAdapterConnections200Response.md → AdapterConnectionListResponse.md} +2 -2
  5. data/docs/{RemoveUserAdapterConnection200Response.md → AdapterConnectionRemovalResponse.md} +2 -2
  6. data/docs/{SetUserAdapterConnection200Response.md → AdapterConnectionResponse.md} +2 -2
  7. data/docs/{AddAiAnswersKnowledgeDocument201Response.md → AiAnswersKnowledgeDocumentResponse.md} +2 -2
  8. data/docs/BrandKitApi.md +74 -74
  9. data/docs/BrandKitTokens.md +2 -0
  10. data/docs/BrandKitView.md +1 -1
  11. data/docs/BrandTextStyle.md +22 -0
  12. data/docs/CanvasesApi.md +45 -45
  13. data/docs/{CreateCompositionDatabaseRecord201Response.md → CompositionDatabaseRecordResponse.md} +2 -2
  14. data/docs/CompositionsApi.md +615 -349
  15. data/docs/{CreateCompositionContentItem201Response.md → ContentItemWriteResultResponse.md} +2 -2
  16. data/docs/CreditsApi.md +20 -20
  17. data/docs/{CreateCompositionFromWidget201Response.md → DeleteUpload200Response.md} +3 -3
  18. data/docs/{UploadsIdDelete200ResponseData.md → DeleteUpload200ResponseData.md} +2 -2
  19. data/docs/{GetPartnerDesignDefaults200Response.md → DesignDefaultsResponse.md} +2 -2
  20. data/docs/EntitlementsApi.md +18 -18
  21. data/docs/{OperationsIdGetResponse.md → GetOperationResponse.md} +3 -3
  22. data/docs/{OperationsIdGetResponseData.md → GetOperationResponseData.md} +3 -3
  23. data/docs/GetOperationResponseDataMetadata.md +24 -0
  24. data/docs/InvoicesApi.md +9 -9
  25. data/docs/{UploadsGet200Response.md → ListUploads200Response.md} +2 -2
  26. data/docs/{GetManagedUserLimits200Response.md → ManagedUserLimitsResponse.md} +2 -2
  27. data/docs/{DeleteManagedUser200Response.md → ManagedUserRemovalResponse.md} +2 -2
  28. data/docs/ManagedUsersApi.md +261 -171
  29. data/docs/OperationsApi.md +11 -11
  30. data/docs/PartnersApi.md +388 -388
  31. data/docs/PatchBrandKitRequest.md +2 -0
  32. data/docs/PublicEmbedApi.md +95 -95
  33. data/docs/PublicWorkflowEventsRequestEventsInner.md +3 -1
  34. data/docs/{GetPublicWorkflow200Response.md → PublicWorkflowResponse.md} +2 -2
  35. data/docs/TokensApi.md +11 -9
  36. data/docs/Upload.md +1 -1
  37. data/docs/UploadLimits.md +3 -3
  38. data/docs/UploadsApi.md +85 -85
  39. data/docs/UsersApi.md +125 -125
  40. data/docs/WidgetClarification.md +22 -0
  41. data/docs/WidgetClarificationOption.md +22 -0
  42. data/docs/WidgetClarificationQuestion.md +26 -0
  43. data/docs/WidgetNextStep.md +24 -0
  44. data/docs/WidgetPlan.md +26 -0
  45. data/docs/WidgetPlanDecisions.md +32 -0
  46. data/docs/WidgetPlanDecisionsAdaptersInner.md +20 -0
  47. data/docs/WidgetPlanDecisionsLibrariesInner.md +22 -0
  48. data/docs/WidgetPlanDecisionsResponsive.md +22 -0
  49. data/docs/WidgetPlanTask.md +24 -0
  50. data/docs/WidgetsApi.md +38 -38
  51. data/docs/{CreateWorkspaceWorkflowFromPreset201Response.md → WorkflowDetailResponse.md} +2 -2
  52. data/docs/WorkflowFailureReason.md +15 -0
  53. data/docs/WorkflowFailureReasonCounter.md +22 -0
  54. data/docs/{SaveWorkspaceWorkflow200Response.md → WorkflowResponse.md} +2 -2
  55. data/docs/WorkflowStats.md +4 -2
  56. data/docs/WorkflowsApi.md +197 -413
  57. data/lib/api-sdk-rb/api/brand_kit_api.rb +61 -61
  58. data/lib/api-sdk-rb/api/canvases_api.rb +39 -39
  59. data/lib/api-sdk-rb/api/compositions_api.rb +770 -441
  60. data/lib/api-sdk-rb/api/credits_api.rb +20 -20
  61. data/lib/api-sdk-rb/api/entitlements_api.rb +14 -14
  62. data/lib/api-sdk-rb/api/invoices_api.rb +10 -10
  63. data/lib/api-sdk-rb/api/managed_users_api.rb +278 -172
  64. data/lib/api-sdk-rb/api/operations_api.rb +10 -10
  65. data/lib/api-sdk-rb/api/partners_api.rb +389 -389
  66. data/lib/api-sdk-rb/api/public_embed_api.rb +95 -95
  67. data/lib/api-sdk-rb/api/tokens_api.rb +8 -6
  68. data/lib/api-sdk-rb/api/uploads_api.rb +96 -96
  69. data/lib/api-sdk-rb/api/users_api.rb +132 -132
  70. data/lib/api-sdk-rb/api/widgets_api.rb +40 -40
  71. data/lib/api-sdk-rb/api/workflows_api.rb +246 -468
  72. data/lib/api-sdk-rb/configuration.rb +0 -60
  73. data/lib/api-sdk-rb/models/{get_user_adapter_connections200_response.rb → account_credit_transaction_list_response.rb} +4 -4
  74. data/lib/api-sdk-rb/models/{get_partner_credit_transactions200_response.rb → adapter_connection_list_response.rb} +4 -4
  75. data/lib/api-sdk-rb/models/{save_workspace_workflow200_response.rb → adapter_connection_removal_response.rb} +4 -4
  76. data/lib/api-sdk-rb/models/{set_user_adapter_connection200_response.rb → adapter_connection_response.rb} +3 -3
  77. data/lib/api-sdk-rb/models/{add_ai_answers_knowledge_document201_response.rb → ai_answers_knowledge_document_response.rb} +3 -3
  78. data/lib/api-sdk-rb/models/brand_kit_tokens.rb +33 -2
  79. data/lib/api-sdk-rb/models/brand_kit_view.rb +1 -1
  80. data/lib/api-sdk-rb/models/brand_text_style.rb +344 -0
  81. data/lib/api-sdk-rb/models/{create_composition_database_record201_response.rb → composition_database_record_response.rb} +3 -3
  82. data/lib/api-sdk-rb/models/{create_composition_content_item201_response.rb → content_item_write_result_response.rb} +3 -3
  83. data/lib/api-sdk-rb/models/{operations_id_get_response.rb → delete_upload200_response.rb} +4 -5
  84. data/lib/api-sdk-rb/models/{uploads_id_delete200_response_data.rb → delete_upload200_response_data.rb} +3 -3
  85. data/lib/api-sdk-rb/models/{get_partner_design_defaults200_response.rb → design_defaults_response.rb} +3 -3
  86. data/lib/api-sdk-rb/models/get_operation_response.rb +247 -0
  87. data/lib/api-sdk-rb/models/{operations_id_get_response_data.rb → get_operation_response_data.rb} +5 -8
  88. data/lib/api-sdk-rb/models/get_operation_response_data_metadata.rb +283 -0
  89. data/lib/api-sdk-rb/models/{uploads_get200_response.rb → list_uploads200_response.rb} +3 -3
  90. data/lib/api-sdk-rb/models/{get_managed_user_limits200_response.rb → managed_user_limits_response.rb} +3 -3
  91. data/lib/api-sdk-rb/models/{uploads_id_delete200_response.rb → managed_user_removal_response.rb} +4 -4
  92. data/lib/api-sdk-rb/models/patch_brand_kit_request.rb +32 -1
  93. data/lib/api-sdk-rb/models/public_workflow_events_request_events_inner.rb +26 -4
  94. data/lib/api-sdk-rb/models/{get_public_workflow200_response.rb → public_workflow_response.rb} +3 -3
  95. data/lib/api-sdk-rb/models/upload.rb +1 -1
  96. data/lib/api-sdk-rb/models/upload_limits.rb +3 -3
  97. data/lib/api-sdk-rb/models/widget_clarification.rb +279 -0
  98. data/lib/api-sdk-rb/models/{create_composition_from_widget201_response.rb → widget_clarification_option.rb} +40 -30
  99. data/lib/api-sdk-rb/models/widget_clarification_question.rb +329 -0
  100. data/lib/api-sdk-rb/models/widget_next_step.rb +307 -0
  101. data/lib/api-sdk-rb/models/widget_plan.rb +306 -0
  102. data/lib/api-sdk-rb/models/widget_plan_decisions.rb +346 -0
  103. data/lib/api-sdk-rb/models/widget_plan_decisions_adapters_inner.rb +237 -0
  104. data/lib/api-sdk-rb/models/{create_workspace_workflow_from_preset201_response.rb → widget_plan_decisions_libraries_inner.rb} +39 -30
  105. data/lib/api-sdk-rb/models/widget_plan_decisions_responsive.rb +311 -0
  106. data/lib/api-sdk-rb/models/widget_plan_task.rb +320 -0
  107. data/lib/api-sdk-rb/models/{delete_managed_user200_response.rb → workflow_detail_response.rb} +4 -4
  108. data/lib/api-sdk-rb/models/workflow_failure_reason.rb +42 -0
  109. data/lib/api-sdk-rb/models/workflow_failure_reason_counter.rb +277 -0
  110. data/lib/api-sdk-rb/models/workflow_response.rb +246 -0
  111. data/lib/api-sdk-rb/models/workflow_stats.rb +17 -5
  112. data/lib/api-sdk-rb/version.rb +1 -1
  113. data/lib/api-sdk-rb.rb +32 -21
  114. data/spec/api/brand_kit_api_spec.rb +18 -18
  115. data/spec/api/canvases_api_spec.rb +10 -10
  116. data/spec/api/compositions_api_spec.rb +144 -83
  117. data/spec/api/credits_api_spec.rb +5 -5
  118. data/spec/api/entitlements_api_spec.rb +4 -4
  119. data/spec/api/invoices_api_spec.rb +2 -2
  120. data/spec/api/managed_users_api_spec.rb +63 -42
  121. data/spec/api/operations_api_spec.rb +3 -3
  122. data/spec/api/partners_api_spec.rb +91 -91
  123. data/spec/api/public_embed_api_spec.rb +23 -23
  124. data/spec/api/tokens_api_spec.rb +3 -2
  125. data/spec/api/uploads_api_spec.rb +24 -24
  126. data/spec/api/users_api_spec.rb +30 -30
  127. data/spec/api/widgets_api_spec.rb +9 -9
  128. data/spec/api/workflows_api_spec.rb +50 -89
  129. data/spec/models/{get_user_adapter_connections200_response_spec.rb → account_credit_transaction_list_response_spec.rb} +6 -6
  130. data/spec/models/{get_public_workflow200_response_spec.rb → adapter_connection_list_response_spec.rb} +6 -6
  131. data/spec/models/{save_workspace_workflow200_response_spec.rb → adapter_connection_removal_response_spec.rb} +6 -6
  132. data/spec/models/{delete_managed_user200_response_spec.rb → adapter_connection_response_spec.rb} +6 -6
  133. data/spec/models/ai_answers_knowledge_document_response_spec.rb +48 -0
  134. data/spec/models/brand_kit_tokens_spec.rb +6 -0
  135. data/spec/models/{create_composition_from_widget201_response_spec.rb → brand_text_style_spec.rb} +13 -9
  136. data/spec/models/{get_managed_user_limits200_response_spec.rb → composition_database_record_response_spec.rb} +6 -6
  137. data/spec/models/content_item_write_result_response_spec.rb +48 -0
  138. data/spec/models/{uploads_id_delete200_response_data_spec.rb → delete_upload200_response_data_spec.rb} +6 -6
  139. data/spec/models/{operations_id_get_response_spec.rb → delete_upload200_response_spec.rb} +6 -6
  140. data/spec/models/design_defaults_response_spec.rb +48 -0
  141. data/spec/models/get_operation_response_data_metadata_spec.rb +58 -0
  142. data/spec/models/{operations_id_get_response_data_spec.rb → get_operation_response_data_spec.rb} +6 -6
  143. data/spec/models/{uploads_get200_response_spec.rb → get_operation_response_spec.rb} +6 -6
  144. data/spec/models/list_uploads200_response_spec.rb +48 -0
  145. data/spec/models/managed_user_limits_response_spec.rb +48 -0
  146. data/spec/models/{uploads_id_delete200_response_spec.rb → managed_user_removal_response_spec.rb} +6 -6
  147. data/spec/models/patch_brand_kit_request_spec.rb +6 -0
  148. data/spec/models/public_workflow_events_request_events_inner_spec.rb +10 -0
  149. data/spec/models/public_workflow_response_spec.rb +48 -0
  150. data/spec/models/widget_clarification_option_spec.rb +48 -0
  151. data/spec/models/widget_clarification_question_spec.rb +60 -0
  152. data/spec/models/widget_clarification_spec.rb +48 -0
  153. data/spec/models/widget_next_step_spec.rb +58 -0
  154. data/spec/models/widget_plan_decisions_adapters_inner_spec.rb +42 -0
  155. data/spec/models/widget_plan_decisions_libraries_inner_spec.rb +48 -0
  156. data/spec/models/widget_plan_decisions_responsive_spec.rb +48 -0
  157. data/spec/models/widget_plan_decisions_spec.rb +78 -0
  158. data/spec/models/{create_composition_database_record201_response_spec.rb → widget_plan_spec.rb} +21 -9
  159. data/spec/models/widget_plan_task_spec.rb +62 -0
  160. data/spec/models/workflow_detail_response_spec.rb +48 -0
  161. data/spec/models/workflow_failure_reason_counter_spec.rb +48 -0
  162. data/spec/models/workflow_failure_reason_spec.rb +30 -0
  163. data/spec/models/workflow_response_spec.rb +48 -0
  164. data/spec/models/workflow_stats_spec.rb +6 -0
  165. metadata +130 -86
  166. data/docs/PartnerApi.md +0 -12714
  167. data/docs/UploadsIdDelete200Response.md +0 -22
  168. data/docs/WorkspacesApi.md +0 -1527
  169. data/lib/api-sdk-rb/api/partner_api.rb +0 -13791
  170. data/lib/api-sdk-rb/api/workspaces_api.rb +0 -1775
  171. data/lib/api-sdk-rb/models/remove_user_adapter_connection200_response.rb +0 -246
  172. data/spec/api/partner_api_spec.rb +0 -2437
  173. data/spec/api/workspaces_api_spec.rb +0 -339
  174. data/spec/models/add_ai_answers_knowledge_document201_response_spec.rb +0 -48
  175. data/spec/models/create_composition_content_item201_response_spec.rb +0 -48
  176. data/spec/models/create_workspace_workflow_from_preset201_response_spec.rb +0 -48
  177. data/spec/models/get_partner_credit_transactions200_response_spec.rb +0 -48
  178. data/spec/models/get_partner_design_defaults200_response_spec.rb +0 -48
  179. data/spec/models/remove_user_adapter_connection200_response_spec.rb +0 -48
  180. data/spec/models/set_user_adapter_connection200_response_spec.rb +0 -48
@@ -0,0 +1,320 @@
1
+ =begin
2
+ #Widgetic API Gateway
3
+
4
+ #API documentation for the Widgetic API Gateway
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.9.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module ApiSdkRb
17
+ # One step of the plan the person is shown.
18
+ class WidgetPlanTask
19
+ # `t1`, `t2`, ... Stable for the life of the plan.
20
+ attr_accessor :id
21
+
22
+ # The step, in the language the person wrote in. At most 90 characters.
23
+ attr_accessor :label
24
+
25
+ # What the step is about, so a client can pick an icon.
26
+ attr_accessor :kind
27
+
28
+ # Where the step stands. At most one step is `in_progress`.
29
+ attr_accessor :status
30
+
31
+ class EnumAttributeValidator
32
+ attr_reader :datatype
33
+ attr_reader :allowable_values
34
+
35
+ def initialize(datatype, allowable_values)
36
+ @allowable_values = allowable_values.map do |value|
37
+ case datatype.to_s
38
+ when /Integer/i
39
+ value.to_i
40
+ when /Float/i
41
+ value.to_f
42
+ else
43
+ value
44
+ end
45
+ end
46
+ end
47
+
48
+ def valid?(value)
49
+ !value || allowable_values.include?(value)
50
+ end
51
+ end
52
+
53
+ # Attribute mapping from ruby-style variable name to JSON key.
54
+ def self.attribute_map
55
+ {
56
+ :'id' => :'id',
57
+ :'label' => :'label',
58
+ :'kind' => :'kind',
59
+ :'status' => :'status'
60
+ }
61
+ end
62
+
63
+ # Returns all the JSON keys this model knows about
64
+ def self.acceptable_attributes
65
+ attribute_map.values
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.openapi_types
70
+ {
71
+ :'id' => :'String',
72
+ :'label' => :'String',
73
+ :'kind' => :'String',
74
+ :'status' => :'String'
75
+ }
76
+ end
77
+
78
+ # List of attributes with nullable: true
79
+ def self.openapi_nullable
80
+ Set.new([
81
+ ])
82
+ end
83
+
84
+ # Initializes the object
85
+ # @param [Hash] attributes Model attributes in the form of hash
86
+ def initialize(attributes = {})
87
+ if (!attributes.is_a?(Hash))
88
+ fail ArgumentError, "The input argument (attributes) must be a hash in `ApiSdkRb::WidgetPlanTask` initialize method"
89
+ end
90
+
91
+ # check to see if the attribute exists and convert string to symbol for hash key
92
+ attributes = attributes.each_with_object({}) { |(k, v), h|
93
+ if (!self.class.attribute_map.key?(k.to_sym))
94
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ApiSdkRb::WidgetPlanTask`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
95
+ end
96
+ h[k.to_sym] = v
97
+ }
98
+
99
+ if attributes.key?(:'id')
100
+ self.id = attributes[:'id']
101
+ else
102
+ self.id = nil
103
+ end
104
+
105
+ if attributes.key?(:'label')
106
+ self.label = attributes[:'label']
107
+ else
108
+ self.label = nil
109
+ end
110
+
111
+ if attributes.key?(:'kind')
112
+ self.kind = attributes[:'kind']
113
+ else
114
+ self.kind = nil
115
+ end
116
+
117
+ if attributes.key?(:'status')
118
+ self.status = attributes[:'status']
119
+ else
120
+ self.status = nil
121
+ end
122
+ end
123
+
124
+ # Show invalid properties with the reasons. Usually used together with valid?
125
+ # @return Array for valid properties with the reasons
126
+ def list_invalid_properties
127
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
128
+ invalid_properties = Array.new
129
+ if @id.nil?
130
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
131
+ end
132
+
133
+ if @label.nil?
134
+ invalid_properties.push('invalid value for "label", label cannot be nil.')
135
+ end
136
+
137
+ if @kind.nil?
138
+ invalid_properties.push('invalid value for "kind", kind cannot be nil.')
139
+ end
140
+
141
+ if @status.nil?
142
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
143
+ end
144
+
145
+ invalid_properties
146
+ end
147
+
148
+ # Check to see if the all the properties in the model are valid
149
+ # @return true if the model is valid
150
+ def valid?
151
+ warn '[DEPRECATED] the `valid?` method is obsolete'
152
+ return false if @id.nil?
153
+ return false if @label.nil?
154
+ return false if @kind.nil?
155
+ kind_validator = EnumAttributeValidator.new('String', ["read", "layout", "content", "style", "library", "adapter", "motion", "behavior", "polish", "check", "other"])
156
+ return false unless kind_validator.valid?(@kind)
157
+ return false if @status.nil?
158
+ status_validator = EnumAttributeValidator.new('String', ["pending", "in_progress", "done", "failed"])
159
+ return false unless status_validator.valid?(@status)
160
+ true
161
+ end
162
+
163
+ # Custom attribute writer method checking allowed values (enum).
164
+ # @param [Object] kind Object to be assigned
165
+ def kind=(kind)
166
+ validator = EnumAttributeValidator.new('String', ["read", "layout", "content", "style", "library", "adapter", "motion", "behavior", "polish", "check", "other"])
167
+ unless validator.valid?(kind)
168
+ fail ArgumentError, "invalid value for \"kind\", must be one of #{validator.allowable_values}."
169
+ end
170
+ @kind = kind
171
+ end
172
+
173
+ # Custom attribute writer method checking allowed values (enum).
174
+ # @param [Object] status Object to be assigned
175
+ def status=(status)
176
+ validator = EnumAttributeValidator.new('String', ["pending", "in_progress", "done", "failed"])
177
+ unless validator.valid?(status)
178
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
179
+ end
180
+ @status = status
181
+ end
182
+
183
+ # Checks equality by comparing each attribute.
184
+ # @param [Object] Object to be compared
185
+ def ==(o)
186
+ return true if self.equal?(o)
187
+ self.class == o.class &&
188
+ id == o.id &&
189
+ label == o.label &&
190
+ kind == o.kind &&
191
+ status == o.status
192
+ end
193
+
194
+ # @see the `==` method
195
+ # @param [Object] Object to be compared
196
+ def eql?(o)
197
+ self == o
198
+ end
199
+
200
+ # Calculates hash code according to all attributes.
201
+ # @return [Integer] Hash code
202
+ def hash
203
+ [id, label, kind, status].hash
204
+ end
205
+
206
+ # Builds the object from hash
207
+ # @param [Hash] attributes Model attributes in the form of hash
208
+ # @return [Object] Returns the model itself
209
+ def self.build_from_hash(attributes)
210
+ return nil unless attributes.is_a?(Hash)
211
+ attributes = attributes.transform_keys(&:to_sym)
212
+ transformed_hash = {}
213
+ openapi_types.each_pair do |key, type|
214
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
215
+ transformed_hash["#{key}"] = nil
216
+ elsif type =~ /\AArray<(.*)>/i
217
+ # check to ensure the input is an array given that the attribute
218
+ # is documented as an array but the input is not
219
+ if attributes[attribute_map[key]].is_a?(Array)
220
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
221
+ end
222
+ elsif !attributes[attribute_map[key]].nil?
223
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
224
+ end
225
+ end
226
+ new(transformed_hash)
227
+ end
228
+
229
+ # Deserializes the data based on type
230
+ # @param string type Data type
231
+ # @param string value Value to be deserialized
232
+ # @return [Object] Deserialized data
233
+ def self._deserialize(type, value)
234
+ case type.to_sym
235
+ when :Time
236
+ Time.parse(value)
237
+ when :Date
238
+ Date.parse(value)
239
+ when :String
240
+ value.to_s
241
+ when :Integer
242
+ value.to_i
243
+ when :Float
244
+ value.to_f
245
+ when :Boolean
246
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
247
+ true
248
+ else
249
+ false
250
+ end
251
+ when :Object
252
+ # generic object (usually a Hash), return directly
253
+ value
254
+ when /\AArray<(?<inner_type>.+)>\z/
255
+ inner_type = Regexp.last_match[:inner_type]
256
+ value.map { |v| _deserialize(inner_type, v) }
257
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
258
+ k_type = Regexp.last_match[:k_type]
259
+ v_type = Regexp.last_match[:v_type]
260
+ {}.tap do |hash|
261
+ value.each do |k, v|
262
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
263
+ end
264
+ end
265
+ else # model
266
+ # models (e.g. Pet) or oneOf
267
+ klass = ApiSdkRb.const_get(type)
268
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
269
+ end
270
+ end
271
+
272
+ # Returns the string representation of the object
273
+ # @return [String] String presentation of the object
274
+ def to_s
275
+ to_hash.to_s
276
+ end
277
+
278
+ # to_body is an alias to to_hash (backward compatibility)
279
+ # @return [Hash] Returns the object in the form of hash
280
+ def to_body
281
+ to_hash
282
+ end
283
+
284
+ # Returns the object in the form of hash
285
+ # @return [Hash] Returns the object in the form of hash
286
+ def to_hash
287
+ hash = {}
288
+ self.class.attribute_map.each_pair do |attr, param|
289
+ value = self.send(attr)
290
+ if value.nil?
291
+ is_nullable = self.class.openapi_nullable.include?(attr)
292
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
293
+ end
294
+
295
+ hash[param] = _to_hash(value)
296
+ end
297
+ hash
298
+ end
299
+
300
+ # Outputs non-array value in the form of hash
301
+ # For object, use to_hash. Otherwise, just return the value
302
+ # @param [Object] value Any valid value
303
+ # @return [Hash] Returns the value in the form of hash
304
+ def _to_hash(value)
305
+ if value.is_a?(Array)
306
+ value.compact.map { |v| _to_hash(v) }
307
+ elsif value.is_a?(Hash)
308
+ {}.tap do |hash|
309
+ value.each { |k, v| hash[k] = _to_hash(v) }
310
+ end
311
+ elsif value.respond_to? :to_hash
312
+ value.to_hash
313
+ else
314
+ value
315
+ end
316
+ end
317
+
318
+ end
319
+
320
+ end
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module ApiSdkRb
17
- class DeleteManagedUser200Response
17
+ class WorkflowDetailResponse
18
18
  attr_accessor :success
19
19
 
20
20
  attr_accessor :data
@@ -39,7 +39,7 @@ module ApiSdkRb
39
39
  def self.openapi_types
40
40
  {
41
41
  :'success' => :'Boolean',
42
- :'data' => :'ManagedUserRemoval',
42
+ :'data' => :'WorkflowDetail',
43
43
  :'meta' => :'ResponseMeta'
44
44
  }
45
45
  end
@@ -54,13 +54,13 @@ module ApiSdkRb
54
54
  # @param [Hash] attributes Model attributes in the form of hash
55
55
  def initialize(attributes = {})
56
56
  if (!attributes.is_a?(Hash))
57
- fail ArgumentError, "The input argument (attributes) must be a hash in `ApiSdkRb::DeleteManagedUser200Response` initialize method"
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `ApiSdkRb::WorkflowDetailResponse` initialize method"
58
58
  end
59
59
 
60
60
  # check to see if the attribute exists and convert string to symbol for hash key
61
61
  attributes = attributes.each_with_object({}) { |(k, v), h|
62
62
  if (!self.class.attribute_map.key?(k.to_sym))
63
- fail ArgumentError, "`#{k}` is not a valid attribute in `ApiSdkRb::DeleteManagedUser200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ApiSdkRb::WorkflowDetailResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
64
  end
65
65
  h[k.to_sym] = v
66
66
  }
@@ -0,0 +1,42 @@
1
+ =begin
2
+ #Widgetic API Gateway
3
+
4
+ #API documentation for the Widgetic API Gateway
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.9.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module ApiSdkRb
17
+ class WorkflowFailureReason
18
+ TIMEOUT = "timeout".freeze
19
+ WIDGET_ERROR = "widget_error".freeze
20
+ BUILD = "build".freeze
21
+ OTHER = "other".freeze
22
+
23
+ def self.all_vars
24
+ @all_vars ||= [TIMEOUT, WIDGET_ERROR, BUILD, OTHER].freeze
25
+ end
26
+
27
+ # Builds the enum from string
28
+ # @param [String] The enum value in the form of the string
29
+ # @return [String] The enum value
30
+ def self.build_from_hash(value)
31
+ new.build_from_hash(value)
32
+ end
33
+
34
+ # Builds the enum from string
35
+ # @param [String] The enum value in the form of the string
36
+ # @return [String] The enum value
37
+ def build_from_hash(value)
38
+ return value if WorkflowFailureReason.all_vars.include?(value)
39
+ raise "Invalid ENUM value #{value} for class #WorkflowFailureReason"
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,277 @@
1
+ =begin
2
+ #Widgetic API Gateway
3
+
4
+ #API documentation for the Widgetic API Gateway
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.9.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module ApiSdkRb
17
+ class WorkflowFailureReasonCounter
18
+ # The block (a composition) that could not be shown.
19
+ attr_accessor :id
20
+
21
+ attr_accessor :reason
22
+
23
+ # How many tries failed for this reason.
24
+ attr_accessor :total
25
+
26
+ class EnumAttributeValidator
27
+ attr_reader :datatype
28
+ attr_reader :allowable_values
29
+
30
+ def initialize(datatype, allowable_values)
31
+ @allowable_values = allowable_values.map do |value|
32
+ case datatype.to_s
33
+ when /Integer/i
34
+ value.to_i
35
+ when /Float/i
36
+ value.to_f
37
+ else
38
+ value
39
+ end
40
+ end
41
+ end
42
+
43
+ def valid?(value)
44
+ !value || allowable_values.include?(value)
45
+ end
46
+ end
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'id' => :'id',
52
+ :'reason' => :'reason',
53
+ :'total' => :'total'
54
+ }
55
+ end
56
+
57
+ # Returns all the JSON keys this model knows about
58
+ def self.acceptable_attributes
59
+ attribute_map.values
60
+ end
61
+
62
+ # Attribute type mapping.
63
+ def self.openapi_types
64
+ {
65
+ :'id' => :'String',
66
+ :'reason' => :'WorkflowFailureReason',
67
+ :'total' => :'Integer'
68
+ }
69
+ end
70
+
71
+ # List of attributes with nullable: true
72
+ def self.openapi_nullable
73
+ Set.new([
74
+ ])
75
+ end
76
+
77
+ # Initializes the object
78
+ # @param [Hash] attributes Model attributes in the form of hash
79
+ def initialize(attributes = {})
80
+ if (!attributes.is_a?(Hash))
81
+ fail ArgumentError, "The input argument (attributes) must be a hash in `ApiSdkRb::WorkflowFailureReasonCounter` initialize method"
82
+ end
83
+
84
+ # check to see if the attribute exists and convert string to symbol for hash key
85
+ attributes = attributes.each_with_object({}) { |(k, v), h|
86
+ if (!self.class.attribute_map.key?(k.to_sym))
87
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ApiSdkRb::WorkflowFailureReasonCounter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
88
+ end
89
+ h[k.to_sym] = v
90
+ }
91
+
92
+ if attributes.key?(:'id')
93
+ self.id = attributes[:'id']
94
+ else
95
+ self.id = nil
96
+ end
97
+
98
+ if attributes.key?(:'reason')
99
+ self.reason = attributes[:'reason']
100
+ else
101
+ self.reason = nil
102
+ end
103
+
104
+ if attributes.key?(:'total')
105
+ self.total = attributes[:'total']
106
+ else
107
+ self.total = nil
108
+ end
109
+ end
110
+
111
+ # Show invalid properties with the reasons. Usually used together with valid?
112
+ # @return Array for valid properties with the reasons
113
+ def list_invalid_properties
114
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
115
+ invalid_properties = Array.new
116
+ if @id.nil?
117
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
118
+ end
119
+
120
+ if @reason.nil?
121
+ invalid_properties.push('invalid value for "reason", reason cannot be nil.')
122
+ end
123
+
124
+ if @total.nil?
125
+ invalid_properties.push('invalid value for "total", total cannot be nil.')
126
+ end
127
+
128
+ invalid_properties
129
+ end
130
+
131
+ # Check to see if the all the properties in the model are valid
132
+ # @return true if the model is valid
133
+ def valid?
134
+ warn '[DEPRECATED] the `valid?` method is obsolete'
135
+ return false if @id.nil?
136
+ return false if @reason.nil?
137
+ return false if @total.nil?
138
+ true
139
+ end
140
+
141
+ # Checks equality by comparing each attribute.
142
+ # @param [Object] Object to be compared
143
+ def ==(o)
144
+ return true if self.equal?(o)
145
+ self.class == o.class &&
146
+ id == o.id &&
147
+ reason == o.reason &&
148
+ total == o.total
149
+ end
150
+
151
+ # @see the `==` method
152
+ # @param [Object] Object to be compared
153
+ def eql?(o)
154
+ self == o
155
+ end
156
+
157
+ # Calculates hash code according to all attributes.
158
+ # @return [Integer] Hash code
159
+ def hash
160
+ [id, reason, total].hash
161
+ end
162
+
163
+ # Builds the object from hash
164
+ # @param [Hash] attributes Model attributes in the form of hash
165
+ # @return [Object] Returns the model itself
166
+ def self.build_from_hash(attributes)
167
+ return nil unless attributes.is_a?(Hash)
168
+ attributes = attributes.transform_keys(&:to_sym)
169
+ transformed_hash = {}
170
+ openapi_types.each_pair do |key, type|
171
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
172
+ transformed_hash["#{key}"] = nil
173
+ elsif type =~ /\AArray<(.*)>/i
174
+ # check to ensure the input is an array given that the attribute
175
+ # is documented as an array but the input is not
176
+ if attributes[attribute_map[key]].is_a?(Array)
177
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
178
+ end
179
+ elsif !attributes[attribute_map[key]].nil?
180
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
181
+ end
182
+ end
183
+ new(transformed_hash)
184
+ end
185
+
186
+ # Deserializes the data based on type
187
+ # @param string type Data type
188
+ # @param string value Value to be deserialized
189
+ # @return [Object] Deserialized data
190
+ def self._deserialize(type, value)
191
+ case type.to_sym
192
+ when :Time
193
+ Time.parse(value)
194
+ when :Date
195
+ Date.parse(value)
196
+ when :String
197
+ value.to_s
198
+ when :Integer
199
+ value.to_i
200
+ when :Float
201
+ value.to_f
202
+ when :Boolean
203
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
204
+ true
205
+ else
206
+ false
207
+ end
208
+ when :Object
209
+ # generic object (usually a Hash), return directly
210
+ value
211
+ when /\AArray<(?<inner_type>.+)>\z/
212
+ inner_type = Regexp.last_match[:inner_type]
213
+ value.map { |v| _deserialize(inner_type, v) }
214
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
215
+ k_type = Regexp.last_match[:k_type]
216
+ v_type = Regexp.last_match[:v_type]
217
+ {}.tap do |hash|
218
+ value.each do |k, v|
219
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
220
+ end
221
+ end
222
+ else # model
223
+ # models (e.g. Pet) or oneOf
224
+ klass = ApiSdkRb.const_get(type)
225
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
226
+ end
227
+ end
228
+
229
+ # Returns the string representation of the object
230
+ # @return [String] String presentation of the object
231
+ def to_s
232
+ to_hash.to_s
233
+ end
234
+
235
+ # to_body is an alias to to_hash (backward compatibility)
236
+ # @return [Hash] Returns the object in the form of hash
237
+ def to_body
238
+ to_hash
239
+ end
240
+
241
+ # Returns the object in the form of hash
242
+ # @return [Hash] Returns the object in the form of hash
243
+ def to_hash
244
+ hash = {}
245
+ self.class.attribute_map.each_pair do |attr, param|
246
+ value = self.send(attr)
247
+ if value.nil?
248
+ is_nullable = self.class.openapi_nullable.include?(attr)
249
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
250
+ end
251
+
252
+ hash[param] = _to_hash(value)
253
+ end
254
+ hash
255
+ end
256
+
257
+ # Outputs non-array value in the form of hash
258
+ # For object, use to_hash. Otherwise, just return the value
259
+ # @param [Object] value Any valid value
260
+ # @return [Hash] Returns the value in the form of hash
261
+ def _to_hash(value)
262
+ if value.is_a?(Array)
263
+ value.compact.map { |v| _to_hash(v) }
264
+ elsif value.is_a?(Hash)
265
+ {}.tap do |hash|
266
+ value.each { |k, v| hash[k] = _to_hash(v) }
267
+ end
268
+ elsif value.respond_to? :to_hash
269
+ value.to_hash
270
+ else
271
+ value
272
+ end
273
+ end
274
+
275
+ end
276
+
277
+ end