phrase 1.0.12 → 1.0.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -167,6 +167,9 @@ require 'phrase/models/upload_create_parameters'
167
167
  require 'phrase/models/upload_summary'
168
168
  require 'phrase/models/user'
169
169
  require 'phrase/models/user_preview'
170
+ require 'phrase/models/variable'
171
+ require 'phrase/models/variable_create_parameters'
172
+ require 'phrase/models/variable_update_parameters'
170
173
  require 'phrase/models/webhook'
171
174
  require 'phrase/models/webhook_create_parameters'
172
175
  require 'phrase/models/webhook_update_parameters'
@@ -204,6 +207,7 @@ require 'phrase/api/teams_api'
204
207
  require 'phrase/api/translations_api'
205
208
  require 'phrase/api/uploads_api'
206
209
  require 'phrase/api/users_api'
210
+ require 'phrase/api/variables_api'
207
211
  require 'phrase/api/versions_history_api'
208
212
  require 'phrase/api/webhooks_api'
209
213
 
@@ -0,0 +1,378 @@
1
+ require 'cgi'
2
+
3
+ module Phrase
4
+ class VariablesApi
5
+ attr_accessor :api_client
6
+
7
+ def initialize(api_client = ApiClient.default)
8
+ @api_client = api_client
9
+ end
10
+ # Create a variable
11
+ # Create a new variable.
12
+ # @param project_id [String] Project ID
13
+ # @param variable_create_parameters [VariableCreateParameters]
14
+ # @param [Hash] opts the optional parameters
15
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
16
+ # @return [Variable]
17
+ def variable_create(project_id, variable_create_parameters, opts = {})
18
+ data, _status_code, _headers = variable_create_with_http_info(project_id, variable_create_parameters, opts)
19
+ data
20
+ end
21
+
22
+ # Create a variable
23
+ # Create a new variable.
24
+ # @param project_id [String] Project ID
25
+ # @param variable_create_parameters [VariableCreateParameters]
26
+ # @param [Hash] opts the optional parameters
27
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
28
+ # @return [Array<(Response<(Variable)>, Integer, Hash)>] Response<(Variable)> data, response status code and response headers
29
+ def variable_create_with_http_info(project_id, variable_create_parameters, opts = {})
30
+ if @api_client.config.debugging
31
+ @api_client.config.logger.debug 'Calling API: VariablesApi.variable_create ...'
32
+ end
33
+ # verify the required parameter 'project_id' is set
34
+ if @api_client.config.client_side_validation && project_id.nil?
35
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling VariablesApi.variable_create"
36
+ end
37
+ # verify the required parameter 'variable_create_parameters' is set
38
+ if @api_client.config.client_side_validation && variable_create_parameters.nil?
39
+ fail ArgumentError, "Missing the required parameter 'variable_create_parameters' when calling VariablesApi.variable_create"
40
+ end
41
+ # resource path
42
+ local_var_path = '/projects/{project_id}/variables'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
43
+
44
+ # query parameters
45
+ query_params = opts[:query_params] || {}
46
+
47
+ # header parameters
48
+ header_params = opts[:header_params] || {}
49
+ # HTTP header 'Accept' (if needed)
50
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
51
+ # HTTP header 'Content-Type'
52
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
53
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
54
+
55
+ # form parameters
56
+ form_params = opts[:form_params] || {}
57
+
58
+ # http body (model)
59
+ post_body = opts[:body] || @api_client.object_to_http_body(variable_create_parameters)
60
+
61
+ # return_type
62
+ return_type = opts[:return_type] || 'Variable'
63
+
64
+ # auth_names
65
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
66
+
67
+ new_options = opts.merge(
68
+ :header_params => header_params,
69
+ :query_params => query_params,
70
+ :form_params => form_params,
71
+ :body => post_body,
72
+ :auth_names => auth_names,
73
+ :return_type => return_type
74
+ )
75
+
76
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
77
+ if @api_client.config.debugging
78
+ @api_client.config.logger.debug "API called: VariablesApi#variable_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
79
+ end
80
+ response = ::Phrase::Response.new(data, headers)
81
+ return response, status_code, headers
82
+ end
83
+
84
+ # Delete a variable
85
+ # Delete an existing variable.
86
+ # @param project_id [String] Project ID
87
+ # @param name [String] name
88
+ # @param [Hash] opts the optional parameters
89
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
90
+ # @return [nil]
91
+ def variable_delete(project_id, name, opts = {})
92
+ data, _status_code, _headers = variable_delete_with_http_info(project_id, name, opts)
93
+ data
94
+ end
95
+
96
+ # Delete a variable
97
+ # Delete an existing variable.
98
+ # @param project_id [String] Project ID
99
+ # @param name [String] name
100
+ # @param [Hash] opts the optional parameters
101
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
102
+ # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
103
+ def variable_delete_with_http_info(project_id, name, opts = {})
104
+ if @api_client.config.debugging
105
+ @api_client.config.logger.debug 'Calling API: VariablesApi.variable_delete ...'
106
+ end
107
+ # verify the required parameter 'project_id' is set
108
+ if @api_client.config.client_side_validation && project_id.nil?
109
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling VariablesApi.variable_delete"
110
+ end
111
+ # verify the required parameter 'name' is set
112
+ if @api_client.config.client_side_validation && name.nil?
113
+ fail ArgumentError, "Missing the required parameter 'name' when calling VariablesApi.variable_delete"
114
+ end
115
+ # resource path
116
+ local_var_path = '/projects/{project_id}/variables/{name}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'name' + '}', CGI.escape(name.to_s))
117
+
118
+ # query parameters
119
+ query_params = opts[:query_params] || {}
120
+
121
+ # header parameters
122
+ header_params = opts[:header_params] || {}
123
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
124
+
125
+ # form parameters
126
+ form_params = opts[:form_params] || {}
127
+
128
+ # http body (model)
129
+ post_body = opts[:body]
130
+
131
+ # return_type
132
+ return_type = opts[:return_type]
133
+
134
+ # auth_names
135
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
136
+
137
+ new_options = opts.merge(
138
+ :header_params => header_params,
139
+ :query_params => query_params,
140
+ :form_params => form_params,
141
+ :body => post_body,
142
+ :auth_names => auth_names,
143
+ :return_type => return_type
144
+ )
145
+
146
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
147
+ if @api_client.config.debugging
148
+ @api_client.config.logger.debug "API called: VariablesApi#variable_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
149
+ end
150
+ response = ::Phrase::Response.new(data, headers)
151
+ return response, status_code, headers
152
+ end
153
+
154
+ # Get a single variable
155
+ # Get details on a single variable for a given project.
156
+ # @param project_id [String] Project ID
157
+ # @param name [String] name
158
+ # @param [Hash] opts the optional parameters
159
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
160
+ # @return [Variable]
161
+ def variable_show(project_id, name, opts = {})
162
+ data, _status_code, _headers = variable_show_with_http_info(project_id, name, opts)
163
+ data
164
+ end
165
+
166
+ # Get a single variable
167
+ # Get details on a single variable for a given project.
168
+ # @param project_id [String] Project ID
169
+ # @param name [String] name
170
+ # @param [Hash] opts the optional parameters
171
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
172
+ # @return [Array<(Response<(Variable)>, Integer, Hash)>] Response<(Variable)> data, response status code and response headers
173
+ def variable_show_with_http_info(project_id, name, opts = {})
174
+ if @api_client.config.debugging
175
+ @api_client.config.logger.debug 'Calling API: VariablesApi.variable_show ...'
176
+ end
177
+ # verify the required parameter 'project_id' is set
178
+ if @api_client.config.client_side_validation && project_id.nil?
179
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling VariablesApi.variable_show"
180
+ end
181
+ # verify the required parameter 'name' is set
182
+ if @api_client.config.client_side_validation && name.nil?
183
+ fail ArgumentError, "Missing the required parameter 'name' when calling VariablesApi.variable_show"
184
+ end
185
+ # resource path
186
+ local_var_path = '/projects/{project_id}/variables/{name}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'name' + '}', CGI.escape(name.to_s))
187
+
188
+ # query parameters
189
+ query_params = opts[:query_params] || {}
190
+
191
+ # header parameters
192
+ header_params = opts[:header_params] || {}
193
+ # HTTP header 'Accept' (if needed)
194
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
195
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
196
+
197
+ # form parameters
198
+ form_params = opts[:form_params] || {}
199
+
200
+ # http body (model)
201
+ post_body = opts[:body]
202
+
203
+ # return_type
204
+ return_type = opts[:return_type] || 'Variable'
205
+
206
+ # auth_names
207
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
208
+
209
+ new_options = opts.merge(
210
+ :header_params => header_params,
211
+ :query_params => query_params,
212
+ :form_params => form_params,
213
+ :body => post_body,
214
+ :auth_names => auth_names,
215
+ :return_type => return_type
216
+ )
217
+
218
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
219
+ if @api_client.config.debugging
220
+ @api_client.config.logger.debug "API called: VariablesApi#variable_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
221
+ end
222
+ response = ::Phrase::Response.new(data, headers)
223
+ return response, status_code, headers
224
+ end
225
+
226
+ # Update a variable
227
+ # Update an existing variable.
228
+ # @param project_id [String] Project ID
229
+ # @param name [String] name
230
+ # @param variable_update_parameters [VariableUpdateParameters]
231
+ # @param [Hash] opts the optional parameters
232
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
233
+ # @return [Variable]
234
+ def variable_update(project_id, name, variable_update_parameters, opts = {})
235
+ data, _status_code, _headers = variable_update_with_http_info(project_id, name, variable_update_parameters, opts)
236
+ data
237
+ end
238
+
239
+ # Update a variable
240
+ # Update an existing variable.
241
+ # @param project_id [String] Project ID
242
+ # @param name [String] name
243
+ # @param variable_update_parameters [VariableUpdateParameters]
244
+ # @param [Hash] opts the optional parameters
245
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
246
+ # @return [Array<(Response<(Variable)>, Integer, Hash)>] Response<(Variable)> data, response status code and response headers
247
+ def variable_update_with_http_info(project_id, name, variable_update_parameters, opts = {})
248
+ if @api_client.config.debugging
249
+ @api_client.config.logger.debug 'Calling API: VariablesApi.variable_update ...'
250
+ end
251
+ # verify the required parameter 'project_id' is set
252
+ if @api_client.config.client_side_validation && project_id.nil?
253
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling VariablesApi.variable_update"
254
+ end
255
+ # verify the required parameter 'name' is set
256
+ if @api_client.config.client_side_validation && name.nil?
257
+ fail ArgumentError, "Missing the required parameter 'name' when calling VariablesApi.variable_update"
258
+ end
259
+ # verify the required parameter 'variable_update_parameters' is set
260
+ if @api_client.config.client_side_validation && variable_update_parameters.nil?
261
+ fail ArgumentError, "Missing the required parameter 'variable_update_parameters' when calling VariablesApi.variable_update"
262
+ end
263
+ # resource path
264
+ local_var_path = '/projects/{project_id}/variables/{name}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'name' + '}', CGI.escape(name.to_s))
265
+
266
+ # query parameters
267
+ query_params = opts[:query_params] || {}
268
+
269
+ # header parameters
270
+ header_params = opts[:header_params] || {}
271
+ # HTTP header 'Accept' (if needed)
272
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
273
+ # HTTP header 'Content-Type'
274
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
275
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
276
+
277
+ # form parameters
278
+ form_params = opts[:form_params] || {}
279
+
280
+ # http body (model)
281
+ post_body = opts[:body] || @api_client.object_to_http_body(variable_update_parameters)
282
+
283
+ # return_type
284
+ return_type = opts[:return_type] || 'Variable'
285
+
286
+ # auth_names
287
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
288
+
289
+ new_options = opts.merge(
290
+ :header_params => header_params,
291
+ :query_params => query_params,
292
+ :form_params => form_params,
293
+ :body => post_body,
294
+ :auth_names => auth_names,
295
+ :return_type => return_type
296
+ )
297
+
298
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
299
+ if @api_client.config.debugging
300
+ @api_client.config.logger.debug "API called: VariablesApi#variable_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
301
+ end
302
+ response = ::Phrase::Response.new(data, headers)
303
+ return response, status_code, headers
304
+ end
305
+
306
+ # List variables
307
+ # List all variables for the current project.
308
+ # @param project_id [String] Project ID
309
+ # @param [Hash] opts the optional parameters
310
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
311
+ # @option opts [Integer] :page Page number
312
+ # @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
313
+ # @return [Array<Variable>]
314
+ def variables_list(project_id, opts = {})
315
+ data, _status_code, _headers = variables_list_with_http_info(project_id, opts)
316
+ data
317
+ end
318
+
319
+ # List variables
320
+ # List all variables for the current project.
321
+ # @param project_id [String] Project ID
322
+ # @param [Hash] opts the optional parameters
323
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
324
+ # @option opts [Integer] :page Page number
325
+ # @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
326
+ # @return [Array<(Response<(Array<Variable>)>, Integer, Hash)>] Response<(Array<Variable>)> data, response status code and response headers
327
+ def variables_list_with_http_info(project_id, opts = {})
328
+ if @api_client.config.debugging
329
+ @api_client.config.logger.debug 'Calling API: VariablesApi.variables_list ...'
330
+ end
331
+ # verify the required parameter 'project_id' is set
332
+ if @api_client.config.client_side_validation && project_id.nil?
333
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling VariablesApi.variables_list"
334
+ end
335
+ # resource path
336
+ local_var_path = '/projects/{project_id}/variables'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
337
+
338
+ # query parameters
339
+ query_params = opts[:query_params] || {}
340
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
341
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
342
+
343
+ # header parameters
344
+ header_params = opts[:header_params] || {}
345
+ # HTTP header 'Accept' (if needed)
346
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
347
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
348
+
349
+ # form parameters
350
+ form_params = opts[:form_params] || {}
351
+
352
+ # http body (model)
353
+ post_body = opts[:body]
354
+
355
+ # return_type
356
+ return_type = opts[:return_type] || 'Array<Variable>'
357
+
358
+ # auth_names
359
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
360
+
361
+ new_options = opts.merge(
362
+ :header_params => header_params,
363
+ :query_params => query_params,
364
+ :form_params => form_params,
365
+ :body => post_body,
366
+ :auth_names => auth_names,
367
+ :return_type => return_type
368
+ )
369
+
370
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
371
+ if @api_client.config.debugging
372
+ @api_client.config.logger.debug "API called: VariablesApi#variables_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
373
+ end
374
+ response = ::Phrase::Response.new(data, headers)
375
+ return response, status_code, headers
376
+ end
377
+ end
378
+ end
@@ -2,45 +2,130 @@ require 'date'
2
2
 
