phrase 4.22.0 → 4.23.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 (204) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/README.md +8 -6
  4. data/docs/AccountDetails.md +1 -1
  5. data/docs/AuthorizationsApi.md +1 -1
  6. data/docs/Automation.md +6 -0
  7. data/docs/AutomationsApi.md +1 -1
  8. data/docs/AutomationsCreateParameters.md +5 -1
  9. data/docs/AutomationsCreateParameters1.md +5 -1
  10. data/docs/BlacklistedKeysApi.md +1 -1
  11. data/docs/Branch.md +2 -0
  12. data/docs/BranchCreateParameters.md +3 -1
  13. data/docs/BranchMergeParameters.md +1 -1
  14. data/docs/BranchSyncParameters.md +1 -1
  15. data/docs/BranchesApi.md +10 -10
  16. data/docs/CommentsApi.md +7 -7
  17. data/docs/Distribution.md +4 -4
  18. data/docs/{DistributionPreview.md → DistributionDetails.md} +9 -3
  19. data/docs/DistributionsApi.md +9 -9
  20. data/docs/DocumentDelete422Response.md +19 -0
  21. data/docs/{CustomMetadataPropertyCreate422ResponseErrorsInner.md → DocumentDelete422ResponseErrorsInner.md} +2 -2
  22. data/docs/DocumentsApi.md +4 -2
  23. data/docs/FigmaAttachmentsApi.md +1 -1
  24. data/docs/GlossariesApi.md +1 -1
  25. data/docs/Glossary.md +2 -0
  26. data/docs/GlossaryTerm.md +2 -0
  27. data/docs/GlossaryTermGlossary.md +19 -0
  28. data/docs/GlossaryTermTranslationsApi.md +1 -1
  29. data/docs/GlossaryTermsApi.md +1 -1
  30. data/docs/IcuSkeletonParameters.md +3 -1
  31. data/docs/Invitation.md +2 -2
  32. data/docs/InvitationsApi.md +1 -1
  33. data/docs/Job.md +5 -1
  34. data/docs/JobDetails.md +8 -2
  35. data/docs/JobTemplate.md +2 -0
  36. data/docs/JobTemplateDetails.md +2 -0
  37. data/docs/JobTemplatesApi.md +1 -1
  38. data/docs/JobsApi.md +15 -9
  39. data/docs/KeyCreateParameters.md +6 -2
  40. data/docs/KeyUpdateParameters.md +6 -2
  41. data/docs/KeysApi.md +1 -1
  42. data/docs/LocalesApi.md +6 -2
  43. data/docs/MembersApi.md +1 -1
  44. data/docs/NotificationsApi.md +3 -1
  45. data/docs/OrdersApi.md +4 -2
  46. data/docs/OrganizationJobTemplate.md +4 -0
  47. data/docs/OrganizationJobTemplateDetails.md +4 -0
  48. data/docs/OrganizationJobTemplatesApi.md +1 -1
  49. data/docs/ProjectCreateParameters.md +17 -1
  50. data/docs/ProjectDetails.md +7 -1
  51. data/docs/ProjectUpdateParameters.md +17 -3
  52. data/docs/ProjectsApi.md +10 -8
  53. data/docs/Release.md +2 -0
  54. data/docs/ReleasesApi.md +1 -1
  55. data/docs/RepoSync.md +2 -0
  56. data/docs/ScreenshotMarker.md +2 -2
  57. data/docs/ScreenshotMarkerPresentation.md +23 -0
  58. data/docs/ScreenshotMarkersApi.md +1 -1
  59. data/docs/ScreenshotUpdateParameters.md +1 -1
  60. data/docs/ScreenshotsApi.md +1 -1
  61. data/docs/SearchInAccountParameters.md +3 -1
  62. data/docs/StyleGuidesApi.md +1 -1
  63. data/docs/StyleguideCreateParameters.md +3 -3
  64. data/docs/StyleguideUpdateParameters.md +3 -3
  65. data/docs/Tag.md +2 -0
  66. data/docs/TagWithStats.md +2 -0
  67. data/docs/TagsApi.md +5 -3
  68. data/docs/TranslationCreateParameters.md +5 -1
  69. data/docs/TranslationOrder.md +2 -2
  70. data/docs/TranslationUpdateParameters.md +3 -1
  71. data/docs/TranslationsApi.md +4 -0
  72. data/docs/UploadBatch.md +4 -2
  73. data/docs/UploadsApi.md +3 -1
  74. data/docs/VariablesApi.md +1 -1
  75. data/docs/WebhooksApi.md +7 -6
  76. data/lib/phrase/api/authorizations_api.rb +2 -0
  77. data/lib/phrase/api/automations_api.rb +2 -0
  78. data/lib/phrase/api/blacklisted_keys_api.rb +2 -0
  79. data/lib/phrase/api/branches_api.rb +20 -14
  80. data/lib/phrase/api/comments_api.rb +18 -4
  81. data/lib/phrase/api/distributions_api.rb +14 -12
  82. data/lib/phrase/api/documents_api.rb +5 -0
  83. data/lib/phrase/api/figma_attachments_api.rb +2 -0
  84. data/lib/phrase/api/glossaries_api.rb +2 -0
  85. data/lib/phrase/api/glossary_term_translations_api.rb +2 -0
  86. data/lib/phrase/api/glossary_terms_api.rb +2 -0
  87. data/lib/phrase/api/invitations_api.rb +2 -0
  88. data/lib/phrase/api/job_templates_api.rb +2 -0
  89. data/lib/phrase/api/jobs_api.rb +18 -6
  90. data/lib/phrase/api/keys_api.rb +2 -0
  91. data/lib/phrase/api/locales_api.rb +8 -0
  92. data/lib/phrase/api/members_api.rb +2 -0
  93. data/lib/phrase/api/notifications_api.rb +3 -0
  94. data/lib/phrase/api/orders_api.rb +5 -0
  95. data/lib/phrase/api/organization_job_templates_api.rb +2 -0
  96. data/lib/phrase/api/projects_api.rb +23 -10
  97. data/lib/phrase/api/releases_api.rb +2 -0
  98. data/lib/phrase/api/screenshot_markers_api.rb +2 -0
  99. data/lib/phrase/api/screenshots_api.rb +2 -0
  100. data/lib/phrase/api/style_guides_api.rb +2 -0
  101. data/lib/phrase/api/tags_api.rb +7 -2
  102. data/lib/phrase/api/translations_api.rb +6 -0
  103. data/lib/phrase/api/uploads_api.rb +3 -0
  104. data/lib/phrase/api/variables_api.rb +2 -0
  105. data/lib/phrase/api/webhooks_api.rb +9 -5
  106. data/lib/phrase/models/account_details.rb +1 -0
  107. data/lib/phrase/models/authorization_create_parameters.rb +22 -0
  108. data/lib/phrase/models/authorization_update_parameters.rb +22 -0
  109. data/lib/phrase/models/automation.rb +34 -1
  110. data/lib/phrase/models/automations_create_parameters.rb +24 -4
  111. data/lib/phrase/models/automations_create_parameters1.rb +24 -4
  112. data/lib/phrase/models/branch.rb +46 -1
  113. data/lib/phrase/models/branch_create_parameters.rb +14 -4
  114. data/lib/phrase/models/branch_merge_parameters.rb +35 -1
  115. data/lib/phrase/models/branch_sync_parameters.rb +35 -1
  116. data/lib/phrase/models/distribution.rb +17 -20
  117. data/lib/phrase/models/{distribution_preview.rb → distribution_details.rb} +46 -7
  118. data/lib/phrase/models/{custom_metadata_property_create422_response.rb → document_delete422_response.rb} +4 -4
  119. data/lib/phrase/models/{custom_metadata_property_create422_response_errors_inner.rb → document_delete422_response_errors_inner.rb} +3 -3
  120. data/lib/phrase/models/glossary.rb +12 -1
  121. data/lib/phrase/models/glossary_term.rb +10 -1
  122. data/lib/phrase/models/glossary_term_glossary.rb +206 -0
  123. data/lib/phrase/models/icu_skeleton_parameters.rb +12 -2
  124. data/lib/phrase/models/invitation.rb +9 -8
  125. data/lib/phrase/models/job.rb +26 -4
  126. data/lib/phrase/models/job_details.rb +37 -4
  127. data/lib/phrase/models/job_template.rb +11 -1
  128. data/lib/phrase/models/job_template_details.rb +11 -1
  129. data/lib/phrase/models/key_create_parameters.rb +26 -4
  130. data/lib/phrase/models/key_update_parameters.rb +26 -4
  131. data/lib/phrase/models/organization_job_template.rb +22 -1
  132. data/lib/phrase/models/organization_job_template_details.rb +22 -1
  133. data/lib/phrase/models/project_create_parameters.rb +115 -1
  134. data/lib/phrase/models/project_details.rb +31 -4
  135. data/lib/phrase/models/project_update_parameters.rb +75 -5
  136. data/lib/phrase/models/release.rb +10 -1
  137. data/lib/phrase/models/repo_sync.rb +12 -1
  138. data/lib/phrase/models/screenshot_marker.rb +2 -1
  139. data/lib/phrase/models/screenshot_marker_presentation.rb +224 -0
  140. data/lib/phrase/models/search_in_account_parameters.rb +16 -4
  141. data/lib/phrase/models/styleguide_create_parameters.rb +61 -3
  142. data/lib/phrase/models/styleguide_update_parameters.rb +61 -3
  143. data/lib/phrase/models/tag.rb +11 -1
  144. data/lib/phrase/models/tag_with_stats.rb +11 -1
  145. data/lib/phrase/models/translation_create_parameters.rb +24 -4
  146. data/lib/phrase/models/translation_order.rb +8 -7
  147. data/lib/phrase/models/translation_update_parameters.rb +14 -4
  148. data/lib/phrase/models/upload_batch.rb +24 -14
  149. data/lib/phrase/version.rb +1 -1
  150. data/lib/phrase.rb +5 -3
  151. data/spec/api/branches_api_spec.rb +7 -7
  152. data/spec/api/comments_api_spec.rb +2 -2
  153. data/spec/api/distributions_api_spec.rb +4 -4
  154. data/spec/api/documents_api_spec.rb +1 -0
  155. data/spec/api/jobs_api_spec.rb +4 -2
  156. data/spec/api/notifications_api_spec.rb +1 -0
  157. data/spec/api/orders_api_spec.rb +1 -0
  158. data/spec/api/projects_api_spec.rb +6 -5
  159. data/spec/api/tags_api_spec.rb +2 -1
  160. data/spec/api/translations_api_spec.rb +2 -0
  161. data/spec/api/webhooks_api_spec.rb +2 -2
  162. data/spec/models/authorization_create_parameters_spec.rb +4 -0
  163. data/spec/models/authorization_update_parameters_spec.rb +4 -0
  164. data/spec/models/automation_spec.rb +18 -0
  165. data/spec/models/automations_create_parameters1_spec.rb +12 -0
  166. data/spec/models/automations_create_parameters_spec.rb +12 -0
  167. data/spec/models/branch_create_parameters_spec.rb +6 -0
  168. data/spec/models/branch_merge_parameters_spec.rb +4 -0
  169. data/spec/models/branch_spec.rb +10 -0
  170. data/spec/models/branch_sync_parameters_spec.rb +4 -0
  171. data/spec/models/{distribution_preview_spec.rb → distribution_details_spec.rb} +24 -6
  172. data/spec/models/distribution_spec.rb +3 -3
  173. data/spec/models/{custom_metadata_property_create422_response_errors_inner_spec.rb → document_delete422_response_errors_inner_spec.rb} +6 -6
  174. data/spec/models/{custom_metadata_property_create422_response_spec.rb → document_delete422_response_spec.rb} +6 -6
  175. data/spec/models/glossary_spec.rb +6 -0
  176. data/spec/models/glossary_term_glossary_spec.rb +35 -0
  177. data/spec/models/glossary_term_spec.rb +6 -0
  178. data/spec/models/icu_skeleton_parameters_spec.rb +6 -0
  179. data/spec/models/invitation_spec.rb +1 -1
  180. data/spec/models/job_details_spec.rb +18 -0
  181. data/spec/models/job_spec.rb +12 -0
  182. data/spec/models/job_template_details_spec.rb +6 -0
  183. data/spec/models/job_template_spec.rb +6 -0
  184. data/spec/models/key_create_parameters_spec.rb +12 -0
  185. data/spec/models/key_update_parameters_spec.rb +12 -0
  186. data/spec/models/organization_job_template_details_spec.rb +12 -0
  187. data/spec/models/organization_job_template_spec.rb +12 -0
  188. data/spec/models/project_create_parameters_spec.rb +52 -0
  189. data/spec/models/project_details_spec.rb +18 -0
  190. data/spec/models/project_update_parameters_spec.rb +42 -0
  191. data/spec/models/release_spec.rb +6 -0
  192. data/spec/models/repo_sync_spec.rb +6 -0
  193. data/spec/models/screenshot_marker_presentation_spec.rb +47 -0
  194. data/spec/models/search_in_account_parameters_spec.rb +6 -0
  195. data/spec/models/styleguide_create_parameters_spec.rb +12 -0
  196. data/spec/models/styleguide_update_parameters_spec.rb +12 -0
  197. data/spec/models/tag_spec.rb +6 -0
  198. data/spec/models/tag_with_stats_spec.rb +6 -0
  199. data/spec/models/translation_create_parameters_spec.rb +12 -0
  200. data/spec/models/translation_order_spec.rb +1 -1
  201. data/spec/models/translation_update_parameters_spec.rb +6 -0
  202. data/spec/models/upload_batch_spec.rb +8 -2
  203. metadata +267 -259
  204. data/docs/CustomMetadataPropertyCreate422Response.md +0 -19
