phrase 1.0.12 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (172) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +56 -9
  3. data/docs/Account.md +3 -1
  4. data/docs/AccountDetails.md +5 -1
  5. data/docs/AccountDetails1.md +3 -1
  6. data/docs/AccountSearchResult.md +29 -0
  7. data/docs/Branch.md +5 -1
  8. data/docs/Comment.md +3 -1
  9. data/docs/CurrentUser.md +31 -0
  10. data/docs/JobLocale.md +5 -1
  11. data/docs/JobTemplate.md +29 -0
  12. data/docs/JobTemplateCreateParameters.md +21 -0
  13. data/docs/JobTemplateLocale.md +23 -0
  14. data/docs/JobTemplateLocaleUpdateParameters.md +23 -0
  15. data/docs/JobTemplateLocalesApi.md +347 -0
  16. data/docs/JobTemplateLocalesCreateParameters.md +23 -0
  17. data/docs/JobTemplatePreview.md +19 -0
  18. data/docs/JobTemplateUpdateParameters.md +21 -0
  19. data/docs/JobTemplateUserPreview.md +23 -0
  20. data/docs/JobTemplatesApi.md +337 -0
  21. data/docs/KeysApi.md +137 -9
  22. data/docs/KeysExcludeParameters.md +23 -0
  23. data/docs/KeysIncludeParameters.md +23 -0
  24. data/docs/KeysSearchParameters.md +1 -1
  25. data/docs/KeysTagParameters.md +1 -1
  26. data/docs/KeysUntagParameters.md +1 -1
  27. data/docs/LocalePreview1.md +23 -0
  28. data/docs/LocalesApi.md +73 -6
  29. data/docs/MemberSpaces.md +2 -2
  30. data/docs/MemberUpdateParameters.md +4 -2
  31. data/docs/Notification.md +41 -0
  32. data/docs/NotificationGroup.md +23 -0
  33. data/docs/NotificationGroupDetail.md +27 -0
  34. data/docs/NotificationGroupsApi.md +194 -0
  35. data/docs/NotificationsApi.md +194 -0
  36. data/docs/OrderCreateParameters.md +2 -0
  37. data/docs/Project.md +2 -0
  38. data/docs/ProjectCreateParameters.md +35 -1
  39. data/docs/ProjectDetails.md +2 -0
  40. data/docs/ProjectUpdateParameters.md +43 -9
  41. data/docs/ProjectsApi.md +7 -1
  42. data/docs/ScreenshotCreateParameters.md +3 -1
  43. data/docs/ScreenshotMarkerCreateParameters.md +3 -1
  44. data/docs/ScreenshotMarkerUpdateParameters.md +3 -1
  45. data/docs/ScreenshotMarkersApi.md +9 -3
  46. data/docs/ScreenshotUpdateParameters.md +3 -1
  47. data/docs/ScreenshotsApi.md +8 -2
  48. data/docs/SearchApi.md +72 -0
  49. data/docs/SearchInAccountParameters.md +23 -0
  50. data/docs/Space1.md +25 -0
  51. data/docs/Subscription.md +19 -0
  52. data/docs/TranslationOrder.md +2 -0
  53. data/docs/TranslationsApi.md +25 -25
  54. data/docs/User.md +0 -2
  55. data/docs/UsersApi.md +2 -2
  56. data/docs/Variable.md +23 -0
  57. data/docs/VariableCreateParameters.md +19 -0
  58. data/docs/VariableUpdateParameters.md +19 -0
  59. data/docs/VariablesApi.md +331 -0
  60. data/lib/phrase.rb +28 -0
  61. data/lib/phrase/api/job_template_locales_api.rb +417 -0
  62. data/lib/phrase/api/job_templates_api.rb +387 -0
  63. data/lib/phrase/api/keys_api.rb +158 -10
  64. data/lib/phrase/api/locales_api.rb +76 -5
  65. data/lib/phrase/api/notification_groups_api.rb +202 -0
  66. data/lib/phrase/api/notifications_api.rb +202 -0
  67. data/lib/phrase/api/projects_api.rb +9 -0
  68. data/lib/phrase/api/screenshot_markers_api.rb +9 -0
  69. data/lib/phrase/api/screenshots_api.rb +9 -0
  70. data/lib/phrase/api/search_api.rb +84 -0
  71. data/lib/phrase/api/translations_api.rb +35 -35
  72. data/lib/phrase/api/users_api.rb +3 -3
  73. data/lib/phrase/api/variables_api.rb +378 -0
  74. data/lib/phrase/models/account.rb +13 -4
  75. data/lib/phrase/models/account_details.rb +22 -4
  76. data/lib/phrase/models/account_details1.rb +10 -1
  77. data/lib/phrase/models/account_search_result.rb +250 -0
  78. data/lib/phrase/models/branch.rb +19 -1
  79. data/lib/phrase/models/comment.rb +15 -4
  80. data/lib/phrase/models/current_user.rb +257 -0
  81. data/lib/phrase/models/job_locale.rb +22 -4
  82. data/lib/phrase/models/job_template.rb +248 -0
  83. data/lib/phrase/models/job_template_create_parameters.rb +220 -0
  84. data/lib/phrase/models/job_template_locale.rb +223 -0
  85. data/lib/phrase/models/job_template_locale_update_parameters.rb +234 -0
  86. data/lib/phrase/models/job_template_locales_create_parameters.rb +234 -0
  87. data/lib/phrase/models/job_template_preview.rb +203 -0
  88. data/lib/phrase/models/job_template_update_parameters.rb +220 -0
  89. data/lib/phrase/models/job_template_user_preview.rb +221 -0
  90. data/lib/phrase/models/keys_exclude_parameters.rb +225 -0
  91. data/lib/phrase/models/keys_include_parameters.rb +225 -0
  92. data/lib/phrase/models/keys_search_parameters.rb +1 -1
  93. data/lib/phrase/models/keys_tag_parameters.rb +1 -1
  94. data/lib/phrase/models/keys_untag_parameters.rb +1 -1
  95. data/lib/phrase/models/locale_preview1.rb +221 -0
  96. data/lib/phrase/models/member_spaces.rb +2 -2
  97. data/lib/phrase/models/member_update_parameters.rb +12 -2
  98. data/lib/phrase/models/notification.rb +302 -0
  99. data/lib/phrase/models/notification_group.rb +221 -0
  100. data/lib/phrase/models/notification_group_detail.rb +239 -0
  101. data/lib/phrase/models/order_create_parameters.rb +11 -1
  102. data/lib/phrase/models/project.rb +10 -1
  103. data/lib/phrase/models/project_create_parameters.rb +174 -4
  104. data/lib/phrase/models/project_details.rb +10 -1
  105. data/lib/phrase/models/project_update_parameters.rb +183 -13
  106. data/lib/phrase/models/screenshot_create_parameters.rb +11 -1
  107. data/lib/phrase/models/screenshot_marker_create_parameters.rb +11 -1
  108. data/lib/phrase/models/screenshot_marker_update_parameters.rb +11 -1
  109. data/lib/phrase/models/screenshot_update_parameters.rb +11 -1
  110. data/lib/phrase/models/search_in_account_parameters.rb +225 -0
  111. data/lib/phrase/models/space1.rb +230 -0
  112. data/lib/phrase/models/subscription.rb +203 -0
  113. data/lib/phrase/models/translation_order.rb +10 -1
  114. data/lib/phrase/models/user.rb +1 -10
  115. data/lib/phrase/models/variable.rb +221 -0
  116. data/lib/phrase/models/variable_create_parameters.rb +205 -0
  117. data/lib/phrase/models/variable_update_parameters.rb +205 -0
  118. data/lib/phrase/version.rb +1 -1
  119. data/spec/api/job_template_locales_api_spec.rb +103 -0
  120. data/spec/api/job_templates_api_spec.rb +98 -0
  121. data/spec/api/keys_api_spec.rb +32 -4
  122. data/spec/api/locales_api_spec.rb +17 -2
  123. data/spec/api/notification_groups_api_spec.rb +62 -0
  124. data/spec/api/notifications_api_spec.rb +62 -0
  125. data/spec/api/projects_api_spec.rb +3 -0
  126. data/spec/api/screenshot_markers_api_spec.rb +3 -0
  127. data/spec/api/screenshots_api_spec.rb +3 -0
  128. data/spec/api/search_api_spec.rb +37 -0
  129. data/spec/api/translations_api_spec.rb +10 -10
  130. data/spec/api/users_api_spec.rb +1 -1
  131. data/spec/api/variables_api_spec.rb +95 -0
  132. data/spec/models/account_details1_spec.rb +6 -0
  133. data/spec/models/account_details_spec.rb +12 -0
  134. data/spec/models/account_search_result_spec.rb +65 -0
  135. data/spec/models/account_spec.rb +6 -0
  136. data/spec/models/branch_spec.rb +12 -0
  137. data/spec/models/comment_spec.rb +6 -0
  138. data/spec/models/current_user_spec.rb +71 -0
  139. data/spec/models/job_locale_spec.rb +12 -0
  140. data/spec/models/job_template_create_parameters_spec.rb +41 -0
  141. data/spec/models/job_template_locale_spec.rb +47 -0
  142. data/spec/models/job_template_locale_update_parameters_spec.rb +47 -0
  143. data/spec/models/job_template_locales_create_parameters_spec.rb +47 -0
  144. data/spec/models/job_template_preview_spec.rb +35 -0
  145. data/spec/models/job_template_spec.rb +65 -0
  146. data/spec/models/job_template_update_parameters_spec.rb +41 -0
  147. data/spec/models/job_template_user_preview_spec.rb +47 -0
  148. data/spec/models/keys_exclude_parameters_spec.rb +47 -0
  149. data/spec/models/keys_include_parameters_spec.rb +47 -0
  150. data/spec/models/locale_preview1_spec.rb +47 -0
  151. data/spec/models/member_update_parameters_spec.rb +6 -0
  152. data/spec/models/notification_group_detail_spec.rb +59 -0
  153. data/spec/models/notification_group_spec.rb +47 -0
  154. data/spec/models/notification_spec.rb +101 -0
  155. data/spec/models/order_create_parameters_spec.rb +6 -0
  156. data/spec/models/project_create_parameters_spec.rb +102 -0
  157. data/spec/models/project_details_spec.rb +6 -0
  158. data/spec/models/project_spec.rb +6 -0
  159. data/spec/models/project_update_parameters_spec.rb +103 -1
  160. data/spec/models/screenshot_create_parameters_spec.rb +6 -0
  161. data/spec/models/screenshot_marker_create_parameters_spec.rb +6 -0
  162. data/spec/models/screenshot_marker_update_parameters_spec.rb +6 -0
  163. data/spec/models/screenshot_update_parameters_spec.rb +6 -0
  164. data/spec/models/search_in_account_parameters_spec.rb +47 -0
  165. data/spec/models/space1_spec.rb +53 -0
  166. data/spec/models/subscription_spec.rb +35 -0
  167. data/spec/models/translation_order_spec.rb +6 -0
  168. data/spec/models/user_spec.rb +0 -6
  169. data/spec/models/variable_create_parameters_spec.rb +35 -0
  170. data/spec/models/variable_spec.rb +47 -0
  171. data/spec/models/variable_update_parameters_spec.rb +35 -0
  172. metadata +281 -169
