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
@@ -8,6 +8,9 @@ module Phrase
8
8
 
9
9
  attr_accessor :name
10
10
 
11
+ # Name of the base branch this branch was created from. Only present for branches created with the newer branching system.
12
+ attr_accessor :base
13
+
11
14
  attr_accessor :created_at
12
15
 
13
16
  attr_accessor :updated_at
@@ -22,12 +25,35 @@ module Phrase
22
25
 
23
26
  attr_accessor :child_branches
24
27
 
28
+ class EnumAttributeValidator
29
+ attr_reader :datatype
30
+ attr_reader :allowable_values
31
+
32
+ def initialize(datatype, allowable_values)
33
+ @allowable_values = allowable_values.map do |value|
34
+ case datatype.to_s
35
+ when /Integer/i
36
+ value.to_i
37
+ when /Float/i
38
+ value.to_f
39
+ else
40
+ value
41
+ end
42
+ end
43
+ end
44
+
45
+ def valid?(value)
46
+ !value || allowable_values.include?(value)
47
+ end
48
+ end
49
+
25
50
  # Attribute mapping from ruby-style variable name to JSON key.
26
51
  def self.attribute_map
27
52
  {
28
53
  :'base_project_id' => :'base_project_id',
29
54
  :'branch_project_id' => :'branch_project_id',
30
55
  :'name' => :'name',
56
+ :'base' => :'base',
31
57
  :'created_at' => :'created_at',
32
58
  :'updated_at' => :'updated_at',
33
59
  :'merged_at' => :'merged_at',
@@ -44,6 +70,7 @@ module Phrase
44
70
  :'base_project_id' => :'String',
45
71
  :'branch_project_id' => :'String',
46
72
  :'name' => :'String',
73
+ :'base' => :'String',
47
74
  :'created_at' => :'DateTime',
48
75
  :'updated_at' => :'DateTime',
49
76
  :'merged_at' => :'DateTime',
@@ -57,6 +84,7 @@ module Phrase
57
84
  # List of attributes with nullable: true
58
85
  def self.openapi_nullable
59
86
  Set.new([
87
+ :'base',
60
88
  ])
61
89
  end
62
90
 
@@ -87,6 +115,10 @@ module Phrase
87
115
  self.name = attributes[:'name']
88
116
  end
89
117
 
118
+ if attributes.key?(:'base')
119
+ self.base = attributes[:'base']
120
+ end
121
+
90
122
  if attributes.key?(:'created_at')
91
123
  self.created_at = attributes[:'created_at']
92
124
  end
@@ -128,9 +160,21 @@ module Phrase
128
160
  # Check to see if the all the properties in the model are valid
129
161
  # @return true if the model is valid
130
162
  def valid?
163
+ state_validator = EnumAttributeValidator.new('String', ["creating_branch", "merging_branch", "syncing_branch", "merged", "success", "branch_error", "merge_conflict"])
164
+ return false unless state_validator.valid?(@state)
131
165
  true
132
166
  end
133
167
 
168
+ # Custom attribute writer method checking allowed values (enum).
169
+ # @param [Object] state Object to be assigned
170
+ def state=(state)
171
+ validator = EnumAttributeValidator.new('String', ["creating_branch", "merging_branch", "syncing_branch", "merged", "success", "branch_error", "merge_conflict"])
172
+ unless validator.valid?(state)
173
+ fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}."
174
+ end
175
+ @state = state
176
+ end
177
+
134
178
  # Checks equality by comparing each attribute.
135
179
  # @param [Object] Object to be compared
136
180
  def ==(o)
@@ -139,6 +183,7 @@ module Phrase
139
183
  base_project_id == o.base_project_id &&
140
184
  branch_project_id == o.branch_project_id &&
141
185
  name == o.name &&
186
+ base == o.base &&
142
187
  created_at == o.created_at &&
143
188
  updated_at == o.updated_at &&
144
189
  merged_at == o.merged_at &&
@@ -157,7 +202,7 @@ module Phrase
157
202
  # Calculates hash code according to all attributes.
158
203
  # @return [Integer] Hash code
159
204
  def hash