@@ -0,0 +1,206 @@
1
+ require 'date'
2
+
3
+ module Phrase
4
+ # The glossary this term belongs to.
5
+ class GlossaryTermGlossary
6
+ attr_accessor :id
7
+
8
+ attr_accessor :name
9
+
10
+ # Attribute mapping from ruby-style variable name to JSON key.
11
+ def self.attribute_map
12
+ {
13
+ :'id' => :'id',
14
+ :'name' => :'name'
15
+ }
16
+ end
17
+
18
+ # Attribute type mapping.
19
+ def self.openapi_types
20
+ {
21
+ :'id' => :'String',
22
+ :'name' => :'String'
23
+ }
24
+ end
25
+
26
+ # List of attributes with nullable: true
27
+ def self.openapi_nullable
28
+ Set.new([
29
+ ])
30
+ end
31
+
32
+ # Initializes the object
33
+ # @param [Hash] attributes Model attributes in the form of hash
34
+ def initialize(attributes = {})
35
+ if (!attributes.is_a?(Hash))
36
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::GlossaryTermGlossary` initialize method"
37
+ end
38
+
39
+ # check to see if the attribute exists and convert string to symbol for hash key
40
+ attributes = attributes.each_with_object({}) { |(k, v), h|
41
+ if (!self.class.attribute_map.key?(k.to_sym))
42
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::GlossaryTermGlossary`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
43
+ end
44
+ h[k.to_sym] = v
45
+ }
46
+
47
+ if attributes.key?(:'id')
48
+ self.id = attributes[:'id']
49
+ end
50
+
51
+ if attributes.key?(:'name')
52
+ self.name = attributes[:'name']
53
+ end
54
+ end
55
+
56
+ # Show invalid properties with the reasons. Usually used together with valid?
57
+ # @return Array for valid properties with the reasons
58
+ def list_invalid_properties
59
+ invalid_properties = Array.new
60
+ invalid_properties
61
+ end
62
+
63
+ # Check to see if the all the properties in the model are valid
64
+ # @return true if the model is valid
65
+ def valid?
66
+ true
67
+ end
68
+
69
+ # Checks equality by comparing each attribute.
70
+ # @param [Object] Object to be compared
71
+ def ==(o)
72
+ return true if self.equal?(o)
73
+ self.class == o.class &&
74
+ id == o.id &&
75
+ name == o.name
76
+ end
77
+
78
+ # @see the `==` method
79
+ # @param [Object] Object to be compared
80
+ def eql?(o)
81
+ self == o
82
+ end
83
+
84
+ # Calculates hash code according to all attributes.
85
+ # @return [Integer] Hash code
86
+ def hash
87
+ [id, name].hash
88
+ end
89
+
90
+ # Builds the object from hash
91
+ # @param [Hash] attributes Model attributes in the form of hash
92
+ # @return [Object] Returns the model itself
93
+ def self.build_from_hash(attributes)
94
+ new.build_from_hash(attributes)
95
+ end
96
+
97
+ # Builds the object from hash
98
+ # @param [Hash] attributes Model attributes in the form of hash
99
+ # @return [Object] Returns the model itself
100
+ def build_from_hash(attributes)
101
+ return nil unless attributes.is_a?(Hash)
102
+ self.class.openapi_types.each_pair do |key, type|
103
+ if type =~ /\AArray<(.*)>/i
104
+ # check to ensure the input is an array given that the attribute
105
+ # is documented as an array but the input is not
106
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
107
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
108
+ end
109
+ elsif !attributes[self.class.attribute_map[key]].nil?
110
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
111
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
112
+ end
113
+
114
+ self
115
+ end
116
+
117
+ # Deserializes the data based on type
118
+ # @param string type Data type
119
+ # @param string value Value to be deserialized
120
+ # @return [Object] Deserialized data
121
+ def _deserialize(type, value)
122
+ case type.to_sym
123
+ when :DateTime
124
+ DateTime.parse(value)
125
+ when :Date
126
+ Date.parse(value)
127
+ when :Time
128
+ Time.parse(value)
129
+ when :String
130
+ value.to_s
131
+ when :Integer
132
+ value.to_i
133
+ when :Float
134
+ value.to_f
135
+ when :Boolean
136
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
137
+ true
138
+ else
139
+ false
140
+ end
141
+ when :Object
142
+ # generic object (usually a Hash), return directly
143
+ value
144
+ when /\AArray<(?<inner_type>.+)>\z/
145
+ inner_type = Regexp.last_match[:inner_type]
146
+ value.map { |v| _deserialize(inner_type, v) }
147
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
148
+ k_type = Regexp.last_match[:k_type]
149
+ v_type = Regexp.last_match[:v_type]
150
+ {}.tap do |hash|
151
+ value.each do |k, v|
152
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
153
+ end
154
+ end
155
+ else # model
156
+ Phrase.const_get(type).build_from_hash(value)
157
+ end
158
+ end
159
+
160
+ # Returns the string representation of the object
161
+ # @return [String] String presentation of the object
162
+ def to_s
163
+ to_hash.to_s
164
+ end
165
+
166
+ # to_body is an alias to to_hash (backward compatibility)
167
+ # @return [Hash] Returns the object in the form of hash
168
+ def to_body
169
+ to_hash
170
+ end
171
+
172
+ # Returns the object in the form of hash
173
+ # @return [Hash] Returns the object in the form of hash
174
+ def to_hash
175
+ hash = {}
176
+ self.class.attribute_map.each_pair do |attr, param|
177
+ value = self.send(attr)
178
+ if value.nil?
179
+ is_nullable = self.class.openapi_nullable.include?(attr)
180
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
181
+ end
182
+
183
+ hash[param] = _to_hash(value)
184
+ end
185
+ hash
186
+ end
187
+
188
+ # Outputs non-array value in the form of hash
189
+ # For object, use to_hash. Otherwise, just return the value
190
+ # @param [Object] value Any valid value
191
+ # @return [Hash] Returns the value in the form of hash
192
+ def _to_hash(value)
193
+ if value.is_a?(Array)
194
+ value.compact.map { |v| _to_hash(v) }
195
+ elsif value.is_a?(Hash)
196
+ {}.tap do |hash|
197
+ value.each { |k, v| hash[k] = _to_hash(v) }
198
+ end
199
+ elsif value.respond_to? :to_hash
200
+ value.to_hash
201
+ else
202
+ value
203
+ end
204
+ end
205
+ end
206
+ end
@@ -2,9 +2,12 @@ require 'date'
2
2
 