@@ -5,6 +5,9 @@ module Phrase
5
5
  # specify the branch to use
6
6
  attr_accessor :branch
7
7
 
8
+ # the name of the order, default name is: Translation order from 'current datetime'
9
+ attr_accessor :name
10
+
8
11
  # Name of the LSP that should process this order. Can be one of gengo, textmaster.
9
12
  attr_accessor :lsp
10
13
 
@@ -48,6 +51,7 @@ module Phrase
48
51
  def self.attribute_map
49
52
  {
50
53
  :'branch' => :'branch',
54
+ :'name' => :'name',
51
55
  :'lsp' => :'lsp',
52
56
  :'source_locale_id' => :'source_locale_id',
53
57
  :'target_locale_ids' => :'target_locale_ids',
@@ -68,6 +72,7 @@ module Phrase
68
72
  def self.openapi_types
69
73
  {
70
74
  :'branch' => :'String',
75
+ :'name' => :'String',
71
76
  :'lsp' => :'String',
72
77
  :'source_locale_id' => :'String',
73
78
  :'target_locale_ids' => :'Array<String>',
@@ -109,6 +114,10 @@ module Phrase
109
114
  self.branch = attributes[:'branch']
110
115
  end
111
116
 
117
+ if attributes.key?(:'name')
118
+ self.name = attributes[:'name']
119
+ end
120
+
112
121
  if attributes.key?(:'lsp')
113
122
  self.lsp = attributes[:'lsp']
114
123
  end
@@ -183,6 +192,7 @@ module Phrase
183
192
  return true if self.equal?(o)
184
193
  self.class == o.class &&
185
194
  branch == o.branch &&
195
+ name == o.name &&
186
196
  lsp == o.lsp &&
187
197
  source_locale_id == o.source_locale_id &&
188
198
  target_locale_ids == o.target_locale_ids &&
@@ -207,7 +217,7 @@ module Phrase
207
217
  # Calculates hash code according to all attributes.
208
218
  # @return [Integer] Hash code
209
219
  def hash
210
- [branch, lsp, source_locale_id, target_locale_ids, translation_type, tag, message, styleguide_id, unverify_translations_upon_delivery, include_untranslated_keys, include_unverified_translations, category, quality, priority].hash
220
+ [branch, name, lsp, source_locale_id, target_locale_ids, translation_type, tag, message, styleguide_id, unverify_translations_upon_delivery, include_untranslated_keys, include_unverified_translations, category, quality, priority].hash
211
221
  end
212
222
 
213
223
  # Builds the object from hash
@@ -14,6 +14,8 @@ module Phrase
14
14
 
15
15
  attr_accessor :account
16
16
 
17
+ attr_accessor :space
18
+
17
19
  attr_accessor :created_at
18
20
 
19
21
  attr_accessor :updated_at
@@ -27,6 +29,7 @@ module Phrase
27
29
  :'main_format' => :'main_format',
28
30
  :'project_image_url' => :'project_image_url',
29
31
  :'account' => :'account',
32
+ :'space' => :'space',
30
33
  :'created_at' => :'created_at',
31
34
  :'updated_at' => :'updated_at'
32
35
  }
@@ -41,6 +44,7 @@ module Phrase
41
44
  :'main_format' => :'String',
42
45
  :'project_image_url' => :'String',
43
46
  :'account' => :'Account',
47
+ :'space' => :'Space1',
44
48
  :'created_at' => :'DateTime',
45
49
  :'updated_at' => :'DateTime'
46
50
  }