160
- [base_project_id, branch_project_id, name, created_at, updated_at, merged_at, merged_by, created_by, state, child_branches].hash
205
+ [base_project_id, branch_project_id, name, base, created_at, updated_at, merged_at, merged_by, created_by, state, child_branches].hash
161
206
  end
162
207
 
163
208
  # Builds the object from hash
@@ -5,17 +5,22 @@ module Phrase
5
5
  # Name of the branch
6
6
  attr_accessor :name
7
7
 
8
+ # Name of an existing branch to use as the base for the new branch.
9
+ attr_accessor :base
10
+
8
11
  # Attribute mapping from ruby-style variable name to JSON key.
9
12
  def self.attribute_map
10
13
  {
11
- :'name' => :'name'
14
+ :'name' => :'name',
15
+ :'base' => :'base'
12
16
  }
13
17
  end
14
18
 
15
19
  # Attribute type mapping.
16
20
  def self.openapi_types
17
21
  {
18
- :'name' => :'String'
22
+ :'name' => :'String',
23
+ :'base' => :'String'
19
24
  }
20
25
  end
21
26
 
@@ -43,6 +48,10 @@ module Phrase
43
48
  if attributes.key?(:'name')
44
49
  self.name = attributes[:'name']
45
50
  end
51
+
52
+ if attributes.key?(:'base')
53
+ self.base = attributes[:'base']
54
+ end
46
55
  end
47
56
 
48
57
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -68,7 +77,8 @@ module Phrase
68
77
  def ==(o)
69
78
  return true if self.equal?(o)
70
79
  self.class == o.class &&
71
- name == o.name
80
+ name == o.name &&
81
+ base == o.base
72
82
  end
73
83
 
74
84
  # @see the `==` method
@@ -80,7 +90,7 @@ module Phrase
80
90
  # Calculates hash code according to all attributes.
81
91
  # @return [Integer] Hash code
82
92
  def hash
83
- [name].hash
93
+ [name, base].hash
84
94
  end
85
95
 
86
96
  # Builds the object from hash
@@ -2,9 +2,31 @@ require 'date'
2
2
 
3
3
  module Phrase
4
4
  class BranchMergeParameters
5
- # strategy used for merge conflicts, use_main or use_branch
5
+ # Conflict resolution strategy applied when the branch and its base have diverged. `use_main` keeps the values from the base branch; `use_branch` keeps the values from the branch being merged.
6
6
  attr_accessor :strategy
7
7
 
8
+ class EnumAttributeValidator
9
+ attr_reader :datatype
10
+ attr_reader :allowable_values
11
+
12
+ def initialize(datatype, allowable_values)
13
+ @allowable_values = allowable_values.map do |value|
14
+ case datatype.to_s
15
+ when /Integer/i
16
+ value.to_i
17
+ when /Float/i
18
+ value.to_f
19
+ else
20
+ value
21
+ end
22
+ end
23
+ end
24
+
25
+ def valid?(value)
26
+ !value || allowable_values.include?(value)
27
+ end
28
+ end
29
+
8
30
  # Attribute mapping from ruby-style variable name to JSON key.
9
31
  def self.attribute_map