3
3
  module Phrase
4
4
  class IcuSkeletonParameters
5
- # Source content
5
+ # Source content to derive skeletons from. Mutually exclusive with `id`; exactly one of the two must be provided.
6
6
  attr_accessor :content
7
7
 
8
+ # Translation code to source content from. Mutually exclusive with `content`; exactly one of the two must be provided.
9
+ attr_accessor :id
10
+
8
11
  # Locale codes
9
12
  attr_accessor :locale_codes
10
13
 
@@ -21,6 +24,7 @@ module Phrase
21
24
  def self.attribute_map
22
25
  {
23
26
  :'content' => :'content',
27
+ :'id' => :'id',
24
28
  :'locale_codes' => :'locale_codes',
25
29
  :'keep_content' => :'keep_content',
26
30
  :'zero_form_enabled' => :'zero_form_enabled',
@@ -32,6 +36,7 @@ module Phrase
32
36
  def self.openapi_types
33
37
  {
34
38
  :'content' => :'String',
39
+ :'id' => :'String',
35
40
  :'locale_codes' => :'Array<String>',
36
41
  :'keep_content' => :'Boolean',
37
42
  :'zero_form_enabled' => :'Boolean',
@@ -64,6 +69,10 @@ module Phrase
64
69
  self.content = attributes[:'content']
65
70
  end
66
71
 
72
+ if attributes.key?(:'id')
73
+ self.id = attributes[:'id']
74
+ end
75
+
67
76
  if attributes.key?(:'locale_codes')
68
77
  if (value = attributes[:'locale_codes']).is_a?(Array)
69
78
  self.locale_codes = value
@@ -102,6 +111,7 @@ module Phrase
102
111
  return true if self.equal?(o)
103
112
  self.class == o.class &&
104
113
  content == o.content &&
114
+ id == o.id &&
105
115
  locale_codes == o.locale_codes &&
106
116
  keep_content == o.keep_content &&
107
117
  zero_form_enabled == o.zero_form_enabled &&
@@ -117,7 +127,7 @@ module Phrase
117
127
  # Calculates hash code according to all attributes.
118
128
  # @return [Integer] Hash code
119
129
  def hash
120
- [content, locale_codes, keep_content, zero_form_enabled, cldr_version].hash
130
+ [content, id, locale_codes, keep_content, zero_form_enabled, cldr_version].hash
121
131
  end
122
132
 
123
133
  # Builds the object from hash
@@ -30,7 +30,8 @@ module Phrase
30
30
 
31
31
  attr_accessor :spaces
32
32
 
33
- attr_accessor :project_role
33
+ # Per-project roles assigned to the invitee.
34
+ attr_accessor :project_roles
34
35
 
35
36
  # Attribute mapping from ruby-style variable name to JSON key.
36
37
  def self.attribute_map
@@ -49,7 +50,7 @@ module Phrase
49
50
  :'updated_at' => :'updated_at',
50
51
  :'accepted_at' => :'accepted_at',
51
52
  :'spaces' => :'spaces',
52
- :'project_role' => :'project_role'
53
+ :'project_roles' => :'project_roles'
53
54
  }
54
55
  end
55
56
 
@@ -70,7 +71,7 @@ module Phrase
70
71
  :'updated_at' => :'DateTime',
71
72
  :'accepted_at' => :'DateTime',
72
73
  :'spaces' => :'Array<Space>',
73
- :'project_role' => :'Array<MemberProjectDetailProjectRolesInner>'
74
+ :'project_roles' => :'Array<MemberProjectDetailProjectRolesInner>'
74
75
  }
