Skip to content

Commit 2631227

Browse files
author
Phrase
committed
1 parent ac9da6e commit 2631227

14 files changed

+211
-9
lines changed

.openapi-generator/FILES

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ docs/ReleasesApi.md
200200
docs/RepoSync.md
201201
docs/RepoSyncEvent.md
202202
docs/RepoSyncEventsApi.md
203+
docs/RepoSyncExportParameters.md
203204
docs/RepoSyncImportParameters.md
204205
docs/RepoSyncsApi.md
205206
docs/ReportsApi.md
@@ -505,6 +506,7 @@ phrase_api/models/release_update_parameters.py
505506
phrase_api/models/release_update_parameters1.py
506507
phrase_api/models/repo_sync.py
507508
phrase_api/models/repo_sync_event.py
509+
phrase_api/models/repo_sync_export_parameters.py
508510
phrase_api/models/repo_sync_import_parameters.py
509511
phrase_api/models/screenshot.py
510512
phrase_api/models/screenshot_marker.py
@@ -775,6 +777,7 @@ test/test_releases_api.py
775777
test/test_repo_sync.py
776778
test/test_repo_sync_event.py
777779
test/test_repo_sync_events_api.py
780+
test/test_repo_sync_export_parameters.py
778781
test/test_repo_sync_import_parameters.py
779782
test/test_repo_syncs_api.py
780783
test/test_reports_api.py

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,7 @@ Class | Method | HTTP request | Description
591591
- [ReleaseUpdateParameters1](docs/ReleaseUpdateParameters1.md)
592592
- [RepoSync](docs/RepoSync.md)
593593
- [RepoSyncEvent](docs/RepoSyncEvent.md)
594+
- [RepoSyncExportParameters](docs/RepoSyncExportParameters.md)
594595
- [RepoSyncImportParameters](docs/RepoSyncImportParameters.md)
595596
- [Screenshot](docs/Screenshot.md)
596597
- [ScreenshotMarker](docs/ScreenshotMarker.md)

docs/RepoSyncExportParameters.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# RepoSyncExportParameters
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**pr_branch** | **str** | Source branch to open a pull request from | [optional]
7+
8+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
9+
10+

docs/RepoSyncsApi.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ Name | Type | Description | Notes
149149
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
150150

151151
# **repo_sync_export**
152-
> RepoSyncEvent repo_sync_export(account_id, id, x_phrase_app_otp=x_phrase_app_otp)
152+
> RepoSyncEvent repo_sync_export(account_id, id, x_phrase_app_otp=x_phrase_app_otp, repo_sync_export_parameters=repo_sync_export_parameters)
153153
154154
Export to code repository
155155

@@ -175,10 +175,11 @@ with phrase_api.ApiClient(configuration) as api_client:
175175
account_id = 'account_id_example' # str | Account ID (required)
176176
id = 'id_example' # str | ID (required)
177177
x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
178+
repo_sync_export_parameters = phrase_api.RepoSyncExportParameters() # RepoSyncExportParameters |
178179

179180
try:
180181
# Export to code repository
181-
api_response = api_instance.repo_sync_export(account_id, id, x_phrase_app_otp=x_phrase_app_otp)
182+
api_response = api_instance.repo_sync_export(account_id, id, x_phrase_app_otp=x_phrase_app_otp, repo_sync_export_parameters=repo_sync_export_parameters)
182183
pprint(api_response)
183184
except ApiException as e:
184185
print("Exception when calling RepoSyncsApi->repo_sync_export: %s\n" % e)
@@ -192,6 +193,7 @@ Name | Type | Description | Notes
192193
**account_id** | **str**| Account ID |
193194
**id** | **str**| ID |
194195
**x_phrase_app_otp** | **str**| Two-Factor-Authentication token (optional) | [optional]
196+
**repo_sync_export_parameters** | [**RepoSyncExportParameters**](RepoSyncExportParameters.md)| | [optional]
195197

196198
### Return type
197199

