-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
673 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
applications/accounts-api/backend/accounts_api/controllers/groups_controller.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import connexion | ||
import six | ||
from typing import Dict | ||
from typing import Tuple | ||
from typing import Union | ||
|
||
from accounts_api.models.group import Group # noqa: E501 | ||
from accounts_api.models.user import User # noqa: E501 | ||
from accounts_api import util | ||
|
||
|
||
def get_group(groupname): # noqa: E501 | ||
"""get_group | ||
# noqa: E501 | ||
:param groupname: | ||
:type groupname: str | ||
:rtype: Union[Group, Tuple[Group, int], Tuple[Group, int, Dict[str, str]] | ||
""" | ||
return 'do some magic!' | ||
|
||
|
||
def get_group_users(groupname): # noqa: E501 | ||
"""get_group_users | ||
# noqa: E501 | ||
:param groupname: | ||
:type groupname: str | ||
:rtype: Union[Group, Tuple[Group, int], Tuple[Group, int, Dict[str, str]] | ||
""" | ||
return 'do some magic!' | ||
|
||
|
||
def update_group(groupname, request_body): # noqa: E501 | ||
"""update_group | ||
# noqa: E501 | ||
:param groupname: | ||
:type groupname: str | ||
:param request_body: | ||
:type request_body: Dict[str, ] | ||
:rtype: Union[User, Tuple[User, int], Tuple[User, int, Dict[str, str]] | ||
""" | ||
return 'do some magic!' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
180 changes: 180 additions & 0 deletions
180
applications/accounts-api/backend/accounts_api/models/group.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,180 @@ | ||
# coding: utf-8 | ||
|
||
from __future__ import absolute_import | ||
from datetime import date, datetime # noqa: F401 | ||
|
||
from typing import List, Dict # noqa: F401 | ||
|
||
from accounts_api.models.base_model_ import Model | ||
from accounts_api import util | ||
|
||
|
||
class Group(Model): | ||
"""NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
Do not edit the class manually. | ||
""" | ||
|
||
def __init__(self, quotas=None, name=None, description=None, links=None, keywords=None): # noqa: E501 | ||
"""Group - a model defined in OpenAPI | ||
:param quotas: The quotas of this Group. # noqa: E501 | ||
:type quotas: Dict[str, object] | ||
:param name: The name of this Group. # noqa: E501 | ||
:type name: str | ||
:param description: The description of this Group. # noqa: E501 | ||
:type description: object | ||
:param links: The links of this Group. # noqa: E501 | ||
:type links: Dict[str, object] | ||
:param keywords: The keywords of this Group. # noqa: E501 | ||
:type keywords: List[str] | ||
""" | ||
self.openapi_types = { | ||
'quotas': Dict[str, object], | ||
'name': str, | ||
'description': object, | ||
'links': Dict[str, object], | ||
'keywords': List[str] | ||
} | ||
|
||
self.attribute_map = { | ||
'quotas': 'quotas', | ||
'name': 'name', | ||
'description': 'description', | ||
'links': 'links', | ||
'keywords': 'keywords' | ||
} | ||
|
||
self._quotas = quotas | ||
self._name = name | ||
self._description = description | ||
self._links = links | ||
self._keywords = keywords | ||
|
||
@classmethod | ||
def from_dict(cls, dikt) -> 'Group': | ||
"""Returns the dict as a model | ||
:param dikt: A dict. | ||
:type: dict | ||
:return: The Group of this Group. # noqa: E501 | ||
:rtype: Group | ||
""" | ||
return util.deserialize_model(dikt, cls) | ||
|
||
@property | ||
def quotas(self): | ||
"""Gets the quotas of this Group. | ||
# noqa: E501 | ||
:return: The quotas of this Group. | ||
:rtype: Dict[str, object] | ||
""" | ||
return self._quotas | ||
|
||
@quotas.setter | ||
def quotas(self, quotas): | ||
"""Sets the quotas of this Group. | ||
# noqa: E501 | ||
:param quotas: The quotas of this Group. | ||
:type quotas: Dict[str, object] | ||
""" | ||
|
||
self._quotas = quotas | ||
|
||
@property | ||
def name(self): | ||
"""Gets the name of this Group. | ||
# noqa: E501 | ||
:return: The name of this Group. | ||
:rtype: str | ||
""" | ||
return self._name | ||
|
||
@name.setter | ||
def name(self, name): | ||
"""Sets the name of this Group. | ||
# noqa: E501 | ||
:param name: The name of this Group. | ||
:type name: str | ||
""" | ||
if name is None: | ||
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 | ||
|
||
self._name = name | ||
|
||
@property | ||
def description(self): | ||
"""Gets the description of this Group. | ||
# noqa: E501 | ||
:return: The description of this Group. | ||
:rtype: object | ||
""" | ||
return self._description | ||
|
||
@description.setter | ||
def description(self, description): | ||
"""Sets the description of this Group. | ||
# noqa: E501 | ||
:param description: The description of this Group. | ||
:type description: object | ||
""" | ||
|
||
self._description = description | ||
|
||
@property | ||
def links(self): | ||
"""Gets the links of this Group. | ||
# noqa: E501 | ||
:return: The links of this Group. | ||
:rtype: Dict[str, object] | ||
""" | ||
return self._links | ||
|
||
@links.setter | ||
def links(self, links): | ||
"""Sets the links of this Group. | ||
# noqa: E501 | ||
:param links: The links of this Group. | ||
:type links: Dict[str, object] | ||
""" | ||
|
||
self._links = links | ||
|
||
@property | ||
def keywords(self): | ||
"""Gets the keywords of this Group. | ||
# noqa: E501 | ||
:return: The keywords of this Group. | ||
:rtype: List[str] | ||
""" | ||
return self._keywords | ||
|
||
@keywords.setter | ||
def keywords(self, keywords): | ||
"""Sets the keywords of this Group. | ||
# noqa: E501 | ||
:param keywords: The keywords of this Group. | ||
:type keywords: List[str] | ||
""" | ||
|
||
self._keywords = keywords |
Oops, something went wrong.