3
3
  module Phrase
4
4
  class ProjectUpdateParameters
5
- # Name of the project
5
+ # Required if the requesting user is a member of multiple accounts. Account ID to specify the actual account the project should be created in.
6
+ attr_accessor :account_id
7
+
8
+ # (Optional) Name of the project
6
9
  attr_accessor :name
7
10
 
8
- # Main file format specified by its API Extension name. Used for locale downloads if no format is specified. For API Extension names of available file formats see <a href=\"https://help.phrase.com/help/supported-platforms-and-formats\">Format Guide</a> or our <a href=\"#formats\">Formats API Endpoint</a>.
11
+ # (Optional) Main file format specified by its API Extension name. Used for locale downloads if no format is specified. For API Extension names of available file formats see <a href=\"https://help.phrase.com/help/supported-platforms-and-formats\">Format Guide</a> or our <a href=\"#formats\">Formats API Endpoint</a>.
9
12
  attr_accessor :main_format
10
13
 
11
- # Indicates whether the project should share the account's translation memory
14
+ # (Optional) Indicates whether the project should share the account's translation memory
12
15
  attr_accessor :shares_translation_memory
13
16
 
14
- # Image to identify the project
17
+ # (Optional) Image to identify the project
15
18
  attr_accessor :project_image
16
19
 
