Skip to content

Commit e413e22

Browse files
author
Phrase
committed
1 parent a8c375c commit e413e22

File tree

3 files changed

+34
-4
lines changed

3 files changed

+34
-4
lines changed

docs/ProjectCreateParameters.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
99
**project_image** | **file** | Image to identify the project | [optional]
1010
**remove_project_image** | **bool** | Indicates whether the project image should be deleted. | [optional]
1111
**account_id** | **str** | Account ID to specify the actual account the project should be created in. Required if the requesting user is a member of multiple accounts. | [optional]
12+
**source_project_id** | **str** | 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. | [optional]
1213

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

phrase_api/models/project_create_parameters.py

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ class ProjectCreateParameters(object):
3737
'shares_translation_memory': 'bool',
3838
'project_image': 'file',
3939
'remove_project_image': 'bool',
40-
'account_id': 'str'
40+
'account_id': 'str',
41+
'source_project_id': 'str'
4142
}
4243

4344
attribute_map = {
@@ -46,10 +47,11 @@ class ProjectCreateParameters(object):
4647
'shares_translation_memory': 'shares_translation_memory',
4748
'project_image': 'project_image',
4849
'remove_project_image': 'remove_project_image',
49-
'account_id': 'account_id'
50+
'account_id': 'account_id',
51+
'source_project_id': 'source_project_id'
5052
}
5153

52-
def __init__(self, name=None, main_format=None, shares_translation_memory=None, project_image=None, remove_project_image=None, account_id=None, local_vars_configuration=None): # noqa: E501
54+
def __init__(self, name=None, main_format=None, shares_translation_memory=None, project_image=None, remove_project_image=None, account_id=None, source_project_id=None, local_vars_configuration=None): # noqa: E501
5355
"""ProjectCreateParameters - a model defined in OpenAPI""" # noqa: E501
5456
if local_vars_configuration is None:
5557
local_vars_configuration = Configuration()
@@ -61,6 +63,7 @@ def __init__(self, name=None, main_format=None, shares_translation_memory=None,
6163
self._project_image = None
6264
self._remove_project_image = None
6365
self._account_id = None
66+
self._source_project_id = None
6467
self.discriminator = None
6568

6669
if name is not None:
@@ -75,6 +78,8 @@ def __init__(self, name=None, main_format=None, shares_translation_memory=None,
7578
self.remove_project_image = remove_project_image
7679
if account_id is not None:
7780
self.account_id = account_id
81+
if source_project_id is not None:
82+
self.source_project_id = source_project_id
7883

7984
@property
8085
def name(self):
@@ -214,6 +219,29 @@ def account_id(self, account_id):
214219

215220
self._account_id = account_id
216221

222+
@property
223+
def source_project_id(self):
224+
"""Gets the source_project_id of this ProjectCreateParameters. # noqa: E501
225+
226+
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. # noqa: E501
227+
228+
:return: The source_project_id of this ProjectCreateParameters. # noqa: E501
229+
:rtype: str
230+
"""
231+
return self._source_project_id
232+
233+
@source_project_id.setter
234+
def source_project_id(self, source_project_id):
235+
"""Sets the source_project_id of this ProjectCreateParameters.
236+
237+
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. # noqa: E501
238+
239+
:param source_project_id: The source_project_id of this ProjectCreateParameters. # noqa: E501
240+
:type: str
241+
"""
242+
243+
self._source_project_id = source_project_id
244+
217245
def to_dict(self):
218246
"""Returns the model properties as a dict"""
219247
result = {}

test/test_project_create_parameters.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ def make_instance(self, include_optional):
4040
shares_translation_memory = True,
4141
project_image = bytes(b'blah'),
4242
remove_project_image = True,
43-
account_id = 'abcd1234'
43+
account_id = 'abcd1234',
44+
source_project_id = 'abcd1234'
4445
)
4546
else :
4647
return ProjectCreateParameters(

0 commit comments

Comments
 (0)