phrase 4.26.0 → 4.28.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.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -0
  3. data/README.md +14 -3
  4. data/docs/CheckIssue.md +33 -0
  5. data/docs/ChecksApi.md +146 -0
  6. data/docs/JobCreateParameters.md +1 -1
  7. data/docs/KeyCreateParameters.md +1 -1
  8. data/docs/KeyUpdateParameters.md +1 -1
  9. data/docs/Locale.md +6 -0
  10. data/docs/LocaleCreateParameters.md +2 -0
  11. data/docs/LocaleDetails.md +6 -0
  12. data/docs/LocaleUpdateParameters.md +2 -0
  13. data/docs/MachineTranslationApi.md +263 -0
  14. data/docs/MachineTranslationLocaleProviderMapping.md +21 -0
  15. data/docs/MachineTranslationLocaleProviderMappingsCreateParameters.md +21 -0
  16. data/docs/MachineTranslationSettings.md +23 -0
  17. data/docs/MachineTranslationSettingsUpdateParameters.md +17 -0
  18. data/docs/MemberUpdateParameters.md +2 -2
  19. data/docs/MembersApi.md +1 -1
  20. data/docs/ProjectCreateParameters.md +9 -3
  21. data/docs/ProjectDetails.md +5 -1
  22. data/docs/ProjectUpdateParameters.md +9 -3
  23. data/docs/ProjectsApi.md +1 -1
  24. data/docs/ScreenshotUpdateParameters.md +1 -1
  25. data/docs/SpacesApi.md +3 -1
  26. data/docs/Upload.md +3 -1
  27. data/docs/UploadsApi.md +4 -4
  28. data/lib/phrase/api/checks_api.rb +174 -0
  29. data/lib/phrase/api/machine_translation_api.rb +302 -0
  30. data/lib/phrase/api/members_api.rb +2 -2
  31. data/lib/phrase/api/projects_api.rb +2 -2
  32. data/lib/phrase/api/spaces_api.rb +3 -0
  33. data/lib/phrase/api/uploads_api.rb +6 -6
  34. data/lib/phrase/models/check_issue.rb +319 -0
  35. data/lib/phrase/models/job_create_parameters.rb +1 -1
  36. data/lib/phrase/models/locale.rb +31 -1
  37. data/lib/phrase/models/locale_create_parameters.rb +11 -1
  38. data/lib/phrase/models/locale_details.rb +31 -1
  39. data/lib/phrase/models/locale_update_parameters.rb +11 -1
  40. data/lib/phrase/models/machine_translation_locale_provider_mapping.rb +217 -0
  41. data/lib/phrase/models/machine_translation_locale_provider_mappings_create_parameters.rb +232 -0
  42. data/lib/phrase/models/machine_translation_settings.rb +230 -0
  43. data/lib/phrase/models/machine_translation_settings_update_parameters.rb +198 -0
  44. data/lib/phrase/models/member_update_parameters.rb +2 -2
  45. data/lib/phrase/models/project_create_parameters.rb +48 -2
  46. data/lib/phrase/models/project_details.rb +53 -1
  47. data/lib/phrase/models/project_update_parameters.rb +48 -2
  48. data/lib/phrase/models/upload.rb +13 -1
  49. data/lib/phrase/version.rb +1 -1
  50. data/lib/phrase.rb +7 -0
  51. data/spec/api/checks_api_spec.rb +56 -0
  52. data/spec/api/machine_translation_api_spec.rb +79 -0
  53. data/spec/api/members_api_spec.rb +1 -1
  54. data/spec/api/projects_api_spec.rb +1 -1
  55. data/spec/api/spaces_api_spec.rb +1 -0
  56. data/spec/models/check_issue_spec.rb +85 -0
  57. data/spec/models/locale_create_parameters_spec.rb +6 -0
  58. data/spec/models/locale_details_spec.rb +18 -0
  59. data/spec/models/locale_spec.rb +18 -0
  60. data/spec/models/locale_update_parameters_spec.rb +6 -0
  61. data/spec/models/machine_translation_locale_provider_mapping_spec.rb +41 -0
  62. data/spec/models/machine_translation_locale_provider_mappings_create_parameters_spec.rb +41 -0
  63. data/spec/models/machine_translation_settings_spec.rb +47 -0
  64. data/spec/models/machine_translation_settings_update_parameters_spec.rb +29 -0
  65. data/spec/models/project_create_parameters_spec.rb +22 -0
  66. data/spec/models/project_details_spec.rb +16 -0
  67. data/spec/models/project_update_parameters_spec.rb +22 -0
  68. data/spec/models/upload_spec.rb +6 -0
  69. metadata +292 -264