75
76
  end
76
77
 
@@ -163,9 +164,9 @@ module Phrase
163
164
  end
164
165
  end
165
166
 
166
- if attributes.key?(:'project_role')
167
- if (value = attributes[:'project_role']).is_a?(Array)
168
- self.project_role = value
167
+ if attributes.key?(:'project_roles')
168
+ if (value = attributes[:'project_roles']).is_a?(Array)
169
+ self.project_roles = value
169
170
  end
170
171
  end
171
172
  end
@@ -202,7 +203,7 @@ module Phrase
202
203
  updated_at == o.updated_at &&
203
204
  accepted_at == o.accepted_at &&
204
205
  spaces == o.spaces &&
205
- project_role == o.project_role
206
+ project_roles == o.project_roles
206
207
  end
207
208
 
208
209
  # @see the `==` method
@@ -214,7 +215,7 @@ module Phrase
214
215
  # Calculates hash code according to all attributes.
215
216
  # @return [Integer] Hash code
216
217
  def hash
217
- [id, email, role, state, projects, locales, teams, default_locale_codes, permissions, locale_ids, created_at, updated_at, accepted_at, spaces, project_role].hash
218
+ [id, email, role, state, projects, locales, teams, default_locale_codes, permissions, locale_ids, created_at, updated_at, accepted_at, spaces, project_roles].hash
218
219
  end
