hermoso 0.1.4

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 (142) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +53 -0
  4. data/lib/hermoso/api/account_api.rb +156 -0
  5. data/lib/hermoso/api/analytics_api.rb +400 -0
  6. data/lib/hermoso/api/brands_api.rb +82 -0
  7. data/lib/hermoso/api/campaign_profit_api.rb +103 -0
  8. data/lib/hermoso/api/campaign_results_api.rb +289 -0
  9. data/lib/hermoso/api/channels_api.rb +82 -0
  10. data/lib/hermoso/api/clones_api.rb +93 -0
  11. data/lib/hermoso/api/connect_links_api.rb +228 -0
  12. data/lib/hermoso/api/connect_redirects_api.rb +153 -0
  13. data/lib/hermoso/api/connections_api.rb +151 -0
  14. data/lib/hermoso/api/credits_api.rb +85 -0
  15. data/lib/hermoso/api/edits_api.rb +102 -0
  16. data/lib/hermoso/api/events_api.rb +932 -0
  17. data/lib/hermoso/api/generations_api.rb +173 -0
  18. data/lib/hermoso/api/jobs_api.rb +226 -0
  19. data/lib/hermoso/api/library_api.rb +88 -0
  20. data/lib/hermoso/api/media_api.rb +158 -0
  21. data/lib/hermoso/api/models_api.rb +88 -0
  22. data/lib/hermoso/api/posts_api.rb +377 -0
  23. data/lib/hermoso/api/recasts_api.rb +102 -0
  24. data/lib/hermoso/api/signup_api.rb +164 -0
  25. data/lib/hermoso/api/tag_api.rb +570 -0
  26. data/lib/hermoso/api/tools_api.rb +252 -0
  27. data/lib/hermoso/api_client.rb +441 -0
  28. data/lib/hermoso/api_error.rb +58 -0
  29. data/lib/hermoso/api_model_base.rb +92 -0
  30. data/lib/hermoso/configuration.rb +400 -0
  31. data/lib/hermoso/helpers.rb +116 -0
  32. data/lib/hermoso/models/asset.rb +241 -0
  33. data/lib/hermoso/models/asset_list.rb +203 -0
  34. data/lib/hermoso/models/best_time.rb +250 -0
  35. data/lib/hermoso/models/best_time_slots_inner.rb +205 -0
  36. data/lib/hermoso/models/brand.rb +273 -0
  37. data/lib/hermoso/models/brand_list.rb +203 -0
  38. data/lib/hermoso/models/campaign_profit.rb +261 -0
  39. data/lib/hermoso/models/campaign_results.rb +250 -0
  40. data/lib/hermoso/models/campaign_results_upload.rb +171 -0
  41. data/lib/hermoso/models/campaign_results_upload_rows_inner.rb +259 -0
  42. data/lib/hermoso/models/channel.rb +326 -0
  43. data/lib/hermoso/models/channel_carousel.rb +188 -0
  44. data/lib/hermoso/models/channel_list.rb +203 -0
  45. data/lib/hermoso/models/clone_quote.rb +243 -0
  46. data/lib/hermoso/models/clone_quote_request.rb +227 -0
  47. data/lib/hermoso/models/clone_quote_step.rb +201 -0
  48. data/lib/hermoso/models/connect_link.rb +321 -0
  49. data/lib/hermoso/models/connect_link_account.rb +178 -0
  50. data/lib/hermoso/models/connect_link_create.rb +236 -0
  51. data/lib/hermoso/models/connect_link_error.rb +169 -0
  52. data/lib/hermoso/models/connect_redirects.rb +203 -0
  53. data/lib/hermoso/models/connect_redirects_set.rb +180 -0
  54. data/lib/hermoso/models/connection.rb +250 -0
  55. data/lib/hermoso/models/connection_accounts_inner.rb +178 -0
  56. data/lib/hermoso/models/connection_deleted.rb +228 -0
  57. data/lib/hermoso/models/connection_list.rb +203 -0
  58. data/lib/hermoso/models/contact_email.rb +189 -0
  59. data/lib/hermoso/models/contact_email_resend.rb +161 -0
  60. data/lib/hermoso/models/content_decay.rb +223 -0
  61. data/lib/hermoso/models/content_decay_buckets_inner.rb +187 -0
  62. data/lib/hermoso/models/conversion_destination_create.rb +317 -0
  63. data/lib/hermoso/models/conversion_destination_list.rb +223 -0
  64. data/lib/hermoso/models/conversion_destination_result.rb +221 -0
  65. data/lib/hermoso/models/conversion_event_list.rb +230 -0
  66. data/lib/hermoso/models/conversion_event_update.rb +195 -0
  67. data/lib/hermoso/models/conversion_events_send.rb +236 -0
  68. data/lib/hermoso/models/conversion_events_send_events_inner.rb +314 -0
  69. data/lib/hermoso/models/conversion_insights.rb +265 -0
  70. data/lib/hermoso/models/conversion_send_result.rb +257 -0
  71. data/lib/hermoso/models/conversion_send_result_destinations_inner.rb +286 -0
  72. data/lib/hermoso/models/credits.rb +240 -0
  73. data/lib/hermoso/models/credits_limits.rb +234 -0
  74. data/lib/hermoso/models/credits_limits_brands_inner.rb +218 -0
  75. data/lib/hermoso/models/credits_limits_brands_inner_members_inner.rb +196 -0
  76. data/lib/hermoso/models/deleted.rb +210 -0
  77. data/lib/hermoso/models/edit.rb +278 -0
  78. data/lib/hermoso/models/edit_create.rb +317 -0
  79. data/lib/hermoso/models/edit_preview.rb +199 -0
  80. data/lib/hermoso/models/edit_quote.rb +231 -0
  81. data/lib/hermoso/models/error.rb +198 -0
  82. data/lib/hermoso/models/error_error.rb +335 -0
  83. data/lib/hermoso/models/error_error_unknown_arguments_inner.rb +171 -0
  84. data/lib/hermoso/models/follower_history.rb +239 -0
  85. data/lib/hermoso/models/follower_history_accounts_inner.rb +207 -0
  86. data/lib/hermoso/models/follower_history_accounts_inner_points_inner.rb +178 -0
  87. data/lib/hermoso/models/follower_history_date_range.rb +169 -0
  88. data/lib/hermoso/models/generation_create.rb +435 -0
  89. data/lib/hermoso/models/generation_quote.rb +263 -0
  90. data/lib/hermoso/models/hermoso_tag.rb +230 -0
  91. data/lib/hermoso/models/hermoso_tag_audience_action.rb +325 -0
  92. data/lib/hermoso/models/hermoso_tag_audiences.rb +241 -0
  93. data/lib/hermoso/models/hermoso_tag_events.rb +223 -0
  94. data/lib/hermoso/models/hermoso_tag_events_send.rb +179 -0
  95. data/lib/hermoso/models/hermoso_tag_events_sent.rb +221 -0
  96. data/lib/hermoso/models/hermoso_tag_install.rb +246 -0
  97. data/lib/hermoso/models/hermoso_tag_install_result.rb +255 -0
  98. data/lib/hermoso/models/hermoso_tag_report.rb +261 -0
  99. data/lib/hermoso/models/hermoso_tag_tag.rb +211 -0
  100. data/lib/hermoso/models/hermoso_tag_update.rb +356 -0
  101. data/lib/hermoso/models/inbox_stats.rb +315 -0
  102. data/lib/hermoso/models/job.rb +359 -0
  103. data/lib/hermoso/models/job_cancel.rb +221 -0
  104. data/lib/hermoso/models/job_list.rb +232 -0
  105. data/lib/hermoso/models/media.rb +230 -0
  106. data/lib/hermoso/models/model.rb +327 -0
  107. data/lib/hermoso/models/model_list.rb +203 -0
  108. data/lib/hermoso/models/post.rb +382 -0
  109. data/lib/hermoso/models/post_create.rb +318 -0
  110. data/lib/hermoso/models/post_create_media_inner.rb +104 -0
  111. data/lib/hermoso/models/post_create_media_inner_one_of.rb +201 -0
  112. data/lib/hermoso/models/post_list.rb +221 -0
  113. data/lib/hermoso/models/post_media_inner.rb +169 -0
  114. data/lib/hermoso/models/post_results_inner.rb +205 -0
  115. data/lib/hermoso/models/post_results_inner_first_comment.rb +188 -0
  116. data/lib/hermoso/models/posting_frequency.rb +241 -0
  117. data/lib/hermoso/models/posting_frequency_frequency_inner.rb +205 -0
  118. data/lib/hermoso/models/profit_settings.rb +230 -0
  119. data/lib/hermoso/models/recast.rb +308 -0
  120. data/lib/hermoso/models/recast_create.rb +274 -0
  121. data/lib/hermoso/models/recast_person.rb +182 -0
  122. data/lib/hermoso/models/recast_quote.rb +232 -0
  123. data/lib/hermoso/models/recast_step.rb +201 -0
  124. data/lib/hermoso/models/recast_subject.rb +170 -0
  125. data/lib/hermoso/models/recast_voice.rb +178 -0
  126. data/lib/hermoso/models/recast_window.rb +179 -0
  127. data/lib/hermoso/models/signup.rb +329 -0
  128. data/lib/hermoso/models/signup_claim.rb +178 -0
  129. data/lib/hermoso/models/signup_create.rb +247 -0
  130. data/lib/hermoso/models/tool.rb +360 -0
  131. data/lib/hermoso/models/tool_invoke.rb +169 -0
  132. data/lib/hermoso/models/tool_job.rb +262 -0
  133. data/lib/hermoso/models/tool_list.rb +273 -0
  134. data/lib/hermoso/models/tool_list_areas_inner.rb +219 -0
  135. data/lib/hermoso/models/tool_list_search.rb +181 -0
  136. data/lib/hermoso/models/tool_result.rb +245 -0
  137. data/lib/hermoso/models/tool_result_images_inner.rb +170 -0
  138. data/lib/hermoso/models/warning.rb +244 -0
  139. data/lib/hermoso/spec.rb +8 -0
  140. data/lib/hermoso/version.rb +15 -0
  141. data/lib/hermoso.rb +174 -0
  142. metadata +237 -0