17
- # Indicates whether the project image should be deleted.
20
+ # (Optional) Indicates whether the project image should be deleted.
18
21
  attr_accessor :remove_project_image
19
22
 
20
- # Account ID to specify the actual account the project should be created in. Required if the requesting user is a member of multiple accounts.
21
- attr_accessor :account_id
23
+ # (Optional) Review Workflow. \"simple\" / \"review\". <a href=\"https://help.phrase.com/help/advanced-review-workflow\">Read more</a>
24
+ attr_accessor :workflow
25
+
26
+ # (Optional) Enable machine translation support in the project. Required for Autopilot and Smart Suggest
27
+ attr_accessor :machine_translation_enabled
28
+
29
+ # (Optional) Enable branching in the project
30
+ attr_accessor :enable_branching
31
+
32
+ # (Optional) Protect the master branch in project where branching is enabled
33
+ attr_accessor :protect_master_branch
34
+
35
+ # (Optional) Otherwise, translators are not allowed to edit translations other than strings
36
+ attr_accessor :enable_all_data_type_translation_keys_for_translators
37
+
38
+ # (Optional) We can validate and highlight your ICU messages. <a href=\"https://help.phrase.com/help/icu-message-format\">Read more</a>
39
+ attr_accessor :enable_icu_message_format
40
+
41
+ # (Optional) Displays the input fields for the 'ZERO' plural form for every key as well although only some languages require the 'ZERO' explicitly.
42
+ attr_accessor :zero_plural_form_enabled
43
+
44
+ # (Optional) Autopilot, requires machine_translation_enabled. <a href=\"https://help.phrase.com/help/autopilot\">Read more</a>
45
+ attr_accessor :autotranslate_enabled
46
+
47
+ # (Optional) Requires autotranslate_enabled to be true
48
+ attr_accessor :autotranslate_check_new_translation_keys
49
+
50
+ # (Optional) Requires autotranslate_enabled to be true
51
+ attr_accessor :autotranslate_check_new_uploads
52
+
53
+ # (Optional) Requires autotranslate_enabled to be true
54
+ attr_accessor :autotranslate_check_new_locales
55
+
56
+ # (Optional) Requires autotranslate_enabled to be true
57
+ attr_accessor :autotranslate_mark_as_unverified
58
+
59
+ # (Optional) Requires autotranslate_enabled to be true
60
+ attr_accessor :autotranslate_use_machine_translation
61
+
62
+ # (Optional) Requires autotranslate_enabled to be true
63
+ attr_accessor :autotranslate_use_translation_memory
64
+
65
+ # (Optional) Smart Suggest, requires machine_translation_enabled
66
+ attr_accessor :smart_suggest_enabled
67
+
68
+ # (Optional) Requires smart_suggest_enabled to be true
69
+ attr_accessor :smart_suggest_use_glossary
70
+
71
+ # (Optional) Requires smart_suggest_enabled to be true
72
+ attr_accessor :smart_suggest_use_machine_translation
22
73
 