@@ -91,6 +95,10 @@ module Phrase
91
95
  self.account = attributes[:'account']
92
96
  end
93
97
 
98
+ if attributes.key?(:'space')
99
+ self.space = attributes[:'space']
100
+ end
101
+
94
102
  if attributes.key?(:'created_at')
95
103
  self.created_at = attributes[:'created_at']
96
104
  end
@@ -124,6 +132,7 @@ module Phrase
124
132
  main_format == o.main_format &&
125
133
  project_image_url == o.project_image_url &&
126
134
  account == o.account &&
135
+ space == o.space &&
127
136
  created_at == o.created_at &&
128
137
  updated_at == o.updated_at
129
138
  end
@@ -137,7 +146,7 @@ module Phrase
137
146
  # Calculates hash code according to all attributes.
138
147
  # @return [Integer] Hash code
139
148
  def hash
140
- [id, name, slug, main_format, project_image_url, account, created_at, updated_at].hash
149
+ [id, name, slug, main_format, project_image_url, account, space, created_at, updated_at].hash
141
150
  end
142
151
 
143
152
  # Builds the object from hash
@@ -23,6 +23,57 @@ module Phrase
23
23
  # When a source project ID is given, a clone of that project will be created, including all locales, keys and translations as well as the main project settings if they are not defined otherwise through the params.
