Skip to content

Commit

Permalink
chore: update openapi client
Browse files Browse the repository at this point in the history
  • Loading branch information
chamini2 committed Dec 14, 2023
1 parent 8ff96e5 commit 67c586c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
GetGatewayRequestStatsByTimeResponseGetGatewayRequestStatsByTime,
)
from .grouped_usage_detail import GroupedUsageDetail
from .handle_stripe_webhook_response_handle_stripe_webhook import HandleStripeWebhookResponseHandleStripeWebhook
from .handle_stripe_webhook_response_handle_stripe_webhook import (
HandleStripeWebhookResponseHandleStripeWebhook,
)
from .hash_check import HashCheck
from .http_validation_error import HTTPValidationError
from .initiate_upload_info import InitiateUploadInfo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ class GroupedUsageDetail:
model_id (str):
machine_type (str):
request_count (int):
avg_duration (float):
median_duration (float):
total_duration (float):
"""

model_id: str
machine_type: str
request_count: int
avg_duration: float
median_duration: float
total_duration: float
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)

def to_dict(self) -> Dict[str, Any]:
model_id = self.model_id
machine_type = self.machine_type
request_count = self.request_count
avg_duration = self.avg_duration
median_duration = self.median_duration
total_duration = self.total_duration

field_dict: Dict[str, Any] = {}
Expand All @@ -37,7 +37,7 @@ def to_dict(self) -> Dict[str, Any]:
"model_id": model_id,
"machine_type": machine_type,
"request_count": request_count,
"avg_duration": avg_duration,
"median_duration": median_duration,
"total_duration": total_duration,
}
)
Expand All @@ -53,15 +53,15 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:

request_count = d.pop("request_count")

avg_duration = d.pop("avg_duration")
median_duration = d.pop("median_duration")

total_duration = d.pop("total_duration")

grouped_usage_detail = cls(
model_id=model_id,
machine_type=machine_type,
request_count=request_count,
avg_duration=avg_duration,
median_duration=median_duration,
total_duration=total_duration,
)

Expand Down

0 comments on commit 67c586c

Please sign in to comment.