hubspot-api-client 3.3.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/lib/hubspot-api-client.rb +61 -0
  4. data/lib/hubspot/codegen/cms/audit-logs/api/default_api.rb +106 -0
  5. data/lib/hubspot/codegen/cms/audit-logs/api_client.rb +422 -0
  6. data/lib/hubspot/codegen/cms/audit-logs/api_error.rb +61 -0
  7. data/lib/hubspot/codegen/cms/audit-logs/configuration.rb +258 -0
  8. data/lib/hubspot/codegen/cms/audit-logs/models/collection_response_public_audit_log.rb +226 -0
  9. data/lib/hubspot/codegen/cms/audit-logs/models/error.rb +292 -0
  10. data/lib/hubspot/codegen/cms/audit-logs/models/error_detail.rb +258 -0
  11. data/lib/hubspot/codegen/cms/audit-logs/models/next_page.rb +224 -0
  12. data/lib/hubspot/codegen/cms/audit-logs/models/paging.rb +210 -0
  13. data/lib/hubspot/codegen/cms/audit-logs/models/public_audit_log.rb +352 -0
  14. data/lib/hubspot/codegen/cms/domains/api/domains_api.rb +183 -0
  15. data/lib/hubspot/codegen/cms/domains/api_client.rb +422 -0
  16. data/lib/hubspot/codegen/cms/domains/api_error.rb +61 -0
  17. data/lib/hubspot/codegen/cms/domains/configuration.rb +258 -0
  18. data/lib/hubspot/codegen/cms/domains/models/collection_response_with_total_domain.rb +240 -0
  19. data/lib/hubspot/codegen/cms/domains/models/domain.rb +1091 -0
  20. data/lib/hubspot/codegen/cms/domains/models/domain_cdn_config.rb +497 -0
  21. data/lib/hubspot/codegen/cms/domains/models/domain_setup_info.rb +231 -0
  22. data/lib/hubspot/codegen/cms/domains/models/error.rb +292 -0
  23. data/lib/hubspot/codegen/cms/domains/models/error_detail.rb +258 -0
  24. data/lib/hubspot/codegen/cms/domains/models/next_page.rb +224 -0
  25. data/lib/hubspot/codegen/cms/domains/models/paging.rb +210 -0
  26. data/lib/hubspot/codegen/cms/performance/api/default_api.rb +186 -0
  27. data/lib/hubspot/codegen/cms/performance/api_client.rb +422 -0
  28. data/lib/hubspot/codegen/cms/performance/api_error.rb +61 -0
  29. data/lib/hubspot/codegen/cms/performance/configuration.rb +258 -0
  30. data/lib/hubspot/codegen/cms/performance/models/error.rb +292 -0
  31. data/lib/hubspot/codegen/cms/performance/models/error_detail.rb +258 -0
  32. data/lib/hubspot/codegen/cms/performance/models/performance_view.rb +528 -0
  33. data/lib/hubspot/codegen/cms/performance/models/public_performance_response.rb +332 -0
  34. data/lib/hubspot/codegen/cms/site-search/api/default_api.rb +225 -0
  35. data/lib/hubspot/codegen/cms/site-search/api_client.rb +422 -0
  36. data/lib/hubspot/codegen/cms/site-search/api_error.rb +61 -0
  37. data/lib/hubspot/codegen/cms/site-search/configuration.rb +258 -0
  38. data/lib/hubspot/codegen/cms/site-search/models/content_search_result.rb +427 -0
  39. data/lib/hubspot/codegen/cms/site-search/models/error.rb +292 -0
  40. data/lib/hubspot/codegen/cms/site-search/models/error_detail.rb +258 -0
  41. data/lib/hubspot/codegen/cms/site-search/models/indexed_data.rb +279 -0
  42. data/lib/hubspot/codegen/cms/site-search/models/public_search_results.rb +282 -0
  43. data/lib/hubspot/codegen/cms/site-search/models/search_hit_field.rb +257 -0
  44. data/lib/hubspot/codegen/cms/url-redirects/api/redirects_api.rb +368 -0
  45. data/lib/hubspot/codegen/cms/url-redirects/api_client.rb +422 -0
  46. data/lib/hubspot/codegen/cms/url-redirects/api_error.rb +61 -0
  47. data/lib/hubspot/codegen/cms/url-redirects/configuration.rb +258 -0
  48. data/lib/hubspot/codegen/cms/url-redirects/models/collection_response_with_total_url_mapping.rb +242 -0
  49. data/lib/hubspot/codegen/cms/url-redirects/models/error.rb +292 -0
  50. data/lib/hubspot/codegen/cms/url-redirects/models/error_detail.rb +258 -0
  51. data/lib/hubspot/codegen/cms/url-redirects/models/next_page.rb +224 -0
  52. data/lib/hubspot/codegen/cms/url-redirects/models/paging.rb +210 -0
  53. data/lib/hubspot/codegen/cms/url-redirects/models/url_mapping.rb +596 -0
  54. data/lib/hubspot/codegen/cms/url-redirects/models/url_mapping_create_request_body.rb +306 -0
  55. data/lib/hubspot/version.rb +1 -1
  56. data/sample-apps/search-result-paging-app/.env.template +4 -0
  57. data/sample-apps/search-result-paging-app/.gitignore +35 -0
  58. data/sample-apps/search-result-paging-app/.rspec +1 -0
  59. data/sample-apps/search-result-paging-app/.ruby-version +1 -0
  60. data/sample-apps/search-result-paging-app/Dockerfile +22 -0
  61. data/sample-apps/search-result-paging-app/Gemfile +35 -0
  62. data/sample-apps/search-result-paging-app/Gemfile.lock +279 -0
  63. data/sample-apps/search-result-paging-app/README.md +0 -0
  64. data/sample-apps/search-result-paging-app/Rakefile +6 -0
  65. data/sample-apps/search-result-paging-app/app/assets/config/manifest.js +3 -0
  66. data/sample-apps/search-result-paging-app/app/assets/images/.keep +0 -0
  67. data/sample-apps/search-result-paging-app/app/assets/javascripts/application.js +25 -0
  68. data/sample-apps/search-result-paging-app/app/assets/javascripts/cable.js +13 -0
  69. data/sample-apps/search-result-paging-app/app/assets/javascripts/channels/.keep +0 -0
  70. data/sample-apps/search-result-paging-app/app/assets/stylesheets/application.css +77 -0
  71. data/sample-apps/search-result-paging-app/app/controllers/application_controller.rb +12 -0
  72. data/sample-apps/search-result-paging-app/app/controllers/concerns/.keep +0 -0
  73. data/sample-apps/search-result-paging-app/app/controllers/concerns/exception_handler.rb +12 -0
  74. data/sample-apps/search-result-paging-app/app/controllers/home_controller.rb +14 -0
  75. data/sample-apps/search-result-paging-app/app/controllers/oauth/authorization_controller.rb +19 -0
  76. data/sample-apps/search-result-paging-app/app/helpers/application_helper.rb +2 -0
  77. data/sample-apps/search-result-paging-app/app/lib/services/hubspot/authorization/authorize.rb +17 -0
  78. data/sample-apps/search-result-paging-app/app/lib/services/hubspot/authorization/get_authorization_uri.rb +35 -0
  79. data/sample-apps/search-result-paging-app/app/lib/services/hubspot/authorization/tokens/base.rb +21 -0
  80. data/sample-apps/search-result-paging-app/app/lib/services/hubspot/authorization/tokens/generate.rb +28 -0
  81. data/sample-apps/search-result-paging-app/app/lib/services/hubspot/authorization/tokens/refresh.rb +35 -0
  82. data/sample-apps/search-result-paging-app/app/lib/services/hubspot/contacts/get_page.rb +26 -0
  83. data/sample-apps/search-result-paging-app/app/lib/services/hubspot/contacts/search.rb +35 -0
  84. data/sample-apps/search-result-paging-app/app/lib/services/hubspot/properties/create.rb +23 -0
  85. data/sample-apps/search-result-paging-app/app/lib/services/hubspot/properties/destroy.rb +16 -0
  86. data/sample-apps/search-result-paging-app/app/models/application_record.rb +3 -0
  87. data/sample-apps/search-result-paging-app/app/models/concerns/.keep +0 -0
  88. data/sample-apps/search-result-paging-app/app/views/home/index.html.erb +13 -0
  89. data/sample-apps/search-result-paging-app/app/views/layouts/application.html.erb +23 -0
  90. data/sample-apps/search-result-paging-app/app/views/oauth/authorization/login.html.erb +15 -0
  91. data/sample-apps/search-result-paging-app/app/views/shared/_header.html.erb +18 -0
  92. data/sample-apps/search-result-paging-app/bin/bundle +3 -0
  93. data/sample-apps/search-result-paging-app/bin/rails +9 -0
  94. data/sample-apps/search-result-paging-app/bin/rake +9 -0
  95. data/sample-apps/search-result-paging-app/bin/setup +36 -0
  96. data/sample-apps/search-result-paging-app/bin/spring +17 -0
  97. data/sample-apps/search-result-paging-app/bin/update +31 -0
  98. data/sample-apps/search-result-paging-app/bin/yarn +11 -0
  99. data/sample-apps/search-result-paging-app/config.ru +5 -0
  100. data/sample-apps/search-result-paging-app/config/application.rb +19 -0
  101. data/sample-apps/search-result-paging-app/config/boot.rb +3 -0
  102. data/sample-apps/search-result-paging-app/config/cable.yml +10 -0
  103. data/sample-apps/search-result-paging-app/config/database.yml +25 -0
  104. data/sample-apps/search-result-paging-app/config/environment.rb +5 -0
  105. data/sample-apps/search-result-paging-app/config/environments/development.rb +61 -0
  106. data/sample-apps/search-result-paging-app/config/environments/production.rb +94 -0
  107. data/sample-apps/search-result-paging-app/config/environments/test.rb +46 -0
  108. data/sample-apps/search-result-paging-app/config/initializers/assets.rb +14 -0
  109. data/sample-apps/search-result-paging-app/config/initializers/filter_parameter_logging.rb +4 -0
  110. data/sample-apps/search-result-paging-app/config/initializers/hubspot-api-client.rb +3 -0
  111. data/sample-apps/search-result-paging-app/config/initializers/mime_types.rb +1 -0
  112. data/sample-apps/search-result-paging-app/config/initializers/wrap_parameters.rb +14 -0
  113. data/sample-apps/search-result-paging-app/config/locales/en.yml +33 -0
  114. data/sample-apps/search-result-paging-app/config/puma.rb +34 -0
  115. data/sample-apps/search-result-paging-app/config/routes.rb +7 -0
  116. data/sample-apps/search-result-paging-app/config/spring.rb +6 -0
  117. data/sample-apps/search-result-paging-app/db/seeds.rb +7 -0
  118. data/sample-apps/search-result-paging-app/docker-compose.yml +11 -0
  119. data/sample-apps/search-result-paging-app/docker-entrypoint.sh +8 -0
  120. data/sample-apps/search-result-paging-app/lib/assets/.keep +0 -0
  121. data/sample-apps/search-result-paging-app/lib/tasks/.keep +0 -0
  122. data/sample-apps/search-result-paging-app/lib/tasks/search_contacts.rake +36 -0
  123. data/sample-apps/search-result-paging-app/log/.keep +0 -0
  124. data/sample-apps/search-result-paging-app/package.json +5 -0
  125. data/sample-apps/search-result-paging-app/public/404.html +67 -0
  126. data/sample-apps/search-result-paging-app/public/422.html +67 -0
  127. data/sample-apps/search-result-paging-app/public/500.html +66 -0
  128. data/sample-apps/search-result-paging-app/public/apple-touch-icon-precomposed.png +0 -0
  129. data/sample-apps/search-result-paging-app/public/apple-touch-icon.png +0 -0
  130. data/sample-apps/search-result-paging-app/public/favicon.ico +0 -0
  131. data/sample-apps/search-result-paging-app/public/robots.txt +1 -0
  132. data/sample-apps/search-result-paging-app/tmp/.keep +0 -0
  133. metadata +309 -2