@@ -0,0 +1,319 @@
1
+ require 'date'
2
+
3
+ module Phrase
4
+ class CheckIssue
5
+ attr_accessor :id
6
+
7
+ # Identifier of the check that reported this issue. One of: `translation_content_length`, `translation_placeholder_usage`, `translation_glossary_usage`.
8
+ attr_accessor :check_name
9
+
10
+ # Current state of the check issue. One of: `active`, `solved`, `dismissed`.
11
+ attr_accessor :state
12
+
13
+ # Human-readable description of the reported issue, always in English. This message is intended for display only. Its wording may change at any time and it should not be parsed or relied upon programmatically.
14
+ attr_accessor :description
15
+
16
+ attr_accessor :dismissed_at
17
+
18
+ attr_accessor :solved_at
19
+
20
+ attr_accessor :created_at
21
+
22
+ attr_accessor :updated_at
23
+
24
+ attr_accessor :translation
25
+
26
+ class EnumAttributeValidator
27
+ attr_reader :datatype
28
+ attr_reader :allowable_values
29
+
30
+ def initialize(datatype, allowable_values)
31
+ @allowable_values = allowable_values.map do |value|
32
+ case datatype.to_s
33
+ when /Integer/i
34
+ value.to_i
35
+ when /Float/i
36
+ value.to_f
37
+ else
38
+ value
39
+ end
40
+ end
41
+ end
42
+
43
+ def valid?(value)
44
+ !value || allowable_values.include?(value)
45
+ end
46
+ end
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'id' => :'id',
52
+ :'check_name' => :'check_name',
53
+ :'state' => :'state',
54
+ :'description' => :'description',
55
+ :'dismissed_at' => :'dismissed_at',
56
+ :'solved_at' => :'solved_at',
57
+ :'created_at' => :'created_at',
58
+ :'updated_at' => :'updated_at',
59
+ :'translation' => :'translation'
60
+ }
61
+ end
62
+
63
+ # Attribute type mapping.
64
+ def self.openapi_types
65
+ {
66
+ :'id' => :'String',
67
+ :'check_name' => :'String',
68
+ :'state' => :'String',
69
+ :'description' => :'String',
70
+ :'dismissed_at' => :'DateTime',
71
+ :'solved_at' => :'DateTime',
72
+ :'created_at' => :'DateTime',
73
+ :'updated_at' => :'DateTime',
74
+ :'translation' => :'Translation'
75
+ }
76
+ end
77
+
78
+ # List of attributes with nullable: true
79
+ def self.openapi_nullable
80
+ Set.new([
81
+ :'dismissed_at',
82
+ :'solved_at',
83
+ ])
84
+ end
85
+
86
+ # Initializes the object
87
+ # @param [Hash] attributes Model attributes in the form of hash
88
+ def initialize(attributes = {})
89
+ if (!attributes.is_a?(Hash))
90
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::CheckIssue` initialize method"
91
+ end
92
+
93
+ # check to see if the attribute exists and convert string to symbol for hash key
94
+ attributes = attributes.each_with_object({}) { |(k, v), h|
95
+ if (!self.class.attribute_map.key?(k.to_sym))
96
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::CheckIssue`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
97
+ end
98
+ h[k.to_sym] = v
99
+ }
100
+
101
+ if attributes.key?(:'id')
102
+ self.id = attributes[:'id']
103
+ end
104
+
105
+ if attributes.key?(:'check_name')
106
+ self.check_name = attributes[:'check_name']
107
+ end
108
+
109
+ if attributes.key?(:'state')
110
+ self.state = attributes[:'state']
111
+ end
112
+
113
+ if attributes.key?(:'description')
114
+ self.description = attributes[:'description']
115
+ end
116
+
117
+ if attributes.key?(:'dismissed_at')
118
+ self.dismissed_at = attributes[:'dismissed_at']
119
+ end
120
+
121
+ if attributes.key?(:'solved_at')
122
+ self.solved_at = attributes[:'solved_at']
123
+ end
124
+
125
+ if attributes.key?(:'created_at')
126
+ self.created_at = attributes[:'created_at']
127
+ end
128
+
129
+ if attributes.key?(:'updated_at')
130
+ self.updated_at = attributes[:'updated_at']
131
+ end
132
+
133
+ if attributes.key?(:'translation')
134
+ self.translation = attributes[:'translation']
135
+ end
136
+ end
137
+
138
+ # Show invalid properties with the reasons. Usually used together with valid?
139
+ # @return Array for valid properties with the reasons
140
+ def list_invalid_properties
141
+ invalid_properties = Array.new
142
+ invalid_properties
143
+ end
144
+
145
+ # Check to see if the all the properties in the model are valid
146
+ # @return true if the model is valid
147
+ def valid?
148
+ check_name_validator = EnumAttributeValidator.new('String', ["translation_content_length", "translation_placeholder_usage", "translation_glossary_usage"])
149
+ return false unless check_name_validator.valid?(@check_name)
150
+ state_validator = EnumAttributeValidator.new('String', ["active", "solved", "dismissed"])
151
+ return false unless state_validator.valid?(@state)
152
+ true
153
+ end
154
+
155
+ # Custom attribute writer method checking allowed values (enum).
156
+ # @param [Object] check_name Object to be assigned
157
+ def check_name=(check_name)
158
+ validator = EnumAttributeValidator.new('String', ["translation_content_length", "translation_placeholder_usage", "translation_glossary_usage"])
159
+ unless validator.valid?(check_name)
160
+ fail ArgumentError, "invalid value for \"check_name\", must be one of #{validator.allowable_values}."
161
+ end
162
+ @check_name = check_name
163
+ end
164
+
165
+ # Custom attribute writer method checking allowed values (enum).
166
+ # @param [Object] state Object to be assigned
167
+ def state=(state)
168
+ validator = EnumAttributeValidator.new('String', ["active", "solved", "dismissed"])
169
+ unless validator.valid?(state)
170
+ fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}."
171
+ end
172
+ @state = state
173
+ end
174
+
175
+ # Checks equality by comparing each attribute.
176
+ # @param [Object] Object to be compared
177
+ def ==(o)
178
+ return true if self.equal?(o)
179
+ self.class == o.class &&
180
+ id == o.id &&
181
+ check_name == o.check_name &&
182
+ state == o.state &&
183
+ description == o.description &&
184
+ dismissed_at == o.dismissed_at &&
185
+ solved_at == o.solved_at &&
186
+ created_at == o.created_at &&
187
+ updated_at == o.updated_at &&
188
+ translation == o.translation
189
+ end
190
+
191
+ # @see the `==` method
192
+ # @param [Object] Object to be compared
193
+ def eql?(o)
194
+ self == o
195
+ end
196
+
197
+ # Calculates hash code according to all attributes.
198
+ # @return [Integer] Hash code
199
+ def hash
200
+ [id, check_name, state, description, dismissed_at, solved_at, created_at, updated_at, translation].hash
201
+ end
202
+
203
+ # Builds the object from hash
204
+ # @param [Hash] attributes Model attributes in the form of hash
205
+ # @return [Object] Returns the model itself
206
+ def self.build_from_hash(attributes)
207
+ new.build_from_hash(attributes)
208
+ end
209
+
210
+ # Builds the object from hash
211
+ # @param [Hash] attributes Model attributes in the form of hash
212
+ # @return [Object] Returns the model itself
213
+ def build_from_hash(attributes)
214
+ return nil unless attributes.is_a?(Hash)
215
+ self.class.openapi_types.each_pair do |key, type|
216
+ if type =~ /\AArray<(.*)>/i
217
+ # check to ensure the input is an array given that the attribute
218
+ # is documented as an array but the input is not
219
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
220
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
221
+ end
222
+ elsif !attributes[self.class.attribute_map[key]].nil?
223
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
224
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
225
+ end
226
+
227
+ self
228
+ end
229
+
230
+ # Deserializes the data based on type
231
+ # @param string type Data type
232
+ # @param string value Value to be deserialized
233
+ # @return [Object] Deserialized data
234
+ def _deserialize(type, value)
235
+ case type.to_sym
236
+ when :DateTime
237
+ DateTime.parse(value)
238
+ when :Date
239
+ Date.parse(value)
240
+ when :Time
241
+ Time.parse(value)
242
+ when :String
243
+ value.to_s
244
+ when :Integer
245
+ value.to_i
246
+ when :Float
247
+ value.to_f
248
+ when :Boolean
249
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
250
+ true
251
+ else
252
+ false
253
+ end
254
+ when :Object
255
+ # generic object (usually a Hash), return directly
256
+ value
257
+ when /\AArray<(?<inner_type>.+)>\z/
258
+ inner_type = Regexp.last_match[:inner_type]
259
+ value.map { |v| _deserialize(inner_type, v) }
260
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
261
+ k_type = Regexp.last_match[:k_type]
262
+ v_type = Regexp.last_match[:v_type]
263
+ {}.tap do |hash|
264
+ value.each do |k, v|
265
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
266
+ end
267
+ end
268
+ else # model
269
+ Phrase.const_get(type).build_from_hash(value)
270
+ end
271
+ end
272
+
273
+ # Returns the string representation of the object
274
+ # @return [String] String presentation of the object
275
+ def to_s
276
+ to_hash.to_s
277
+ end
278
+
279
+ # to_body is an alias to to_hash (backward compatibility)
280
+ # @return [Hash] Returns the object in the form of hash
281
+ def to_body
282
+ to_hash
283
+ end
284
+
285
+ # Returns the object in the form of hash
286
+ # @return [Hash] Returns the object in the form of hash
287
+ def to_hash
288
+ hash = {}
289
+ self.class.attribute_map.each_pair do |attr, param|
290
+ value = self.send(attr)
291
+ if value.nil?
292
+ is_nullable = self.class.openapi_nullable.include?(attr)
293
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
294
+ end
295
+
296
+ hash[param] = _to_hash(value)
297
+ end
298
+ hash
299
+ end
300
+
301
+ # Outputs non-array value in the form of hash
302
+ # For object, use to_hash. Otherwise, just return the value
303
+ # @param [Object] value Any valid value
304
+ # @return [Hash] Returns the value in the form of hash
305
+ def _to_hash(value)
306
+ if value.is_a?(Array)
307
+ value.compact.map { |v| _to_hash(v) }
308
+ elsif value.is_a?(Hash)
309
+ {}.tap do |hash|
310
+ value.each { |k, v| hash[k] = _to_hash(v) }
311
+ end
312
+ elsif value.respond_to? :to_hash
313
+ value.to_hash
314
+ else
315
+ value
316
+ end
317
+ end
318
+ end
319
+ end
@@ -20,7 +20,7 @@ module Phrase
20
20
  # URL to a ticket for this job (e.g. Jira, Trello)
