Skip to content

Commit b58a2a6

Browse files
committed
Merge branch 'release/2021-05'
2 parents f9e0c69 + e01ac1f commit b58a2a6

12 files changed

+221
-6
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ REST/HTTP binding (PSM) for the SysML v2 standard API.
44
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
55

66
- API version: 1.0.0
7-
- Package version: 2021-04
7+
- Package version: 2021-05
88
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
99

1010
## Requirements.
@@ -120,6 +120,7 @@ Class | Method | HTTP request | Description
120120
- [Identified](docs/Identified.md)
121121
- [PrimitiveConstraint](docs/PrimitiveConstraint.md)
122122
- [Project](docs/Project.md)
123+
- [ProjectDefaultBranch](docs/ProjectDefaultBranch.md)
123124
- [Query](docs/Query.md)
124125
- [Relationship](docs/Relationship.md)
125126

docs/Project.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**type** | **str** | | [optional]
7+
**default_branch** | [**ProjectDefaultBranch**](ProjectDefaultBranch.md) | | [optional]
78
**description** | **str** | | [optional]
89
**id** | **str** | | [optional]
910
**name** | **str** | | [optional]

docs/ProjectDefaultBranch.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# ProjectDefaultBranch
2+
3+
Branch
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**id** | **str** | | [optional]
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from setuptools import setup, find_packages # noqa: H301
1414

1515
NAME = "sysml-v2-api-client"
16-
VERSION = "2021-04"
16+
VERSION = "2021-05"
1717
# To install the library, run the following
1818
#
1919
# python setup.py install

sysml_v2_api_client/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from __future__ import absolute_import
1616

17-
__version__ = "2021-04"
17+
__version__ = "2021-05"
1818

1919
# import apis into sdk package
2020
from sysml_v2_api_client.api.branch_api import BranchApi
@@ -46,6 +46,7 @@
4646
from sysml_v2_api_client.models.identified import Identified
4747
from sysml_v2_api_client.models.primitive_constraint import PrimitiveConstraint
4848
from sysml_v2_api_client.models.project import Project
49+
from sysml_v2_api_client.models.project_default_branch import ProjectDefaultBranch
4950
from sysml_v2_api_client.models.query import Query
5051
from sysml_v2_api_client.models.relationship import Relationship
5152

sysml_v2_api_client/api_client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
7878
self.default_headers[header_name] = header_value
7979
self.cookie = cookie
8080
# Set default User-Agent.
81-
self.user_agent = 'OpenAPI-Generator/2021-04/python'
81+
self.user_agent = 'OpenAPI-Generator/2021-05/python'
8282
self.client_side_validation = configuration.client_side_validation
8383

8484
def __enter__(self):

sysml_v2_api_client/configuration.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ def to_debug_report(self):
325325
"OS: {env}\n"\
326326
"Python Version: {pyversion}\n"\
327327
"Version of the API: 1.0.0\n"\
328-
"SDK Package Version: 2021-04".\
328+
"SDK Package Version: 2021-05".\
329329
format(env=sys.platform, pyversion=sys.version)
330330

331331
def get_host_settings(self):

sysml_v2_api_client/models/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@
2727
from sysml_v2_api_client.models.identified import Identified
2828
from sysml_v2_api_client.models.primitive_constraint import PrimitiveConstraint
2929
from sysml_v2_api_client.models.project import Project
30+
from sysml_v2_api_client.models.project_default_branch import ProjectDefaultBranch
3031
from sysml_v2_api_client.models.query import Query
3132
from sysml_v2_api_client.models.relationship import Relationship

sysml_v2_api_client/models/project.py