@@ -203,7 +205,7 @@ Name | Type | Description | Notes
203205

204206
### HTTP request headers
205207

206-
- **Content-Type**: Not defined
208+
- **Content-Type**: application/json
207209
- **Accept**: application/json
208210

209211
### HTTP response details

phrase_api/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@
239239
from phrase_api.models.release_update_parameters1 import ReleaseUpdateParameters1
240240
from phrase_api.models.repo_sync import RepoSync
241241
from phrase_api.models.repo_sync_event import RepoSyncEvent
242+
from phrase_api.models.repo_sync_export_parameters import RepoSyncExportParameters
242243
from phrase_api.models.repo_sync_import_parameters import RepoSyncImportParameters
243244
from phrase_api.models.screenshot import Screenshot
244245
from phrase_api.models.screenshot_marker import ScreenshotMarker

phrase_api/api/repo_syncs_api.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ def repo_sync_export(self, account_id, id, **kwargs): # noqa: E501
304304
:param str account_id: Account ID (required)
305305
:param str id: ID (required)
306306
:param str x_phrase_app_otp: Two-Factor-Authentication token (optional)
307+
:param RepoSyncExportParameters repo_sync_export_parameters:
307308
:param _preload_content: if False, the urllib3.HTTPResponse object will
308309
be returned without reading/decoding response
309310
data. Default is True.
@@ -331,6 +332,7 @@ def repo_sync_export_with_http_info(self, account_id, id, **kwargs): # noqa: E5
331332
:param str account_id: Account ID (required)
332333
:param str id: ID (required)
333334
:param str x_phrase_app_otp: Two-Factor-Authentication token (optional)
335+
:param RepoSyncExportParameters repo_sync_export_parameters:
334336
:param _return_http_data_only: response data without head status code
335337
and headers
336338
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -350,7 +352,8 @@ def repo_sync_export_with_http_info(self, account_id, id, **kwargs): # noqa: E5
350352
all_params = [
351353
'account_id',
352354
'id',
353-
'x_phrase_app_otp'
355+
'x_phrase_app_otp',
356+
'repo_sync_export_parameters'
354357
]
355358
all_params.extend(
356359
[
@@ -396,10 +399,16 @@ def repo_sync_export_with_http_info(self, account_id, id, **kwargs): # noqa: E5
396399
local_var_files = {}
397400

398401
body_params = None
402+
if 'repo_sync_export_parameters' in local_var_params:
403+
body_params = local_var_params['repo_sync_export_parameters']
399404
# HTTP header `Accept`
400405
header_params['Accept'] = self.api_client.select_header_accept(
401406
['application/json']) # noqa: E501
402407

408+
# HTTP header `Content-Type`
409+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
410+
['application/json']) # noqa: E501
411+
403412
# Authentication setting
404413
auth_settings = ['Basic', 'Token'] # noqa: E501
405414

phrase_api/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@
169169
from phrase_api.models.release_update_parameters1 import ReleaseUpdateParameters1
170170
from phrase_api.models.repo_sync import RepoSync
171171
from phrase_api.models.repo_sync_event import RepoSyncEvent
172+
from phrase_api.models.repo_sync_export_parameters import RepoSyncExportParameters
172173
from phrase_api.models.repo_sync_import_parameters import RepoSyncImportParameters
173174
from phrase_api.models.screenshot import Screenshot
174175
from phrase_api.models.screenshot_marker import ScreenshotMarker
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# coding: utf-8
2+
3+
"""
4+
Phrase Strings API Reference
5+
6+
The version of the OpenAPI document: 2.0.0
7+
Contact: support@phrase.com
8+
Generated by: https://openapi-generator.tech
9+
"""
10+
11+
12+
import pprint
13+
import re # noqa: F401
14+
15+
import six
16+
17+
from phrase_api.configuration import Configuration
18+
19+
20+
class RepoSyncExportParameters(object):
21+
"""NOTE: This class is auto generated by OpenAPI Generator.
22+
Ref: https://openapi-generator.tech
23+
24+
Do not edit the class manually.
25+
"""
26+
27+
"""
28+
Attributes:
29+
openapi_types (dict): The key is attribute name
30+
and the value is attribute type.
31+
attribute_map (dict): The key is attribute name
32+
and the value is json key in definition.
33+
"""
34+
openapi_types = {
35+
'pr_branch': 'str'
36+
}
37+
38+
attribute_map = {
39+
'pr_branch': 'pr_branch'
40+
}
41+
42+
def __init__(self, pr_branch=None, local_vars_configuration=None): # noqa: E501
43+
"""RepoSyncExportParameters - a model defined in OpenAPI""" # noqa: E501
44+
if local_vars_configuration is None:
45+
local_vars_configuration = Configuration()
46+
self.local_vars_configuration = local_vars_configuration
47+
48+
self._pr_branch = None
49+
self.discriminator = None
50+
51+
if pr_branch is not None:
52+
self.pr_branch = pr_branch
53+
54+
@property
55+
def pr_branch(self):
56+
"""Gets the pr_branch of this RepoSyncExportParameters. # noqa: E501
57+
58+
Source branch to open a pull request from # noqa: E501
59+
60+
:return: The pr_branch of this RepoSyncExportParameters. # noqa: E501
61+
:rtype: str
62+
"""
63+
return self._pr_branch
64+
65+
@pr_branch.setter
66+
def pr_branch(self, pr_branch):
67+
"""Sets the pr_branch of this RepoSyncExportParameters.
68+
69+
Source branch to open a pull request from # noqa: E501
70+
71+
:param pr_branch: The pr_branch of this RepoSyncExportParameters. # noqa: E501
72+
:type: str
73+
"""
74+
75+
self._pr_branch = pr_branch
76+
77+
def to_dict(self):
78+
"""Returns the model properties as a dict"""
79+
result = {}
80+
81+
for attr, _ in six.iteritems(self.openapi_types):
82+
value = getattr(self, attr)
83+
if isinstance(value, list):
84+
result[attr] = list(map(
85+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
86+
value
87+
))
88+
elif hasattr(value, "to_dict"):
89+
result[attr] = value.to_dict()
90+
elif isinstance(value, dict):
91+
result[attr] = dict(map(
92+
lambda item: (item[0], item[1].to_dict())
93+
if hasattr(item[1], "to_dict") else item,
94+
value.items()
95+
))
96+
else:
97+
result[attr] = value
98+
99+
return result
100+
101+
def to_str(self):
102+
"""Returns the string representation of the model"""
103+
return pprint.pformat(self.to_dict())
104+
105+
def __repr__(self):
106+
"""For `print` and `pprint`"""
107+
return self.to_str()
108+
109+
def __eq__(self, other):
110+
"""Returns true if both objects are equal"""
111+
if not isinstance(other, RepoSyncExportParameters):
112+
return False
113+
114+
return self.to_dict() == other.to_dict()
115+
116+
def __ne__(self, other):
117+
"""Returns true if both objects are not equal"""
118+
if not isinstance(other, RepoSyncExportParameters):
119+
return True
120+
121+
return self.to_dict() != other.to_dict()

test/test_key_create_parameters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def make_instance(self, include_optional):
4646
data_type = 'number',
4747
tags = 'awesome-feature,needs-proofreading',
4848
max_characters_allowed = 140,
49-
screenshot = '[B@3d705231',
49+
screenshot = '[B@69c071db',
5050
remove_screenshot = True,
5151
unformatted = True,
5252
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
@@ -46,7 +46,7 @@ def make_instance(self, include_optional):
4646
data_type = 'number',
4747
tags = 'awesome-feature,needs-proofreading',
4848
max_characters_allowed = 140,
49-
screenshot = '[B@4ffa1019',
49+
screenshot = '[B@7740d2c',
5050
remove_screenshot = True,
5151
unformatted = True,
5252
xml_space_preserve = True,

0 commit comments

Comments
 (0)