phrase 4.25.0 → 4.27.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 (113) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -0
  3. data/README.md +26 -4
  4. data/docs/AutomationEvent.md +33 -0
  5. data/docs/AutomationEventProject.md +19 -0
  6. data/docs/AutomationEventsApi.md +168 -0
  7. data/docs/AutomationsCreateParameters.md +1 -1
  8. data/docs/AutomationsCreateParameters1.md +1 -1
  9. data/docs/CheckIssue.md +33 -0
  10. data/docs/ChecksApi.md +146 -0
  11. data/docs/DocumentsApi.md +4 -4
  12. data/docs/ICUApi.md +1 -1
  13. data/docs/IcuSkeletonError.md +17 -0
  14. data/docs/IcuSkeletonParameters.md +11 -11
  15. data/docs/JobCreateParameters.md +1 -1
  16. data/docs/JobsApi.md +2 -2
  17. data/docs/KeyCreateParameters.md +1 -1
  18. data/docs/KeyFormatAnnotationsApi.md +74 -0
  19. data/docs/KeyFormatAnnotationsList200ResponseInner.md +19 -0
  20. data/docs/KeyLinksBatchDestroyParameters.md +6 -4
  21. data/docs/KeyLinksCreateParameters.md +2 -2
  22. data/docs/KeyUpdateParameters.md +1 -1
  23. data/docs/LinkedKeysApi.md +14 -13
  24. data/docs/Locale.md +6 -0
  25. data/docs/LocaleCreateParameters.md +2 -0
  26. data/docs/LocaleDetails.md +6 -0
  27. data/docs/LocaleUpdateParameters.md +2 -0
  28. data/docs/MachineTranslationApi.md +263 -0
  29. data/docs/MachineTranslationLocaleProviderMapping.md +21 -0
  30. data/docs/MachineTranslationLocaleProviderMappingsCreateParameters.md +21 -0
  31. data/docs/MachineTranslationSettings.md +23 -0
  32. data/docs/MachineTranslationSettingsUpdateParameters.md +17 -0
  33. data/docs/PreTranslation.md +29 -0
  34. data/docs/PreTranslationCreateParameters.md +19 -0
  35. data/docs/PreTranslationsApi.md +210 -0
  36. data/docs/ProjectCreateParameters.md +8 -2
  37. data/docs/ProjectDetails.md +3 -1
  38. data/docs/ProjectUpdateParameters.md +8 -2
  39. data/docs/ScreenshotUpdateParameters.md +1 -1
  40. data/docs/ScreenshotsApi.md +2 -2
  41. data/docs/Upload.md +3 -1
  42. data/docs/UploadsApi.md +4 -4
  43. data/lib/phrase/api/automation_events_api.rb +215 -0
  44. data/lib/phrase/api/checks_api.rb +174 -0
  45. data/lib/phrase/api/documents_api.rb +6 -6
  46. data/lib/phrase/api/icu_api.rb +2 -6
  47. data/lib/phrase/api/key_format_annotations_api.rb +85 -0
  48. data/lib/phrase/api/linked_keys_api.rb +19 -23
  49. data/lib/phrase/api/machine_translation_api.rb +302 -0
  50. data/lib/phrase/api/pre_translations_api.rb +240 -0
  51. data/lib/phrase/api/screenshots_api.rb +4 -4
  52. data/lib/phrase/api/uploads_api.rb +6 -6
  53. data/lib/phrase/models/automation_event.rb +325 -0
  54. data/lib/phrase/models/automation_event_project.rb +208 -0
  55. data/lib/phrase/models/automations_create_parameters.rb +1 -1
  56. data/lib/phrase/models/automations_create_parameters1.rb +1 -1
  57. data/lib/phrase/models/check_issue.rb +319 -0
  58. data/lib/phrase/models/{key_links_index400_response.rb → icu_skeleton_error.rb} +11 -10
  59. data/lib/phrase/models/icu_skeleton_parameters.rb +6 -6
  60. data/lib/phrase/models/job_create_parameters.rb +1 -1
  61. data/lib/phrase/models/key_format_annotations_list200_response_inner.rb +207 -0
  62. data/lib/phrase/models/key_links_batch_destroy_parameters.rb +52 -6
  63. data/lib/phrase/models/key_links_create_parameters.rb +1 -1
  64. data/lib/phrase/models/locale.rb +31 -1
  65. data/lib/phrase/models/locale_create_parameters.rb +11 -1
  66. data/lib/phrase/models/locale_details.rb +31 -1
  67. data/lib/phrase/models/locale_update_parameters.rb +11 -1
  68. data/lib/phrase/models/machine_translation_locale_provider_mapping.rb +217 -0
  69. data/lib/phrase/models/machine_translation_locale_provider_mappings_create_parameters.rb +232 -0
  70. data/lib/phrase/models/machine_translation_settings.rb +230 -0
  71. data/lib/phrase/models/machine_translation_settings_update_parameters.rb +198 -0
  72. data/lib/phrase/models/pre_translation.rb +301 -0
  73. data/lib/phrase/models/pre_translation_create_parameters.rb +241 -0
  74. data/lib/phrase/models/project_create_parameters.rb +35 -1
  75. data/lib/phrase/models/project_details.rb +10 -1
  76. data/lib/phrase/models/project_update_parameters.rb +35 -1
  77. data/lib/phrase/models/upload.rb +13 -1
  78. data/lib/phrase/response.rb +2 -2
  79. data/lib/phrase/version.rb +1 -1
  80. data/lib/phrase.rb +16 -1
  81. data/phrase.gemspec +1 -1
  82. data/spec/api/automation_events_api_spec.rb +67 -0
  83. data/spec/api/checks_api_spec.rb +56 -0
  84. data/spec/api/documents_api_spec.rb +3 -3
  85. data/spec/api/icu_api_spec.rb +1 -1
  86. data/spec/api/key_format_annotations_api_spec.rb +38 -0
  87. data/spec/api/linked_keys_api_spec.rb +7 -7
  88. data/spec/api/machine_translation_api_spec.rb +79 -0
  89. data/spec/api/pre_translations_api_spec.rb +70 -0
  90. data/spec/api/screenshots_api_spec.rb +2 -2
  91. data/spec/models/automation_event_project_spec.rb +35 -0
  92. data/spec/models/automation_event_spec.rb +85 -0
  93. data/spec/models/check_issue_spec.rb +85 -0
  94. data/spec/models/{key_links_index400_response_spec.rb → icu_skeleton_error_spec.rb} +7 -7
  95. data/spec/models/key_format_annotations_list200_response_inner_spec.rb +35 -0
  96. data/spec/models/key_links_batch_destroy_parameters_spec.rb +10 -0
  97. data/spec/models/locale_create_parameters_spec.rb +6 -0
  98. data/spec/models/locale_details_spec.rb +18 -0
  99. data/spec/models/locale_spec.rb +18 -0
  100. data/spec/models/locale_update_parameters_spec.rb +6 -0
  101. data/spec/models/machine_translation_locale_provider_mapping_spec.rb +41 -0
  102. data/spec/models/machine_translation_locale_provider_mappings_create_parameters_spec.rb +41 -0
  103. data/spec/models/machine_translation_settings_spec.rb +47 -0
  104. data/spec/models/machine_translation_settings_update_parameters_spec.rb +29 -0
  105. data/spec/models/pre_translation_create_parameters_spec.rb +39 -0
  106. data/spec/models/pre_translation_spec.rb +73 -0
  107. data/spec/models/project_create_parameters_spec.rb +18 -0
  108. data/spec/models/project_details_spec.rb +6 -0
  109. data/spec/models/project_update_parameters_spec.rb +18 -0
  110. data/spec/models/upload_spec.rb +6 -0
  111. data/spec/response_spec.rb +53 -0
  112. metadata +313 -251
  113. data/docs/KeyLinksIndex400Response.md +0 -17
