list members of organization handler (#537)

This commit is contained in:
Michael Quigley
2024-12-09 14:21:49 -05:00
parent 4473571b37
commit 6fb69c59d2
18 changed files with 282 additions and 22 deletions

View File

@ -56,7 +56,7 @@ from zrok_api.models.metrics_sample import MetricsSample
from zrok_api.models.organization_add_body import OrganizationAddBody
from zrok_api.models.organization_body import OrganizationBody
from zrok_api.models.organization_body1 import OrganizationBody1
from zrok_api.models.organization_members_body import OrganizationMembersBody
from zrok_api.models.organization_list_body import OrganizationListBody
from zrok_api.models.organization_remove_body import OrganizationRemoveBody
from zrok_api.models.overview import Overview
from zrok_api.models.password_requirements import PasswordRequirements

View File

@ -943,7 +943,7 @@ class AdminApi(object):
>>> result = thread.get()
:param async_req bool
:param OrganizationMembersBody body:
:param OrganizationListBody body:
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
@ -964,7 +964,7 @@ class AdminApi(object):
>>> result = thread.get()
:param async_req bool
:param OrganizationMembersBody body:
:param OrganizationListBody body:
:return: InlineResponse2001
If the method is called asynchronously,
returns the request thread.
@ -1012,7 +1012,7 @@ class AdminApi(object):
auth_settings = ['key'] # noqa: E501
return self.api_client.call_api(
'/organization/members', 'POST',
'/organization/list', 'POST',
path_params,
query_params,
header_params,

View File

@ -46,7 +46,7 @@ from zrok_api.models.metrics_sample import MetricsSample
from zrok_api.models.organization_add_body import OrganizationAddBody
from zrok_api.models.organization_body import OrganizationBody
from zrok_api.models.organization_body1 import OrganizationBody1
from zrok_api.models.organization_members_body import OrganizationMembersBody
from zrok_api.models.organization_list_body import OrganizationListBody
from zrok_api.models.organization_remove_body import OrganizationRemoveBody
from zrok_api.models.overview import Overview
from zrok_api.models.password_requirements import PasswordRequirements

View File

@ -0,0 +1,110 @@
# coding: utf-8
"""
zrok
zrok client access # noqa: E501
OpenAPI spec version: 0.3.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class OrganizationListBody(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'token': 'str'
}
attribute_map = {
'token': 'token'
}
def __init__(self, token=None): # noqa: E501
"""OrganizationListBody - a model defined in Swagger""" # noqa: E501
self._token = None
self.discriminator = None
if token is not None:
self.token = token
@property
def token(self):
"""Gets the token of this OrganizationListBody. # noqa: E501
:return: The token of this OrganizationListBody. # noqa: E501
:rtype: str
"""
return self._token
@token.setter
def token(self, token):
"""Sets the token of this OrganizationListBody.
:param token: The token of this OrganizationListBody. # noqa: E501
:type: str
"""
self._token = token
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
if issubclass(OrganizationListBody, dict):
for key, value in self.items():
result[key] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, OrganizationListBody):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other