phrase 3.2.0 → 3.3.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 (41) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/README.md +10 -5
  4. data/docs/KeyCreateParameters.md +1 -1
  5. data/docs/KeyUpdateParameters.md +1 -1
  6. data/docs/LocaleDownload.md +29 -0
  7. data/docs/LocaleDownloadCreateParameters.md +43 -0
  8. data/docs/LocaleDownloadParams.md +29 -0
  9. data/docs/LocaleDownloadResult.md +17 -0
  10. data/docs/LocaleDownloadsApi.md +148 -0
  11. data/docs/ProjectCreateParameters.md +1 -1
  12. data/docs/ProjectUpdateParameters.md +1 -1
  13. data/docs/ReleaseCreateParameters.md +4 -0
  14. data/docs/ReleaseUpdateParameters.md +4 -0
  15. data/docs/RepoSyncEvent.md +3 -1
  16. data/docs/RepoSyncsApi.md +70 -4
  17. data/docs/ScreenshotUpdateParameters.md +1 -1
  18. data/lib/phrase/api/locale_downloads_api.rb +180 -0
  19. data/lib/phrase/api/repo_syncs_api.rb +84 -6
  20. data/lib/phrase/models/locale_download.rb +285 -0
  21. data/lib/phrase/models/locale_download_create_parameters.rb +332 -0
  22. data/lib/phrase/models/{repo_sync_import.rb → locale_download_params.rb} +65 -10
  23. data/lib/phrase/models/{repo_sync_export.rb → locale_download_result.rb} +11 -10
  24. data/lib/phrase/models/release_create_parameters.rb +21 -1
  25. data/lib/phrase/models/release_update_parameters.rb +21 -1
  26. data/lib/phrase/models/repo_sync_event.rb +10 -1
  27. data/lib/phrase/version.rb +1 -1
  28. data/lib/phrase.rb +5 -2
  29. data/spec/api/locale_downloads_api_spec.rb +57 -0
  30. data/spec/api/repo_syncs_api_spec.rb +17 -2
  31. data/spec/models/locale_download_create_parameters_spec.rb +107 -0
  32. data/spec/models/locale_download_params_spec.rb +65 -0
  33. data/spec/models/{repo_sync_export_spec.rb → locale_download_result_spec.rb} +7 -7
  34. data/spec/models/locale_download_spec.rb +69 -0
  35. data/spec/models/release_create_parameters_spec.rb +12 -0
  36. data/spec/models/release_update_parameters_spec.rb +12 -0
  37. data/spec/models/repo_sync_event_spec.rb +6 -0
  38. metadata +258 -246
  39. data/docs/RepoSyncExport.md +0 -17
  40. data/docs/RepoSyncImport.md +0 -17
  41. data/spec/models/repo_sync_import_spec.rb +0 -29