10
32
  {
@@ -55,9 +77,21 @@ module Phrase
55
77
  # Check to see if the all the properties in the model are valid
56
78
  # @return true if the model is valid
57
79
  def valid?
80
+ strategy_validator = EnumAttributeValidator.new('String', ["use_main", "use_branch"])
81
+ return false unless strategy_validator.valid?(@strategy)
58
82
  true
59
83
  end
60
84
 
85
+ # Custom attribute writer method checking allowed values (enum).
86
+ # @param [Object] strategy Object to be assigned
87
+ def strategy=(strategy)
88
+ validator = EnumAttributeValidator.new('String', ["use_main", "use_branch"])
89
+ unless validator.valid?(strategy)
90
+ fail ArgumentError, "invalid value for \"strategy\", must be one of #{validator.allowable_values}."
91
+ end
92
+ @strategy = strategy
93
+ end
94
+
61
95
  # Checks equality by comparing each attribute.
62
96
  # @param [Object] Object to be compared
63
97
  def ==(o)
@@ -2,9 +2,31 @@ require 'date'
2
2
 
3
3
  module Phrase
4
4
  class BranchSyncParameters
5
- # strategy used for conflicts, use_main or use_branch
5
+ # Conflict resolution strategy applied when the branch and its base have diverged. `use_main` keeps the values from the base branch; `use_branch` keeps the values from this branch.
6
6
  attr_accessor :strategy
7
7
 
8
+ class EnumAttributeValidator
9
+ attr_reader :datatype
10
+ attr_reader :allowable_values
11
+
12
+ def initialize(datatype, allowable_values)
13
+ @allowable_values = allowable_values.map do |value|
14
+ case datatype.to_s
15
+ when /Integer/i
16
+ value.to_i
17
+ when /Float/i
18
+ value.to_f
19
+ else
20
+ value
21
+ end
22
+ end
23
+ end
24
+
25
+ def valid?(value)
26
+ !value || allowable_values.include?(value)
27
+ end
28
+ end
29
+
8
30
  # Attribute mapping from ruby-style variable name to JSON key.
9
31
  def self.attribute_map
10
32
  {
@@ -55,9 +77,21 @@ module Phrase
55
77
  # Check to see if the all the properties in the model are valid
56
78
  # @return true if the model is valid
57
79
  def valid?
80
+ strategy_validator = EnumAttributeValidator.new('String', ["use_main", "use_branch"])
81
+ return false unless strategy_validator.valid?(@strategy)
58
82
  true
59
83
  end
60
84
 
85
+ # Custom attribute writer method checking allowed values (enum).
86
+ # @param [Object] strategy Object to be assigned
87
+ def strategy=(strategy)
88
+ validator = EnumAttributeValidator.new('String', ["use_main", "use_branch"])
89
+ unless validator.valid?(strategy)
90
+ fail ArgumentError, "invalid value for \"strategy\", must be one of #{validator.allowable_values}."
91
+ end
92
+ @strategy = strategy
93
+ end
94
+
61
95
  # Checks equality by comparing each attribute.
62
96
  # @param [Object] Object to be compared
63
97
  def ==(o)
@@ -10,12 +10,12 @@ module Phrase
10
10
 
11
11
  attr_accessor :platforms
12
12
 
13
- attr_accessor :locales
14
-
15
- attr_accessor :releases
13
+ attr_accessor :release_count
16
14
 
17
15
  attr_accessor :created_at
18
16
 
17
+ attr_accessor :updated_at
18
+
19
19
  attr_accessor :deleted_at
20
20
 
21
21
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -25,9 +25,9 @@ module Phrase
25
25
  :'name' => :'name',
26
26
  :'project' => :'project',
27
27
  :'platforms' => :'platforms',
28
- :'locales' => :'locales',
29
- :'releases' => :'releases',
28
+ :'release_count' => :'release_count',
30
29
  :'created_at' => :'created_at',
30
+ :'updated_at' => :'updated_at',
31
31
  :'deleted_at' => :'deleted_at'
32
32
  }
33
33
  end
@@ -39,9 +39,9 @@ module Phrase
39
39
  :'name' => :'String',
40
40
  :'project' => :'ProjectShort',
41
41
  :'platforms' => :'Array<String>',
42
- :'locales' => :'Array<LocalePreview>',
43
- :'releases' => :'Array<ReleasePreview>',
42
+ :'release_count' => :'Integer',
44
43
  :'created_at' => :'DateTime',
44
+ :'updated_at' => :'DateTime',
45
45
  :'deleted_at' => :'DateTime'
46
46
  }
47
47
  end
@@ -49,6 +49,7 @@ module Phrase
49
49
  # List of attributes with nullable: true
50
50
  def self.openapi_nullable
51
51
  Set.new([
52
+ :'deleted_at'
52
53
  ])
53
54
  end
54
55
 
@@ -85,22 +86,18 @@ module Phrase
85
86
  end
86
87
  end
87
88
 
88
- if attributes.key?(:'locales')
89
- if (value = attributes[:'locales']).is_a?(Array)
90
- self.locales = value
91
- end
92
- end
93
-
94
- if attributes.key?(:'releases')
95
- if (value = attributes[:'releases']).is_a?(Array)
96
- self.releases = value
97
- end
89
+ if attributes.key?(:'release_count')
90
+ self.release_count = attributes[:'release_count']
98
91
  end
99
92
 
100
93
  if attributes.key?(:'created_at')