21
21
  attr_accessor :ticket_url
22
22
 
23
- # tags of keys that should be included within the job
23
+ # tags of keys that should be included within the job. *Note: a tag matches every key currently carrying that tag, not just the ones you just tagged. For example, if hundreds of pre-existing keys already share the tag `myUploadTag`, adding it here pulls in every one of them, not only the key you just tagged. Use `translation_key_ids` to scope the job to specific keys instead.*
24
24
  attr_accessor :tags
25
25
 
26
26
  # ids of keys that should be included within the job
@@ -24,6 +24,15 @@ module Phrase
24
24
 
25
25
  attr_accessor :language_ai_profile
26
26
 
27
+ # Indicates that new translations for this locale are marked as unverified. Only applies to locales using the basic verification workflow. Part of the [Advanced Workflows](https://support.phrase.com/hc/en-us/articles/5784094755484) feature.
28
+ attr_accessor :unverify_new_translations
29
+
30
+ # Indicates that updated translations for this locale are marked as unverified. Only applies to locales using the basic verification workflow. Part of the [Advanced Workflows](https://support.phrase.com/hc/en-us/articles/5784094755484) feature.
31
+ attr_accessor :unverify_updated_translations
32
+
33
+ # Indicates that translations for this locale are marked as unverified when the source language has been changed.
34
+ attr_accessor :unverify_on_source_changes
35
+
27
36
  attr_accessor :created_at