+27-1
Original file line numberDiff line numberDiff line change
@@ -34,32 +34,37 @@ class Project(object):
3434
"""
3535
openapi_types = {
3636
'type': 'str',
37+
'default_branch': 'ProjectDefaultBranch',
3738
'description': 'str',
3839
'id': 'str',
3940
'name': 'str'
4041
}
4142

4243
attribute_map = {
4344
'type': '@type',
45+
'default_branch': 'defaultBranch',
4446
'description': 'description',
4547
'id': 'id',
4648
'name': 'name'
4749
}
4850

49-
def __init__(self, type=None, description=None, id=None, name=None, local_vars_configuration=None): # noqa: E501
51+
def __init__(self, type=None, default_branch=None, description=None, id=None, name=None, local_vars_configuration=None): # noqa: E501
5052
"""Project - a model defined in OpenAPI""" # noqa: E501
5153
if local_vars_configuration is None:
5254
local_vars_configuration = Configuration()
5355
self.local_vars_configuration = local_vars_configuration
5456

5557
self._type = None
58+
self._default_branch = None
5659
self._description = None
5760
self._id = None
5861
self._name = None
5962
self.discriminator = None
6063

6164
if type is not None:
6265
self.type = type
66+
if default_branch is not None:
67+
self.default_branch = default_branch
6368
if description is not None:
6469
self.description = description
6570
if id is not None:
@@ -94,6 +99,27 @@ def type(self, type):
9499

95100
self._type = type
96101

102+
@property
103+
def default_branch(self):
104+
"""Gets the default_branch of this Project. # noqa: E501
105+
106+
107+
:return: The default_branch of this Project. # noqa: E501
108+
:rtype: ProjectDefaultBranch
109+
"""
110+
return self._default_branch
111+
112+
@default_branch.setter
113+
def default_branch(self, default_branch):
114+
"""Sets the default_branch of this Project.
115+
116+
117+
:param default_branch: The default_branch of this Project. # noqa: E501
118+
:type: ProjectDefaultBranch
119+
"""
120+
121+
self._default_branch = default_branch
122+
97123
@property
98124
def description(self):
99125
"""Gets the description of this Project. # noqa: E501
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# coding: utf-8
2+
3+
"""
4+
SysML v2 API and Services
5+
6+
REST/HTTP binding (PSM) for the SysML v2 standard API. # noqa: E501
7+
8+
The version of the OpenAPI document: 1.0.0
9+
Generated by: https://openapi-generator.tech
10+
"""
11+
12+
13+
import pprint
14+
import re # noqa: F401
15+
16+
import six
17+
18+
from sysml_v2_api_client.configuration import Configuration
19+
20+
21+
class ProjectDefaultBranch(object):
22+
"""NOTE: This class is auto generated by OpenAPI Generator.
23+
Ref: https://openapi-generator.tech
24+
25+
Do not edit the class manually.
26+
"""
27+
28+
"""
29+
Attributes:
30+
openapi_types (dict): The key is attribute name
31+
and the value is attribute type.
32+
attribute_map (dict): The key is attribute name
33+
and the value is json key in definition.
34+
"""
35+
openapi_types = {
36+
'id': 'str'
37+
}
38+
39+
attribute_map = {
40+
'id': 'id'
41+
}
42+
43+
def __init__(self, id=None, local_vars_configuration=None): # noqa: E501
44+
"""ProjectDefaultBranch - a model defined in OpenAPI""" # noqa: E501
45+
if local_vars_configuration is None:
46+
local_vars_configuration = Configuration()
47+
self.local_vars_configuration = local_vars_configuration
48+
49+
self._id = None
50+
self.discriminator = None
51+
52+
if id is not None:
53+
self.id = id
54+
55+
@property
56+
def id(self):
57+
"""Gets the id of this ProjectDefaultBranch. # noqa: E501
58+
59+
60+
:return: The id of this ProjectDefaultBranch. # noqa: E501
61+
:rtype: str
62+
"""
63+
return self._id
64+
65+
@id.setter
66+
def id(self, id):
67+
"""Sets the id of this ProjectDefaultBranch.
68+
69+
70+
:param id: The id of this ProjectDefaultBranch. # noqa: E501
71+
:type: str
72+
"""
73+
74+
self._id = id
75+
76+
def to_dict(self):
77+
"""Returns the model properties as a dict"""
78+
result = {}
79+
80+
for attr, _ in six.iteritems(self.openapi_types):
81+
value = getattr(self, attr)
82+
if isinstance(value, list):
83+
result[attr] = list(map(
84+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
85+
value
86+
))
87+
elif hasattr(value, "to_dict"):
88+
result[attr] = value.to_dict()
89+
elif isinstance(value, dict):
90+
result[attr] = dict(map(
91+
lambda item: (item[0], item[1].to_dict())
92+
if hasattr(item[1], "to_dict") else item,
93+
value.items()
94+
))
95+
else:
96+
result[attr] = value
97+
98+
return result
99+
100+
def to_str(self):
101+
"""Returns the string representation of the model"""
102+
return pprint.pformat(self.to_dict())
103+
104+
def __repr__(self):
105+
"""For `print` and `pprint`"""
106+
return self.to_str()
107+
108+
def __eq__(self, other):
109+
"""Returns true if both objects are equal"""
110+
if not isinstance(other, ProjectDefaultBranch):
111+
return False
112+
113+
return self.to_dict() == other.to_dict()
114+
115+
def __ne__(self, other):
116+
"""Returns true if both objects are not equal"""
117+
if not isinstance(other, ProjectDefaultBranch):
118+
return True
119+
120+
return self.to_dict() != other.to_dict()

test/test_project.py

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ def make_instance(self, include_optional):
3737
if include_optional :
3838
return Project(
3939
type = 'Project',
40+
default_branch = sysml_v2_api_client.models.project_default_branch.Project_defaultBranch(
41+
id = '0', ),
4042
description = '0',
4143
id = '0',
4244
name = '0'

test/test_project_default_branch.py

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# coding: utf-8
2+
3+
"""
4+
SysML v2 API and Services
5+
6+
REST/HTTP binding (PSM) for the SysML v2 standard API. # noqa: E501
7+
8+
The version of the OpenAPI document: 1.0.0
9+
Generated by: https://openapi-generator.tech
10+
"""
11+
12+
13+
from __future__ import absolute_import
14+
15+
import unittest
16+
import datetime
17+
18+
import sysml_v2_api_client
19+
from sysml_v2_api_client.models.project_default_branch import ProjectDefaultBranch # noqa: E501
20+
from sysml_v2_api_client.rest import ApiException
21+
22+
class TestProjectDefaultBranch(unittest.TestCase):
23+
"""ProjectDefaultBranch unit test stubs"""
24+
25+
def setUp(self):
26+
pass
27+
28+
def tearDown(self):
29+
pass
30+
31+
def make_instance(self, include_optional):
32+
"""Test ProjectDefaultBranch
33+
include_option is a boolean, when False only required
34+
params are included, when True both required and
35+
optional params are included """
36+
# model = sysml_v2_api_client.models.project_default_branch.ProjectDefaultBranch() # noqa: E501
37+
if include_optional :
38+
return ProjectDefaultBranch(
39+
id = '0'
40+
)
41+
else :
42+
return ProjectDefaultBranch(
43+
)
44+
45+
def testProjectDefaultBranch(self):
46+
"""Test ProjectDefaultBranch"""
47+
inst_req_only = self.make_instance(include_optional=False)
48+
inst_req_and_optional = self.make_instance(include_optional=True)
49+
50+
51+
if __name__ == '__main__':
52+
unittest.main()

0 commit comments

Comments
 (0)