101
94
  self.created_at = attributes[:'created_at']
102
95
  end
103
96
 
97
+ if attributes.key?(:'updated_at')
98
+ self.updated_at = attributes[:'updated_at']
99
+ end
100
+
104
101
  if attributes.key?(:'deleted_at')
105
102
  self.deleted_at = attributes[:'deleted_at']
106
103
  end
@@ -128,9 +125,9 @@ module Phrase
128
125
  name == o.name &&
129
126
  project == o.project &&
130
127
  platforms == o.platforms &&
131
- locales == o.locales &&
132
- releases == o.releases &&
128
+ release_count == o.release_count &&
133
129
  created_at == o.created_at &&
130
+ updated_at == o.updated_at &&
134
131
  deleted_at == o.deleted_at
135
132
  end
136
133
 
@@ -143,7 +140,7 @@ module Phrase
143
140
  # Calculates hash code according to all attributes.
144
141
  # @return [Integer] Hash code
145
142
  def hash
146
- [id, name, project, platforms, locales, releases, created_at, deleted_at].hash
143
+ [id, name, project, platforms, release_count, created_at, updated_at, deleted_at].hash
147
144
  end
148
145
 
149
146
  # Builds the object from hash
@@ -1,7 +1,7 @@
1
1
  require 'date'
2
2
 
3
3
  module Phrase
4
- class DistributionPreview
4
+ class DistributionDetails
5
5
  attr_accessor :id
6
6
 
7
7
  attr_accessor :name
@@ -14,8 +14,14 @@ module Phrase
14
14
 
15
15
  attr_accessor :created_at
16
16
 
17
+ attr_accessor :updated_at
18
+
17
19
  attr_accessor :deleted_at
18
20
 
21
+ attr_accessor :locales
22
+
23
+ attr_accessor :releases
24
+
19
25
  # Attribute mapping from ruby-style variable name to JSON key.
20
26
  def self.attribute_map
21
27
  {
@@ -25,7 +31,10 @@ module Phrase
25
31
  :'platforms' => :'platforms',
26
32
  :'release_count' => :'release_count',
27
33
  :'created_at' => :'created_at',
28
- :'deleted_at' => :'deleted_at'
34
+ :'updated_at' => :'updated_at',
35
+ :'deleted_at' => :'deleted_at',
36
+ :'locales' => :'locales',
37
+ :'releases' => :'releases'
29
38
  }
30
39
  end
31
40
 
@@ -38,27 +47,38 @@ module Phrase
38
47
  :'platforms' => :'Array<String>',
39
48
  :'release_count' => :'Integer',
40
49
  :'created_at' => :'DateTime',
41
- :'deleted_at' => :'DateTime'
50
+ :'updated_at' => :'DateTime',
51
+ :'deleted_at' => :'DateTime',
52
+ :'locales' => :'Array<LocalePreview>',
53
+ :'releases' => :'Array<ReleasePreview>'
42
54
  }
43
55
  end
44
56
 
45
57
  # List of attributes with nullable: true
46
58
  def self.openapi_nullable
47
59
  Set.new([
60
+ :'deleted_at',
48
61
  ])
49
62
  end
50
63
 
64
+ # List of class defined in allOf (OpenAPI v3)
65
+ def self.openapi_all_of
66
+ [
67
+ :'Distribution'
68
+ ]
69
+ end
70
+
51
71
  # Initializes the object
52
72
  # @param [Hash] attributes Model attributes in the form of hash
53
73
  def initialize(attributes = {})
54
74
  if (!attributes.is_a?(Hash))
55
- fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::DistributionPreview` initialize method"
75
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::DistributionDetails` initialize method"
56
76
  end
57
77
 
58
78
  # check to see if the attribute exists and convert string to symbol for hash key
