beamlit 0.0.34rc58__py3-none-any.whl → 0.0.34rc59__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- beamlit/api/service_accounts/create_workspace_service_account.py +1 -3
- beamlit/api/service_accounts/delete_workspace_service_account.py +1 -3
- beamlit/api/service_accounts/get_workspace_service_accounts.py +1 -3
- beamlit/api/service_accounts/update_workspace_service_account.py +1 -3
- beamlit/models/__init__.py +13 -11
- beamlit/models/agent.py +21 -0
- beamlit/models/agent_spec.py +18 -0
- beamlit/models/core_event.py +79 -0
- beamlit/models/function.py +21 -0
- beamlit/models/increase_and_rate_metric.py +0 -9
- beamlit/models/integration_repository.py +88 -0
- beamlit/models/last_n_requests_metric.py +88 -0
- beamlit/models/latency_metric.py +45 -0
- beamlit/models/metric.py +18 -9
- beamlit/models/metrics.py +53 -53
- beamlit/models/model.py +21 -0
- beamlit/models/repository.py +70 -0
- beamlit/models/request_total_metric.py +88 -0
- beamlit/models/resource_environment_metrics.py +62 -82
- beamlit/models/workspace.py +7 -7
- {beamlit-0.0.34rc58.dist-info → beamlit-0.0.34rc59.dist-info}/METADATA +1 -1
- {beamlit-0.0.34rc58.dist-info → beamlit-0.0.34rc59.dist-info}/RECORD +23 -17
- {beamlit-0.0.34rc58.dist-info → beamlit-0.0.34rc59.dist-info}/WHEEL +0 -0
@@ -6,9 +6,7 @@ import httpx
|
|
6
6
|
from ... import errors
|
7
7
|
from ...client import AuthenticatedClient, Client
|
8
8
|
from ...models.create_workspace_service_account_body import CreateWorkspaceServiceAccountBody
|
9
|
-
from ...models.create_workspace_service_account_response_200 import
|
10
|
-
CreateWorkspaceServiceAccountResponse200,
|
11
|
-
)
|
9
|
+
from ...models.create_workspace_service_account_response_200 import CreateWorkspaceServiceAccountResponse200
|
12
10
|
from ...types import Response
|
13
11
|
|
14
12
|
|
@@ -5,9 +5,7 @@ import httpx
|
|
5
5
|
|
6
6
|
from ... import errors
|
7
7
|
from ...client import AuthenticatedClient, Client
|
8
|
-
from ...models.delete_workspace_service_account_response_200 import
|
9
|
-
DeleteWorkspaceServiceAccountResponse200,
|
10
|
-
)
|
8
|
+
from ...models.delete_workspace_service_account_response_200 import DeleteWorkspaceServiceAccountResponse200
|
11
9
|
from ...types import Response
|
12
10
|
|
13
11
|
|
@@ -5,9 +5,7 @@ import httpx
|
|
5
5
|
|
6
6
|
from ... import errors
|
7
7
|
from ...client import AuthenticatedClient, Client
|
8
|
-
from ...models.get_workspace_service_accounts_response_200_item import
|
9
|
-
GetWorkspaceServiceAccountsResponse200Item,
|
10
|
-
)
|
8
|
+
from ...models.get_workspace_service_accounts_response_200_item import GetWorkspaceServiceAccountsResponse200Item
|
11
9
|
from ...types import Response
|
12
10
|
|
13
11
|
|
@@ -6,9 +6,7 @@ import httpx
|
|
6
6
|
from ... import errors
|
7
7
|
from ...client import AuthenticatedClient, Client
|
8
8
|
from ...models.update_workspace_service_account_body import UpdateWorkspaceServiceAccountBody
|
9
|
-
from ...models.update_workspace_service_account_response_200 import
|
10
|
-
UpdateWorkspaceServiceAccountResponse200,
|
11
|
-
)
|
9
|
+
from ...models.update_workspace_service_account_response_200 import UpdateWorkspaceServiceAccountResponse200
|
12
10
|
from ...types import Response
|
13
11
|
|
14
12
|
|
beamlit/models/__init__.py
CHANGED
@@ -11,6 +11,7 @@ from .agent_spec import AgentSpec
|
|
11
11
|
from .api_key import ApiKey
|
12
12
|
from .configuration import Configuration
|
13
13
|
from .continent import Continent
|
14
|
+
from .core_event import CoreEvent
|
14
15
|
from .core_spec import CoreSpec
|
15
16
|
from .core_spec_configurations import CoreSpecConfigurations
|
16
17
|
from .core_status import CoreStatus
|
@@ -32,9 +33,7 @@ from .function_spec import FunctionSpec
|
|
32
33
|
from .get_trace_ids_response_200 import GetTraceIdsResponse200
|
33
34
|
from .get_trace_logs_response_200 import GetTraceLogsResponse200
|
34
35
|
from .get_trace_response_200 import GetTraceResponse200
|
35
|
-
from .get_workspace_service_accounts_response_200_item import
|
36
|
-
GetWorkspaceServiceAccountsResponse200Item,
|
37
|
-
)
|
36
|
+
from .get_workspace_service_accounts_response_200_item import GetWorkspaceServiceAccountsResponse200Item
|
38
37
|
from .increase_and_rate_metric import IncreaseAndRateMetric
|
39
38
|
from .integration_config import IntegrationConfig
|
40
39
|
from .integration_connection import IntegrationConnection
|
@@ -42,7 +41,10 @@ from .integration_connection_config import IntegrationConnectionConfig
|
|
42
41
|
from .integration_connection_secret import IntegrationConnectionSecret
|
43
42
|
from .integration_connection_spec import IntegrationConnectionSpec
|
44
43
|
from .integration_model import IntegrationModel
|
44
|
+
from .integration_repository import IntegrationRepository
|
45
45
|
from .invite_workspace_user_body import InviteWorkspaceUserBody
|
46
|
+
from .last_n_requests_metric import LastNRequestsMetric
|
47
|
+
from .latency_metric import LatencyMetric
|
46
48
|
from .location_response import LocationResponse
|
47
49
|
from .metadata import Metadata
|
48
50
|
from .metadata_labels import MetadataLabels
|
@@ -69,6 +71,8 @@ from .private_cluster import PrivateCluster
|
|
69
71
|
from .private_location import PrivateLocation
|
70
72
|
from .provider_config import ProviderConfig
|
71
73
|
from .qps import QPS
|
74
|
+
from .repository import Repository
|
75
|
+
from .request_total_metric import RequestTotalMetric
|
72
76
|
from .resource_deployment_metrics import ResourceDeploymentMetrics
|
73
77
|
from .resource_deployment_metrics_inference_per_second_per_region import (
|
74
78
|
ResourceDeploymentMetricsInferencePerSecondPerRegion,
|
@@ -77,12 +81,6 @@ from .resource_deployment_metrics_query_per_second_per_region_per_code import (
|
|
77
81
|
ResourceDeploymentMetricsQueryPerSecondPerRegionPerCode,
|
78
82
|
)
|
79
83
|
from .resource_environment_metrics import ResourceEnvironmentMetrics
|
80
|
-
from .resource_environment_metrics_inference_per_region import (
|
81
|
-
ResourceEnvironmentMetricsInferencePerRegion,
|
82
|
-
)
|
83
|
-
from .resource_environment_metrics_query_per_region_per_code import (
|
84
|
-
ResourceEnvironmentMetricsQueryPerRegionPerCode,
|
85
|
-
)
|
86
84
|
from .resource_log import ResourceLog
|
87
85
|
from .resource_metrics import ResourceMetrics
|
88
86
|
from .runtime import Runtime
|
@@ -120,6 +118,7 @@ __all__ = (
|
|
120
118
|
"ApiKey",
|
121
119
|
"Configuration",
|
122
120
|
"Continent",
|
121
|
+
"CoreEvent",
|
123
122
|
"CoreSpec",
|
124
123
|
"CoreSpecConfigurations",
|
125
124
|
"CoreStatus",
|
@@ -149,7 +148,10 @@ __all__ = (
|
|
149
148
|
"IntegrationConnectionSecret",
|
150
149
|
"IntegrationConnectionSpec",
|
151
150
|
"IntegrationModel",
|
151
|
+
"IntegrationRepository",
|
152
152
|
"InviteWorkspaceUserBody",
|
153
|
+
"LastNRequestsMetric",
|
154
|
+
"LatencyMetric",
|
153
155
|
"LocationResponse",
|
154
156
|
"Metadata",
|
155
157
|
"MetadataLabels",
|
@@ -176,12 +178,12 @@ __all__ = (
|
|
176
178
|
"PrivateLocation",
|
177
179
|
"ProviderConfig",
|
178
180
|
"QPS",
|
181
|
+
"Repository",
|
182
|
+
"RequestTotalMetric",
|
179
183
|
"ResourceDeploymentMetrics",
|
180
184
|
"ResourceDeploymentMetricsInferencePerSecondPerRegion",
|
181
185
|
"ResourceDeploymentMetricsQueryPerSecondPerRegionPerCode",
|
182
186
|
"ResourceEnvironmentMetrics",
|
183
|
-
"ResourceEnvironmentMetricsInferencePerRegion",
|
184
|
-
"ResourceEnvironmentMetricsQueryPerRegionPerCode",
|
185
187
|
"ResourceLog",
|
186
188
|
"ResourceMetrics",
|
187
189
|
"Runtime",
|
beamlit/models/agent.py
CHANGED
@@ -7,6 +7,7 @@ from ..types import UNSET, Unset
|
|
7
7
|
|
8
8
|
if TYPE_CHECKING:
|
9
9
|
from ..models.agent_spec import AgentSpec
|
10
|
+
from ..models.core_event import CoreEvent
|
10
11
|
from ..models.core_status import CoreStatus
|
11
12
|
from ..models.environment_metadata import EnvironmentMetadata
|
12
13
|
|
@@ -19,17 +20,26 @@ class Agent:
|
|
19
20
|
"""Agent
|
20
21
|
|
21
22
|
Attributes:
|
23
|
+
events (Union[Unset, list['CoreEvent']]): Core events
|
22
24
|
metadata (Union[Unset, EnvironmentMetadata]): Environment metadata
|
23
25
|
spec (Union[Unset, AgentSpec]): Agent specification
|
24
26
|
status (Union[Unset, CoreStatus]): Core status
|
25
27
|
"""
|
26
28
|
|
29
|
+
events: Union[Unset, list["CoreEvent"]] = UNSET
|
27
30
|
metadata: Union[Unset, "EnvironmentMetadata"] = UNSET
|
28
31
|
spec: Union[Unset, "AgentSpec"] = UNSET
|
29
32
|
status: Union[Unset, "CoreStatus"] = UNSET
|
30
33
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
31
34
|
|
32
35
|
def to_dict(self) -> dict[str, Any]:
|
36
|
+
events: Union[Unset, list[dict[str, Any]]] = UNSET
|
37
|
+
if not isinstance(self.events, Unset):
|
38
|
+
events = []
|
39
|
+
for componentsschemas_core_events_item_data in self.events:
|
40
|
+
componentsschemas_core_events_item = componentsschemas_core_events_item_data.to_dict()
|
41
|
+
events.append(componentsschemas_core_events_item)
|
42
|
+
|
33
43
|
metadata: Union[Unset, dict[str, Any]] = UNSET
|
34
44
|
if not isinstance(self.metadata, Unset):
|
35
45
|
metadata = self.metadata.to_dict()
|
@@ -45,6 +55,8 @@ class Agent:
|
|
45
55
|
field_dict: dict[str, Any] = {}
|
46
56
|
field_dict.update(self.additional_properties)
|
47
57
|
field_dict.update({})
|
58
|
+
if events is not UNSET:
|
59
|
+
field_dict["events"] = events
|
48
60
|
if metadata is not UNSET:
|
49
61
|
field_dict["metadata"] = metadata
|
50
62
|
if spec is not UNSET:
|
@@ -57,12 +69,20 @@ class Agent:
|
|
57
69
|
@classmethod
|
58
70
|
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
59
71
|
from ..models.agent_spec import AgentSpec
|
72
|
+
from ..models.core_event import CoreEvent
|
60
73
|
from ..models.core_status import CoreStatus
|
61
74
|
from ..models.environment_metadata import EnvironmentMetadata
|
62
75
|
|
63
76
|
if not src_dict:
|
64
77
|
return None
|
65
78
|
d = src_dict.copy()
|
79
|
+
events = []
|
80
|
+
_events = d.pop("events", UNSET)
|
81
|
+
for componentsschemas_core_events_item_data in _events or []:
|
82
|
+
componentsschemas_core_events_item = CoreEvent.from_dict(componentsschemas_core_events_item_data)
|
83
|
+
|
84
|
+
events.append(componentsschemas_core_events_item)
|
85
|
+
|
66
86
|
_metadata = d.pop("metadata", UNSET)
|
67
87
|
metadata: Union[Unset, EnvironmentMetadata]
|
68
88
|
if isinstance(_metadata, Unset):
|
@@ -85,6 +105,7 @@ class Agent:
|
|
85
105
|
status = CoreStatus.from_dict(_status)
|
86
106
|
|
87
107
|
agent = cls(
|
108
|
+
events=events,
|
88
109
|
metadata=metadata,
|
89
110
|
spec=spec,
|
90
111
|
status=status,
|
beamlit/models/agent_spec.py
CHANGED
@@ -11,6 +11,7 @@ if TYPE_CHECKING:
|
|
11
11
|
from ..models.flavor import Flavor
|
12
12
|
from ..models.model_private_cluster import ModelPrivateCluster
|
13
13
|
from ..models.pod_template_spec import PodTemplateSpec
|
14
|
+
from ..models.repository import Repository
|
14
15
|
from ..models.runtime import Runtime
|
15
16
|
from ..models.serverless_config import ServerlessConfig
|
16
17
|
|
@@ -36,6 +37,7 @@ class AgentSpec:
|
|
36
37
|
description (Union[Unset, str]): Agent description
|
37
38
|
functions (Union[Unset, list[str]]):
|
38
39
|
model (Union[Unset, str]): Model name
|
40
|
+
repository (Union[Unset, Repository]): Repository
|
39
41
|
store_id (Union[Unset, str]): Store id
|
40
42
|
"""
|
41
43
|
|
@@ -52,6 +54,7 @@ class AgentSpec:
|
|
52
54
|
description: Union[Unset, str] = UNSET
|
53
55
|
functions: Union[Unset, list[str]] = UNSET
|
54
56
|
model: Union[Unset, str] = UNSET
|
57
|
+
repository: Union[Unset, "Repository"] = UNSET
|
55
58
|
store_id: Union[Unset, str] = UNSET
|
56
59
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
57
60
|
|
@@ -108,6 +111,10 @@ class AgentSpec:
|
|
108
111
|
|
109
112
|
model = self.model
|
110
113
|
|
114
|
+
repository: Union[Unset, dict[str, Any]] = UNSET
|
115
|
+
if not isinstance(self.repository, Unset):
|
116
|
+
repository = self.repository.to_dict()
|
117
|
+
|
111
118
|
store_id = self.store_id
|
112
119
|
|
113
120
|
field_dict: dict[str, Any] = {}
|
@@ -139,6 +146,8 @@ class AgentSpec:
|
|
139
146
|
field_dict["functions"] = functions
|
140
147
|
if model is not UNSET:
|
141
148
|
field_dict["model"] = model
|
149
|
+
if repository is not UNSET:
|
150
|
+
field_dict["repository"] = repository
|
142
151
|
if store_id is not UNSET:
|
143
152
|
field_dict["storeId"] = store_id
|
144
153
|
|
@@ -151,6 +160,7 @@ class AgentSpec:
|
|
151
160
|
from ..models.flavor import Flavor
|
152
161
|
from ..models.model_private_cluster import ModelPrivateCluster
|
153
162
|
from ..models.pod_template_spec import PodTemplateSpec
|
163
|
+
from ..models.repository import Repository
|
154
164
|
from ..models.runtime import Runtime
|
155
165
|
from ..models.serverless_config import ServerlessConfig
|
156
166
|
|
@@ -218,6 +228,13 @@ class AgentSpec:
|
|
218
228
|
|
219
229
|
model = d.pop("model", UNSET)
|
220
230
|
|
231
|
+
_repository = d.pop("repository", UNSET)
|
232
|
+
repository: Union[Unset, Repository]
|
233
|
+
if isinstance(_repository, Unset):
|
234
|
+
repository = UNSET
|
235
|
+
else:
|
236
|
+
repository = Repository.from_dict(_repository)
|
237
|
+
|
221
238
|
store_id = d.pop("storeId", UNSET)
|
222
239
|
|
223
240
|
agent_spec = cls(
|
@@ -234,6 +251,7 @@ class AgentSpec:
|
|
234
251
|
description=description,
|
235
252
|
functions=functions,
|
236
253
|
model=model,
|
254
|
+
repository=repository,
|
237
255
|
store_id=store_id,
|
238
256
|
)
|
239
257
|
|
@@ -0,0 +1,79 @@
|
|
1
|
+
from typing import Any, TypeVar, Union
|
2
|
+
|
3
|
+
from attrs import define as _attrs_define
|
4
|
+
from attrs import field as _attrs_field
|
5
|
+
|
6
|
+
from ..types import UNSET, Unset
|
7
|
+
|
8
|
+
T = TypeVar("T", bound="CoreEvent")
|
9
|
+
|
10
|
+
|
11
|
+
@_attrs_define
|
12
|
+
class CoreEvent:
|
13
|
+
"""Core event
|
14
|
+
|
15
|
+
Attributes:
|
16
|
+
message (Union[Unset, str]): Event message
|
17
|
+
time (Union[Unset, str]): Event time
|
18
|
+
type_ (Union[Unset, str]): Event type
|
19
|
+
"""
|
20
|
+
|
21
|
+
message: Union[Unset, str] = UNSET
|
22
|
+
time: Union[Unset, str] = UNSET
|
23
|
+
type_: Union[Unset, str] = UNSET
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
25
|
+
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
27
|
+
message = self.message
|
28
|
+
|
29
|
+
time = self.time
|
30
|
+
|
31
|
+
type_ = self.type_
|
32
|
+
|
33
|
+
field_dict: dict[str, Any] = {}
|
34
|
+
field_dict.update(self.additional_properties)
|
35
|
+
field_dict.update({})
|
36
|
+
if message is not UNSET:
|
37
|
+
field_dict["message"] = message
|
38
|
+
if time is not UNSET:
|
39
|
+
field_dict["time"] = time
|
40
|
+
if type_ is not UNSET:
|
41
|
+
field_dict["type"] = type_
|
42
|
+
|
43
|
+
return field_dict
|
44
|
+
|
45
|
+
@classmethod
|
46
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
47
|
+
if not src_dict:
|
48
|
+
return None
|
49
|
+
d = src_dict.copy()
|
50
|
+
message = d.pop("message", UNSET)
|
51
|
+
|
52
|
+
time = d.pop("time", UNSET)
|
53
|
+
|
54
|
+
type_ = d.pop("type", UNSET)
|
55
|
+
|
56
|
+
core_event = cls(
|
57
|
+
message=message,
|
58
|
+
time=time,
|
59
|
+
type_=type_,
|
60
|
+
)
|
61
|
+
|
62
|
+
core_event.additional_properties = d
|
63
|
+
return core_event
|
64
|
+
|
65
|
+
@property
|
66
|
+
def additional_keys(self) -> list[str]:
|
67
|
+
return list(self.additional_properties.keys())
|
68
|
+
|
69
|
+
def __getitem__(self, key: str) -> Any:
|
70
|
+
return self.additional_properties[key]
|
71
|
+
|
72
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
73
|
+
self.additional_properties[key] = value
|
74
|
+
|
75
|
+
def __delitem__(self, key: str) -> None:
|
76
|
+
del self.additional_properties[key]
|
77
|
+
|
78
|
+
def __contains__(self, key: str) -> bool:
|
79
|
+
return key in self.additional_properties
|
beamlit/models/function.py
CHANGED
@@ -6,6 +6,7 @@ from attrs import field as _attrs_field
|
|
6
6
|
from ..types import UNSET, Unset
|
7
7
|
|
8
8
|
if TYPE_CHECKING:
|
9
|
+
from ..models.core_event import CoreEvent
|
9
10
|
from ..models.core_status import CoreStatus
|
10
11
|
from ..models.environment_metadata import EnvironmentMetadata
|
11
12
|
from ..models.function_spec import FunctionSpec
|
@@ -19,17 +20,26 @@ class Function:
|
|
19
20
|
"""Function
|
20
21
|
|
21
22
|
Attributes:
|
23
|
+
events (Union[Unset, list['CoreEvent']]): Core events
|
22
24
|
metadata (Union[Unset, EnvironmentMetadata]): Environment metadata
|
23
25
|
spec (Union[Unset, FunctionSpec]): Function specification
|
24
26
|
status (Union[Unset, CoreStatus]): Core status
|
25
27
|
"""
|
26
28
|
|
29
|
+
events: Union[Unset, list["CoreEvent"]] = UNSET
|
27
30
|
metadata: Union[Unset, "EnvironmentMetadata"] = UNSET
|
28
31
|
spec: Union[Unset, "FunctionSpec"] = UNSET
|
29
32
|
status: Union[Unset, "CoreStatus"] = UNSET
|
30
33
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
31
34
|
|
32
35
|
def to_dict(self) -> dict[str, Any]:
|
36
|
+
events: Union[Unset, list[dict[str, Any]]] = UNSET
|
37
|
+
if not isinstance(self.events, Unset):
|
38
|
+
events = []
|
39
|
+
for componentsschemas_core_events_item_data in self.events:
|
40
|
+
componentsschemas_core_events_item = componentsschemas_core_events_item_data.to_dict()
|
41
|
+
events.append(componentsschemas_core_events_item)
|
42
|
+
|
33
43
|
metadata: Union[Unset, dict[str, Any]] = UNSET
|
34
44
|
if not isinstance(self.metadata, Unset):
|
35
45
|
metadata = self.metadata.to_dict()
|
@@ -45,6 +55,8 @@ class Function:
|
|
45
55
|
field_dict: dict[str, Any] = {}
|
46
56
|
field_dict.update(self.additional_properties)
|
47
57
|
field_dict.update({})
|
58
|
+
if events is not UNSET:
|
59
|
+
field_dict["events"] = events
|
48
60
|
if metadata is not UNSET:
|
49
61
|
field_dict["metadata"] = metadata
|
50
62
|
if spec is not UNSET:
|
@@ -56,6 +68,7 @@ class Function:
|
|
56
68
|
|
57
69
|
@classmethod
|
58
70
|
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
71
|
+
from ..models.core_event import CoreEvent
|
59
72
|
from ..models.core_status import CoreStatus
|
60
73
|
from ..models.environment_metadata import EnvironmentMetadata
|
61
74
|
from ..models.function_spec import FunctionSpec
|
@@ -63,6 +76,13 @@ class Function:
|
|
63
76
|
if not src_dict:
|
64
77
|
return None
|
65
78
|
d = src_dict.copy()
|
79
|
+
events = []
|
80
|
+
_events = d.pop("events", UNSET)
|
81
|
+
for componentsschemas_core_events_item_data in _events or []:
|
82
|
+
componentsschemas_core_events_item = CoreEvent.from_dict(componentsschemas_core_events_item_data)
|
83
|
+
|
84
|
+
events.append(componentsschemas_core_events_item)
|
85
|
+
|
66
86
|
_metadata = d.pop("metadata", UNSET)
|
67
87
|
metadata: Union[Unset, EnvironmentMetadata]
|
68
88
|
if isinstance(_metadata, Unset):
|
@@ -85,6 +105,7 @@ class Function:
|
|
85
105
|
status = CoreStatus.from_dict(_status)
|
86
106
|
|
87
107
|
function = cls(
|
108
|
+
events=events,
|
88
109
|
metadata=metadata,
|
89
110
|
spec=spec,
|
90
111
|
status=status,
|
@@ -14,25 +14,19 @@ class IncreaseAndRateMetric:
|
|
14
14
|
|
15
15
|
Attributes:
|
16
16
|
inference_global (Union[Unset, Any]): Historical requests for all resources globally
|
17
|
-
query (Union[Unset, Any]): Number of requests for all resources globally
|
18
17
|
"""
|
19
18
|
|
20
19
|
inference_global: Union[Unset, Any] = UNSET
|
21
|
-
query: Union[Unset, Any] = UNSET
|
22
20
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
23
21
|
|
24
22
|
def to_dict(self) -> dict[str, Any]:
|
25
23
|
inference_global = self.inference_global
|
26
24
|
|
27
|
-
query = self.query
|
28
|
-
|
29
25
|
field_dict: dict[str, Any] = {}
|
30
26
|
field_dict.update(self.additional_properties)
|
31
27
|
field_dict.update({})
|
32
28
|
if inference_global is not UNSET:
|
33
29
|
field_dict["inferenceGlobal"] = inference_global
|
34
|
-
if query is not UNSET:
|
35
|
-
field_dict["query"] = query
|
36
30
|
|
37
31
|
return field_dict
|
38
32
|
|
@@ -43,11 +37,8 @@ class IncreaseAndRateMetric:
|
|
43
37
|
d = src_dict.copy()
|
44
38
|
inference_global = d.pop("inferenceGlobal", UNSET)
|
45
39
|
|
46
|
-
query = d.pop("query", UNSET)
|
47
|
-
|
48
40
|
increase_and_rate_metric = cls(
|
49
41
|
inference_global=inference_global,
|
50
|
-
query=query,
|
51
42
|
)
|
52
43
|
|
53
44
|
increase_and_rate_metric.additional_properties = d
|
@@ -0,0 +1,88 @@
|
|
1
|
+
from typing import Any, TypeVar, Union
|
2
|
+
|
3
|
+
from attrs import define as _attrs_define
|
4
|
+
from attrs import field as _attrs_field
|
5
|
+
|
6
|
+
from ..types import UNSET, Unset
|
7
|
+
|
8
|
+
T = TypeVar("T", bound="IntegrationRepository")
|
9
|
+
|
10
|
+
|
11
|
+
@_attrs_define
|
12
|
+
class IntegrationRepository:
|
13
|
+
"""Integration repository
|
14
|
+
|
15
|
+
Attributes:
|
16
|
+
id (Union[Unset, str]): Repository ID
|
17
|
+
name (Union[Unset, str]): Repository name
|
18
|
+
organization (Union[Unset, str]): Repository owner
|
19
|
+
url (Union[Unset, str]): Repository URL
|
20
|
+
"""
|
21
|
+
|
22
|
+
id: Union[Unset, str] = UNSET
|
23
|
+
name: Union[Unset, str] = UNSET
|
24
|
+
organization: Union[Unset, str] = UNSET
|
25
|
+
url: Union[Unset, str] = UNSET
|
26
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
27
|
+
|
28
|
+
def to_dict(self) -> dict[str, Any]:
|
29
|
+
id = self.id
|
30
|
+
|
31
|
+
name = self.name
|
32
|
+
|
33
|
+
organization = self.organization
|
34
|
+
|
35
|
+
url = self.url
|
36
|
+
|
37
|
+
field_dict: dict[str, Any] = {}
|
38
|
+
field_dict.update(self.additional_properties)
|
39
|
+
field_dict.update({})
|
40
|
+
if id is not UNSET:
|
41
|
+
field_dict["id"] = id
|
42
|
+
if name is not UNSET:
|
43
|
+
field_dict["name"] = name
|
44
|
+
if organization is not UNSET:
|
45
|
+
field_dict["organization"] = organization
|
46
|
+
if url is not UNSET:
|
47
|
+
field_dict["url"] = url
|
48
|
+
|
49
|
+
return field_dict
|
50
|
+
|
51
|
+
@classmethod
|
52
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
53
|
+
if not src_dict:
|
54
|
+
return None
|
55
|
+
d = src_dict.copy()
|
56
|
+
id = d.pop("id", UNSET)
|
57
|
+
|
58
|
+
name = d.pop("name", UNSET)
|
59
|
+
|
60
|
+
organization = d.pop("organization", UNSET)
|
61
|
+
|
62
|
+
url = d.pop("url", UNSET)
|
63
|
+
|
64
|
+
integration_repository = cls(
|
65
|
+
id=id,
|
66
|
+
name=name,
|
67
|
+
organization=organization,
|
68
|
+
url=url,
|
69
|
+
)
|
70
|
+
|
71
|
+
integration_repository.additional_properties = d
|
72
|
+
return integration_repository
|
73
|
+
|
74
|
+
@property
|
75
|
+
def additional_keys(self) -> list[str]:
|
76
|
+
return list(self.additional_properties.keys())
|
77
|
+
|
78
|
+
def __getitem__(self, key: str) -> Any:
|
79
|
+
return self.additional_properties[key]
|
80
|
+
|
81
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
82
|
+
self.additional_properties[key] = value
|
83
|
+
|
84
|
+
def __delitem__(self, key: str) -> None:
|
85
|
+
del self.additional_properties[key]
|
86
|
+
|
87
|
+
def __contains__(self, key: str) -> bool:
|
88
|
+
return key in self.additional_properties
|
@@ -0,0 +1,88 @@
|
|
1
|
+
from typing import Any, TypeVar, Union
|
2
|
+
|
3
|
+
from attrs import define as _attrs_define
|
4
|
+
from attrs import field as _attrs_field
|
5
|
+
|
6
|
+
from ..types import UNSET, Unset
|
7
|
+
|
8
|
+
T = TypeVar("T", bound="LastNRequestsMetric")
|
9
|
+
|
10
|
+
|
11
|
+
@_attrs_define
|
12
|
+
class LastNRequestsMetric:
|
13
|
+
"""Last N requests
|
14
|
+
|
15
|
+
Attributes:
|
16
|
+
date (Union[Unset, str]): Timestamp
|
17
|
+
environment (Union[Unset, str]): Environment
|
18
|
+
workload_type (Union[Unset, str]): Workload type
|
19
|
+
workspace (Union[Unset, str]): Workspace
|
20
|
+
"""
|
21
|
+
|
22
|
+
date: Union[Unset, str] = UNSET
|
23
|
+
environment: Union[Unset, str] = UNSET
|
24
|
+
workload_type: Union[Unset, str] = UNSET
|
25
|
+
workspace: Union[Unset, str] = UNSET
|
26
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
27
|
+
|
28
|
+
def to_dict(self) -> dict[str, Any]:
|
29
|
+
date = self.date
|
30
|
+
|
31
|
+
environment = self.environment
|
32
|
+
|
33
|
+
workload_type = self.workload_type
|
34
|
+
|
35
|
+
workspace = self.workspace
|
36
|
+
|
37
|
+
field_dict: dict[str, Any] = {}
|
38
|
+
field_dict.update(self.additional_properties)
|
39
|
+
field_dict.update({})
|
40
|
+
if date is not UNSET:
|
41
|
+
field_dict["date"] = date
|
42
|
+
if environment is not UNSET:
|
43
|
+
field_dict["environment"] = environment
|
44
|
+
if workload_type is not UNSET:
|
45
|
+
field_dict["workloadType"] = workload_type
|
46
|
+
if workspace is not UNSET:
|
47
|
+
field_dict["workspace"] = workspace
|
48
|
+
|
49
|
+
return field_dict
|
50
|
+
|
51
|
+
@classmethod
|
52
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
53
|
+
if not src_dict:
|
54
|
+
return None
|
55
|
+
d = src_dict.copy()
|
56
|
+
date = d.pop("date", UNSET)
|
57
|
+
|
58
|
+
environment = d.pop("environment", UNSET)
|
59
|
+
|
60
|
+
workload_type = d.pop("workloadType", UNSET)
|
61
|
+
|
62
|
+
workspace = d.pop("workspace", UNSET)
|
63
|
+
|
64
|
+
last_n_requests_metric = cls(
|
65
|
+
date=date,
|
66
|
+
environment=environment,
|
67
|
+
workload_type=workload_type,
|
68
|
+
workspace=workspace,
|
69
|
+
)
|
70
|
+
|
71
|
+
last_n_requests_metric.additional_properties = d
|
72
|
+
return last_n_requests_metric
|
73
|
+
|
74
|
+
@property
|
75
|
+
def additional_keys(self) -> list[str]:
|
76
|
+
return list(self.additional_properties.keys())
|
77
|
+
|
78
|
+
def __getitem__(self, key: str) -> Any:
|
79
|
+
return self.additional_properties[key]
|
80
|
+
|
81
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
82
|
+
self.additional_properties[key] = value
|
83
|
+
|
84
|
+
def __delitem__(self, key: str) -> None:
|
85
|
+
del self.additional_properties[key]
|
86
|
+
|
87
|
+
def __contains__(self, key: str) -> bool:
|
88
|
+
return key in self.additional_properties
|
@@ -0,0 +1,45 @@
|
|
1
|
+
from typing import Any, TypeVar
|
2
|
+
|
3
|
+
from attrs import define as _attrs_define
|
4
|
+
from attrs import field as _attrs_field
|
5
|
+
|
6
|
+
T = TypeVar("T", bound="LatencyMetric")
|
7
|
+
|
8
|
+
|
9
|
+
@_attrs_define
|
10
|
+
class LatencyMetric:
|
11
|
+
"""Latency metrics"""
|
12
|
+
|
13
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
14
|
+
|
15
|
+
def to_dict(self) -> dict[str, Any]:
|
16
|
+
field_dict: dict[str, Any] = {}
|
17
|
+
field_dict.update(self.additional_properties)
|
18
|
+
|
19
|
+
return field_dict
|
20
|
+
|
21
|
+
@classmethod
|
22
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
23
|
+
if not src_dict:
|
24
|
+
return None
|
25
|
+
d = src_dict.copy()
|
26
|
+
latency_metric = cls()
|
27
|
+
|
28
|
+
latency_metric.additional_properties = d
|
29
|
+
return latency_metric
|
30
|
+
|
31
|
+
@property
|
32
|
+
def additional_keys(self) -> list[str]:
|
33
|
+
return list(self.additional_properties.keys())
|
34
|
+
|
35
|
+
def __getitem__(self, key: str) -> Any:
|
36
|
+
return self.additional_properties[key]
|
37
|
+
|
38
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
39
|
+
self.additional_properties[key] = value
|
40
|
+
|
41
|
+
def __delitem__(self, key: str) -> None:
|
42
|
+
del self.additional_properties[key]
|
43
|
+
|
44
|
+
def __contains__(self, key: str) -> bool:
|
45
|
+
return key in self.additional_properties
|