@@ -0,0 +1,332 @@
1
+ require 'date'
2
+
3
+ module Phrase
4
+ class LocaleDownloadCreateParameters
5
+ # File format name. See the <a href=\"https://support.phrase.com/hc/en-us/sections/6111343326364\">format guide</a> for all supported file formats.
6
+ attr_accessor :file_format
7
+
8
+ # specify the branch to use
9
+ attr_accessor :branch
10
+
11
+ # Limit results to keys tagged with a list of comma separated tag names.
12
+ attr_accessor :tags
13
+
14
+ # Indicates whether keys without translations should be included in the output as well.
15
+ attr_accessor :include_empty_translations
16
+
17
+ # Indicates whether zero forms should be included when empty in pluralized keys.
18
+ attr_accessor :exclude_empty_zero_forms
19
+
20
+ # Include translated keys in the locale file. Use in combination with include_empty_translations to obtain only untranslated keys.
21
+ attr_accessor :include_translated_keys
22
+
23
+ # Indicates whether [NOTRANSLATE] tags should be kept.
24
+ attr_accessor :keep_notranslate_tags
25
+
26
+ # Additional formatting and render options. See the <a href=\"https://support.phrase.com/hc/en-us/sections/6111343326364\">format guide</a> for a list of options available for each format. Specify format options like this: <code>...&format_options[foo]=bar</code>
27
+ attr_accessor :format_options
28
+
29
+ # Enforces a specific encoding on the file contents. Valid options are \"UTF-8\", \"UTF-16\" and \"ISO-8859-1\".
30
+ attr_accessor :encoding
31
+
32
+ # if set to false unverified translations are excluded
33
+ attr_accessor :include_unverified_translations
34
+
35
+ # If set to true the last reviewed version of a translation is used. This is only available if the review workflow is enabled for the project.
36
+ attr_accessor :use_last_reviewed_version
37
+
38
+ # If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to <code>true</code>.
39
+ attr_accessor :fallback_locale_id
40
+
41
+ # Provides the source language of a corresponding job as the source language of the generated locale file. This parameter will be ignored unless used in combination with a <code>tag</code> parameter indicating a specific job.
42
+ attr_accessor :source_locale_id
43
+
44
+ # Custom metadata filters. Provide the name of the metadata field and the value to filter by. Only keys with matching metadata will be included in the download.
45
+ attr_accessor :custom_metadata_filters
46
+
47
+ # Attribute mapping from ruby-style variable name to JSON key.
48
+ def self.attribute_map
49
+ {
50
+ :'file_format' => :'file_format',
51
+ :'branch' => :'branch',
52
+ :'tags' => :'tags',
53
+ :'include_empty_translations' => :'include_empty_translations',
54
+ :'exclude_empty_zero_forms' => :'exclude_empty_zero_forms',
55
+ :'include_translated_keys' => :'include_translated_keys',
56
+ :'keep_notranslate_tags' => :'keep_notranslate_tags',
57
+ :'format_options' => :'format_options',
58
+ :'encoding' => :'encoding',
59
+ :'include_unverified_translations' => :'include_unverified_translations',
60
+ :'use_last_reviewed_version' => :'use_last_reviewed_version',
61
+ :'fallback_locale_id' => :'fallback_locale_id',
62
+ :'source_locale_id' => :'source_locale_id',
63
+ :'custom_metadata_filters' => :'custom_metadata_filters'
64
+ }
65
+ end
66
+
67
+ # Attribute type mapping.
68
+ def self.openapi_types
69
+ {
70
+ :'file_format' => :'String',
71
+ :'branch' => :'String',
72
+ :'tags' => :'String',
73
+ :'include_empty_translations' => :'Boolean',
74
+ :'exclude_empty_zero_forms' => :'Boolean',
75
+ :'include_translated_keys' => :'Boolean',
76
+ :'keep_notranslate_tags' => :'Boolean',
77
+ :'format_options' => :'Object',
78
+ :'encoding' => :'String',
79
+ :'include_unverified_translations' => :'Boolean',
80
+ :'use_last_reviewed_version' => :'Boolean',
81
+ :'fallback_locale_id' => :'String',
82
+ :'source_locale_id' => :'String',
83
+ :'custom_metadata_filters' => :'Object'
84
+ }
85
+ end
86
+
87
+ # List of attributes with nullable: true
88
+ def self.openapi_nullable
89
+ Set.new([
90
+ ])
91
+ end
92
+
93
+ # Initializes the object
94
+ # @param [Hash] attributes Model attributes in the form of hash
95
+ def initialize(attributes = {})
96
+ if (!attributes.is_a?(Hash))
97
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::LocaleDownloadCreateParameters` initialize method"
98
+ end
99
+
100
+ # check to see if the attribute exists and convert string to symbol for hash key
101
+ attributes = attributes.each_with_object({}) { |(k, v), h|
102
+ if (!self.class.attribute_map.key?(k.to_sym))
103
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::LocaleDownloadCreateParameters`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
104
+ end
105
+ h[k.to_sym] = v
106
+ }
107
+
108
+ if attributes.key?(:'file_format')
109
+ self.file_format = attributes[:'file_format']
110
+ end
111
+
112
+ if attributes.key?(:'branch')
113
+ self.branch = attributes[:'branch']
114
+ end
115
+
116
+ if attributes.key?(:'tags')
117
+ self.tags = attributes[:'tags']
118
+ end
119
+
120
+ if attributes.key?(:'include_empty_translations')
121
+ self.include_empty_translations = attributes[:'include_empty_translations']
122
+ end
123
+
124
+ if attributes.key?(:'exclude_empty_zero_forms')
125
+ self.exclude_empty_zero_forms = attributes[:'exclude_empty_zero_forms']
126
+ end
127
+
128
+ if attributes.key?(:'include_translated_keys')
129
+ self.include_translated_keys = attributes[:'include_translated_keys']
130
+ end
131
+
132
+ if attributes.key?(:'keep_notranslate_tags')
133
+ self.keep_notranslate_tags = attributes[:'keep_notranslate_tags']
134
+ end
135
+
136
+ if attributes.key?(:'format_options')
137
+ self.format_options = attributes[:'format_options']
138
+ end
139
+
140
+ if attributes.key?(:'encoding')
141
+ self.encoding = attributes[:'encoding']
142
+ end
143
+
144
+ if attributes.key?(:'include_unverified_translations')
145
+ self.include_unverified_translations = attributes[:'include_unverified_translations']
146
+ end
147
+
148
+ if attributes.key?(:'use_last_reviewed_version')
149
+ self.use_last_reviewed_version = attributes[:'use_last_reviewed_version']
150
+ end
151
+
152
+ if attributes.key?(:'fallback_locale_id')
153
+ self.fallback_locale_id = attributes[:'fallback_locale_id']
154
+ end
155
+
156
+ if attributes.key?(:'source_locale_id')
157
+ self.source_locale_id = attributes[:'source_locale_id']
158
+ end
159
+
160
+ if attributes.key?(:'custom_metadata_filters')
161
+ self.custom_metadata_filters = attributes[:'custom_metadata_filters']
162
+ end
163
+ end
164
+
165
+ # Show invalid properties with the reasons. Usually used together with valid?
166
+ # @return Array for valid properties with the reasons
167
+ def list_invalid_properties
168
+ invalid_properties = Array.new
169
+ if @file_format.nil?
170
+ invalid_properties.push('invalid value for "file_format", file_format cannot be nil.')
171
+ end
172
+
173
+ invalid_properties
174
+ end
175
+
176
+ # Check to see if the all the properties in the model are valid
177
+ # @return true if the model is valid
178
+ def valid?
179
+ return false if @file_format.nil?
180
+ true
181
+ end
182
+
183
+ # Checks equality by comparing each attribute.
184
+ # @param [Object] Object to be compared
185
+ def ==(o)
186
+ return true if self.equal?(o)
187
+ self.class == o.class &&
188
+ file_format == o.file_format &&
189
+ branch == o.branch &&
190
+ tags == o.tags &&
191
+ include_empty_translations == o.include_empty_translations &&
192
+ exclude_empty_zero_forms == o.exclude_empty_zero_forms &&
193
+ include_translated_keys == o.include_translated_keys &&
194
+ keep_notranslate_tags == o.keep_notranslate_tags &&
195
+ format_options == o.format_options &&
196
+ encoding == o.encoding &&
197
+ include_unverified_translations == o.include_unverified_translations &&
198
+ use_last_reviewed_version == o.use_last_reviewed_version &&
199
+ fallback_locale_id == o.fallback_locale_id &&
200
+ source_locale_id == o.source_locale_id &&
201
+ custom_metadata_filters == o.custom_metadata_filters
202
+ end
203
+
204
+ # @see the `==` method
205
+ # @param [Object] Object to be compared
206
+ def eql?(o)
207
+ self == o
208
+ end
209
+
210
+ # Calculates hash code according to all attributes.
211
+ # @return [Integer] Hash code
212
+ def hash
213
+ [file_format, branch, tags, include_empty_translations, exclude_empty_zero_forms, include_translated_keys, keep_notranslate_tags, format_options, encoding, include_unverified_translations, use_last_reviewed_version, fallback_locale_id, source_locale_id, custom_metadata_filters].hash
214
+ end
215
+
216
+ # Builds the object from hash
217
+ # @param [Hash] attributes Model attributes in the form of hash
218
+ # @return [Object] Returns the model itself
219
+ def self.build_from_hash(attributes)
220
+ new.build_from_hash(attributes)
221
+ end
222
+
223
+ # Builds the object from hash
224
+ # @param [Hash] attributes Model attributes in the form of hash
225
+ # @return [Object] Returns the model itself
226
+ def build_from_hash(attributes)
227
+ return nil unless attributes.is_a?(Hash)
228
+ self.class.openapi_types.each_pair do |key, type|
229
+ if type =~ /\AArray<(.*)>/i
230
+ # check to ensure the input is an array given that the attribute
231
+ # is documented as an array but the input is not
232
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
233
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
234
+ end
235
+ elsif !attributes[self.class.attribute_map[key]].nil?
236
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
237
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
238
+ end
239
+
240
+ self
241
+ end
242
+
243
+ # Deserializes the data based on type
244
+ # @param string type Data type
245
+ # @param string value Value to be deserialized
246
+ # @return [Object] Deserialized data
247
+ def _deserialize(type, value)
248
+ case type.to_sym
249
+ when :DateTime
250
+ DateTime.parse(value)
251
+ when :Date
252
+ Date.parse(value)
253
+ when :Time
254
+ Time.parse(value)
255
+ when :String
256
+ value.to_s
257
+ when :Integer
258
+ value.to_i
259
+ when :Float
260
+ value.to_f
261
+ when :Boolean
262
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
263
+ true
264
+ else
265
+ false
266
+ end
267
+ when :Object
268
+ # generic object (usually a Hash), return directly
269
+ value
270
+ when /\AArray<(?<inner_type>.+)>\z/
271
+ inner_type = Regexp.last_match[:inner_type]
272
+ value.map { |v| _deserialize(inner_type, v) }
273
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
274
+ k_type = Regexp.last_match[:k_type]
275
+ v_type = Regexp.last_match[:v_type]
276
+ {}.tap do |hash|
277
+ value.each do |k, v|
278
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
279
+ end
280
+ end
281
+ else # model
282
+ Phrase.const_get(type).build_from_hash(value)
283
+ end
284
+ end
285
+
286
+ # Returns the string representation of the object
287
+ # @return [String] String presentation of the object
288
+ def to_s
289
+ to_hash.to_s
290
+ end
291
+
292
+ # to_body is an alias to to_hash (backward compatibility)
293
+ # @return [Hash] Returns the object in the form of hash
294
+ def to_body
295
+ to_hash
296
+ end
297
+
298
+ # Returns the object in the form of hash
299
+ # @return [Hash] Returns the object in the form of hash
300
+ def to_hash
301
+ hash = {}
302
+ self.class.attribute_map.each_pair do |attr, param|
303
+ value = self.send(attr)
304
+ if value.nil?
305
+ is_nullable = self.class.openapi_nullable.include?(attr)
306
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
307
+ end
308
+
309
+ hash[param] = _to_hash(value)
310
+ end
311
+ hash
312
+ end
313
+
314
+ # Outputs non-array value in the form of hash
315
+ # For object, use to_hash. Otherwise, just return the value
316
+ # @param [Object] value Any valid value
317
+ # @return [Hash] Returns the value in the form of hash
318
+ def _to_hash(value)
319
+ if value.is_a?(Array)
320
+ value.compact.map { |v| _to_hash(v) }
321
+ elsif value.is_a?(Hash)
322
+ {}.tap do |hash|
323
+ value.each { |k, v| hash[k] = _to_hash(v) }
324
+ end
325
+ elsif value.respond_to? :to_hash
326
+ value.to_hash
327
+ else
328
+ value
329
+ end
330
+ end
331
+ end
332
+ end
@@ -1,20 +1,45 @@
1
1
  require 'date'