219
220
 
220
221
  # Builds the object from hash
@@ -22,6 +22,12 @@ module Phrase
22
22
 
23
23
  attr_accessor :updated_at
24
24
 
25
+ # The ID of the automation that created this job, or null if the job was created manually.
26
+ attr_accessor :automation_id
27
+
28
+ # The ID of the job template this job was created from, or null if no template was used.
29
+ attr_accessor :job_template_id
30
+
25
31
  # Attribute mapping from ruby-style variable name to JSON key.
26
32
  def self.attribute_map
27
33
  {
@@ -34,7 +40,9 @@ module Phrase
34
40
  :'project' => :'project',
35
41
  :'branch' => :'branch',
36
42
  :'created_at' => :'created_at',
37
- :'updated_at' => :'updated_at'
43
+ :'updated_at' => :'updated_at',
44
+ :'automation_id' => :'automation_id',
45
+ :'job_template_id' => :'job_template_id'
38
46
  }
39
47
  end
40
48
 
@@ -50,7 +58,9 @@ module Phrase
50
58
  :'project' => :'ProjectShort',
51
59
  :'branch' => :'BranchName',
52
60
  :'created_at' => :'DateTime',
53
- :'updated_at' => :'DateTime'
61
+ :'updated_at' => :'DateTime',
62
+ :'automation_id' => :'String',
63
+ :'job_template_id' => :'String'
54
64
  }