28
37
 
29
38
  attr_accessor :updated_at
@@ -42,6 +51,9 @@ module Phrase
42
51
  :'source_locale' => :'source_locale',
43
52
  :'fallback_locale' => :'fallback_locale',
44
53
  :'language_ai_profile' => :'language_ai_profile',
54
+ :'unverify_new_translations' => :'unverify_new_translations',
55
+ :'unverify_updated_translations' => :'unverify_updated_translations',
56
+ :'unverify_on_source_changes' => :'unverify_on_source_changes',
45
57
  :'created_at' => :'created_at',
46
58
  :'updated_at' => :'updated_at'
47
59
  }
@@ -61,6 +73,9 @@ module Phrase
61
73
  :'source_locale' => :'LocalePreview',
62
74
  :'fallback_locale' => :'LocalePreview',
63
75
  :'language_ai_profile' => :'String',
76
+ :'unverify_new_translations' => :'Boolean',
77
+ :'unverify_updated_translations' => :'Boolean',
78
+ :'unverify_on_source_changes' => :'Boolean',
64
79
  :'created_at' => :'DateTime',
65
80
  :'updated_at' => :'DateTime'
66
81
  }
@@ -135,6 +150,18 @@ module Phrase
135
150
  self.language_ai_profile = attributes[:'language_ai_profile']