23
74
  # Attribute mapping from ruby-style variable name to JSON key.
24
75
  def self.attribute_map
25
76
  {
77
+ :'account_id' => :'account_id',
26
78
  :'name' => :'name',
27
79
  :'main_format' => :'main_format',
28
80
  :'shares_translation_memory' => :'shares_translation_memory',
29
81
  :'project_image' => :'project_image',
30
82
  :'remove_project_image' => :'remove_project_image',
31
- :'account_id' => :'account_id'
83
+ :'workflow' => :'workflow',
84
+ :'machine_translation_enabled' => :'machine_translation_enabled',
85
+ :'enable_branching' => :'enable_branching',
86
+ :'protect_master_branch' => :'protect_master_branch',
87
+ :'enable_all_data_type_translation_keys_for_translators' => :'enable_all_data_type_translation_keys_for_translators',
88
+ :'enable_icu_message_format' => :'enable_icu_message_format',
89
+ :'zero_plural_form_enabled' => :'zero_plural_form_enabled',
90
+ :'autotranslate_enabled' => :'autotranslate_enabled',
91
+ :'autotranslate_check_new_translation_keys' => :'autotranslate_check_new_translation_keys',
92
+ :'autotranslate_check_new_uploads' => :'autotranslate_check_new_uploads',
93
+ :'autotranslate_check_new_locales' => :'autotranslate_check_new_locales',
94
+ :'autotranslate_mark_as_unverified' => :'autotranslate_mark_as_unverified',
95
+ :'autotranslate_use_machine_translation' => :'autotranslate_use_machine_translation',
96
+ :'autotranslate_use_translation_memory' => :'autotranslate_use_translation_memory',
97
+ :'smart_suggest_enabled' => :'smart_suggest_enabled',
98
+ :'smart_suggest_use_glossary' => :'smart_suggest_use_glossary',
99
+ :'smart_suggest_use_machine_translation' => :'smart_suggest_use_machine_translation'
32
100
  }
