phrase 2.0.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +41 -3
- data/docs/Account.md +3 -1
- data/docs/AccountDetails.md +5 -1
- data/docs/AccountDetails1.md +3 -1
- data/docs/AccountSearchResult.md +29 -0
- data/docs/Branch.md +5 -1
- data/docs/Comment.md +3 -1
- data/docs/JobCreateParameters.md +2 -0
- data/docs/JobDetails.md +2 -0
- data/docs/JobDetails1.md +2 -0
- data/docs/JobTemplate.md +29 -0
- data/docs/JobTemplateCreateParameters.md +21 -0
- data/docs/JobTemplateLocale.md +23 -0
- data/docs/JobTemplateLocaleUpdateParameters.md +23 -0
- data/docs/JobTemplateLocalesApi.md +347 -0
- data/docs/JobTemplateLocalesCreateParameters.md +23 -0
- data/docs/JobTemplatePreview.md +19 -0
- data/docs/JobTemplateUpdateParameters.md +21 -0
- data/docs/JobTemplateUserPreview.md +23 -0
- data/docs/JobTemplatesApi.md +337 -0
- data/docs/KeysApi.md +132 -4
- data/docs/KeysExcludeParameters.md +23 -0
- data/docs/KeysIncludeParameters.md +23 -0
- data/docs/KeysSearchParameters.md +1 -1
- data/docs/KeysTagParameters.md +1 -1
- data/docs/KeysUntagParameters.md +1 -1
- data/docs/LocalePreview1.md +23 -0
- data/docs/LocalesApi.md +73 -3
- data/docs/MemberSpaces.md +2 -2
- data/docs/MemberUpdateParameters.md +4 -2
- data/docs/Notification.md +41 -0
- data/docs/NotificationGroup.md +23 -0
- data/docs/NotificationGroupDetail.md +27 -0
- data/docs/NotificationGroupsApi.md +194 -0
- data/docs/NotificationsApi.md +194 -0
- data/docs/OrderCreateParameters.md +2 -0
- data/docs/Project.md +2 -0
- data/docs/ProjectCreateParameters.md +35 -1
- data/docs/ProjectDetails.md +2 -0
- data/docs/ProjectsApi.md +7 -1
- data/docs/SearchApi.md +72 -0
- data/docs/SearchInAccountParameters.md +23 -0
- data/docs/Space1.md +25 -0
- data/docs/Subscription.md +19 -0
- data/docs/TranslationOrder.md +2 -0
- data/docs/TranslationsVerifyParameters.md +3 -5
- data/docs/User.md +0 -2
- data/lib/phrase/api/job_template_locales_api.rb +417 -0
- data/lib/phrase/api/job_templates_api.rb +387 -0
- data/lib/phrase/api/keys_api.rb +152 -4
- data/lib/phrase/api/locales_api.rb +80 -2
- data/lib/phrase/api/notification_groups_api.rb +202 -0
- data/lib/phrase/api/notifications_api.rb +202 -0
- data/lib/phrase/api/projects_api.rb +9 -0
- data/lib/phrase/api/search_api.rb +84 -0
- data/lib/phrase/models/account.rb +13 -4
- data/lib/phrase/models/account_details.rb +22 -4
- data/lib/phrase/models/account_details1.rb +10 -1
- data/lib/phrase/models/account_search_result.rb +250 -0
- data/lib/phrase/models/branch.rb +19 -1
- data/lib/phrase/models/comment.rb +15 -4
- data/lib/phrase/models/job_create_parameters.rb +11 -1
- data/lib/phrase/models/job_details.rb +10 -1
- data/lib/phrase/models/job_details1.rb +10 -1
- data/lib/phrase/models/job_template.rb +248 -0
- data/lib/phrase/models/job_template_create_parameters.rb +220 -0
- data/lib/phrase/models/job_template_locale.rb +223 -0
- data/lib/phrase/models/job_template_locale_update_parameters.rb +234 -0
- data/lib/phrase/models/job_template_locales_create_parameters.rb +234 -0
- data/lib/phrase/models/job_template_preview.rb +203 -0
- data/lib/phrase/models/job_template_update_parameters.rb +220 -0
- data/lib/phrase/models/job_template_user_preview.rb +221 -0
- data/lib/phrase/models/keys_exclude_parameters.rb +225 -0
- data/lib/phrase/models/keys_include_parameters.rb +225 -0
- data/lib/phrase/models/keys_search_parameters.rb +1 -1
- data/lib/phrase/models/keys_tag_parameters.rb +1 -1
- data/lib/phrase/models/keys_untag_parameters.rb +1 -1
- data/lib/phrase/models/locale_preview1.rb +221 -0
- data/lib/phrase/models/member_spaces.rb +2 -2
- data/lib/phrase/models/member_update_parameters.rb +12 -2
- data/lib/phrase/models/notification.rb +302 -0
- data/lib/phrase/models/notification_group.rb +221 -0
- data/lib/phrase/models/notification_group_detail.rb +239 -0
- data/lib/phrase/models/order_create_parameters.rb +11 -1
- data/lib/phrase/models/project.rb +10 -1
- data/lib/phrase/models/project_create_parameters.rb +174 -4
- data/lib/phrase/models/project_details.rb +10 -1
- data/lib/phrase/models/search_in_account_parameters.rb +225 -0
- data/lib/phrase/models/space1.rb +230 -0
- data/lib/phrase/models/subscription.rb +203 -0
- data/lib/phrase/models/translation_order.rb +10 -1
- data/lib/phrase/models/translations_verify_parameters.rb +14 -24
- data/lib/phrase/models/user.rb +1 -10
- data/lib/phrase/version.rb +1 -1
- data/lib/phrase.rb +23 -0
- data/spec/api/job_template_locales_api_spec.rb +103 -0
- data/spec/api/job_templates_api_spec.rb +98 -0
- data/spec/api/keys_api_spec.rb +30 -2
- data/spec/api/locales_api_spec.rb +18 -1
- data/spec/api/notification_groups_api_spec.rb +62 -0
- data/spec/api/notifications_api_spec.rb +62 -0
- data/spec/api/projects_api_spec.rb +3 -0
- data/spec/api/search_api_spec.rb +37 -0
- data/spec/models/account_details1_spec.rb +6 -0
- data/spec/models/account_details_spec.rb +12 -0
- data/spec/models/account_search_result_spec.rb +65 -0
- data/spec/models/account_spec.rb +6 -0
- data/spec/models/branch_spec.rb +12 -0
- data/spec/models/comment_spec.rb +6 -0
- data/spec/models/job_create_parameters_spec.rb +6 -0
- data/spec/models/job_details1_spec.rb +6 -0
- data/spec/models/job_details_spec.rb +6 -0
- data/spec/models/job_template_create_parameters_spec.rb +41 -0
- data/spec/models/job_template_locale_spec.rb +47 -0
- data/spec/models/job_template_locale_update_parameters_spec.rb +47 -0
- data/spec/models/job_template_locales_create_parameters_spec.rb +47 -0
- data/spec/models/job_template_preview_spec.rb +35 -0
- data/spec/models/job_template_spec.rb +65 -0
- data/spec/models/job_template_update_parameters_spec.rb +41 -0
- data/spec/models/job_template_user_preview_spec.rb +47 -0
- data/spec/models/keys_exclude_parameters_spec.rb +47 -0
- data/spec/models/keys_include_parameters_spec.rb +47 -0
- data/spec/models/locale_preview1_spec.rb +47 -0
- data/spec/models/member_update_parameters_spec.rb +6 -0
- data/spec/models/notification_group_detail_spec.rb +59 -0
- data/spec/models/notification_group_spec.rb +47 -0
- data/spec/models/notification_spec.rb +101 -0
- data/spec/models/order_create_parameters_spec.rb +6 -0
- data/spec/models/project_create_parameters_spec.rb +102 -0
- data/spec/models/project_details_spec.rb +6 -0
- data/spec/models/project_spec.rb +6 -0
- data/spec/models/search_in_account_parameters_spec.rb +47 -0
- data/spec/models/space1_spec.rb +53 -0
- data/spec/models/subscription_spec.rb +35 -0
- data/spec/models/translation_order_spec.rb +6 -0
- data/spec/models/translations_verify_parameters_spec.rb +2 -8
- data/spec/models/user_spec.rb +0 -6
- metadata +262 -170
@@ -5,6 +5,9 @@ module Phrase
|
|
5
5
|
# specify the branch to use
|
6
6
|
attr_accessor :branch
|
7
7
|
|
8
|
+
# the name of the order, default name is: Translation order from 'current datetime'
|
9
|
+
attr_accessor :name
|
10
|
+
|
8
11
|
# Name of the LSP that should process this order. Can be one of gengo, textmaster.
|
9
12
|
attr_accessor :lsp
|
10
13
|
|
@@ -48,6 +51,7 @@ module Phrase
|
|
48
51
|
def self.attribute_map
|
49
52
|
{
|
50
53
|
:'branch' => :'branch',
|
54
|
+
:'name' => :'name',
|
51
55
|
:'lsp' => :'lsp',
|
52
56
|
:'source_locale_id' => :'source_locale_id',
|
53
57
|
:'target_locale_ids' => :'target_locale_ids',
|
@@ -68,6 +72,7 @@ module Phrase
|
|
68
72
|
def self.openapi_types
|
69
73
|
{
|
70
74
|
:'branch' => :'String',
|
75
|
+
:'name' => :'String',
|
71
76
|
:'lsp' => :'String',
|
72
77
|
:'source_locale_id' => :'String',
|
73
78
|
:'target_locale_ids' => :'Array<String>',
|
@@ -109,6 +114,10 @@ module Phrase
|
|
109
114
|
self.branch = attributes[:'branch']
|
110
115
|
end
|
111
116
|
|
117
|
+
if attributes.key?(:'name')
|
118
|
+
self.name = attributes[:'name']
|
119
|
+
end
|
120
|
+
|
112
121
|
if attributes.key?(:'lsp')
|
113
122
|
self.lsp = attributes[:'lsp']
|
114
123
|
end
|
@@ -183,6 +192,7 @@ module Phrase
|
|
183
192
|
return true if self.equal?(o)
|
184
193
|
self.class == o.class &&
|
185
194
|
branch == o.branch &&
|
195
|
+
name == o.name &&
|
186
196
|
lsp == o.lsp &&
|
187
197
|
source_locale_id == o.source_locale_id &&
|
188
198
|
target_locale_ids == o.target_locale_ids &&
|
@@ -207,7 +217,7 @@ module Phrase
|
|
207
217
|
# Calculates hash code according to all attributes.
|
208
218
|
# @return [Integer] Hash code
|
209
219
|
def hash
|
210
|
-
[branch, lsp, source_locale_id, target_locale_ids, translation_type, tag, message, styleguide_id, unverify_translations_upon_delivery, include_untranslated_keys, include_unverified_translations, category, quality, priority].hash
|
220
|
+
[branch, name, lsp, source_locale_id, target_locale_ids, translation_type, tag, message, styleguide_id, unverify_translations_upon_delivery, include_untranslated_keys, include_unverified_translations, category, quality, priority].hash
|
211
221
|
end
|
212
222
|
|
213
223
|
# Builds the object from hash
|
@@ -14,6 +14,8 @@ module Phrase
|
|
14
14
|
|
15
15
|
attr_accessor :account
|
16
16
|
|
17
|
+
attr_accessor :space
|
18
|
+
|
17
19
|
attr_accessor :created_at
|
18
20
|
|
19
21
|
attr_accessor :updated_at
|
@@ -27,6 +29,7 @@ module Phrase
|
|
27
29
|
:'main_format' => :'main_format',
|
28
30
|
:'project_image_url' => :'project_image_url',
|
29
31
|
:'account' => :'account',
|
32
|
+
:'space' => :'space',
|
30
33
|
:'created_at' => :'created_at',
|
31
34
|
:'updated_at' => :'updated_at'
|
32
35
|
}
|
@@ -41,6 +44,7 @@ module Phrase
|
|
41
44
|
:'main_format' => :'String',
|
42
45
|
:'project_image_url' => :'String',
|
43
46
|
:'account' => :'Account',
|
47
|
+
:'space' => :'Space1',
|
44
48
|
:'created_at' => :'DateTime',
|
45
49
|
:'updated_at' => :'DateTime'
|
46
50
|
}
|
@@ -91,6 +95,10 @@ module Phrase
|
|
91
95
|
self.account = attributes[:'account']
|
92
96
|
end
|
93
97
|
|
98
|
+
if attributes.key?(:'space')
|
99
|
+
self.space = attributes[:'space']
|
100
|
+
end
|
101
|
+
|
94
102
|
if attributes.key?(:'created_at')
|
95
103
|
self.created_at = attributes[:'created_at']
|
96
104
|
end
|
@@ -124,6 +132,7 @@ module Phrase
|
|
124
132
|
main_format == o.main_format &&
|
125
133
|
project_image_url == o.project_image_url &&
|
126
134
|
account == o.account &&
|
135
|
+
space == o.space &&
|
127
136
|
created_at == o.created_at &&
|
128
137
|
updated_at == o.updated_at
|
129
138
|
end
|
@@ -137,7 +146,7 @@ module Phrase
|
|
137
146
|
# Calculates hash code according to all attributes.
|
138
147
|
# @return [Integer] Hash code
|
139
148
|
def hash
|
140
|
-
[id, name, slug, main_format, project_image_url, account, created_at, updated_at].hash
|
149
|
+
[id, name, slug, main_format, project_image_url, account, space, created_at, updated_at].hash
|
141
150
|
end
|
142
151
|
|
143
152
|
# Builds the object from hash
|
@@ -23,6 +23,57 @@ module Phrase
|
|
23
23
|
# When a source project ID is given, a clone of that project will be created, including all locales, keys and translations as well as the main project settings if they are not defined otherwise through the params.
|
24
24
|
attr_accessor :source_project_id
|
25
25
|
|
26
|
+
# (Optional) Review Workflow. \"simple\" / \"review\". <a href=\"https://help.phrase.com/help/advanced-review-workflow\">Read more</a>
|
27
|
+
attr_accessor :workflow
|
28
|
+
|
29
|
+
# (Optional) Enable machine translation support in the project. Required for Autopilot and Smart Suggest
|
30
|
+
attr_accessor :machine_translation_enabled
|
31
|
+
|
32
|
+
# (Optional) Enable branching in the project
|
33
|
+
attr_accessor :enable_branching
|
34
|
+
|
35
|
+
# (Optional) Protect the master branch in project where branching is enabled
|
36
|
+
attr_accessor :protect_master_branch
|
37
|
+
|
38
|
+
# (Optional) Otherwise, translators are not allowed to edit translations other than strings
|
39
|
+
attr_accessor :enable_all_data_type_translation_keys_for_translators
|
40
|
+
|
41
|
+
# (Optional) We can validate and highlight your ICU messages. <a href=\"https://help.phrase.com/help/icu-message-format\">Read more</a>
|
42
|
+
attr_accessor :enable_icu_message_format
|
43
|
+
|
44
|
+
# (Optional) Displays the input fields for the 'ZERO' plural form for every key as well although only some languages require the 'ZERO' explicitly.
|
45
|
+
attr_accessor :zero_plural_form_enabled
|
46
|
+
|
47
|
+
# (Optional) Autopilot, requires machine_translation_enabled. <a href=\"https://help.phrase.com/help/autopilot\">Read more</a>
|
48
|
+
attr_accessor :autotranslate_enabled
|
49
|
+
|
50
|
+
# (Optional) Requires autotranslate_enabled to be true
|
51
|
+
attr_accessor :autotranslate_check_new_translation_keys
|
52
|
+
|
53
|
+
# (Optional) Requires autotranslate_enabled to be true
|
54
|
+
attr_accessor :autotranslate_check_new_uploads
|
55
|
+
|
56
|
+
# (Optional) Requires autotranslate_enabled to be true
|
57
|
+
attr_accessor :autotranslate_check_new_locales
|
58
|
+
|
59
|
+
# (Optional) Requires autotranslate_enabled to be true
|
60
|
+
attr_accessor :autotranslate_mark_as_unverified
|
61
|
+
|
62
|
+
# (Optional) Requires autotranslate_enabled to be true
|
63
|
+
attr_accessor :autotranslate_use_machine_translation
|
64
|
+
|
65
|
+
# (Optional) Requires autotranslate_enabled to be true
|
66
|
+
attr_accessor :autotranslate_use_translation_memory
|
67
|
+
|
68
|
+
# (Optional) Smart Suggest, requires machine_translation_enabled
|
69
|
+
attr_accessor :smart_suggest_enabled
|
70
|
+
|
71
|
+
# (Optional) Requires smart_suggest_enabled to be true
|
72
|
+
attr_accessor :smart_suggest_use_glossary
|
73
|
+
|
74
|
+
# (Optional) Requires smart_suggest_enabled to be true
|
75
|
+
attr_accessor :smart_suggest_use_machine_translation
|
76
|
+
|
26
77
|
# Attribute mapping from ruby-style variable name to JSON key.
|
27
78
|
def self.attribute_map
|
28
79
|
{
|
@@ -32,7 +83,24 @@ module Phrase
|
|
32
83
|
:'project_image' => :'project_image',
|
33
84
|
:'remove_project_image' => :'remove_project_image',
|
34
85
|
:'account_id' => :'account_id',
|
35
|
-
:'source_project_id' => :'source_project_id'
|
86
|
+
:'source_project_id' => :'source_project_id',
|
87
|
+
:'workflow' => :'workflow',
|
88
|
+
:'machine_translation_enabled' => :'machine_translation_enabled',
|
89
|
+
:'enable_branching' => :'enable_branching',
|
90
|
+
:'protect_master_branch' => :'protect_master_branch',
|
91
|
+
:'enable_all_data_type_translation_keys_for_translators' => :'enable_all_data_type_translation_keys_for_translators',
|
92
|
+
:'enable_icu_message_format' => :'enable_icu_message_format',
|
93
|
+
:'zero_plural_form_enabled' => :'zero_plural_form_enabled',
|
94
|
+
:'autotranslate_enabled' => :'autotranslate_enabled',
|
95
|
+
:'autotranslate_check_new_translation_keys' => :'autotranslate_check_new_translation_keys',
|
96
|
+
:'autotranslate_check_new_uploads' => :'autotranslate_check_new_uploads',
|
97
|
+
:'autotranslate_check_new_locales' => :'autotranslate_check_new_locales',
|
98
|
+
:'autotranslate_mark_as_unverified' => :'autotranslate_mark_as_unverified',
|
99
|
+
:'autotranslate_use_machine_translation' => :'autotranslate_use_machine_translation',
|
100
|
+
:'autotranslate_use_translation_memory' => :'autotranslate_use_translation_memory',
|
101
|
+
:'smart_suggest_enabled' => :'smart_suggest_enabled',
|
102
|
+
:'smart_suggest_use_glossary' => :'smart_suggest_use_glossary',
|
103
|
+
:'smart_suggest_use_machine_translation' => :'smart_suggest_use_machine_translation'
|
36
104
|
}
|
37
105
|
end
|
38
106
|
|
@@ -45,7 +113,24 @@ module Phrase
|
|
45
113
|
:'project_image' => :'File',
|
46
114
|
:'remove_project_image' => :'Boolean',
|
47
115
|
:'account_id' => :'String',
|
48
|
-
:'source_project_id' => :'String'
|
116
|
+
:'source_project_id' => :'String',
|
117
|
+
:'workflow' => :'String',
|
118
|
+
:'machine_translation_enabled' => :'Boolean',
|
119
|
+
:'enable_branching' => :'Boolean',
|
120
|
+
:'protect_master_branch' => :'Boolean',
|
121
|
+
:'enable_all_data_type_translation_keys_for_translators' => :'Boolean',
|
122
|
+
:'enable_icu_message_format' => :'Boolean',
|
123
|
+
:'zero_plural_form_enabled' => :'Boolean',
|
124
|
+
:'autotranslate_enabled' => :'Boolean',
|
125
|
+
:'autotranslate_check_new_translation_keys' => :'Boolean',
|
126
|
+
:'autotranslate_check_new_uploads' => :'Boolean',
|
127
|
+
:'autotranslate_check_new_locales' => :'Boolean',
|
128
|
+
:'autotranslate_mark_as_unverified' => :'Boolean',
|
129
|
+
:'autotranslate_use_machine_translation' => :'Boolean',
|
130
|
+
:'autotranslate_use_translation_memory' => :'Boolean',
|
131
|
+
:'smart_suggest_enabled' => :'Boolean',
|
132
|
+
:'smart_suggest_use_glossary' => :'Boolean',
|
133
|
+
:'smart_suggest_use_machine_translation' => :'Boolean'
|
49
134
|
}
|
50
135
|
end
|
51
136
|
|
@@ -97,6 +182,74 @@ module Phrase
|
|
97
182
|
if attributes.key?(:'source_project_id')
|
98
183
|
self.source_project_id = attributes[:'source_project_id']
|
99
184
|
end
|
185
|
+
|
186
|
+
if attributes.key?(:'workflow')
|
187
|
+
self.workflow = attributes[:'workflow']
|
188
|
+
end
|
189
|
+
|
190
|
+
if attributes.key?(:'machine_translation_enabled')
|
191
|
+
self.machine_translation_enabled = attributes[:'machine_translation_enabled']
|
192
|
+
end
|
193
|
+
|
194
|
+
if attributes.key?(:'enable_branching')
|
195
|
+
self.enable_branching = attributes[:'enable_branching']
|
196
|
+
end
|
197
|
+
|
198
|
+
if attributes.key?(:'protect_master_branch')
|
199
|
+
self.protect_master_branch = attributes[:'protect_master_branch']
|
200
|
+
end
|
201
|
+
|
202
|
+
if attributes.key?(:'enable_all_data_type_translation_keys_for_translators')
|
203
|
+
self.enable_all_data_type_translation_keys_for_translators = attributes[:'enable_all_data_type_translation_keys_for_translators']
|
204
|
+
end
|
205
|
+
|
206
|
+
if attributes.key?(:'enable_icu_message_format')
|
207
|
+
self.enable_icu_message_format = attributes[:'enable_icu_message_format']
|
208
|
+
end
|
209
|
+
|
210
|
+
if attributes.key?(:'zero_plural_form_enabled')
|
211
|
+
self.zero_plural_form_enabled = attributes[:'zero_plural_form_enabled']
|
212
|
+
end
|
213
|
+
|
214
|
+
if attributes.key?(:'autotranslate_enabled')
|
215
|
+
self.autotranslate_enabled = attributes[:'autotranslate_enabled']
|
216
|
+
end
|
217
|
+
|
218
|
+
if attributes.key?(:'autotranslate_check_new_translation_keys')
|
219
|
+
self.autotranslate_check_new_translation_keys = attributes[:'autotranslate_check_new_translation_keys']
|
220
|
+
end
|
221
|
+
|
222
|
+
if attributes.key?(:'autotranslate_check_new_uploads')
|
223
|
+
self.autotranslate_check_new_uploads = attributes[:'autotranslate_check_new_uploads']
|
224
|
+
end
|
225
|
+
|
226
|
+
if attributes.key?(:'autotranslate_check_new_locales')
|
227
|
+
self.autotranslate_check_new_locales = attributes[:'autotranslate_check_new_locales']
|
228
|
+
end
|
229
|
+
|
230
|
+
if attributes.key?(:'autotranslate_mark_as_unverified')
|
231
|
+
self.autotranslate_mark_as_unverified = attributes[:'autotranslate_mark_as_unverified']
|
232
|
+
end
|
233
|
+
|
234
|
+
if attributes.key?(:'autotranslate_use_machine_translation')
|
235
|
+
self.autotranslate_use_machine_translation = attributes[:'autotranslate_use_machine_translation']
|
236
|
+
end
|
237
|
+
|
238
|
+
if attributes.key?(:'autotranslate_use_translation_memory')
|
239
|
+
self.autotranslate_use_translation_memory = attributes[:'autotranslate_use_translation_memory']
|
240
|
+
end
|
241
|
+
|
242
|
+
if attributes.key?(:'smart_suggest_enabled')
|
243
|
+
self.smart_suggest_enabled = attributes[:'smart_suggest_enabled']
|
244
|
+
end
|
245
|
+
|
246
|
+
if attributes.key?(:'smart_suggest_use_glossary')
|
247
|
+
self.smart_suggest_use_glossary = attributes[:'smart_suggest_use_glossary']
|
248
|
+
end
|
249
|
+
|
250
|
+
if attributes.key?(:'smart_suggest_use_machine_translation')
|
251
|
+
self.smart_suggest_use_machine_translation = attributes[:'smart_suggest_use_machine_translation']
|
252
|
+
end
|
100
253
|
end
|
101
254
|
|
102
255
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -123,7 +276,24 @@ module Phrase
|
|
123
276
|
project_image == o.project_image &&
|
124
277
|
remove_project_image == o.remove_project_image &&
|
125
278
|
account_id == o.account_id &&
|
126
|
-
source_project_id == o.source_project_id
|
279
|
+
source_project_id == o.source_project_id &&
|
280
|
+
workflow == o.workflow &&
|
281
|
+
machine_translation_enabled == o.machine_translation_enabled &&
|
282
|
+
enable_branching == o.enable_branching &&
|
283
|
+
protect_master_branch == o.protect_master_branch &&
|
284
|
+
enable_all_data_type_translation_keys_for_translators == o.enable_all_data_type_translation_keys_for_translators &&
|
285
|
+
enable_icu_message_format == o.enable_icu_message_format &&
|
286
|
+
zero_plural_form_enabled == o.zero_plural_form_enabled &&
|
287
|
+
autotranslate_enabled == o.autotranslate_enabled &&
|
288
|
+
autotranslate_check_new_translation_keys == o.autotranslate_check_new_translation_keys &&
|
289
|
+
autotranslate_check_new_uploads == o.autotranslate_check_new_uploads &&
|
290
|
+
autotranslate_check_new_locales == o.autotranslate_check_new_locales &&
|
291
|
+
autotranslate_mark_as_unverified == o.autotranslate_mark_as_unverified &&
|
292
|
+
autotranslate_use_machine_translation == o.autotranslate_use_machine_translation &&
|
293
|
+
autotranslate_use_translation_memory == o.autotranslate_use_translation_memory &&
|
294
|
+
smart_suggest_enabled == o.smart_suggest_enabled &&
|
295
|
+
smart_suggest_use_glossary == o.smart_suggest_use_glossary &&
|
296
|
+
smart_suggest_use_machine_translation == o.smart_suggest_use_machine_translation
|
127
297
|
end
|
128
298
|
|
129
299
|
# @see the `==` method
|
@@ -135,7 +305,7 @@ module Phrase
|
|
135
305
|
# Calculates hash code according to all attributes.
|
136
306
|
# @return [Integer] Hash code
|
137
307
|
def hash
|
138
|
-
[name, main_format, shares_translation_memory, project_image, remove_project_image, account_id, source_project_id].hash
|
308
|
+
[name, main_format, shares_translation_memory, project_image, remove_project_image, account_id, source_project_id, workflow, machine_translation_enabled, enable_branching, protect_master_branch, enable_all_data_type_translation_keys_for_translators, enable_icu_message_format, zero_plural_form_enabled, autotranslate_enabled, autotranslate_check_new_translation_keys, autotranslate_check_new_uploads, autotranslate_check_new_locales, autotranslate_mark_as_unverified, autotranslate_use_machine_translation, autotranslate_use_translation_memory, smart_suggest_enabled, smart_suggest_use_glossary, smart_suggest_use_machine_translation].hash
|
139
309
|
end
|
140
310
|
|
141
311
|
# Builds the object from hash
|
@@ -14,6 +14,8 @@ module Phrase
|
|
14
14
|
|
15
15
|
attr_accessor :account
|
16
16
|
|
17
|
+
attr_accessor :space
|
18
|
+
|
17
19
|
attr_accessor :created_at
|
18
20
|
|
19
21
|
attr_accessor :updated_at
|
@@ -29,6 +31,7 @@ module Phrase
|
|
29
31
|
:'main_format' => :'main_format',
|
30
32
|
:'project_image_url' => :'project_image_url',
|
31
33
|
:'account' => :'account',
|
34
|
+
:'space' => :'space',
|
32
35
|
:'created_at' => :'created_at',
|
33
36
|
:'updated_at' => :'updated_at',
|
34
37
|
:'shares_translation_memory' => :'shares_translation_memory'
|
@@ -44,6 +47,7 @@ module Phrase
|
|
44
47
|
:'main_format' => :'String',
|
45
48
|
:'project_image_url' => :'String',
|
46
49
|
:'account' => :'Account',
|
50
|
+
:'space' => :'Space1',
|
47
51
|
:'created_at' => :'DateTime',
|
48
52
|
:'updated_at' => :'DateTime',
|
49
53
|
:'shares_translation_memory' => :'Boolean'
|
@@ -103,6 +107,10 @@ module Phrase
|
|
103
107
|
self.account = attributes[:'account']
|
104
108
|
end
|
105
109
|
|
110
|
+
if attributes.key?(:'space')
|
111
|
+
self.space = attributes[:'space']
|
112
|
+
end
|
113
|
+
|
106
114
|
if attributes.key?(:'created_at')
|
107
115
|
self.created_at = attributes[:'created_at']
|
108
116
|
end
|
@@ -140,6 +148,7 @@ module Phrase
|
|
140
148
|
main_format == o.main_format &&
|
141
149
|
project_image_url == o.project_image_url &&
|
142
150
|
account == o.account &&
|
151
|
+
space == o.space &&
|
143
152
|
created_at == o.created_at &&
|
144
153
|
updated_at == o.updated_at &&
|
145
154
|
shares_translation_memory == o.shares_translation_memory
|
@@ -154,7 +163,7 @@ module Phrase
|
|
154
163
|
# Calculates hash code according to all attributes.
|
155
164
|
# @return [Integer] Hash code
|
156
165
|
def hash
|
157
|
-
[id, name, slug, main_format, project_image_url, account, created_at, updated_at, shares_translation_memory].hash
|
166
|
+
[id, name, slug, main_format, project_image_url, account, space, created_at, updated_at, shares_translation_memory].hash
|
158
167
|
end
|
159
168
|
|
160
169
|
# Builds the object from hash
|
@@ -0,0 +1,225 @@
|
|
1
|
+
require 'date'
|
2
|
+
|
3
|
+
module Phrase
|
4
|
+
class SearchInAccountParameters
|
5
|
+
# Search query
|
6
|
+
attr_accessor :query
|
7
|
+
|
8
|
+
# Locale code
|
9
|
+
attr_accessor :locale_code
|
10
|
+
|
11
|
+
# Page
|
12
|
+
attr_accessor :page
|
13
|
+
|
14
|
+
# Number of results per page
|
15
|
+
attr_accessor :per_page
|
16
|
+
|
17
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
18
|
+
def self.attribute_map
|
19
|
+
{
|
20
|
+
:'query' => :'query',
|
21
|
+
:'locale_code' => :'locale_code',
|
22
|
+
:'page' => :'page',
|
23
|
+
:'per_page' => :'per_page'
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
# Attribute type mapping.
|
28
|
+
def self.openapi_types
|
29
|
+
{
|
30
|
+
:'query' => :'String',
|
31
|
+
:'locale_code' => :'String',
|
32
|
+
:'page' => :'Integer',
|
33
|
+
:'per_page' => :'Integer'
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
# List of attributes with nullable: true
|
38
|
+
def self.openapi_nullable
|
39
|
+
Set.new([
|
40
|
+
])
|
41
|
+
end
|
42
|
+
|
43
|
+
# Initializes the object
|
44
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
45
|
+
def initialize(attributes = {})
|
46
|
+
if (!attributes.is_a?(Hash))
|
47
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::SearchInAccountParameters` initialize method"
|
48
|
+
end
|
49
|
+
|
50
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
51
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
52
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
53
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::SearchInAccountParameters`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
54
|
+
end
|
55
|
+
h[k.to_sym] = v
|
56
|
+
}
|
57
|
+
|
58
|
+
if attributes.key?(:'query')
|
59
|
+
self.query = attributes[:'query']
|
60
|
+
end
|
61
|
+
|
62
|
+
if attributes.key?(:'locale_code')
|
63
|
+
self.locale_code = attributes[:'locale_code']
|
64
|
+
end
|
65
|
+
|
66
|
+
if attributes.key?(:'page')
|
67
|
+
self.page = attributes[:'page']
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.key?(:'per_page')
|
71
|
+
self.per_page = attributes[:'per_page']
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
76
|
+
# @return Array for valid properties with the reasons
|
77
|
+
def list_invalid_properties
|
78
|
+
invalid_properties = Array.new
|
79
|
+
invalid_properties
|
80
|
+
end
|
81
|
+
|
82
|
+
# Check to see if the all the properties in the model are valid
|
83
|
+
# @return true if the model is valid
|
84
|
+
def valid?
|
85
|
+
true
|
86
|
+
end
|
87
|
+
|
88
|
+
# Checks equality by comparing each attribute.
|
89
|
+
# @param [Object] Object to be compared
|
90
|
+
def ==(o)
|
91
|
+
return true if self.equal?(o)
|
92
|
+
self.class == o.class &&
|
93
|
+
query == o.query &&
|
94
|
+
locale_code == o.locale_code &&
|
95
|
+
page == o.page &&
|
96
|
+
per_page == o.per_page
|
97
|
+
end
|
98
|
+
|
99
|
+
# @see the `==` method
|
100
|
+
# @param [Object] Object to be compared
|
101
|
+
def eql?(o)
|
102
|
+
self == o
|
103
|
+
end
|
104
|
+
|
105
|
+
# Calculates hash code according to all attributes.
|
106
|
+
# @return [Integer] Hash code
|
107
|
+
def hash
|
108
|
+
[query, locale_code, page, per_page].hash
|
109
|
+
end
|
110
|
+
|
111
|
+
# Builds the object from hash
|
112
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
113
|
+
# @return [Object] Returns the model itself
|
114
|
+
def self.build_from_hash(attributes)
|
115
|
+
new.build_from_hash(attributes)
|
116
|
+
end
|
117
|
+
|
118
|
+
# Builds the object from hash
|
119
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
120
|
+
# @return [Object] Returns the model itself
|
121
|
+
def build_from_hash(attributes)
|
122
|
+
return nil unless attributes.is_a?(Hash)
|
123
|
+
self.class.openapi_types.each_pair do |key, type|
|
124
|
+
if type =~ /\AArray<(.*)>/i
|
125
|
+
# check to ensure the input is an array given that the attribute
|
126
|
+
# is documented as an array but the input is not
|
127
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
128
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
129
|
+
end
|
130
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
131
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
132
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
133
|
+
end
|
134
|
+
|
135
|
+
self
|
136
|
+
end
|
137
|
+
|
138
|
+
# Deserializes the data based on type
|
139
|
+
# @param string type Data type
|
140
|
+
# @param string value Value to be deserialized
|
141
|
+
# @return [Object] Deserialized data
|
142
|
+
def _deserialize(type, value)
|
143
|
+
case type.to_sym
|
144
|
+
when :DateTime
|
145
|
+
DateTime.parse(value)
|
146
|
+
when :Date
|
147
|
+
Date.parse(value)
|
148
|
+
when :String
|
149
|
+
value.to_s
|
150
|
+
when :Integer
|
151
|
+
value.to_i
|
152
|
+
when :Float
|
153
|
+
value.to_f
|
154
|
+
when :Boolean
|
155
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
156
|
+
true
|
157
|
+
else
|
158
|
+
false
|
159
|
+
end
|
160
|
+
when :Object
|
161
|
+
# generic object (usually a Hash), return directly
|
162
|
+
value
|
163
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
164
|
+
inner_type = Regexp.last_match[:inner_type]
|
165
|
+
value.map { |v| _deserialize(inner_type, v) }
|
166
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
167
|
+
k_type = Regexp.last_match[:k_type]
|
168
|
+
v_type = Regexp.last_match[:v_type]
|
169
|
+
{}.tap do |hash|
|
170
|
+
value.each do |k, v|
|
171
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
172
|
+
end
|
173
|
+
end
|
174
|
+
else # model
|
175
|
+
Phrase.const_get(type).build_from_hash(value)
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
# Returns the string representation of the object
|
180
|
+
# @return [String] String presentation of the object
|
181
|
+
def to_s
|
182
|
+
to_hash.to_s
|
183
|
+
end
|
184
|
+
|
185
|
+
# to_body is an alias to to_hash (backward compatibility)
|
186
|
+
# @return [Hash] Returns the object in the form of hash
|
187
|
+
def to_body
|
188
|
+
to_hash
|
189
|
+
end
|
190
|
+
|
191
|
+
# Returns the object in the form of hash
|
192
|
+
# @return [Hash] Returns the object in the form of hash
|
193
|
+
def to_hash
|
194
|
+
hash = {}
|
195
|
+
self.class.attribute_map.each_pair do |attr, param|
|
196
|
+
value = self.send(attr)
|
197
|
+
if value.nil?
|
198
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
199
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
200
|
+
end
|
201
|
+
|
202
|
+
hash[param] = _to_hash(value)
|
203
|
+
end
|
204
|
+
hash
|
205
|
+
end
|
206
|
+
|
207
|
+
# Outputs non-array value in the form of hash
|
208
|
+
# For object, use to_hash. Otherwise, just return the value
|
209
|
+
# @param [Object] value Any valid value
|
210
|
+
# @return [Hash] Returns the value in the form of hash
|
211
|
+
def _to_hash(value)
|
212
|
+
if value.is_a?(Array)
|
213
|
+
value.compact.map { |v| _to_hash(v) }
|
214
|
+
elsif value.is_a?(Hash)
|
215
|
+
{}.tap do |hash|
|
216
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
217
|
+
end
|
218
|
+
elsif value.respond_to? :to_hash
|
219
|
+
value.to_hash
|
220
|
+
else
|
221
|
+
value
|
222
|
+
end
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|