136
151
  end
137
152
 
153
+ if attributes.key?(:'unverify_new_translations')
154
+ self.unverify_new_translations = attributes[:'unverify_new_translations']
155
+ end
156
+
157
+ if attributes.key?(:'unverify_updated_translations')
158
+ self.unverify_updated_translations = attributes[:'unverify_updated_translations']
159
+ end
160
+
161
+ if attributes.key?(:'unverify_on_source_changes')
162
+ self.unverify_on_source_changes = attributes[:'unverify_on_source_changes']
163
+ end
164
+
138
165
  if attributes.key?(:'created_at')
139
166
  self.created_at = attributes[:'created_at']
140
167
  end
@@ -173,6 +200,9 @@ module Phrase
173
200
  source_locale == o.source_locale &&
174
201
  fallback_locale == o.fallback_locale &&
175
202
  language_ai_profile == o.language_ai_profile &&
203
+ unverify_new_translations == o.unverify_new_translations &&
204
+ unverify_updated_translations == o.unverify_updated_translations &&
205
+ unverify_on_source_changes == o.unverify_on_source_changes &&
176
206
  created_at == o.created_at &&
177
207
  updated_at == o.updated_at
178
208
  end
@@ -186,7 +216,7 @@ module Phrase
186
216
  # Calculates hash code according to all attributes.
187
217
  # @return [Integer] Hash code
188
218
  def hash
189
- [id, name, code, default, main, rtl, plural_forms, ordinal_plural_forms, source_locale, fallback_locale, language_ai_profile, created_at, updated_at].hash
219
+ [id, name, code, default, main, rtl, plural_forms, ordinal_plural_forms, source_locale, fallback_locale, language_ai_profile, unverify_new_translations, unverify_updated_translations, unverify_on_source_changes, created_at, updated_at].hash
190
220
  end
191
221
 
192
222
  # Builds the object from hash
@@ -32,6 +32,9 @@ module Phrase
32
32
  # Indicates that updated translations for this locale should be marked as unverified. Part of the [Advanced Workflows](https://support.phrase.com/hc/en-us/articles/5784094755484) feature.
33
33
  attr_accessor :unverify_updated_translations
34
34
 
35
+ # Indicates that translations for this locale should be marked as unverified when the source language has been changed.
36
+ attr_accessor :unverify_on_source_changes
37
+
35
38
  # If set, translations for this locale will be fetched automatically, right after creation.
36
39
  attr_accessor :autotranslate
37
40
 
@@ -51,6 +54,7 @@ module Phrase
51
54
  :'fallback_locale_id' => :'fallback_locale_id',
52
55
  :'unverify_new_translations' => :'unverify_new_translations',
53
56
  :'unverify_updated_translations' => :'unverify_updated_translations',
57
+ :'unverify_on_source_changes' => :'unverify_on_source_changes',
54
58
  :'autotranslate' => :'autotranslate',
55
59
  :'language_ai_profile' => :'language_ai_profile'
56
60
  }
@@ -69,6 +73,7 @@ module Phrase
69
73
  :'fallback_locale_id' => :'String',
70
74
  :'unverify_new_translations' => :'Boolean',
71
75
  :'unverify_updated_translations' => :'Boolean',
76
+ :'unverify_on_source_changes' => :'Boolean',
72
77
  :'autotranslate' => :'Boolean',
73
78
  :'language_ai_profile' => :'String'
74
79
  }
@@ -135,6 +140,10 @@ module Phrase
135
140
  self.unverify_updated_translations = attributes[:'unverify_updated_translations']
136
141
  end