@@ -0,0 +1,332 @@
1
+ =begin
2
+ #CMS Performance API
3
+
4
+ #Use these endpoints to get a time series view of your website's performance.
5
+
6
+ The version of the OpenAPI document: v3
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module Hubspot
16
+ module Cms
17
+ module Performance
18
+ class PublicPerformanceResponse
19
+ attr_accessor :data
20
+
21
+ attr_accessor :domain
22
+
23
+ attr_accessor :path
24
+
25
+ attr_accessor :start_interval
26
+
27
+ attr_accessor :end_interval
28
+
29
+ attr_accessor :interval
30
+
31
+ attr_accessor :period
32
+
33
+ class EnumAttributeValidator
34
+ attr_reader :datatype
35
+ attr_reader :allowable_values
36
+
37
+ def initialize(datatype, allowable_values)
38
+ @allowable_values = allowable_values.map do |value|
39
+ case datatype.to_s
40
+ when /Integer/i
41
+ value.to_i
42
+ when /Float/i
43
+ value.to_f
44
+ else
45
+ value
46
+ end
47
+ end
48
+ end
49
+
50
+ def valid?(value)
51
+ !value || allowable_values.include?(value)
52
+ end
53
+ end
54
+
55
+ # Attribute mapping from ruby-style variable name to JSON key.
56
+ def self.attribute_map
57
+ {
58
+ :'data' => :'data',
59
+ :'domain' => :'domain',
60
+ :'path' => :'path',
61
+ :'start_interval' => :'startInterval',
62
+ :'end_interval' => :'endInterval',
63
+ :'interval' => :'interval',
64
+ :'period' => :'period'
65
+ }
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.openapi_types
70
+ {
71
+ :'data' => :'Array<PerformanceView>',
72
+ :'domain' => :'String',
73
+ :'path' => :'String',
74
+ :'start_interval' => :'Integer',
75
+ :'end_interval' => :'Integer',
76
+ :'interval' => :'String',
77
+ :'period' => :'String'
78
+ }
79
+ end
80
+
81
+ # List of attributes with nullable: true
82
+ def self.openapi_nullable
83
+ Set.new([
84
+ ])
85
+ end
86
+
87
+ # Initializes the object
88
+ # @param [Hash] attributes Model attributes in the form of hash
89
+ def initialize(attributes = {})
90
+ if (!attributes.is_a?(Hash))
91
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Cms::Performance::PublicPerformanceResponse` initialize method"
92
+ end
93
+
94
+ # check to see if the attribute exists and convert string to symbol for hash key
95
+ attributes = attributes.each_with_object({}) { |(k, v), h|
96
+ if (!self.class.attribute_map.key?(k.to_sym))
97
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Cms::Performance::PublicPerformanceResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
98
+ end
99
+ h[k.to_sym] = v
100
+ }
101
+
102
+ if attributes.key?(:'data')
103
+ if (value = attributes[:'data']).is_a?(Array)
104
+ self.data = value
105
+ end
106
+ end
107
+
108
+ if attributes.key?(:'domain')
109
+ self.domain = attributes[:'domain']
110
+ end
111
+
112
+ if attributes.key?(:'path')
113
+ self.path = attributes[:'path']
114
+ end
115
+
116
+ if attributes.key?(:'start_interval')
117
+ self.start_interval = attributes[:'start_interval']
118
+ end
119
+
120
+ if attributes.key?(:'end_interval')
121
+ self.end_interval = attributes[:'end_interval']
122
+ end
123
+
124
+ if attributes.key?(:'interval')
125
+ self.interval = attributes[:'interval']
126
+ end
127
+
128
+ if attributes.key?(:'period')
129
+ self.period = attributes[:'period']
130
+ end
131
+ end
132
+
133
+ # Show invalid properties with the reasons. Usually used together with valid?
134
+ # @return Array for valid properties with the reasons
135
+ def list_invalid_properties
136
+ invalid_properties = Array.new
137
+ if @data.nil?
138
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
139
+ end
140
+
141
+ if @start_interval.nil?
142
+ invalid_properties.push('invalid value for "start_interval", start_interval cannot be nil.')
143
+ end
144
+
145
+ if @end_interval.nil?
146
+ invalid_properties.push('invalid value for "end_interval", end_interval cannot be nil.')
147
+ end
148
+
149
+ if @interval.nil?
150
+ invalid_properties.push('invalid value for "interval", interval cannot be nil.')
151
+ end
152
+
153
+ invalid_properties
154
+ end
155
+
156
+ # Check to see if the all the properties in the model are valid
157
+ # @return true if the model is valid
158
+ def valid?
159
+ return false if @data.nil?
160
+ return false if @start_interval.nil?
161
+ return false if @end_interval.nil?
162
+ return false if @interval.nil?
163
+ interval_validator = EnumAttributeValidator.new('String', ["ONE_MINUTE", "FIVE_MINUTES", "TEN_MINUTES", "FIFTEEN_MINUTES", "THIRTY_MINUTES", "ONE_HOUR", "FOUR_HOURS", "TWELVE_HOURS", "ONE_DAY", "ONE_WEEK"])
164
+ return false unless interval_validator.valid?(@interval)
165
+ period_validator = EnumAttributeValidator.new('String', ["ONE_MINUTE", "FIVE_MINUTES", "TEN_MINUTES", "FIFTEEN_MINUTES", "THIRTY_MINUTES", "ONE_HOUR", "FOUR_HOURS", "TWELVE_HOURS", "ONE_DAY", "ONE_WEEK"])
166
+ return false unless period_validator.valid?(@period)
167
+ true
168
+ end
169
+
170
+ # Custom attribute writer method checking allowed values (enum).
171
+ # @param [Object] interval Object to be assigned
172
+ def interval=(interval)
173
+ validator = EnumAttributeValidator.new('String', ["ONE_MINUTE", "FIVE_MINUTES", "TEN_MINUTES", "FIFTEEN_MINUTES", "THIRTY_MINUTES", "ONE_HOUR", "FOUR_HOURS", "TWELVE_HOURS", "ONE_DAY", "ONE_WEEK"])
174
+ unless validator.valid?(interval)
175
+ fail ArgumentError, "invalid value for \"interval\", must be one of #{validator.allowable_values}."
176
+ end
177
+ @interval = interval
178
+ end
179
+
180
+ # Custom attribute writer method checking allowed values (enum).
181
+ # @param [Object] period Object to be assigned
182
+ def period=(period)
183
+ validator = EnumAttributeValidator.new('String', ["ONE_MINUTE", "FIVE_MINUTES", "TEN_MINUTES", "FIFTEEN_MINUTES", "THIRTY_MINUTES", "ONE_HOUR", "FOUR_HOURS", "TWELVE_HOURS", "ONE_DAY", "ONE_WEEK"])
184
+ unless validator.valid?(period)
185
+ fail ArgumentError, "invalid value for \"period\", must be one of #{validator.allowable_values}."
186
+ end
187
+ @period = period
188
+ end
189
+
190
+ # Checks equality by comparing each attribute.
191
+ # @param [Object] Object to be compared
192
+ def ==(o)
193
+ return true if self.equal?(o)
194
+ self.class == o.class &&
195
+ data == o.data &&
196
+ domain == o.domain &&
197
+ path == o.path &&
198
+ start_interval == o.start_interval &&
199
+ end_interval == o.end_interval &&
200
+ interval == o.interval &&
201
+ period == o.period
202
+ end
203
+
204
+ # @see the `==` method
205
+ # @param [Object] Object to be compared
206
+ def eql?(o)
207
+ self == o
208
+ end
209
+
210
+ # Calculates hash code according to all attributes.
211
+ # @return [Integer] Hash code
212
+ def hash
213
+ [data, domain, path, start_interval, end_interval, interval, period].hash
214
+ end
215
+
216
+ # Builds the object from hash
217
+ # @param [Hash] attributes Model attributes in the form of hash
218
+ # @return [Object] Returns the model itself
219
+ def self.build_from_hash(attributes)
220
+ new.build_from_hash(attributes)
221
+ end
222
+
223
+ # Builds the object from hash
224
+ # @param [Hash] attributes Model attributes in the form of hash
225
+ # @return [Object] Returns the model itself
226
+ def build_from_hash(attributes)
227
+ return nil unless attributes.is_a?(Hash)
228
+ self.class.openapi_types.each_pair do |key, type|
229
+ if type =~ /\AArray<(.*)>/i
230
+ # check to ensure the input is an array given that the attribute
231
+ # is documented as an array but the input is not
232
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
233
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
234
+ end
235
+ elsif !attributes[self.class.attribute_map[key]].nil?
236
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
237
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
238
+ end
239
+
240
+ self
241
+ end
242
+
243
+ # Deserializes the data based on type
244
+ # @param string type Data type
245
+ # @param string value Value to be deserialized
246
+ # @return [Object] Deserialized data
247
+ def _deserialize(type, value)
248
+ case type.to_sym
249
+ when :DateTime
250
+ DateTime.parse(value)
251
+ when :Date
252
+ Date.parse(value)
253
+ when :String
254
+ value.to_s
255
+ when :Integer
256
+ value.to_i
257
+ when :Float
258
+ value.to_f
259
+ when :Boolean
260
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
261
+ true
262
+ else
263
+ false
264
+ end
265
+ when :Object
266
+ # generic object (usually a Hash), return directly
267
+ value
268
+ when /\AArray<(?<inner_type>.+)>\z/
269
+ inner_type = Regexp.last_match[:inner_type]
270
+ value.map { |v| _deserialize(inner_type, v) }
271
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
272
+ k_type = Regexp.last_match[:k_type]
273
+ v_type = Regexp.last_match[:v_type]
274
+ {}.tap do |hash|
275
+ value.each do |k, v|
276
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
277
+ end
278
+ end
279
+ else # model
280
+ Hubspot::Cms::Performance.const_get(type).build_from_hash(value)
281
+ end
282
+ end
283
+
284
+ # Returns the string representation of the object
285
+ # @return [String] String presentation of the object
286
+ def to_s
287
+ to_hash.to_s
288
+ end
289
+
290
+ # to_body is an alias to to_hash (backward compatibility)
291
+ # @return [Hash] Returns the object in the form of hash
292
+ def to_body
293
+ to_hash
294
+ end
295
+
296
+ # Returns the object in the form of hash
297
+ # @return [Hash] Returns the object in the form of hash
298
+ def to_hash
299
+ hash = {}
300
+ self.class.attribute_map.each_pair do |attr, param|
301
+ value = self.send(attr)
302
+ if value.nil?
303
+ is_nullable = self.class.openapi_nullable.include?(attr)
304
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
305
+ end
306
+
307
+ hash[param] = _to_hash(value)
308
+ end
309
+ hash
310
+ end
311
+
312
+ # Outputs non-array value in the form of hash
313
+ # For object, use to_hash. Otherwise, just return the value
314
+ # @param [Object] value Any valid value
315
+ # @return [Hash] Returns the value in the form of hash
316
+ def _to_hash(value)
317
+ if value.is_a?(Array)
318
+ value.compact.map { |v| _to_hash(v) }
319
+ elsif value.is_a?(Hash)
320
+ {}.tap do |hash|
321
+ value.each { |k, v| hash[k] = _to_hash(v) }
322
+ end
323
+ elsif value.respond_to? :to_hash
324
+ value.to_hash
325
+ else
326
+ value
327
+ end
328
+ end
329
+ end
330
+ end
331
+ end
332
+ end
@@ -0,0 +1,225 @@
1
+ =begin
2
+ #CMS Site Search
3
+
4
+ #Use these endpoints for searching content on your HubSpot hosted CMS website(s).
5
+
6
+ The version of the OpenAPI document: v3
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.3
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Hubspot
16
+ module Cms
17
+ module SiteSearch
18
+ class DefaultApi
19
+ attr_accessor :api_client
20
+
21
+ def initialize(api_client = ApiClient.default)
22
+ @api_client = api_client
23
+ end
24
+ # Get indexed properties.
25
+ # For a given account and document ID (page ID, blog post ID, HubDB row ID, etc.), return all indexed data for that document. This is useful when debugging why a particular document is not returned from a custom search.
26
+ # @param content_id [String] ID of the target document when searching for indexed properties.
27
+ # @param [Hash] opts the optional parameters
28
+ # @option opts [String] :type The type of document. Can be one of &#x60;SITE_PAGE&#x60;, &#x60;BLOG_POST&#x60;, or &#x60;KNOWLEDGE_ARTICLE&#x60;.
29
+ # @return [IndexedData]
30
+ def get_by_id(content_id, opts = {})
31
+ data, _status_code, _headers = get_by_id_with_http_info(content_id, opts)
32
+ data
33
+ end
34
+
35
+ # Get indexed properties.
36
+ # For a given account and document ID (page ID, blog post ID, HubDB row ID, etc.), return all indexed data for that document. This is useful when debugging why a particular document is not returned from a custom search.
37
+ # @param content_id [String] ID of the target document when searching for indexed properties.
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [String] :type The type of document. Can be one of &#x60;SITE_PAGE&#x60;, &#x60;BLOG_POST&#x60;, or &#x60;KNOWLEDGE_ARTICLE&#x60;.
40
+ # @return [Array<(IndexedData, Integer, Hash)>] IndexedData data, response status code and response headers
41
+ def get_by_id_with_http_info(content_id, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_by_id ...'
44
+ end
45
+ # verify the required parameter 'content_id' is set
46
+ if @api_client.config.client_side_validation && content_id.nil?
47
+ fail ArgumentError, "Missing the required parameter 'content_id' when calling DefaultApi.get_by_id"
48
+ end
49
+ pattern = Regexp.new(/.*/)
50
+ if @api_client.config.client_side_validation && content_id !~ pattern
51
+ fail ArgumentError, "invalid value for 'content_id' when calling DefaultApi.get_by_id, must conform to the pattern #{pattern}."
52
+ end
53
+
54
+ allowable_values = ["LANDING_PAGE", "BLOG_POST", "SITE_PAGE", "DOCUMENT", "KNOWLEDGE_ARTICLE", "LISTING_PAGE"]
55
+ if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])
56
+ fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
57
+ end
58
+ # resource path
59
+ local_var_path = '/cms/v3/site-search/indexed-data/{contentId}'.sub('{' + 'contentId' + '}', CGI.escape(content_id.to_s))
60
+
61
+ # query parameters
62
+ query_params = opts[:query_params] || {}
63
+ query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
64
+
65
+ # header parameters
66
+ header_params = opts[:header_params] || {}
67
+ # HTTP header 'Accept' (if needed)
68
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
69
+
70
+ # form parameters
71
+ form_params = opts[:form_params] || {}
72
+
73
+ # http body (model)
74
+ post_body = opts[:body]
75
+
76
+ # return_type
77
+ return_type = opts[:return_type] || 'IndexedData'
78
+
79
+ # auth_names
80
+ auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
81
+
82
+ new_options = opts.merge(
83
+ :header_params => header_params,
84
+ :query_params => query_params,
85
+ :form_params => form_params,
86
+ :body => post_body,
87
+ :auth_names => auth_names,
88
+ :return_type => return_type
89
+ )
90
+
91
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
92
+ if @api_client.config.debugging
93
+ @api_client.config.logger.debug "API called: DefaultApi#get_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
94
+ end
95
+ return data, status_code, headers
96
+ end
97
+
98
+ # Search your site.
99
+ # Returns any website content matching the given search criteria for a given HubSpot account. Searches can be filtered by content type, domain, or URL path.
100
+ # @param [Hash] opts the optional parameters
101
+ # @option opts [String] :q The term to search for.
102
+ # @option opts [Integer] :limit Specifies the number of results to be returned in a single response. Defaults to &#x60;10&#x60;. Maximum value is &#x60;100&#x60;.
103
+ # @option opts [Integer] :offset Used to page through the results. If there are more results than specified by the &#x60;limit&#x60; parameter, you will need to use the value of offset returned in the previous request to get the next set of results.
104
+ # @option opts [String] :language Specifies the language of content to be searched. This value must be a valid [ISO 639-1 language code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. &#x60;es&#x60; for Spanish)
105
+ # @option opts [Boolean] :match_prefix Inverts the behavior of the pathPrefix filter when set to &#x60;false&#x60;. Defaults to &#x60;true&#x60;.
106
+ # @option opts [Boolean] :autocomplete Specifies whether or not you are showing autocomplete results. Defaults to false.
107
+ # @option opts [Float] :popularity_boost Specifies how strongly a result is boosted based on its view count. Defaults to 1.0.
108
+ # @option opts [Float] :boost_limit Specifies the maximum amount a result will be boosted based on its view count. Defaults to 5.0. Read more about elasticsearch boosting [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-boost.html).
109
+ # @option opts [Float] :min_score Specifies the minimum search score threshold for returned results. This value is intentionally set low by default in order to return many results. Increase this for higher precision, but less recall.
110
+ # @option opts [String] :boost_recent Specifies a relative time window where scores of documents published outside this time window decay. This can only be used for blog posts. For example, boostRecent&#x3D;10d will boost documents published within the last 10 days. Supported timeunits are ms (milliseconds), s (seconds), m (minutes), h (hours), d (days).
111
+ # @option opts [Integer] :table_id Specifies a specific HubDB table to search. Only returns results from the specified table. Can be used in tandem with the &#x60;hubdbQuery&#x60; parameter to further filter results.
112
+ # @option opts [String] :hubdb_query Specify a HubDB query to further filter the search results.
113
+ # @option opts [String] :key_string
114
+ # @option opts [Array<String>] :domain A domain to match search results for. Multiple domains can be provided with &amp;.
115
+ # @option opts [Array<String>] :type Specifies the type of content to search. Can be one or more of SITE_PAGE, LANDING_PAGE, BLOG_POST, LISTING_PAGE, and KNOWLEDGE_ARTICLE. Defaults to all content types except LANDING_PAGE and KNOWLEDGE_ARTICLE
116
+ # @option opts [Array<String>] :path_prefix Specifies a path prefix to filter search results. Will only return results with URL paths that start with the specified parameter. Can be used multiple times.
117
+ # @option opts [Array<String>] :property Specifies which properties to include in the search. Options include &#x60;title&#x60;, &#x60;description&#x60;, and &#x60;html&#x60;. All properties will be searched by default.
118
+ # @option opts [String] :length Specifies the length of the search results. Can be set to &#x60;LONG&#x60; or &#x60;SHORT&#x60;. &#x60;SHORT&#x60; will return the first 128 characters of the content&#39;s meta description. &#x60;LONG&#x60; will build a more detailed content snippet based on the html/content of the page.
119
+ # @option opts [Array<Integer>] :group_id Specifies which blog(s) to be searched by blog ID. Can be used multiple times to search more than one blog.
120
+ # @return [PublicSearchResults]
121
+ def search(opts = {})
122
+ data, _status_code, _headers = search_with_http_info(opts)
123
+ data
124
+ end
125
+
126
+ # Search your site.
127
+ # Returns any website content matching the given search criteria for a given HubSpot account. Searches can be filtered by content type, domain, or URL path.
128
+ # @param [Hash] opts the optional parameters
129
+ # @option opts [String] :q The term to search for.
130
+ # @option opts [Integer] :limit Specifies the number of results to be returned in a single response. Defaults to &#x60;10&#x60;. Maximum value is &#x60;100&#x60;.
131
+ # @option opts [Integer] :offset Used to page through the results. If there are more results than specified by the &#x60;limit&#x60; parameter, you will need to use the value of offset returned in the previous request to get the next set of results.
132
+ # @option opts [String] :language Specifies the language of content to be searched. This value must be a valid [ISO 639-1 language code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. &#x60;es&#x60; for Spanish)
133
+ # @option opts [Boolean] :match_prefix Inverts the behavior of the pathPrefix filter when set to &#x60;false&#x60;. Defaults to &#x60;true&#x60;.
134
+ # @option opts [Boolean] :autocomplete Specifies whether or not you are showing autocomplete results. Defaults to false.
135
+ # @option opts [Float] :popularity_boost Specifies how strongly a result is boosted based on its view count. Defaults to 1.0.
136
+ # @option opts [Float] :boost_limit Specifies the maximum amount a result will be boosted based on its view count. Defaults to 5.0. Read more about elasticsearch boosting [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-boost.html).
137
+ # @option opts [Float] :min_score Specifies the minimum search score threshold for returned results. This value is intentionally set low by default in order to return many results. Increase this for higher precision, but less recall.
138
+ # @option opts [String] :boost_recent Specifies a relative time window where scores of documents published outside this time window decay. This can only be used for blog posts. For example, boostRecent&#x3D;10d will boost documents published within the last 10 days. Supported timeunits are ms (milliseconds), s (seconds), m (minutes), h (hours), d (days).
139
+ # @option opts [Integer] :table_id Specifies a specific HubDB table to search. Only returns results from the specified table. Can be used in tandem with the &#x60;hubdbQuery&#x60; parameter to further filter results.
140
+ # @option opts [String] :hubdb_query Specify a HubDB query to further filter the search results.
141
+ # @option opts [String] :key_string
142
+ # @option opts [Array<String>] :domain A domain to match search results for. Multiple domains can be provided with &amp;.
143
+ # @option opts [Array<String>] :type Specifies the type of content to search. Can be one or more of SITE_PAGE, LANDING_PAGE, BLOG_POST, LISTING_PAGE, and KNOWLEDGE_ARTICLE. Defaults to all content types except LANDING_PAGE and KNOWLEDGE_ARTICLE
144
+ # @option opts [Array<String>] :path_prefix Specifies a path prefix to filter search results. Will only return results with URL paths that start with the specified parameter. Can be used multiple times.
145
+ # @option opts [Array<String>] :property Specifies which properties to include in the search. Options include &#x60;title&#x60;, &#x60;description&#x60;, and &#x60;html&#x60;. All properties will be searched by default.
146
+ # @option opts [String] :length Specifies the length of the search results. Can be set to &#x60;LONG&#x60; or &#x60;SHORT&#x60;. &#x60;SHORT&#x60; will return the first 128 characters of the content&#39;s meta description. &#x60;LONG&#x60; will build a more detailed content snippet based on the html/content of the page.
147
+ # @option opts [Array<Integer>] :group_id Specifies which blog(s) to be searched by blog ID. Can be used multiple times to search more than one blog.
148
+ # @return [Array<(PublicSearchResults, Integer, Hash)>] PublicSearchResults data, response status code and response headers
149
+ def search_with_http_info(opts = {})
150
+ if @api_client.config.debugging
151
+ @api_client.config.logger.debug 'Calling API: DefaultApi.search ...'
152
+ end
153
+ allowable_values = ["af", "af-na", "af-za", "agq", "agq-cm", "ak", "ak-gh", "am", "am-et", "ar", "ar-001", "ar-ae", "ar-bh", "ar-dj", "ar-dz", "ar-eg", "ar-eh", "ar-er", "ar-il", "ar-iq", "ar-jo", "ar-km", "ar-kw", "ar-lb", "ar-ly", "ar-ma", "ar-mr", "ar-om", "ar-ps", "ar-qa", "ar-sa", "ar-sd", "ar-so", "ar-ss", "ar-sy", "ar-td", "ar-tn", "ar-ye", "as", "as-in", "asa", "asa-tz", "ast", "ast-es", "az", "az-az", "bas", "bas-cm", "be", "be-by", "bem", "bem-zm", "bez", "bez-tz", "bg", "bg-bg", "bm", "bm-ml", "bn", "bn-bd", "bn-in", "bo", "bo-cn", "bo-in", "br", "br-fr", "brx", "brx-in", "bs", "bs-ba", "ca", "ca-ad", "ca-es", "ca-fr", "ca-it", "ccp", "ccp-bd", "ccp-in", "ce", "ce-ru", "cgg", "cgg-ug", "chr", "chr-us", "ckb", "ckb-iq", "ckb-ir", "cs", "cs-cz", "cu", "cu-ru", "cy", "cy-gb", "da", "da-dk", "da-gl", "dav", "dav-ke", "de", "de-at", "de-be", "de-ch", "de-de", "de-gr", "de-it", "de-li", "de-lu", "dje", "dje-ne", "dsb", "dsb-de", "dua", "dua-cm", "dyo", "dyo-sn", "dz", "dz-bt", "ebu", "ebu-ke", "ee", "ee-gh", "ee-tg", "el", "el-cy", "el-gr", "en", "en-001", "en-150", "en-ag", "en-ai", "en-as", "en-at", "en-au", "en-bb", "en-be", "en-bi", "en-bm", "en-bs", "en-bw", "en-bz", "en-ca", "en-cc", "en-ch", "en-ck", "en-cm", "en-cx", "en-cy", "en-de", "en-dg", "en-dk", "en-dm", "en-er", "en-fi", "en-fj", "en-fk", "en-fm", "en-gb", "en-gd", "en-gg", "en-gh", "en-gi", "en-gm", "en-gu", "en-gy", "en-hk", "en-ie", "en-il", "en-im", "en-in", "en-io", "en-je", "en-jm", "en-ke", "en-ki", "en-kn", "en-ky", "en-lc", "en-lr", "en-ls", "en-mg", "en-mh", "en-mo", "en-mp", "en-ms", "en-mt", "en-mu", "en-mw", "en-my", "en-na", "en-nf", "en-ng", "en-nl", "en-nr", "en-nu", "en-nz", "en-pg", "en-ph", "en-pk", "en-pn", "en-pr", "en-pw", "en-rw", "en-sb", "en-sc", "en-sd", "en-se", "en-sg", "en-sh", "en-si", "en-sl", "en-ss", "en-sx", "en-sz", "en-tc", "en-tk", "en-to", "en-tt", "en-tv", "en-tz", "en-ug", "en-um", "en-us", "en-vc", "en-vg", "en-vi", "en-vu", "en-ws", "en-za", "en-zm", "en-zw", "eo", "eo-001", "es", "es-419", "es-ar", "es-bo", "es-br", "es-bz", "es-cl", "es-co", "es-cr", "es-cu", "es-do", "es-ea", "es-ec", "es-es", "es-gq", "es-gt", "es-hn", "es-ic", "es-mx", "es-ni", "es-pa", "es-pe", "es-ph", "es-pr", "es-py", "es-sv", "es-us", "es-uy", "es-ve", "et", "et-ee", "eu", "eu-es", "ewo", "ewo-cm", "fa", "fa-af", "fa-ir", "ff", "ff-cm", "ff-gn", "ff-mr", "ff-sn", "fi", "fi-fi", "fil", "fil-ph", "fo", "fo-dk", "fo-fo", "fr", "fr-be", "fr-bf", "fr-bi", "fr-bj", "fr-bl", "fr-ca", "fr-cd", "fr-cf", "fr-cg", "fr-ch", "fr-ci", "fr-cm", "fr-dj", "fr-dz", "fr-fr", "fr-ga", "fr-gf", "fr-gn", "fr-gp", "fr-gq", "fr-ht", "fr-km", "fr-lu", "fr-ma", "fr-mc", "fr-mf", "fr-mg", "fr-ml", "fr-mq", "fr-mr", "fr-mu", "fr-nc", "fr-ne", "fr-pf", "fr-pm", "fr-re", "fr-rw", "fr-sc", "fr-sn", "fr-sy", "fr-td", "fr-tg", "fr-tn", "fr-vu", "fr-wf", "fr-yt", "fur", "fur-it", "fy", "fy-nl", "ga", "ga-ie", "gd", "gd-gb", "gl", "gl-es", "gsw", "gsw-ch", "gsw-fr", "gsw-li", "gu", "gu-in", "guz", "guz-ke", "gv", "gv-im", "ha", "ha-gh", "ha-ne", "ha-ng", "haw", "haw-us", "he", "hi", "hi-in", "hr", "hr-ba", "hr-hr", "hsb", "hsb-de", "hu", "hu-hu", "hy", "hy-am", "id", "ig", "ig-ng", "ii", "ii-cn", "id-id", "is", "is-is", "it", "it-ch", "it-it", "it-sm", "it-va", "he-il", "ja", "ja-jp", "jgo", "jgo-cm", "yi", "yi-001", "jmc", "jmc-tz", "ka", "ka-ge", "kab", "kab-dz", "kam", "kam-ke", "kde", "kde-tz", "kea", "kea-cv", "khq", "khq-ml", "ki", "ki-ke", "kk", "kk-kz", "kkj", "kkj-cm", "kl", "kl-gl", "kln", "kln-ke", "km", "km-kh", "kn", "kn-in", "ko", "ko-kp", "ko-kr", "kok", "kok-in", "ks", "ks-in", "ksb", "ksb-tz", "ksf", "ksf-cm", "ksh", "ksh-de", "kw", "kw-gb", "ky", "ky-kg", "lag", "lag-tz", "lb", "lb-lu", "lg", "lg-ug", "lkt", "lkt-us", "ln", "ln-ao", "ln-cd", "ln-cf", "ln-cg", "lo", "lo-la", "lrc", "lrc-iq", "lrc-ir", "lt", "lt-lt", "lu", "lu-cd", "luo", "luo-ke", "luy", "luy-ke", "lv", "lv-lv", "mas", "mas-ke", "mas-tz", "mer", "mer-ke", "mfe", "mfe-mu", "mg", "mg-mg", "mgh", "mgh-mz", "mgo", "mgo-cm", "mk", "mk-mk", "ml", "ml-in", "mn", "mn-mn", "mr", "mr-in", "ms", "ms-bn", "ms-my", "ms-sg", "mt", "mt-mt", "mua", "mua-cm", "my", "my-mm", "mzn", "mzn-ir", "naq", "naq-na", "nb", "nb-no", "nb-sj", "nd", "nd-zw", "nds", "nds-de", "nds-nl", "ne", "ne-in", "ne-np", "nl", "nl-aw", "nl-be", "nl-bq", "nl-cw", "nl-nl", "nl-sr", "nl-sx", "nmg", "nmg-cm", "nn", "nn-no", "nnh", "nnh-cm", "no", "no-no", "nus", "nus-ss", "nyn", "nyn-ug", "om", "om-et", "om-ke", "or", "or-in", "os", "os-ge", "os-ru", "pa", "pa-in", "pa-pk", "pl", "pl-pl", "prg", "prg-001", "ps", "ps-af", "pt", "pt-ao", "pt-br", "pt-ch", "pt-cv", "pt-gq", "pt-gw", "pt-lu", "pt-mo", "pt-mz", "pt-pt", "pt-st", "pt-tl", "qu", "qu-bo", "qu-ec", "qu-pe", "rm", "rm-ch", "rn", "rn-bi", "ro", "ro-md", "ro-ro", "rof", "rof-tz", "ru", "ru-by", "ru-kg", "ru-kz", "ru-md", "ru-ru", "ru-ua", "rw", "rw-rw", "rwk", "rwk-tz", "sa", "sah", "sah-ru", "saq", "saq-ke", "sbp", "sbp-tz", "sd", "sd-pk", "se", "se-fi", "se-no", "se-se", "seh", "seh-mz", "ses", "ses-ml", "sg", "sg-cf", "shi", "shi-ma", "si", "si-lk", "sk", "sk-sk", "sl", "sl-si", "smn", "smn-fi", "sn", "sn-zw", "so", "so-dj", "so-et", "so-ke", "so-so", "sq", "sq-al", "sq-mk", "sq-xk", "sr", "sr-ba", "sr-cs", "sr-me", "sr-rs", "sr-xk", "sv", "sv-ax", "sv-fi", "sv-se", "sw", "sw-cd", "sw-ke", "sw-tz", "sw-ug", "sy", "ta", "ta-in", "ta-lk", "ta-my", "ta-sg", "te", "te-in", "teo", "teo-ke", "teo-ug", "tg", "tg-tj", "th", "th-th", "ti", "ti-er", "ti-et", "tk", "tk-tm", "to", "to-to", "tr", "tr-cy", "tr-tr", "tt", "tt-ru", "twq", "twq-ne", "tzm", "tzm-ma", "ug", "ug-cn", "uk", "uk-ua", "ur", "ur-in", "ur-pk", "uz", "uz-af", "uz-uz", "vai", "vai-lr", "vi", "vi-vn", "vo", "vo-001", "vun", "vun-tz", "wae", "wae-ch", "wo", "wo-sn", "xog", "xog-ug", "yav", "yav-cm", "yo", "yo-bj", "yo-ng", "yue", "yue-cn", "yue-hk", "zgh", "zgh-ma", "zh", "zh-cn", "zh-hk", "zh-mo", "zh-sg", "zh-tw", "zh-hans", "zh-hant", "zu", "zu-za"]
154
+ if @api_client.config.client_side_validation && opts[:'language'] && !allowable_values.include?(opts[:'language'])
155
+ fail ArgumentError, "invalid value for \"language\", must be one of #{allowable_values}"
156
+ end
157
+ allowable_values = ["LANDING_PAGE", "BLOG_POST", "SITE_PAGE", "DOCUMENT", "KNOWLEDGE_ARTICLE", "LISTING_PAGE"]
158
+ if @api_client.config.client_side_validation && opts[:'type'] && !opts[:'type'].all? { |item| allowable_values.include?(item) }
159
+ fail ArgumentError, "invalid value for \"type\", must include one of #{allowable_values}"
160
+ end
161
+ allowable_values = ["SHORT", "LONG"]
162
+ if @api_client.config.client_side_validation && opts[:'length'] && !allowable_values.include?(opts[:'length'])
163
+ fail ArgumentError, "invalid value for \"length\", must be one of #{allowable_values}"
164
+ end
165
+ # resource path
166
+ local_var_path = '/cms/v3/site-search/search'
167
+
168
+ # query parameters
169
+ query_params = opts[:query_params] || {}
170
+ query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
171
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
172
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
173
+ query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
174
+ query_params[:'matchPrefix'] = opts[:'match_prefix'] if !opts[:'match_prefix'].nil?
175
+ query_params[:'autocomplete'] = opts[:'autocomplete'] if !opts[:'autocomplete'].nil?
176
+ query_params[:'popularityBoost'] = opts[:'popularity_boost'] if !opts[:'popularity_boost'].nil?
177
+ query_params[:'boostLimit'] = opts[:'boost_limit'] if !opts[:'boost_limit'].nil?
178
+ query_params[:'minScore'] = opts[:'min_score'] if !opts[:'min_score'].nil?
179
+ query_params[:'boostRecent'] = opts[:'boost_recent'] if !opts[:'boost_recent'].nil?
180
+ query_params[:'tableId'] = opts[:'table_id'] if !opts[:'table_id'].nil?
181
+ query_params[:'hubdbQuery'] = opts[:'hubdb_query'] if !opts[:'hubdb_query'].nil?
182
+ query_params[:'keyString'] = opts[:'key_string'] if !opts[:'key_string'].nil?
183
+ query_params[:'domain'] = @api_client.build_collection_param(opts[:'domain'], :multi) if !opts[:'domain'].nil?
184
+ query_params[:'type'] = @api_client.build_collection_param(opts[:'type'], :multi) if !opts[:'type'].nil?
185
+ query_params[:'pathPrefix'] = @api_client.build_collection_param(opts[:'path_prefix'], :multi) if !opts[:'path_prefix'].nil?
186
+ query_params[:'property'] = @api_client.build_collection_param(opts[:'property'], :multi) if !opts[:'property'].nil?
187
+ query_params[:'length'] = opts[:'length'] if !opts[:'length'].nil?
188
+ query_params[:'groupId'] = @api_client.build_collection_param(opts[:'group_id'], :multi) if !opts[:'group_id'].nil?
189
+
190
+ # header parameters
191
+ header_params = opts[:header_params] || {}
192
+ # HTTP header 'Accept' (if needed)
193
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
194
+
195
+ # form parameters
196
+ form_params = opts[:form_params] || {}
197
+
198
+ # http body (model)
199
+ post_body = opts[:body]
200
+
201
+ # return_type
202
+ return_type = opts[:return_type] || 'PublicSearchResults'
203
+
204
+ # auth_names
205
+ auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
206
+
207
+ new_options = opts.merge(
208
+ :header_params => header_params,
209
+ :query_params => query_params,
210
+ :form_params => form_params,
211
+ :body => post_body,
212
+ :auth_names => auth_names,
213
+ :return_type => return_type
214
+ )
215
+
216
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
217
+ if @api_client.config.debugging
218
+ @api_client.config.logger.debug "API called: DefaultApi#search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
219
+ end
220
+ return data, status_code, headers
221
+ end
222
+ end
223
+ end
224
+ end
225
+ end