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,247 @@
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 SignupCreate < ApiModelBase
18
+ # A PAID plan id — see GET /v1/signup/plans-equivalent on hermoso.ai/pricing, currently starter, pro or studio. The free plan is refused here by name: this path provisions an account only against a completed payment.
19
+ attr_accessor :plan
20
+
21
+ # Billing cadence. Defaults to `mo`.
22
+ attr_accessor :period
23
+
24
+ # REQUIRED: a real mailbox for the human this account belongs to. A verification link is emailed there; the account works before it is clicked, and verifying only decides whether we may mail the address (receipts, low-credit alerts, replies to bug reports). It is NEVER the account identity: it cannot sign in to this account, and it can never link or merge this account with one that already uses the address. Hermoso synthetic addresses are refused (400 `email_invalid`).
25
+ attr_accessor :email
26
+
27
+ class EnumAttributeValidator
28
+ attr_reader :datatype
29
+ attr_reader :allowable_values
30
+
31
+ def initialize(datatype, allowable_values)
32
+ @allowable_values = allowable_values.map do |value|
33
+ case datatype.to_s
34
+ when /Integer/i
35
+ value.to_i
36
+ when /Float/i
37
+ value.to_f
38
+ else
39
+ value
40
+ end
41
+ end
42
+ end
43
+
44
+ def valid?(value)
45
+ !value || allowable_values.include?(value)
46
+ end
47
+ end
48
+
49
+ # Attribute mapping from ruby-style variable name to JSON key.
50
+ def self.attribute_map
51
+ {
52
+ :'plan' => :'plan',
53
+ :'period' => :'period',
54
+ :'email' => :'email'
55
+ }
56
+ end
57
+
58
+ # Returns attribute mapping this model knows about
59
+ def self.acceptable_attribute_map
60
+ attribute_map
61
+ end
62
+
63
+ # Returns all the JSON keys this model knows about
64
+ def self.acceptable_attributes
65
+ acceptable_attribute_map.values
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.openapi_types
70
+ {
71
+ :'plan' => :'String',
72
+ :'period' => :'String',
73
+ :'email' => :'String'
74
+ }
75
+ end
76
+
77
+ # List of attributes with nullable: true
78
+ def self.openapi_nullable
79
+ Set.new([
80
+ ])
81
+ end
82
+
83
+ # Returns attribute type mapping
84
+ def self.acceptable_openapi_types
85
+ openapi_types
86
+ end
87
+
88
+ # Returns the nullable attributes
89
+ def self.acceptable_openapi_nullable
90
+ openapi_nullable
91
+ end
92
+
93
+ # Initializes the object
94
+ # @param [Hash] attributes Model attributes in the form of hash
95
+ def initialize(attributes = {})
96
+ if (!attributes.is_a?(Hash))
97
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hermoso::SignupCreate` initialize method"
98
+ end
99
+
100
+ # check to see if the attribute exists and convert string to symbol for hash key
101
+ acceptable_attribute_map = self.class.acceptable_attribute_map
102
+ attributes = attributes.each_with_object({}) { |(k, v), h|
103
+ if (!acceptable_attribute_map.key?(k.to_sym))
104
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hermoso::SignupCreate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
105
+ end
106
+ h[k.to_sym] = v
107
+ }
108
+
109
+ if attributes.key?(:'plan')
110
+ self.plan = attributes[:'plan']
111
+ else
112
+ self.plan = nil
113
+ end
114
+
115
+ if attributes.key?(:'period')
116
+ self.period = attributes[:'period']
117
+ end
118
+
119
+ if attributes.key?(:'email')
120
+ self.email = attributes[:'email']
121
+ else
122
+ self.email = nil
123
+ end
124
+ end
125
+
126
+ # Show invalid properties with the reasons. Usually used together with valid?
127
+ # @return Array for valid properties with the reasons
128
+ def list_invalid_properties
129
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
130
+ invalid_properties = Array.new
131
+ if @plan.nil?
132
+ invalid_properties.push('invalid value for "plan", plan cannot be nil.')
133
+ end
134
+
135
+ if @email.nil?
136
+ invalid_properties.push('invalid value for "email", email cannot be nil.')
137
+ end
138
+
139
+ invalid_properties
140
+ end
141
+
142
+ # Check to see if the all the properties in the model are valid
143
+ # @return true if the model is valid
144
+ def valid?
145
+ warn '[DEPRECATED] the `valid?` method is obsolete'
146
+ return false if @plan.nil?
147
+ period_validator = EnumAttributeValidator.new('String', ["mo", "yr", "unknown_default_open_api"])
148
+ return false unless period_validator.valid?(@period)
149
+ return false if @email.nil?
150
+ true
151
+ end
152
+
153
+ # Custom attribute writer method with validation
154
+ # @param [Object] plan Value to be assigned
155
+ def plan=(plan)
156
+ if plan.nil?
157
+ fail ArgumentError, 'plan cannot be nil'
158
+ end
159
+
160
+ @plan = plan
161
+ end
162
+
163
+ # Custom attribute writer method checking allowed values (enum).
164
+ # @param [Object] period Object to be assigned
165
+ def period=(period)
166
+ validator = EnumAttributeValidator.new('String', ["mo", "yr", "unknown_default_open_api"])
167
+ period = 'unknown_default_open_api' unless validator.valid?(period)
168
+ @period = period
169
+ end
170
+
171
+ # Custom attribute writer method with validation
172
+ # @param [Object] email Value to be assigned
173
+ def email=(email)
174
+ if email.nil?
175
+ fail ArgumentError, 'email cannot be nil'
176
+ end
177
+
178
+ @email = email
179
+ end
180
+
181
+ # Checks equality by comparing each attribute.
182
+ # @param [Object] Object to be compared
183
+ def ==(o)
184
+ return true if self.equal?(o)
185
+ self.class == o.class &&
186
+ plan == o.plan &&
187
+ period == o.period &&
188
+ email == o.email
189
+ end
190
+
191
+ # @see the `==` method
192
+ # @param [Object] Object to be compared
193
+ def eql?(o)
194
+ self == o
195
+ end
196
+
197
+ # Calculates hash code according to all attributes.
198
+ # @return [Integer] Hash code
199
+ def hash
200
+ [plan, period, email].hash
201
+ end
202
+
203
+ # Builds the object from hash
204
+ # @param [Hash] attributes Model attributes in the form of hash
205
+ # @return [Object] Returns the model itself
206
+ def self.build_from_hash(attributes)
207
+ return nil unless attributes.is_a?(Hash)
208
+ attributes = attributes.transform_keys(&:to_sym)
209
+ # include attributes inherited from allOf parents (the nearest declaration wins)
210
+ map = acceptable_attribute_map
211
+ transformed_hash = {}
212
+ acceptable_openapi_types.each_pair do |key, type|
213
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
214
+ transformed_hash["#{key}"] = nil
215
+ elsif type =~ /\AArray<(.*)>/i
216
+ # check to ensure the input is an array given that the attribute
217
+ # is documented as an array but the input is not
218
+ if attributes[map[key]].is_a?(Array)
219
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
220
+ end
221
+ elsif !attributes[map[key]].nil?
222
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
223
+ end
224
+ end
225
+ new(transformed_hash)
226
+ end
227
+
228
+ # Returns the object in the form of hash
229
+ # @return [Hash] Returns the object in the form of hash
230
+ def to_hash
231
+ hash = {}
232
+ # include attributes inherited from allOf parents (the nearest declaration wins)
233
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
234
+ value = self.send(attr)
235
+ if value.nil?
236
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
237
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
238
+ end
239
+
240
+ hash[param] = _to_hash(value)
241
+ end
242
+ hash
243
+ end
244
+
245
+ end
246
+
247
+ end
@@ -0,0 +1,360 @@
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 Tool < ApiModelBase
18
+ attr_accessor :object
19
+
20
+ # Call it at POST /v1/tools/{name}.
21
+ attr_accessor :name
22
+
23
+ attr_accessor :title
24
+
25
+ # Which area of the product it belongs to. THIS SET MAY GROW — tolerate a member you have not seen.
26
+ attr_accessor :area
27
+
28
+ # What it does, written for whoever is choosing: a person reading the index or a model reading the roster.
29
+ attr_accessor :description
30
+
31
+ # It reads and changes nothing. Read-only tools are metered on the READ rate-limit budget.
32
+ attr_accessor :read_only
33
+
34
+ # It can remove or overwrite something. Destructive tools carry their own confirmation arguments — read the schema.
35
+ attr_accessor :destructive
36
+
37
+ # Calling it twice with the same arguments has the same effect as calling it once. Independent of `Idempotency-Key`, which protects a retry regardless.
38
+ attr_accessor :idempotent
39
+
40
+ # The third-party account this tool needs linked, or null when it needs none. Linking is a browser flow: an OAuth consent screen cannot be completed headlessly.
41
+ attr_accessor :requires_connector
42
+
43
+ # Whether that connector is linked in this workspace. NULL means the connections could not be read, which is NOT the same as \"no\" — never render it as a refusal.
44
+ attr_accessor :connector_connected
45
+
46
+ # Which rate-limit budget a call to it spends.
47
+ attr_accessor :rate_class
48
+
49
+ # What one call spends, in credits, before you run it: \"free\", a range by model for a raw generation tool (\"0.4-32.5 credits by model and size\"), \"from N credits\" for one that scales with length or work, or \"credits vary: get_cost prices it\". Every number is read live from the model catalog; send `get_cost: true` to a paying tool for the exact quote. NULL means it was not priced on this read.
50
+ attr_accessor :price
51
+
52
+ # Only with `include=all`: whether this workspace can call it right now (false on a tool that needs something first, see `unavailable_reason`). Absent from the default index, every row of which is callable.
53
+ attr_accessor :available
54
+
55
+ # Only with `include=all`. `not_connected` (link `requires_connector`, at `connect_url`), `not_offered` (the platform is not offered on this server yet, so there is nothing to link) or `shopify_store` (it needs a Shopify store on the account). Null when `available` is true. THIS SET MAY GROW.
56
+ attr_accessor :unavailable_reason
57
+
58
+ # Only with `include=all`, and only on a `not_connected` row: the link a person opens to connect `requires_connector` to this brand. To have your own customer connect their account from your app, use POST /v1/connect-links instead.
59
+ attr_accessor :connect_url
60
+
61
+ attr_accessor :invoke
62
+
63
+ # JSON Schema for the request body of POST /v1/tools/{name}. The body IS the argument object.
64
+ attr_accessor :input_schema
65
+
66
+ class EnumAttributeValidator
67
+ attr_reader :datatype
68
+ attr_reader :allowable_values
69
+
70
+ def initialize(datatype, allowable_values)
71
+ @allowable_values = allowable_values.map do |value|
72
+ case datatype.to_s
73
+ when /Integer/i
74
+ value.to_i
75
+ when /Float/i
76
+ value.to_f
77
+ else
78
+ value
79
+ end
80
+ end
81
+ end
82
+
83
+ def valid?(value)
84
+ !value || allowable_values.include?(value)
85
+ end
86
+ end
87
+
88
+ # Attribute mapping from ruby-style variable name to JSON key.
89
+ def self.attribute_map
90
+ {
91
+ :'object' => :'object',
92
+ :'name' => :'name',
93
+ :'title' => :'title',
94
+ :'area' => :'area',
95
+ :'description' => :'description',
96
+ :'read_only' => :'read_only',
97
+ :'destructive' => :'destructive',
98
+ :'idempotent' => :'idempotent',
99
+ :'requires_connector' => :'requires_connector',
100
+ :'connector_connected' => :'connector_connected',
101
+ :'rate_class' => :'rate_class',
102
+ :'price' => :'price',
103
+ :'available' => :'available',
104
+ :'unavailable_reason' => :'unavailable_reason',
105
+ :'connect_url' => :'connect_url',
106
+ :'invoke' => :'invoke',
107
+ :'input_schema' => :'input_schema'
108
+ }
109
+ end
110
+
111
+ # Returns attribute mapping this model knows about
112
+ def self.acceptable_attribute_map
113
+ attribute_map
114
+ end
115
+
116
+ # Returns all the JSON keys this model knows about
117
+ def self.acceptable_attributes
118
+ acceptable_attribute_map.values
119
+ end
120
+
121
+ # Attribute type mapping.
122
+ def self.openapi_types
123
+ {
124
+ :'object' => :'String',
125
+ :'name' => :'String',
126
+ :'title' => :'String',
127
+ :'area' => :'String',
128
+ :'description' => :'String',
129
+ :'read_only' => :'Boolean',
130
+ :'destructive' => :'Boolean',
131
+ :'idempotent' => :'Boolean',
132
+ :'requires_connector' => :'String',
133
+ :'connector_connected' => :'Boolean',
134
+ :'rate_class' => :'String',
135
+ :'price' => :'String',
136
+ :'available' => :'Boolean',
137
+ :'unavailable_reason' => :'String',
138
+ :'connect_url' => :'String',
139
+ :'invoke' => :'ToolInvoke',
140
+ :'input_schema' => :'Object'
141
+ }
142
+ end
143
+
144
+ # List of attributes with nullable: true
145
+ def self.openapi_nullable
146
+ Set.new([
147
+ ])
148
+ end
149
+
150
+ # Returns attribute type mapping
151
+ def self.acceptable_openapi_types
152
+ openapi_types
153
+ end
154
+
155
+ # Returns the nullable attributes
156
+ def self.acceptable_openapi_nullable
157
+ openapi_nullable
158
+ end
159
+
160
+ # Initializes the object
161
+ # @param [Hash] attributes Model attributes in the form of hash
162
+ def initialize(attributes = {})
163
+ if (!attributes.is_a?(Hash))
164
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hermoso::Tool` initialize method"
165
+ end
166
+
167
+ # check to see if the attribute exists and convert string to symbol for hash key
168
+ acceptable_attribute_map = self.class.acceptable_attribute_map
169
+ attributes = attributes.each_with_object({}) { |(k, v), h|
170
+ if (!acceptable_attribute_map.key?(k.to_sym))
171
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hermoso::Tool`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
172
+ end
173
+ h[k.to_sym] = v
174
+ }
175
+
176
+ if attributes.key?(:'object')
177
+ self.object = attributes[:'object']
178
+ end
179
+
180
+ if attributes.key?(:'name')
181
+ self.name = attributes[:'name']
182
+ end
183
+
184
+ if attributes.key?(:'title')
185
+ self.title = attributes[:'title']
186
+ end
187
+
188
+ if attributes.key?(:'area')
189
+ self.area = attributes[:'area']
190
+ end
191
+
192
+ if attributes.key?(:'description')
193
+ self.description = attributes[:'description']
194
+ end
195
+
196
+ if attributes.key?(:'read_only')
197
+ self.read_only = attributes[:'read_only']
198
+ end
199
+
200
+ if attributes.key?(:'destructive')
201
+ self.destructive = attributes[:'destructive']
202
+ end
203
+
204
+ if attributes.key?(:'idempotent')
205
+ self.idempotent = attributes[:'idempotent']
206
+ end
207
+
208
+ if attributes.key?(:'requires_connector')
209
+ self.requires_connector = attributes[:'requires_connector']
210
+ end
211
+
212
+ if attributes.key?(:'connector_connected')
213
+ self.connector_connected = attributes[:'connector_connected']
214
+ end
215
+
216
+ if attributes.key?(:'rate_class')
217
+ self.rate_class = attributes[:'rate_class']
218
+ end
219
+
220
+ if attributes.key?(:'price')
221
+ self.price = attributes[:'price']
222
+ end
223
+
224
+ if attributes.key?(:'available')
225
+ self.available = attributes[:'available']
226
+ end
227
+
228
+ if attributes.key?(:'unavailable_reason')
229
+ self.unavailable_reason = attributes[:'unavailable_reason']
230
+ end
231
+
232
+ if attributes.key?(:'connect_url')
233
+ self.connect_url = attributes[:'connect_url']
234
+ end
235
+
236
+ if attributes.key?(:'invoke')
237
+ self.invoke = attributes[:'invoke']
238
+ end
239
+
240
+ if attributes.key?(:'input_schema')
241
+ self.input_schema = attributes[:'input_schema']
242
+ end
243
+ end
244
+
245
+ # Show invalid properties with the reasons. Usually used together with valid?
246
+ # @return Array for valid properties with the reasons
247
+ def list_invalid_properties
248
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
249
+ invalid_properties = Array.new
250
+ invalid_properties
251
+ end
252
+
253
+ # Check to see if the all the properties in the model are valid
254
+ # @return true if the model is valid
255
+ def valid?
256
+ warn '[DEPRECATED] the `valid?` method is obsolete'
257
+ object_validator = EnumAttributeValidator.new('String', ["tool", "unknown_default_open_api"])
258
+ return false unless object_validator.valid?(@object)
259
+ rate_class_validator = EnumAttributeValidator.new('String', ["read", "write", "unknown_default_open_api"])
260
+ return false unless rate_class_validator.valid?(@rate_class)
261
+ true
262
+ end
263
+
264
+ # Custom attribute writer method checking allowed values (enum).
265
+ # @param [Object] object Object to be assigned
266
+ def object=(object)
267
+ validator = EnumAttributeValidator.new('String', ["tool", "unknown_default_open_api"])
268
+ object = 'unknown_default_open_api' unless validator.valid?(object)
269
+ @object = object
270
+ end
271
+
272
+ # Custom attribute writer method checking allowed values (enum).
273
+ # @param [Object] rate_class Object to be assigned
274
+ def rate_class=(rate_class)
275
+ validator = EnumAttributeValidator.new('String', ["read", "write", "unknown_default_open_api"])
276
+ rate_class = 'unknown_default_open_api' unless validator.valid?(rate_class)
277
+ @rate_class = rate_class
278
+ end
279
+
280
+ # Checks equality by comparing each attribute.
281
+ # @param [Object] Object to be compared
282
+ def ==(o)
283
+ return true if self.equal?(o)
284
+ self.class == o.class &&
285
+ object == o.object &&
286
+ name == o.name &&
287
+ title == o.title &&
288
+ area == o.area &&
289
+ description == o.description &&
290
+ read_only == o.read_only &&
291
+ destructive == o.destructive &&
292
+ idempotent == o.idempotent &&
293
+ requires_connector == o.requires_connector &&
294
+ connector_connected == o.connector_connected &&
295
+ rate_class == o.rate_class &&
296
+ price == o.price &&
297
+ available == o.available &&
298
+ unavailable_reason == o.unavailable_reason &&
299
+ connect_url == o.connect_url &&
300
+ invoke == o.invoke &&
301
+ input_schema == o.input_schema
302
+ end
303
+
304
+ # @see the `==` method
305
+ # @param [Object] Object to be compared
306
+ def eql?(o)
307
+ self == o
308
+ end
309
+
310
+ # Calculates hash code according to all attributes.
311
+ # @return [Integer] Hash code
312
+ def hash
313
+ [object, name, title, area, description, read_only, destructive, idempotent, requires_connector, connector_connected, rate_class, price, available, unavailable_reason, connect_url, invoke, input_schema].hash
314
+ end
315
+
316
+ # Builds the object from hash
317
+ # @param [Hash] attributes Model attributes in the form of hash
318
+ # @return [Object] Returns the model itself
319
+ def self.build_from_hash(attributes)
320
+ return nil unless attributes.is_a?(Hash)
321
+ attributes = attributes.transform_keys(&:to_sym)
322
+ # include attributes inherited from allOf parents (the nearest declaration wins)
323
+ map = acceptable_attribute_map
324
+ transformed_hash = {}
325
+ acceptable_openapi_types.each_pair do |key, type|
326
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
327
+ transformed_hash["#{key}"] = nil
328
+ elsif type =~ /\AArray<(.*)>/i
329
+ # check to ensure the input is an array given that the attribute
330
+ # is documented as an array but the input is not
331
+ if attributes[map[key]].is_a?(Array)
332
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
333
+ end
334
+ elsif !attributes[map[key]].nil?
335
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
336
+ end
337
+ end
338
+ new(transformed_hash)
339
+ end
340
+
341
+ # Returns the object in the form of hash
342
+ # @return [Hash] Returns the object in the form of hash
343
+ def to_hash
344
+ hash = {}
345
+ # include attributes inherited from allOf parents (the nearest declaration wins)
346
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
347
+ value = self.send(attr)
348
+ if value.nil?
349
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
350
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
351
+ end
352
+
353
+ hash[param] = _to_hash(value)
354
+ end
355
+ hash
356
+ end
357
+
358
+ end
359
+
360
+ end