24
24
  attr_accessor :source_project_id
25
25
 
26
+ # (Optional) Review Workflow. \"simple\" / \"review\". <a href=\"https://help.phrase.com/help/advanced-review-workflow\">Read more</a>
27
+ attr_accessor :workflow
28
+
29
+ # (Optional) Enable machine translation support in the project. Required for Autopilot and Smart Suggest
30
+ attr_accessor :machine_translation_enabled
31
+
32
+ # (Optional) Enable branching in the project
33
+ attr_accessor :enable_branching
34
+
35
+ # (Optional) Protect the master branch in project where branching is enabled
36
+ attr_accessor :protect_master_branch
37
+
38
+ # (Optional) Otherwise, translators are not allowed to edit translations other than strings
39
+ attr_accessor :enable_all_data_type_translation_keys_for_translators
40
+
41
+ # (Optional) We can validate and highlight your ICU messages. <a href=\"https://help.phrase.com/help/icu-message-format\">Read more</a>
42
+ attr_accessor :enable_icu_message_format
43
+
44
+ # (Optional) Displays the input fields for the 'ZERO' plural form for every key as well although only some languages require the 'ZERO' explicitly.
45
+ attr_accessor :zero_plural_form_enabled
46
+
47
+ # (Optional) Autopilot, requires machine_translation_enabled. <a href=\"https://help.phrase.com/help/autopilot\">Read more</a>
48
+ attr_accessor :autotranslate_enabled
49
+
50
+ # (Optional) Requires autotranslate_enabled to be true
51
+ attr_accessor :autotranslate_check_new_translation_keys
52
+
53
+ # (Optional) Requires autotranslate_enabled to be true
54
+ attr_accessor :autotranslate_check_new_uploads
55
+
56
+ # (Optional) Requires autotranslate_enabled to be true
57
+ attr_accessor :autotranslate_check_new_locales
58
+
59
+ # (Optional) Requires autotranslate_enabled to be true
60
+ attr_accessor :autotranslate_mark_as_unverified
61
+
62
+ # (Optional) Requires autotranslate_enabled to be true
63
+ attr_accessor :autotranslate_use_machine_translation
64
+
65
+ # (Optional) Requires autotranslate_enabled to be true
66
+ attr_accessor :autotranslate_use_translation_memory
67
+
68
+ # (Optional) Smart Suggest, requires machine_translation_enabled
69
+ attr_accessor :smart_suggest_enabled
70
+
71
+ # (Optional) Requires smart_suggest_enabled to be true
72
+ attr_accessor :smart_suggest_use_glossary
73
+
74
+ # (Optional) Requires smart_suggest_enabled to be true
75
+ attr_accessor :smart_suggest_use_machine_translation
76
+
26
77
  # Attribute mapping from ruby-style variable name to JSON key.