55
65
  end
56
66
 
@@ -58,6 +68,8 @@ module Phrase
58
68
  def self.openapi_nullable
59
69
  Set.new([
60
70
  :'due_date',
71
+ :'automation_id',
72
+ :'job_template_id'
61
73
  ])
62
74
  end
63
75
 
@@ -115,6 +127,14 @@ module Phrase
115
127
  if attributes.key?(:'updated_at')
116
128
  self.updated_at = attributes[:'updated_at']
117
129
  end
130
+
131
+ if attributes.key?(:'automation_id')
132
+ self.automation_id = attributes[:'automation_id']
133
+ end
134
+
135
+ if attributes.key?(:'job_template_id')
136
+ self.job_template_id = attributes[:'job_template_id']
137
+ end
118
138
  end
119
139
 
120
140
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -144,7 +164,9 @@ module Phrase
144
164
  project == o.project &&
145
165
  branch == o.branch &&
146
166
  created_at == o.created_at &&
147
- updated_at == o.updated_at
167
+ updated_at == o.updated_at &&
168
+ automation_id == o.automation_id &&
169
+ job_template_id == o.job_template_id
148
170
  end
149
171
 
150
172
  # @see the `==` method
@@ -156,7 +178,7 @@ module Phrase
156
178
  # Calculates hash code according to all attributes.
157
179
  # @return [Integer] Hash code
158
180
  def hash
159
- [id, name, briefing, due_date, state, ticket_url, project, branch, created_at, updated_at].hash
181
+ [id, name, briefing, due_date, state, ticket_url, project, branch, created_at, updated_at, automation_id, job_template_id].hash
160
182
  end
161
183
 
162
184
  # Builds the object from hash
@@ -22,6 +22,12 @@ module Phrase
22
22
 
23
23
  attr_accessor :updated_at
24
24
 
25
+ # The ID of the automation that created this job, or null if the job was created manually.
26
+ attr_accessor :automation_id
27
+
28
+ # The ID of the job template this job was created from, or null if no template was used.
29
+ attr_accessor :job_template_id
30
+
25
31
  attr_accessor :owner
26
32
 
27
33
  attr_accessor :job_tag_name
@@ -34,8 +40,12 @@ module Phrase
34
40
 
35
41
  attr_accessor :keys
36
42
 
43
+ # Returned only when `include_annotations=true` is supplied on the request.
37
44
  attr_accessor :annotations
38
45
 
46
+ # `true` if the job has been locked by the project's job-locking workflow (translations attached to the job are read-only until the job advances).
47
+ attr_accessor :locked
48
+
39
49
  # Attribute mapping from ruby-style variable name to JSON key.
40
50
  def self.attribute_map
41
51
  {
@@ -49,13 +59,16 @@ module Phrase
49
59
  :'branch' => :'branch',
50
60
  :'created_at' => :'created_at',
51
61
  :'updated_at' => :'updated_at',
62
+ :'automation_id' => :'automation_id',
63
+ :'job_template_id' => :'job_template_id',
52
64
  :'owner' => :'owner',
53
65
  :'job_tag_name' => :'job_tag_name',
54
66
  :'source_translations_updated_at' => :'source_translations_updated_at',
55
67
  :'source_locale' => :'source_locale',
56
68
  :'locales' => :'locales',
57
69
  :'keys' => :'keys',
58
- :'annotations' => :'annotations'
70
+ :'annotations' => :'annotations',
71
+ :'locked' => :'locked'
59
72
  }
60
73
  end
61
74
 
@@ -72,13 +85,16 @@ module Phrase
72
85
  :'branch' => :'BranchName',
73
86
  :'created_at' => :'DateTime',
74
87
  :'updated_at' => :'DateTime',
88
+ :'automation_id' => :'String',
89
+ :'job_template_id' => :'String',
75
90
  :'owner' => :'UserPreview',
76
91
  :'job_tag_name' => :'String',
77
92
  :'source_translations_updated_at' => :'DateTime',
78
93
  :'source_locale' => :'LocalePreview',
79
94
  :'locales' => :'Array<LocalePreview>',
80
95
  :'keys' => :'Array<KeyPreview>',
81
- :'annotations' => :'Array<JobAnnotationShort>'
96
+ :'annotations' => :'Array<JobAnnotationShort>',
97
+ :'locked' => :'Boolean'
82
98
  }
83
99
  end
84
100
 
@@ -86,6 +102,8 @@ module Phrase
86
102
  def self.openapi_nullable
87
103
  Set.new([
88
104
  :'due_date',
105
+ :'automation_id',
106
+ :'job_template_id',
89
107
  ])
90
108
  end
91
109
 
