Skip to content

Commit 3344f7d

Browse files
author
Phrase
committed
Deploying from phrase/openapi@0139c51d
1 parent 6d8d83d commit 3344f7d

7 files changed

+45
-9
lines changed

docs/ProjectUpdateParameters.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Name | Type | Description | Notes
2525
**autotranslate_mark_as_unverified** | **bool** | (Optional) Requires autotranslate_enabled to be true | [optional]
2626
**autotranslate_use_machine_translation** | **bool** | (Optional) Requires autotranslate_enabled to be true | [optional]
2727
**autotranslate_use_translation_memory** | **bool** | (Optional) Requires autotranslate_enabled to be true | [optional]
28+
**default_encoding** | **str** | (Optional) Sets the default encoding for Uploads. If you leave it empty, we will try to guess it automatically for you when you Upload a file. You can still override this value by setting the <a href='#post-/projects/-project_id-/uploads'>`file_encoding`</a> parameter for Uploads. | [optional]
2829

2930
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
3031

phrase_api/models/project_update_parameters.py

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ class ProjectUpdateParameters(object):
5353
'autotranslate_check_new_locales': 'bool',
5454
'autotranslate_mark_as_unverified': 'bool',
5555
'autotranslate_use_machine_translation': 'bool',
56-
'autotranslate_use_translation_memory': 'bool'
56+
'autotranslate_use_translation_memory': 'bool',
57+
'default_encoding': 'str'
5758
}
5859

5960
attribute_map = {
@@ -78,10 +79,11 @@ class ProjectUpdateParameters(object):
7879
'autotranslate_check_new_locales': 'autotranslate_check_new_locales',
7980
'autotranslate_mark_as_unverified': 'autotranslate_mark_as_unverified',
8081
'autotranslate_use_machine_translation': 'autotranslate_use_machine_translation',
81-
'autotranslate_use_translation_memory': 'autotranslate_use_translation_memory'
82+
'autotranslate_use_translation_memory': 'autotranslate_use_translation_memory',
83+
'default_encoding': 'default_encoding'
8284
}
8385