2
2
 
3
3
  module Phrase
4
- class RepoSyncImport
5
- attr_accessor :message
4
+ # The parameters of the download request.
5
+ class LocaleDownloadParams
6
+ attr_accessor :file_format
7
+
8
+ attr_accessor :locale_id
9
+
10
+ attr_accessor :tags
11
+
12
+ attr_accessor :branch
13
+
14
+ attr_accessor :include_empty_translations
15
+
16
+ attr_accessor :include_translated_keys
17
+
18
+ attr_accessor :include_unverified_translations
6
19
 
7
20
  # Attribute mapping from ruby-style variable name to JSON key.
8
21
  def self.attribute_map
9
22
  {
10
- :'message' => :'message'
23
+ :'file_format' => :'file_format',
24
+ :'locale_id' => :'locale_id',
25
+ :'tags' => :'tags',
26
+ :'branch' => :'branch',
27
+ :'include_empty_translations' => :'include_empty_translations',
28
+ :'include_translated_keys' => :'include_translated_keys',
29
+ :'include_unverified_translations' => :'include_unverified_translations'
11
30
  }
12
31
  end
13
32
 
14
33
  # Attribute type mapping.
15
34
  def self.openapi_types
16
35
  {
17
- :'message' => :'String'
36
+ :'file_format' => :'String',
37
+ :'locale_id' => :'String',
38
+ :'tags' => :'String',
39
+ :'branch' => :'String',
40
+ :'include_empty_translations' => :'Boolean',
41
+ :'include_translated_keys' => :'Boolean',
42
+ :'include_unverified_translations' => :'Boolean'
18
43
  }
