phrase 2.8.2 → 2.8.7
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.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +15 -12
- data/docs/AccountsApi.md +2 -2
- data/docs/AuthorizationsApi.md +2 -2
- data/docs/BitbucketSyncApi.md +2 -2
- data/docs/BlacklistedKeysApi.md +2 -2
- data/docs/BranchesApi.md +5 -5
- data/docs/CommentsApi.md +2 -2
- data/docs/DistributionsApi.md +2 -2
- data/docs/DocumentsApi.md +2 -2
- data/docs/GitHubSyncApi.md +2 -2
- data/docs/GitLabSyncApi.md +4 -4
- data/docs/GlossariesApi.md +2 -2
- data/docs/GlossaryTermsApi.md +2 -2
- data/docs/InvitationsApi.md +2 -2
- data/docs/JobCommentsApi.md +6 -6
- data/docs/JobLocale.md +3 -1
- data/docs/JobLocaleUpdateParameters.md +5 -1
- data/docs/JobLocalesApi.md +2 -2
- data/docs/JobLocalesCreateParameters.md +6 -2
- data/docs/JobTemplateDetails.md +35 -0
- data/docs/JobTemplateDetails1.md +21 -0
- data/docs/JobTemplateLocaleUpdateParameters.md +6 -2
- data/docs/{JobTemplateLocale.md → JobTemplateLocales.md} +6 -4
- data/docs/JobTemplateLocalesApi.md +10 -10
- data/docs/JobTemplateLocalesCreateParameters.md +5 -1
- data/docs/JobTemplatesApi.md +41 -41
- data/docs/JobsApi.md +4 -4
- data/docs/KeysApi.md +4 -4
- data/docs/KeysSearchParameters.md +1 -1
- data/docs/LocaleTeamPreview.md +21 -0
- data/docs/{JobTemplateUserPreview.md → LocaleUserPreview.md} +2 -2
- data/docs/LocalesApi.md +12 -8
- data/docs/MembersApi.md +2 -2
- data/docs/NotificationGroupDetail.md +1 -1
- data/docs/NotificationGroupsApi.md +6 -6
- data/docs/NotificationsApi.md +8 -6
- data/docs/OrdersApi.md +2 -2
- data/docs/Project.md +2 -0
- data/docs/ProjectCreateParameters.md +5 -1
- data/docs/ProjectDetails.md +2 -0
- data/docs/ProjectUpdateParameters.md +5 -1
- data/docs/ProjectsApi.md +2 -2
- data/docs/ReleasesApi.md +2 -2
- data/docs/ScreenshotMarkersApi.md +2 -2
- data/docs/ScreenshotsApi.md +2 -2
- data/docs/SearchApi.md +1 -1
- data/docs/SpacesApi.md +4 -4
- data/docs/StyleGuidesApi.md +2 -2
- data/docs/TagsApi.md +2 -2
- data/docs/TeamsApi.md +2 -2
- data/docs/TranslationsApi.md +31 -27
- data/docs/TranslationsExcludeParameters.md +1 -1
- data/docs/TranslationsIncludeParameters.md +1 -1
- data/docs/TranslationsReviewParameters.md +1 -1
- data/docs/TranslationsSearchParameters.md +1 -1
- data/docs/TranslationsUnverifyParameters.md +1 -1
- data/docs/TranslationsVerifyParameters.md +1 -1
- data/docs/UploadsApi.md +5 -5
- data/docs/VariablesApi.md +2 -2
- data/docs/VersionsHistoryApi.md +2 -2
- data/docs/WebhooksApi.md +2 -2
- data/lib/phrase/api/accounts_api.rb +2 -2
- data/lib/phrase/api/authorizations_api.rb +2 -2
- data/lib/phrase/api/bitbucket_sync_api.rb +4 -4
- data/lib/phrase/api/blacklisted_keys_api.rb +2 -2
- data/lib/phrase/api/branches_api.rb +8 -8
- data/lib/phrase/api/comments_api.rb +2 -2
- data/lib/phrase/api/distributions_api.rb +2 -2
- data/lib/phrase/api/documents_api.rb +2 -2
- data/lib/phrase/api/git_hub_sync_api.rb +4 -4
- data/lib/phrase/api/git_lab_sync_api.rb +6 -6
- data/lib/phrase/api/glossaries_api.rb +2 -2
- data/lib/phrase/api/glossary_terms_api.rb +2 -2
- data/lib/phrase/api/invitations_api.rb +2 -2
- data/lib/phrase/api/job_comments_api.rb +9 -9
- data/lib/phrase/api/job_locales_api.rb +2 -2
- data/lib/phrase/api/job_template_locales_api.rb +14 -14
- data/lib/phrase/api/job_templates_api.rb +72 -72
- data/lib/phrase/api/jobs_api.rb +4 -4
- data/lib/phrase/api/keys_api.rb +4 -4
- data/lib/phrase/api/locales_api.rb +14 -8
- data/lib/phrase/api/members_api.rb +2 -2
- data/lib/phrase/api/notification_groups_api.rb +8 -8
- data/lib/phrase/api/notifications_api.rb +11 -8
- data/lib/phrase/api/orders_api.rb +2 -2
- data/lib/phrase/api/projects_api.rb +2 -2
- data/lib/phrase/api/releases_api.rb +2 -2
- data/lib/phrase/api/screenshot_markers_api.rb +2 -2
- data/lib/phrase/api/screenshots_api.rb +2 -2
- data/lib/phrase/api/search_api.rb +2 -2
- data/lib/phrase/api/spaces_api.rb +4 -4
- data/lib/phrase/api/style_guides_api.rb +2 -2
- data/lib/phrase/api/tags_api.rb +2 -2
- data/lib/phrase/api/teams_api.rb +2 -2
- data/lib/phrase/api/translations_api.rb +28 -22
- data/lib/phrase/api/uploads_api.rb +4 -4
- data/lib/phrase/api/variables_api.rb +2 -2
- data/lib/phrase/api/versions_history_api.rb +2 -2
- data/lib/phrase/api/webhooks_api.rb +2 -2
- data/lib/phrase/models/job_locale.rb +13 -2
- data/lib/phrase/models/job_locale_update_parameters.rb +28 -4
- data/lib/phrase/models/job_locales_create_parameters.rb +33 -4
- data/lib/phrase/models/job_template_details.rb +285 -0
- data/lib/phrase/models/job_template_details1.rb +214 -0
- data/lib/phrase/models/job_template_locale_update_parameters.rb +28 -9
- data/lib/phrase/models/{job_template_locale.rb → job_template_locales.rb} +18 -7
- data/lib/phrase/models/job_template_locales_create_parameters.rb +28 -4
- data/lib/phrase/models/keys_search_parameters.rb +1 -1
- data/lib/phrase/models/locale_team_preview.rb +212 -0
- data/lib/phrase/models/{job_template_user_preview.rb → locale_user_preview.rb} +3 -3
- data/lib/phrase/models/notification_group_detail.rb +1 -1
- data/lib/phrase/models/project.rb +10 -1
- data/lib/phrase/models/project_create_parameters.rb +22 -2
- data/lib/phrase/models/project_details.rb +10 -1
- data/lib/phrase/models/project_update_parameters.rb +22 -2
- data/lib/phrase/models/translations_exclude_parameters.rb +1 -1
- data/lib/phrase/models/translations_include_parameters.rb +1 -1
- data/lib/phrase/models/translations_review_parameters.rb +1 -1
- data/lib/phrase/models/translations_search_parameters.rb +1 -1
- data/lib/phrase/models/translations_unverify_parameters.rb +1 -1
- data/lib/phrase/models/translations_verify_parameters.rb +1 -1
- data/lib/phrase/version.rb +1 -1
- data/lib/phrase.rb +5 -2
- data/spec/api/accounts_api_spec.rb +1 -1
- data/spec/api/authorizations_api_spec.rb +1 -1
- data/spec/api/bitbucket_sync_api_spec.rb +2 -2
- data/spec/api/blacklisted_keys_api_spec.rb +1 -1
- data/spec/api/branches_api_spec.rb +4 -4
- data/spec/api/comments_api_spec.rb +1 -1
- data/spec/api/distributions_api_spec.rb +1 -1
- data/spec/api/documents_api_spec.rb +1 -1
- data/spec/api/git_hub_sync_api_spec.rb +2 -2
- data/spec/api/git_lab_sync_api_spec.rb +3 -3
- data/spec/api/glossaries_api_spec.rb +1 -1
- data/spec/api/glossary_terms_api_spec.rb +1 -1
- data/spec/api/invitations_api_spec.rb +1 -1
- data/spec/api/job_comments_api_spec.rb +3 -3
- data/spec/api/job_locales_api_spec.rb +1 -1
- data/spec/api/job_template_locales_api_spec.rb +5 -5
- data/spec/api/job_templates_api_spec.rb +18 -18
- data/spec/api/jobs_api_spec.rb +2 -2
- data/spec/api/keys_api_spec.rb +2 -2
- data/spec/api/locales_api_spec.rb +6 -4
- data/spec/api/members_api_spec.rb +1 -1
- data/spec/api/notification_groups_api_spec.rb +3 -3
- data/spec/api/notifications_api_spec.rb +4 -3
- data/spec/api/orders_api_spec.rb +1 -1
- data/spec/api/projects_api_spec.rb +1 -1
- data/spec/api/releases_api_spec.rb +1 -1
- data/spec/api/screenshot_markers_api_spec.rb +1 -1
- data/spec/api/screenshots_api_spec.rb +1 -1
- data/spec/api/search_api_spec.rb +1 -1
- data/spec/api/spaces_api_spec.rb +2 -2
- data/spec/api/style_guides_api_spec.rb +1 -1
- data/spec/api/tags_api_spec.rb +1 -1
- data/spec/api/teams_api_spec.rb +1 -1
- data/spec/api/translations_api_spec.rb +13 -11
- data/spec/api/uploads_api_spec.rb +2 -2
- data/spec/api/variables_api_spec.rb +1 -1
- data/spec/api/versions_history_api_spec.rb +1 -1
- data/spec/api/webhooks_api_spec.rb +1 -1
- data/spec/models/job_locale_spec.rb +6 -0
- data/spec/models/job_locale_update_parameters_spec.rb +12 -0
- data/spec/models/job_locales_create_parameters_spec.rb +12 -0
- data/spec/models/job_template_details1_spec.rb +41 -0
- data/spec/models/job_template_details_spec.rb +83 -0
- data/spec/models/job_template_locale_update_parameters_spec.rb +12 -0
- data/spec/models/job_template_locales_create_parameters_spec.rb +12 -0
- data/spec/models/{job_template_locale_spec.rb → job_template_locales_spec.rb} +12 -6
- data/spec/models/locale_team_preview_spec.rb +41 -0
- data/spec/models/{job_template_user_preview_spec.rb → locale_user_preview_spec.rb} +6 -6
- data/spec/models/project_create_parameters_spec.rb +12 -0
- data/spec/models/project_details_spec.rb +6 -0
- data/spec/models/project_spec.rb +6 -0
- data/spec/models/project_update_parameters_spec.rb +12 -0
- metadata +237 -225
|
@@ -95,7 +95,7 @@ module Phrase
|
|
|
95
95
|
# @param [Hash] opts the optional parameters
|
|
96
96
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
97
97
|
# @option opts [Integer] :page Page number
|
|
98
|
-
# @option opts [Integer] :per_page
|
|
98
|
+
# @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
|
|
99
99
|
# @option opts [String] :branch specify the branch to use
|
|
100
100
|
# @return [Array<TranslationVersion>]
|
|
101
101
|
def versions_list(project_id, translation_id, opts = {})
|
|
@@ -110,7 +110,7 @@ module Phrase
|
|
|
110
110
|
# @param [Hash] opts the optional parameters
|
|
111
111
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
112
112
|
# @option opts [Integer] :page Page number
|
|
113
|
-
# @option opts [Integer] :per_page
|
|
113
|
+
# @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
|
|
114
114
|
# @option opts [String] :branch specify the branch to use
|
|
115
115
|
# @return [Array<(Response<(Array<TranslationVersion>)>, Integer, Hash)>] Response<(Array<TranslationVersion>)> data, response status code and response headers
|
|
116
116
|
def versions_list_with_http_info(project_id, translation_id, opts = {})
|
|
@@ -379,7 +379,7 @@ module Phrase
|
|
|
379
379
|
# @param [Hash] opts the optional parameters
|
|
380
380
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
381
381
|
# @option opts [Integer] :page Page number
|
|
382
|
-
# @option opts [Integer] :per_page
|
|
382
|
+
# @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
|
|
383
383
|
# @return [Array<Webhook>]
|
|
384
384
|
def webhooks_list(project_id, opts = {})
|
|
385
385
|
data, _status_code, _headers = webhooks_list_with_http_info(project_id, opts)
|
|
@@ -392,7 +392,7 @@ module Phrase
|
|
|
392
392
|
# @param [Hash] opts the optional parameters
|
|
393
393
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
394
394
|
# @option opts [Integer] :page Page number
|
|
395
|
-
# @option opts [Integer] :per_page
|
|
395
|
+
# @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
|
|
396
396
|
# @return [Array<(Response<(Array<Webhook>)>, Integer, Hash)>] Response<(Array<Webhook>)> data, response status code and response headers
|
|
397
397
|
def webhooks_list_with_http_info(project_id, opts = {})
|
|
398
398
|
if @api_client.config.debugging
|
|
@@ -10,6 +10,8 @@ module Phrase
|
|
|
10
10
|
|
|
11
11
|
attr_accessor :users
|
|
12
12
|
|
|
13
|
+
attr_accessor :teams
|
|
14
|
+
|
|
13
15
|
attr_accessor :completed
|
|
14
16
|
|
|
15
17
|
attr_accessor :translation_completed_at
|
|
@@ -23,6 +25,7 @@ module Phrase
|
|
|
23
25
|
:'job' => :'job',
|
|
24
26
|
:'locale' => :'locale',
|
|
25
27
|
:'users' => :'users',
|
|
28
|
+
:'teams' => :'teams',
|
|
26
29
|
:'completed' => :'completed',
|
|
27
30
|
:'translation_completed_at' => :'translation_completed_at',
|
|
28
31
|
:'review_completed_at' => :'review_completed_at'
|
|
@@ -35,7 +38,8 @@ module Phrase
|
|
|
35
38
|
:'id' => :'String',
|
|
36
39
|
:'job' => :'JobPreview',
|
|
37
40
|
:'locale' => :'LocalePreview',
|
|
38
|
-
:'users' => :'Array<
|
|
41
|
+
:'users' => :'Array<LocaleUserPreview>',
|
|
42
|
+
:'teams' => :'Array<LocaleTeamPreview>',
|
|
39
43
|
:'completed' => :'Boolean',
|
|
40
44
|
:'translation_completed_at' => :'DateTime',
|
|
41
45
|
:'review_completed_at' => :'DateTime'
|
|
@@ -81,6 +85,12 @@ module Phrase
|
|
|
81
85
|
end
|
|
82
86
|
end
|
|
83
87
|
|
|
88
|
+
if attributes.key?(:'teams')
|
|
89
|
+
if (value = attributes[:'teams']).is_a?(Array)
|
|
90
|
+
self.teams = value
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
84
94
|
if attributes.key?(:'completed')
|
|
85
95
|
self.completed = attributes[:'completed']
|
|
86
96
|
end
|
|
@@ -116,6 +126,7 @@ module Phrase
|
|
|
116
126
|
job == o.job &&
|
|
117
127
|
locale == o.locale &&
|
|
118
128
|
users == o.users &&
|
|
129
|
+
teams == o.teams &&
|
|
119
130
|
completed == o.completed &&
|
|
120
131
|
translation_completed_at == o.translation_completed_at &&
|
|
121
132
|
review_completed_at == o.review_completed_at
|
|
@@ -130,7 +141,7 @@ module Phrase
|
|
|
130
141
|
# Calculates hash code according to all attributes.
|
|
131
142
|
# @return [Integer] Hash code
|
|
132
143
|
def hash
|
|
133
|
-
[id, job, locale, users, completed, translation_completed_at, review_completed_at].hash
|
|
144
|
+
[id, job, locale, users, teams, completed, translation_completed_at, review_completed_at].hash
|
|
134
145
|
end
|
|
135
146
|
|
|
136
147
|
# Builds the object from hash
|
|
@@ -14,13 +14,21 @@ module Phrase
|
|
|
14
14
|
# Array of reviewer ids to be assigned to the job locale as reviewers
|
|
15
15
|
attr_accessor :reviewer_ids
|
|
16
16
|
|
|
17
|
+
# Array of team ids to be assigned to the job locale as translators
|
|
18
|
+
attr_accessor :translator_team_ids
|
|
19
|
+
|
|
20
|
+
# Array of team ids to be assigned to the job locale as reviewers
|
|
21
|
+
attr_accessor :reviewer_team_ids
|
|
22
|
+
|
|
17
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
18
24
|
def self.attribute_map
|
|
19
25
|
{
|
|
20
26
|
:'branch' => :'branch',
|
|
21
27
|
:'locale_id' => :'locale_id',
|
|
22
28
|
:'user_ids' => :'user_ids',
|
|
23
|
-
:'reviewer_ids' => :'reviewer_ids'
|
|
29
|
+
:'reviewer_ids' => :'reviewer_ids',
|
|
30
|
+
:'translator_team_ids' => :'translator_team_ids',
|
|
31
|
+
:'reviewer_team_ids' => :'reviewer_team_ids'
|
|
24
32
|
}
|
|
25
33
|
end
|
|
26
34
|
|
|
@@ -30,7 +38,9 @@ module Phrase
|
|
|
30
38
|
:'branch' => :'String',
|
|
31
39
|
:'locale_id' => :'String',
|
|
32
40
|
:'user_ids' => :'Array<String>',
|
|
33
|
-
:'reviewer_ids' => :'Array<String>'
|
|
41
|
+
:'reviewer_ids' => :'Array<String>',
|
|
42
|
+
:'translator_team_ids' => :'Array<String>',
|
|
43
|
+
:'reviewer_team_ids' => :'Array<String>'
|
|
34
44
|
}
|
|
35
45
|
end
|
|
36
46
|
|
|
@@ -74,6 +84,18 @@ module Phrase
|
|
|
74
84
|
self.reviewer_ids = value
|
|
75
85
|
end
|
|
76
86
|
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'translator_team_ids')
|
|
89
|
+
if (value = attributes[:'translator_team_ids']).is_a?(Array)
|
|
90
|
+
self.translator_team_ids = value
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'reviewer_team_ids')
|
|
95
|
+
if (value = attributes[:'reviewer_team_ids']).is_a?(Array)
|
|
96
|
+
self.reviewer_team_ids = value
|
|
97
|
+
end
|
|
98
|
+
end
|
|
77
99
|
end
|
|
78
100
|
|
|
79
101
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -97,7 +119,9 @@ module Phrase
|
|
|
97
119
|
branch == o.branch &&
|
|
98
120
|
locale_id == o.locale_id &&
|
|
99
121
|
user_ids == o.user_ids &&
|
|
100
|
-
reviewer_ids == o.reviewer_ids
|
|
122
|
+
reviewer_ids == o.reviewer_ids &&
|
|
123
|
+
translator_team_ids == o.translator_team_ids &&
|
|
124
|
+
reviewer_team_ids == o.reviewer_team_ids
|
|
101
125
|
end
|
|
102
126
|
|
|
103
127
|
# @see the `==` method
|
|
@@ -109,7 +133,7 @@ module Phrase
|
|
|
109
133
|
# Calculates hash code according to all attributes.
|
|
110
134
|
# @return [Integer] Hash code
|
|
111
135
|
def hash
|
|
112
|
-
[branch, locale_id, user_ids, reviewer_ids].hash
|
|
136
|
+
[branch, locale_id, user_ids, reviewer_ids, translator_team_ids, reviewer_team_ids].hash
|
|
113
137
|
end
|
|
114
138
|
|
|
115
139
|
# Builds the object from hash
|
|
@@ -14,13 +14,21 @@ module Phrase
|
|
|
14
14
|
# Array of reviewer ids to be assigned to the job locale as reviewers
|
|
15
15
|
attr_accessor :reviewer_ids
|
|
16
16
|
|
|
17
|
+
# Array of team ids to be assigned to the job locale as translators
|
|
18
|
+
attr_accessor :translator_team_ids
|
|
19
|
+
|
|
20
|
+
# Array of team ids to be assigned to the job locale as reviewers
|
|
21
|
+
attr_accessor :reviewer_team_ids
|
|
22
|
+
|
|
17
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
18
24
|
def self.attribute_map
|
|
19
25
|
{
|
|
20
26
|
:'branch' => :'branch',
|
|
21
27
|
:'locale_id' => :'locale_id',
|
|
22
28
|
:'user_ids' => :'user_ids',
|
|
23
|
-
:'reviewer_ids' => :'reviewer_ids'
|
|
29
|
+
:'reviewer_ids' => :'reviewer_ids',
|
|
30
|
+
:'translator_team_ids' => :'translator_team_ids',
|
|
31
|
+
:'reviewer_team_ids' => :'reviewer_team_ids'
|
|
24
32
|
}
|
|
25
33
|
end
|
|
26
34
|
|
|
@@ -30,7 +38,9 @@ module Phrase
|
|
|
30
38
|
:'branch' => :'String',
|
|
31
39
|
:'locale_id' => :'String',
|
|
32
40
|
:'user_ids' => :'Array<String>',
|
|
33
|
-
:'reviewer_ids' => :'Array<String>'
|
|
41
|
+
:'reviewer_ids' => :'Array<String>',
|
|
42
|
+
:'translator_team_ids' => :'Array<String>',
|
|
43
|
+
:'reviewer_team_ids' => :'Array<String>'
|
|
34
44
|
}
|
|
35
45
|
end
|
|
36
46
|
|
|
@@ -74,18 +84,35 @@ module Phrase
|
|
|
74
84
|
self.reviewer_ids = value
|
|
75
85
|
end
|
|
76
86
|
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'translator_team_ids')
|
|
89
|
+
if (value = attributes[:'translator_team_ids']).is_a?(Array)
|
|
90
|
+
self.translator_team_ids = value
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'reviewer_team_ids')
|
|
95
|
+
if (value = attributes[:'reviewer_team_ids']).is_a?(Array)
|
|
96
|
+
self.reviewer_team_ids = value
|
|
97
|
+
end
|
|
98
|
+
end
|
|
77
99
|
end
|
|
78
100
|
|
|
79
101
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
80
102
|
# @return Array for valid properties with the reasons
|
|
81
103
|
def list_invalid_properties
|
|
82
104
|
invalid_properties = Array.new
|
|
105
|
+
if @locale_id.nil?
|
|
106
|
+
invalid_properties.push('invalid value for "locale_id", locale_id cannot be nil.')
|
|
107
|
+
end
|
|
108
|
+
|
|
83
109
|
invalid_properties
|
|
84
110
|
end
|
|
85
111
|
|
|
86
112
|
# Check to see if the all the properties in the model are valid
|
|
87
113
|
# @return true if the model is valid
|
|
88
114
|
def valid?
|
|
115
|
+
return false if @locale_id.nil?
|
|
89
116
|
true
|
|
90
117
|
end
|
|
91
118
|
|
|
@@ -97,7 +124,9 @@ module Phrase
|
|
|
97
124
|
branch == o.branch &&
|
|
98
125
|
locale_id == o.locale_id &&
|
|
99
126
|
user_ids == o.user_ids &&
|
|
100
|
-
reviewer_ids == o.reviewer_ids
|
|
127
|
+
reviewer_ids == o.reviewer_ids &&
|
|
128
|
+
translator_team_ids == o.translator_team_ids &&
|
|
129
|
+
reviewer_team_ids == o.reviewer_team_ids
|
|
101
130
|
end
|
|
102
131
|
|
|
103
132
|
# @see the `==` method
|
|
@@ -109,7 +138,7 @@ module Phrase
|
|
|
109
138
|
# Calculates hash code according to all attributes.
|
|
110
139
|
# @return [Integer] Hash code
|
|
111
140
|
def hash
|
|
112
|
-
[branch, locale_id, user_ids, reviewer_ids].hash
|
|
141
|
+
[branch, locale_id, user_ids, reviewer_ids, translator_team_ids, reviewer_team_ids].hash
|
|
113
142
|
end
|
|
114
143
|
|
|
115
144
|
# Builds the object from hash
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
require 'date'
|
|
2
|
+
|
|
3
|
+
module Phrase
|
|
4
|
+
class JobTemplateDetails
|
|
5
|
+
attr_accessor :id
|
|
6
|
+
|
|
7
|
+
attr_accessor :name
|
|
8
|
+
|
|
9
|
+
attr_accessor :briefing
|
|
10
|
+
|
|
11
|
+
attr_accessor :project
|
|
12
|
+
|
|
13
|
+
attr_accessor :branch
|
|
14
|
+
|
|
15
|
+
attr_accessor :created_at
|
|
16
|
+
|
|
17
|
+
attr_accessor :updated_at
|
|
18
|
+
|
|
19
|
+
attr_accessor :owner
|
|
20
|
+
|
|
21
|
+
attr_accessor :creator
|
|
22
|
+
|
|
23
|
+
attr_accessor :locales
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'id' => :'id',
|
|
29
|
+
:'name' => :'name',
|
|
30
|
+
:'briefing' => :'briefing',
|
|
31
|
+
:'project' => :'project',
|
|
32
|
+
:'branch' => :'branch',
|
|
33
|
+
:'created_at' => :'created_at',
|
|
34
|
+
:'updated_at' => :'updated_at',
|
|
35
|
+
:'owner' => :'owner',
|
|
36
|
+
:'creator' => :'creator',
|
|
37
|
+
:'locales' => :'locales'
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Attribute type mapping.
|
|
42
|
+
def self.openapi_types
|
|
43
|
+
{
|
|
44
|
+
:'id' => :'String',
|
|
45
|
+
:'name' => :'String',
|
|
46
|
+
:'briefing' => :'String',
|
|
47
|
+
:'project' => :'ProjectShort',
|
|
48
|
+
:'branch' => :'Branch',
|
|
49
|
+
:'created_at' => :'DateTime',
|
|
50
|
+
:'updated_at' => :'DateTime',
|
|
51
|
+
:'owner' => :'UserPreview',
|
|
52
|
+
:'creator' => :'UserPreview',
|
|
53
|
+
:'locales' => :'Array<LocalePreview>'
|
|
54
|
+
}
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# List of attributes with nullable: true
|
|
58
|
+
def self.openapi_nullable
|
|
59
|
+
Set.new([
|
|
60
|
+
])
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# List of class defined in allOf (OpenAPI v3)
|
|
64
|
+
def self.openapi_all_of
|
|
65
|
+
[
|
|
66
|
+
:'JobTemplate',
|
|
67
|
+
:'JobTemplateDetails1'
|
|
68
|
+
]
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Initializes the object
|
|
72
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
73
|
+
def initialize(attributes = {})
|
|
74
|
+
if (!attributes.is_a?(Hash))
|
|
75
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::JobTemplateDetails` initialize method"
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
79
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
80
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
81
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::JobTemplateDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
82
|
+
end
|
|
83
|
+
h[k.to_sym] = v
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'id')
|
|
87
|
+
self.id = attributes[:'id']
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'name')
|
|
91
|
+
self.name = attributes[:'name']
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'briefing')
|
|
95
|
+
self.briefing = attributes[:'briefing']
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'project')
|
|
99
|
+
self.project = attributes[:'project']
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'branch')
|
|
103
|
+
self.branch = attributes[:'branch']
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'created_at')
|
|
107
|
+
self.created_at = attributes[:'created_at']
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'updated_at')
|
|
111
|
+
self.updated_at = attributes[:'updated_at']
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'owner')
|
|
115
|
+
self.owner = attributes[:'owner']
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if attributes.key?(:'creator')
|
|
119
|
+
self.creator = attributes[:'creator']
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if attributes.key?(:'locales')
|
|
123
|
+
if (value = attributes[:'locales']).is_a?(Array)
|
|
124
|
+
self.locales = value
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
130
|
+
# @return Array for valid properties with the reasons
|
|
131
|
+
def list_invalid_properties
|
|
132
|
+
invalid_properties = Array.new
|
|
133
|
+
invalid_properties
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Check to see if the all the properties in the model are valid
|
|
137
|
+
# @return true if the model is valid
|
|
138
|
+
def valid?
|
|
139
|
+
true
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Checks equality by comparing each attribute.
|
|
143
|
+
# @param [Object] Object to be compared
|
|
144
|
+
def ==(o)
|
|
145
|
+
return true if self.equal?(o)
|
|
146
|
+
self.class == o.class &&
|
|
147
|
+
id == o.id &&
|
|
148
|
+
name == o.name &&
|
|
149
|
+
briefing == o.briefing &&
|
|
150
|
+
project == o.project &&
|
|
151
|
+
branch == o.branch &&
|
|
152
|
+
created_at == o.created_at &&
|
|
153
|
+
updated_at == o.updated_at &&
|
|
154
|
+
owner == o.owner &&
|
|
155
|
+
creator == o.creator &&
|
|
156
|
+
locales == o.locales
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# @see the `==` method
|
|
160
|
+
# @param [Object] Object to be compared
|
|
161
|
+
def eql?(o)
|
|
162
|
+
self == o
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Calculates hash code according to all attributes.
|
|
166
|
+
# @return [Integer] Hash code
|
|
167
|
+
def hash
|
|
168
|
+
[id, name, briefing, project, branch, created_at, updated_at, owner, creator, locales].hash
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Builds the object from hash
|
|
172
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
173
|
+
# @return [Object] Returns the model itself
|
|
174
|
+
def self.build_from_hash(attributes)
|
|
175
|
+
new.build_from_hash(attributes)
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Builds the object from hash
|
|
179
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
180
|
+
# @return [Object] Returns the model itself
|
|
181
|
+
def build_from_hash(attributes)
|
|
182
|
+
return nil unless attributes.is_a?(Hash)
|
|
183
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
184
|
+
if type =~ /\AArray<(.*)>/i
|
|
185
|
+
# check to ensure the input is an array given that the attribute
|
|
186
|
+
# is documented as an array but the input is not
|
|
187
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
188
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
189
|
+
end
|
|
190
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
191
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
192
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
self
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Deserializes the data based on type
|
|
199
|
+
# @param string type Data type
|
|
200
|
+
# @param string value Value to be deserialized
|
|
201
|
+
# @return [Object] Deserialized data
|
|
202
|
+
def _deserialize(type, value)
|
|
203
|
+
case type.to_sym
|
|
204
|
+
when :DateTime
|
|
205
|
+
DateTime.parse(value)
|
|
206
|
+
when :Date
|
|
207
|
+
Date.parse(value)
|
|
208
|
+
when :String
|
|
209
|
+
value.to_s
|
|
210
|
+
when :Integer
|
|
211
|
+
value.to_i
|
|
212
|
+
when :Float
|
|
213
|
+
value.to_f
|
|
214
|
+
when :Boolean
|
|
215
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
216
|
+
true
|
|
217
|
+
else
|
|
218
|
+
false
|
|
219
|
+
end
|
|
220
|
+
when :Object
|
|
221
|
+
# generic object (usually a Hash), return directly
|
|
222
|
+
value
|
|
223
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
224
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
225
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
226
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
227
|
+
k_type = Regexp.last_match[:k_type]
|
|
228
|
+
v_type = Regexp.last_match[:v_type]
|
|
229
|
+
{}.tap do |hash|
|
|
230
|
+
value.each do |k, v|
|
|
231
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
232
|
+
end
|
|
233
|
+
end
|
|
234
|
+
else # model
|
|
235
|
+
Phrase.const_get(type).build_from_hash(value)
|
|
236
|
+
end
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
# Returns the string representation of the object
|
|
240
|
+
# @return [String] String presentation of the object
|
|
241
|
+
def to_s
|
|
242
|
+
to_hash.to_s
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
246
|
+
# @return [Hash] Returns the object in the form of hash
|
|
247
|
+
def to_body
|
|
248
|
+
to_hash
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
# Returns the object in the form of hash
|
|
252
|
+
# @return [Hash] Returns the object in the form of hash
|
|
253
|
+
def to_hash
|
|
254
|
+
hash = {}
|
|
255
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
256
|
+
value = self.send(attr)
|
|
257
|
+
if value.nil?
|
|
258
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
259
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
hash[param] = _to_hash(value)
|
|
263
|
+
end
|
|
264
|
+
hash
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
# Outputs non-array value in the form of hash
|
|
268
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
269
|
+
# @param [Object] value Any valid value
|
|
270
|
+
# @return [Hash] Returns the value in the form of hash
|
|
271
|
+
def _to_hash(value)
|
|
272
|
+
if value.is_a?(Array)
|
|
273
|
+
value.compact.map { |v| _to_hash(v) }
|
|
274
|
+
elsif value.is_a?(Hash)
|
|
275
|
+
{}.tap do |hash|
|
|
276
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
277
|
+
end
|
|
278
|
+
elsif value.respond_to? :to_hash
|
|
279
|
+
value.to_hash
|
|
280
|
+
else
|
|
281
|
+
value
|
|
282
|
+
end
|
|
283
|
+
end
|
|
284
|
+
end
|
|
285
|
+
end
|