@@ -0,0 +1,169 @@
1
+ =begin
2
+ #Hermoso API
3
+
4
+ #The Hermoso public API. Guide: https://hermoso.ai/docs/api/ · OpenAPI: https://app.hermoso.ai/openapi.json
5
+
6
+ The version of the OpenAPI document: 2026-08-26
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.27.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Hermoso
17
+ class ToolInvoke < ApiModelBase
18
+ attr_accessor :method
19
+
20
+ attr_accessor :path
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'method' => :'method',
26
+ :'path' => :'path'
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
+ :'method' => :'String',
44
+ :'path' => :'String'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Returns attribute type mapping
55
+ def self.acceptable_openapi_types
56
+ openapi_types
57
+ end
58
+
59
+ # Returns the nullable attributes
60
+ def self.acceptable_openapi_nullable
61
+ openapi_nullable
62
+ end
63
+
64
+ # Initializes the object
65
+ # @param [Hash] attributes Model attributes in the form of hash
66
+ def initialize(attributes = {})
67
+ if (!attributes.is_a?(Hash))
68
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hermoso::ToolInvoke` initialize method"
69
+ end
70
+
71
+ # check to see if the attribute exists and convert string to symbol for hash key
72
+ acceptable_attribute_map = self.class.acceptable_attribute_map
73
+ attributes = attributes.each_with_object({}) { |(k, v), h|
74
+ if (!acceptable_attribute_map.key?(k.to_sym))
75
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hermoso::ToolInvoke`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
76
+ end
77
+ h[k.to_sym] = v
78
+ }
79
+
80
+ if attributes.key?(:'method')
81
+ self.method = attributes[:'method']
82
+ end
83
+
84
+ if attributes.key?(:'path')
85
+ self.path = attributes[:'path']
86
+ end
87
+ end
88
+
89
+ # Show invalid properties with the reasons. Usually used together with valid?
90
+ # @return Array for valid properties with the reasons
91
+ def list_invalid_properties
92
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
93
+ invalid_properties = Array.new
94
+ invalid_properties
95
+ end
96
+
97
+ # Check to see if the all the properties in the model are valid
98
+ # @return true if the model is valid
99
+ def valid?
100
+ warn '[DEPRECATED] the `valid?` method is obsolete'
101
+ true
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ method == o.method &&
110
+ path == o.path
111
+ end
112
+
113
+ # @see the `==` method
114
+ # @param [Object] Object to be compared
115
+ def eql?(o)
116
+ self == o
117
+ end
118
+
119
+ # Calculates hash code according to all attributes.
120
+ # @return [Integer] Hash code
121
+ def hash
122
+ [method, path].hash
123
+ end
124
+
125
+ # Builds the object from hash
126
+ # @param [Hash] attributes Model attributes in the form of hash
127
+ # @return [Object] Returns the model itself
128
+ def self.build_from_hash(attributes)
129
+ return nil unless attributes.is_a?(Hash)
130
+ attributes = attributes.transform_keys(&:to_sym)
131
+ # include attributes inherited from allOf parents (the nearest declaration wins)
132
+ map = acceptable_attribute_map
133
+ transformed_hash = {}
134
+ acceptable_openapi_types.each_pair do |key, type|
135
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
136
+ transformed_hash["#{key}"] = nil
137
+ elsif type =~ /\AArray<(.*)>/i
138
+ # check to ensure the input is an array given that the attribute
139
+ # is documented as an array but the input is not
140
+ if attributes[map[key]].is_a?(Array)
141
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
142
+ end
143
+ elsif !attributes[map[key]].nil?
144
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
145
+ end
146
+ end
147
+ new(transformed_hash)
148
+ end
149
+
150
+ # Returns the object in the form of hash
151
+ # @return [Hash] Returns the object in the form of hash
152
+ def to_hash
153
+ hash = {}
154
+ # include attributes inherited from allOf parents (the nearest declaration wins)
155
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
156
+ value = self.send(attr)
157
+ if value.nil?
158
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
159
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
160
+ end
161
+
162
+ hash[param] = _to_hash(value)
163
+ end
164
+ hash
165
+ end
166
+
167
+ end
168
+
169
+ end
@@ -0,0 +1,262 @@
1
+ =begin
2
+ #Hermoso API
3
+
4
+ #The Hermoso public API. Guide: https://hermoso.ai/docs/api/ · OpenAPI: https://app.hermoso.ai/openapi.json
5
+
6
+ The version of the OpenAPI document: 2026-08-26
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.27.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Hermoso
17
+ # A handle to a render that is queued or still running, answered with HTTP 202 when `wait` was sent.
18
+ class ToolJob < ApiModelBase
19
+ attr_accessor :object
20
+
21
+ # The tool that was called.
22
+ attr_accessor :tool
23
+
24
+ attr_accessor :job_id
25
+
26
+ # queued or running at the moment of the reply. This enum MAY GROW.
27
+ attr_accessor :status
28
+
29
+ # The path to poll: /v1/jobs/{id}. Also sent as the `Location` header.
30
+ attr_accessor :poll
31
+
32
+ # The same, as an absolute URL.
33
+ attr_accessor :poll_url
34
+
35
+ # A sensible gap between polls. Also sent as `Retry-After`.
36
+ attr_accessor :retry_after_seconds
37
+
38
+ # The tool’s own sentence about the queued render.
39
+ attr_accessor :text
40
+
41
+ class EnumAttributeValidator
42
+ attr_reader :datatype
43
+ attr_reader :allowable_values
44
+
45
+ def initialize(datatype, allowable_values)
46
+ @allowable_values = allowable_values.map do |value|
47
+ case datatype.to_s
48
+ when /Integer/i
49
+ value.to_i
50
+ when /Float/i
51
+ value.to_f
52
+ else
53
+ value
54
+ end
55
+ end
56
+ end
57
+
58
+ def valid?(value)
59
+ !value || allowable_values.include?(value)
60
+ end
61
+ end
62
+
63
+ # Attribute mapping from ruby-style variable name to JSON key.
64
+ def self.attribute_map
65
+ {
66
+ :'object' => :'object',
67
+ :'tool' => :'tool',
68
+ :'job_id' => :'job_id',
69
+ :'status' => :'status',
70
+ :'poll' => :'poll',
71
+ :'poll_url' => :'poll_url',
72
+ :'retry_after_seconds' => :'retry_after_seconds',
73
+ :'text' => :'text'
74
+ }
75
+ end
76
+
77
+ # Returns attribute mapping this model knows about
78
+ def self.acceptable_attribute_map
79
+ attribute_map
80
+ end
81
+
82
+ # Returns all the JSON keys this model knows about
83
+ def self.acceptable_attributes
84
+ acceptable_attribute_map.values
85
+ end
86
+
87
+ # Attribute type mapping.
88
+ def self.openapi_types
89
+ {
90
+ :'object' => :'String',
91
+ :'tool' => :'String',
92
+ :'job_id' => :'String',
93
+ :'status' => :'String',
94
+ :'poll' => :'String',
95
+ :'poll_url' => :'String',
96
+ :'retry_after_seconds' => :'Integer',
97
+ :'text' => :'String'
98
+ }
99
+ end
100
+
101
+ # List of attributes with nullable: true
102
+ def self.openapi_nullable
103
+ Set.new([
104
+ ])
105
+ end
106
+
107
+ # Returns attribute type mapping
108
+ def self.acceptable_openapi_types
109
+ openapi_types
110
+ end
111
+
112
+ # Returns the nullable attributes
113
+ def self.acceptable_openapi_nullable
114
+ openapi_nullable
115
+ end
116
+
117
+ # Initializes the object
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ def initialize(attributes = {})
120
+ if (!attributes.is_a?(Hash))
121
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hermoso::ToolJob` initialize method"
122
+ end
123
+
124
+ # check to see if the attribute exists and convert string to symbol for hash key
125
+ acceptable_attribute_map = self.class.acceptable_attribute_map
126
+ attributes = attributes.each_with_object({}) { |(k, v), h|
127
+ if (!acceptable_attribute_map.key?(k.to_sym))
128
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hermoso::ToolJob`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
129
+ end
130
+ h[k.to_sym] = v
131
+ }
132
+
133
+ if attributes.key?(:'object')
134
+ self.object = attributes[:'object']
135
+ end
136
+
137
+ if attributes.key?(:'tool')
138
+ self.tool = attributes[:'tool']
139
+ end
140
+
141
+ if attributes.key?(:'job_id')
142
+ self.job_id = attributes[:'job_id']
143
+ end
144
+
145
+ if attributes.key?(:'status')
146
+ self.status = attributes[:'status']
147
+ end
148
+
149
+ if attributes.key?(:'poll')
150
+ self.poll = attributes[:'poll']
151
+ end
152
+
153
+ if attributes.key?(:'poll_url')
154
+ self.poll_url = attributes[:'poll_url']
155
+ end
156
+
157
+ if attributes.key?(:'retry_after_seconds')
158
+ self.retry_after_seconds = attributes[:'retry_after_seconds']
159
+ end
160
+
161
+ if attributes.key?(:'text')
162
+ self.text = attributes[:'text']
163
+ end
164
+ end
165
+
166
+ # Show invalid properties with the reasons. Usually used together with valid?
167
+ # @return Array for valid properties with the reasons
168
+ def list_invalid_properties
169
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
170
+ invalid_properties = Array.new
171
+ invalid_properties
172
+ end
173
+
174
+ # Check to see if the all the properties in the model are valid
175
+ # @return true if the model is valid
176
+ def valid?
177
+ warn '[DEPRECATED] the `valid?` method is obsolete'
178
+ object_validator = EnumAttributeValidator.new('String', ["tool_job", "unknown_default_open_api"])
179
+ return false unless object_validator.valid?(@object)
180
+ true
181
+ end
182
+
183
+ # Custom attribute writer method checking allowed values (enum).
184
+ # @param [Object] object Object to be assigned
185
+ def object=(object)
186
+ validator = EnumAttributeValidator.new('String', ["tool_job", "unknown_default_open_api"])
187
+ object = 'unknown_default_open_api' unless validator.valid?(object)
188
+ @object = object
189
+ end
190
+
191
+ # Checks equality by comparing each attribute.
192
+ # @param [Object] Object to be compared
193
+ def ==(o)
194
+ return true if self.equal?(o)
195
+ self.class == o.class &&
196
+ object == o.object &&
197
+ tool == o.tool &&
198
+ job_id == o.job_id &&
199
+ status == o.status &&
200
+ poll == o.poll &&
201
+ poll_url == o.poll_url &&
202
+ retry_after_seconds == o.retry_after_seconds &&
203
+ text == o.text
204
+ end
205
+
206
+ # @see the `==` method
207
+ # @param [Object] Object to be compared
208
+ def eql?(o)
209
+ self == o
210
+ end
211
+
212
+ # Calculates hash code according to all attributes.
213
+ # @return [Integer] Hash code
214
+ def hash
215
+ [object, tool, job_id, status, poll, poll_url, retry_after_seconds, text].hash
216
+ end
217
+
218
+ # Builds the object from hash
219
+ # @param [Hash] attributes Model attributes in the form of hash
220
+ # @return [Object] Returns the model itself
221
+ def self.build_from_hash(attributes)
222
+ return nil unless attributes.is_a?(Hash)
223
+ attributes = attributes.transform_keys(&:to_sym)
224
+ # include attributes inherited from allOf parents (the nearest declaration wins)
225
+ map = acceptable_attribute_map
226
+ transformed_hash = {}
227
+ acceptable_openapi_types.each_pair do |key, type|
228
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
229
+ transformed_hash["#{key}"] = nil
230
+ elsif type =~ /\AArray<(.*)>/i
231
+ # check to ensure the input is an array given that the attribute
232
+ # is documented as an array but the input is not
233
+ if attributes[map[key]].is_a?(Array)
234
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
235
+ end
236
+ elsif !attributes[map[key]].nil?
237
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
238
+ end
239
+ end
240
+ new(transformed_hash)
241
+ end
242
+
243
+ # Returns the object in the form of hash
244
+ # @return [Hash] Returns the object in the form of hash
245
+ def to_hash
246
+ hash = {}
247
+ # include attributes inherited from allOf parents (the nearest declaration wins)
248
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
249
+ value = self.send(attr)
250
+ if value.nil?
251
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
252
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
253
+ end
254
+
255
+ hash[param] = _to_hash(value)
256
+ end
257
+ hash
258
+ end
259
+
260
+ end
261
+
262
+ end
@@ -0,0 +1,273 @@
1
+ =begin
2
+ #Hermoso API
3
+
4
+ #The Hermoso public API. Guide: https://hermoso.ai/docs/api/ · OpenAPI: https://app.hermoso.ai/openapi.json
5
+
6
+ The version of the OpenAPI document: 2026-08-26
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.27.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Hermoso
17
+ class ToolList < ApiModelBase
18
+ attr_accessor :object
19
+
20
+ # Every area holding at least one tool available to this workspace, so one call shows the whole map before you page through it.
21
+ attr_accessor :areas
22
+
23
+ attr_accessor :data
24
+
25
+ # Tools matching this filter, across all pages.
26
+ attr_accessor :total
27
+
28
+ attr_accessor :has_more
29
+
30
+ # Pass it back as `starting_after`.
31
+ attr_accessor :next_cursor
32
+
33
+ attr_accessor :limit
34
+
35
+ attr_accessor :search
36
+
37
+ attr_accessor :warnings
38
+
39
+ class EnumAttributeValidator
40
+ attr_reader :datatype
41
+ attr_reader :allowable_values
42
+
43
+ def initialize(datatype, allowable_values)
44
+ @allowable_values = allowable_values.map do |value|
45
+ case datatype.to_s
46
+ when /Integer/i
47
+ value.to_i
48
+ when /Float/i
49
+ value.to_f
50
+ else
51
+ value
52
+ end
53
+ end
54
+ end
55
+
56
+ def valid?(value)
57
+ !value || allowable_values.include?(value)
58
+ end
59
+ end
60
+
61
+ # Attribute mapping from ruby-style variable name to JSON key.
62
+ def self.attribute_map
63
+ {
64
+ :'object' => :'object',
65
+ :'areas' => :'areas',
66
+ :'data' => :'data',
67
+ :'total' => :'total',
68
+ :'has_more' => :'has_more',
69
+ :'next_cursor' => :'next_cursor',
70
+ :'limit' => :'limit',
71
+ :'search' => :'search',
72
+ :'warnings' => :'warnings'
73
+ }
74
+ end
75
+
76
+ # Returns attribute mapping this model knows about
77
+ def self.acceptable_attribute_map
78
+ attribute_map
79
+ end
80
+
81
+ # Returns all the JSON keys this model knows about
82
+ def self.acceptable_attributes
83
+ acceptable_attribute_map.values
84
+ end
85
+
86
+ # Attribute type mapping.
87
+ def self.openapi_types
88
+ {
89
+ :'object' => :'String',
90
+ :'areas' => :'Array<ToolListAreasInner>',
91
+ :'data' => :'Array<Tool>',
92
+ :'total' => :'Integer',
93
+ :'has_more' => :'Boolean',
94
+ :'next_cursor' => :'String',
95
+ :'limit' => :'Integer',
96
+ :'search' => :'ToolListSearch',
97
+ :'warnings' => :'Array<Warning>'
98
+ }
99
+ end
100
+
101
+ # List of attributes with nullable: true
102
+ def self.openapi_nullable
103
+ Set.new([
104
+ ])
105
+ end
106
+
107
+ # Returns attribute type mapping
108
+ def self.acceptable_openapi_types
109
+ openapi_types
110
+ end
111
+
112
+ # Returns the nullable attributes
113
+ def self.acceptable_openapi_nullable
114
+ openapi_nullable
115
+ end
116
+
117
+ # Initializes the object
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ def initialize(attributes = {})
120
+ if (!attributes.is_a?(Hash))
121
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hermoso::ToolList` initialize method"
122
+ end
123
+
124
+ # check to see if the attribute exists and convert string to symbol for hash key
125
+ acceptable_attribute_map = self.class.acceptable_attribute_map
126
+ attributes = attributes.each_with_object({}) { |(k, v), h|
127
+ if (!acceptable_attribute_map.key?(k.to_sym))
128
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hermoso::ToolList`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
129
+ end
130
+ h[k.to_sym] = v
131
+ }
132
+
133
+ if attributes.key?(:'object')
134
+ self.object = attributes[:'object']
135
+ end
136
+
137
+ if attributes.key?(:'areas')
138
+ if (value = attributes[:'areas']).is_a?(Array)
139
+ self.areas = value
140
+ end
141
+ end
142
+
143
+ if attributes.key?(:'data')
144
+ if (value = attributes[:'data']).is_a?(Array)
145
+ self.data = value
146
+ end
147
+ end
148
+
149
+ if attributes.key?(:'total')
150
+ self.total = attributes[:'total']
151
+ end
152
+
153
+ if attributes.key?(:'has_more')
154
+ self.has_more = attributes[:'has_more']
155
+ end
156
+
157
+ if attributes.key?(:'next_cursor')
158
+ self.next_cursor = attributes[:'next_cursor']
159
+ end
160
+
161
+ if attributes.key?(:'limit')
162
+ self.limit = attributes[:'limit']
163
+ end
164
+
165
+ if attributes.key?(:'search')
166
+ self.search = attributes[:'search']
167
+ end
168
+
169
+ if attributes.key?(:'warnings')
170
+ if (value = attributes[:'warnings']).is_a?(Array)
171
+ self.warnings = value
172
+ end
173
+ end
174
+ end
175
+
176
+ # Show invalid properties with the reasons. Usually used together with valid?
177
+ # @return Array for valid properties with the reasons
178
+ def list_invalid_properties
179
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
180
+ invalid_properties = Array.new
181
+ invalid_properties
182
+ end
183
+
184
+ # Check to see if the all the properties in the model are valid
185
+ # @return true if the model is valid
186
+ def valid?
187
+ warn '[DEPRECATED] the `valid?` method is obsolete'
188
+ object_validator = EnumAttributeValidator.new('String', ["list", "unknown_default_open_api"])
189
+ return false unless object_validator.valid?(@object)
190
+ true
191
+ end
192
+
193
+ # Custom attribute writer method checking allowed values (enum).
194
+ # @param [Object] object Object to be assigned
195
+ def object=(object)
196
+ validator = EnumAttributeValidator.new('String', ["list", "unknown_default_open_api"])
197
+ object = 'unknown_default_open_api' unless validator.valid?(object)
198
+ @object = object
199
+ end
200
+
201
+ # Checks equality by comparing each attribute.
202
+ # @param [Object] Object to be compared
203
+ def ==(o)
204
+ return true if self.equal?(o)
205
+ self.class == o.class &&
206
+ object == o.object &&
207
+ areas == o.areas &&
208
+ data == o.data &&
209
+ total == o.total &&
210
+ has_more == o.has_more &&
211
+ next_cursor == o.next_cursor &&
212
+ limit == o.limit &&
213
+ search == o.search &&
214
+ warnings == o.warnings
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
+ [object, areas, data, total, has_more, next_cursor, limit, search, warnings].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
+ # include attributes inherited from allOf parents (the nearest declaration wins)
236
+ map = acceptable_attribute_map
237
+ transformed_hash = {}
238
+ acceptable_openapi_types.each_pair do |key, type|
239
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
240
+ transformed_hash["#{key}"] = nil
241
+ elsif type =~ /\AArray<(.*)>/i
242
+ # check to ensure the input is an array given that the attribute
243
+ # is documented as an array but the input is not
244
+ if attributes[map[key]].is_a?(Array)
245
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
246
+ end
247
+ elsif !attributes[map[key]].nil?
248
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
249
+ end
250
+ end
251
+ new(transformed_hash)
252
+ end
253
+
254
+ # Returns the object in the form of hash
255
+ # @return [Hash] Returns the object in the form of hash
256
+ def to_hash
257
+ hash = {}
258
+ # include attributes inherited from allOf parents (the nearest declaration wins)
259
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
260
+ value = self.send(attr)
261
+ if value.nil?
262
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
263
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
264
+ end
265
+
266
+ hash[param] = _to_hash(value)
267
+ end
268
+ hash
269
+ end
270
+
271
+ end
272
+
273
+ end