84-
def __init__(self, account_id=None, name=None, point_of_contact=None, main_format=None, media=None, shares_translation_memory=None, project_image=None, remove_project_image=None, workflow=None, machine_translation_enabled=None, enable_branching=None, protect_master_branch=None, enable_all_data_type_translation_keys_for_translators=None, enable_icu_message_format=None, zero_plural_form_enabled=None, autotranslate_enabled=None, autotranslate_check_new_translation_keys=None, autotranslate_check_new_uploads=None, autotranslate_check_new_locales=None, autotranslate_mark_as_unverified=None, autotranslate_use_machine_translation=None, autotranslate_use_translation_memory=None, local_vars_configuration=None): # noqa: E501
86+
def __init__(self, account_id=None, name=None, point_of_contact=None, main_format=None, media=None, shares_translation_memory=None, project_image=None, remove_project_image=None, workflow=None, machine_translation_enabled=None, enable_branching=None, protect_master_branch=None, enable_all_data_type_translation_keys_for_translators=None, enable_icu_message_format=None, zero_plural_form_enabled=None, autotranslate_enabled=None, autotranslate_check_new_translation_keys=None, autotranslate_check_new_uploads=None, autotranslate_check_new_locales=None, autotranslate_mark_as_unverified=None, autotranslate_use_machine_translation=None, autotranslate_use_translation_memory=None, default_encoding=None, local_vars_configuration=None): # noqa: E501
8587
"""ProjectUpdateParameters - a model defined in OpenAPI""" # noqa: E501
8688
if local_vars_configuration is None:
8789
local_vars_configuration = Configuration()
@@ -109,6 +111,7 @@ def __init__(self, account_id=None, name=None, point_of_contact=None, main_forma
109111
self._autotranslate_mark_as_unverified = None
110112
self._autotranslate_use_machine_translation = None
111113
self._autotranslate_use_translation_memory = None
114+
self._default_encoding = None
112115
self.discriminator = None
113116

114117
if account_id is not None:
@@ -155,6 +158,8 @@ def __init__(self, account_id=None, name=None, point_of_contact=None, main_forma
155158
self.autotranslate_use_machine_translation = autotranslate_use_machine_translation
156159
if autotranslate_use_translation_memory is not None:
157160
self.autotranslate_use_translation_memory = autotranslate_use_translation_memory
161+
if default_encoding is not None:
162+
self.default_encoding = default_encoding
158163

159164
@property
160165
def account_id(self):
@@ -662,6 +667,35 @@ def autotranslate_use_translation_memory(self, autotranslate_use_translation_mem
662667

663668
self._autotranslate_use_translation_memory = autotranslate_use_translation_memory
664669

670+
@property
671+
def default_encoding(self):
672+
"""Gets the default_encoding of this ProjectUpdateParameters. # noqa: E501
673+
674+
(Optional) Sets the default encoding for Uploads. If you leave it empty, we will try to guess it automatically for you when you Upload a file. You can still override this value by setting the <a href='#post-/projects/-project_id-/uploads'>`file_encoding`</a> parameter for Uploads. # noqa: E501
675+
676+
:return: The default_encoding of this ProjectUpdateParameters. # noqa: E501
677+
:rtype: str
678+
"""
679+
return self._default_encoding
680+
681+
@default_encoding.setter
682+
def default_encoding(self, default_encoding):
683+
"""Sets the default_encoding of this ProjectUpdateParameters.
684+
685+
(Optional) Sets the default encoding for Uploads. If you leave it empty, we will try to guess it automatically for you when you Upload a file. You can still override this value by setting the <a href='#post-/projects/-project_id-/uploads'>`file_encoding`</a> parameter for Uploads. # noqa: E501
686+
687+
:param default_encoding: The default_encoding of this ProjectUpdateParameters. # noqa: E501
688+
:type: str
689+
"""
690+
allowed_values = ["UTF-8", "UTF-16", "UTF-16BE", "UTF-16LE", "ISO-8859-1"] # noqa: E501
691+
if self.local_vars_configuration.client_side_validation and default_encoding not in allowed_values: # noqa: E501
692+
raise ValueError(
693+
"Invalid value for `default_encoding` ({0}), must be one of {1}" # noqa: E501
694+
.format(default_encoding, allowed_values)
695+
)
696+
697+
self._default_encoding = default_encoding
698+
665699
def to_dict(self):
666700
"""Returns the model properties as a dict"""
667701
result = {}

test/test_key_create_parameters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def make_instance(self, include_optional):
4545
data_type = 'number',
4646
tags = 'awesome-feature,needs-proofreading',
4747
max_characters_allowed = 140,
48-
screenshot = '[B@32cbb8c6',
48+
screenshot = '[B@7538033f',
4949
remove_screenshot = True,
5050
unformatted = True,
5151
default_translation_content = 'Default translation content',

test/test_key_update_parameters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def make_instance(self, include_optional):
4545
data_type = 'number',
4646
tags = 'awesome-feature,needs-proofreading',
4747
max_characters_allowed = 140,
48-
screenshot = '[B@20e06a86',
48+
screenshot = '[B@25a65e20',
4949
remove_screenshot = True,
5050
unformatted = True,
5151
xml_space_preserve = True,

test/test_project_create_parameters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def make_instance(self, include_optional):
4141
main_format = 'yml',
4242
media = 'Python',
4343
shares_translation_memory = True,
44-
project_image = '[B@3ca1f0a4',
44+
project_image = '[B@5de993d',
4545
remove_project_image = True,
4646
account_id = 'abcd1234',
4747
point_of_contact = 'abcd1234',

test/test_project_update_parameters.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def make_instance(self, include_optional):
4343
main_format = 'yml',
4444
media = 'Python',
4545
shares_translation_memory = True,
46-
project_image = '[B@4d2cd74',
46+
project_image = '[B@49e335a5',
4747
remove_project_image = False,
4848
workflow = 'review',
4949
machine_translation_enabled = True,
@@ -58,7 +58,8 @@ def make_instance(self, include_optional):
5858
autotranslate_check_new_locales = True,
5959
autotranslate_mark_as_unverified = True,
6060
autotranslate_use_machine_translation = True,
61-
autotranslate_use_translation_memory = True
61+
autotranslate_use_translation_memory = True,
62+
default_encoding = 'UTF-8'
6263
)
6364
else :
6465
return ProjectUpdateParameters(

test/test_screenshot_update_parameters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def make_instance(self, include_optional):
4040
branch = 'my-feature-branch',
4141
name = 'A screenshot name',
4242
description = 'A screenshot description',
43-
filename = '[B@15c5c99'
43+
filename = '[B@45e65f8'
4444
)
4545
else :
4646
return ScreenshotUpdateParameters(

0 commit comments

Comments
 (0)