@@ -100,7 +100,7 @@ def create_assistant(self,
100100 string cannot contain carriage return, newline, or tab characters.
101101 :param dict headers: A `dict` containing the request headers
102102 :return: A `DetailedResponse` containing the result, headers and HTTP status code.
103- :rtype: DetailedResponse with `dict` result representing a `Assistant ` object
103+ :rtype: DetailedResponse with `dict` result representing a `AssistantData ` object
104104 """
105105
106106 headers = {}
@@ -1865,9 +1865,94 @@ def __ne__(self, other: 'AgentAvailabilityMessage') -> bool:
18651865 return not self == other
18661866
18671867
1868- class Assistant():
1868+ class AssistantCollection():
1869+ """
1870+ AssistantCollection.
1871+
1872+ :attr List[AssistantData] assistants: An array of objects describing the
1873+ assistants associated with the instance.
1874+ :attr Pagination pagination: The pagination data for the returned objects. For
1875+ more information about using pagination, see [Pagination](#pagination).
18691876 """
1870- Assistant.
1877+
1878+ def __init__(self, assistants: List['AssistantData'],
1879+ pagination: 'Pagination') -> None:
1880+ """
1881+ Initialize a AssistantCollection object.
1882+
1883+ :param List[AssistantData] assistants: An array of objects describing the
1884+ assistants associated with the instance.
1885+ :param Pagination pagination: The pagination data for the returned objects.
1886+ For more information about using pagination, see [Pagination](#pagination).
1887+ """
1888+ self.assistants = assistants
1889+ self.pagination = pagination
1890+
1891+ @classmethod
1892+ def from_dict(cls, _dict: Dict) -> 'AssistantCollection':
1893+ """Initialize a AssistantCollection object from a json dictionary."""
1894+ args = {}
1895+ if 'assistants' in _dict:
1896+ args['assistants'] = [
1897+ AssistantData.from_dict(v) for v in _dict.get('assistants')
1898+ ]
1899+ else:
1900+ raise ValueError(
1901+ 'Required property \'assistants\' not present in AssistantCollection JSON'
1902+ )
1903+ if 'pagination' in _dict:
1904+ args['pagination'] = Pagination.from_dict(_dict.get('pagination'))
1905+ else:
1906+ raise ValueError(
1907+ 'Required property \'pagination\' not present in AssistantCollection JSON'
1908+ )
1909+ return cls(**args)
1910+
1911+ @classmethod
1912+ def _from_dict(cls, _dict):
1913+ """Initialize a AssistantCollection object from a json dictionary."""
1914+ return cls.from_dict(_dict)
1915+
1916+ def to_dict(self) -> Dict:
1917+ """Return a json dictionary representing this model."""
1918+ _dict = {}
1919+ if hasattr(self, 'assistants') and self.assistants is not None:
1920+ assistants_list = []
1921+ for v in self.assistants:
1922+ if isinstance(v, dict):
1923+ assistants_list.append(v)
1924+ else:
1925+ assistants_list.append(v.to_dict())
1926+ _dict['assistants'] = assistants_list
1927+ if hasattr(self, 'pagination') and self.pagination is not None:
1928+ if isinstance(self.pagination, dict):
1929+ _dict['pagination'] = self.pagination
1930+ else:
1931+ _dict['pagination'] = self.pagination.to_dict()
1932+ return _dict
1933+
1934+ def _to_dict(self):
1935+ """Return a json dictionary representing this model."""
1936+ return self.to_dict()
1937+
1938+ def __str__(self) -> str:
1939+ """Return a `str` version of this AssistantCollection object."""
1940+ return json.dumps(self.to_dict(), indent=2)
1941+
1942+ def __eq__(self, other: 'AssistantCollection') -> bool:
1943+ """Return `true` when self and other are equal, false otherwise."""
1944+ if not isinstance(other, self.__class__):
1945+ return False
1946+ return self.__dict__ == other.__dict__
1947+
1948+ def __ne__(self, other: 'AssistantCollection') -> bool:
1949+ """Return `true` when self and other are not equal, false otherwise."""
1950+ return not self == other
1951+
1952+
1953+ class AssistantData():
1954+ """
1955+ AssistantData.
18711956
18721957 :attr str assistant_id: (optional) The unique identifier of the assistant.
18731958 :attr str name: (optional) The name of the assistant. This string cannot contain
@@ -1892,7 +1977,7 @@ def __init__(
18921977 assistant_environments: List['EnvironmentReference'] = None
18931978 ) -> None:
18941979 """
1895- Initialize a Assistant object.
1980+ Initialize a AssistantData object.
18961981
18971982 :param str language: The language of the assistant.
18981983 :param str name: (optional) The name of the assistant. This string cannot
@@ -1908,8 +1993,8 @@ def __init__(
19081993 self.assistant_environments = assistant_environments
19091994
19101995 @classmethod
1911- def from_dict(cls, _dict: Dict) -> 'Assistant ':
1912- """Initialize a Assistant object from a json dictionary."""
1996+ def from_dict(cls, _dict: Dict) -> 'AssistantData ':
1997+ """Initialize a AssistantData object from a json dictionary."""
19131998 args = {}
19141999 if 'assistant_id' in _dict:
19152000 args['assistant_id'] = _dict.get('assistant_id')
@@ -1921,7 +2006,8 @@ def from_dict(cls, _dict: Dict) -> 'Assistant':
19212006 args['language'] = _dict.get('language')
19222007 else:
19232008 raise ValueError(
1924- 'Required property \'language\' not present in Assistant JSON')
2009+ 'Required property \'language\' not present in AssistantData JSON'
2010+ )
19252011 if 'assistant_skills' in _dict:
19262012 args['assistant_skills'] = [
19272013 AssistantSkill.from_dict(v)
@@ -1936,7 +2022,7 @@ def from_dict(cls, _dict: Dict) -> 'Assistant':
19362022
19372023 @classmethod
19382024 def _from_dict(cls, _dict):
1939- """Initialize a Assistant object from a json dictionary."""
2025+ """Initialize a AssistantData object from a json dictionary."""
19402026 return cls.from_dict(_dict)
19412027
19422028 def to_dict(self) -> Dict:
@@ -1976,101 +2062,16 @@ def _to_dict(self):
19762062 return self.to_dict()
19772063
19782064 def __str__(self) -> str:
1979- """Return a `str` version of this Assistant object."""
2065+ """Return a `str` version of this AssistantData object."""
19802066 return json.dumps(self.to_dict(), indent=2)
19812067
1982- def __eq__(self, other: 'Assistant ') -> bool:
2068+ def __eq__(self, other: 'AssistantData ') -> bool:
19832069 """Return `true` when self and other are equal, false otherwise."""
19842070 if not isinstance(other, self.__class__):
19852071 return False
19862072 return self.__dict__ == other.__dict__
19872073
1988- def __ne__(self, other: 'Assistant') -> bool:
1989- """Return `true` when self and other are not equal, false otherwise."""
1990- return not self == other
1991-
1992-
1993- class AssistantCollection():
1994- """
1995- AssistantCollection.
1996-
1997- :attr List[Assistant] assistants: An array of objects describing the assistants
1998- associated with the instance.
1999- :attr Pagination pagination: The pagination data for the returned objects. For
2000- more information about using pagination, see [Pagination](#pagination).
2001- """
2002-
2003- def __init__(self, assistants: List['Assistant'],
2004- pagination: 'Pagination') -> None:
2005- """
2006- Initialize a AssistantCollection object.
2007-
2008- :param List[Assistant] assistants: An array of objects describing the
2009- assistants associated with the instance.
2010- :param Pagination pagination: The pagination data for the returned objects.
2011- For more information about using pagination, see [Pagination](#pagination).
2012- """
2013- self.assistants = assistants
2014- self.pagination = pagination
2015-
2016- @classmethod
2017- def from_dict(cls, _dict: Dict) -> 'AssistantCollection':
2018- """Initialize a AssistantCollection object from a json dictionary."""
2019- args = {}
2020- if 'assistants' in _dict:
2021- args['assistants'] = [
2022- Assistant.from_dict(v) for v in _dict.get('assistants')
2023- ]
2024- else:
2025- raise ValueError(
2026- 'Required property \'assistants\' not present in AssistantCollection JSON'
2027- )
2028- if 'pagination' in _dict:
2029- args['pagination'] = Pagination.from_dict(_dict.get('pagination'))
2030- else:
2031- raise ValueError(
2032- 'Required property \'pagination\' not present in AssistantCollection JSON'
2033- )
2034- return cls(**args)
2035-
2036- @classmethod
2037- def _from_dict(cls, _dict):
2038- """Initialize a AssistantCollection object from a json dictionary."""
2039- return cls.from_dict(_dict)
2040-
2041- def to_dict(self) -> Dict:
2042- """Return a json dictionary representing this model."""
2043- _dict = {}
2044- if hasattr(self, 'assistants') and self.assistants is not None:
2045- assistants_list = []
2046- for v in self.assistants:
2047- if isinstance(v, dict):
2048- assistants_list.append(v)
2049- else:
2050- assistants_list.append(v.to_dict())
2051- _dict['assistants'] = assistants_list
2052- if hasattr(self, 'pagination') and self.pagination is not None:
2053- if isinstance(self.pagination, dict):
2054- _dict['pagination'] = self.pagination
2055- else:
2056- _dict['pagination'] = self.pagination.to_dict()
2057- return _dict
2058-
2059- def _to_dict(self):
2060- """Return a json dictionary representing this model."""
2061- return self.to_dict()
2062-
2063- def __str__(self) -> str:
2064- """Return a `str` version of this AssistantCollection object."""
2065- return json.dumps(self.to_dict(), indent=2)
2066-
2067- def __eq__(self, other: 'AssistantCollection') -> bool:
2068- """Return `true` when self and other are equal, false otherwise."""
2069- if not isinstance(other, self.__class__):
2070- return False
2071- return self.__dict__ == other.__dict__
2072-
2073- def __ne__(self, other: 'AssistantCollection') -> bool:
2074+ def __ne__(self, other: 'AssistantData') -> bool:
20742075 """Return `true` when self and other are not equal, false otherwise."""
20752076 return not self == other
20762077
0 commit comments