27
78
  def self.attribute_map
28
79
  {
@@ -32,7 +83,24 @@ module Phrase
32
83
  :'project_image' => :'project_image',
33
84
  :'remove_project_image' => :'remove_project_image',
34
85
  :'account_id' => :'account_id',
35
- :'source_project_id' => :'source_project_id'
86
+ :'source_project_id' => :'source_project_id',
87
+ :'workflow' => :'workflow',
88
+ :'machine_translation_enabled' => :'machine_translation_enabled',
89
+ :'enable_branching' => :'enable_branching',
90
+ :'protect_master_branch' => :'protect_master_branch',
91
+ :'enable_all_data_type_translation_keys_for_translators' => :'enable_all_data_type_translation_keys_for_translators',
92
+ :'enable_icu_message_format' => :'enable_icu_message_format',
93
+ :'zero_plural_form_enabled' => :'zero_plural_form_enabled',
94
+ :'autotranslate_enabled' => :'autotranslate_enabled',
95
+ :'autotranslate_check_new_translation_keys' => :'autotranslate_check_new_translation_keys',
96
+ :'autotranslate_check_new_uploads' => :'autotranslate_check_new_uploads',
97
+ :'autotranslate_check_new_locales' => :'autotranslate_check_new_locales',
98
+ :'autotranslate_mark_as_unverified' => :'autotranslate_mark_as_unverified',
99
+ :'autotranslate_use_machine_translation' => :'autotranslate_use_machine_translation',
100
+ :'autotranslate_use_translation_memory' => :'autotranslate_use_translation_memory',
101
+ :'smart_suggest_enabled' => :'smart_suggest_enabled',
102
+ :'smart_suggest_use_glossary' => :'smart_suggest_use_glossary',
103
+ :'smart_suggest_use_machine_translation' => :'smart_suggest_use_machine_translation'
36
104
  }
37
105
  end
38
106
 
@@ -45,7 +113,24 @@ module Phrase
45
113
  :'project_image' => :'File',
46
114
  :'remove_project_image' => :'Boolean',
47
115
  :'account_id' => :'String',