19
44
  end
20
45
 
@@ -28,19 +53,43 @@ module Phrase
28
53
  # @param [Hash] attributes Model attributes in the form of hash
29
54
  def initialize(attributes = {})
30
55
  if (!attributes.is_a?(Hash))
31
- fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::RepoSyncImport` initialize method"
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::LocaleDownloadParams` initialize method"
32
57
  end
33
58
 
34
59
  # check to see if the attribute exists and convert string to symbol for hash key
35
60
  attributes = attributes.each_with_object({}) { |(k, v), h|
36
61
  if (!self.class.attribute_map.key?(k.to_sym))
37
- fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::RepoSyncImport`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::LocaleDownloadParams`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
38
63
  end
39
64
  h[k.to_sym] = v
40
65
  }
41
66
 
42
- if attributes.key?(:'message')
43
- self.message = attributes[:'message']
67
+ if attributes.key?(:'file_format')
68
+ self.file_format = attributes[:'file_format']
69
+ end
70
+
71
+ if attributes.key?(:'locale_id')
72
+ self.locale_id = attributes[:'locale_id']
73
+ end
74
+
75
+ if attributes.key?(:'tags')
76
+ self.tags = attributes[:'tags']
77
+ end
78
+
79
+ if attributes.key?(:'branch')
80
+ self.branch = attributes[:'branch']
81
+ end
82
+
83
+ if attributes.key?(:'include_empty_translations')
84
+ self.include_empty_translations = attributes[:'include_empty_translations']
85
+ end
86
+
87
+ if attributes.key?(:'include_translated_keys')
88
+ self.include_translated_keys = attributes[:'include_translated_keys']
89
+ end
90
+
91
+ if attributes.key?(:'include_unverified_translations')
92
+ self.include_unverified_translations = attributes[:'include_unverified_translations']
44
93
  end