59
79
  attributes = attributes.each_with_object({}) { |(k, v), h|
60
80
  if (!self.class.attribute_map.key?(k.to_sym))
61
- fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::DistributionPreview`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
81
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::DistributionDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
82
  end
63
83
  h[k.to_sym] = v
64
84
  }
@@ -89,9 +109,25 @@ module Phrase
89
109
  self.created_at = attributes[:'created_at']
90
110
  end
91
111
 
112
+ if attributes.key?(:'updated_at')
113
+ self.updated_at = attributes[:'updated_at']
114
+ end
115
+
92
116
  if attributes.key?(:'deleted_at')
93
117
  self.deleted_at = attributes[:'deleted_at']
94
118
  end
119
+
120
+ if attributes.key?(:'locales')
121
+ if (value = attributes[:'locales']).is_a?(Array)
122
+ self.locales = value
123
+ end
124
+ end
125
+
126
+ if attributes.key?(:'releases')
127
+ if (value = attributes[:'releases']).is_a?(Array)
128
+ self.releases = value
129
+ end
130
+ end
95
131
  end
96
132
 
97
133
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -118,7 +154,10 @@ module Phrase
118
154
  platforms == o.platforms &&
119
155
  release_count == o.release_count &&
120
156
  created_at == o.created_at &&
121
- deleted_at == o.deleted_at
157
+ updated_at == o.updated_at &&
158
+ deleted_at == o.deleted_at &&
159
+ locales == o.locales &&
160
+ releases == o.releases
122
161
  end
123
162
 
124
163
  # @see the `==` method
@@ -130,7 +169,7 @@ module Phrase
130
169
  # Calculates hash code according to all attributes.
131
170
  # @return [Integer] Hash code
132
171
  def hash
133
- [id, name, project, platforms, release_count, created_at, deleted_at].hash
172
+ [id, name, project, platforms, release_count, created_at, updated_at, deleted_at, locales, releases].hash
134
173
  end
135
174
 
136
175
  # Builds the object from hash
@@ -1,7 +1,7 @@
1
1
  require 'date'
2
2
 
3
3
  module Phrase
4
- class CustomMetadataPropertyCreate422Response
4
+ class DocumentDelete422Response
5
5
  attr_accessor :message
6
6
 
7
7
  attr_accessor :errors
@@ -18,7 +18,7 @@ module Phrase
18
18
  def self.openapi_types
19
19
  {
20
20
  :'message' => :'String',
21
- :'errors' => :'Array<CustomMetadataPropertyCreate422ResponseErrorsInner>'
21
+ :'errors' => :'Array<DocumentDelete422ResponseErrorsInner>'
22
22
  }
23
23
  end
24
24
 
@@ -32,13 +32,13 @@ module Phrase
32
32
  # @param [Hash] attributes Model attributes in the form of hash
33
33
  def initialize(attributes = {})
34
34
  if (!attributes.is_a?(Hash))
35
- fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::CustomMetadataPropertyCreate422Response` initialize method"
35
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::DocumentDelete422Response` initialize method"
36
36
  end
37
37
 
38
38
  # check to see if the attribute exists and convert string to symbol for hash key
39
39
  attributes = attributes.each_with_object({}) { |(k, v), h|
40
40
  if (!self.class.attribute_map.key?(k.to_sym))
41
- fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::CustomMetadataPropertyCreate422Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
41
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::DocumentDelete422Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
42
42
  end
43
43
  h[k.to_sym] = v
44
44
  }
@@ -1,7 +1,7 @@
1
1
  require 'date'
2
2
 
3
3
  module Phrase
4
- class CustomMetadataPropertyCreate422ResponseErrorsInner
4
+ class DocumentDelete422ResponseErrorsInner
5
5
  attr_accessor :resource
6
6
 
7
7
  attr_accessor :field
@@ -36,13 +36,13 @@ module Phrase
36
36
  # @param [Hash] attributes Model attributes in the form of hash
37
37
  def initialize(attributes = {})
38
38
  if (!attributes.is_a?(Hash))
39
- fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::CustomMetadataPropertyCreate422ResponseErrorsInner` initialize method"
39
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::DocumentDelete422ResponseErrorsInner` initialize method"
40
40
  end
41
41
 
42
42
  # check to see if the attribute exists and convert string to symbol for hash key
43
43
  attributes = attributes.each_with_object({}) { |(k, v), h|
44
44
  if (!self.class.attribute_map.key?(k.to_sym))
45
- fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::CustomMetadataPropertyCreate422ResponseErrorsInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
45
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::DocumentDelete422ResponseErrorsInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
46
46
  end
47
47
  h[k.to_sym] = v
48
48
  }
@@ -8,6 +8,8 @@ module Phrase
8
8
 
9
9
  attr_accessor :projects
10
10
 
11
+ attr_accessor :spaces
12
+
11
13
  attr_accessor :created_at
12
14
 
13
15
  attr_accessor :updated_at
@@ -18,6 +20,7 @@ module Phrase
18
20
  :'id' => :'id',
19
21
  :'name' => :'name',
20
22
  :'projects' => :'projects',
23
+ :'spaces' => :'spaces',
21
24
  :'created_at' => :'created_at',
22
25
  :'updated_at' => :'updated_at'
23
26
  }
@@ -29,6 +32,7 @@ module Phrase
29
32
  :'id' => :'String',
30
33
  :'name' => :'String',
31
34
  :'projects' => :'Array<ProjectShort>',
35
+ :'spaces' => :'Array<Space>',
32
36
  :'created_at' => :'DateTime',
33
37
  :'updated_at' => :'DateTime'
34
38
  }
@@ -69,6 +73,12 @@ module Phrase
69
73
  end
70
74
  end
71
75
 
76
+ if attributes.key?(:'spaces')
77
+ if (value = attributes[:'spaces']).is_a?(Array)
78
+ self.spaces = value
79
+ end
80
+ end
81
+
72
82
  if attributes.key?(:'created_at')
73
83
  self.created_at = attributes[:'created_at']
74
84
  end
@@ -99,6 +109,7 @@ module Phrase
99
109
  id == o.id &&
100
110
  name == o.name &&
101
111
  projects == o.projects &&
112
+ spaces == o.spaces &&
102
113
  created_at == o.created_at &&
103
114
  updated_at == o.updated_at
104
115
  end
@@ -112,7 +123,7 @@ module Phrase
112
123
  # Calculates hash code according to all attributes.
113
124
  # @return [Integer] Hash code
114
125
  def hash
115
- [id, name, projects, created_at, updated_at].hash
126
+ [id, name, projects, spaces, created_at, updated_at].hash
116
127
  end
117
128
 
118
129
  # Builds the object from hash
@@ -14,6 +14,8 @@ module Phrase
14
14
 
15
15
  attr_accessor :translations
16
16
 
17
+ attr_accessor :glossary
18
+
17
19
  attr_accessor :created_at
18
20
 
19
21
  attr_accessor :updated_at
@@ -27,6 +29,7 @@ module Phrase
27
29
  :'translatable' => :'translatable',
28
30
  :'case_sensitive' => :'case_sensitive',
29
31
  :'translations' => :'translations',
32
+ :'glossary' => :'glossary',
30
33
  :'created_at' => :'created_at',
31
34
  :'updated_at' => :'updated_at'
32
35
  }
@@ -41,6 +44,7 @@ module Phrase
41
44
  :'translatable' => :'Boolean',
42
45
  :'case_sensitive' => :'Boolean',
43
46
  :'translations' => :'Array<GlossaryTermTranslation>',
47
+ :'glossary' => :'GlossaryTermGlossary',
44
48
  :'created_at' => :'DateTime',
45
49
  :'updated_at' => :'DateTime'
46
50
  }
@@ -93,6 +97,10 @@ module Phrase
93
97
  end
94
98
  end
95
99
 
100
+ if attributes.key?(:'glossary')
101
+ self.glossary = attributes[:'glossary']
102
+ end
103
+
96
104
  if attributes.key?(:'created_at')
97
105
  self.created_at = attributes[:'created_at']
98
106
  end
@@ -126,6 +134,7 @@ module Phrase
126
134
  translatable == o.translatable &&
127
135
  case_sensitive == o.case_sensitive &&
128
136
  translations == o.translations &&
137
+ glossary == o.glossary &&
129
138
  created_at == o.created_at &&
130
139
  updated_at == o.updated_at
131
140
  end
@@ -139,7 +148,7 @@ module Phrase
139
148
  # Calculates hash code according to all attributes.
140
149
  # @return [Integer] Hash code
141
150
  def hash
142
- [id, term, description, translatable, case_sensitive, translations, created_at, updated_at].hash
151
+ [id, term, description, translatable, case_sensitive, translations, glossary, created_at, updated_at].hash
143
152
  end
144
153
 
145
154
  # Builds the object from hash