137
142
 
143
+ if attributes.key?(:'unverify_on_source_changes')
144
+ self.unverify_on_source_changes = attributes[:'unverify_on_source_changes']
145
+ end
146
+
138
147
  if attributes.key?(:'autotranslate')
139
148
  self.autotranslate = attributes[:'autotranslate']
140
149
  end
@@ -182,6 +191,7 @@ module Phrase
182
191
  fallback_locale_id == o.fallback_locale_id &&
183
192
  unverify_new_translations == o.unverify_new_translations &&
184
193
  unverify_updated_translations == o.unverify_updated_translations &&
194
+ unverify_on_source_changes == o.unverify_on_source_changes &&
185
195
  autotranslate == o.autotranslate &&
186
196
  language_ai_profile == o.language_ai_profile
187
197
  end
@@ -195,7 +205,7 @@ module Phrase
195
205
  # Calculates hash code according to all attributes.
196
206
  # @return [Integer] Hash code
197
207
  def hash
198
- [branch, name, code, default, main, rtl, source_locale_id, fallback_locale_id, unverify_new_translations, unverify_updated_translations, autotranslate, language_ai_profile].hash
208
+ [branch, name, code, default, main, rtl, source_locale_id, fallback_locale_id, unverify_new_translations, unverify_updated_translations, unverify_on_source_changes, autotranslate, language_ai_profile].hash
199
209
  end
200
210
 
201
211
  # Builds the object from hash
@@ -24,6 +24,15 @@ module Phrase
24
24
 
25
25
  attr_accessor :language_ai_profile
26
26
 
27
+ # Indicates that new translations for this locale are marked as unverified. Only applies to locales using the basic verification workflow. Part of the [Advanced Workflows](https://support.phrase.com/hc/en-us/articles/5784094755484) feature.
28
+ attr_accessor :unverify_new_translations
29
+
30
+ # Indicates that updated translations for this locale are marked as unverified. Only applies to locales using the basic verification workflow. Part of the [Advanced Workflows](https://support.phrase.com/hc/en-us/articles/5784094755484) feature.
31
+ attr_accessor :unverify_updated_translations
32
+
33
+ # Indicates that translations for this locale are marked as unverified when the source language has been changed.
34
+ attr_accessor :unverify_on_source_changes
35
+
27
36
  attr_accessor :created_at
28
37
 
29
38
  attr_accessor :updated_at
@@ -44,6 +53,9 @@ module Phrase
44
53
  :'source_locale' => :'source_locale',
45
54
  :'fallback_locale' => :'fallback_locale',
46
55
  :'language_ai_profile' => :'language_ai_profile',
56
+ :'unverify_new_translations' => :'unverify_new_translations',
57
+ :'unverify_updated_translations' => :'unverify_updated_translations',
58
+ :'unverify_on_source_changes' => :'unverify_on_source_changes',
47
59
  :'created_at' => :'created_at',
48
60
  :'updated_at' => :'updated_at',
49
61
  :'statistics' => :'statistics'
@@ -64,6 +76,9 @@ module Phrase
64
76
  :'source_locale' => :'LocalePreview',
65
77
  :'fallback_locale' => :'LocalePreview',
66
78
  :'language_ai_profile' => :'String',
79
+ :'unverify_new_translations' => :'Boolean',
80
+ :'unverify_updated_translations' => :'Boolean',
81
+ :'unverify_on_source_changes' => :'Boolean',
67
82
  :'created_at' => :'DateTime',
68
83
  :'updated_at' => :'DateTime',
69
84
  :'statistics' => :'LocaleStatistics'
@@ -146,6 +161,18 @@ module Phrase
146
161
  self.language_ai_profile = attributes[:'language_ai_profile']
147
162
  end
148
163
 
164
+ if attributes.key?(:'unverify_new_translations')
165
+ self.unverify_new_translations = attributes[:'unverify_new_translations']
166
+ end
167
+
168
+ if attributes.key?(:'unverify_updated_translations')
169
+ self.unverify_updated_translations = attributes[:'unverify_updated_translations']
170
+ end
171
+
172
+ if attributes.key?(:'unverify_on_source_changes')
173
+ self.unverify_on_source_changes = attributes[:'unverify_on_source_changes']
174
+ end
175
+
149
176
  if attributes.key?(:'created_at')
150
177
  self.created_at = attributes[:'created_at']
151
178
  end
