Skip to content

Commit

Permalink
Updated the python client
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Oct 25, 2024
1 parent 132ff99 commit 660d92a
Show file tree
Hide file tree
Showing 3 changed files with 468 additions and 1 deletion.
66 changes: 65 additions & 1 deletion onelens_backend_client_v2/models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# generated by datamodel-codegen:
# filename: <stdin>
# timestamp: 2024-10-24T14:06:49+00:00
# timestamp: 2024-10-25T05:55:44+00:00

from __future__ import annotations

Expand Down Expand Up @@ -481,6 +481,40 @@ class ConnectionType(str, Enum):
REPLICA = "REPLICA"


class CostAnalyzerGraphRequest(BaseModel):
filters: List[Dict[str, Any]] = Field(
..., description="Filters for the cost analyzer graph", title="Filters"
)
group_by: List[str] = Field(
..., description="Group by for the cost analyzer graph", title="Group By"
)


class CostAnalyzerGraphResponse(BaseModel):
data: List[Dict[str, Any]] = Field(
...,
description="List of dictionaries containing cost analyzer stats",
title="Data",
)


class CostAnalyzerStatsRequest(BaseModel):
filters: List[Dict[str, Any]] = Field(
..., description="Filters for the cost analyzer stats", title="Filters"
)
group_by: List[str] = Field(
..., description="Group by for the cost analyzer stats", title="Group By"
)


class CostAnalyzerStatsResponse(BaseModel):
data: List[Dict[str, Any]] = Field(
...,
description="List of dictionaries containing cost analyzer stats",
title="Data",
)


class CreateActionTypePullRequest(BaseModel):
title: str = Field(..., description="The title of the pull request.", title="Title")
description: str = Field(
Expand Down Expand Up @@ -2935,6 +2969,8 @@ class OnelensDomainUtilitiesRepositoriesDynamicFiltersOperator(str, Enum):
is_empty = "is_empty"
is_not_empty = "is_not_empty"
is_daterange_template = "is_daterange_template"
is_null = "is_null"
is_not_null = "is_not_null"


class OnelensModelsServiceInterfacesPoliciesCommonsOperator(str, Enum):
Expand All @@ -2948,6 +2984,8 @@ class OnelensModelsServiceInterfacesPoliciesCommonsOperator(str, Enum):
less_than_or_equals = "less_than_or_equals"
is_null = "is_null"
is_not_null = "is_not_null"
is_empty = "is_empty"
is_not_empty = "is_not_empty"


class OnelensModelsServiceInterfacesTenantDataCurServiceGranularityUnit(str, Enum):
Expand Down Expand Up @@ -2979,6 +3017,8 @@ class OnelensModelsServiceInterfacesTenantDataMetricsServiceOperator(str, Enum):
is_not = "is_not"
is_null = "is_null"
is_not_null = "is_not_null"
is_empty = "is_empty"
is_not_empty = "is_not_empty"


class OnelensModelsServiceInterfacesTenantMetadataCommonsHierarchyNodeCategory1(
Expand Down Expand Up @@ -3296,6 +3336,30 @@ class CloudMetadataFilters(BaseModel):
)


class CostAnalyzerTableRequest(BaseModel):
pagination: Optional[PaginationParams] = Field(
default_factory=lambda: PaginationParams.model_validate(
{"page": 1, "page_size": 10}
),
description="Pagination parameters for the request.",
)
filters: List[Dict[str, Any]] = Field(
..., description="Filters for the cost analyzer table", title="Filters"
)
group_by: List[str] = Field(
..., description="Group by for the cost analyzer table", title="Group By"
)


class CostAnalyzerTableResponse(BaseModel):
pagination: PaginationFields = Field(..., description="Pagination fields.")
data: List[Dict[str, Any]] = Field(
...,
description="List of dictionaries containing cost analyzer stats",
title="Data",
)


class CreateActionTypeRequest(BaseModel):
service: Union[AwsService, GcpService] = Field(
..., description="Service AWS etc.", title="Service"
Expand Down
5 changes: 5 additions & 0 deletions onelens_backend_client_v2/rpc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@
RecommendationUnitMigrationServiceRpcHandler,
)

from onelens_backend_client_v2.rpc.cost_analyzer_service_rpc_handler import (
CostAnalyzerServiceRpcHandler,
)

from onelens_backend_client_v2.rpc.cloud_account_metadata_service_rpc_handler import (
CloudAccountMetadataServiceRpcHandler,
)
Expand Down Expand Up @@ -126,6 +130,7 @@
"SavedViewServiceRpcHandler",
"RecommendationUnitServiceRpcHandler",
"RecommendationUnitMigrationServiceRpcHandler",
"CostAnalyzerServiceRpcHandler",
"CloudAccountMetadataServiceRpcHandler",
"NaviraServiceRpcHandler",
"ActionTypeMigrationServiceRpcHandler",
Expand Down
Loading

0 comments on commit 660d92a

Please sign in to comment.