@@ -151,6 +169,14 @@ module Phrase
151
169
  self.updated_at = attributes[:'updated_at']
152
170
  end
153
171
 
172
+ if attributes.key?(:'automation_id')
173
+ self.automation_id = attributes[:'automation_id']
174
+ end
175
+
176
+ if attributes.key?(:'job_template_id')
177
+ self.job_template_id = attributes[:'job_template_id']
178
+ end
179
+
154
180
  if attributes.key?(:'owner')
155
181
  self.owner = attributes[:'owner']
156
182
  end
@@ -184,6 +210,10 @@ module Phrase
184
210
  self.annotations = value
185
211
  end
186
212
  end
213
+
214
+ if attributes.key?(:'locked')
215
+ self.locked = attributes[:'locked']
216
+ end
187
217
  end
188
218
 
189
219
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -214,13 +244,16 @@ module Phrase
214
244
  branch == o.branch &&
215
245
  created_at == o.created_at &&
216
246
  updated_at == o.updated_at &&
247
+ automation_id == o.automation_id &&
248
+ job_template_id == o.job_template_id &&
217
249
  owner == o.owner &&
218
250
  job_tag_name == o.job_tag_name &&
219
251
  source_translations_updated_at == o.source_translations_updated_at &&
220
252
  source_locale == o.source_locale &&
221
253
  locales == o.locales &&
222
254
  keys == o.keys &&
223
- annotations == o.annotations
255
+ annotations == o.annotations &&
256
+ locked == o.locked
224
257
  end
225
258
 
226
259
  # @see the `==` method
@@ -232,7 +265,7 @@ module Phrase
232
265
  # Calculates hash code according to all attributes.
233
266
  # @return [Integer] Hash code
234
267
  def hash
235
- [id, name, briefing, due_date, state, ticket_url, project, branch, created_at, updated_at, owner, job_tag_name, source_translations_updated_at, source_locale, locales, keys, annotations].hash
268
+ [id, name, briefing, due_date, state, ticket_url, project, branch, created_at, updated_at, automation_id, job_template_id, owner, job_tag_name, source_translations_updated_at, source_locale, locales, keys, annotations, locked].hash
236
269
  end
237
270
 
238
271
  # Builds the object from hash
@@ -12,6 +12,9 @@ module Phrase
12
12
 
13
13
  attr_accessor :branch
14
14
 
15
+ # When `true`, jobs created from this template are auto-translated on creation.
16
+ attr_accessor :autotranslate_enabled
17
+
15
18
  attr_accessor :created_at
16
19
 
17
20
  attr_accessor :updated_at
@@ -24,6 +27,7 @@ module Phrase
24
27
  :'briefing' => :'briefing',
25
28
  :'project' => :'project',
26
29
  :'branch' => :'branch',
30
+ :'autotranslate_enabled' => :'autotranslate_enabled',
27
31
  :'created_at' => :'created_at',
28
32
  :'updated_at' => :'updated_at'
29
33
  }
@@ -37,6 +41,7 @@ module Phrase
37
41
  :'briefing' => :'String',
38
42
  :'project' => :'ProjectShort',
39
43
  :'branch' => :'Branch',
44
+ :'autotranslate_enabled' => :'Boolean',
40
45
  :'created_at' => :'DateTime',
41
46
  :'updated_at' => :'DateTime'
42
47
  }
@@ -83,6 +88,10 @@ module Phrase
83
88
  self.branch = attributes[:'branch']
84
89
  end
85
90
 
91
+ if attributes.key?(:'autotranslate_enabled')
92
+ self.autotranslate_enabled = attributes[:'autotranslate_enabled']
93
+ end
94
+
86
95
  if attributes.key?(:'created_at')
87
96
  self.created_at = attributes[:'created_at']
88
97
  end
@@ -115,6 +124,7 @@ module Phrase
115
124
  briefing == o.briefing &&
116
125
  project == o.project &&
117
126
  branch == o.branch &&
127
+ autotranslate_enabled == o.autotranslate_enabled &&
118
128
  created_at == o.created_at &&
119
129
  updated_at == o.updated_at
120
130
  end
@@ -128,7 +138,7 @@ module Phrase
128
138
  # Calculates hash code according to all attributes.
129
139
  # @return [Integer] Hash code
130
140
  def hash
131
- [id, name, briefing, project, branch, created_at, updated_at].hash
141
+ [id, name, briefing, project, branch, autotranslate_enabled, created_at, updated_at].hash
132
142
  end
133
143
 
134
144
  # Builds the object from hash
@@ -12,6 +12,9 @@ module Phrase
12
12
 
13
13
  attr_accessor :branch
14
14
 
15
+ # When `true`, jobs created from this template are auto-translated on creation.
16
+ attr_accessor :autotranslate_enabled
17
+
15
18
  attr_accessor :created_at
16
19
 
17
20
  attr_accessor :updated_at
@@ -30,6 +33,7 @@ module Phrase
30
33
  :'briefing' => :'briefing',
31
34
  :'project' => :'project',
32
35
  :'branch' => :'branch',
36
+ :'autotranslate_enabled' => :'autotranslate_enabled',
33
37
  :'created_at' => :'created_at',
34
38
  :'updated_at' => :'updated_at',
35
39
  :'owner' => :'owner',
