├── test ├── __init__.py ├── test_relationship_api.py ├── test_commit_api.py ├── test_error.py ├── test_element_api.py ├── test_data.py ├── test_identified.py ├── test_branch_head.py ├── test_element.py ├── test_tag_api.py ├── test_constraint.py ├── test_data_identity.py ├── test_branch_api.py ├── test_branch_owning_project.py ├── test_project_default_branch.py ├── test_project_api.py ├── test_project.py ├── test_primitive_constraint.py ├── test_composite_constraint.py ├── test_data_version.py ├── test_relationship.py ├── test_tag.py ├── test_branch.py ├── test_query.py ├── test_commit.py └── test_query_api.py ├── .openapi-generator └── VERSION ├── setup.cfg ├── test-requirements.txt ├── requirements.txt ├── tox.ini ├── docs ├── Constraint.md ├── Error.md ├── Identified.md ├── BranchHead.md ├── Data.md ├── BranchOwningProject.md ├── ProjectDefaultBranch.md ├── DataIdentity.md ├── Element.md ├── CompositeConstraint.md ├── DataVersion.md ├── PrimitiveConstraint.md ├── Project.md ├── Relationship.md ├── Commit.md ├── Query.md ├── Branch.md ├── Tag.md ├── RelationshipApi.md ├── CommitApi.md └── ElementApi.md ├── .travis.yml ├── sysml_v2_api_client ├── api │ ├── __init__.py │ └── relationship_api.py ├── models │ ├── __init__.py │ ├── identified.py │ ├── branch_head.py │ ├── error.py │ ├── branch_owning_project.py │ ├── project_default_branch.py │ ├── constraint.py │ ├── data_identity.py │ ├── data.py │ ├── element.py │ ├── composite_constraint.py │ ├── data_version.py │ ├── relationship.py │ ├── project.py │ ├── commit.py │ ├── primitive_constraint.py │ ├── query.py │ ├── branch.py │ └── tag.py ├── __init__.py └── exceptions.py ├── .gitlab-ci.yml ├── .gitignore ├── .openapi-generator-ignore ├── setup.py ├── git_push.sh ├── README.md └── LICENSE /test/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | 4.3.1 -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [flake8] 2 | max-line-length=99 3 | -------------------------------------------------------------------------------- /test-requirements.txt: -------------------------------------------------------------------------------- 1 | pytest~=4.6.7 # needed for python 2.7+3.4 2 | pytest-cov>=2.8.1 3 | pytest-randomly==1.2.3 # needed for python 2.7+3.4 4 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | certifi >= 14.05.14 2 | future; python_version<="2.7" 3 | six >= 1.10 4 | python_dateutil >= 2.5.3 5 | setuptools >= 21.0.0 6 | urllib3 >= 1.15.1 7 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | envlist = py27, py3 3 | 4 | [testenv] 5 | deps=-r{toxinidir}/requirements.txt 6 | -r{toxinidir}/test-requirements.txt 7 | 8 | commands= 9 | pytest --cov=sysml_v2_api_client 10 | -------------------------------------------------------------------------------- /docs/Constraint.md: -------------------------------------------------------------------------------- 1 | # Constraint 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **type** | **str** | | 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 | 11 | -------------------------------------------------------------------------------- /docs/Error.md: -------------------------------------------------------------------------------- 1 | # Error 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **error** | **str** | | [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 | 11 | -------------------------------------------------------------------------------- /docs/Identified.md: -------------------------------------------------------------------------------- 1 | # Identified 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **str** | | [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 | 11 | -------------------------------------------------------------------------------- /docs/BranchHead.md: -------------------------------------------------------------------------------- 1 | # BranchHead 2 | 3 | Commit 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 | 12 | -------------------------------------------------------------------------------- /docs/Data.md: -------------------------------------------------------------------------------- 1 | # Data 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **str** | | [optional] 7 | **type** | **str** | | 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 | 12 | -------------------------------------------------------------------------------- /docs/BranchOwningProject.md: -------------------------------------------------------------------------------- 1 | # BranchOwningProject 2 | 3 | Project 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 | 12 | -------------------------------------------------------------------------------- /docs/ProjectDefaultBranch.md: -------------------------------------------------------------------------------- 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 | 12 | -------------------------------------------------------------------------------- /docs/DataIdentity.md: -------------------------------------------------------------------------------- 1 | # DataIdentity 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **str** | | [optional] 7 | **type** | **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 | 12 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # ref: https://docs.travis-ci.com/user/languages/python 2 | language: python 3 | python: 4 | - "2.7" 5 | - "3.2" 6 | - "3.3" 7 | - "3.4" 8 | - "3.5" 9 | - "3.6" 10 | - "3.7" 11 | - "3.8" 12 | # command to install dependencies 13 | install: 14 | - "pip install -r requirements.txt" 15 | - "pip install -r test-requirements.txt" 16 | # command to run tests 17 | script: pytest --cov=sysml_v2_api_client 18 | -------------------------------------------------------------------------------- /docs/Element.md: -------------------------------------------------------------------------------- 1 | # Element 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **str** | | [optional] 7 | **type** | **str** | | [optional] 8 | **identifier** | **str** | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/CompositeConstraint.md: -------------------------------------------------------------------------------- 1 | # CompositeConstraint 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **type** | **str** | | [optional] 7 | **constraint** | [**list[Constraint]**](Constraint.md) | | [optional] 8 | **operator** | **str** | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/DataVersion.md: -------------------------------------------------------------------------------- 1 | # DataVersion 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **str** | | [optional] 7 | **type** | **str** | | [optional] 8 | **payload** | [**Data**](Data.md) | | [optional] 9 | **identity** | [**DataIdentity**](DataIdentity.md) | | [optional] 10 | 11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 12 | 13 | 14 | -------------------------------------------------------------------------------- /docs/PrimitiveConstraint.md: -------------------------------------------------------------------------------- 1 | # PrimitiveConstraint 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **type** | **str** | | [optional] 7 | **inverse** | **bool** | | [optional] 8 | **_property** | **str** | | [optional] 9 | **value** | **str** | | [optional] 10 | **operator** | **str** | | [optional] 11 | 12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 13 | 14 | 15 | -------------------------------------------------------------------------------- /sysml_v2_api_client/api/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | # flake8: noqa 4 | 5 | # import apis into api package 6 | from sysml_v2_api_client.api.branch_api import BranchApi 7 | from sysml_v2_api_client.api.commit_api import CommitApi 8 | from sysml_v2_api_client.api.element_api import ElementApi 9 | from sysml_v2_api_client.api.project_api import ProjectApi 10 | from sysml_v2_api_client.api.query_api import QueryApi 11 | from sysml_v2_api_client.api.relationship_api import RelationshipApi 12 | from sysml_v2_api_client.api.tag_api import TagApi 13 | -------------------------------------------------------------------------------- /docs/Project.md: -------------------------------------------------------------------------------- 1 | # Project 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **str** | | [optional] 7 | **type** | **str** | | [optional] 8 | **default_branch** | [**ProjectDefaultBranch**](ProjectDefaultBranch.md) | | [optional] 9 | **description** | **str** | | [optional] 10 | **name** | **str** | | [optional] 11 | 12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/Relationship.md: -------------------------------------------------------------------------------- 1 | # Relationship 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **str** | | [optional] 7 | **type** | **str** | | [optional] 8 | **identifier** | **str** | | [optional] 9 | **source** | [**list[Identified]**](Identified.md) | | [optional] 10 | **target** | [**list[Identified]**](Identified.md) | | [optional] 11 | 12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/Commit.md: -------------------------------------------------------------------------------- 1 | # Commit 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **str** | | [optional] 7 | **type** | **str** | | [optional] 8 | **change** | [**list[DataVersion]**](DataVersion.md) | | [optional] 9 | **owning_project** | [**BranchOwningProject**](BranchOwningProject.md) | | [optional] 10 | **previous_commit** | [**BranchHead**](BranchHead.md) | | [optional] 11 | 12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/Query.md: -------------------------------------------------------------------------------- 1 | # Query 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **str** | | [optional] 7 | **type** | **str** | | [optional] 8 | **owning_project** | [**BranchOwningProject**](BranchOwningProject.md) | | [optional] 9 | **scope** | [**list[DataIdentity]**](DataIdentity.md) | | [optional] 10 | **select** | **list[str]** | | [optional] 11 | **where** | [**Constraint**](Constraint.md) | | [optional] 12 | 13 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/Branch.md: -------------------------------------------------------------------------------- 1 | # Branch 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **str** | | [optional] 7 | **type** | **str** | | [optional] 8 | **head** | [**BranchHead**](BranchHead.md) | | [optional] 9 | **name** | **str** | | [optional] 10 | **owning_project** | [**BranchOwningProject**](BranchOwningProject.md) | | [optional] 11 | **referenced_commit** | [**BranchHead**](BranchHead.md) | | [optional] 12 | **timestamp** | **datetime** | | [optional] 13 | 14 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 15 | 16 | 17 | -------------------------------------------------------------------------------- /docs/Tag.md: -------------------------------------------------------------------------------- 1 | # Tag 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **str** | | [optional] 7 | **type** | **str** | | [optional] 8 | **name** | **str** | | [optional] 9 | **owning_project** | [**BranchOwningProject**](BranchOwningProject.md) | | [optional] 10 | **referenced_commit** | [**BranchHead**](BranchHead.md) | | [optional] 11 | **tagged_commit** | [**BranchHead**](BranchHead.md) | | [optional] 12 | **timestamp** | **datetime** | | [optional] 13 | 14 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 15 | 16 | 17 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | # ref: https://docs.gitlab.com/ee/ci/README.html 2 | 3 | stages: 4 | - test 5 | 6 | .nosetest: 7 | stage: test 8 | script: 9 | - pip install -r requirements.txt 10 | - pip install -r test-requirements.txt 11 | - pytest --cov=sysml_v2_api_client 12 | 13 | nosetest-2.7: 14 | extends: .nosetest 15 | image: python:2.7-alpine 16 | nosetest-3.3: 17 | extends: .nosetest 18 | image: python:3.3-alpine 19 | nosetest-3.4: 20 | extends: .nosetest 21 | image: python:3.4-alpine 22 | nosetest-3.5: 23 | extends: .nosetest 24 | image: python:3.5-alpine 25 | nosetest-3.6: 26 | extends: .nosetest 27 | image: python:3.6-alpine 28 | nosetest-3.7: 29 | extends: .nosetest 30 | image: python:3.7-alpine 31 | nosetest-3.8: 32 | extends: .nosetest 33 | image: python:3.8-alpine 34 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | env/ 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | 27 | # PyInstaller 28 | # Usually these files are written by a python script from a template 29 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 30 | *.manifest 31 | *.spec 32 | 33 | # Installer logs 34 | pip-log.txt 35 | pip-delete-this-directory.txt 36 | 37 | # Unit test / coverage reports 38 | htmlcov/ 39 | .tox/ 40 | .coverage 41 | .coverage.* 42 | .cache 43 | nosetests.xml 44 | coverage.xml 45 | *,cover 46 | .hypothesis/ 47 | venv/ 48 | .venv/ 49 | .python-version 50 | .pytest_cache 51 | 52 | # Translations 53 | *.mo 54 | *.pot 55 | 56 | # Django stuff: 57 | *.log 58 | 59 | # Sphinx documentation 60 | docs/_build/ 61 | 62 | # PyBuilder 63 | target/ 64 | 65 | #Ipython Notebook 66 | .ipynb_checkpoints 67 | -------------------------------------------------------------------------------- /.openapi-generator-ignore: -------------------------------------------------------------------------------- 1 | # OpenAPI Generator Ignore 2 | # Generated by openapi-generator https://github.com/openapitools/openapi-generator 3 | 4 | # Use this file to prevent files from being overwritten by the generator. 5 | # The patterns follow closely to .gitignore or .dockerignore. 6 | 7 | # As an example, the C# client generator defines ApiClient.cs. 8 | # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: 9 | #ApiClient.cs 10 | 11 | # You can match any string of characters against a directory, file or extension with a single asterisk (*): 12 | #foo/*/qux 13 | # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux 14 | 15 | # You can recursively match patterns against a directory, file or extension with a double asterisk (**): 16 | #foo/**/qux 17 | # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux 18 | 19 | # You can also negate patterns with an exclamation (!). 20 | # For example, you can ignore all files in a docs folder with the file extension .md: 21 | #docs/*.md 22 | # Then explicitly reverse the ignore rule for a single file: 23 | #!docs/README.md 24 | -------------------------------------------------------------------------------- /test/test_relationship_api.py: -------------------------------------------------------------------------------- 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 | 17 | import sysml_v2_api_client 18 | from sysml_v2_api_client.api.relationship_api import RelationshipApi # noqa: E501 19 | from sysml_v2_api_client.rest import ApiException 20 | 21 | 22 | class TestRelationshipApi(unittest.TestCase): 23 | """RelationshipApi unit test stubs""" 24 | 25 | def setUp(self): 26 | self.api = sysml_v2_api_client.api.relationship_api.RelationshipApi() # noqa: E501 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def test_get_relationships_by_project_commit_related_element(self): 32 | """Test case for get_relationships_by_project_commit_related_element 33 | 34 | Get relationships by project, commit, and related element # noqa: E501 35 | """ 36 | pass 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 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 setuptools import setup, find_packages # noqa: H301 14 | 15 | NAME = "sysml-v2-api-client" 16 | VERSION = "2021-09" 17 | # To install the library, run the following 18 | # 19 | # python setup.py install 20 | # 21 | # prerequisite: setuptools 22 | # http://pypi.python.org/pypi/setuptools 23 | 24 | REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil"] 25 | 26 | setup( 27 | name=NAME, 28 | version=VERSION, 29 | description="SysML v2 API and Services", 30 | author="OpenAPI Generator community", 31 | author_email="team@openapitools.org", 32 | url="", 33 | keywords=["OpenAPI", "OpenAPI-Generator", "SysML v2 API and Services"], 34 | install_requires=REQUIRES, 35 | packages=find_packages(exclude=["test", "tests"]), 36 | include_package_data=True, 37 | long_description="""\ 38 | REST/HTTP binding (PSM) for the SysML v2 standard API. # noqa: E501 39 | """ 40 | ) 41 | -------------------------------------------------------------------------------- /test/test_commit_api.py: -------------------------------------------------------------------------------- 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 | 17 | import sysml_v2_api_client 18 | from sysml_v2_api_client.api.commit_api import CommitApi # noqa: E501 19 | from sysml_v2_api_client.rest import ApiException 20 | 21 | 22 | class TestCommitApi(unittest.TestCase): 23 | """CommitApi unit test stubs""" 24 | 25 | def setUp(self): 26 | self.api = sysml_v2_api_client.api.commit_api.CommitApi() # noqa: E501 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def test_get_commit_by_project_and_id(self): 32 | """Test case for get_commit_by_project_and_id 33 | 34 | Get commit by project and ID # noqa: E501 35 | """ 36 | pass 37 | 38 | def test_get_commits_by_project(self): 39 | """Test case for get_commits_by_project 40 | 41 | Get commits by project # noqa: E501 42 | """ 43 | pass 44 | 45 | def test_post_commit_by_project(self): 46 | """Test case for post_commit_by_project 47 | 48 | Create commit by project # noqa: E501 49 | """ 50 | pass 51 | 52 | 53 | if __name__ == '__main__': 54 | unittest.main() 55 | -------------------------------------------------------------------------------- /test/test_error.py: -------------------------------------------------------------------------------- 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.error import Error # noqa: E501 20 | from sysml_v2_api_client.rest import ApiException 21 | 22 | class TestError(unittest.TestCase): 23 | """Error 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 Error 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.error.Error() # noqa: E501 37 | if include_optional : 38 | return Error( 39 | error = '0' 40 | ) 41 | else : 42 | return Error( 43 | ) 44 | 45 | def testError(self): 46 | """Test Error""" 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() 53 | -------------------------------------------------------------------------------- /test/test_element_api.py: -------------------------------------------------------------------------------- 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 | 17 | import sysml_v2_api_client 18 | from sysml_v2_api_client.api.element_api import ElementApi # noqa: E501 19 | from sysml_v2_api_client.rest import ApiException 20 | 21 | 22 | class TestElementApi(unittest.TestCase): 23 | """ElementApi unit test stubs""" 24 | 25 | def setUp(self): 26 | self.api = sysml_v2_api_client.api.element_api.ElementApi() # noqa: E501 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def test_get_element_by_project_commit_id(self): 32 | """Test case for get_element_by_project_commit_id 33 | 34 | Get element by project, commit and ID # noqa: E501 35 | """ 36 | pass 37 | 38 | def test_get_elements_by_project_commit(self): 39 | """Test case for get_elements_by_project_commit 40 | 41 | Get elements by project and commit # noqa: E501 42 | """ 43 | pass 44 | 45 | def test_get_roots_by_project_commit(self): 46 | """Test case for get_roots_by_project_commit 47 | 48 | Get root elements by project and commit # noqa: E501 49 | """ 50 | pass 51 | 52 | 53 | if __name__ == '__main__': 54 | unittest.main() 55 | -------------------------------------------------------------------------------- /test/test_data.py: -------------------------------------------------------------------------------- 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.data import Data # noqa: E501 20 | from sysml_v2_api_client.rest import ApiException 21 | 22 | class TestData(unittest.TestCase): 23 | """Data 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 Data 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.data.Data() # noqa: E501 37 | if include_optional : 38 | return Data( 39 | id = '0', 40 | type = '0' 41 | ) 42 | else : 43 | return Data( 44 | type = '0', 45 | ) 46 | 47 | def testData(self): 48 | """Test Data""" 49 | inst_req_only = self.make_instance(include_optional=False) 50 | inst_req_and_optional = self.make_instance(include_optional=True) 51 | 52 | 53 | if __name__ == '__main__': 54 | unittest.main() 55 | -------------------------------------------------------------------------------- /test/test_identified.py: -------------------------------------------------------------------------------- 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.identified import Identified # noqa: E501 20 | from sysml_v2_api_client.rest import ApiException 21 | 22 | class TestIdentified(unittest.TestCase): 23 | """Identified 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 Identified 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.identified.Identified() # noqa: E501 37 | if include_optional : 38 | return Identified( 39 | id = '0' 40 | ) 41 | else : 42 | return Identified( 43 | ) 44 | 45 | def testIdentified(self): 46 | """Test Identified""" 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() 53 | -------------------------------------------------------------------------------- /test/test_branch_head.py: -------------------------------------------------------------------------------- 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.branch_head import BranchHead # noqa: E501 20 | from sysml_v2_api_client.rest import ApiException 21 | 22 | class TestBranchHead(unittest.TestCase): 23 | """BranchHead 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 BranchHead 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.branch_head.BranchHead() # noqa: E501 37 | if include_optional : 38 | return BranchHead( 39 | id = '0' 40 | ) 41 | else : 42 | return BranchHead( 43 | ) 44 | 45 | def testBranchHead(self): 46 | """Test BranchHead""" 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() 53 | -------------------------------------------------------------------------------- /sysml_v2_api_client/models/__init__.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | # flake8: noqa 4 | """ 5 | SysML v2 API and Services 6 | 7 | REST/HTTP binding (PSM) for the SysML v2 standard API. # noqa: E501 8 | 9 | The version of the OpenAPI document: 1.0.0 10 | Generated by: https://openapi-generator.tech 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | # import models into model package 17 | from sysml_v2_api_client.models.branch import Branch 18 | from sysml_v2_api_client.models.branch_head import BranchHead 19 | from sysml_v2_api_client.models.branch_owning_project import BranchOwningProject 20 | from sysml_v2_api_client.models.commit import Commit 21 | from sysml_v2_api_client.models.composite_constraint import CompositeConstraint 22 | from sysml_v2_api_client.models.constraint import Constraint 23 | from sysml_v2_api_client.models.data import Data 24 | from sysml_v2_api_client.models.data_identity import DataIdentity 25 | from sysml_v2_api_client.models.data_version import DataVersion 26 | from sysml_v2_api_client.models.element import Element 27 | from sysml_v2_api_client.models.error import Error 28 | from sysml_v2_api_client.models.identified import Identified 29 | from sysml_v2_api_client.models.primitive_constraint import PrimitiveConstraint 30 | from sysml_v2_api_client.models.project import Project 31 | from sysml_v2_api_client.models.project_default_branch import ProjectDefaultBranch 32 | from sysml_v2_api_client.models.query import Query 33 | from sysml_v2_api_client.models.relationship import Relationship 34 | from sysml_v2_api_client.models.tag import Tag 35 | -------------------------------------------------------------------------------- /test/test_element.py: -------------------------------------------------------------------------------- 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.element import Element # noqa: E501 20 | from sysml_v2_api_client.rest import ApiException 21 | 22 | class TestElement(unittest.TestCase): 23 | """Element 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 Element 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.element.Element() # noqa: E501 37 | if include_optional : 38 | return Element( 39 | id = '0', 40 | type = '0', 41 | identifier = '0' 42 | ) 43 | else : 44 | return Element( 45 | ) 46 | 47 | def testElement(self): 48 | """Test Element""" 49 | inst_req_only = self.make_instance(include_optional=False) 50 | inst_req_and_optional = self.make_instance(include_optional=True) 51 | 52 | 53 | if __name__ == '__main__': 54 | unittest.main() 55 | -------------------------------------------------------------------------------- /test/test_tag_api.py: -------------------------------------------------------------------------------- 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 | 17 | import sysml_v2_api_client 18 | from sysml_v2_api_client.api.tag_api import TagApi # noqa: E501 19 | from sysml_v2_api_client.rest import ApiException 20 | 21 | 22 | class TestTagApi(unittest.TestCase): 23 | """TagApi unit test stubs""" 24 | 25 | def setUp(self): 26 | self.api = sysml_v2_api_client.api.tag_api.TagApi() # noqa: E501 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def test_delete_tag_by_project_and_id(self): 32 | """Test case for delete_tag_by_project_and_id 33 | 34 | Delete tag by project and ID # noqa: E501 35 | """ 36 | pass 37 | 38 | def test_get_tag_by_project_and_id(self): 39 | """Test case for get_tag_by_project_and_id 40 | 41 | Get tag by project and ID # noqa: E501 42 | """ 43 | pass 44 | 45 | def test_get_tags_by_project(self): 46 | """Test case for get_tags_by_project 47 | 48 | Get tags by project # noqa: E501 49 | """ 50 | pass 51 | 52 | def test_post_tag_by_project(self): 53 | """Test case for post_tag_by_project 54 | 55 | Create tag by project # noqa: E501 56 | """ 57 | pass 58 | 59 | 60 | if __name__ == '__main__': 61 | unittest.main() 62 | -------------------------------------------------------------------------------- /test/test_constraint.py: -------------------------------------------------------------------------------- 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.constraint import Constraint # noqa: E501 20 | from sysml_v2_api_client.rest import ApiException 21 | 22 | class TestConstraint(unittest.TestCase): 23 | """Constraint 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 Constraint 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.constraint.Constraint() # noqa: E501 37 | if include_optional : 38 | return Constraint( 39 | type = 'PrimitiveConstraint' 40 | ) 41 | else : 42 | return Constraint( 43 | type = 'PrimitiveConstraint', 44 | ) 45 | 46 | def testConstraint(self): 47 | """Test Constraint""" 48 | inst_req_only = self.make_instance(include_optional=False) 49 | inst_req_and_optional = self.make_instance(include_optional=True) 50 | 51 | 52 | if __name__ == '__main__': 53 | unittest.main() 54 | -------------------------------------------------------------------------------- /test/test_data_identity.py: -------------------------------------------------------------------------------- 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.data_identity import DataIdentity # noqa: E501 20 | from sysml_v2_api_client.rest import ApiException 21 | 22 | class TestDataIdentity(unittest.TestCase): 23 | """DataIdentity 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 DataIdentity 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.data_identity.DataIdentity() # noqa: E501 37 | if include_optional : 38 | return DataIdentity( 39 | id = '0', 40 | type = 'DataIdentity' 41 | ) 42 | else : 43 | return DataIdentity( 44 | ) 45 | 46 | def testDataIdentity(self): 47 | """Test DataIdentity""" 48 | inst_req_only = self.make_instance(include_optional=False) 49 | inst_req_and_optional = self.make_instance(include_optional=True) 50 | 51 | 52 | if __name__ == '__main__': 53 | unittest.main() 54 | -------------------------------------------------------------------------------- /test/test_branch_api.py: -------------------------------------------------------------------------------- 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 | 17 | import sysml_v2_api_client 18 | from sysml_v2_api_client.api.branch_api import BranchApi # noqa: E501 19 | from sysml_v2_api_client.rest import ApiException 20 | 21 | 22 | class TestBranchApi(unittest.TestCase): 23 | """BranchApi unit test stubs""" 24 | 25 | def setUp(self): 26 | self.api = sysml_v2_api_client.api.branch_api.BranchApi() # noqa: E501 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def test_delete_branch_by_project_and_id(self): 32 | """Test case for delete_branch_by_project_and_id 33 | 34 | Delete branch by project and ID # noqa: E501 35 | """ 36 | pass 37 | 38 | def test_get_branches_by_project(self): 39 | """Test case for get_branches_by_project 40 | 41 | Get branches by project # noqa: E501 42 | """ 43 | pass 44 | 45 | def test_get_branches_by_project_and_id(self): 46 | """Test case for get_branches_by_project_and_id 47 | 48 | Get branch by project and ID # noqa: E501 49 | """ 50 | pass 51 | 52 | def test_post_branch_by_project(self): 53 | """Test case for post_branch_by_project 54 | 55 | Create branch by project # noqa: E501 56 | """ 57 | pass 58 | 59 | 60 | if __name__ == '__main__': 61 | unittest.main() 62 | -------------------------------------------------------------------------------- /test/test_branch_owning_project.py: -------------------------------------------------------------------------------- 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.branch_owning_project import BranchOwningProject # noqa: E501 20 | from sysml_v2_api_client.rest import ApiException 21 | 22 | class TestBranchOwningProject(unittest.TestCase): 23 | """BranchOwningProject 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 BranchOwningProject 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.branch_owning_project.BranchOwningProject() # noqa: E501 37 | if include_optional : 38 | return BranchOwningProject( 39 | id = '0' 40 | ) 41 | else : 42 | return BranchOwningProject( 43 | ) 44 | 45 | def testBranchOwningProject(self): 46 | """Test BranchOwningProject""" 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() 53 | -------------------------------------------------------------------------------- /test/test_project_default_branch.py: -------------------------------------------------------------------------------- 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() 53 | -------------------------------------------------------------------------------- /test/test_project_api.py: -------------------------------------------------------------------------------- 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 | 17 | import sysml_v2_api_client 18 | from sysml_v2_api_client.api.project_api import ProjectApi # noqa: E501 19 | from sysml_v2_api_client.rest import ApiException 20 | 21 | 22 | class TestProjectApi(unittest.TestCase): 23 | """ProjectApi unit test stubs""" 24 | 25 | def setUp(self): 26 | self.api = sysml_v2_api_client.api.project_api.ProjectApi() # noqa: E501 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def test_delete_project_by_id(self): 32 | """Test case for delete_project_by_id 33 | 34 | Delete project by ID # noqa: E501 35 | """ 36 | pass 37 | 38 | def test_get_project_by_id(self): 39 | """Test case for get_project_by_id 40 | 41 | Get project by ID # noqa: E501 42 | """ 43 | pass 44 | 45 | def test_get_projects(self): 46 | """Test case for get_projects 47 | 48 | Get projects # noqa: E501 49 | """ 50 | pass 51 | 52 | def test_post_project(self): 53 | """Test case for post_project 54 | 55 | Create project # noqa: E501 56 | """ 57 | pass 58 | 59 | def test_put_project_by_id(self): 60 | """Test case for put_project_by_id 61 | 62 | Update project by ID # noqa: E501 63 | """ 64 | pass 65 | 66 | 67 | if __name__ == '__main__': 68 | unittest.main() 69 | -------------------------------------------------------------------------------- /test/test_project.py: -------------------------------------------------------------------------------- 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 import Project # noqa: E501 20 | from sysml_v2_api_client.rest import ApiException 21 | 22 | class TestProject(unittest.TestCase): 23 | """Project 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 Project 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.Project() # noqa: E501 37 | if include_optional : 38 | return Project( 39 | id = '0', 40 | type = 'Project', 41 | default_branch = sysml_v2_api_client.models.project_default_branch.Project_defaultBranch( 42 | @id = '0', ), 43 | description = '0', 44 | name = '0' 45 | ) 46 | else : 47 | return Project( 48 | ) 49 | 50 | def testProject(self): 51 | """Test Project""" 52 | inst_req_only = self.make_instance(include_optional=False) 53 | inst_req_and_optional = self.make_instance(include_optional=True) 54 | 55 | 56 | if __name__ == '__main__': 57 | unittest.main() 58 | -------------------------------------------------------------------------------- /test/test_primitive_constraint.py: -------------------------------------------------------------------------------- 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.primitive_constraint import PrimitiveConstraint # noqa: E501 20 | from sysml_v2_api_client.rest import ApiException 21 | 22 | class TestPrimitiveConstraint(unittest.TestCase): 23 | """PrimitiveConstraint 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 PrimitiveConstraint 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.primitive_constraint.PrimitiveConstraint() # noqa: E501 37 | if include_optional : 38 | return PrimitiveConstraint( 39 | type = 'PrimitiveConstraint', 40 | inverse = True, 41 | _property = '0', 42 | value = '0', 43 | operator = '=' 44 | ) 45 | else : 46 | return PrimitiveConstraint( 47 | ) 48 | 49 | def testPrimitiveConstraint(self): 50 | """Test PrimitiveConstraint""" 51 | inst_req_only = self.make_instance(include_optional=False) 52 | inst_req_and_optional = self.make_instance(include_optional=True) 53 | 54 | 55 | if __name__ == '__main__': 56 | unittest.main() 57 | -------------------------------------------------------------------------------- /test/test_composite_constraint.py: -------------------------------------------------------------------------------- 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.composite_constraint import CompositeConstraint # noqa: E501 20 | from sysml_v2_api_client.rest import ApiException 21 | 22 | class TestCompositeConstraint(unittest.TestCase): 23 | """CompositeConstraint 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 CompositeConstraint 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.composite_constraint.CompositeConstraint() # noqa: E501 37 | if include_optional : 38 | return CompositeConstraint( 39 | type = 'CompositeConstraint', 40 | constraint = [ 41 | { 42 | 'key' : None 43 | } 44 | ], 45 | operator = 'and' 46 | ) 47 | else : 48 | return CompositeConstraint( 49 | ) 50 | 51 | def testCompositeConstraint(self): 52 | """Test CompositeConstraint""" 53 | inst_req_only = self.make_instance(include_optional=False) 54 | inst_req_and_optional = self.make_instance(include_optional=True) 55 | 56 | 57 | if __name__ == '__main__': 58 | unittest.main() 59 | -------------------------------------------------------------------------------- /test/test_data_version.py: -------------------------------------------------------------------------------- 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.data_version import DataVersion # noqa: E501 20 | from sysml_v2_api_client.rest import ApiException 21 | 22 | class TestDataVersion(unittest.TestCase): 23 | """DataVersion 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 DataVersion 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.data_version.DataVersion() # noqa: E501 37 | if include_optional : 38 | return DataVersion( 39 | id = '0', 40 | type = 'DataVersion', 41 | payload = { 42 | 'key' : None 43 | }, 44 | identity = sysml_v2_api_client.models.data_identity.DataIdentity( 45 | @id = '0', 46 | @type = 'DataIdentity', ) 47 | ) 48 | else : 49 | return DataVersion( 50 | ) 51 | 52 | def testDataVersion(self): 53 | """Test DataVersion""" 54 | inst_req_only = self.make_instance(include_optional=False) 55 | inst_req_and_optional = self.make_instance(include_optional=True) 56 | 57 | 58 | if __name__ == '__main__': 59 | unittest.main() 60 | -------------------------------------------------------------------------------- /test/test_relationship.py: -------------------------------------------------------------------------------- 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.relationship import Relationship # noqa: E501 20 | from sysml_v2_api_client.rest import ApiException 21 | 22 | class TestRelationship(unittest.TestCase): 23 | """Relationship 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 Relationship 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.relationship.Relationship() # noqa: E501 37 | if include_optional : 38 | return Relationship( 39 | id = '0', 40 | type = '0', 41 | identifier = '0', 42 | source = [ 43 | sysml_v2_api_client.models.identified.Identified( 44 | @id = '0', ) 45 | ], 46 | target = [ 47 | sysml_v2_api_client.models.identified.Identified( 48 | @id = '0', ) 49 | ] 50 | ) 51 | else : 52 | return Relationship( 53 | ) 54 | 55 | def testRelationship(self): 56 | """Test Relationship""" 57 | inst_req_only = self.make_instance(include_optional=False) 58 | inst_req_and_optional = self.make_instance(include_optional=True) 59 | 60 | 61 | if __name__ == '__main__': 62 | unittest.main() 63 | -------------------------------------------------------------------------------- /git_push.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ 3 | # 4 | # Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" 5 | 6 | git_user_id=$1 7 | git_repo_id=$2 8 | release_note=$3 9 | git_host=$4 10 | 11 | if [ "$git_host" = "" ]; then 12 | git_host="github.com" 13 | echo "[INFO] No command line input provided. Set \$git_host to $git_host" 14 | fi 15 | 16 | if [ "$git_user_id" = "" ]; then 17 | git_user_id="GIT_USER_ID" 18 | echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" 19 | fi 20 | 21 | if [ "$git_repo_id" = "" ]; then 22 | git_repo_id="GIT_REPO_ID" 23 | echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" 24 | fi 25 | 26 | if [ "$release_note" = "" ]; then 27 | release_note="Minor update" 28 | echo "[INFO] No command line input provided. Set \$release_note to $release_note" 29 | fi 30 | 31 | # Initialize the local directory as a Git repository 32 | git init 33 | 34 | # Adds the files in the local repository and stages them for commit. 35 | git add . 36 | 37 | # Commits the tracked changes and prepares them to be pushed to a remote repository. 38 | git commit -m "$release_note" 39 | 40 | # Sets the new remote 41 | git_remote=`git remote` 42 | if [ "$git_remote" = "" ]; then # git remote not defined 43 | 44 | if [ "$GIT_TOKEN" = "" ]; then 45 | echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." 46 | git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git 47 | else 48 | git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git 49 | fi 50 | 51 | fi 52 | 53 | git pull origin master 54 | 55 | # Pushes (Forces) the changes in the local repository up to the remote repository 56 | echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" 57 | git push origin master 2>&1 | grep -v 'To https' 58 | 59 | -------------------------------------------------------------------------------- /test/test_tag.py: -------------------------------------------------------------------------------- 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.tag import Tag # noqa: E501 20 | from sysml_v2_api_client.rest import ApiException 21 | 22 | class TestTag(unittest.TestCase): 23 | """Tag 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 Tag 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.tag.Tag() # noqa: E501 37 | if include_optional : 38 | return Tag( 39 | id = '0', 40 | type = 'Tag', 41 | name = '0', 42 | owning_project = sysml_v2_api_client.models.branch_owning_project.Branch_owningProject( 43 | @id = '0', ), 44 | referenced_commit = sysml_v2_api_client.models.branch_head.Branch_head( 45 | @id = '0', ), 46 | tagged_commit = sysml_v2_api_client.models.branch_head.Branch_head( 47 | @id = '0', ), 48 | timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') 49 | ) 50 | else : 51 | return Tag( 52 | ) 53 | 54 | def testTag(self): 55 | """Test Tag""" 56 | inst_req_only = self.make_instance(include_optional=False) 57 | inst_req_and_optional = self.make_instance(include_optional=True) 58 | 59 | 60 | if __name__ == '__main__': 61 | unittest.main() 62 | -------------------------------------------------------------------------------- /test/test_branch.py: -------------------------------------------------------------------------------- 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.branch import Branch # noqa: E501 20 | from sysml_v2_api_client.rest import ApiException 21 | 22 | class TestBranch(unittest.TestCase): 23 | """Branch 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 Branch 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.branch.Branch() # noqa: E501 37 | if include_optional : 38 | return Branch( 39 | id = '0', 40 | type = 'Branch', 41 | head = sysml_v2_api_client.models.branch_head.Branch_head( 42 | @id = '0', ), 43 | name = '0', 44 | owning_project = sysml_v2_api_client.models.branch_owning_project.Branch_owningProject( 45 | @id = '0', ), 46 | referenced_commit = sysml_v2_api_client.models.branch_head.Branch_head( 47 | @id = '0', ), 48 | timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') 49 | ) 50 | else : 51 | return Branch( 52 | ) 53 | 54 | def testBranch(self): 55 | """Test Branch""" 56 | inst_req_only = self.make_instance(include_optional=False) 57 | inst_req_and_optional = self.make_instance(include_optional=True) 58 | 59 | 60 | if __name__ == '__main__': 61 | unittest.main() 62 | -------------------------------------------------------------------------------- /test/test_query.py: -------------------------------------------------------------------------------- 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.query import Query # noqa: E501 20 | from sysml_v2_api_client.rest import ApiException 21 | 22 | class TestQuery(unittest.TestCase): 23 | """Query 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 Query 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.query.Query() # noqa: E501 37 | if include_optional : 38 | return Query( 39 | id = '0', 40 | type = 'Query', 41 | owning_project = sysml_v2_api_client.models.branch_owning_project.Branch_owningProject( 42 | @id = '0', ), 43 | scope = [ 44 | sysml_v2_api_client.models.data_identity.DataIdentity( 45 | @id = '0', 46 | @type = 'DataIdentity', ) 47 | ], 48 | select = [ 49 | '0' 50 | ], 51 | where = { 52 | 'key' : None 53 | } 54 | ) 55 | else : 56 | return Query( 57 | ) 58 | 59 | def testQuery(self): 60 | """Test Query""" 61 | inst_req_only = self.make_instance(include_optional=False) 62 | inst_req_and_optional = self.make_instance(include_optional=True) 63 | 64 | 65 | if __name__ == '__main__': 66 | unittest.main() 67 | -------------------------------------------------------------------------------- /test/test_commit.py: -------------------------------------------------------------------------------- 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.commit import Commit # noqa: E501 20 | from sysml_v2_api_client.rest import ApiException 21 | 22 | class TestCommit(unittest.TestCase): 23 | """Commit 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 Commit 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.commit.Commit() # noqa: E501 37 | if include_optional : 38 | return Commit( 39 | id = '0', 40 | type = 'Commit', 41 | change = [ 42 | sysml_v2_api_client.models.data_version.DataVersion( 43 | @id = '0', 44 | @type = 'DataVersion', 45 | payload = { 46 | 'key' : None 47 | }, 48 | identity = sysml_v2_api_client.models.data_identity.DataIdentity( 49 | @id = '0', 50 | @type = 'DataIdentity', ), ) 51 | ], 52 | owning_project = sysml_v2_api_client.models.branch_owning_project.Branch_owningProject( 53 | @id = '0', ), 54 | previous_commit = sysml_v2_api_client.models.branch_head.Branch_head( 55 | @id = '0', ) 56 | ) 57 | else : 58 | return Commit( 59 | ) 60 | 61 | def testCommit(self): 62 | """Test Commit""" 63 | inst_req_only = self.make_instance(include_optional=False) 64 | inst_req_and_optional = self.make_instance(include_optional=True) 65 | 66 | 67 | if __name__ == '__main__': 68 | unittest.main() 69 | -------------------------------------------------------------------------------- /test/test_query_api.py: -------------------------------------------------------------------------------- 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 | 17 | import sysml_v2_api_client 18 | from sysml_v2_api_client.api.query_api import QueryApi # noqa: E501 19 | from sysml_v2_api_client.rest import ApiException 20 | 21 | 22 | class TestQueryApi(unittest.TestCase): 23 | """QueryApi unit test stubs""" 24 | 25 | def setUp(self): 26 | self.api = sysml_v2_api_client.api.query_api.QueryApi() # noqa: E501 27 | 28 | def tearDown(self): 29 | pass 30 | 31 | def test_delete_query_by_project_and_id(self): 32 | """Test case for delete_query_by_project_and_id 33 | 34 | Delete query by project and ID # noqa: E501 35 | """ 36 | pass 37 | 38 | def test_get_queries_by_project(self): 39 | """Test case for get_queries_by_project 40 | 41 | Get queries by project # noqa: E501 42 | """ 43 | pass 44 | 45 | def test_get_query_by_project_and_id(self): 46 | """Test case for get_query_by_project_and_id 47 | 48 | Get query by project and ID # noqa: E501 49 | """ 50 | pass 51 | 52 | def test_get_query_results_by_project_id_query(self): 53 | """Test case for get_query_results_by_project_id_query 54 | 55 | Get query results by project and query definition # noqa: E501 56 | """ 57 | pass 58 | 59 | def test_get_query_results_by_project_id_query_id(self): 60 | """Test case for get_query_results_by_project_id_query_id 61 | 62 | Get query results by project and query # noqa: E501 63 | """ 64 | pass 65 | 66 | def test_get_query_results_by_project_id_query_post(self): 67 | """Test case for get_query_results_by_project_id_query_post 68 | 69 | Get query results by project and query definition via POST # noqa: E501 70 | """ 71 | pass 72 | 73 | def test_post_query_by_project(self): 74 | """Test case for post_query_by_project 75 | 76 | Create query by project # noqa: E501 77 | """ 78 | pass 79 | 80 | 81 | if __name__ == '__main__': 82 | unittest.main() 83 | -------------------------------------------------------------------------------- /sysml_v2_api_client/__init__.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | # flake8: noqa 4 | 5 | """ 6 | SysML v2 API and Services 7 | 8 | REST/HTTP binding (PSM) for the SysML v2 standard API. # noqa: E501 9 | 10 | The version of the OpenAPI document: 1.0.0 11 | Generated by: https://openapi-generator.tech 12 | """ 13 | 14 | 15 | from __future__ import absolute_import 16 | 17 | __version__ = "2021-09" 18 | 19 | # import apis into sdk package 20 | from sysml_v2_api_client.api.branch_api import BranchApi 21 | from sysml_v2_api_client.api.commit_api import CommitApi 22 | from sysml_v2_api_client.api.element_api import ElementApi 23 | from sysml_v2_api_client.api.project_api import ProjectApi 24 | from sysml_v2_api_client.api.query_api import QueryApi 25 | from sysml_v2_api_client.api.relationship_api import RelationshipApi 26 | from sysml_v2_api_client.api.tag_api import TagApi 27 | 28 | # import ApiClient 29 | from sysml_v2_api_client.api_client import ApiClient 30 | from sysml_v2_api_client.configuration import Configuration 31 | from sysml_v2_api_client.exceptions import OpenApiException 32 | from sysml_v2_api_client.exceptions import ApiTypeError 33 | from sysml_v2_api_client.exceptions import ApiValueError 34 | from sysml_v2_api_client.exceptions import ApiKeyError 35 | from sysml_v2_api_client.exceptions import ApiException 36 | # import models into sdk package 37 | from sysml_v2_api_client.models.branch import Branch 38 | from sysml_v2_api_client.models.branch_head import BranchHead 39 | from sysml_v2_api_client.models.branch_owning_project import BranchOwningProject 40 | from sysml_v2_api_client.models.commit import Commit 41 | from sysml_v2_api_client.models.composite_constraint import CompositeConstraint 42 | from sysml_v2_api_client.models.constraint import Constraint 43 | from sysml_v2_api_client.models.data import Data 44 | from sysml_v2_api_client.models.data_identity import DataIdentity 45 | from sysml_v2_api_client.models.data_version import DataVersion 46 | from sysml_v2_api_client.models.element import Element 47 | from sysml_v2_api_client.models.error import Error 48 | from sysml_v2_api_client.models.identified import Identified 49 | from sysml_v2_api_client.models.primitive_constraint import PrimitiveConstraint 50 | from sysml_v2_api_client.models.project import Project 51 | from sysml_v2_api_client.models.project_default_branch import ProjectDefaultBranch 52 | from sysml_v2_api_client.models.query import Query 53 | from sysml_v2_api_client.models.relationship import Relationship 54 | from sysml_v2_api_client.models.tag import Tag 55 | 56 | -------------------------------------------------------------------------------- /sysml_v2_api_client/models/identified.py: -------------------------------------------------------------------------------- 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 Identified(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 | """Identified - 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 Identified. # noqa: E501 58 | 59 | 60 | :return: The id of this Identified. # 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 Identified. 68 | 69 | 70 | :param id: The id of this Identified. # 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, Identified): 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, Identified): 118 | return True 119 | 120 | return self.to_dict() != other.to_dict() 121 | -------------------------------------------------------------------------------- /sysml_v2_api_client/models/branch_head.py: -------------------------------------------------------------------------------- 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 BranchHead(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 | """BranchHead - 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 BranchHead. # noqa: E501 58 | 59 | 60 | :return: The id of this BranchHead. # 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 BranchHead. 68 | 69 | 70 | :param id: The id of this BranchHead. # 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, BranchHead): 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, BranchHead): 118 | return True 119 | 120 | return self.to_dict() != other.to_dict() 121 | -------------------------------------------------------------------------------- /sysml_v2_api_client/models/error.py: -------------------------------------------------------------------------------- 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 Error(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 | 'error': 'str' 37 | } 38 | 39 | attribute_map = { 40 | 'error': 'error' 41 | } 42 | 43 | def __init__(self, error=None, local_vars_configuration=None): # noqa: E501 44 | """Error - 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._error = None 50 | self.discriminator = None 51 | 52 | if error is not None: 53 | self.error = error 54 | 55 | @property 56 | def error(self): 57 | """Gets the error of this Error. # noqa: E501 58 | 59 | 60 | :return: The error of this Error. # noqa: E501 61 | :rtype: str 62 | """ 63 | return self._error 64 | 65 | @error.setter 66 | def error(self, error): 67 | """Sets the error of this Error. 68 | 69 | 70 | :param error: The error of this Error. # noqa: E501 71 | :type: str 72 | """ 73 | 74 | self._error = error 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, Error): 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, Error): 118 | return True 119 | 120 | return self.to_dict() != other.to_dict() 121 | -------------------------------------------------------------------------------- /sysml_v2_api_client/models/branch_owning_project.py: -------------------------------------------------------------------------------- 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 BranchOwningProject(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 | """BranchOwningProject - 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 BranchOwningProject. # noqa: E501 58 | 59 | 60 | :return: The id of this BranchOwningProject. # 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 BranchOwningProject. 68 | 69 | 70 | :param id: The id of this BranchOwningProject. # 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, BranchOwningProject): 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, BranchOwningProject): 118 | return True 119 | 120 | return self.to_dict() != other.to_dict() 121 | -------------------------------------------------------------------------------- /sysml_v2_api_client/models/project_default_branch.py: -------------------------------------------------------------------------------- 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() 121 | -------------------------------------------------------------------------------- /docs/RelationshipApi.md: -------------------------------------------------------------------------------- 1 | # sysml_v2_api_client.RelationshipApi 2 | 3 | All URIs are relative to *http://localhost* 4 | 5 | Method | HTTP request | Description 6 | ------------- | ------------- | ------------- 7 | [**get_relationships_by_project_commit_related_element**](RelationshipApi.md#get_relationships_by_project_commit_related_element) | **GET** /projects/{projectId}/commits/{commitId}/elements/{relatedElementId}/relationships | Get relationships by project, commit, and related element 8 | 9 | 10 | # **get_relationships_by_project_commit_related_element** 11 | > list[Relationship] get_relationships_by_project_commit_related_element(project_id, commit_id, related_element_id, direction=direction, page_after=page_after, page_before=page_before, page_size=page_size) 12 | 13 | Get relationships by project, commit, and related element 14 | 15 | ### Example 16 | 17 | ```python 18 | from __future__ import print_function 19 | import time 20 | import sysml_v2_api_client 21 | from sysml_v2_api_client.rest import ApiException 22 | from pprint import pprint 23 | # Defining the host is optional and defaults to http://localhost 24 | # See configuration.py for a list of all supported configuration parameters. 25 | configuration = sysml_v2_api_client.Configuration( 26 | host = "http://localhost" 27 | ) 28 | 29 | 30 | # Enter a context with an instance of the API client 31 | with sysml_v2_api_client.ApiClient() as api_client: 32 | # Create an instance of the API class 33 | api_instance = sysml_v2_api_client.RelationshipApi(api_client) 34 | project_id = 'project_id_example' # str | ID of the project 35 | commit_id = 'commit_id_example' # str | ID of the commit 36 | related_element_id = 'related_element_id_example' # str | ID of the related element 37 | direction = 'both' # str | Filter for relationships that are incoming (in), outgoing (out), or both relative to the related element (optional) (default to 'both') 38 | page_after = 'page_after_example' # str | Page after (optional) 39 | page_before = 'page_before_example' # str | Page before (optional) 40 | page_size = 56 # int | Page size (optional) 41 | 42 | try: 43 | # Get relationships by project, commit, and related element 44 | api_response = api_instance.get_relationships_by_project_commit_related_element(project_id, commit_id, related_element_id, direction=direction, page_after=page_after, page_before=page_before, page_size=page_size) 45 | pprint(api_response) 46 | except ApiException as e: 47 | print("Exception when calling RelationshipApi->get_relationships_by_project_commit_related_element: %s\n" % e) 48 | ``` 49 | 50 | ### Parameters 51 | 52 | Name | Type | Description | Notes 53 | ------------- | ------------- | ------------- | ------------- 54 | **project_id** | [**str**](.md)| ID of the project | 55 | **commit_id** | [**str**](.md)| ID of the commit | 56 | **related_element_id** | [**str**](.md)| ID of the related element | 57 | **direction** | **str**| Filter for relationships that are incoming (in), outgoing (out), or both relative to the related element | [optional] [default to 'both'] 58 | **page_after** | **str**| Page after | [optional] 59 | **page_before** | **str**| Page before | [optional] 60 | **page_size** | **int**| Page size | [optional] 61 | 62 | ### Return type 63 | 64 | [**list[Relationship]**](Relationship.md) 65 | 66 | ### Authorization 67 | 68 | No authorization required 69 | 70 | ### HTTP request headers 71 | 72 | - **Content-Type**: Not defined 73 | - **Accept**: application/json, application/ld+json 74 | 75 | ### HTTP response details 76 | | Status code | Description | Response headers | 77 | |-------------|-------------|------------------| 78 | **200** | Ok | - | 79 | **415** | The requested content type is not acceptable. | - | 80 | **500** | Internal server error. | - | 81 | **0** | Unexpected response. | - | 82 | 83 | [[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) 84 | 85 | -------------------------------------------------------------------------------- /sysml_v2_api_client/exceptions.py: -------------------------------------------------------------------------------- 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 six 14 | 15 | 16 | class OpenApiException(Exception): 17 | """The base exception class for all OpenAPIExceptions""" 18 | 19 | 20 | class ApiTypeError(OpenApiException, TypeError): 21 | def __init__(self, msg, path_to_item=None, valid_classes=None, 22 | key_type=None): 23 | """ Raises an exception for TypeErrors 24 | 25 | Args: 26 | msg (str): the exception message 27 | 28 | Keyword Args: 29 | path_to_item (list): a list of keys an indices to get to the 30 | current_item 31 | None if unset 32 | valid_classes (tuple): the primitive classes that current item 33 | should be an instance of 34 | None if unset 35 | key_type (bool): False if our value is a value in a dict 36 | True if it is a key in a dict 37 | False if our item is an item in a list 38 | None if unset 39 | """ 40 | self.path_to_item = path_to_item 41 | self.valid_classes = valid_classes 42 | self.key_type = key_type 43 | full_msg = msg 44 | if path_to_item: 45 | full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) 46 | super(ApiTypeError, self).__init__(full_msg) 47 | 48 | 49 | class ApiValueError(OpenApiException, ValueError): 50 | def __init__(self, msg, path_to_item=None): 51 | """ 52 | Args: 53 | msg (str): the exception message 54 | 55 | Keyword Args: 56 | path_to_item (list) the path to the exception in the 57 | received_data dict. None if unset 58 | """ 59 | 60 | self.path_to_item = path_to_item 61 | full_msg = msg 62 | if path_to_item: 63 | full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) 64 | super(ApiValueError, self).__init__(full_msg) 65 | 66 | 67 | class ApiKeyError(OpenApiException, KeyError): 68 | def __init__(self, msg, path_to_item=None): 69 | """ 70 | Args: 71 | msg (str): the exception message 72 | 73 | Keyword Args: 74 | path_to_item (None/list) the path to the exception in the 75 | received_data dict 76 | """ 77 | self.path_to_item = path_to_item 78 | full_msg = msg 79 | if path_to_item: 80 | full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) 81 | super(ApiKeyError, self).__init__(full_msg) 82 | 83 | 84 | class ApiException(OpenApiException): 85 | 86 | def __init__(self, status=None, reason=None, http_resp=None): 87 | if http_resp: 88 | self.status = http_resp.status 89 | self.reason = http_resp.reason 90 | self.body = http_resp.data 91 | self.headers = http_resp.getheaders() 92 | else: 93 | self.status = status 94 | self.reason = reason 95 | self.body = None 96 | self.headers = None 97 | 98 | def __str__(self): 99 | """Custom error messages for exception""" 100 | error_message = "({0})\n"\ 101 | "Reason: {1}\n".format(self.status, self.reason) 102 | if self.headers: 103 | error_message += "HTTP response headers: {0}\n".format( 104 | self.headers) 105 | 106 | if self.body: 107 | error_message += "HTTP response body: {0}\n".format(self.body) 108 | 109 | return error_message 110 | 111 | 112 | def render_path(path_to_item): 113 | """Returns a string representation of a path""" 114 | result = "" 115 | for pth in path_to_item: 116 | if isinstance(pth, six.integer_types): 117 | result += "[{0}]".format(pth) 118 | else: 119 | result += "['{0}']".format(pth) 120 | return result 121 | -------------------------------------------------------------------------------- /sysml_v2_api_client/models/constraint.py: -------------------------------------------------------------------------------- 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 Constraint(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 | 'type': 'str' 37 | } 38 | 39 | attribute_map = { 40 | 'type': '@type' 41 | } 42 | 43 | discriminator_value_class_map = { 44 | } 45 | 46 | def __init__(self, type=None, local_vars_configuration=None): # noqa: E501 47 | """Constraint - a model defined in OpenAPI""" # noqa: E501 48 | if local_vars_configuration is None: 49 | local_vars_configuration = Configuration() 50 | self.local_vars_configuration = local_vars_configuration 51 | 52 | self._type = None 53 | self.discriminator = 'type' 54 | 55 | self.type = type 56 | 57 | @property 58 | def type(self): 59 | """Gets the type of this Constraint. # noqa: E501 60 | 61 | 62 | :return: The type of this Constraint. # noqa: E501 63 | :rtype: str 64 | """ 65 | return self._type 66 | 67 | @type.setter 68 | def type(self, type): 69 | """Sets the type of this Constraint. 70 | 71 | 72 | :param type: The type of this Constraint. # noqa: E501 73 | :type: str 74 | """ 75 | if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 76 | raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 77 | allowed_values = ["PrimitiveConstraint", "CompositeConstraint"] # noqa: E501 78 | if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 79 | raise ValueError( 80 | "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 81 | .format(type, allowed_values) 82 | ) 83 | 84 | self._type = type 85 | 86 | def get_real_child_model(self, data): 87 | """Returns the real base class specified by the discriminator""" 88 | discriminator_key = self.attribute_map[self.discriminator] 89 | discriminator_value = data[discriminator_key] 90 | return self.discriminator_value_class_map.get(discriminator_value) 91 | 92 | def to_dict(self): 93 | """Returns the model properties as a dict""" 94 | result = {} 95 | 96 | for attr, _ in six.iteritems(self.openapi_types): 97 | value = getattr(self, attr) 98 | if isinstance(value, list): 99 | result[attr] = list(map( 100 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 101 | value 102 | )) 103 | elif hasattr(value, "to_dict"): 104 | result[attr] = value.to_dict() 105 | elif isinstance(value, dict): 106 | result[attr] = dict(map( 107 | lambda item: (item[0], item[1].to_dict()) 108 | if hasattr(item[1], "to_dict") else item, 109 | value.items() 110 | )) 111 | else: 112 | result[attr] = value 113 | 114 | return result 115 | 116 | def to_str(self): 117 | """Returns the string representation of the model""" 118 | return pprint.pformat(self.to_dict()) 119 | 120 | def __repr__(self): 121 | """For `print` and `pprint`""" 122 | return self.to_str() 123 | 124 | def __eq__(self, other): 125 | """Returns true if both objects are equal""" 126 | if not isinstance(other, Constraint): 127 | return False 128 | 129 | return self.to_dict() == other.to_dict() 130 | 131 | def __ne__(self, other): 132 | """Returns true if both objects are not equal""" 133 | if not isinstance(other, Constraint): 134 | return True 135 | 136 | return self.to_dict() != other.to_dict() 137 | -------------------------------------------------------------------------------- /sysml_v2_api_client/models/data_identity.py: -------------------------------------------------------------------------------- 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 DataIdentity(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 | 'type': 'str' 38 | } 39 | 40 | attribute_map = { 41 | 'id': '@id', 42 | 'type': '@type' 43 | } 44 | 45 | def __init__(self, id=None, type=None, local_vars_configuration=None): # noqa: E501 46 | """DataIdentity - a model defined in OpenAPI""" # noqa: E501 47 | if local_vars_configuration is None: 48 | local_vars_configuration = Configuration() 49 | self.local_vars_configuration = local_vars_configuration 50 | 51 | self._id = None 52 | self._type = None 53 | self.discriminator = None 54 | 55 | if id is not None: 56 | self.id = id 57 | if type is not None: 58 | self.type = type 59 | 60 | @property 61 | def id(self): 62 | """Gets the id of this DataIdentity. # noqa: E501 63 | 64 | 65 | :return: The id of this DataIdentity. # noqa: E501 66 | :rtype: str 67 | """ 68 | return self._id 69 | 70 | @id.setter 71 | def id(self, id): 72 | """Sets the id of this DataIdentity. 73 | 74 | 75 | :param id: The id of this DataIdentity. # noqa: E501 76 | :type: str 77 | """ 78 | 79 | self._id = id 80 | 81 | @property 82 | def type(self): 83 | """Gets the type of this DataIdentity. # noqa: E501 84 | 85 | 86 | :return: The type of this DataIdentity. # noqa: E501 87 | :rtype: str 88 | """ 89 | return self._type 90 | 91 | @type.setter 92 | def type(self, type): 93 | """Sets the type of this DataIdentity. 94 | 95 | 96 | :param type: The type of this DataIdentity. # noqa: E501 97 | :type: str 98 | """ 99 | allowed_values = ["DataIdentity"] # noqa: E501 100 | if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 101 | raise ValueError( 102 | "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 103 | .format(type, allowed_values) 104 | ) 105 | 106 | self._type = type 107 | 108 | def to_dict(self): 109 | """Returns the model properties as a dict""" 110 | result = {} 111 | 112 | for attr, _ in six.iteritems(self.openapi_types): 113 | value = getattr(self, attr) 114 | if isinstance(value, list): 115 | result[attr] = list(map( 116 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 117 | value 118 | )) 119 | elif hasattr(value, "to_dict"): 120 | result[attr] = value.to_dict() 121 | elif isinstance(value, dict): 122 | result[attr] = dict(map( 123 | lambda item: (item[0], item[1].to_dict()) 124 | if hasattr(item[1], "to_dict") else item, 125 | value.items() 126 | )) 127 | else: 128 | result[attr] = value 129 | 130 | return result 131 | 132 | def to_str(self): 133 | """Returns the string representation of the model""" 134 | return pprint.pformat(self.to_dict()) 135 | 136 | def __repr__(self): 137 | """For `print` and `pprint`""" 138 | return self.to_str() 139 | 140 | def __eq__(self, other): 141 | """Returns true if both objects are equal""" 142 | if not isinstance(other, DataIdentity): 143 | return False 144 | 145 | return self.to_dict() == other.to_dict() 146 | 147 | def __ne__(self, other): 148 | """Returns true if both objects are not equal""" 149 | if not isinstance(other, DataIdentity): 150 | return True 151 | 152 | return self.to_dict() != other.to_dict() 153 | -------------------------------------------------------------------------------- /sysml_v2_api_client/models/data.py: -------------------------------------------------------------------------------- 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 Data(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 | 'type': 'str' 38 | } 39 | 40 | attribute_map = { 41 | 'id': '@id', 42 | 'type': '@type' 43 | } 44 | 45 | discriminator_value_class_map = { 46 | } 47 | 48 | def __init__(self, id=None, type=None, local_vars_configuration=None): # noqa: E501 49 | """Data - a model defined in OpenAPI""" # noqa: E501 50 | if local_vars_configuration is None: 51 | local_vars_configuration = Configuration() 52 | self.local_vars_configuration = local_vars_configuration 53 | 54 | self._id = None 55 | self._type = None 56 | self.discriminator = 'type' 57 | 58 | if id is not None: 59 | self.id = id 60 | self.type = type 61 | 62 | @property 63 | def id(self): 64 | """Gets the id of this Data. # noqa: E501 65 | 66 | 67 | :return: The id of this Data. # noqa: E501 68 | :rtype: str 69 | """ 70 | return self._id 71 | 72 | @id.setter 73 | def id(self, id): 74 | """Sets the id of this Data. 75 | 76 | 77 | :param id: The id of this Data. # noqa: E501 78 | :type: str 79 | """ 80 | 81 | self._id = id 82 | 83 | @property 84 | def type(self): 85 | """Gets the type of this Data. # noqa: E501 86 | 87 | 88 | :return: The type of this Data. # noqa: E501 89 | :rtype: str 90 | """ 91 | return self._type 92 | 93 | @type.setter 94 | def type(self, type): 95 | """Sets the type of this Data. 96 | 97 | 98 | :param type: The type of this Data. # noqa: E501 99 | :type: str 100 | """ 101 | if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 102 | raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 103 | 104 | self._type = type 105 | 106 | def get_real_child_model(self, data): 107 | """Returns the real base class specified by the discriminator""" 108 | discriminator_key = self.attribute_map[self.discriminator] 109 | discriminator_value = data[discriminator_key] 110 | return self.discriminator_value_class_map.get(discriminator_value) 111 | 112 | def to_dict(self): 113 | """Returns the model properties as a dict""" 114 | result = {} 115 | 116 | for attr, _ in six.iteritems(self.openapi_types): 117 | value = getattr(self, attr) 118 | if isinstance(value, list): 119 | result[attr] = list(map( 120 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 121 | value 122 | )) 123 | elif hasattr(value, "to_dict"): 124 | result[attr] = value.to_dict() 125 | elif isinstance(value, dict): 126 | result[attr] = dict(map( 127 | lambda item: (item[0], item[1].to_dict()) 128 | if hasattr(item[1], "to_dict") else item, 129 | value.items() 130 | )) 131 | else: 132 | result[attr] = value 133 | 134 | return result 135 | 136 | def to_str(self): 137 | """Returns the string representation of the model""" 138 | return pprint.pformat(self.to_dict()) 139 | 140 | def __repr__(self): 141 | """For `print` and `pprint`""" 142 | return self.to_str() 143 | 144 | def __eq__(self, other): 145 | """Returns true if both objects are equal""" 146 | if not isinstance(other, Data): 147 | return False 148 | 149 | return self.to_dict() == other.to_dict() 150 | 151 | def __ne__(self, other): 152 | """Returns true if both objects are not equal""" 153 | if not isinstance(other, Data): 154 | return True 155 | 156 | return self.to_dict() != other.to_dict() 157 | -------------------------------------------------------------------------------- /sysml_v2_api_client/models/element.py: -------------------------------------------------------------------------------- 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 Element(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 | 'type': 'str', 38 | 'identifier': 'str' 39 | } 40 | 41 | attribute_map = { 42 | 'id': '@id', 43 | 'type': '@type', 44 | 'identifier': 'identifier' 45 | } 46 | 47 | def __init__(self, id=None, type=None, identifier=None, local_vars_configuration=None): # noqa: E501 48 | """Element - a model defined in OpenAPI""" # noqa: E501 49 | if local_vars_configuration is None: 50 | local_vars_configuration = Configuration() 51 | self.local_vars_configuration = local_vars_configuration 52 | 53 | self._id = None 54 | self._type = None 55 | self._identifier = None 56 | self.discriminator = None 57 | 58 | if id is not None: 59 | self.id = id 60 | if type is not None: 61 | self.type = type 62 | if identifier is not None: 63 | self.identifier = identifier 64 | 65 | @property 66 | def id(self): 67 | """Gets the id of this Element. # noqa: E501 68 | 69 | 70 | :return: The id of this Element. # noqa: E501 71 | :rtype: str 72 | """ 73 | return self._id 74 | 75 | @id.setter 76 | def id(self, id): 77 | """Sets the id of this Element. 78 | 79 | 80 | :param id: The id of this Element. # noqa: E501 81 | :type: str 82 | """ 83 | 84 | self._id = id 85 | 86 | @property 87 | def type(self): 88 | """Gets the type of this Element. # noqa: E501 89 | 90 | 91 | :return: The type of this Element. # noqa: E501 92 | :rtype: str 93 | """ 94 | return self._type 95 | 96 | @type.setter 97 | def type(self, type): 98 | """Sets the type of this Element. 99 | 100 | 101 | :param type: The type of this Element. # noqa: E501 102 | :type: str 103 | """ 104 | 105 | self._type = type 106 | 107 | @property 108 | def identifier(self): 109 | """Gets the identifier of this Element. # noqa: E501 110 | 111 | 112 | :return: The identifier of this Element. # noqa: E501 113 | :rtype: str 114 | """ 115 | return self._identifier 116 | 117 | @identifier.setter 118 | def identifier(self, identifier): 119 | """Sets the identifier of this Element. 120 | 121 | 122 | :param identifier: The identifier of this Element. # noqa: E501 123 | :type: str 124 | """ 125 | 126 | self._identifier = identifier 127 | 128 | def to_dict(self): 129 | """Returns the model properties as a dict""" 130 | result = {} 131 | 132 | for attr, _ in six.iteritems(self.openapi_types): 133 | value = getattr(self, attr) 134 | if isinstance(value, list): 135 | result[attr] = list(map( 136 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 137 | value 138 | )) 139 | elif hasattr(value, "to_dict"): 140 | result[attr] = value.to_dict() 141 | elif isinstance(value, dict): 142 | result[attr] = dict(map( 143 | lambda item: (item[0], item[1].to_dict()) 144 | if hasattr(item[1], "to_dict") else item, 145 | value.items() 146 | )) 147 | else: 148 | result[attr] = value 149 | 150 | return result 151 | 152 | def to_str(self): 153 | """Returns the string representation of the model""" 154 | return pprint.pformat(self.to_dict()) 155 | 156 | def __repr__(self): 157 | """For `print` and `pprint`""" 158 | return self.to_str() 159 | 160 | def __eq__(self, other): 161 | """Returns true if both objects are equal""" 162 | if not isinstance(other, Element): 163 | return False 164 | 165 | return self.to_dict() == other.to_dict() 166 | 167 | def __ne__(self, other): 168 | """Returns true if both objects are not equal""" 169 | if not isinstance(other, Element): 170 | return True 171 | 172 | return self.to_dict() != other.to_dict() 173 | -------------------------------------------------------------------------------- /sysml_v2_api_client/models/composite_constraint.py: -------------------------------------------------------------------------------- 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 CompositeConstraint(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 | 'type': 'str', 37 | 'constraint': 'list[Constraint]', 38 | 'operator': 'str' 39 | } 40 | 41 | attribute_map = { 42 | 'type': '@type', 43 | 'constraint': 'constraint', 44 | 'operator': 'operator' 45 | } 46 | 47 | def __init__(self, type=None, constraint=None, operator=None, local_vars_configuration=None): # noqa: E501 48 | """CompositeConstraint - a model defined in OpenAPI""" # noqa: E501 49 | if local_vars_configuration is None: 50 | local_vars_configuration = Configuration() 51 | self.local_vars_configuration = local_vars_configuration 52 | 53 | self._type = None 54 | self._constraint = None 55 | self._operator = None 56 | self.discriminator = None 57 | 58 | if type is not None: 59 | self.type = type 60 | if constraint is not None: 61 | self.constraint = constraint 62 | if operator is not None: 63 | self.operator = operator 64 | 65 | @property 66 | def type(self): 67 | """Gets the type of this CompositeConstraint. # noqa: E501 68 | 69 | 70 | :return: The type of this CompositeConstraint. # noqa: E501 71 | :rtype: str 72 | """ 73 | return self._type 74 | 75 | @type.setter 76 | def type(self, type): 77 | """Sets the type of this CompositeConstraint. 78 | 79 | 80 | :param type: The type of this CompositeConstraint. # noqa: E501 81 | :type: str 82 | """ 83 | allowed_values = ["CompositeConstraint"] # noqa: E501 84 | if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 85 | raise ValueError( 86 | "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 87 | .format(type, allowed_values) 88 | ) 89 | 90 | self._type = type 91 | 92 | @property 93 | def constraint(self): 94 | """Gets the constraint of this CompositeConstraint. # noqa: E501 95 | 96 | 97 | :return: The constraint of this CompositeConstraint. # noqa: E501 98 | :rtype: list[Constraint] 99 | """ 100 | return self._constraint 101 | 102 | @constraint.setter 103 | def constraint(self, constraint): 104 | """Sets the constraint of this CompositeConstraint. 105 | 106 | 107 | :param constraint: The constraint of this CompositeConstraint. # noqa: E501 108 | :type: list[Constraint] 109 | """ 110 | 111 | self._constraint = constraint 112 | 113 | @property 114 | def operator(self): 115 | """Gets the operator of this CompositeConstraint. # noqa: E501 116 | 117 | 118 | :return: The operator of this CompositeConstraint. # noqa: E501 119 | :rtype: str 120 | """ 121 | return self._operator 122 | 123 | @operator.setter 124 | def operator(self, operator): 125 | """Sets the operator of this CompositeConstraint. 126 | 127 | 128 | :param operator: The operator of this CompositeConstraint. # noqa: E501 129 | :type: str 130 | """ 131 | allowed_values = ["and", "or"] # noqa: E501 132 | if self.local_vars_configuration.client_side_validation and operator not in allowed_values: # noqa: E501 133 | raise ValueError( 134 | "Invalid value for `operator` ({0}), must be one of {1}" # noqa: E501 135 | .format(operator, allowed_values) 136 | ) 137 | 138 | self._operator = operator 139 | 140 | def to_dict(self): 141 | """Returns the model properties as a dict""" 142 | result = {} 143 | 144 | for attr, _ in six.iteritems(self.openapi_types): 145 | value = getattr(self, attr) 146 | if isinstance(value, list): 147 | result[attr] = list(map( 148 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 149 | value 150 | )) 151 | elif hasattr(value, "to_dict"): 152 | result[attr] = value.to_dict() 153 | elif isinstance(value, dict): 154 | result[attr] = dict(map( 155 | lambda item: (item[0], item[1].to_dict()) 156 | if hasattr(item[1], "to_dict") else item, 157 | value.items() 158 | )) 159 | else: 160 | result[attr] = value 161 | 162 | return result 163 | 164 | def to_str(self): 165 | """Returns the string representation of the model""" 166 | return pprint.pformat(self.to_dict()) 167 | 168 | def __repr__(self): 169 | """For `print` and `pprint`""" 170 | return self.to_str() 171 | 172 | def __eq__(self, other): 173 | """Returns true if both objects are equal""" 174 | if not isinstance(other, CompositeConstraint): 175 | return False 176 | 177 | return self.to_dict() == other.to_dict() 178 | 179 | def __ne__(self, other): 180 | """Returns true if both objects are not equal""" 181 | if not isinstance(other, CompositeConstraint): 182 | return True 183 | 184 | return self.to_dict() != other.to_dict() 185 | -------------------------------------------------------------------------------- /sysml_v2_api_client/models/data_version.py: -------------------------------------------------------------------------------- 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 DataVersion(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 | 'type': 'str', 38 | 'payload': 'Data', 39 | 'identity': 'DataIdentity' 40 | } 41 | 42 | attribute_map = { 43 | 'id': '@id', 44 | 'type': '@type', 45 | 'payload': 'payload', 46 | 'identity': 'identity' 47 | } 48 | 49 | def __init__(self, id=None, type=None, payload=None, identity=None, local_vars_configuration=None): # noqa: E501 50 | """DataVersion - a model defined in OpenAPI""" # noqa: E501 51 | if local_vars_configuration is None: 52 | local_vars_configuration = Configuration() 53 | self.local_vars_configuration = local_vars_configuration 54 | 55 | self._id = None 56 | self._type = None 57 | self._payload = None 58 | self._identity = None 59 | self.discriminator = None 60 | 61 | if id is not None: 62 | self.id = id 63 | if type is not None: 64 | self.type = type 65 | if payload is not None: 66 | self.payload = payload 67 | if identity is not None: 68 | self.identity = identity 69 | 70 | @property 71 | def id(self): 72 | """Gets the id of this DataVersion. # noqa: E501 73 | 74 | 75 | :return: The id of this DataVersion. # noqa: E501 76 | :rtype: str 77 | """ 78 | return self._id 79 | 80 | @id.setter 81 | def id(self, id): 82 | """Sets the id of this DataVersion. 83 | 84 | 85 | :param id: The id of this DataVersion. # noqa: E501 86 | :type: str 87 | """ 88 | 89 | self._id = id 90 | 91 | @property 92 | def type(self): 93 | """Gets the type of this DataVersion. # noqa: E501 94 | 95 | 96 | :return: The type of this DataVersion. # noqa: E501 97 | :rtype: str 98 | """ 99 | return self._type 100 | 101 | @type.setter 102 | def type(self, type): 103 | """Sets the type of this DataVersion. 104 | 105 | 106 | :param type: The type of this DataVersion. # noqa: E501 107 | :type: str 108 | """ 109 | allowed_values = ["DataVersion"] # noqa: E501 110 | if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 111 | raise ValueError( 112 | "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 113 | .format(type, allowed_values) 114 | ) 115 | 116 | self._type = type 117 | 118 | @property 119 | def payload(self): 120 | """Gets the payload of this DataVersion. # noqa: E501 121 | 122 | 123 | :return: The payload of this DataVersion. # noqa: E501 124 | :rtype: Data 125 | """ 126 | return self._payload 127 | 128 | @payload.setter 129 | def payload(self, payload): 130 | """Sets the payload of this DataVersion. 131 | 132 | 133 | :param payload: The payload of this DataVersion. # noqa: E501 134 | :type: Data 135 | """ 136 | 137 | self._payload = payload 138 | 139 | @property 140 | def identity(self): 141 | """Gets the identity of this DataVersion. # noqa: E501 142 | 143 | 144 | :return: The identity of this DataVersion. # noqa: E501 145 | :rtype: DataIdentity 146 | """ 147 | return self._identity 148 | 149 | @identity.setter 150 | def identity(self, identity): 151 | """Sets the identity of this DataVersion. 152 | 153 | 154 | :param identity: The identity of this DataVersion. # noqa: E501 155 | :type: DataIdentity 156 | """ 157 | 158 | self._identity = identity 159 | 160 | def to_dict(self): 161 | """Returns the model properties as a dict""" 162 | result = {} 163 | 164 | for attr, _ in six.iteritems(self.openapi_types): 165 | value = getattr(self, attr) 166 | if isinstance(value, list): 167 | result[attr] = list(map( 168 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 169 | value 170 | )) 171 | elif hasattr(value, "to_dict"): 172 | result[attr] = value.to_dict() 173 | elif isinstance(value, dict): 174 | result[attr] = dict(map( 175 | lambda item: (item[0], item[1].to_dict()) 176 | if hasattr(item[1], "to_dict") else item, 177 | value.items() 178 | )) 179 | else: 180 | result[attr] = value 181 | 182 | return result 183 | 184 | def to_str(self): 185 | """Returns the string representation of the model""" 186 | return pprint.pformat(self.to_dict()) 187 | 188 | def __repr__(self): 189 | """For `print` and `pprint`""" 190 | return self.to_str() 191 | 192 | def __eq__(self, other): 193 | """Returns true if both objects are equal""" 194 | if not isinstance(other, DataVersion): 195 | return False 196 | 197 | return self.to_dict() == other.to_dict() 198 | 199 | def __ne__(self, other): 200 | """Returns true if both objects are not equal""" 201 | if not isinstance(other, DataVersion): 202 | return True 203 | 204 | return self.to_dict() != other.to_dict() 205 | -------------------------------------------------------------------------------- /sysml_v2_api_client/models/relationship.py: -------------------------------------------------------------------------------- 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 Relationship(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 | 'type': 'str', 38 | 'identifier': 'str', 39 | 'source': 'list[Identified]', 40 | 'target': 'list[Identified]' 41 | } 42 | 43 | attribute_map = { 44 | 'id': '@id', 45 | 'type': '@type', 46 | 'identifier': 'identifier', 47 | 'source': 'source', 48 | 'target': 'target' 49 | } 50 | 51 | def __init__(self, id=None, type=None, identifier=None, source=None, target=None, local_vars_configuration=None): # noqa: E501 52 | """Relationship - a model defined in OpenAPI""" # noqa: E501 53 | if local_vars_configuration is None: 54 | local_vars_configuration = Configuration() 55 | self.local_vars_configuration = local_vars_configuration 56 | 57 | self._id = None 58 | self._type = None 59 | self._identifier = None 60 | self._source = None 61 | self._target = None 62 | self.discriminator = None 63 | 64 | if id is not None: 65 | self.id = id 66 | if type is not None: 67 | self.type = type 68 | if identifier is not None: 69 | self.identifier = identifier 70 | if source is not None: 71 | self.source = source 72 | if target is not None: 73 | self.target = target 74 | 75 | @property 76 | def id(self): 77 | """Gets the id of this Relationship. # noqa: E501 78 | 79 | 80 | :return: The id of this Relationship. # noqa: E501 81 | :rtype: str 82 | """ 83 | return self._id 84 | 85 | @id.setter 86 | def id(self, id): 87 | """Sets the id of this Relationship. 88 | 89 | 90 | :param id: The id of this Relationship. # noqa: E501 91 | :type: str 92 | """ 93 | 94 | self._id = id 95 | 96 | @property 97 | def type(self): 98 | """Gets the type of this Relationship. # noqa: E501 99 | 100 | 101 | :return: The type of this Relationship. # noqa: E501 102 | :rtype: str 103 | """ 104 | return self._type 105 | 106 | @type.setter 107 | def type(self, type): 108 | """Sets the type of this Relationship. 109 | 110 | 111 | :param type: The type of this Relationship. # noqa: E501 112 | :type: str 113 | """ 114 | 115 | self._type = type 116 | 117 | @property 118 | def identifier(self): 119 | """Gets the identifier of this Relationship. # noqa: E501 120 | 121 | 122 | :return: The identifier of this Relationship. # noqa: E501 123 | :rtype: str 124 | """ 125 | return self._identifier 126 | 127 | @identifier.setter 128 | def identifier(self, identifier): 129 | """Sets the identifier of this Relationship. 130 | 131 | 132 | :param identifier: The identifier of this Relationship. # noqa: E501 133 | :type: str 134 | """ 135 | 136 | self._identifier = identifier 137 | 138 | @property 139 | def source(self): 140 | """Gets the source of this Relationship. # noqa: E501 141 | 142 | 143 | :return: The source of this Relationship. # noqa: E501 144 | :rtype: list[Identified] 145 | """ 146 | return self._source 147 | 148 | @source.setter 149 | def source(self, source): 150 | """Sets the source of this Relationship. 151 | 152 | 153 | :param source: The source of this Relationship. # noqa: E501 154 | :type: list[Identified] 155 | """ 156 | 157 | self._source = source 158 | 159 | @property 160 | def target(self): 161 | """Gets the target of this Relationship. # noqa: E501 162 | 163 | 164 | :return: The target of this Relationship. # noqa: E501 165 | :rtype: list[Identified] 166 | """ 167 | return self._target 168 | 169 | @target.setter 170 | def target(self, target): 171 | """Sets the target of this Relationship. 172 | 173 | 174 | :param target: The target of this Relationship. # noqa: E501 175 | :type: list[Identified] 176 | """ 177 | 178 | self._target = target 179 | 180 | def to_dict(self): 181 | """Returns the model properties as a dict""" 182 | result = {} 183 | 184 | for attr, _ in six.iteritems(self.openapi_types): 185 | value = getattr(self, attr) 186 | if isinstance(value, list): 187 | result[attr] = list(map( 188 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 189 | value 190 | )) 191 | elif hasattr(value, "to_dict"): 192 | result[attr] = value.to_dict() 193 | elif isinstance(value, dict): 194 | result[attr] = dict(map( 195 | lambda item: (item[0], item[1].to_dict()) 196 | if hasattr(item[1], "to_dict") else item, 197 | value.items() 198 | )) 199 | else: 200 | result[attr] = value 201 | 202 | return result 203 | 204 | def to_str(self): 205 | """Returns the string representation of the model""" 206 | return pprint.pformat(self.to_dict()) 207 | 208 | def __repr__(self): 209 | """For `print` and `pprint`""" 210 | return self.to_str() 211 | 212 | def __eq__(self, other): 213 | """Returns true if both objects are equal""" 214 | if not isinstance(other, Relationship): 215 | return False 216 | 217 | return self.to_dict() == other.to_dict() 218 | 219 | def __ne__(self, other): 220 | """Returns true if both objects are not equal""" 221 | if not isinstance(other, Relationship): 222 | return True 223 | 224 | return self.to_dict() != other.to_dict() 225 | -------------------------------------------------------------------------------- /sysml_v2_api_client/models/project.py: -------------------------------------------------------------------------------- 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 Project(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 | 'type': 'str', 38 | 'default_branch': 'ProjectDefaultBranch', 39 | 'description': 'str', 40 | 'name': 'str' 41 | } 42 | 43 | attribute_map = { 44 | 'id': '@id', 45 | 'type': '@type', 46 | 'default_branch': 'defaultBranch', 47 | 'description': 'description', 48 | 'name': 'name' 49 | } 50 | 51 | def __init__(self, id=None, type=None, default_branch=None, description=None, name=None, local_vars_configuration=None): # noqa: E501 52 | """Project - a model defined in OpenAPI""" # noqa: E501 53 | if local_vars_configuration is None: 54 | local_vars_configuration = Configuration() 55 | self.local_vars_configuration = local_vars_configuration 56 | 57 | self._id = None 58 | self._type = None 59 | self._default_branch = None 60 | self._description = None 61 | self._name = None 62 | self.discriminator = None 63 | 64 | if id is not None: 65 | self.id = id 66 | if type is not None: 67 | self.type = type 68 | if default_branch is not None: 69 | self.default_branch = default_branch 70 | if description is not None: 71 | self.description = description 72 | if name is not None: 73 | self.name = name 74 | 75 | @property 76 | def id(self): 77 | """Gets the id of this Project. # noqa: E501 78 | 79 | 80 | :return: The id of this Project. # noqa: E501 81 | :rtype: str 82 | """ 83 | return self._id 84 | 85 | @id.setter 86 | def id(self, id): 87 | """Sets the id of this Project. 88 | 89 | 90 | :param id: The id of this Project. # noqa: E501 91 | :type: str 92 | """ 93 | 94 | self._id = id 95 | 96 | @property 97 | def type(self): 98 | """Gets the type of this Project. # noqa: E501 99 | 100 | 101 | :return: The type of this Project. # noqa: E501 102 | :rtype: str 103 | """ 104 | return self._type 105 | 106 | @type.setter 107 | def type(self, type): 108 | """Sets the type of this Project. 109 | 110 | 111 | :param type: The type of this Project. # noqa: E501 112 | :type: str 113 | """ 114 | allowed_values = ["Project"] # noqa: E501 115 | if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 116 | raise ValueError( 117 | "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 118 | .format(type, allowed_values) 119 | ) 120 | 121 | self._type = type 122 | 123 | @property 124 | def default_branch(self): 125 | """Gets the default_branch of this Project. # noqa: E501 126 | 127 | 128 | :return: The default_branch of this Project. # noqa: E501 129 | :rtype: ProjectDefaultBranch 130 | """ 131 | return self._default_branch 132 | 133 | @default_branch.setter 134 | def default_branch(self, default_branch): 135 | """Sets the default_branch of this Project. 136 | 137 | 138 | :param default_branch: The default_branch of this Project. # noqa: E501 139 | :type: ProjectDefaultBranch 140 | """ 141 | 142 | self._default_branch = default_branch 143 | 144 | @property 145 | def description(self): 146 | """Gets the description of this Project. # noqa: E501 147 | 148 | 149 | :return: The description of this Project. # noqa: E501 150 | :rtype: str 151 | """ 152 | return self._description 153 | 154 | @description.setter 155 | def description(self, description): 156 | """Sets the description of this Project. 157 | 158 | 159 | :param description: The description of this Project. # noqa: E501 160 | :type: str 161 | """ 162 | 163 | self._description = description 164 | 165 | @property 166 | def name(self): 167 | """Gets the name of this Project. # noqa: E501 168 | 169 | 170 | :return: The name of this Project. # noqa: E501 171 | :rtype: str 172 | """ 173 | return self._name 174 | 175 | @name.setter 176 | def name(self, name): 177 | """Sets the name of this Project. 178 | 179 | 180 | :param name: The name of this Project. # noqa: E501 181 | :type: str 182 | """ 183 | 184 | self._name = name 185 | 186 | def to_dict(self): 187 | """Returns the model properties as a dict""" 188 | result = {} 189 | 190 | for attr, _ in six.iteritems(self.openapi_types): 191 | value = getattr(self, attr) 192 | if isinstance(value, list): 193 | result[attr] = list(map( 194 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 195 | value 196 | )) 197 | elif hasattr(value, "to_dict"): 198 | result[attr] = value.to_dict() 199 | elif isinstance(value, dict): 200 | result[attr] = dict(map( 201 | lambda item: (item[0], item[1].to_dict()) 202 | if hasattr(item[1], "to_dict") else item, 203 | value.items() 204 | )) 205 | else: 206 | result[attr] = value 207 | 208 | return result 209 | 210 | def to_str(self): 211 | """Returns the string representation of the model""" 212 | return pprint.pformat(self.to_dict()) 213 | 214 | def __repr__(self): 215 | """For `print` and `pprint`""" 216 | return self.to_str() 217 | 218 | def __eq__(self, other): 219 | """Returns true if both objects are equal""" 220 | if not isinstance(other, Project): 221 | return False 222 | 223 | return self.to_dict() == other.to_dict() 224 | 225 | def __ne__(self, other): 226 | """Returns true if both objects are not equal""" 227 | if not isinstance(other, Project): 228 | return True 229 | 230 | return self.to_dict() != other.to_dict() 231 | -------------------------------------------------------------------------------- /sysml_v2_api_client/models/commit.py: -------------------------------------------------------------------------------- 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 Commit(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 | 'type': 'str', 38 | 'change': 'list[DataVersion]', 39 | 'owning_project': 'BranchOwningProject', 40 | 'previous_commit': 'BranchHead' 41 | } 42 | 43 | attribute_map = { 44 | 'id': '@id', 45 | 'type': '@type', 46 | 'change': 'change', 47 | 'owning_project': 'owningProject', 48 | 'previous_commit': 'previousCommit' 49 | } 50 | 51 | def __init__(self, id=None, type=None, change=None, owning_project=None, previous_commit=None, local_vars_configuration=None): # noqa: E501 52 | """Commit - a model defined in OpenAPI""" # noqa: E501 53 | if local_vars_configuration is None: 54 | local_vars_configuration = Configuration() 55 | self.local_vars_configuration = local_vars_configuration 56 | 57 | self._id = None 58 | self._type = None 59 | self._change = None 60 | self._owning_project = None 61 | self._previous_commit = None 62 | self.discriminator = None 63 | 64 | if id is not None: 65 | self.id = id 66 | if type is not None: 67 | self.type = type 68 | if change is not None: 69 | self.change = change 70 | if owning_project is not None: 71 | self.owning_project = owning_project 72 | if previous_commit is not None: 73 | self.previous_commit = previous_commit 74 | 75 | @property 76 | def id(self): 77 | """Gets the id of this Commit. # noqa: E501 78 | 79 | 80 | :return: The id of this Commit. # noqa: E501 81 | :rtype: str 82 | """ 83 | return self._id 84 | 85 | @id.setter 86 | def id(self, id): 87 | """Sets the id of this Commit. 88 | 89 | 90 | :param id: The id of this Commit. # noqa: E501 91 | :type: str 92 | """ 93 | 94 | self._id = id 95 | 96 | @property 97 | def type(self): 98 | """Gets the type of this Commit. # noqa: E501 99 | 100 | 101 | :return: The type of this Commit. # noqa: E501 102 | :rtype: str 103 | """ 104 | return self._type 105 | 106 | @type.setter 107 | def type(self, type): 108 | """Sets the type of this Commit. 109 | 110 | 111 | :param type: The type of this Commit. # noqa: E501 112 | :type: str 113 | """ 114 | allowed_values = ["Commit"] # noqa: E501 115 | if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 116 | raise ValueError( 117 | "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 118 | .format(type, allowed_values) 119 | ) 120 | 121 | self._type = type 122 | 123 | @property 124 | def change(self): 125 | """Gets the change of this Commit. # noqa: E501 126 | 127 | 128 | :return: The change of this Commit. # noqa: E501 129 | :rtype: list[DataVersion] 130 | """ 131 | return self._change 132 | 133 | @change.setter 134 | def change(self, change): 135 | """Sets the change of this Commit. 136 | 137 | 138 | :param change: The change of this Commit. # noqa: E501 139 | :type: list[DataVersion] 140 | """ 141 | 142 | self._change = change 143 | 144 | @property 145 | def owning_project(self): 146 | """Gets the owning_project of this Commit. # noqa: E501 147 | 148 | 149 | :return: The owning_project of this Commit. # noqa: E501 150 | :rtype: BranchOwningProject 151 | """ 152 | return self._owning_project 153 | 154 | @owning_project.setter 155 | def owning_project(self, owning_project): 156 | """Sets the owning_project of this Commit. 157 | 158 | 159 | :param owning_project: The owning_project of this Commit. # noqa: E501 160 | :type: BranchOwningProject 161 | """ 162 | 163 | self._owning_project = owning_project 164 | 165 | @property 166 | def previous_commit(self): 167 | """Gets the previous_commit of this Commit. # noqa: E501 168 | 169 | 170 | :return: The previous_commit of this Commit. # noqa: E501 171 | :rtype: BranchHead 172 | """ 173 | return self._previous_commit 174 | 175 | @previous_commit.setter 176 | def previous_commit(self, previous_commit): 177 | """Sets the previous_commit of this Commit. 178 | 179 | 180 | :param previous_commit: The previous_commit of this Commit. # noqa: E501 181 | :type: BranchHead 182 | """ 183 | 184 | self._previous_commit = previous_commit 185 | 186 | def to_dict(self): 187 | """Returns the model properties as a dict""" 188 | result = {} 189 | 190 | for attr, _ in six.iteritems(self.openapi_types): 191 | value = getattr(self, attr) 192 | if isinstance(value, list): 193 | result[attr] = list(map( 194 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 195 | value 196 | )) 197 | elif hasattr(value, "to_dict"): 198 | result[attr] = value.to_dict() 199 | elif isinstance(value, dict): 200 | result[attr] = dict(map( 201 | lambda item: (item[0], item[1].to_dict()) 202 | if hasattr(item[1], "to_dict") else item, 203 | value.items() 204 | )) 205 | else: 206 | result[attr] = value 207 | 208 | return result 209 | 210 | def to_str(self): 211 | """Returns the string representation of the model""" 212 | return pprint.pformat(self.to_dict()) 213 | 214 | def __repr__(self): 215 | """For `print` and `pprint`""" 216 | return self.to_str() 217 | 218 | def __eq__(self, other): 219 | """Returns true if both objects are equal""" 220 | if not isinstance(other, Commit): 221 | return False 222 | 223 | return self.to_dict() == other.to_dict() 224 | 225 | def __ne__(self, other): 226 | """Returns true if both objects are not equal""" 227 | if not isinstance(other, Commit): 228 | return True 229 | 230 | return self.to_dict() != other.to_dict() 231 | -------------------------------------------------------------------------------- /sysml_v2_api_client/models/primitive_constraint.py: -------------------------------------------------------------------------------- 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 PrimitiveConstraint(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 | 'type': 'str', 37 | 'inverse': 'bool', 38 | '_property': 'str', 39 | 'value': 'str', 40 | 'operator': 'str' 41 | } 42 | 43 | attribute_map = { 44 | 'type': '@type', 45 | 'inverse': 'inverse', 46 | '_property': 'property', 47 | 'value': 'value', 48 | 'operator': 'operator' 49 | } 50 | 51 | def __init__(self, type=None, inverse=None, _property=None, value=None, operator=None, local_vars_configuration=None): # noqa: E501 52 | """PrimitiveConstraint - a model defined in OpenAPI""" # noqa: E501 53 | if local_vars_configuration is None: 54 | local_vars_configuration = Configuration() 55 | self.local_vars_configuration = local_vars_configuration 56 | 57 | self._type = None 58 | self._inverse = None 59 | self.__property = None 60 | self._value = None 61 | self._operator = None 62 | self.discriminator = None 63 | 64 | if type is not None: 65 | self.type = type 66 | if inverse is not None: 67 | self.inverse = inverse 68 | if _property is not None: 69 | self._property = _property 70 | if value is not None: 71 | self.value = value 72 | if operator is not None: 73 | self.operator = operator 74 | 75 | @property 76 | def type(self): 77 | """Gets the type of this PrimitiveConstraint. # noqa: E501 78 | 79 | 80 | :return: The type of this PrimitiveConstraint. # noqa: E501 81 | :rtype: str 82 | """ 83 | return self._type 84 | 85 | @type.setter 86 | def type(self, type): 87 | """Sets the type of this PrimitiveConstraint. 88 | 89 | 90 | :param type: The type of this PrimitiveConstraint. # noqa: E501 91 | :type: str 92 | """ 93 | allowed_values = ["PrimitiveConstraint"] # noqa: E501 94 | if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 95 | raise ValueError( 96 | "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 97 | .format(type, allowed_values) 98 | ) 99 | 100 | self._type = type 101 | 102 | @property 103 | def inverse(self): 104 | """Gets the inverse of this PrimitiveConstraint. # noqa: E501 105 | 106 | 107 | :return: The inverse of this PrimitiveConstraint. # noqa: E501 108 | :rtype: bool 109 | """ 110 | return self._inverse 111 | 112 | @inverse.setter 113 | def inverse(self, inverse): 114 | """Sets the inverse of this PrimitiveConstraint. 115 | 116 | 117 | :param inverse: The inverse of this PrimitiveConstraint. # noqa: E501 118 | :type: bool 119 | """ 120 | 121 | self._inverse = inverse 122 | 123 | @property 124 | def _property(self): 125 | """Gets the _property of this PrimitiveConstraint. # noqa: E501 126 | 127 | 128 | :return: The _property of this PrimitiveConstraint. # noqa: E501 129 | :rtype: str 130 | """ 131 | return self.__property 132 | 133 | @_property.setter 134 | def _property(self, _property): 135 | """Sets the _property of this PrimitiveConstraint. 136 | 137 | 138 | :param _property: The _property of this PrimitiveConstraint. # noqa: E501 139 | :type: str 140 | """ 141 | 142 | self.__property = _property 143 | 144 | @property 145 | def value(self): 146 | """Gets the value of this PrimitiveConstraint. # noqa: E501 147 | 148 | 149 | :return: The value of this PrimitiveConstraint. # noqa: E501 150 | :rtype: str 151 | """ 152 | return self._value 153 | 154 | @value.setter 155 | def value(self, value): 156 | """Sets the value of this PrimitiveConstraint. 157 | 158 | 159 | :param value: The value of this PrimitiveConstraint. # noqa: E501 160 | :type: str 161 | """ 162 | 163 | self._value = value 164 | 165 | @property 166 | def operator(self): 167 | """Gets the operator of this PrimitiveConstraint. # noqa: E501 168 | 169 | 170 | :return: The operator of this PrimitiveConstraint. # noqa: E501 171 | :rtype: str 172 | """ 173 | return self._operator 174 | 175 | @operator.setter 176 | def operator(self, operator): 177 | """Sets the operator of this PrimitiveConstraint. 178 | 179 | 180 | :param operator: The operator of this PrimitiveConstraint. # noqa: E501 181 | :type: str 182 | """ 183 | allowed_values = ["=", ">", "<"] # noqa: E501 184 | if self.local_vars_configuration.client_side_validation and operator not in allowed_values: # noqa: E501 185 | raise ValueError( 186 | "Invalid value for `operator` ({0}), must be one of {1}" # noqa: E501 187 | .format(operator, allowed_values) 188 | ) 189 | 190 | self._operator = operator 191 | 192 | def to_dict(self): 193 | """Returns the model properties as a dict""" 194 | result = {} 195 | 196 | for attr, _ in six.iteritems(self.openapi_types): 197 | value = getattr(self, attr) 198 | if isinstance(value, list): 199 | result[attr] = list(map( 200 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 201 | value 202 | )) 203 | elif hasattr(value, "to_dict"): 204 | result[attr] = value.to_dict() 205 | elif isinstance(value, dict): 206 | result[attr] = dict(map( 207 | lambda item: (item[0], item[1].to_dict()) 208 | if hasattr(item[1], "to_dict") else item, 209 | value.items() 210 | )) 211 | else: 212 | result[attr] = value 213 | 214 | return result 215 | 216 | def to_str(self): 217 | """Returns the string representation of the model""" 218 | return pprint.pformat(self.to_dict()) 219 | 220 | def __repr__(self): 221 | """For `print` and `pprint`""" 222 | return self.to_str() 223 | 224 | def __eq__(self, other): 225 | """Returns true if both objects are equal""" 226 | if not isinstance(other, PrimitiveConstraint): 227 | return False 228 | 229 | return self.to_dict() == other.to_dict() 230 | 231 | def __ne__(self, other): 232 | """Returns true if both objects are not equal""" 233 | if not isinstance(other, PrimitiveConstraint): 234 | return True 235 | 236 | return self.to_dict() != other.to_dict() 237 | -------------------------------------------------------------------------------- /sysml_v2_api_client/models/query.py: -------------------------------------------------------------------------------- 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 Query(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 | 'type': 'str', 38 | 'owning_project': 'BranchOwningProject', 39 | 'scope': 'list[DataIdentity]', 40 | 'select': 'list[str]', 41 | 'where': 'Constraint' 42 | } 43 | 44 | attribute_map = { 45 | 'id': '@id', 46 | 'type': '@type', 47 | 'owning_project': 'owningProject', 48 | 'scope': 'scope', 49 | 'select': 'select', 50 | 'where': 'where' 51 | } 52 | 53 | def __init__(self, id=None, type=None, owning_project=None, scope=None, select=None, where=None, local_vars_configuration=None): # noqa: E501 54 | """Query - a model defined in OpenAPI""" # noqa: E501 55 | if local_vars_configuration is None: 56 | local_vars_configuration = Configuration() 57 | self.local_vars_configuration = local_vars_configuration 58 | 59 | self._id = None 60 | self._type = None 61 | self._owning_project = None 62 | self._scope = None 63 | self._select = None 64 | self._where = None 65 | self.discriminator = None 66 | 67 | if id is not None: 68 | self.id = id 69 | if type is not None: 70 | self.type = type 71 | if owning_project is not None: 72 | self.owning_project = owning_project 73 | if scope is not None: 74 | self.scope = scope 75 | if select is not None: 76 | self.select = select 77 | if where is not None: 78 | self.where = where 79 | 80 | @property 81 | def id(self): 82 | """Gets the id of this Query. # noqa: E501 83 | 84 | 85 | :return: The id of this Query. # noqa: E501 86 | :rtype: str 87 | """ 88 | return self._id 89 | 90 | @id.setter 91 | def id(self, id): 92 | """Sets the id of this Query. 93 | 94 | 95 | :param id: The id of this Query. # noqa: E501 96 | :type: str 97 | """ 98 | 99 | self._id = id 100 | 101 | @property 102 | def type(self): 103 | """Gets the type of this Query. # noqa: E501 104 | 105 | 106 | :return: The type of this Query. # noqa: E501 107 | :rtype: str 108 | """ 109 | return self._type 110 | 111 | @type.setter 112 | def type(self, type): 113 | """Sets the type of this Query. 114 | 115 | 116 | :param type: The type of this Query. # noqa: E501 117 | :type: str 118 | """ 119 | allowed_values = ["Query"] # noqa: E501 120 | if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 121 | raise ValueError( 122 | "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 123 | .format(type, allowed_values) 124 | ) 125 | 126 | self._type = type 127 | 128 | @property 129 | def owning_project(self): 130 | """Gets the owning_project of this Query. # noqa: E501 131 | 132 | 133 | :return: The owning_project of this Query. # noqa: E501 134 | :rtype: BranchOwningProject 135 | """ 136 | return self._owning_project 137 | 138 | @owning_project.setter 139 | def owning_project(self, owning_project): 140 | """Sets the owning_project of this Query. 141 | 142 | 143 | :param owning_project: The owning_project of this Query. # noqa: E501 144 | :type: BranchOwningProject 145 | """ 146 | 147 | self._owning_project = owning_project 148 | 149 | @property 150 | def scope(self): 151 | """Gets the scope of this Query. # noqa: E501 152 | 153 | 154 | :return: The scope of this Query. # noqa: E501 155 | :rtype: list[DataIdentity] 156 | """ 157 | return self._scope 158 | 159 | @scope.setter 160 | def scope(self, scope): 161 | """Sets the scope of this Query. 162 | 163 | 164 | :param scope: The scope of this Query. # noqa: E501 165 | :type: list[DataIdentity] 166 | """ 167 | 168 | self._scope = scope 169 | 170 | @property 171 | def select(self): 172 | """Gets the select of this Query. # noqa: E501 173 | 174 | 175 | :return: The select of this Query. # noqa: E501 176 | :rtype: list[str] 177 | """ 178 | return self._select 179 | 180 | @select.setter 181 | def select(self, select): 182 | """Sets the select of this Query. 183 | 184 | 185 | :param select: The select of this Query. # noqa: E501 186 | :type: list[str] 187 | """ 188 | 189 | self._select = select 190 | 191 | @property 192 | def where(self): 193 | """Gets the where of this Query. # noqa: E501 194 | 195 | 196 | :return: The where of this Query. # noqa: E501 197 | :rtype: Constraint 198 | """ 199 | return self._where 200 | 201 | @where.setter 202 | def where(self, where): 203 | """Sets the where of this Query. 204 | 205 | 206 | :param where: The where of this Query. # noqa: E501 207 | :type: Constraint 208 | """ 209 | 210 | self._where = where 211 | 212 | def to_dict(self): 213 | """Returns the model properties as a dict""" 214 | result = {} 215 | 216 | for attr, _ in six.iteritems(self.openapi_types): 217 | value = getattr(self, attr) 218 | if isinstance(value, list): 219 | result[attr] = list(map( 220 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 221 | value 222 | )) 223 | elif hasattr(value, "to_dict"): 224 | result[attr] = value.to_dict() 225 | elif isinstance(value, dict): 226 | result[attr] = dict(map( 227 | lambda item: (item[0], item[1].to_dict()) 228 | if hasattr(item[1], "to_dict") else item, 229 | value.items() 230 | )) 231 | else: 232 | result[attr] = value 233 | 234 | return result 235 | 236 | def to_str(self): 237 | """Returns the string representation of the model""" 238 | return pprint.pformat(self.to_dict()) 239 | 240 | def __repr__(self): 241 | """For `print` and `pprint`""" 242 | return self.to_str() 243 | 244 | def __eq__(self, other): 245 | """Returns true if both objects are equal""" 246 | if not isinstance(other, Query): 247 | return False 248 | 249 | return self.to_dict() == other.to_dict() 250 | 251 | def __ne__(self, other): 252 | """Returns true if both objects are not equal""" 253 | if not isinstance(other, Query): 254 | return True 255 | 256 | return self.to_dict() != other.to_dict() 257 | -------------------------------------------------------------------------------- /docs/CommitApi.md: -------------------------------------------------------------------------------- 1 | # sysml_v2_api_client.CommitApi 2 | 3 | All URIs are relative to *http://localhost* 4 | 5 | Method | HTTP request | Description 6 | ------------- | ------------- | ------------- 7 | [**get_commit_by_project_and_id**](CommitApi.md#get_commit_by_project_and_id) | **GET** /projects/{projectId}/commits/{commitId} | Get commit by project and ID 8 | [**get_commits_by_project**](CommitApi.md#get_commits_by_project) | **GET** /projects/{projectId}/commits | Get commits by project 9 | [**post_commit_by_project**](CommitApi.md#post_commit_by_project) | **POST** /projects/{projectId}/commits | Create commit by project 10 | 11 | 12 | # **get_commit_by_project_and_id** 13 | > Commit get_commit_by_project_and_id(project_id, commit_id) 14 | 15 | Get commit by project and ID 16 | 17 | ### Example 18 | 19 | ```python 20 | from __future__ import print_function 21 | import time 22 | import sysml_v2_api_client 23 | from sysml_v2_api_client.rest import ApiException 24 | from pprint import pprint 25 | # Defining the host is optional and defaults to http://localhost 26 | # See configuration.py for a list of all supported configuration parameters. 27 | configuration = sysml_v2_api_client.Configuration( 28 | host = "http://localhost" 29 | ) 30 | 31 | 32 | # Enter a context with an instance of the API client 33 | with sysml_v2_api_client.ApiClient() as api_client: 34 | # Create an instance of the API class 35 | api_instance = sysml_v2_api_client.CommitApi(api_client) 36 | project_id = 'project_id_example' # str | ID of the project 37 | commit_id = 'commit_id_example' # str | ID of the commit 38 | 39 | try: 40 | # Get commit by project and ID 41 | api_response = api_instance.get_commit_by_project_and_id(project_id, commit_id) 42 | pprint(api_response) 43 | except ApiException as e: 44 | print("Exception when calling CommitApi->get_commit_by_project_and_id: %s\n" % e) 45 | ``` 46 | 47 | ### Parameters 48 | 49 | Name | Type | Description | Notes 50 | ------------- | ------------- | ------------- | ------------- 51 | **project_id** | [**str**](.md)| ID of the project | 52 | **commit_id** | [**str**](.md)| ID of the commit | 53 | 54 | ### Return type 55 | 56 | [**Commit**](Commit.md) 57 | 58 | ### Authorization 59 | 60 | No authorization required 61 | 62 | ### HTTP request headers 63 | 64 | - **Content-Type**: Not defined 65 | - **Accept**: application/json, application/ld+json 66 | 67 | ### HTTP response details 68 | | Status code | Description | Response headers | 69 | |-------------|-------------|------------------| 70 | **200** | Ok | - | 71 | **404** | Not found. | - | 72 | **415** | The requested content type is not acceptable. | - | 73 | **500** | Internal server error. | - | 74 | **0** | Unexpected response. | - | 75 | 76 | [[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) 77 | 78 | # **get_commits_by_project** 79 | > list[Commit] get_commits_by_project(project_id, page_after=page_after, page_before=page_before, page_size=page_size) 80 | 81 | Get commits by project 82 | 83 | ### Example 84 | 85 | ```python 86 | from __future__ import print_function 87 | import time 88 | import sysml_v2_api_client 89 | from sysml_v2_api_client.rest import ApiException 90 | from pprint import pprint 91 | # Defining the host is optional and defaults to http://localhost 92 | # See configuration.py for a list of all supported configuration parameters. 93 | configuration = sysml_v2_api_client.Configuration( 94 | host = "http://localhost" 95 | ) 96 | 97 | 98 | # Enter a context with an instance of the API client 99 | with sysml_v2_api_client.ApiClient() as api_client: 100 | # Create an instance of the API class 101 | api_instance = sysml_v2_api_client.CommitApi(api_client) 102 | project_id = 'project_id_example' # str | ID of the project 103 | page_after = 'page_after_example' # str | Page after (optional) 104 | page_before = 'page_before_example' # str | Page before (optional) 105 | page_size = 56 # int | Page size (optional) 106 | 107 | try: 108 | # Get commits by project 109 | api_response = api_instance.get_commits_by_project(project_id, page_after=page_after, page_before=page_before, page_size=page_size) 110 | pprint(api_response) 111 | except ApiException as e: 112 | print("Exception when calling CommitApi->get_commits_by_project: %s\n" % e) 113 | ``` 114 | 115 | ### Parameters 116 | 117 | Name | Type | Description | Notes 118 | ------------- | ------------- | ------------- | ------------- 119 | **project_id** | [**str**](.md)| ID of the project | 120 | **page_after** | **str**| Page after | [optional] 121 | **page_before** | **str**| Page before | [optional] 122 | **page_size** | **int**| Page size | [optional] 123 | 124 | ### Return type 125 | 126 | [**list[Commit]**](Commit.md) 127 | 128 | ### Authorization 129 | 130 | No authorization required 131 | 132 | ### HTTP request headers 133 | 134 | - **Content-Type**: Not defined 135 | - **Accept**: application/json, application/ld+json 136 | 137 | ### HTTP response details 138 | | Status code | Description | Response headers | 139 | |-------------|-------------|------------------| 140 | **200** | Ok | - | 141 | **404** | Not found. | - | 142 | **415** | The requested content type is not acceptable. | - | 143 | **500** | Internal server error. | - | 144 | **0** | Unexpected response. | - | 145 | 146 | [[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) 147 | 148 | # **post_commit_by_project** 149 | > Commit post_commit_by_project(project_id, body, branch_id=branch_id) 150 | 151 | Create commit by project 152 | 153 | ### Example 154 | 155 | ```python 156 | from __future__ import print_function 157 | import time 158 | import sysml_v2_api_client 159 | from sysml_v2_api_client.rest import ApiException 160 | from pprint import pprint 161 | # Defining the host is optional and defaults to http://localhost 162 | # See configuration.py for a list of all supported configuration parameters. 163 | configuration = sysml_v2_api_client.Configuration( 164 | host = "http://localhost" 165 | ) 166 | 167 | 168 | # Enter a context with an instance of the API client 169 | with sysml_v2_api_client.ApiClient() as api_client: 170 | # Create an instance of the API class 171 | api_instance = sysml_v2_api_client.CommitApi(api_client) 172 | project_id = 'project_id_example' # str | ID of the project 173 | body = sysml_v2_api_client.Commit() # Commit | 174 | branch_id = 'branch_id_example' # str | ID of the branch - project's default branch if unspecified (optional) 175 | 176 | try: 177 | # Create commit by project 178 | api_response = api_instance.post_commit_by_project(project_id, body, branch_id=branch_id) 179 | pprint(api_response) 180 | except ApiException as e: 181 | print("Exception when calling CommitApi->post_commit_by_project: %s\n" % e) 182 | ``` 183 | 184 | ### Parameters 185 | 186 | Name | Type | Description | Notes 187 | ------------- | ------------- | ------------- | ------------- 188 | **project_id** | [**str**](.md)| ID of the project | 189 | **body** | [**Commit**](Commit.md)| | 190 | **branch_id** | [**str**](.md)| ID of the branch - project's default branch if unspecified | [optional] 191 | 192 | ### Return type 193 | 194 | [**Commit**](Commit.md) 195 | 196 | ### Authorization 197 | 198 | No authorization required 199 | 200 | ### HTTP request headers 201 | 202 | - **Content-Type**: application/json 203 | - **Accept**: application/json, application/ld+json 204 | 205 | ### HTTP response details 206 | | Status code | Description | Response headers | 207 | |-------------|-------------|------------------| 208 | **201** | Created | - | 209 | **415** | The requested content type is not acceptable. | - | 210 | **500** | Internal server error. | - | 211 | **0** | Unexpected response. | - | 212 | 213 | [[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) 214 | 215 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # sysml-v2-api-client 2 | REST/HTTP binding (PSM) for the SysML v2 standard API. 3 | 4 | This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: 5 | 6 | - API version: 1.0.0 7 | - Package version: 2021-09 8 | - Build package: org.openapitools.codegen.languages.PythonClientCodegen 9 | 10 | ## Requirements. 11 | 12 | Python 2.7 and 3.4+ 13 | 14 | ## Installation & Usage 15 | ### pip install 16 | 17 | If the python package is hosted on a repository, you can install directly using: 18 | 19 | ```sh 20 | pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git 21 | ``` 22 | (you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) 23 | 24 | Then import the package: 25 | ```python 26 | import sysml_v2_api_client 27 | ``` 28 | 29 | ### Setuptools 30 | 31 | Install via [Setuptools](http://pypi.python.org/pypi/setuptools). 32 | 33 | ```sh 34 | python setup.py install --user 35 | ``` 36 | (or `sudo python setup.py install` to install the package for all users) 37 | 38 | Then import the package: 39 | ```python 40 | import sysml_v2_api_client 41 | ``` 42 | 43 | ## Getting Started 44 | 45 | Please follow the [installation procedure](#installation--usage) and then run the following: 46 | 47 | ```python 48 | from __future__ import print_function 49 | 50 | import time 51 | import sysml_v2_api_client 52 | from sysml_v2_api_client.rest import ApiException 53 | from pprint import pprint 54 | 55 | # Defining the host is optional and defaults to http://localhost 56 | # See configuration.py for a list of all supported configuration parameters. 57 | configuration = sysml_v2_api_client.Configuration( 58 | host = "http://localhost" 59 | ) 60 | 61 | 62 | 63 | # Enter a context with an instance of the API client 64 | with sysml_v2_api_client.ApiClient(configuration) as api_client: 65 | # Create an instance of the API class 66 | api_instance = sysml_v2_api_client.BranchApi(api_client) 67 | project_id = 'project_id_example' # str | ID of the project 68 | branch_id = 'branch_id_example' # str | ID of the branch 69 | 70 | try: 71 | # Delete branch by project and ID 72 | api_response = api_instance.delete_branch_by_project_and_id(project_id, branch_id) 73 | pprint(api_response) 74 | except ApiException as e: 75 | print("Exception when calling BranchApi->delete_branch_by_project_and_id: %s\n" % e) 76 | 77 | ``` 78 | 79 | ## Documentation for API Endpoints 80 | 81 | All URIs are relative to *http://localhost* 82 | 83 | Class | Method | HTTP request | Description 84 | ------------ | ------------- | ------------- | ------------- 85 | *BranchApi* | [**delete_branch_by_project_and_id**](docs/BranchApi.md#delete_branch_by_project_and_id) | **DELETE** /projects/{projectId}/branches/{branchId} | Delete branch by project and ID 86 | *BranchApi* | [**get_branches_by_project**](docs/BranchApi.md#get_branches_by_project) | **GET** /projects/{projectId}/branches | Get branches by project 87 | *BranchApi* | [**get_branches_by_project_and_id**](docs/BranchApi.md#get_branches_by_project_and_id) | **GET** /projects/{projectId}/branches/{branchId} | Get branch by project and ID 88 | *BranchApi* | [**post_branch_by_project**](docs/BranchApi.md#post_branch_by_project) | **POST** /projects/{projectId}/branches | Create branch by project 89 | *CommitApi* | [**get_commit_by_project_and_id**](docs/CommitApi.md#get_commit_by_project_and_id) | **GET** /projects/{projectId}/commits/{commitId} | Get commit by project and ID 90 | *CommitApi* | [**get_commits_by_project**](docs/CommitApi.md#get_commits_by_project) | **GET** /projects/{projectId}/commits | Get commits by project 91 | *CommitApi* | [**post_commit_by_project**](docs/CommitApi.md#post_commit_by_project) | **POST** /projects/{projectId}/commits | Create commit by project 92 | *ElementApi* | [**get_element_by_project_commit_id**](docs/ElementApi.md#get_element_by_project_commit_id) | **GET** /projects/{projectId}/commits/{commitId}/elements/{elementId} | Get element by project, commit and ID 93 | *ElementApi* | [**get_elements_by_project_commit**](docs/ElementApi.md#get_elements_by_project_commit) | **GET** /projects/{projectId}/commits/{commitId}/elements | Get elements by project and commit 94 | *ElementApi* | [**get_roots_by_project_commit**](docs/ElementApi.md#get_roots_by_project_commit) | **GET** /projects/{projectId}/commits/{commitId}/roots | Get root elements by project and commit 95 | *ProjectApi* | [**delete_project_by_id**](docs/ProjectApi.md#delete_project_by_id) | **DELETE** /projects/{projectId} | Delete project by ID 96 | *ProjectApi* | [**get_project_by_id**](docs/ProjectApi.md#get_project_by_id) | **GET** /projects/{projectId} | Get project by ID 97 | *ProjectApi* | [**get_projects**](docs/ProjectApi.md#get_projects) | **GET** /projects | Get projects 98 | *ProjectApi* | [**post_project**](docs/ProjectApi.md#post_project) | **POST** /projects | Create project 99 | *ProjectApi* | [**put_project_by_id**](docs/ProjectApi.md#put_project_by_id) | **PUT** /projects/{projectId} | Update project by ID 100 | *QueryApi* | [**delete_query_by_project_and_id**](docs/QueryApi.md#delete_query_by_project_and_id) | **DELETE** /projects/{projectId}/queries/{queryId} | Delete query by project and ID 101 | *QueryApi* | [**get_queries_by_project**](docs/QueryApi.md#get_queries_by_project) | **GET** /projects/{projectId}/queries | Get queries by project 102 | *QueryApi* | [**get_query_by_project_and_id**](docs/QueryApi.md#get_query_by_project_and_id) | **GET** /projects/{projectId}/queries/{queryId} | Get query by project and ID 103 | *QueryApi* | [**get_query_results_by_project_id_query**](docs/QueryApi.md#get_query_results_by_project_id_query) | **GET** /projects/{projectId}/query-results | Get query results by project and query definition 104 | *QueryApi* | [**get_query_results_by_project_id_query_id**](docs/QueryApi.md#get_query_results_by_project_id_query_id) | **GET** /projects/{projectId}/queries/{queryId}/results | Get query results by project and query 105 | *QueryApi* | [**get_query_results_by_project_id_query_post**](docs/QueryApi.md#get_query_results_by_project_id_query_post) | **POST** /projects/{projectId}/query-results | Get query results by project and query definition via POST 106 | *QueryApi* | [**post_query_by_project**](docs/QueryApi.md#post_query_by_project) | **POST** /projects/{projectId}/queries | Create query by project 107 | *RelationshipApi* | [**get_relationships_by_project_commit_related_element**](docs/RelationshipApi.md#get_relationships_by_project_commit_related_element) | **GET** /projects/{projectId}/commits/{commitId}/elements/{relatedElementId}/relationships | Get relationships by project, commit, and related element 108 | *TagApi* | [**delete_tag_by_project_and_id**](docs/TagApi.md#delete_tag_by_project_and_id) | **DELETE** /projects/{projectId}/tags/{tagId} | Delete tag by project and ID 109 | *TagApi* | [**get_tag_by_project_and_id**](docs/TagApi.md#get_tag_by_project_and_id) | **GET** /projects/{projectId}/tags/{tagId} | Get tag by project and ID 110 | *TagApi* | [**get_tags_by_project**](docs/TagApi.md#get_tags_by_project) | **GET** /projects/{projectId}/tags | Get tags by project 111 | *TagApi* | [**post_tag_by_project**](docs/TagApi.md#post_tag_by_project) | **POST** /projects/{projectId}/tags | Create tag by project 112 | 113 | 114 | ## Documentation For Models 115 | 116 | - [Branch](docs/Branch.md) 117 | - [BranchHead](docs/BranchHead.md) 118 | - [BranchOwningProject](docs/BranchOwningProject.md) 119 | - [Commit](docs/Commit.md) 120 | - [CompositeConstraint](docs/CompositeConstraint.md) 121 | - [Constraint](docs/Constraint.md) 122 | - [Data](docs/Data.md) 123 | - [DataIdentity](docs/DataIdentity.md) 124 | - [DataVersion](docs/DataVersion.md) 125 | - [Element](docs/Element.md) 126 | - [Error](docs/Error.md) 127 | - [Identified](docs/Identified.md) 128 | - [PrimitiveConstraint](docs/PrimitiveConstraint.md) 129 | - [Project](docs/Project.md) 130 | - [ProjectDefaultBranch](docs/ProjectDefaultBranch.md) 131 | - [Query](docs/Query.md) 132 | - [Relationship](docs/Relationship.md) 133 | - [Tag](docs/Tag.md) 134 | 135 | 136 | ## Documentation For Authorization 137 | 138 | All endpoints do not require authorization. 139 | 140 | ## Author 141 | 142 | 143 | 144 | 145 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU LESSER GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | 9 | This version of the GNU Lesser General Public License incorporates 10 | the terms and conditions of version 3 of the GNU General Public 11 | License, supplemented by the additional permissions listed below. 12 | 13 | 0. Additional Definitions. 14 | 15 | As used herein, "this License" refers to version 3 of the GNU Lesser 16 | General Public License, and the "GNU GPL" refers to version 3 of the GNU 17 | General Public License. 18 | 19 | "The Library" refers to a covered work governed by this License, 20 | other than an Application or a Combined Work as defined below. 21 | 22 | An "Application" is any work that makes use of an interface provided 23 | by the Library, but which is not otherwise based on the Library. 24 | Defining a subclass of a class defined by the Library is deemed a mode 25 | of using an interface provided by the Library. 26 | 27 | A "Combined Work" is a work produced by combining or linking an 28 | Application with the Library. The particular version of the Library 29 | with which the Combined Work was made is also called the "Linked 30 | Version". 31 | 32 | The "Minimal Corresponding Source" for a Combined Work means the 33 | Corresponding Source for the Combined Work, excluding any source code 34 | for portions of the Combined Work that, considered in isolation, are 35 | based on the Application, and not on the Linked Version. 36 | 37 | The "Corresponding Application Code" for a Combined Work means the 38 | object code and/or source code for the Application, including any data 39 | and utility programs needed for reproducing the Combined Work from the 40 | Application, but excluding the System Libraries of the Combined Work. 41 | 42 | 1. Exception to Section 3 of the GNU GPL. 43 | 44 | You may convey a covered work under sections 3 and 4 of this License 45 | without being bound by section 3 of the GNU GPL. 46 | 47 | 2. Conveying Modified Versions. 48 | 49 | If you modify a copy of the Library, and, in your modifications, a 50 | facility refers to a function or data to be supplied by an Application 51 | that uses the facility (other than as an argument passed when the 52 | facility is invoked), then you may convey a copy of the modified 53 | version: 54 | 55 | a) under this License, provided that you make a good faith effort to 56 | ensure that, in the event an Application does not supply the 57 | function or data, the facility still operates, and performs 58 | whatever part of its purpose remains meaningful, or 59 | 60 | b) under the GNU GPL, with none of the additional permissions of 61 | this License applicable to that copy. 62 | 63 | 3. Object Code Incorporating Material from Library Header Files. 64 | 65 | The object code form of an Application may incorporate material from 66 | a header file that is part of the Library. You may convey such object 67 | code under terms of your choice, provided that, if the incorporated 68 | material is not limited to numerical parameters, data structure 69 | layouts and accessors, or small macros, inline functions and templates 70 | (ten or fewer lines in length), you do both of the following: 71 | 72 | a) Give prominent notice with each copy of the object code that the 73 | Library is used in it and that the Library and its use are 74 | covered by this License. 75 | 76 | b) Accompany the object code with a copy of the GNU GPL and this license 77 | document. 78 | 79 | 4. Combined Works. 80 | 81 | You may convey a Combined Work under terms of your choice that, 82 | taken together, effectively do not restrict modification of the 83 | portions of the Library contained in the Combined Work and reverse 84 | engineering for debugging such modifications, if you also do each of 85 | the following: 86 | 87 | a) Give prominent notice with each copy of the Combined Work that 88 | the Library is used in it and that the Library and its use are 89 | covered by this License. 90 | 91 | b) Accompany the Combined Work with a copy of the GNU GPL and this license 92 | document. 93 | 94 | c) For a Combined Work that displays copyright notices during 95 | execution, include the copyright notice for the Library among 96 | these notices, as well as a reference directing the user to the 97 | copies of the GNU GPL and this license document. 98 | 99 | d) Do one of the following: 100 | 101 | 0) Convey the Minimal Corresponding Source under the terms of this 102 | License, and the Corresponding Application Code in a form 103 | suitable for, and under terms that permit, the user to 104 | recombine or relink the Application with a modified version of 105 | the Linked Version to produce a modified Combined Work, in the 106 | manner specified by section 6 of the GNU GPL for conveying 107 | Corresponding Source. 108 | 109 | 1) Use a suitable shared library mechanism for linking with the 110 | Library. A suitable mechanism is one that (a) uses at run time 111 | a copy of the Library already present on the user's computer 112 | system, and (b) will operate properly with a modified version 113 | of the Library that is interface-compatible with the Linked 114 | Version. 115 | 116 | e) Provide Installation Information, but only if you would otherwise 117 | be required to provide such information under section 6 of the 118 | GNU GPL, and only to the extent that such information is 119 | necessary to install and execute a modified version of the 120 | Combined Work produced by recombining or relinking the 121 | Application with a modified version of the Linked Version. (If 122 | you use option 4d0, the Installation Information must accompany 123 | the Minimal Corresponding Source and Corresponding Application 124 | Code. If you use option 4d1, you must provide the Installation 125 | Information in the manner specified by section 6 of the GNU GPL 126 | for conveying Corresponding Source.) 127 | 128 | 5. Combined Libraries. 129 | 130 | You may place library facilities that are a work based on the 131 | Library side by side in a single library together with other library 132 | facilities that are not Applications and are not covered by this 133 | License, and convey such a combined library under terms of your 134 | choice, if you do both of the following: 135 | 136 | a) Accompany the combined library with a copy of the same work based 137 | on the Library, uncombined with any other library facilities, 138 | conveyed under the terms of this License. 139 | 140 | b) Give prominent notice with the combined library that part of it 141 | is a work based on the Library, and explaining where to find the 142 | accompanying uncombined form of the same work. 143 | 144 | 6. Revised Versions of the GNU Lesser General Public License. 145 | 146 | The Free Software Foundation may publish revised and/or new versions 147 | of the GNU Lesser General Public License from time to time. Such new 148 | versions will be similar in spirit to the present version, but may 149 | differ in detail to address new problems or concerns. 150 | 151 | Each version is given a distinguishing version number. If the 152 | Library as you received it specifies that a certain numbered version 153 | of the GNU Lesser General Public License "or any later version" 154 | applies to it, you have the option of following the terms and 155 | conditions either of that published version or of any later version 156 | published by the Free Software Foundation. If the Library as you 157 | received it does not specify a version number of the GNU Lesser 158 | General Public License, you may choose any version of the GNU Lesser 159 | General Public License ever published by the Free Software Foundation. 160 | 161 | If the Library as you received it specifies that a proxy can decide 162 | whether future versions of the GNU Lesser General Public License shall 163 | apply, that proxy's public statement of acceptance of any version is 164 | permanent authorization for you to choose that version for the 165 | Library. 166 | -------------------------------------------------------------------------------- /sysml_v2_api_client/models/branch.py: -------------------------------------------------------------------------------- 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 Branch(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 | 'type': 'str', 38 | 'head': 'BranchHead', 39 | 'name': 'str', 40 | 'owning_project': 'BranchOwningProject', 41 | 'referenced_commit': 'BranchHead', 42 | 'timestamp': 'datetime' 43 | } 44 | 45 | attribute_map = { 46 | 'id': '@id', 47 | 'type': '@type', 48 | 'head': 'head', 49 | 'name': 'name', 50 | 'owning_project': 'owningProject', 51 | 'referenced_commit': 'referencedCommit', 52 | 'timestamp': 'timestamp' 53 | } 54 | 55 | def __init__(self, id=None, type=None, head=None, name=None, owning_project=None, referenced_commit=None, timestamp=None, local_vars_configuration=None): # noqa: E501 56 | """Branch - a model defined in OpenAPI""" # noqa: E501 57 | if local_vars_configuration is None: 58 | local_vars_configuration = Configuration() 59 | self.local_vars_configuration = local_vars_configuration 60 | 61 | self._id = None 62 | self._type = None 63 | self._head = None 64 | self._name = None 65 | self._owning_project = None 66 | self._referenced_commit = None 67 | self._timestamp = None 68 | self.discriminator = None 69 | 70 | if id is not None: 71 | self.id = id 72 | if type is not None: 73 | self.type = type 74 | if head is not None: 75 | self.head = head 76 | if name is not None: 77 | self.name = name 78 | if owning_project is not None: 79 | self.owning_project = owning_project 80 | if referenced_commit is not None: 81 | self.referenced_commit = referenced_commit 82 | if timestamp is not None: 83 | self.timestamp = timestamp 84 | 85 | @property 86 | def id(self): 87 | """Gets the id of this Branch. # noqa: E501 88 | 89 | 90 | :return: The id of this Branch. # noqa: E501 91 | :rtype: str 92 | """ 93 | return self._id 94 | 95 | @id.setter 96 | def id(self, id): 97 | """Sets the id of this Branch. 98 | 99 | 100 | :param id: The id of this Branch. # noqa: E501 101 | :type: str 102 | """ 103 | 104 | self._id = id 105 | 106 | @property 107 | def type(self): 108 | """Gets the type of this Branch. # noqa: E501 109 | 110 | 111 | :return: The type of this Branch. # noqa: E501 112 | :rtype: str 113 | """ 114 | return self._type 115 | 116 | @type.setter 117 | def type(self, type): 118 | """Sets the type of this Branch. 119 | 120 | 121 | :param type: The type of this Branch. # noqa: E501 122 | :type: str 123 | """ 124 | allowed_values = ["Branch"] # noqa: E501 125 | if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 126 | raise ValueError( 127 | "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 128 | .format(type, allowed_values) 129 | ) 130 | 131 | self._type = type 132 | 133 | @property 134 | def head(self): 135 | """Gets the head of this Branch. # noqa: E501 136 | 137 | 138 | :return: The head of this Branch. # noqa: E501 139 | :rtype: BranchHead 140 | """ 141 | return self._head 142 | 143 | @head.setter 144 | def head(self, head): 145 | """Sets the head of this Branch. 146 | 147 | 148 | :param head: The head of this Branch. # noqa: E501 149 | :type: BranchHead 150 | """ 151 | 152 | self._head = head 153 | 154 | @property 155 | def name(self): 156 | """Gets the name of this Branch. # noqa: E501 157 | 158 | 159 | :return: The name of this Branch. # noqa: E501 160 | :rtype: str 161 | """ 162 | return self._name 163 | 164 | @name.setter 165 | def name(self, name): 166 | """Sets the name of this Branch. 167 | 168 | 169 | :param name: The name of this Branch. # noqa: E501 170 | :type: str 171 | """ 172 | 173 | self._name = name 174 | 175 | @property 176 | def owning_project(self): 177 | """Gets the owning_project of this Branch. # noqa: E501 178 | 179 | 180 | :return: The owning_project of this Branch. # noqa: E501 181 | :rtype: BranchOwningProject 182 | """ 183 | return self._owning_project 184 | 185 | @owning_project.setter 186 | def owning_project(self, owning_project): 187 | """Sets the owning_project of this Branch. 188 | 189 | 190 | :param owning_project: The owning_project of this Branch. # noqa: E501 191 | :type: BranchOwningProject 192 | """ 193 | 194 | self._owning_project = owning_project 195 | 196 | @property 197 | def referenced_commit(self): 198 | """Gets the referenced_commit of this Branch. # noqa: E501 199 | 200 | 201 | :return: The referenced_commit of this Branch. # noqa: E501 202 | :rtype: BranchHead 203 | """ 204 | return self._referenced_commit 205 | 206 | @referenced_commit.setter 207 | def referenced_commit(self, referenced_commit): 208 | """Sets the referenced_commit of this Branch. 209 | 210 | 211 | :param referenced_commit: The referenced_commit of this Branch. # noqa: E501 212 | :type: BranchHead 213 | """ 214 | 215 | self._referenced_commit = referenced_commit 216 | 217 | @property 218 | def timestamp(self): 219 | """Gets the timestamp of this Branch. # noqa: E501 220 | 221 | 222 | :return: The timestamp of this Branch. # noqa: E501 223 | :rtype: datetime 224 | """ 225 | return self._timestamp 226 | 227 | @timestamp.setter 228 | def timestamp(self, timestamp): 229 | """Sets the timestamp of this Branch. 230 | 231 | 232 | :param timestamp: The timestamp of this Branch. # noqa: E501 233 | :type: datetime 234 | """ 235 | 236 | self._timestamp = timestamp 237 | 238 | def to_dict(self): 239 | """Returns the model properties as a dict""" 240 | result = {} 241 | 242 | for attr, _ in six.iteritems(self.openapi_types): 243 | value = getattr(self, attr) 244 | if isinstance(value, list): 245 | result[attr] = list(map( 246 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 247 | value 248 | )) 249 | elif hasattr(value, "to_dict"): 250 | result[attr] = value.to_dict() 251 | elif isinstance(value, dict): 252 | result[attr] = dict(map( 253 | lambda item: (item[0], item[1].to_dict()) 254 | if hasattr(item[1], "to_dict") else item, 255 | value.items() 256 | )) 257 | else: 258 | result[attr] = value 259 | 260 | return result 261 | 262 | def to_str(self): 263 | """Returns the string representation of the model""" 264 | return pprint.pformat(self.to_dict()) 265 | 266 | def __repr__(self): 267 | """For `print` and `pprint`""" 268 | return self.to_str() 269 | 270 | def __eq__(self, other): 271 | """Returns true if both objects are equal""" 272 | if not isinstance(other, Branch): 273 | return False 274 | 275 | return self.to_dict() == other.to_dict() 276 | 277 | def __ne__(self, other): 278 | """Returns true if both objects are not equal""" 279 | if not isinstance(other, Branch): 280 | return True 281 | 282 | return self.to_dict() != other.to_dict() 283 | -------------------------------------------------------------------------------- /sysml_v2_api_client/models/tag.py: -------------------------------------------------------------------------------- 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 Tag(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 | 'type': 'str', 38 | 'name': 'str', 39 | 'owning_project': 'BranchOwningProject', 40 | 'referenced_commit': 'BranchHead', 41 | 'tagged_commit': 'BranchHead', 42 | 'timestamp': 'datetime' 43 | } 44 | 45 | attribute_map = { 46 | 'id': '@id', 47 | 'type': '@type', 48 | 'name': 'name', 49 | 'owning_project': 'owningProject', 50 | 'referenced_commit': 'referencedCommit', 51 | 'tagged_commit': 'taggedCommit', 52 | 'timestamp': 'timestamp' 53 | } 54 | 55 | def __init__(self, id=None, type=None, name=None, owning_project=None, referenced_commit=None, tagged_commit=None, timestamp=None, local_vars_configuration=None): # noqa: E501 56 | """Tag - a model defined in OpenAPI""" # noqa: E501 57 | if local_vars_configuration is None: 58 | local_vars_configuration = Configuration() 59 | self.local_vars_configuration = local_vars_configuration 60 | 61 | self._id = None 62 | self._type = None 63 | self._name = None 64 | self._owning_project = None 65 | self._referenced_commit = None 66 | self._tagged_commit = None 67 | self._timestamp = None 68 | self.discriminator = None 69 | 70 | if id is not None: 71 | self.id = id 72 | if type is not None: 73 | self.type = type 74 | if name is not None: 75 | self.name = name 76 | if owning_project is not None: 77 | self.owning_project = owning_project 78 | if referenced_commit is not None: 79 | self.referenced_commit = referenced_commit 80 | if tagged_commit is not None: 81 | self.tagged_commit = tagged_commit 82 | if timestamp is not None: 83 | self.timestamp = timestamp 84 | 85 | @property 86 | def id(self): 87 | """Gets the id of this Tag. # noqa: E501 88 | 89 | 90 | :return: The id of this Tag. # noqa: E501 91 | :rtype: str 92 | """ 93 | return self._id 94 | 95 | @id.setter 96 | def id(self, id): 97 | """Sets the id of this Tag. 98 | 99 | 100 | :param id: The id of this Tag. # noqa: E501 101 | :type: str 102 | """ 103 | 104 | self._id = id 105 | 106 | @property 107 | def type(self): 108 | """Gets the type of this Tag. # noqa: E501 109 | 110 | 111 | :return: The type of this Tag. # noqa: E501 112 | :rtype: str 113 | """ 114 | return self._type 115 | 116 | @type.setter 117 | def type(self, type): 118 | """Sets the type of this Tag. 119 | 120 | 121 | :param type: The type of this Tag. # noqa: E501 122 | :type: str 123 | """ 124 | allowed_values = ["Tag"] # noqa: E501 125 | if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 126 | raise ValueError( 127 | "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 128 | .format(type, allowed_values) 129 | ) 130 | 131 | self._type = type 132 | 133 | @property 134 | def name(self): 135 | """Gets the name of this Tag. # noqa: E501 136 | 137 | 138 | :return: The name of this Tag. # noqa: E501 139 | :rtype: str 140 | """ 141 | return self._name 142 | 143 | @name.setter 144 | def name(self, name): 145 | """Sets the name of this Tag. 146 | 147 | 148 | :param name: The name of this Tag. # noqa: E501 149 | :type: str 150 | """ 151 | 152 | self._name = name 153 | 154 | @property 155 | def owning_project(self): 156 | """Gets the owning_project of this Tag. # noqa: E501 157 | 158 | 159 | :return: The owning_project of this Tag. # noqa: E501 160 | :rtype: BranchOwningProject 161 | """ 162 | return self._owning_project 163 | 164 | @owning_project.setter 165 | def owning_project(self, owning_project): 166 | """Sets the owning_project of this Tag. 167 | 168 | 169 | :param owning_project: The owning_project of this Tag. # noqa: E501 170 | :type: BranchOwningProject 171 | """ 172 | 173 | self._owning_project = owning_project 174 | 175 | @property 176 | def referenced_commit(self): 177 | """Gets the referenced_commit of this Tag. # noqa: E501 178 | 179 | 180 | :return: The referenced_commit of this Tag. # noqa: E501 181 | :rtype: BranchHead 182 | """ 183 | return self._referenced_commit 184 | 185 | @referenced_commit.setter 186 | def referenced_commit(self, referenced_commit): 187 | """Sets the referenced_commit of this Tag. 188 | 189 | 190 | :param referenced_commit: The referenced_commit of this Tag. # noqa: E501 191 | :type: BranchHead 192 | """ 193 | 194 | self._referenced_commit = referenced_commit 195 | 196 | @property 197 | def tagged_commit(self): 198 | """Gets the tagged_commit of this Tag. # noqa: E501 199 | 200 | 201 | :return: The tagged_commit of this Tag. # noqa: E501 202 | :rtype: BranchHead 203 | """ 204 | return self._tagged_commit 205 | 206 | @tagged_commit.setter 207 | def tagged_commit(self, tagged_commit): 208 | """Sets the tagged_commit of this Tag. 209 | 210 | 211 | :param tagged_commit: The tagged_commit of this Tag. # noqa: E501 212 | :type: BranchHead 213 | """ 214 | 215 | self._tagged_commit = tagged_commit 216 | 217 | @property 218 | def timestamp(self): 219 | """Gets the timestamp of this Tag. # noqa: E501 220 | 221 | 222 | :return: The timestamp of this Tag. # noqa: E501 223 | :rtype: datetime 224 | """ 225 | return self._timestamp 226 | 227 | @timestamp.setter 228 | def timestamp(self, timestamp): 229 | """Sets the timestamp of this Tag. 230 | 231 | 232 | :param timestamp: The timestamp of this Tag. # noqa: E501 233 | :type: datetime 234 | """ 235 | 236 | self._timestamp = timestamp 237 | 238 | def to_dict(self): 239 | """Returns the model properties as a dict""" 240 | result = {} 241 | 242 | for attr, _ in six.iteritems(self.openapi_types): 243 | value = getattr(self, attr) 244 | if isinstance(value, list): 245 | result[attr] = list(map( 246 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 247 | value 248 | )) 249 | elif hasattr(value, "to_dict"): 250 | result[attr] = value.to_dict() 251 | elif isinstance(value, dict): 252 | result[attr] = dict(map( 253 | lambda item: (item[0], item[1].to_dict()) 254 | if hasattr(item[1], "to_dict") else item, 255 | value.items() 256 | )) 257 | else: 258 | result[attr] = value 259 | 260 | return result 261 | 262 | def to_str(self): 263 | """Returns the string representation of the model""" 264 | return pprint.pformat(self.to_dict()) 265 | 266 | def __repr__(self): 267 | """For `print` and `pprint`""" 268 | return self.to_str() 269 | 270 | def __eq__(self, other): 271 | """Returns true if both objects are equal""" 272 | if not isinstance(other, Tag): 273 | return False 274 | 275 | return self.to_dict() == other.to_dict() 276 | 277 | def __ne__(self, other): 278 | """Returns true if both objects are not equal""" 279 | if not isinstance(other, Tag): 280 | return True 281 | 282 | return self.to_dict() != other.to_dict() 283 | -------------------------------------------------------------------------------- /docs/ElementApi.md: -------------------------------------------------------------------------------- 1 | # sysml_v2_api_client.ElementApi 2 | 3 | All URIs are relative to *http://localhost* 4 | 5 | Method | HTTP request | Description 6 | ------------- | ------------- | ------------- 7 | [**get_element_by_project_commit_id**](ElementApi.md#get_element_by_project_commit_id) | **GET** /projects/{projectId}/commits/{commitId}/elements/{elementId} | Get element by project, commit and ID 8 | [**get_elements_by_project_commit**](ElementApi.md#get_elements_by_project_commit) | **GET** /projects/{projectId}/commits/{commitId}/elements | Get elements by project and commit 9 | [**get_roots_by_project_commit**](ElementApi.md#get_roots_by_project_commit) | **GET** /projects/{projectId}/commits/{commitId}/roots | Get root elements by project and commit 10 | 11 | 12 | # **get_element_by_project_commit_id** 13 | > Element get_element_by_project_commit_id(project_id, commit_id, element_id) 14 | 15 | Get element by project, commit and ID 16 | 17 | ### Example 18 | 19 | ```python 20 | from __future__ import print_function 21 | import time 22 | import sysml_v2_api_client 23 | from sysml_v2_api_client.rest import ApiException 24 | from pprint import pprint 25 | # Defining the host is optional and defaults to http://localhost 26 | # See configuration.py for a list of all supported configuration parameters. 27 | configuration = sysml_v2_api_client.Configuration( 28 | host = "http://localhost" 29 | ) 30 | 31 | 32 | # Enter a context with an instance of the API client 33 | with sysml_v2_api_client.ApiClient() as api_client: 34 | # Create an instance of the API class 35 | api_instance = sysml_v2_api_client.ElementApi(api_client) 36 | project_id = 'project_id_example' # str | ID of the project 37 | commit_id = 'commit_id_example' # str | ID of the commit 38 | element_id = 'element_id_example' # str | ID of the element 39 | 40 | try: 41 | # Get element by project, commit and ID 42 | api_response = api_instance.get_element_by_project_commit_id(project_id, commit_id, element_id) 43 | pprint(api_response) 44 | except ApiException as e: 45 | print("Exception when calling ElementApi->get_element_by_project_commit_id: %s\n" % e) 46 | ``` 47 | 48 | ### Parameters 49 | 50 | Name | Type | Description | Notes 51 | ------------- | ------------- | ------------- | ------------- 52 | **project_id** | [**str**](.md)| ID of the project | 53 | **commit_id** | [**str**](.md)| ID of the commit | 54 | **element_id** | [**str**](.md)| ID of the element | 55 | 56 | ### Return type 57 | 58 | [**Element**](Element.md) 59 | 60 | ### Authorization 61 | 62 | No authorization required 63 | 64 | ### HTTP request headers 65 | 66 | - **Content-Type**: Not defined 67 | - **Accept**: application/json, application/ld+json 68 | 69 | ### HTTP response details 70 | | Status code | Description | Response headers | 71 | |-------------|-------------|------------------| 72 | **200** | Ok | - | 73 | **404** | Not found. | - | 74 | **415** | The requested content type is not acceptable. | - | 75 | **500** | Internal server error. | - | 76 | **0** | Unexpected response. | - | 77 | 78 | [[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) 79 | 80 | # **get_elements_by_project_commit** 81 | > list[Element] get_elements_by_project_commit(project_id, commit_id, page_after=page_after, page_before=page_before, page_size=page_size) 82 | 83 | Get elements by project and commit 84 | 85 | ### Example 86 | 87 | ```python 88 | from __future__ import print_function 89 | import time 90 | import sysml_v2_api_client 91 | from sysml_v2_api_client.rest import ApiException 92 | from pprint import pprint 93 | # Defining the host is optional and defaults to http://localhost 94 | # See configuration.py for a list of all supported configuration parameters. 95 | configuration = sysml_v2_api_client.Configuration( 96 | host = "http://localhost" 97 | ) 98 | 99 | 100 | # Enter a context with an instance of the API client 101 | with sysml_v2_api_client.ApiClient() as api_client: 102 | # Create an instance of the API class 103 | api_instance = sysml_v2_api_client.ElementApi(api_client) 104 | project_id = 'project_id_example' # str | ID of the project 105 | commit_id = 'commit_id_example' # str | ID of the commit 106 | page_after = 'page_after_example' # str | Page after (optional) 107 | page_before = 'page_before_example' # str | Page before (optional) 108 | page_size = 56 # int | Page size (optional) 109 | 110 | try: 111 | # Get elements by project and commit 112 | api_response = api_instance.get_elements_by_project_commit(project_id, commit_id, page_after=page_after, page_before=page_before, page_size=page_size) 113 | pprint(api_response) 114 | except ApiException as e: 115 | print("Exception when calling ElementApi->get_elements_by_project_commit: %s\n" % e) 116 | ``` 117 | 118 | ### Parameters 119 | 120 | Name | Type | Description | Notes 121 | ------------- | ------------- | ------------- | ------------- 122 | **project_id** | [**str**](.md)| ID of the project | 123 | **commit_id** | [**str**](.md)| ID of the commit | 124 | **page_after** | **str**| Page after | [optional] 125 | **page_before** | **str**| Page before | [optional] 126 | **page_size** | **int**| Page size | [optional] 127 | 128 | ### Return type 129 | 130 | [**list[Element]**](Element.md) 131 | 132 | ### Authorization 133 | 134 | No authorization required 135 | 136 | ### HTTP request headers 137 | 138 | - **Content-Type**: Not defined 139 | - **Accept**: application/json, application/ld+json 140 | 141 | ### HTTP response details 142 | | Status code | Description | Response headers | 143 | |-------------|-------------|------------------| 144 | **200** | Ok | - | 145 | **404** | Not found. | - | 146 | **415** | The requested content type is not acceptable. | - | 147 | **500** | Internal server error. | - | 148 | **0** | Unexpected response. | - | 149 | 150 | [[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) 151 | 152 | # **get_roots_by_project_commit** 153 | > list[Element] get_roots_by_project_commit(project_id, commit_id, page_after=page_after, page_before=page_before, page_size=page_size) 154 | 155 | Get root elements by project and commit 156 | 157 | ### Example 158 | 159 | ```python 160 | from __future__ import print_function 161 | import time 162 | import sysml_v2_api_client 163 | from sysml_v2_api_client.rest import ApiException 164 | from pprint import pprint 165 | # Defining the host is optional and defaults to http://localhost 166 | # See configuration.py for a list of all supported configuration parameters. 167 | configuration = sysml_v2_api_client.Configuration( 168 | host = "http://localhost" 169 | ) 170 | 171 | 172 | # Enter a context with an instance of the API client 173 | with sysml_v2_api_client.ApiClient() as api_client: 174 | # Create an instance of the API class 175 | api_instance = sysml_v2_api_client.ElementApi(api_client) 176 | project_id = 'project_id_example' # str | ID of the project 177 | commit_id = 'commit_id_example' # str | ID of the commit 178 | page_after = 'page_after_example' # str | Page after (optional) 179 | page_before = 'page_before_example' # str | Page before (optional) 180 | page_size = 56 # int | Page size (optional) 181 | 182 | try: 183 | # Get root elements by project and commit 184 | api_response = api_instance.get_roots_by_project_commit(project_id, commit_id, page_after=page_after, page_before=page_before, page_size=page_size) 185 | pprint(api_response) 186 | except ApiException as e: 187 | print("Exception when calling ElementApi->get_roots_by_project_commit: %s\n" % e) 188 | ``` 189 | 190 | ### Parameters 191 | 192 | Name | Type | Description | Notes 193 | ------------- | ------------- | ------------- | ------------- 194 | **project_id** | [**str**](.md)| ID of the project | 195 | **commit_id** | [**str**](.md)| ID of the commit | 196 | **page_after** | **str**| Page after | [optional] 197 | **page_before** | **str**| Page before | [optional] 198 | **page_size** | **int**| Page size | [optional] 199 | 200 | ### Return type 201 | 202 | [**list[Element]**](Element.md) 203 | 204 | ### Authorization 205 | 206 | No authorization required 207 | 208 | ### HTTP request headers 209 | 210 | - **Content-Type**: Not defined 211 | - **Accept**: application/json, application/ld+json 212 | 213 | ### HTTP response details 214 | | Status code | Description | Response headers | 215 | |-------------|-------------|------------------| 216 | **200** | Ok | - | 217 | **404** | Not found. | - | 218 | **415** | The requested content type is not acceptable. | - | 219 | **500** | Internal server error. | - | 220 | **0** | Unexpected response. | - | 221 | 222 | [[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) 223 | 224 | -------------------------------------------------------------------------------- /sysml_v2_api_client/api/relationship_api.py: -------------------------------------------------------------------------------- 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 re # noqa: F401 16 | 17 | # python 2 and python 3 compatibility library 18 | import six 19 | 20 | from sysml_v2_api_client.api_client import ApiClient 21 | from sysml_v2_api_client.exceptions import ( # noqa: F401 22 | ApiTypeError, 23 | ApiValueError 24 | ) 25 | 26 | 27 | class RelationshipApi(object): 28 | """NOTE: This class is auto generated by OpenAPI Generator 29 | Ref: https://openapi-generator.tech 30 | 31 | Do not edit the class manually. 32 | """ 33 | 34 | def __init__(self, api_client=None): 35 | if api_client is None: 36 | api_client = ApiClient() 37 | self.api_client = api_client 38 | 39 | def get_relationships_by_project_commit_related_element(self, project_id, commit_id, related_element_id, **kwargs): # noqa: E501 40 | """Get relationships by project, commit, and related element # noqa: E501 41 | 42 | This method makes a synchronous HTTP request by default. To make an 43 | asynchronous HTTP request, please pass async_req=True 44 | >>> thread = api.get_relationships_by_project_commit_related_element(project_id, commit_id, related_element_id, async_req=True) 45 | >>> result = thread.get() 46 | 47 | :param async_req bool: execute request asynchronously 48 | :param str project_id: ID of the project (required) 49 | :param str commit_id: ID of the commit (required) 50 | :param str related_element_id: ID of the related element (required) 51 | :param str direction: Filter for relationships that are incoming (in), outgoing (out), or both relative to the related element 52 | :param str page_after: Page after 53 | :param str page_before: Page before 54 | :param int page_size: Page size 55 | :param _preload_content: if False, the urllib3.HTTPResponse object will 56 | be returned without reading/decoding response 57 | data. Default is True. 58 | :param _request_timeout: timeout setting for this request. If one 59 | number provided, it will be total request 60 | timeout. It can also be a pair (tuple) of 61 | (connection, read) timeouts. 62 | :return: list[Relationship] 63 | If the method is called asynchronously, 64 | returns the request thread. 65 | """ 66 | kwargs['_return_http_data_only'] = True 67 | return self.get_relationships_by_project_commit_related_element_with_http_info(project_id, commit_id, related_element_id, **kwargs) # noqa: E501 68 | 69 | def get_relationships_by_project_commit_related_element_with_http_info(self, project_id, commit_id, related_element_id, **kwargs): # noqa: E501 70 | """Get relationships by project, commit, and related element # noqa: E501 71 | 72 | This method makes a synchronous HTTP request by default. To make an 73 | asynchronous HTTP request, please pass async_req=True 74 | >>> thread = api.get_relationships_by_project_commit_related_element_with_http_info(project_id, commit_id, related_element_id, async_req=True) 75 | >>> result = thread.get() 76 | 77 | :param async_req bool: execute request asynchronously 78 | :param str project_id: ID of the project (required) 79 | :param str commit_id: ID of the commit (required) 80 | :param str related_element_id: ID of the related element (required) 81 | :param str direction: Filter for relationships that are incoming (in), outgoing (out), or both relative to the related element 82 | :param str page_after: Page after 83 | :param str page_before: Page before 84 | :param int page_size: Page size 85 | :param _return_http_data_only: response data without head status code 86 | and headers 87 | :param _preload_content: if False, the urllib3.HTTPResponse object will 88 | be returned without reading/decoding response 89 | data. Default is True. 90 | :param _request_timeout: timeout setting for this request. If one 91 | number provided, it will be total request 92 | timeout. It can also be a pair (tuple) of 93 | (connection, read) timeouts. 94 | :return: tuple(list[Relationship], status_code(int), headers(HTTPHeaderDict)) 95 | If the method is called asynchronously, 96 | returns the request thread. 97 | """ 98 | 99 | local_var_params = locals() 100 | 101 | all_params = [ 102 | 'project_id', 103 | 'commit_id', 104 | 'related_element_id', 105 | 'direction', 106 | 'page_after', 107 | 'page_before', 108 | 'page_size' 109 | ] 110 | all_params.extend( 111 | [ 112 | 'async_req', 113 | '_return_http_data_only', 114 | '_preload_content', 115 | '_request_timeout' 116 | ] 117 | ) 118 | 119 | for key, val in six.iteritems(local_var_params['kwargs']): 120 | if key not in all_params: 121 | raise ApiTypeError( 122 | "Got an unexpected keyword argument '%s'" 123 | " to method get_relationships_by_project_commit_related_element" % key 124 | ) 125 | local_var_params[key] = val 126 | del local_var_params['kwargs'] 127 | # verify the required parameter 'project_id' is set 128 | if self.api_client.client_side_validation and ('project_id' not in local_var_params or # noqa: E501 129 | local_var_params['project_id'] is None): # noqa: E501 130 | raise ApiValueError("Missing the required parameter `project_id` when calling `get_relationships_by_project_commit_related_element`") # noqa: E501 131 | # verify the required parameter 'commit_id' is set 132 | if self.api_client.client_side_validation and ('commit_id' not in local_var_params or # noqa: E501 133 | local_var_params['commit_id'] is None): # noqa: E501 134 | raise ApiValueError("Missing the required parameter `commit_id` when calling `get_relationships_by_project_commit_related_element`") # noqa: E501 135 | # verify the required parameter 'related_element_id' is set 136 | if self.api_client.client_side_validation and ('related_element_id' not in local_var_params or # noqa: E501 137 | local_var_params['related_element_id'] is None): # noqa: E501 138 | raise ApiValueError("Missing the required parameter `related_element_id` when calling `get_relationships_by_project_commit_related_element`") # noqa: E501 139 | 140 | collection_formats = {} 141 | 142 | path_params = {} 143 | if 'project_id' in local_var_params: 144 | path_params['projectId'] = local_var_params['project_id'] # noqa: E501 145 | if 'commit_id' in local_var_params: 146 | path_params['commitId'] = local_var_params['commit_id'] # noqa: E501 147 | if 'related_element_id' in local_var_params: 148 | path_params['relatedElementId'] = local_var_params['related_element_id'] # noqa: E501 149 | 150 | query_params = [] 151 | if 'direction' in local_var_params and local_var_params['direction'] is not None: # noqa: E501 152 | query_params.append(('direction', local_var_params['direction'])) # noqa: E501 153 | if 'page_after' in local_var_params and local_var_params['page_after'] is not None: # noqa: E501 154 | query_params.append(('page[after]', local_var_params['page_after'])) # noqa: E501 155 | if 'page_before' in local_var_params and local_var_params['page_before'] is not None: # noqa: E501 156 | query_params.append(('page[before]', local_var_params['page_before'])) # noqa: E501 157 | if 'page_size' in local_var_params and local_var_params['page_size'] is not None: # noqa: E501 158 | query_params.append(('page[size]', local_var_params['page_size'])) # noqa: E501 159 | 160 | header_params = {} 161 | 162 | form_params = [] 163 | local_var_files = {} 164 | 165 | body_params = None 166 | # HTTP header `Accept` 167 | header_params['Accept'] = self.api_client.select_header_accept( 168 | ['application/json', 'application/ld+json']) # noqa: E501 169 | 170 | # Authentication setting 171 | auth_settings = [] # noqa: E501 172 | 173 | return self.api_client.call_api( 174 | '/projects/{projectId}/commits/{commitId}/elements/{relatedElementId}/relationships', 'GET', 175 | path_params, 176 | query_params, 177 | header_params, 178 | body=body_params, 179 | post_params=form_params, 180 | files=local_var_files, 181 | response_type='list[Relationship]', # noqa: E501 182 | auth_settings=auth_settings, 183 | async_req=local_var_params.get('async_req'), 184 | _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 185 | _preload_content=local_var_params.get('_preload_content', True), 186 | _request_timeout=local_var_params.get('_request_timeout'), 187 | collection_formats=collection_formats) 188 | --------------------------------------------------------------------------------