45
94
  end
46
95
 
@@ -62,7 +111,13 @@ module Phrase
62
111
  def ==(o)
63
112
  return true if self.equal?(o)
64
113
  self.class == o.class &&
65
- message == o.message
114
+ file_format == o.file_format &&
115
+ locale_id == o.locale_id &&
116
+ tags == o.tags &&
117
+ branch == o.branch &&
118
+ include_empty_translations == o.include_empty_translations &&
119
+ include_translated_keys == o.include_translated_keys &&
120
+ include_unverified_translations == o.include_unverified_translations
66
121
  end
67
122
 
68
123
  # @see the `==` method
@@ -74,7 +129,7 @@ module Phrase
74
129
  # Calculates hash code according to all attributes.
75
130
  # @return [Integer] Hash code
76
131
  def hash
77
- [message].hash
132
+ [file_format, locale_id, tags, branch, include_empty_translations, include_translated_keys, include_unverified_translations].hash
78
133
  end
79
134
 
80
135
  # Builds the object from hash
@@ -1,20 +1,21 @@
1
1
  require 'date'
2
2
 
3
3
  module Phrase
4
- class RepoSyncExport
5
- attr_accessor :message
4
+ class LocaleDownloadResult
5
+ # The URL to the download file. This URL is valid for 15 minutes.
6
+ attr_accessor :url
6
7
 