@@ -46,6 +50,7 @@ module Phrase
46
50
  :'briefing' => :'String',
47
51
  :'project' => :'ProjectShort',
48
52
  :'branch' => :'Branch',
53
+ :'autotranslate_enabled' => :'Boolean',
49
54
  :'created_at' => :'DateTime',
50
55
  :'updated_at' => :'DateTime',
51
56
  :'owner' => :'UserPreview',
@@ -102,6 +107,10 @@ module Phrase
102
107
  self.branch = attributes[:'branch']
103
108
  end
104
109
 
110
+ if attributes.key?(:'autotranslate_enabled')
111
+ self.autotranslate_enabled = attributes[:'autotranslate_enabled']
112
+ end
113
+
105
114
  if attributes.key?(:'created_at')
106
115
  self.created_at = attributes[:'created_at']
107
116
  end
@@ -148,6 +157,7 @@ module Phrase
148
157
  briefing == o.briefing &&
149
158
  project == o.project &&
150
159
  branch == o.branch &&
160
+ autotranslate_enabled == o.autotranslate_enabled &&
151
161
  created_at == o.created_at &&
152
162
  updated_at == o.updated_at &&
153
163
  owner == o.owner &&
@@ -164,7 +174,7 @@ module Phrase
164
174
  # Calculates hash code according to all attributes.
165
175
  # @return [Integer] Hash code
166
176
  def hash
167
- [id, name, briefing, project, branch, created_at, updated_at, owner, creator, locales].hash
177
+ [id, name, briefing, project, branch, autotranslate_enabled, created_at, updated_at, owner, creator, locales].hash
168
178
  end
169
179
 
170
180
  # Builds the object from hash
@@ -59,6 +59,12 @@ module Phrase
59
59
  # Custom metadata property name and value pairs to be associated with key.
60
60
  attr_accessor :custom_metadata
61
61
 
62
+ # Locales for which translations of this key are excluded from exports. Pass an empty array to clear exclusions.
63
+ attr_accessor :excluded_in_locales
64
+
65
+ # Override of the value type for the key in the export. Most useful for formats like Android XML that distinguish string vs. plural resources.
66
+ attr_accessor :format_value_type
67
+
62
68
  # Attribute mapping from ruby-style variable name to JSON key.
63
69
  def self.attribute_map
64
70
  {
@@ -80,7 +86,9 @@ module Phrase
80
86
  :'original_file' => :'original_file',
81
87
  :'localized_format_string' => :'localized_format_string',
82
88
  :'localized_format_key' => :'localized_format_key',
83
- :'custom_metadata' => :'custom_metadata'
89
+ :'custom_metadata' => :'custom_metadata',
90
+ :'excluded_in_locales' => :'excluded_in_locales',
91
+ :'format_value_type' => :'format_value_type'
84
92
  }
85
93
  end
86
94
 
@@ -105,7 +113,9 @@ module Phrase
105
113
  :'original_file' => :'String',
106
114
  :'localized_format_string' => :'String',
107
115
  :'localized_format_key' => :'String',
108
- :'custom_metadata' => :'Object'
116
+ :'custom_metadata' => :'Object',
117
+ :'excluded_in_locales' => :'Array<String>',
118
+ :'format_value_type' => :'String'
109
119
  }
110
120
  end
111
121
 
@@ -205,6 +215,16 @@ module Phrase
205
215
  if attributes.key?(:'custom_metadata')
206
216
  self.custom_metadata = attributes[:'custom_metadata']
207
217
  end
218
+
219
+ if attributes.key?(:'excluded_in_locales')
220
+ if (value = attributes[:'excluded_in_locales']).is_a?(Array)
221
+ self.excluded_in_locales = value
222
+ end
223
+ end
224
+
225
+ if attributes.key?(:'format_value_type')
226
+ self.format_value_type = attributes[:'format_value_type']
227
+ end
208
228
  end
209
229
 
210
230
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -248,7 +268,9 @@ module Phrase
248
268
  original_file == o.original_file &&
249
269
  localized_format_string == o.localized_format_string &&
250
270
  localized_format_key == o.localized_format_key &&
251
- custom_metadata == o.custom_metadata
271
+ custom_metadata == o.custom_metadata &&
272
+ excluded_in_locales == o.excluded_in_locales &&
273
+ format_value_type == o.format_value_type
252
274
  end
253
275
 
254
276
  # @see the `==` method
@@ -260,7 +282,7 @@ module Phrase
260
282
  # Calculates hash code according to all attributes.
261
283
  # @return [Integer] Hash code
262
284
  def hash
263
- [branch, name, description, plural, use_ordinal_rules, name_plural, data_type, tags, max_characters_allowed, screenshot, remove_screenshot, unformatted, default_translation_content, autotranslate, xml_space_preserve, original_file, localized_format_string, localized_format_key, custom_metadata].hash
285
+ [branch, name, description, plural, use_ordinal_rules, name_plural, data_type, tags, max_characters_allowed, screenshot, remove_screenshot, unformatted, default_translation_content, autotranslate, xml_space_preserve, original_file, localized_format_string, localized_format_key, custom_metadata, excluded_in_locales, format_value_type].hash
264
286
  end
265
287
 
266
288
  # Builds the object from hash