@@ -0,0 +1,207 @@
1
+ require 'date'
2
+
3
+ module Phrase
4
+ class KeyFormatAnnotationsList200ResponseInner
5
+ # The file format that produced this annotation.
6
+ attr_accessor :file_format
7
+
8
+ # The original file-format snippet captured when the key was imported. Returned as-is, may contain multi-line content.
9
+ attr_accessor :original_representation
10
+
11
+ # Attribute mapping from ruby-style variable name to JSON key.
12
+ def self.attribute_map
13
+ {
14
+ :'file_format' => :'file_format',
15
+ :'original_representation' => :'original_representation'
16
+ }
17
+ end
18
+
19
+ # Attribute type mapping.
20
+ def self.openapi_types
21
+ {
22
+ :'file_format' => :'String',
23
+ :'original_representation' => :'String'
24
+ }
25
+ end
26
+
27
+ # List of attributes with nullable: true
28
+ def self.openapi_nullable
29
+ Set.new([
30
+ ])
31
+ end
32
+
33
+ # Initializes the object
34
+ # @param [Hash] attributes Model attributes in the form of hash
35
+ def initialize(attributes = {})
36
+ if (!attributes.is_a?(Hash))
37
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::KeyFormatAnnotationsList200ResponseInner` initialize method"
38
+ end
39
+
40
+ # check to see if the attribute exists and convert string to symbol for hash key
41
+ attributes = attributes.each_with_object({}) { |(k, v), h|
42
+ if (!self.class.attribute_map.key?(k.to_sym))
43
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::KeyFormatAnnotationsList200ResponseInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
44
+ end
45
+ h[k.to_sym] = v
46
+ }
47
+
48
+ if attributes.key?(:'file_format')
49
+ self.file_format = attributes[:'file_format']
50
+ end
51
+
52
+ if attributes.key?(:'original_representation')
53
+ self.original_representation = attributes[:'original_representation']
54
+ end
55
+ end
56
+
57
+ # Show invalid properties with the reasons. Usually used together with valid?
58
+ # @return Array for valid properties with the reasons
59
+ def list_invalid_properties
60
+ invalid_properties = Array.new
61
+ invalid_properties
62
+ end
63
+
64
+ # Check to see if the all the properties in the model are valid
65
+ # @return true if the model is valid
66
+ def valid?
67
+ true
68
+ end
69
+
70
+ # Checks equality by comparing each attribute.
71
+ # @param [Object] Object to be compared
72
+ def ==(o)
73
+ return true if self.equal?(o)
74
+ self.class == o.class &&
75
+ file_format == o.file_format &&
76
+ original_representation == o.original_representation
77
+ end
78
+
79
+ # @see the `==` method
80
+ # @param [Object] Object to be compared
81
+ def eql?(o)
82
+ self == o
83
+ end
84
+
85
+ # Calculates hash code according to all attributes.
86
+ # @return [Integer] Hash code
87
+ def hash
88
+ [file_format, original_representation].hash
89
+ end
90
+
91
+ # Builds the object from hash
92
+ # @param [Hash] attributes Model attributes in the form of hash
93
+ # @return [Object] Returns the model itself
94
+ def self.build_from_hash(attributes)
95
+ new.build_from_hash(attributes)
96
+ end
97
+
98
+ # Builds the object from hash
99
+ # @param [Hash] attributes Model attributes in the form of hash
100
+ # @return [Object] Returns the model itself
101
+ def build_from_hash(attributes)
102
+ return nil unless attributes.is_a?(Hash)
103
+ self.class.openapi_types.each_pair do |key, type|
104
+ if type =~ /\AArray<(.*)>/i
105
+ # check to ensure the input is an array given that the attribute
106
+ # is documented as an array but the input is not
107
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
108
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
109
+ end
110
+ elsif !attributes[self.class.attribute_map[key]].nil?
111
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
112
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
113
+ end
114
+
115
+ self
116
+ end
117
+
118
+ # Deserializes the data based on type
119
+ # @param string type Data type
120
+ # @param string value Value to be deserialized
121
+ # @return [Object] Deserialized data
122
+ def _deserialize(type, value)
123
+ case type.to_sym
124
+ when :DateTime
125
+ DateTime.parse(value)
126
+ when :Date
127
+ Date.parse(value)
128
+ when :Time
129
+ Time.parse(value)
130
+ when :String
131
+ value.to_s
132
+ when :Integer
133
+ value.to_i
134
+ when :Float
135
+ value.to_f
136
+ when :Boolean
137
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
138
+ true
139
+ else
140
+ false
141
+ end
142
+ when :Object
143
+ # generic object (usually a Hash), return directly
144
+ value
145
+ when /\AArray<(?<inner_type>.+)>\z/
146
+ inner_type = Regexp.last_match[:inner_type]
147
+ value.map { |v| _deserialize(inner_type, v) }
148
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
149
+ k_type = Regexp.last_match[:k_type]
150
+ v_type = Regexp.last_match[:v_type]
151
+ {}.tap do |hash|
152
+ value.each do |k, v|
153
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
154
+ end
155
+ end
156
+ else # model
157
+ Phrase.const_get(type).build_from_hash(value)
158
+ end
159
+ end
160
+
161
+ # Returns the string representation of the object
162
+ # @return [String] String presentation of the object
163
+ def to_s
164
+ to_hash.to_s
165
+ end
166
+
167
+ # to_body is an alias to to_hash (backward compatibility)
168
+ # @return [Hash] Returns the object in the form of hash
169
+ def to_body
170
+ to_hash
171
+ end
172
+
173
+ # Returns the object in the form of hash
174
+ # @return [Hash] Returns the object in the form of hash
175
+ def to_hash
176
+ hash = {}
177
+ self.class.attribute_map.each_pair do |attr, param|
178
+ value = self.send(attr)
179
+ if value.nil?
180
+ is_nullable = self.class.openapi_nullable.include?(attr)
181
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
182
+ end
183
+
184
+ hash[param] = _to_hash(value)
185
+ end
186
+ hash
187
+ end
188
+
189
+ # Outputs non-array value in the form of hash
190
+ # For object, use to_hash. Otherwise, just return the value
191
+ # @param [Object] value Any valid value
192
+ # @return [Hash] Returns the value in the form of hash
193
+ def _to_hash(value)
194
+ if value.is_a?(Array)
195
+ value.compact.map { |v| _to_hash(v) }
196
+ elsif value.is_a?(Hash)
197
+ {}.tap do |hash|
198
+ value.each { |k, v| hash[k] = _to_hash(v) }
199
+ end
200
+ elsif value.respond_to? :to_hash
201
+ value.to_hash
202
+ else
203
+ value
204
+ end
205
+ end
206
+ end
207
+ end
@@ -2,17 +2,43 @@ require 'date'
2
2
 
3
3
  module Phrase
4
4
  class KeyLinksBatchDestroyParameters
5
- # The IDs of the child keys to unlink from the parent key.
5
+ # Codes of the child keys to unlink. Required when unlink_parent is false or omitted. Ignored when unlink_parent is true.
6
6
  attr_accessor :child_key_ids
7
7
 
8
- # Whether to unlink the parent key as well and unmark it as linked-key.
8
+ # When true, dissolves the entire linked-key group by unlinking all children and removing the group. The child_key_ids field is ignored when this is set to true.
9
9
  attr_accessor :unlink_parent
10
10
 
11
+ # Controls what happens to child key translation content after unlinking. keep_content (default) copies the parent translation into each child; remove_content clears each child translation.
12
+ attr_accessor :strategy
13
+
14
+ class EnumAttributeValidator
15
+ attr_reader :datatype
16
+ attr_reader :allowable_values
17
+
18
+ def initialize(datatype, allowable_values)
19
+ @allowable_values = allowable_values.map do |value|
20
+ case datatype.to_s
21
+ when /Integer/i
22
+ value.to_i
23
+ when /Float/i
24
+ value.to_f
25
+ else
26
+ value
27
+ end
28
+ end
29
+ end
30
+
31
+ def valid?(value)
32
+ !value || allowable_values.include?(value)
33
+ end
34
+ end
35
+
11
36
  # Attribute mapping from ruby-style variable name to JSON key.
12
37
  def self.attribute_map
13
38
  {
14
39
  :'child_key_ids' => :'child_key_ids',
15
- :'unlink_parent' => :'unlink_parent'
40
+ :'unlink_parent' => :'unlink_parent',
41
+ :'strategy' => :'strategy'
16
42
  }
17
43
  end
18
44
 
@@ -20,7 +46,8 @@ module Phrase
20
46
  def self.openapi_types
21
47
  {
22
48
  :'child_key_ids' => :'Array<String>',
23
- :'unlink_parent' => :'Boolean'
49
+ :'unlink_parent' => :'Boolean',
50
+ :'strategy' => :'String'
24
51
  }
25
52
  end
26
53
 
@@ -56,6 +83,12 @@ module Phrase
56
83
  else
57
84
  self.unlink_parent = false
58
85
  end
86
+
87
+ if attributes.key?(:'strategy')
88
+ self.strategy = attributes[:'strategy']
89
+ else
90
+ self.strategy = 'keep_content'
91
+ end
59
92
  end
60
93
 
61
94
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -73,16 +106,29 @@ module Phrase
73
106
  # @return true if the model is valid
74
107
  def valid?
75
108
  return false if @child_key_ids.nil?
109
+ strategy_validator = EnumAttributeValidator.new('String', ["keep_content", "remove_content"])
110
+ return false unless strategy_validator.valid?(@strategy)
76
111
  true
77
112
  end
78
113
 
114
+ # Custom attribute writer method checking allowed values (enum).
115
+ # @param [Object] strategy Object to be assigned
116
+ def strategy=(strategy)
117
+ validator = EnumAttributeValidator.new('String', ["keep_content", "remove_content"])
118
+ unless validator.valid?(strategy)
119
+ fail ArgumentError, "invalid value for \"strategy\", must be one of #{validator.allowable_values}."
120
+ end
121
+ @strategy = strategy
122
+ end
123
+
79
124
  # Checks equality by comparing each attribute.
80
125
  # @param [Object] Object to be compared
81
126
  def ==(o)
82
127
  return true if self.equal?(o)
83
128
  self.class == o.class &&
84
129
  child_key_ids == o.child_key_ids &&
85
- unlink_parent == o.unlink_parent
130
+ unlink_parent == o.unlink_parent &&
131
+ strategy == o.strategy
86
132
  end
87
133
 
88
134
  # @see the `==` method
@@ -94,7 +140,7 @@ module Phrase
94
140
  # Calculates hash code according to all attributes.
95
141
  # @return [Integer] Hash code
96
142
  def hash
97
- [child_key_ids, unlink_parent].hash
143
+ [child_key_ids, unlink_parent, strategy].hash
98
144
  end
99
145
 
100
146
  # Builds the object from hash
@@ -2,7 +2,7 @@ require 'date'
2
2
 
3
3
  module Phrase
4
4
  class KeyLinksCreateParameters
5
- # The IDs of the child keys to link to the parent key. Can be left empty, to only mark the given translation-key as parent
5
+ # Codes of the keys to link as children. Pass an empty array to mark the parent key without linking any children.
6
6
  attr_accessor :child_key_ids
7
7
 
8
8
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -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