levelfour 0.1.0__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.
- levelfour/__init__.py +495 -0
- levelfour/api_keys/__init__.py +34 -0
- levelfour/api_keys/client.py +337 -0
- levelfour/api_keys/raw_client.py +621 -0
- levelfour/api_keys/types/__init__.py +34 -0
- levelfour/api_keys/types/create_api_key_request_scope.py +5 -0
- levelfour/async_levelfour_client.py +39 -0
- levelfour/base_client.py +346 -0
- levelfour/client.py +54 -0
- levelfour/core/__init__.py +127 -0
- levelfour/core/api_error.py +23 -0
- levelfour/core/client_wrapper.py +105 -0
- levelfour/core/datetime_utils.py +70 -0
- levelfour/core/file.py +67 -0
- levelfour/core/force_multipart.py +18 -0
- levelfour/core/http_client.py +776 -0
- levelfour/core/http_response.py +59 -0
- levelfour/core/http_sse/__init__.py +42 -0
- levelfour/core/http_sse/_api.py +112 -0
- levelfour/core/http_sse/_decoders.py +61 -0
- levelfour/core/http_sse/_exceptions.py +7 -0
- levelfour/core/http_sse/_models.py +17 -0
- levelfour/core/jsonable_encoder.py +108 -0
- levelfour/core/logging.py +107 -0
- levelfour/core/pagination.py +82 -0
- levelfour/core/pydantic_utilities.py +577 -0
- levelfour/core/query_encoder.py +58 -0
- levelfour/core/remove_none_from_dict.py +11 -0
- levelfour/core/request_options.py +35 -0
- levelfour/core/serialization.py +276 -0
- levelfour/errors/__init__.py +40 -0
- levelfour/errors/forbidden_error.py +11 -0
- levelfour/errors/unauthorized_error.py +11 -0
- levelfour/errors/unprocessable_entity_error.py +11 -0
- levelfour/evaluation/__init__.py +4 -0
- levelfour/evaluation/client.py +102 -0
- levelfour/evaluation/raw_client.py +141 -0
- levelfour/exceptions.py +63 -0
- levelfour/health/__init__.py +4 -0
- levelfour/health/client.py +163 -0
- levelfour/health/raw_client.py +164 -0
- levelfour/integrations/__init__.py +0 -0
- levelfour/integrations/django.py +26 -0
- levelfour/integrations/fastapi.py +39 -0
- levelfour/integrations/telemetry.py +66 -0
- levelfour/levelfour_client.py +47 -0
- levelfour/pagination.py +84 -0
- levelfour/pr_analysis/__init__.py +4 -0
- levelfour/pr_analysis/client.py +408 -0
- levelfour/pr_analysis/raw_client.py +620 -0
- levelfour/pr_analysis_actions/__init__.py +4 -0
- levelfour/pr_analysis_actions/client.py +588 -0
- levelfour/pr_analysis_actions/raw_client.py +939 -0
- levelfour/pr_analysis_installations/__init__.py +4 -0
- levelfour/pr_analysis_installations/client.py +470 -0
- levelfour/pr_analysis_installations/raw_client.py +868 -0
- levelfour/providers/__init__.py +34 -0
- levelfour/providers/client.py +1504 -0
- levelfour/providers/raw_client.py +2398 -0
- levelfour/providers/types/__init__.py +36 -0
- levelfour/providers/types/list_spending_breakdown_providers_response.py +11 -0
- levelfour/py.typed +0 -0
- levelfour/recommendations/__init__.py +4 -0
- levelfour/recommendations/client.py +1018 -0
- levelfour/recommendations/raw_client.py +1810 -0
- levelfour/savings/__init__.py +4 -0
- levelfour/savings/client.py +401 -0
- levelfour/savings/raw_client.py +624 -0
- levelfour/spending/__init__.py +34 -0
- levelfour/spending/client.py +437 -0
- levelfour/spending/raw_client.py +684 -0
- levelfour/spending/types/__init__.py +34 -0
- levelfour/spending/types/list_breakdown_spending_response.py +12 -0
- levelfour/types/__init__.py +413 -0
- levelfour/types/accept_terms_data.py +25 -0
- levelfour/types/accept_terms_response.py +27 -0
- levelfour/types/action_request.py +42 -0
- levelfour/types/api_key_created_data.py +28 -0
- levelfour/types/api_key_data.py +27 -0
- levelfour/types/authentication_error.py +5 -0
- levelfour/types/authorization_error.py +5 -0
- levelfour/types/bad_request_error.py +5 -0
- levelfour/types/comparison_item.py +32 -0
- levelfour/types/complete_wizard_data.py +27 -0
- levelfour/types/complete_wizard_response.py +27 -0
- levelfour/types/conflict_error.py +5 -0
- levelfour/types/cost_breakdown_data.py +35 -0
- levelfour/types/cost_breakdown_item.py +71 -0
- levelfour/types/cost_breakdown_raw_data.py +37 -0
- levelfour/types/cost_breakdown_raw_response.py +27 -0
- levelfour/types/cost_breakdown_response.py +27 -0
- levelfour/types/costs_breakdown_chart_data.py +48 -0
- levelfour/types/costs_breakdown_chart_response.py +27 -0
- levelfour/types/costs_breakdown_data_point.py +46 -0
- levelfour/types/costs_breakdown_grouped_chart_data.py +52 -0
- levelfour/types/costs_breakdown_grouped_chart_response.py +27 -0
- levelfour/types/costs_breakdown_grouped_data_point.py +36 -0
- levelfour/types/costs_breakdown_totals.py +41 -0
- levelfour/types/create_api_key_response.py +23 -0
- levelfour/types/daily_spending_breakdown_data.py +42 -0
- levelfour/types/daily_spending_breakdown_response.py +27 -0
- levelfour/types/daily_spending_data_point.py +31 -0
- levelfour/types/dashboard_summary_data.py +72 -0
- levelfour/types/dashboard_summary_response.py +27 -0
- levelfour/types/delete_endpoint_data.py +20 -0
- levelfour/types/delete_endpoint_response.py +23 -0
- levelfour/types/endpoint_data.py +23 -0
- levelfour/types/error_response.py +23 -0
- levelfour/types/error_response_error.py +21 -0
- levelfour/types/evaluation_status_data.py +71 -0
- levelfour/types/evaluation_status_response.py +27 -0
- levelfour/types/execution_log_command.py +21 -0
- levelfour/types/execution_log_entry.py +23 -0
- levelfour/types/execution_step_schema.py +23 -0
- levelfour/types/http_validation_error.py +20 -0
- levelfour/types/implementation_method_data.py +25 -0
- levelfour/types/implementation_method_response.py +27 -0
- levelfour/types/implementation_step.py +27 -0
- levelfour/types/internal_server_error.py +5 -0
- levelfour/types/list_api_keys_data.py +21 -0
- levelfour/types/list_api_keys_response.py +23 -0
- levelfour/types/list_endpoints_response.py +23 -0
- levelfour/types/metric_data_point.py +27 -0
- levelfour/types/metric_series.py +40 -0
- levelfour/types/metric_series_entry.py +25 -0
- levelfour/types/monthly_spending_data.py +27 -0
- levelfour/types/monthly_spending_data_point.py +31 -0
- levelfour/types/monthly_spending_response.py +27 -0
- levelfour/types/not_found_error.py +5 -0
- levelfour/types/pagination_meta.py +51 -0
- levelfour/types/processing_recommendation_item.py +61 -0
- levelfour/types/processing_recommendations_data.py +28 -0
- levelfour/types/processing_recommendations_response.py +27 -0
- levelfour/types/provider.py +46 -0
- levelfour/types/provider_breakdown_data.py +31 -0
- levelfour/types/provider_breakdown_item.py +77 -0
- levelfour/types/provider_breakdown_response.py +27 -0
- levelfour/types/provider_filter_options_data.py +51 -0
- levelfour/types/provider_filter_options_response.py +27 -0
- levelfour/types/provider_potential_savings_summary_data.py +46 -0
- levelfour/types/provider_potential_savings_summary_response.py +27 -0
- levelfour/types/provider_recommendations_summary_data.py +37 -0
- levelfour/types/provider_recommendations_summary_response.py +27 -0
- levelfour/types/provider_saved_summary_data.py +56 -0
- levelfour/types/provider_saved_summary_response.py +27 -0
- levelfour/types/provider_service_breakdown_data.py +65 -0
- levelfour/types/provider_service_breakdown_item.py +72 -0
- levelfour/types/provider_service_breakdown_raw_data.py +62 -0
- levelfour/types/provider_service_breakdown_raw_response.py +27 -0
- levelfour/types/provider_service_breakdown_response.py +27 -0
- levelfour/types/provider_service_costs_breakdown_data.py +62 -0
- levelfour/types/provider_service_costs_breakdown_response.py +27 -0
- levelfour/types/provider_service_costs_data_point.py +36 -0
- levelfour/types/provider_spending.py +61 -0
- levelfour/types/provider_spending_summary_data.py +67 -0
- levelfour/types/provider_spending_summary_response.py +27 -0
- levelfour/types/provider_timeline_data.py +57 -0
- levelfour/types/provider_timeline_response.py +27 -0
- levelfour/types/provider_top_service.py +36 -0
- levelfour/types/providers_summary_data.py +24 -0
- levelfour/types/providers_summary_response.py +27 -0
- levelfour/types/rate_limit_error.py +5 -0
- levelfour/types/recommendation_actions.py +60 -0
- levelfour/types/recommendation_detail.py +42 -0
- levelfour/types/recommendation_detail_response.py +27 -0
- levelfour/types/recommendation_filter_options_data.py +41 -0
- levelfour/types/recommendation_filter_options_response.py +27 -0
- levelfour/types/recommendation_item.py +36 -0
- levelfour/types/recommendation_wizard_data.py +173 -0
- levelfour/types/recommendation_wizard_data_metrics.py +7 -0
- levelfour/types/recommendation_wizard_response.py +27 -0
- levelfour/types/recommendations_breakdown_data.py +26 -0
- levelfour/types/recommendations_breakdown_response.py +27 -0
- levelfour/types/recommendations_overview_data.py +51 -0
- levelfour/types/recommendations_overview_response.py +27 -0
- levelfour/types/register_endpoint_response.py +23 -0
- levelfour/types/resource_change.py +42 -0
- levelfour/types/resource_snapshot.py +21 -0
- levelfour/types/revoke_api_key_data.py +20 -0
- levelfour/types/revoke_api_key_response.py +23 -0
- levelfour/types/risk_assessment.py +29 -0
- levelfour/types/risk_factor.py +27 -0
- levelfour/types/saved_breakdown_data.py +31 -0
- levelfour/types/saved_breakdown_response.py +27 -0
- levelfour/types/saved_by_provider_breakdown_data.py +31 -0
- levelfour/types/saved_by_provider_breakdown_response.py +27 -0
- levelfour/types/saved_by_provider_item.py +76 -0
- levelfour/types/saved_item.py +35 -0
- levelfour/types/saved_provider_summary.py +36 -0
- levelfour/types/saved_summary_data.py +57 -0
- levelfour/types/saved_summary_response.py +27 -0
- levelfour/types/savings_decision_data.py +28 -0
- levelfour/types/savings_decision_response.py +27 -0
- levelfour/types/spending_by_date_item.py +36 -0
- levelfour/types/top_recommendation.py +56 -0
- levelfour/types/trigger_info.py +22 -0
- levelfour/types/update_tag_data.py +20 -0
- levelfour/types/update_tag_response.py +23 -0
- levelfour/types/validation_error.py +24 -0
- levelfour/types/validation_error_loc_item.py +5 -0
- levelfour/webhooks/__init__.py +4 -0
- levelfour/webhooks/client.py +273 -0
- levelfour/webhooks/raw_client.py +483 -0
- levelfour/webhooks/verifier.py +61 -0
- levelfour-0.1.0.dist-info/METADATA +12 -0
- levelfour-0.1.0.dist-info/RECORD +208 -0
- levelfour-0.1.0.dist-info/WHEEL +5 -0
- levelfour-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class CompleteWizardData(UniversalBaseModel):
|
|
10
|
+
"""
|
|
11
|
+
Data returned after completing the wizard
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
recommendation_id: str
|
|
15
|
+
status: str
|
|
16
|
+
implementation_method: str
|
|
17
|
+
completed_at: str
|
|
18
|
+
message: str
|
|
19
|
+
|
|
20
|
+
if IS_PYDANTIC_V2:
|
|
21
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
22
|
+
else:
|
|
23
|
+
|
|
24
|
+
class Config:
|
|
25
|
+
frozen = True
|
|
26
|
+
smart_union = True
|
|
27
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
import pydantic
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
|
+
from .complete_wizard_data import CompleteWizardData
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class CompleteWizardResponse(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
Response after completing the wizard
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
success: typing.Optional[bool] = None
|
|
17
|
+
timestamp: typing.Optional[dt.datetime] = None
|
|
18
|
+
data: CompleteWizardData
|
|
19
|
+
|
|
20
|
+
if IS_PYDANTIC_V2:
|
|
21
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
22
|
+
else:
|
|
23
|
+
|
|
24
|
+
class Config:
|
|
25
|
+
frozen = True
|
|
26
|
+
smart_union = True
|
|
27
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .cost_breakdown_item import CostBreakdownItem
|
|
8
|
+
from .pagination_meta import PaginationMeta
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class CostBreakdownData(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
Cost breakdown data with pagination
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
period: str = pydantic.Field()
|
|
17
|
+
"""
|
|
18
|
+
Period in YYYY-MM format
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
items: typing.List[CostBreakdownItem] = pydantic.Field()
|
|
22
|
+
"""
|
|
23
|
+
Service cost breakdown items
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
pagination: PaginationMeta
|
|
27
|
+
|
|
28
|
+
if IS_PYDANTIC_V2:
|
|
29
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
30
|
+
else:
|
|
31
|
+
|
|
32
|
+
class Config:
|
|
33
|
+
frozen = True
|
|
34
|
+
smart_union = True
|
|
35
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class CostBreakdownItem(UniversalBaseModel):
|
|
10
|
+
"""
|
|
11
|
+
Single service cost breakdown item
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
service: str = pydantic.Field()
|
|
15
|
+
"""
|
|
16
|
+
Service name (e.g., Amazon EC2, Cloud SQL)
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
provider_id: str = pydantic.Field()
|
|
20
|
+
"""
|
|
21
|
+
Provider identifier: aws, gcp, azure, k8s
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
environment: typing.Optional[str] = pydantic.Field(default=None)
|
|
25
|
+
"""
|
|
26
|
+
Environment: Production, Staging, etc.
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
region: typing.Optional[str] = pydantic.Field(default=None)
|
|
30
|
+
"""
|
|
31
|
+
Cloud region
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
account_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
35
|
+
"""
|
|
36
|
+
Cloud account ID
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
tag_key: typing.Optional[str] = pydantic.Field(default=None)
|
|
40
|
+
"""
|
|
41
|
+
Tag key if present
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
tag_value: typing.Optional[str] = pydantic.Field(default=None)
|
|
45
|
+
"""
|
|
46
|
+
Tag value if present
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
cost: float = pydantic.Field()
|
|
50
|
+
"""
|
|
51
|
+
Current period cost
|
|
52
|
+
"""
|
|
53
|
+
|
|
54
|
+
previous_cost: typing.Optional[float] = pydantic.Field(default=None)
|
|
55
|
+
"""
|
|
56
|
+
Previous period cost
|
|
57
|
+
"""
|
|
58
|
+
|
|
59
|
+
change_percentage: typing.Optional[float] = pydantic.Field(default=None)
|
|
60
|
+
"""
|
|
61
|
+
Change from previous period
|
|
62
|
+
"""
|
|
63
|
+
|
|
64
|
+
if IS_PYDANTIC_V2:
|
|
65
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
66
|
+
else:
|
|
67
|
+
|
|
68
|
+
class Config:
|
|
69
|
+
frozen = True
|
|
70
|
+
smart_union = True
|
|
71
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .cost_breakdown_item import CostBreakdownItem
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class CostBreakdownRawData(UniversalBaseModel):
|
|
11
|
+
"""
|
|
12
|
+
Cost breakdown raw data without pagination
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
period: str = pydantic.Field()
|
|
16
|
+
"""
|
|
17
|
+
Period in YYYY-MM format
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
items: typing.List[CostBreakdownItem] = pydantic.Field()
|
|
21
|
+
"""
|
|
22
|
+
All service cost breakdown items (no pagination)
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
total_items: int = pydantic.Field()
|
|
26
|
+
"""
|
|
27
|
+
Total number of items
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
if IS_PYDANTIC_V2:
|
|
31
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
32
|
+
else:
|
|
33
|
+
|
|
34
|
+
class Config:
|
|
35
|
+
frozen = True
|
|
36
|
+
smart_union = True
|
|
37
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
import pydantic
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
|
+
from .cost_breakdown_raw_data import CostBreakdownRawData
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class CostBreakdownRawResponse(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
Response for raw cost breakdown (all records)
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
success: typing.Optional[bool] = None
|
|
17
|
+
timestamp: typing.Optional[dt.datetime] = None
|
|
18
|
+
data: CostBreakdownRawData
|
|
19
|
+
|
|
20
|
+
if IS_PYDANTIC_V2:
|
|
21
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
22
|
+
else:
|
|
23
|
+
|
|
24
|
+
class Config:
|
|
25
|
+
frozen = True
|
|
26
|
+
smart_union = True
|
|
27
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
import pydantic
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
|
+
from .cost_breakdown_data import CostBreakdownData
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class CostBreakdownResponse(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
Response for cost breakdown table
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
success: typing.Optional[bool] = None
|
|
17
|
+
timestamp: typing.Optional[dt.datetime] = None
|
|
18
|
+
data: CostBreakdownData
|
|
19
|
+
|
|
20
|
+
if IS_PYDANTIC_V2:
|
|
21
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
22
|
+
else:
|
|
23
|
+
|
|
24
|
+
class Config:
|
|
25
|
+
frozen = True
|
|
26
|
+
smart_union = True
|
|
27
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .costs_breakdown_data_point import CostsBreakdownDataPoint
|
|
8
|
+
from .costs_breakdown_totals import CostsBreakdownTotals
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class CostsBreakdownChartData(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
Costs breakdown chart data for stacked bar visualization
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
granularity: str = pydantic.Field()
|
|
17
|
+
"""
|
|
18
|
+
Granularity: 'daily' or 'monthly'
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
start_date: str = pydantic.Field()
|
|
22
|
+
"""
|
|
23
|
+
Start date in YYYY-MM-DD format
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
end_date: str = pydantic.Field()
|
|
27
|
+
"""
|
|
28
|
+
End date in YYYY-MM-DD format
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
data_points: typing.List[CostsBreakdownDataPoint] = pydantic.Field()
|
|
32
|
+
"""
|
|
33
|
+
Time series data points
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
totals: CostsBreakdownTotals = pydantic.Field()
|
|
37
|
+
"""
|
|
38
|
+
Totals by provider for the period
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
if IS_PYDANTIC_V2:
|
|
42
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
43
|
+
else:
|
|
44
|
+
|
|
45
|
+
class Config:
|
|
46
|
+
frozen = True
|
|
47
|
+
smart_union = True
|
|
48
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
import pydantic
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
|
+
from .costs_breakdown_chart_data import CostsBreakdownChartData
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class CostsBreakdownChartResponse(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
Response for costs breakdown chart
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
success: typing.Optional[bool] = None
|
|
17
|
+
timestamp: typing.Optional[dt.datetime] = None
|
|
18
|
+
data: CostsBreakdownChartData
|
|
19
|
+
|
|
20
|
+
if IS_PYDANTIC_V2:
|
|
21
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
22
|
+
else:
|
|
23
|
+
|
|
24
|
+
class Config:
|
|
25
|
+
frozen = True
|
|
26
|
+
smart_union = True
|
|
27
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class CostsBreakdownDataPoint(UniversalBaseModel):
|
|
10
|
+
"""
|
|
11
|
+
Single data point for costs breakdown chart
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
date: str = pydantic.Field()
|
|
15
|
+
"""
|
|
16
|
+
Date in YYYY-MM-DD (daily) or YYYY-MM (monthly) format
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
aws: typing.Optional[float] = pydantic.Field(default=None)
|
|
20
|
+
"""
|
|
21
|
+
AWS spending for this period
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
gcp: typing.Optional[float] = pydantic.Field(default=None)
|
|
25
|
+
"""
|
|
26
|
+
GCP spending for this period
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
azure: typing.Optional[float] = pydantic.Field(default=None)
|
|
30
|
+
"""
|
|
31
|
+
Azure spending for this period
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
k8s: typing.Optional[float] = pydantic.Field(default=None)
|
|
35
|
+
"""
|
|
36
|
+
Kubernetes spending for this period
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
if IS_PYDANTIC_V2:
|
|
40
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
41
|
+
else:
|
|
42
|
+
|
|
43
|
+
class Config:
|
|
44
|
+
frozen = True
|
|
45
|
+
smart_union = True
|
|
46
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .costs_breakdown_grouped_data_point import CostsBreakdownGroupedDataPoint
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class CostsBreakdownGroupedChartData(UniversalBaseModel):
|
|
11
|
+
"""
|
|
12
|
+
Costs breakdown chart data grouped by account_id
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
granularity: str = pydantic.Field()
|
|
16
|
+
"""
|
|
17
|
+
Granularity: 'daily' or 'monthly'
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
start_date: str = pydantic.Field()
|
|
21
|
+
"""
|
|
22
|
+
Start date in YYYY-MM-DD format
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
end_date: str = pydantic.Field()
|
|
26
|
+
"""
|
|
27
|
+
End date in YYYY-MM-DD format
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
groups: typing.List[str] = pydantic.Field()
|
|
31
|
+
"""
|
|
32
|
+
Ordered list of group keys (account IDs)
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
data_points: typing.List[CostsBreakdownGroupedDataPoint] = pydantic.Field()
|
|
36
|
+
"""
|
|
37
|
+
Time series data points
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
totals: typing.Dict[str, float] = pydantic.Field()
|
|
41
|
+
"""
|
|
42
|
+
Total per group for the period
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
if IS_PYDANTIC_V2:
|
|
46
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
47
|
+
else:
|
|
48
|
+
|
|
49
|
+
class Config:
|
|
50
|
+
frozen = True
|
|
51
|
+
smart_union = True
|
|
52
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
import pydantic
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
|
+
from .costs_breakdown_grouped_chart_data import CostsBreakdownGroupedChartData
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class CostsBreakdownGroupedChartResponse(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
Response for grouped costs breakdown chart
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
success: typing.Optional[bool] = None
|
|
17
|
+
timestamp: typing.Optional[dt.datetime] = None
|
|
18
|
+
data: CostsBreakdownGroupedChartData
|
|
19
|
+
|
|
20
|
+
if IS_PYDANTIC_V2:
|
|
21
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
22
|
+
else:
|
|
23
|
+
|
|
24
|
+
class Config:
|
|
25
|
+
frozen = True
|
|
26
|
+
smart_union = True
|
|
27
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class CostsBreakdownGroupedDataPoint(UniversalBaseModel):
|
|
10
|
+
"""
|
|
11
|
+
Single data point for grouped costs breakdown chart
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
date: str = pydantic.Field()
|
|
15
|
+
"""
|
|
16
|
+
Date in YYYY-MM-DD (daily) or YYYY-MM (monthly) format
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
groups: typing.Dict[str, float] = pydantic.Field()
|
|
20
|
+
"""
|
|
21
|
+
Group costs: {'794670448117': 185.30, '123456789012': 245.50}
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
total: float = pydantic.Field()
|
|
25
|
+
"""
|
|
26
|
+
Total cost for this date
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
if IS_PYDANTIC_V2:
|
|
30
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
31
|
+
else:
|
|
32
|
+
|
|
33
|
+
class Config:
|
|
34
|
+
frozen = True
|
|
35
|
+
smart_union = True
|
|
36
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class CostsBreakdownTotals(UniversalBaseModel):
|
|
10
|
+
"""
|
|
11
|
+
Totals by provider for the selected period
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
aws: typing.Optional[float] = pydantic.Field(default=None)
|
|
15
|
+
"""
|
|
16
|
+
Total AWS spending
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
gcp: typing.Optional[float] = pydantic.Field(default=None)
|
|
20
|
+
"""
|
|
21
|
+
Total GCP spending
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
azure: typing.Optional[float] = pydantic.Field(default=None)
|
|
25
|
+
"""
|
|
26
|
+
Total Azure spending
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
k8s: typing.Optional[float] = pydantic.Field(default=None)
|
|
30
|
+
"""
|
|
31
|
+
Total Kubernetes spending
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
if IS_PYDANTIC_V2:
|
|
35
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
36
|
+
else:
|
|
37
|
+
|
|
38
|
+
class Config:
|
|
39
|
+
frozen = True
|
|
40
|
+
smart_union = True
|
|
41
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
import pydantic
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
|
+
from .api_key_created_data import ApiKeyCreatedData
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class CreateApiKeyResponse(UniversalBaseModel):
|
|
12
|
+
success: typing.Optional[bool] = None
|
|
13
|
+
timestamp: typing.Optional[dt.datetime] = None
|
|
14
|
+
data: ApiKeyCreatedData
|
|
15
|
+
|
|
16
|
+
if IS_PYDANTIC_V2:
|
|
17
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
18
|
+
else:
|
|
19
|
+
|
|
20
|
+
class Config:
|
|
21
|
+
frozen = True
|
|
22
|
+
smart_union = True
|
|
23
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .daily_spending_data_point import DailySpendingDataPoint
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class DailySpendingBreakdownData(UniversalBaseModel):
|
|
11
|
+
"""
|
|
12
|
+
Daily spending breakdown data
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
start_date: str = pydantic.Field()
|
|
16
|
+
"""
|
|
17
|
+
Start date in YYYY-MM-DD format
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
end_date: str = pydantic.Field()
|
|
21
|
+
"""
|
|
22
|
+
End date in YYYY-MM-DD format
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
data_points: typing.List[DailySpendingDataPoint] = pydantic.Field()
|
|
26
|
+
"""
|
|
27
|
+
Daily spending data points
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
total: float = pydantic.Field()
|
|
31
|
+
"""
|
|
32
|
+
Total cost for the period
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
if IS_PYDANTIC_V2:
|
|
36
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
37
|
+
else:
|
|
38
|
+
|
|
39
|
+
class Config:
|
|
40
|
+
frozen = True
|
|
41
|
+
smart_union = True
|
|
42
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
import pydantic
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
|
+
from .daily_spending_breakdown_data import DailySpendingBreakdownData
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class DailySpendingBreakdownResponse(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
Response for daily spending breakdown
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
success: typing.Optional[bool] = None
|
|
17
|
+
timestamp: typing.Optional[dt.datetime] = None
|
|
18
|
+
data: DailySpendingBreakdownData
|
|
19
|
+
|
|
20
|
+
if IS_PYDANTIC_V2:
|
|
21
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
22
|
+
else:
|
|
23
|
+
|
|
24
|
+
class Config:
|
|
25
|
+
frozen = True
|
|
26
|
+
smart_union = True
|
|
27
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class DailySpendingDataPoint(UniversalBaseModel):
|
|
10
|
+
"""
|
|
11
|
+
Daily spending data point
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
date: str = pydantic.Field()
|
|
15
|
+
"""
|
|
16
|
+
Date in YYYY-MM-DD format
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
amount: float = pydantic.Field()
|
|
20
|
+
"""
|
|
21
|
+
Total cost for this day
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
if IS_PYDANTIC_V2:
|
|
25
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
26
|
+
else:
|
|
27
|
+
|
|
28
|
+
class Config:
|
|
29
|
+
frozen = True
|
|
30
|
+
smart_union = True
|
|
31
|
+
extra = pydantic.Extra.allow
|