7
8
  # Attribute mapping from ruby-style variable name to JSON key.
8
9
  def self.attribute_map
9
10
  {
10
- :'message' => :'message'
11
+ :'url' => :'url'
11
12
  }
12
13
  end
13
14
 
14
15
  # Attribute type mapping.
15
16
  def self.openapi_types
16
17
  {
17
- :'message' => :'String'
18
+ :'url' => :'String'
18
19
  }
19
20
  end
20
21
 
@@ -28,19 +29,19 @@ module Phrase
28
29
  # @param [Hash] attributes Model attributes in the form of hash
29
30
  def initialize(attributes = {})
30
31
  if (!attributes.is_a?(Hash))
31
- fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::RepoSyncExport` initialize method"
32
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::LocaleDownloadResult` initialize method"
32
33
  end
33
34
 
34
35
  # check to see if the attribute exists and convert string to symbol for hash key
35
36
  attributes = attributes.each_with_object({}) { |(k, v), h|
36
37
  if (!self.class.attribute_map.key?(k.to_sym))
37
- fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::RepoSyncExport`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
38
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::LocaleDownloadResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
38
39
  end
39
40
  h[k.to_sym] = v
40
41
  }
41
42
 
42
- if attributes.key?(:'message')
43
- self.message = attributes[:'message']
43
+ if attributes.key?(:'url')
44
+ self.url = attributes[:'url']
44
45
  end
45
46
  end
46
47
 
@@ -62,7 +63,7 @@ module Phrase
62
63
  def ==(o)
63
64
  return true if self.equal?(o)
64
65
  self.class == o.class &&
65
- message == o.message
66
+ url == o.url
66
67
  end
67
68
 
68
69
  # @see the `==` method
@@ -74,7 +75,7 @@ module Phrase
74
75
  # Calculates hash code according to all attributes.
75
76
  # @return [Integer] Hash code
76
77
  def hash
77
- [message].hash
78
+ [url].hash
78
79
  end
79
80
 
80
81
  # Builds the object from hash
@@ -14,6 +14,12 @@ module Phrase
14
14
  # Only include tagged keys in the release. For a key to be included it must be tagged with all tags provided
15
15
  attr_accessor :tags
16
16
 
17
+ # Minimum version of the app that the release supports in semver format
18
+ attr_accessor :app_min_version
19
+
20
+ # Maximum version of the app that the release supports in semver format
21
+ attr_accessor :app_max_version
22
+
17
23
  # Branch used for release
18
24
  attr_accessor :branch
19
25
 
@@ -24,6 +30,8 @@ module Phrase
24
30
  :'platforms' => :'platforms',
25
31
  :'locale_ids' => :'locale_ids',
26
32
  :'tags' => :'tags',
33
+ :'app_min_version' => :'app_min_version',
34
+ :'app_max_version' => :'app_max_version',
27
35
  :'branch' => :'branch'
28
36
  }
29
37
  end
@@ -35,6 +43,8 @@ module Phrase
35
43
  :'platforms' => :'Array<String>',
36
44
  :'locale_ids' => :'Array<String>',
37
45
  :'tags' => :'Array<String>',
46
+ :'app_min_version' => :'String',
47
+ :'app_max_version' => :'String',
38
48
  :'branch' => :'String'
39
49
  }
40
50
  end
@@ -82,6 +92,14 @@ module Phrase
82
92
  end
83
93
  end
84
94
 
95
+ if attributes.key?(:'app_min_version')
96
+ self.app_min_version = attributes[:'app_min_version']
97
+ end
98
+
99
+ if attributes.key?(:'app_max_version')
100
+ self.app_max_version = attributes[:'app_max_version']
101
+ end
102
+
85
103
  if attributes.key?(:'branch')
86
104
  self.branch = attributes[:'branch']
87
105
  end
@@ -109,6 +127,8 @@ module Phrase
109
127
  platforms == o.platforms &&
110
128
  locale_ids == o.locale_ids &&
111
129
  tags == o.tags &&
130
+ app_min_version == o.app_min_version &&
131
+ app_max_version == o.app_max_version &&
112
132
  branch == o.branch
113
133
  end
114
134
 
@@ -121,7 +141,7 @@ module Phrase
121
141
  # Calculates hash code according to all attributes.
122
142
  # @return [Integer] Hash code
123
143
  def hash
124
- [description, platforms, locale_ids, tags, branch].hash
144
+ [description, platforms, locale_ids, tags, app_min_version, app_max_version, branch].hash
125
145
  end
126
146
 
127
147
  # Builds the object from hash
@@ -8,6 +8,12 @@ module Phrase
8
8
  # List of platforms the release should support.
9
9
  attr_accessor :platforms
10
10
 
11
+ # Minimum version of the app that the release supports in semver format
12
+ attr_accessor :app_min_version
13
+
14
+ # Maximum version of the app that the release supports in semver format
15
+ attr_accessor :app_max_version
16
+
11
17
  # Branch used for release
12
18
  attr_accessor :branch
13
19
 
@@ -16,6 +22,8 @@ module Phrase
16
22
  {
17
23
  :'description' => :'description',
18
24
  :'platforms' => :'platforms',
25
+ :'app_min_version' => :'app_min_version',
26
+ :'app_max_version' => :'app_max_version',
19
27
  :'branch' => :'branch'
20
28
  }
21
29
  end
@@ -25,6 +33,8 @@ module Phrase
25
33
  {
26
34
  :'description' => :'String',
27
35
  :'platforms' => :'Array<String>',
36
+ :'app_min_version' => :'String',
37
+ :'app_max_version' => :'String',
28
38
  :'branch' => :'String'
29
39
  }
30
40
  end
@@ -60,6 +70,14 @@ module Phrase
60
70
  end
61
71
  end
62
72
 
73
+ if attributes.key?(:'app_min_version')
74
+ self.app_min_version = attributes[:'app_min_version']
75
+ end
76
+
77
+ if attributes.key?(:'app_max_version')
78
+ self.app_max_version = attributes[:'app_max_version']
79
+ end
80
+
63
81
  if attributes.key?(:'branch')
64
82
  self.branch = attributes[:'branch']
65
83
  end
@@ -85,6 +103,8 @@ module Phrase
85
103
  self.class == o.class &&
86
104
  description == o.description &&
87
105
  platforms == o.platforms &&
106
+ app_min_version == o.app_min_version &&
107
+ app_max_version == o.app_max_version &&
88
108
  branch == o.branch
89
109
  end
90
110
 
@@ -97,7 +117,7 @@ module Phrase
97
117
  # Calculates hash code according to all attributes.
98
118
  # @return [Integer] Hash code
99
119
  def hash
100
- [description, platforms, branch].hash
120
+ [description, platforms, app_min_version, app_max_version, branch].hash
101
121
  end
102
122
 
103
123
  # Builds the object from hash