Skip to content

Commit e0569ed

Browse files
author
Phrase
committed
1 parent ff65a81 commit e0569ed

6 files changed

Lines changed: 64 additions & 36 deletions

File tree

docs/Translation.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
1414
**state** | **str** | | [optional]
1515
**created_at** | **datetime** | | [optional]
1616
**updated_at** | **datetime** | | [optional]
17+
**linked_translation** | [**TranslationParent**](TranslationParent.md) | | [optional]
1718

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

docs/TranslationDetails.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ Name | Type | Description | Notes
1414
**state** | **str** | | [optional]
1515
**created_at** | **datetime** | | [optional]
1616
**updated_at** | **datetime** | | [optional]
17+
**linked_translation** | [**TranslationParent**](TranslationParent.md) | | [optional]
1718
**user** | [**UserPreview**](UserPreview.md) | | [optional]
1819
**word_count** | **int** | | [optional]
19-
**linked_translation** | [**TranslationParent**](TranslationParent.md) | | [optional]
2020

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

phrase_api/models/translation.py

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ class Translation(object):
4242
'placeholders': 'List[str]',
4343
'state': 'str',
4444
'created_at': 'datetime',
45-
'updated_at': 'datetime'
45+
'updated_at': 'datetime',
46+
'linked_translation': 'TranslationParent'
4647
}
4748

4849
attribute_map = {
@@ -56,10 +57,11 @@ class Translation(object):
5657
'placeholders': 'placeholders',
5758
'state': 'state',
5859
'created_at': 'created_at',
59-
'updated_at': 'updated_at'
60+
'updated_at': 'updated_at',
61+
'linked_translation': 'linked_translation'
6062
}
6163