33
101
  end
34
102
 
35
103
  # Attribute type mapping.
36
104
  def self.openapi_types
37
105
  {
106
+ :'account_id' => :'String',
38
107
  :'name' => :'String',
39
108
  :'main_format' => :'String',
40
109
  :'shares_translation_memory' => :'Boolean',
41
110
  :'project_image' => :'File',
42
111
  :'remove_project_image' => :'Boolean',
43
- :'account_id' => :'String'
112
+ :'workflow' => :'String',
113
+ :'machine_translation_enabled' => :'Boolean',
114
+ :'enable_branching' => :'Boolean',
115
+ :'protect_master_branch' => :'Boolean',
116
+ :'enable_all_data_type_translation_keys_for_translators' => :'Boolean',
117
+ :'enable_icu_message_format' => :'Boolean',
118
+ :'zero_plural_form_enabled' => :'Boolean',
119
+ :'autotranslate_enabled' => :'Boolean',
120
+ :'autotranslate_check_new_translation_keys' => :'Boolean',
121
+ :'autotranslate_check_new_uploads' => :'Boolean',
122
+ :'autotranslate_check_new_locales' => :'Boolean',
123
+ :'autotranslate_mark_as_unverified' => :'Boolean',
124
+ :'autotranslate_use_machine_translation' => :'Boolean',
125
+ :'autotranslate_use_translation_memory' => :'Boolean',
126
+ :'smart_suggest_enabled' => :'Boolean',
127
+ :'smart_suggest_use_glossary' => :'Boolean',
128
+ :'smart_suggest_use_machine_translation' => :'Boolean'
44
129
  }