@@ -188,6 +215,9 @@ module Phrase
188
215
  source_locale == o.source_locale &&
189
216
  fallback_locale == o.fallback_locale &&
190
217
  language_ai_profile == o.language_ai_profile &&
218
+ unverify_new_translations == o.unverify_new_translations &&
219
+ unverify_updated_translations == o.unverify_updated_translations &&
220
+ unverify_on_source_changes == o.unverify_on_source_changes &&
191
221
  created_at == o.created_at &&
192
222
  updated_at == o.updated_at &&
193
223
  statistics == o.statistics
@@ -202,7 +232,7 @@ module Phrase
202
232
  # Calculates hash code according to all attributes.
203
233
  # @return [Integer] Hash code
204
234
  def hash
205
- [id, name, code, default, main, rtl, plural_forms, ordinal_plural_forms, source_locale, fallback_locale, language_ai_profile, created_at, updated_at, statistics].hash
235
+ [id, name, code, default, main, rtl, plural_forms, ordinal_plural_forms, source_locale, fallback_locale, language_ai_profile, unverify_new_translations, unverify_updated_translations, unverify_on_source_changes, created_at, updated_at, statistics].hash
206
236
  end
207
237
 
208
238
  # Builds the object from hash
@@ -32,6 +32,9 @@ module Phrase
32
32
  # Indicates that updated translations for this locale should be marked as unverified. Part of the [Advanced Workflows](https://support.phrase.com/hc/en-us/articles/5784094755484) feature.
33
33
  attr_accessor :unverify_updated_translations
34
34
 
35
+ # Indicates that translations for this locale should be marked as unverified when the source language has been changed.
36
+ attr_accessor :unverify_on_source_changes
37
+
35
38
  # If set, translations for this locale will be fetched automatically, right after creation.
36
39
  attr_accessor :autotranslate
37
40
 
@@ -51,6 +54,7 @@ module Phrase
51
54
  :'fallback_locale_id' => :'fallback_locale_id',
52
55
  :'unverify_new_translations' => :'unverify_new_translations',
53
56
  :'unverify_updated_translations' => :'unverify_updated_translations',
57
+ :'unverify_on_source_changes' => :'unverify_on_source_changes',
54
58
  :'autotranslate' => :'autotranslate',
55
59
  :'language_ai_profile' => :'language_ai_profile'
56
60
  }
@@ -69,6 +73,7 @@ module Phrase
69
73
  :'fallback_locale_id' => :'String',
70
74
  :'unverify_new_translations' => :'Boolean',
71
75
  :'unverify_updated_translations' => :'Boolean',
76
+ :'unverify_on_source_changes' => :'Boolean',
72
77
  :'autotranslate' => :'Boolean',
73
78
  :'language_ai_profile' => :'String'
74
79
  }
@@ -135,6 +140,10 @@ module Phrase
135
140
  self.unverify_updated_translations = attributes[:'unverify_updated_translations']
136
141
  end
137
142
 
143
+ if attributes.key?(:'unverify_on_source_changes')
144
+ self.unverify_on_source_changes = attributes[:'unverify_on_source_changes']
145
+ end
146
+
138
147
  if attributes.key?(:'autotranslate')
139
148
  self.autotranslate = attributes[:'autotranslate']
140
149
  end
@@ -172,6 +181,7 @@ module Phrase
172
181
  fallback_locale_id == o.fallback_locale_id &&
173
182
  unverify_new_translations == o.unverify_new_translations &&
174
183
  unverify_updated_translations == o.unverify_updated_translations &&
184
+ unverify_on_source_changes == o.unverify_on_source_changes &&
175
185
  autotranslate == o.autotranslate &&
176
186
  language_ai_profile == o.language_ai_profile
177
187
  end
@@ -185,7 +195,7 @@ module Phrase
185
195
  # Calculates hash code according to all attributes.
186
196
  # @return [Integer] Hash code
187
197
  def hash
188
- [branch, name, code, default, main, rtl, source_locale_id, fallback_locale_id, unverify_new_translations, unverify_updated_translations, autotranslate, language_ai_profile].hash
198
+ [branch, name, code, default, main, rtl, source_locale_id, fallback_locale_id, unverify_new_translations, unverify_updated_translations, unverify_on_source_changes, autotranslate, language_ai_profile].hash
189
199
  end
190
200
 
191
201
  # Builds the object from hash