48
- :'source_project_id' => :'String'
116
+ :'source_project_id' => :'String',
117
+ :'workflow' => :'String',
118
+ :'machine_translation_enabled' => :'Boolean',
119
+ :'enable_branching' => :'Boolean',
120
+ :'protect_master_branch' => :'Boolean',
121
+ :'enable_all_data_type_translation_keys_for_translators' => :'Boolean',
122
+ :'enable_icu_message_format' => :'Boolean',
123
+ :'zero_plural_form_enabled' => :'Boolean',
124
+ :'autotranslate_enabled' => :'Boolean',
125
+ :'autotranslate_check_new_translation_keys' => :'Boolean',
126
+ :'autotranslate_check_new_uploads' => :'Boolean',
127
+ :'autotranslate_check_new_locales' => :'Boolean',
128
+ :'autotranslate_mark_as_unverified' => :'Boolean',
129
+ :'autotranslate_use_machine_translation' => :'Boolean',
130
+ :'autotranslate_use_translation_memory' => :'Boolean',
131
+ :'smart_suggest_enabled' => :'Boolean',
132
+ :'smart_suggest_use_glossary' => :'Boolean',
133
+ :'smart_suggest_use_machine_translation' => :'Boolean'
49
134
  }
50
135
  end
51
136
 
@@ -97,6 +182,74 @@ module Phrase
97
182
  if attributes.key?(:'source_project_id')
98
183
  self.source_project_id = attributes[:'source_project_id']
99
184
  end
185
+
186
+ if attributes.key?(:'workflow')
187
+ self.workflow = attributes[:'workflow']
188
+ end
189
+
190
+ if attributes.key?(:'machine_translation_enabled')
191
+ self.machine_translation_enabled = attributes[:'machine_translation_enabled']
192
+ end
193
+
194
+ if attributes.key?(:'enable_branching')
195
+ self.enable_branching = attributes[:'enable_branching']
196
+ end
197
+
198
+ if attributes.key?(:'protect_master_branch')
199
+ self.protect_master_branch = attributes[:'protect_master_branch']
200
+ end
201
+
202
+ if attributes.key?(:'enable_all_data_type_translation_keys_for_translators')
203
+ self.enable_all_data_type_translation_keys_for_translators = attributes[:'enable_all_data_type_translation_keys_for_translators']
204
+ end
205
+
206
+ if attributes.key?(:'enable_icu_message_format')
207
+ self.enable_icu_message_format = attributes[:'enable_icu_message_format']
208
+ end
209
+
210
+ if attributes.key?(:'zero_plural_form_enabled')
211
+ self.zero_plural_form_enabled = attributes[:'zero_plural_form_enabled']
212
+ end
213
+
214
+ if attributes.key?(:'autotranslate_enabled')
215
+ self.autotranslate_enabled = attributes[:'autotranslate_enabled']
216
+ end
217
+
218
+ if attributes.key?(:'autotranslate_check_new_translation_keys')
219
+ self.autotranslate_check_new_translation_keys = attributes[:'autotranslate_check_new_translation_keys']
220
+ end
221
+
222
+ if attributes.key?(:'autotranslate_check_new_uploads')
223
+ self.autotranslate_check_new_uploads = attributes[:'autotranslate_check_new_uploads']
224
+ end
225
+
226
+ if attributes.key?(:'autotranslate_check_new_locales')
227
+ self.autotranslate_check_new_locales = attributes[:'autotranslate_check_new_locales']
228
+ end
229
+
230
+ if attributes.key?(:'autotranslate_mark_as_unverified')
231
+ self.autotranslate_mark_as_unverified = attributes[:'autotranslate_mark_as_unverified']
232
+ end
233
+
234
+ if attributes.key?(:'autotranslate_use_machine_translation')
235
+ self.autotranslate_use_machine_translation = attributes[:'autotranslate_use_machine_translation']
236
+ end
237
+
238
+ if attributes.key?(:'autotranslate_use_translation_memory')
239
+ self.autotranslate_use_translation_memory = attributes[:'autotranslate_use_translation_memory']
240
+ end
241
+
242
+ if attributes.key?(:'smart_suggest_enabled')
243
+ self.smart_suggest_enabled = attributes[:'smart_suggest_enabled']
244
+ end
245
+
246
+ if attributes.key?(:'smart_suggest_use_glossary')
247
+ self.smart_suggest_use_glossary = attributes[:'smart_suggest_use_glossary']
248
+ end
249
+
250
+ if attributes.key?(:'smart_suggest_use_machine_translation')
251
+ self.smart_suggest_use_machine_translation = attributes[:'smart_suggest_use_machine_translation']
252
+ end
100
253
  end
101
254
 
102
255
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -123,7 +276,24 @@ module Phrase
123
276
  project_image == o.project_image &&
124
277
  remove_project_image == o.remove_project_image &&