45
130
  end
46
131
 
@@ -65,6 +150,10 @@ module Phrase
65
150
  h[k.to_sym] = v
66
151
  }
67
152
 
153
+ if attributes.key?(:'account_id')
154
+ self.account_id = attributes[:'account_id']
155
+ end
156
+
68
157
  if attributes.key?(:'name')
69
158
  self.name = attributes[:'name']
70
159
  end
@@ -85,8 +174,72 @@ module Phrase
85
174
  self.remove_project_image = attributes[:'remove_project_image']
86
175
  end
87
176
 
88
- if attributes.key?(:'account_id')
89
- self.account_id = attributes[:'account_id']
177
+ if attributes.key?(:'workflow')
178
+ self.workflow = attributes[:'workflow']
179
+ end
180
+
181
+ if attributes.key?(:'machine_translation_enabled')
182
+ self.machine_translation_enabled = attributes[:'machine_translation_enabled']
183
+ end
184
+
185
+ if attributes.key?(:'enable_branching')
186
+ self.enable_branching = attributes[:'enable_branching']
187
+ end
188
+
189
+ if attributes.key?(:'protect_master_branch')
190
+ self.protect_master_branch = attributes[:'protect_master_branch']
191
+ end
192
+
193
+ if attributes.key?(:'enable_all_data_type_translation_keys_for_translators')
194
+ self.enable_all_data_type_translation_keys_for_translators = attributes[:'enable_all_data_type_translation_keys_for_translators']
195
+ end
196
+
197
+ if attributes.key?(:'enable_icu_message_format')
198
+ self.enable_icu_message_format = attributes[:'enable_icu_message_format']
199
+ end
200
+
201
+ if attributes.key?(:'zero_plural_form_enabled')
202
+ self.zero_plural_form_enabled = attributes[:'zero_plural_form_enabled']
203
+ end
204
+
205
+ if attributes.key?(:'autotranslate_enabled')
206
+ self.autotranslate_enabled = attributes[:'autotranslate_enabled']
207
+ end
208
+
209
+ if attributes.key?(:'autotranslate_check_new_translation_keys')
210
+ self.autotranslate_check_new_translation_keys = attributes[:'autotranslate_check_new_translation_keys']
211
+ end
212
+
213
+ if attributes.key?(:'autotranslate_check_new_uploads')
214
+ self.autotranslate_check_new_uploads = attributes[:'autotranslate_check_new_uploads']
215
+ end
216
+
217
+ if attributes.key?(:'autotranslate_check_new_locales')
218
+ self.autotranslate_check_new_locales = attributes[:'autotranslate_check_new_locales']
219
+ end
220
+
221
+ if attributes.key?(:'autotranslate_mark_as_unverified')
222
+ self.autotranslate_mark_as_unverified = attributes[:'autotranslate_mark_as_unverified']
223
+ end
224
+
225
+ if attributes.key?(:'autotranslate_use_machine_translation')
226
+ self.autotranslate_use_machine_translation = attributes[:'autotranslate_use_machine_translation']
227
+ end
228
+
229
+ if attributes.key?(:'autotranslate_use_translation_memory')
230
+ self.autotranslate_use_translation_memory = attributes[:'autotranslate_use_translation_memory']
231
+ end
232
+
233
+ if attributes.key?(:'smart_suggest_enabled')
234
+ self.smart_suggest_enabled = attributes[:'smart_suggest_enabled']
235
+ end
236
+
237
+ if attributes.key?(:'smart_suggest_use_glossary')
238
+ self.smart_suggest_use_glossary = attributes[:'smart_suggest_use_glossary']
239
+ end
240
+
241
+ if attributes.key?(:'smart_suggest_use_machine_translation')
242
+ self.smart_suggest_use_machine_translation = attributes[:'smart_suggest_use_machine_translation']
90
243
  end