62-
def __init__(self, id=None, content=None, unverified=None, excluded=None, plural_suffix=None, key=None, locale=None, placeholders=None, state=None, created_at=None, updated_at=None, local_vars_configuration=None): # noqa: E501
64+
def __init__(self, id=None, content=None, unverified=None, excluded=None, plural_suffix=None, key=None, locale=None, placeholders=None, state=None, created_at=None, updated_at=None, linked_translation=None, local_vars_configuration=None): # noqa: E501
6365
"""Translation - a model defined in OpenAPI""" # noqa: E501
6466
if local_vars_configuration is None:
6567
local_vars_configuration = Configuration()
@@ -76,6 +78,7 @@ def __init__(self, id=None, content=None, unverified=None, excluded=None, plural
7678
self._state = None
7779
self._created_at = None
7880
self._updated_at = None
81+
self._linked_translation = None
7982
self.discriminator = None
8083

8184
if id is not None:
@@ -100,6 +103,8 @@ def __init__(self, id=None, content=None, unverified=None, excluded=None, plural
100103
self.created_at = created_at
101104
if updated_at is not None:
102105
self.updated_at = updated_at
106+
if linked_translation is not None:
107+
self.linked_translation = linked_translation
103108

104109
@property
105110
def id(self):
@@ -332,6 +337,27 @@ def updated_at(self, updated_at):
332337

333338
self._updated_at = updated_at
334339

340+
@property
341+
def linked_translation(self):
342+
"""Gets the linked_translation of this Translation. # noqa: E501
343+
344+
345+
:return: The linked_translation of this Translation. # noqa: E501
346+
:rtype: TranslationParent
347+
"""
348+
return self._linked_translation
349+
350+
@linked_translation.setter
351+
def linked_translation(self, linked_translation):
352+
"""Sets the linked_translation of this Translation.
353+
354+
355+
:param linked_translation: The linked_translation of this Translation. # noqa: E501
356+
:type: TranslationParent
357+
"""
358+
359+
self._linked_translation = linked_translation
360+
335361
def to_dict(self):
336362
"""Returns the model properties as a dict"""
337363
result = {}

phrase_api/models/translation_details.py

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ class TranslationDetails(object):
4343
'state': 'str',
4444
'created_at': 'datetime',
4545
'updated_at': 'datetime',
46+
'linked_translation': 'TranslationParent',
4647
'user': 'UserPreview',
47-
'word_count': 'int',
48-
'linked_translation': 'TranslationParent'
48+
'word_count': 'int'
4949
}
5050

5151
attribute_map = {
@@ -60,12 +60,12 @@ class TranslationDetails(object):
6060
'state': 'state',
6161
'created_at': 'created_at',
6262
'updated_at': 'updated_at',
63+
'linked_translation': 'linked_translation',
6364
'user': 'user',
64-
'word_count': 'word_count',
65-
'linked_translation': 'linked_translation'
65+
'word_count': 'word_count'
6666
}
6767

68-
def __init__(self, id=None, content=None, unverified=None, excluded=None, plural_suffix=None, key=None, locale=None, placeholders=None, state=None, created_at=None, updated_at=None, user=None, word_count=None, linked_translation=None, local_vars_configuration=None): # noqa: E501
68+
def __init__(self, id=None, content=None, unverified=None, excluded=None, plural_suffix=None, key=None, locale=None, placeholders=None, state=None, created_at=None, updated_at=None, linked_translation=None, user=None, word_count=None, local_vars_configuration=None): # noqa: E501
6969
"""TranslationDetails - a model defined in OpenAPI""" # noqa: E501
7070
if local_vars_configuration is None:
7171
local_vars_configuration = Configuration()
@@ -82,9 +82,9 @@ def __init__(self, id=None, content=None, unverified=None, excluded=None, plural
8282
self._state = None
8383
self._created_at = None
8484
self._updated_at = None
85+
self._linked_translation = None
8586
self._user = None
8687
self._word_count = None
87-
self._linked_translation = None
8888
self.discriminator = None
8989

9090
if id is not None:
@@ -109,12 +109,12 @@ def __init__(self, id=None, content=None, unverified=None, excluded=None, plural
109109
self.created_at = created_at
110110
if updated_at is not None:
111111
self.updated_at = updated_at
112+
if linked_translation is not None:
113+
self.linked_translation = linked_translation
112114
if user is not None:
113115
self.user = user
114116
if word_count is not None:
115117
self.word_count = word_count
116-
if linked_translation is not None:
117-
self.linked_translation = linked_translation
118118

119119
@property
120120
def id(self):
@@ -347,6 +347,27 @@ def updated_at(self, updated_at):
347347

348348
self._updated_at = updated_at
349349

350+
@property
351+
def linked_translation(self):
352+
"""Gets the linked_translation of this TranslationDetails. # noqa: E501
353+
354+
355+
:return: The linked_translation of this TranslationDetails. # noqa: E501
356+
:rtype: TranslationParent
357+
"""
358+
return self._linked_translation
359+
360+
@linked_translation.setter
361+
def linked_translation(self, linked_translation):
362+
"""Sets the linked_translation of this TranslationDetails.
363+
364+
365+
:param linked_translation: The linked_translation of this TranslationDetails. # noqa: E501
366+
:type: TranslationParent
367+
"""
368+
369+
self._linked_translation = linked_translation
370+
350371
@property
351372
def user(self):
352373
"""Gets the user of this TranslationDetails. # noqa: E501
@@ -389,27 +410,6 @@ def word_count(self, word_count):
389410

390411
self._word_count = word_count
391412

392-
@property
393-
def linked_translation(self):
394-
"""Gets the linked_translation of this TranslationDetails. # noqa: E501
395-
396-
397-
:return: The linked_translation of this TranslationDetails. # noqa: E501
398-
:rtype: TranslationParent
399-
"""
400-
return self._linked_translation
401-
402-
@linked_translation.setter
403-
def linked_translation(self, linked_translation):
404-
"""Sets the linked_translation of this TranslationDetails.
405-
406-
407-
:param linked_translation: The linked_translation of this TranslationDetails. # noqa: E501
408-
:type: TranslationParent
409-
"""
410-
411-
self._linked_translation = linked_translation
412-
413413
def to_dict(self):
414414
"""Returns the model properties as a dict"""
415415
result = {}

test/test_translation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ def make_instance(self, include_optional):
5353
],
5454
state = '',
5555
created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
56-
updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f')
56+
updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
57+
linked_translation = {"id":"abcd1234cdef1234abcd1234cdef1234","content":"My parent translation"}
5758
)
5859
else :
5960
return Translation(

test/test_translation_details.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ def make_instance(self, include_optional):
5454
state = '',
5555
created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
5656
updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
57+
linked_translation = {"id":"abcd1234cdef1234abcd1234cdef1234","content":"My parent translation"},
5758
user = phrase_api.models.user_preview.user_preview(
5859
id = '',
5960
username = '',
6061
name = '',
6162
gravatar_uid = '', ),
62-
word_count = 56,
63-
linked_translation = {"id":"abcd1234cdef1234abcd1234cdef1234","content":"My parent translation"}
63+
word_count = 56
6464
)
6565
else :
6666
return TranslationDetails(

0 commit comments

Comments
 (0)