phrase 4.7.0 → 4.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39,7 +39,7 @@ instance = Phrase::ProjectUpdateParameters.new(account_id: abcd1234,
39
39
  main_format: yml,
40
40
  media: Python,
41
41
  shares_translation_memory: true,
42
- project_image: [B@38c86702,
42
+ project_image: [B@3a00f386,
43
43
  remove_project_image: false,
44
44
  workflow: review,
45
45
  machine_translation_enabled: true,
@@ -17,7 +17,7 @@ require 'Phrase'
17
17
  instance = Phrase::ScreenshotUpdateParameters.new(branch: my-feature-branch,
18
18
  name: A screenshot name,
19
19
  description: A screenshot description,
20
- filename: [B@61e23a44)
20
+ filename: [B@3f51fcf5)
21
21
  ```
22
22
 
23
23
 
@@ -0,0 +1,508 @@
1
+ require 'cgi'
2
+
3
+ module Phrase
4
+ class JobAnnotationsApi
5
+ attr_accessor :api_client
6
+
7
+ def initialize(api_client = ApiClient.default)
8
+ @api_client = api_client
9
+ end
10
+ # Delete a job annotation
11
+ # Delete an annotation for a job.
12
+ # @param project_id [String] Project ID
13
+ # @param job_id [String] Job ID
14
+ # @param id [String] Name of the annotation to delete.
15
+ # @param [Hash] opts the optional parameters
16
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
17
+ # @option opts [String] :branch Branch to use
18
+ # @return [nil]
19
+ def job_annotation_delete(project_id, job_id, id, opts = {})
20
+ data, _status_code, _headers = job_annotation_delete_with_http_info(project_id, job_id, id, opts)
21
+ data
22
+ end
23
+
24
+ # Delete a job annotation
25
+ # Delete an annotation for a job.
26
+ # @param project_id [String] Project ID
27
+ # @param job_id [String] Job ID
28
+ # @param id [String] Name of the annotation to delete.
29
+ # @param [Hash] opts the optional parameters
30
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
31
+ # @option opts [String] :branch Branch to use
32
+ # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
33
+ def job_annotation_delete_with_http_info(project_id, job_id, id, opts = {})
34
+ if @api_client.config.debugging
35
+ @api_client.config.logger.debug 'Calling API: JobAnnotationsApi.job_annotation_delete ...'
36
+ end
37
+ # verify the required parameter 'project_id' is set
38
+ if @api_client.config.client_side_validation && project_id.nil?
39
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling JobAnnotationsApi.job_annotation_delete"
40
+ end
41
+ # verify the required parameter 'job_id' is set
42
+ if @api_client.config.client_side_validation && job_id.nil?
43
+ fail ArgumentError, "Missing the required parameter 'job_id' when calling JobAnnotationsApi.job_annotation_delete"
44
+ end
45
+ # verify the required parameter 'id' is set
46
+ if @api_client.config.client_side_validation && id.nil?
47
+ fail ArgumentError, "Missing the required parameter 'id' when calling JobAnnotationsApi.job_annotation_delete"
48
+ end
49
+ # resource path
50
+ local_var_path = '/projects/{project_id}/jobs/{job_id}/annotations/{id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'job_id' + '}', CGI.escape(job_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
51
+
52
+ # query parameters
53
+ query_params = opts[:query_params] || {}
54
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
55
+
56
+ # header parameters
57
+ header_params = opts[:header_params] || {}
58
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
59
+
60
+ # form parameters
61
+ form_params = opts[:form_params] || {}
62
+
63
+ # http body (model)
64
+ post_body = opts[:body]
65
+
66
+ # return_type
67
+ return_type = opts[:return_type]
68
+
69
+ # auth_names
70
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
71
+
72
+ new_options = opts.merge(
73
+ :header_params => header_params,
74
+ :query_params => query_params,
75
+ :form_params => form_params,
76
+ :body => post_body,
77
+ :auth_names => auth_names,
78
+ :return_type => return_type
79
+ )
80
+
81
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
82
+ if @api_client.config.debugging
83
+ @api_client.config.logger.debug "API called: JobAnnotationsApi#job_annotation_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
84
+ end
85
+ response = ::Phrase::Response.new(data, headers)
86
+ return response, status_code, headers
87
+ end
88
+
89
+ # Create/Update a job annotation
90
+ # Create or update an annotation for a job. If the annotation already exists, it will be updated; otherwise, a new annotation will be created.
91
+ # @param project_id [String] Project ID
92
+ # @param job_id [String] Job ID
93
+ # @param id [String] Name of the annotation to set or update.
94
+ # @param job_annotation_update_parameters [JobAnnotationUpdateParameters]
95
+ # @param [Hash] opts the optional parameters
96
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
97
+ # @return [JobAnnotation]
98
+ def job_annotation_update(project_id, job_id, id, job_annotation_update_parameters, opts = {})
99
+ data, _status_code, _headers = job_annotation_update_with_http_info(project_id, job_id, id, job_annotation_update_parameters, opts)
100
+ data
101
+ end
102
+
103
+ # Create/Update a job annotation
104
+ # Create or update an annotation for a job. If the annotation already exists, it will be updated; otherwise, a new annotation will be created.
105
+ # @param project_id [String] Project ID
106
+ # @param job_id [String] Job ID
107
+ # @param id [String] Name of the annotation to set or update.
108
+ # @param job_annotation_update_parameters [JobAnnotationUpdateParameters]
109
+ # @param [Hash] opts the optional parameters
110
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
111
+ # @return [Array<(Response<(JobAnnotation)>, Integer, Hash)>] Response<(JobAnnotation)> data, response status code and response headers
112
+ def job_annotation_update_with_http_info(project_id, job_id, id, job_annotation_update_parameters, opts = {})
113
+ if @api_client.config.debugging
114
+ @api_client.config.logger.debug 'Calling API: JobAnnotationsApi.job_annotation_update ...'
115
+ end
116
+ # verify the required parameter 'project_id' is set
117
+ if @api_client.config.client_side_validation && project_id.nil?
118
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling JobAnnotationsApi.job_annotation_update"
119
+ end
120
+ # verify the required parameter 'job_id' is set
121
+ if @api_client.config.client_side_validation && job_id.nil?
122
+ fail ArgumentError, "Missing the required parameter 'job_id' when calling JobAnnotationsApi.job_annotation_update"
123
+ end
124
+ # verify the required parameter 'id' is set
125
+ if @api_client.config.client_side_validation && id.nil?
126
+ fail ArgumentError, "Missing the required parameter 'id' when calling JobAnnotationsApi.job_annotation_update"
127
+ end
128
+ # verify the required parameter 'job_annotation_update_parameters' is set
129
+ if @api_client.config.client_side_validation && job_annotation_update_parameters.nil?
130
+ fail ArgumentError, "Missing the required parameter 'job_annotation_update_parameters' when calling JobAnnotationsApi.job_annotation_update"
131
+ end
132
+ # resource path
133
+ local_var_path = '/projects/{project_id}/jobs/{job_id}/annotations/{id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'job_id' + '}', CGI.escape(job_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
134
+
135
+ # query parameters
136
+ query_params = opts[:query_params] || {}
137
+
138
+ # header parameters
139
+ header_params = opts[:header_params] || {}
140
+ # HTTP header 'Accept' (if needed)
141
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
142
+ # HTTP header 'Content-Type'
143
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
144
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
145
+
146
+ # form parameters
147
+ form_params = opts[:form_params] || {}
148
+
149
+ # http body (model)
150
+ post_body = opts[:body] || @api_client.object_to_http_body(job_annotation_update_parameters)
151
+
152
+ # return_type
153
+ return_type = opts[:return_type] || 'JobAnnotation'
154
+
155
+ # auth_names
156
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
157
+
158
+ new_options = opts.merge(
159
+ :header_params => header_params,
160
+ :query_params => query_params,
161
+ :form_params => form_params,
162
+ :body => post_body,
163
+ :auth_names => auth_names,
164
+ :return_type => return_type
165
+ )
166
+
167
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
168
+ if @api_client.config.debugging
169
+ @api_client.config.logger.debug "API called: JobAnnotationsApi#job_annotation_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
170
+ end
171
+ response = ::Phrase::Response.new(data, headers)
172
+ return response, status_code, headers
173
+ end
174
+
175
+ # List job annotations
176
+ # Retrieve a list of annotations for a job.
177
+ # @param project_id [String] Project ID
178
+ # @param job_id [String] Job ID
179
+ # @param [Hash] opts the optional parameters
180
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
181
+ # @option opts [String] :branch Branch to use
182
+ # @return [Array<JobAnnotation>]
183
+ def job_annotations_list(project_id, job_id, opts = {})
184
+ data, _status_code, _headers = job_annotations_list_with_http_info(project_id, job_id, opts)
185
+ data
186
+ end
187
+
188
+ # List job annotations
189
+ # Retrieve a list of annotations for a job.
190
+ # @param project_id [String] Project ID
191
+ # @param job_id [String] Job ID
192
+ # @param [Hash] opts the optional parameters
193
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
194
+ # @option opts [String] :branch Branch to use
195
+ # @return [Array<(Response<(Array<JobAnnotation>)>, Integer, Hash)>] Response<(Array<JobAnnotation>)> data, response status code and response headers
196
+ def job_annotations_list_with_http_info(project_id, job_id, opts = {})
197
+ if @api_client.config.debugging
198
+ @api_client.config.logger.debug 'Calling API: JobAnnotationsApi.job_annotations_list ...'
199
+ end
200
+ # verify the required parameter 'project_id' is set
201
+ if @api_client.config.client_side_validation && project_id.nil?
202
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling JobAnnotationsApi.job_annotations_list"
203
+ end
204
+ # verify the required parameter 'job_id' is set
205
+ if @api_client.config.client_side_validation && job_id.nil?
206
+ fail ArgumentError, "Missing the required parameter 'job_id' when calling JobAnnotationsApi.job_annotations_list"
207
+ end
208
+ # resource path
209
+ local_var_path = '/projects/{project_id}/jobs/{job_id}/annotations'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'job_id' + '}', CGI.escape(job_id.to_s))
210
+
211
+ # query parameters
212
+ query_params = opts[:query_params] || {}
213
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
214
+
215
+ # header parameters
216
+ header_params = opts[:header_params] || {}
217
+ # HTTP header 'Accept' (if needed)
218
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
219
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
220
+
221
+ # form parameters
222
+ form_params = opts[:form_params] || {}
223
+
224
+ # http body (model)
225
+ post_body = opts[:body]
226
+
227
+ # return_type
228
+ return_type = opts[:return_type] || 'Array<JobAnnotation>'
229
+
230
+ # auth_names
231
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
232
+
233
+ new_options = opts.merge(
234
+ :header_params => header_params,
235
+ :query_params => query_params,
236
+ :form_params => form_params,
237
+ :body => post_body,
238
+ :auth_names => auth_names,
239
+ :return_type => return_type
240
+ )
241
+
242
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
243
+ if @api_client.config.debugging
244
+ @api_client.config.logger.debug "API called: JobAnnotationsApi#job_annotations_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
245
+ end
246
+ response = ::Phrase::Response.new(data, headers)
247
+ return response, status_code, headers
248
+ end
249
+
250
+ # Delete a job locale annotation
251
+ # Delete an annotation for a job locale.
252
+ # @param project_id [String] Project ID
253
+ # @param job_id [String] Job ID
254
+ # @param job_locale_id [String] Job Locale ID
255
+ # @param id [String] Name of the annotation to delete.
256
+ # @param [Hash] opts the optional parameters
257
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
258
+ # @option opts [String] :branch Branch to use
259
+ # @return [nil]
260
+ def job_locale_annotation_delete(project_id, job_id, job_locale_id, id, opts = {})
261
+ data, _status_code, _headers = job_locale_annotation_delete_with_http_info(project_id, job_id, job_locale_id, id, opts)
262
+ data
263
+ end
264
+
265
+ # Delete a job locale annotation
266
+ # Delete an annotation for a job locale.
267
+ # @param project_id [String] Project ID
268
+ # @param job_id [String] Job ID
269
+ # @param job_locale_id [String] Job Locale ID
270
+ # @param id [String] Name of the annotation to delete.
271
+ # @param [Hash] opts the optional parameters
272
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
273
+ # @option opts [String] :branch Branch to use
274
+ # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
275
+ def job_locale_annotation_delete_with_http_info(project_id, job_id, job_locale_id, id, opts = {})
276
+ if @api_client.config.debugging
277
+ @api_client.config.logger.debug 'Calling API: JobAnnotationsApi.job_locale_annotation_delete ...'
278
+ end
279
+ # verify the required parameter 'project_id' is set
280
+ if @api_client.config.client_side_validation && project_id.nil?
281
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling JobAnnotationsApi.job_locale_annotation_delete"
282
+ end
283
+ # verify the required parameter 'job_id' is set
284
+ if @api_client.config.client_side_validation && job_id.nil?
285
+ fail ArgumentError, "Missing the required parameter 'job_id' when calling JobAnnotationsApi.job_locale_annotation_delete"
286
+ end
287
+ # verify the required parameter 'job_locale_id' is set
288
+ if @api_client.config.client_side_validation && job_locale_id.nil?
289
+ fail ArgumentError, "Missing the required parameter 'job_locale_id' when calling JobAnnotationsApi.job_locale_annotation_delete"
290
+ end
291
+ # verify the required parameter 'id' is set
292
+ if @api_client.config.client_side_validation && id.nil?
293
+ fail ArgumentError, "Missing the required parameter 'id' when calling JobAnnotationsApi.job_locale_annotation_delete"
294
+ end
295
+ # resource path
296
+ local_var_path = '/projects/{project_id}/jobs/{job_id}/locales/{job_locale_id}/annotations/{id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'job_id' + '}', CGI.escape(job_id.to_s)).sub('{' + 'job_locale_id' + '}', CGI.escape(job_locale_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
297
+
298
+ # query parameters
299
+ query_params = opts[:query_params] || {}
300
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
301
+
302
+ # header parameters
303
+ header_params = opts[:header_params] || {}
304
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
305
+
306
+ # form parameters
307
+ form_params = opts[:form_params] || {}
308
+
309
+ # http body (model)
310
+ post_body = opts[:body]
311
+
312
+ # return_type
313
+ return_type = opts[:return_type]
314
+
315
+ # auth_names
316
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
317
+
318
+ new_options = opts.merge(
319
+ :header_params => header_params,
320
+ :query_params => query_params,
321
+ :form_params => form_params,
322
+ :body => post_body,
323
+ :auth_names => auth_names,
324
+ :return_type => return_type
325
+ )
326
+
327
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
328
+ if @api_client.config.debugging
329
+ @api_client.config.logger.debug "API called: JobAnnotationsApi#job_locale_annotation_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
330
+ end
331
+ response = ::Phrase::Response.new(data, headers)
332
+ return response, status_code, headers
333
+ end
334
+
335
+ # Create/Update a job locale annotation
336
+ # Create or update an annotation for a job locale. If the annotation already exists, it will be updated; otherwise, a new annotation will be created.
337
+ # @param project_id [String] Project ID
338
+ # @param job_id [String] Job ID
339
+ # @param job_locale_id [String] Job Locale ID
340
+ # @param id [String] Name of the annotation to set or update.
341
+ # @param job_annotation_update_parameters [JobAnnotationUpdateParameters]
342
+ # @param [Hash] opts the optional parameters
343
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
344
+ # @return [JobAnnotation]
345
+ def job_locale_annotation_update(project_id, job_id, job_locale_id, id, job_annotation_update_parameters, opts = {})
346
+ data, _status_code, _headers = job_locale_annotation_update_with_http_info(project_id, job_id, job_locale_id, id, job_annotation_update_parameters, opts)
347
+ data
348
+ end
349
+
350
+ # Create/Update a job locale annotation
351
+ # Create or update an annotation for a job locale. If the annotation already exists, it will be updated; otherwise, a new annotation will be created.
352
+ # @param project_id [String] Project ID
353
+ # @param job_id [String] Job ID
354
+ # @param job_locale_id [String] Job Locale ID
355
+ # @param id [String] Name of the annotation to set or update.
356
+ # @param job_annotation_update_parameters [JobAnnotationUpdateParameters]
357
+ # @param [Hash] opts the optional parameters
358
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
359
+ # @return [Array<(Response<(JobAnnotation)>, Integer, Hash)>] Response<(JobAnnotation)> data, response status code and response headers
360
+ def job_locale_annotation_update_with_http_info(project_id, job_id, job_locale_id, id, job_annotation_update_parameters, opts = {})
361
+ if @api_client.config.debugging
362
+ @api_client.config.logger.debug 'Calling API: JobAnnotationsApi.job_locale_annotation_update ...'
363
+ end
364
+ # verify the required parameter 'project_id' is set
365
+ if @api_client.config.client_side_validation && project_id.nil?
366
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling JobAnnotationsApi.job_locale_annotation_update"
367
+ end
368
+ # verify the required parameter 'job_id' is set
369
+ if @api_client.config.client_side_validation && job_id.nil?
370
+ fail ArgumentError, "Missing the required parameter 'job_id' when calling JobAnnotationsApi.job_locale_annotation_update"
371
+ end
372
+ # verify the required parameter 'job_locale_id' is set
373
+ if @api_client.config.client_side_validation && job_locale_id.nil?
374
+ fail ArgumentError, "Missing the required parameter 'job_locale_id' when calling JobAnnotationsApi.job_locale_annotation_update"
375
+ end
376
+ # verify the required parameter 'id' is set
377
+ if @api_client.config.client_side_validation && id.nil?
378
+ fail ArgumentError, "Missing the required parameter 'id' when calling JobAnnotationsApi.job_locale_annotation_update"
379
+ end
380
+ # verify the required parameter 'job_annotation_update_parameters' is set
381
+ if @api_client.config.client_side_validation && job_annotation_update_parameters.nil?
382
+ fail ArgumentError, "Missing the required parameter 'job_annotation_update_parameters' when calling JobAnnotationsApi.job_locale_annotation_update"
383
+ end
384
+ # resource path
385
+ local_var_path = '/projects/{project_id}/jobs/{job_id}/locales/{job_locale_id}/annotations/{id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'job_id' + '}', CGI.escape(job_id.to_s)).sub('{' + 'job_locale_id' + '}', CGI.escape(job_locale_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
386
+
387
+ # query parameters
388
+ query_params = opts[:query_params] || {}
389
+
390
+ # header parameters
391
+ header_params = opts[:header_params] || {}
392
+ # HTTP header 'Accept' (if needed)
393
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
394
+ # HTTP header 'Content-Type'
395
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
396
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
397
+
398
+ # form parameters
399
+ form_params = opts[:form_params] || {}
400
+
401
+ # http body (model)
402
+ post_body = opts[:body] || @api_client.object_to_http_body(job_annotation_update_parameters)
403
+
404
+ # return_type
405
+ return_type = opts[:return_type] || 'JobAnnotation'
406
+
407
+ # auth_names
408
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
409
+
410
+ new_options = opts.merge(
411
+ :header_params => header_params,
412
+ :query_params => query_params,
413
+ :form_params => form_params,
414
+ :body => post_body,
415
+ :auth_names => auth_names,
416
+ :return_type => return_type
417
+ )
418
+
419
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
420
+ if @api_client.config.debugging
421
+ @api_client.config.logger.debug "API called: JobAnnotationsApi#job_locale_annotation_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
422
+ end
423
+ response = ::Phrase::Response.new(data, headers)
424
+ return response, status_code, headers
425
+ end
426
+
427
+ # List job locale annotations
428
+ # Retrieve a list of annotations for a job locale.
429
+ # @param project_id [String] Project ID
430
+ # @param job_id [String] Job ID
431
+ # @param job_locale_id [String] Job Locale ID
432
+ # @param [Hash] opts the optional parameters
433
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
434
+ # @option opts [String] :branch Branch to use
435
+ # @return [Array<JobAnnotation>]
436
+ def job_locale_annotations_list(project_id, job_id, job_locale_id, opts = {})
437
+ data, _status_code, _headers = job_locale_annotations_list_with_http_info(project_id, job_id, job_locale_id, opts)
438
+ data
439
+ end
440
+
441
+ # List job locale annotations
442
+ # Retrieve a list of annotations for a job locale.
443
+ # @param project_id [String] Project ID
444
+ # @param job_id [String] Job ID
445
+ # @param job_locale_id [String] Job Locale ID
446
+ # @param [Hash] opts the optional parameters
447
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
448
+ # @option opts [String] :branch Branch to use
449
+ # @return [Array<(Response<(Array<JobAnnotation>)>, Integer, Hash)>] Response<(Array<JobAnnotation>)> data, response status code and response headers
450
+ def job_locale_annotations_list_with_http_info(project_id, job_id, job_locale_id, opts = {})
451
+ if @api_client.config.debugging
452
+ @api_client.config.logger.debug 'Calling API: JobAnnotationsApi.job_locale_annotations_list ...'
453
+ end
454
+ # verify the required parameter 'project_id' is set
455
+ if @api_client.config.client_side_validation && project_id.nil?
456
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling JobAnnotationsApi.job_locale_annotations_list"
457
+ end
458
+ # verify the required parameter 'job_id' is set
459
+ if @api_client.config.client_side_validation && job_id.nil?
460
+ fail ArgumentError, "Missing the required parameter 'job_id' when calling JobAnnotationsApi.job_locale_annotations_list"
461
+ end
462
+ # verify the required parameter 'job_locale_id' is set
463
+ if @api_client.config.client_side_validation && job_locale_id.nil?
464
+ fail ArgumentError, "Missing the required parameter 'job_locale_id' when calling JobAnnotationsApi.job_locale_annotations_list"
465
+ end
466
+ # resource path
467
+ local_var_path = '/projects/{project_id}/jobs/{job_id}/locales/{job_locale_id}/annotations'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'job_id' + '}', CGI.escape(job_id.to_s)).sub('{' + 'job_locale_id' + '}', CGI.escape(job_locale_id.to_s))
468
+
469
+ # query parameters
470
+ query_params = opts[:query_params] || {}
471
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
472
+
473
+ # header parameters
474
+ header_params = opts[:header_params] || {}
475
+ # HTTP header 'Accept' (if needed)
476
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
477
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
478
+
479
+ # form parameters
480
+ form_params = opts[:form_params] || {}
481
+
482
+ # http body (model)
483
+ post_body = opts[:body]
484
+
485
+ # return_type
486
+ return_type = opts[:return_type] || 'Array<JobAnnotation>'
487
+
488
+ # auth_names
489
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
490
+
491
+ new_options = opts.merge(
492
+ :header_params => header_params,
493
+ :query_params => query_params,
494
+ :form_params => form_params,
495
+ :body => post_body,
496
+ :auth_names => auth_names,
497
+ :return_type => return_type
498
+ )
499
+
500
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
501
+ if @api_client.config.debugging
502
+ @api_client.config.logger.debug "API called: JobAnnotationsApi#job_locale_annotations_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
503
+ end
504
+ response = ::Phrase::Response.new(data, headers)
505
+ return response, status_code, headers
506
+ end
507
+ end
508
+ end
@@ -352,6 +352,7 @@ module Phrase
352
352
  # @param [Hash] opts the optional parameters
353
353
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
354
354
  # @option opts [String] :branch Branch to use
355
+ # @option opts [Boolean] :include_annotations Include job-locale annotations in the response (default to false)
355
356
  # @return [JobLocale]
356
357
  def job_locale_show(project_id, job_id, id, opts = {})
357
358
  data, _status_code, _headers = job_locale_show_with_http_info(project_id, job_id, id, opts)
@@ -366,6 +367,7 @@ module Phrase
366
367
  # @param [Hash] opts the optional parameters
367
368
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
368
369
  # @option opts [String] :branch Branch to use
370
+ # @option opts [Boolean] :include_annotations Include job-locale annotations in the response
369
371
  # @return [Array<(Response<(JobLocale)>, Integer, Hash)>] Response<(JobLocale)> data, response status code and response headers
370
372
  def job_locale_show_with_http_info(project_id, job_id, id, opts = {})
371
373
  if @api_client.config.debugging
@@ -389,6 +391,7 @@ module Phrase
389
391
  # query parameters
390
392
  query_params = opts[:query_params] || {}
391
393
  query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
394
+ query_params[:'include_annotations'] = opts[:'include_annotations'] if !opts[:'include_annotations'].nil?
392
395
 
393
396
  # header parameters
394
397
  header_params = opts[:header_params] || {}
@@ -600,6 +603,7 @@ module Phrase
600
603
  # @option opts [Integer] :page Page number
601
604
  # @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
602
605
  # @option opts [String] :branch Branch to use
606
+ # @option opts [Boolean] :include_annotations Include job-locale annotations in the response (default to false)
603
607
  # @return [Array<JobLocale>]
604
608
  def job_locales_list(project_id, job_id, opts = {})
605
609
  data, _status_code, _headers = job_locales_list_with_http_info(project_id, job_id, opts)
@@ -615,6 +619,7 @@ module Phrase
615
619
  # @option opts [Integer] :page Page number
616
620
  # @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
617
621
  # @option opts [String] :branch Branch to use
622
+ # @option opts [Boolean] :include_annotations Include job-locale annotations in the response
618
623
  # @return [Array<(Response<(Array<JobLocale>)>, Integer, Hash)>] Response<(Array<JobLocale>)> data, response status code and response headers
619
624
  def job_locales_list_with_http_info(project_id, job_id, opts = {})
620
625
  if @api_client.config.debugging
@@ -636,6 +641,7 @@ module Phrase
636
641
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
637
642
  query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
638
643
  query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
644
+ query_params[:'include_annotations'] = opts[:'include_annotations'] if !opts[:'include_annotations'].nil?
639
645
 
640
646
  # header parameters
641
647
  header_params = opts[:header_params] || {}
@@ -551,7 +551,8 @@ module Phrase
551
551
  # @param id [String] ID
552
552
  # @param [Hash] opts the optional parameters
553
553
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
554
- # @option opts [String] :branch specify the branch to use
554
+ # @option opts [String] :branch Branch to use
555
+ # @option opts [Boolean] :include_annotations Include job-locale annotations in the response (default to false)
555
556
  # @return [JobDetails]
556
557
  def job_show(project_id, id, opts = {})
557
558
  data, _status_code, _headers = job_show_with_http_info(project_id, id, opts)
@@ -564,7 +565,8 @@ module Phrase
564
565
  # @param id [String] ID
565
566
  # @param [Hash] opts the optional parameters
566
567
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
567
- # @option opts [String] :branch specify the branch to use
568
+ # @option opts [String] :branch Branch to use
569
+ # @option opts [Boolean] :include_annotations Include job-locale annotations in the response
568
570
  # @return [Array<(Response<(JobDetails)>, Integer, Hash)>] Response<(JobDetails)> data, response status code and response headers
569
571
  def job_show_with_http_info(project_id, id, opts = {})
570
572
  if @api_client.config.debugging
@@ -584,6 +586,7 @@ module Phrase
584
586
  # query parameters
585
587
  query_params = opts[:query_params] || {}
586
588
  query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
589
+ query_params[:'include_annotations'] = opts[:'include_annotations'] if !opts[:'include_annotations'].nil?
587
590
 
588
591
  # header parameters
589
592
  header_params = opts[:header_params] || {}