91
244
  end
92
245
 
@@ -108,12 +261,29 @@ module Phrase
108
261
  def ==(o)
109
262
  return true if self.equal?(o)
110
263
  self.class == o.class &&
264
+ account_id == o.account_id &&
111
265
  name == o.name &&
112
266
  main_format == o.main_format &&
113
267
  shares_translation_memory == o.shares_translation_memory &&
114
268
  project_image == o.project_image &&
115
269
  remove_project_image == o.remove_project_image &&
116
- account_id == o.account_id
270
+ workflow == o.workflow &&
271
+ machine_translation_enabled == o.machine_translation_enabled &&
272
+ enable_branching == o.enable_branching &&
273
+ protect_master_branch == o.protect_master_branch &&
274
+ enable_all_data_type_translation_keys_for_translators == o.enable_all_data_type_translation_keys_for_translators &&
275
+ enable_icu_message_format == o.enable_icu_message_format &&
276
+ zero_plural_form_enabled == o.zero_plural_form_enabled &&
277
+ autotranslate_enabled == o.autotranslate_enabled &&
278
+ autotranslate_check_new_translation_keys == o.autotranslate_check_new_translation_keys &&
279
+ autotranslate_check_new_uploads == o.autotranslate_check_new_uploads &&
280
+ autotranslate_check_new_locales == o.autotranslate_check_new_locales &&
281
+ autotranslate_mark_as_unverified == o.autotranslate_mark_as_unverified &&
282
+ autotranslate_use_machine_translation == o.autotranslate_use_machine_translation &&
283
+ autotranslate_use_translation_memory == o.autotranslate_use_translation_memory &&
284
+ smart_suggest_enabled == o.smart_suggest_enabled &&
285
+ smart_suggest_use_glossary == o.smart_suggest_use_glossary &&
286
+ smart_suggest_use_machine_translation == o.smart_suggest_use_machine_translation
117
287
  end
118
288
 
119
289
  # @see the `==` method
@@ -125,7 +295,7 @@ module Phrase
125
295
  # Calculates hash code according to all attributes.
126
296
  # @return [Integer] Hash code
127
297
  def hash
128
- [name, main_format, shares_translation_memory, project_image, remove_project_image, account_id].hash
298
+ [account_id, name, main_format, shares_translation_memory, project_image, remove_project_image, workflow, machine_translation_enabled, enable_branching, protect_master_branch, enable_all_data_type_translation_keys_for_translators, enable_icu_message_format, zero_plural_form_enabled, autotranslate_enabled, autotranslate_check_new_translation_keys, autotranslate_check_new_uploads, autotranslate_check_new_locales, autotranslate_mark_as_unverified, autotranslate_use_machine_translation, autotranslate_use_translation_memory, smart_suggest_enabled, smart_suggest_use_glossary, smart_suggest_use_machine_translation].hash
129
299
  end
130
300
 
131
301
  # Builds the object from hash