new /agent/status api endpoint (#967)

This commit is contained in:
Michael Quigley
2025-05-30 11:46:37 -04:00
parent 4491231e77
commit 2cecf14143
91 changed files with 3328 additions and 326 deletions

View File

@ -5,6 +5,9 @@ docs/AccessRequest.md
docs/AccountApi.md
docs/AddOrganizationMemberRequest.md
docs/AdminApi.md
docs/AgentApi.md
docs/AgentStatus200Response.md
docs/AgentStatusRequest.md
docs/AuthUser.md
docs/ChangePasswordRequest.md
docs/ClientVersionCheckRequest.md
@ -64,6 +67,9 @@ test/test_access_request.py
test/test_account_api.py
test/test_add_organization_member_request.py
test/test_admin_api.py
test/test_agent_api.py
test/test_agent_status200_response.py
test/test_agent_status_request.py
test/test_auth_user.py
test/test_change_password_request.py
test/test_client_version_check_request.py
@ -119,6 +125,7 @@ zrok_api/__init__.py
zrok_api/api/__init__.py
zrok_api/api/account_api.py
zrok_api/api/admin_api.py
zrok_api/api/agent_api.py
zrok_api/api/environment_api.py
zrok_api/api/metadata_api.py
zrok_api/api/share_api.py
@ -130,6 +137,8 @@ zrok_api/models/__init__.py
zrok_api/models/access201_response.py
zrok_api/models/access_request.py
zrok_api/models/add_organization_member_request.py
zrok_api/models/agent_status200_response.py
zrok_api/models/agent_status_request.py
zrok_api/models/auth_user.py
zrok_api/models/change_password_request.py
zrok_api/models/client_version_check_request.py

View File

@ -114,6 +114,7 @@ Class | Method | HTTP request | Description
*AdminApi* | [**list_organizations**](docs/AdminApi.md#list_organizations) | **GET** /organizations |
*AdminApi* | [**remove_organization_member**](docs/AdminApi.md#remove_organization_member) | **POST** /organization/remove |
*AdminApi* | [**update_frontend**](docs/AdminApi.md#update_frontend) | **PATCH** /frontend |
*AgentApi* | [**agent_status**](docs/AgentApi.md#agent_status) | **POST** /agent/status |
*EnvironmentApi* | [**disable**](docs/EnvironmentApi.md#disable) | **POST** /disable |
*EnvironmentApi* | [**enable**](docs/EnvironmentApi.md#enable) | **POST** /enable |
*MetadataApi* | [**client_version_check**](docs/MetadataApi.md#client_version_check) | **POST** /clientVersionCheck |
@ -145,6 +146,8 @@ Class | Method | HTTP request | Description
- [Access201Response](docs/Access201Response.md)
- [AccessRequest](docs/AccessRequest.md)
- [AddOrganizationMemberRequest](docs/AddOrganizationMemberRequest.md)
- [AgentStatus200Response](docs/AgentStatus200Response.md)
- [AgentStatusRequest](docs/AgentStatusRequest.md)
- [AuthUser](docs/AuthUser.md)
- [ChangePasswordRequest](docs/ChangePasswordRequest.md)
- [ClientVersionCheckRequest](docs/ClientVersionCheckRequest.md)

View File

@ -0,0 +1,86 @@
# zrok_api.AgentApi
All URIs are relative to */api/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
[**agent_status**](AgentApi.md#agent_status) | **POST** /agent/status |
# **agent_status**
> AgentStatus200Response agent_status(body=body)
### Example
* Api Key Authentication (key):
```python
import zrok_api
from zrok_api.models.agent_status200_response import AgentStatus200Response
from zrok_api.models.agent_status_request import AgentStatusRequest
from zrok_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = zrok_api.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: key
configuration.api_key['key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['key'] = 'Bearer'
# Enter a context with an instance of the API client
with zrok_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = zrok_api.AgentApi(api_client)
body = zrok_api.AgentStatusRequest() # AgentStatusRequest | (optional)
try:
api_response = api_instance.agent_status(body=body)
print("The response of AgentApi->agent_status:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentApi->agent_status: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**AgentStatusRequest**](AgentStatusRequest.md)| | [optional]
### Return type
[**AgentStatus200Response**](AgentStatus200Response.md)
### Authorization
[key](../README.md#key)
### HTTP request headers
- **Content-Type**: application/zrok.v1+json
- **Accept**: application/zrok.v1+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | ok | - |
**401** | unauthorized | - |
**500** | internal server error | - |
[[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)

View File

@ -0,0 +1,29 @@
# AgentStatus200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**shares** | [**List[Share]**](Share.md) | | [optional]
## Example
```python
from zrok_api.models.agent_status200_response import AgentStatus200Response
# TODO update the JSON string below
json = "{}"
# create an instance of AgentStatus200Response from a JSON string
agent_status200_response_instance = AgentStatus200Response.from_json(json)
# print the JSON string representation of the object
print(AgentStatus200Response.to_json())
# convert the object into a dict
agent_status200_response_dict = agent_status200_response_instance.to_dict()
# create an instance of AgentStatus200Response from a dict
agent_status200_response_from_dict = AgentStatus200Response.from_dict(agent_status200_response_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,29 @@
# AgentStatusRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**env_zid** | **str** | | [optional]
## Example
```python
from zrok_api.models.agent_status_request import AgentStatusRequest
# TODO update the JSON string below
json = "{}"
# create an instance of AgentStatusRequest from a JSON string
agent_status_request_instance = AgentStatusRequest.from_json(json)
# print the JSON string representation of the object
print(AgentStatusRequest.to_json())
# convert the object into a dict
agent_status_request_dict = agent_status_request_instance.to_dict()
# create an instance of AgentStatusRequest from a dict
agent_status_request_from_dict = AgentStatusRequest.from_dict(agent_status_request_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,37 @@
# coding: utf-8
"""
zrok
zrok client access
The version of the OpenAPI document: 1.0.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import unittest
from zrok_api.api.agent_api import AgentApi
class TestAgentApi(unittest.TestCase):
"""AgentApi unit test stubs"""
def setUp(self) -> None:
self.api = AgentApi()
def tearDown(self) -> None:
pass
def test_agent_status(self) -> None:
"""Test case for agent_status
"""
pass
if __name__ == '__main__':
unittest.main()

View File

@ -0,0 +1,69 @@
# coding: utf-8
"""
zrok
zrok client access
The version of the OpenAPI document: 1.0.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import unittest
from zrok_api.models.agent_status200_response import AgentStatus200Response
class TestAgentStatus200Response(unittest.TestCase):
"""AgentStatus200Response unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def make_instance(self, include_optional) -> AgentStatus200Response:
"""Test AgentStatus200Response
include_optional is a boolean, when False only required
params are included, when True both required and
optional params are included """
# uncomment below to create an instance of `AgentStatus200Response`
"""
model = AgentStatus200Response()
if include_optional:
return AgentStatus200Response(
shares = [
zrok_api.models.share.share(
share_token = '',
z_id = '',
share_mode = '',
backend_mode = '',
frontend_selection = '',
frontend_endpoint = '',
backend_proxy_endpoint = '',
reserved = True,
activity = [
zrok_api.models.spark_data_sample.sparkDataSample(
rx = 1.337,
tx = 1.337, )
],
limited = True,
created_at = 56,
updated_at = 56, )
]
)
else:
return AgentStatus200Response(
)
"""
def testAgentStatus200Response(self):
"""Test AgentStatus200Response"""
# inst_req_only = self.make_instance(include_optional=False)
# inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()

View File

@ -0,0 +1,51 @@
# coding: utf-8
"""
zrok
zrok client access
The version of the OpenAPI document: 1.0.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import unittest
from zrok_api.models.agent_status_request import AgentStatusRequest
class TestAgentStatusRequest(unittest.TestCase):
"""AgentStatusRequest unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def make_instance(self, include_optional) -> AgentStatusRequest:
"""Test AgentStatusRequest
include_optional is a boolean, when False only required
params are included, when True both required and
optional params are included """
# uncomment below to create an instance of `AgentStatusRequest`
"""
model = AgentStatusRequest()
if include_optional:
return AgentStatusRequest(
env_zid = ''
)
else:
return AgentStatusRequest(
)
"""
def testAgentStatusRequest(self):
"""Test AgentStatusRequest"""
# inst_req_only = self.make_instance(include_optional=False)
# inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()

View File

@ -19,6 +19,7 @@ __version__ = "1.0.0"
# import apis into sdk package
from zrok_api.api.account_api import AccountApi
from zrok_api.api.admin_api import AdminApi
from zrok_api.api.agent_api import AgentApi
from zrok_api.api.environment_api import EnvironmentApi
from zrok_api.api.metadata_api import MetadataApi
from zrok_api.api.share_api import ShareApi
@ -38,6 +39,8 @@ from zrok_api.exceptions import ApiException
from zrok_api.models.access201_response import Access201Response
from zrok_api.models.access_request import AccessRequest
from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest
from zrok_api.models.agent_status200_response import AgentStatus200Response
from zrok_api.models.agent_status_request import AgentStatusRequest
from zrok_api.models.auth_user import AuthUser
from zrok_api.models.change_password_request import ChangePasswordRequest
from zrok_api.models.client_version_check_request import ClientVersionCheckRequest

View File

@ -3,6 +3,7 @@
# import apis into api package
from zrok_api.api.account_api import AccountApi
from zrok_api.api.admin_api import AdminApi
from zrok_api.api.agent_api import AgentApi
from zrok_api.api.environment_api import EnvironmentApi
from zrok_api.api.metadata_api import MetadataApi
from zrok_api.api.share_api import ShareApi

View File

@ -0,0 +1,315 @@
# coding: utf-8
"""
zrok
zrok client access
The version of the OpenAPI document: 1.0.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import warnings
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
from typing import Optional
from zrok_api.models.agent_status200_response import AgentStatus200Response
from zrok_api.models.agent_status_request import AgentStatusRequest
from zrok_api.api_client import ApiClient, RequestSerialized
from zrok_api.api_response import ApiResponse
from zrok_api.rest import RESTResponseType
class AgentApi:
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
def __init__(self, api_client=None) -> None:
if api_client is None:
api_client = ApiClient.get_default()
self.api_client = api_client
@validate_call
def agent_status(
self,
body: Optional[AgentStatusRequest] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> AgentStatus200Response:
"""agent_status
:param body:
:type body: AgentStatusRequest
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._agent_status_serialize(
body=body,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "AgentStatus200Response",
'401': None,
'500': None,
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def agent_status_with_http_info(
self,
body: Optional[AgentStatusRequest] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[AgentStatus200Response]:
"""agent_status
:param body:
:type body: AgentStatusRequest
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._agent_status_serialize(
body=body,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "AgentStatus200Response",
'401': None,
'500': None,
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def agent_status_without_preload_content(
self,
body: Optional[AgentStatusRequest] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""agent_status
:param body:
:type body: AgentStatusRequest
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._agent_status_serialize(
body=body,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "AgentStatus200Response",
'401': None,
'500': None,
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _agent_status_serialize(
self,
body,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
if body is not None:
_body_params = body
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/zrok.v1+json'
]
)
# set the HTTP header `Content-Type`
if _content_type:
_header_params['Content-Type'] = _content_type
else:
_default_content_type = (
self.api_client.select_header_content_type(
[
'application/zrok.v1+json'
]
)
)
if _default_content_type is not None:
_header_params['Content-Type'] = _default_content_type
# authentication setting
_auth_settings: List[str] = [
'key'
]
return self.api_client.param_serialize(
method='POST',
resource_path='/agent/status',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)

View File

@ -17,6 +17,8 @@
from zrok_api.models.access201_response import Access201Response
from zrok_api.models.access_request import AccessRequest
from zrok_api.models.add_organization_member_request import AddOrganizationMemberRequest
from zrok_api.models.agent_status200_response import AgentStatus200Response
from zrok_api.models.agent_status_request import AgentStatusRequest
from zrok_api.models.auth_user import AuthUser
from zrok_api.models.change_password_request import ChangePasswordRequest
from zrok_api.models.client_version_check_request import ClientVersionCheckRequest

View File

@ -0,0 +1,95 @@
# coding: utf-8
"""
zrok
zrok client access
The version of the OpenAPI document: 1.0.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
from zrok_api.models.share import Share
from typing import Optional, Set
from typing_extensions import Self
class AgentStatus200Response(BaseModel):
"""
AgentStatus200Response
""" # noqa: E501
shares: Optional[List[Share]] = None
__properties: ClassVar[List[str]] = ["shares"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AgentStatus200Response from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in shares (list)
_items = []
if self.shares:
for _item_shares in self.shares:
if _item_shares:
_items.append(_item_shares.to_dict())
_dict['shares'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AgentStatus200Response from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"shares": [Share.from_dict(_item) for _item in obj["shares"]] if obj.get("shares") is not None else None
})
return _obj

View File

@ -0,0 +1,87 @@
# coding: utf-8
"""
zrok
zrok client access
The version of the OpenAPI document: 1.0.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class AgentStatusRequest(BaseModel):
"""
AgentStatusRequest
""" # noqa: E501
env_zid: Optional[StrictStr] = Field(default=None, alias="envZId")
__properties: ClassVar[List[str]] = ["envZId"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AgentStatusRequest from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AgentStatusRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"envZId": obj.get("envZId")
})
return _obj