125
278
  account_id == o.account_id &&
126
- source_project_id == o.source_project_id
279
+ source_project_id == o.source_project_id &&
280
+ workflow == o.workflow &&
281
+ machine_translation_enabled == o.machine_translation_enabled &&
282
+ enable_branching == o.enable_branching &&
283
+ protect_master_branch == o.protect_master_branch &&
284
+ enable_all_data_type_translation_keys_for_translators == o.enable_all_data_type_translation_keys_for_translators &&
285
+ enable_icu_message_format == o.enable_icu_message_format &&
286
+ zero_plural_form_enabled == o.zero_plural_form_enabled &&
287
+ autotranslate_enabled == o.autotranslate_enabled &&
288
+ autotranslate_check_new_translation_keys == o.autotranslate_check_new_translation_keys &&
289
+ autotranslate_check_new_uploads == o.autotranslate_check_new_uploads &&
290
+ autotranslate_check_new_locales == o.autotranslate_check_new_locales &&
291
+ autotranslate_mark_as_unverified == o.autotranslate_mark_as_unverified &&
292
+ autotranslate_use_machine_translation == o.autotranslate_use_machine_translation &&
293
+ autotranslate_use_translation_memory == o.autotranslate_use_translation_memory &&
294
+ smart_suggest_enabled == o.smart_suggest_enabled &&
295
+ smart_suggest_use_glossary == o.smart_suggest_use_glossary &&
296
+ smart_suggest_use_machine_translation == o.smart_suggest_use_machine_translation
127
297
  end
128
298
 
129
299
  # @see the `==` method
@@ -135,7 +305,7 @@ module Phrase
135
305
  # Calculates hash code according to all attributes.
136
306
  # @return [Integer] Hash code
137
307
  def hash
138
- [name, main_format, shares_translation_memory, project_image, remove_project_image, account_id, source_project_id].hash
308
+ [name, main_format, shares_translation_memory, project_image, remove_project_image, account_id, source_project_id, 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
139
309
  end
140
310
 
141
311
  # Builds the object from hash
@@ -14,6 +14,8 @@ module Phrase
14
14
 
15
15
  attr_accessor :account
16
16
 
17
+ attr_accessor :space
18
+
17
19
  attr_accessor :created_at
18
20
 
19
21
  attr_accessor :updated_at
@@ -29,6 +31,7 @@ module Phrase
29
31
  :'main_format' => :'main_format',
30
32
  :'project_image_url' => :'project_image_url',
31
33
  :'account' => :'account',
34
+ :'space' => :'space',
32
35
  :'created_at' => :'created_at',
33
36
  :'updated_at' => :'updated_at',
34
37
  :'shares_translation_memory' => :'shares_translation_memory'
@@ -44,6 +47,7 @@ module Phrase
44
47
  :'main_format' => :'String',
45
48
  :'project_image_url' => :'String',
46
49
  :'account' => :'Account',
50
+ :'space' => :'Space1',
47
51
  :'created_at' => :'DateTime',
48
52
  :'updated_at' => :'DateTime',
49
53
  :'shares_translation_memory' => :'Boolean'
@@ -103,6 +107,10 @@ module Phrase
103
107
  self.account = attributes[:'account']
104
108
  end
105
109
 
110
+ if attributes.key?(:'space')
111
+ self.space = attributes[:'space']
112
+ end
113
+
106
114
  if attributes.key?(:'created_at')
107
115
  self.created_at = attributes[:'created_at']
108
116
  end
@@ -140,6 +148,7 @@ module Phrase
140
148
  main_format == o.main_format &&
141
149
  project_image_url == o.project_image_url &&
142
150
  account == o.account &&
151
+ space == o.space &&
143
152
  created_at == o.created_at &&
144
153
  updated_at == o.updated_at &&
145
154
  shares_translation_memory == o.shares_translation_memory
@@ -154,7 +163,7 @@ module Phrase
154
163
  # Calculates hash code according to all attributes.
155
164
  # @return [Integer] Hash code
156
165
  def hash
157
- [id, name, slug, main_format, project_image_url, account, created_at, updated_at, shares_translation_memory].hash
166
+ [id, name, slug, main_format, project_image_url, account, space, created_at, updated_at, shares_translation_memory].hash
158
167
  end
159
168
 
160
169
  # Builds the object from hash
@@ -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