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,56 @@
|
|
|
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 ProviderSavedSummaryData(UniversalBaseModel):
|
|
10
|
+
"""
|
|
11
|
+
Provider-specific Savings Audit summary for BigNumbers
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
provider_id: str = pydantic.Field()
|
|
15
|
+
"""
|
|
16
|
+
Provider identifier: aws, gcp, azure, k8s
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
provider_name: str = pydantic.Field()
|
|
20
|
+
"""
|
|
21
|
+
Display name: AWS, GCP, etc.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
total_monthly_savings: float = pydantic.Field()
|
|
25
|
+
"""
|
|
26
|
+
Total monthly savings for this provider
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
total_monthly_savings_percentage: typing.Optional[float] = pydantic.Field(default=None)
|
|
30
|
+
"""
|
|
31
|
+
MoM change percentage
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
total_annual_savings: float = pydantic.Field()
|
|
35
|
+
"""
|
|
36
|
+
Total annual savings (monthly * 12)
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
average_roi: float = pydantic.Field()
|
|
40
|
+
"""
|
|
41
|
+
Average ROI percentage
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
total_items: int = pydantic.Field()
|
|
45
|
+
"""
|
|
46
|
+
Number of implemented savings
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
if IS_PYDANTIC_V2:
|
|
50
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
51
|
+
else:
|
|
52
|
+
|
|
53
|
+
class Config:
|
|
54
|
+
frozen = True
|
|
55
|
+
smart_union = True
|
|
56
|
+
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 .provider_saved_summary_data import ProviderSavedSummaryData
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ProviderSavedSummaryResponse(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
Response for provider-specific saved summary
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
success: typing.Optional[bool] = None
|
|
17
|
+
timestamp: typing.Optional[dt.datetime] = None
|
|
18
|
+
data: ProviderSavedSummaryData
|
|
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,65 @@
|
|
|
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 .pagination_meta import PaginationMeta
|
|
8
|
+
from .provider_service_breakdown_item import ProviderServiceBreakdownItem
|
|
9
|
+
from .spending_by_date_item import SpendingByDateItem
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ProviderServiceBreakdownData(UniversalBaseModel):
|
|
13
|
+
"""
|
|
14
|
+
Provider service breakdown data with pagination
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
provider_id: str = pydantic.Field()
|
|
18
|
+
"""
|
|
19
|
+
Provider identifier
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
provider_name: str = pydantic.Field()
|
|
23
|
+
"""
|
|
24
|
+
Display name
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
period: str = pydantic.Field()
|
|
28
|
+
"""
|
|
29
|
+
Period in YYYY-MM format (legacy, use start_date/end_date)
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
start_date: str = pydantic.Field()
|
|
33
|
+
"""
|
|
34
|
+
Start date in YYYY-MM-DD format
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
end_date: str = pydantic.Field()
|
|
38
|
+
"""
|
|
39
|
+
End date in YYYY-MM-DD format
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
total_period_cost: float = pydantic.Field()
|
|
43
|
+
"""
|
|
44
|
+
Total cost for the period
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
items: typing.List[ProviderServiceBreakdownItem] = pydantic.Field()
|
|
48
|
+
"""
|
|
49
|
+
Service breakdown items
|
|
50
|
+
"""
|
|
51
|
+
|
|
52
|
+
pagination: PaginationMeta
|
|
53
|
+
totals_by_date: typing.Optional[typing.List[SpendingByDateItem]] = pydantic.Field(default=None)
|
|
54
|
+
"""
|
|
55
|
+
Per-date totals aggregated across all items (all pages)
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
if IS_PYDANTIC_V2:
|
|
59
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
60
|
+
else:
|
|
61
|
+
|
|
62
|
+
class Config:
|
|
63
|
+
frozen = True
|
|
64
|
+
smart_union = True
|
|
65
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,72 @@
|
|
|
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 .spending_by_date_item import SpendingByDateItem
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ProviderServiceBreakdownItem(UniversalBaseModel):
|
|
11
|
+
"""
|
|
12
|
+
Service breakdown item for provider
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
service: typing.Optional[str] = pydantic.Field(default=None)
|
|
16
|
+
"""
|
|
17
|
+
Service name (None if grouped by other fields)
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
environment: typing.Optional[str] = pydantic.Field(default=None)
|
|
21
|
+
"""
|
|
22
|
+
Environment
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
region: typing.Optional[str] = pydantic.Field(default=None)
|
|
26
|
+
"""
|
|
27
|
+
Cloud region
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
account_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
31
|
+
"""
|
|
32
|
+
Cloud account ID
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
tag_key: typing.Optional[str] = pydantic.Field(default=None)
|
|
36
|
+
"""
|
|
37
|
+
Tag key
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
tag_value: typing.Optional[str] = pydantic.Field(default=None)
|
|
41
|
+
"""
|
|
42
|
+
Tag value
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
cost: float = pydantic.Field()
|
|
46
|
+
"""
|
|
47
|
+
Current period cost
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
previous_cost: typing.Optional[float] = pydantic.Field(default=None)
|
|
51
|
+
"""
|
|
52
|
+
Previous period cost
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
change_percentage: typing.Optional[float] = pydantic.Field(default=None)
|
|
56
|
+
"""
|
|
57
|
+
Change from previous period
|
|
58
|
+
"""
|
|
59
|
+
|
|
60
|
+
spendings_by_date: typing.Optional[typing.List[SpendingByDateItem]] = pydantic.Field(default=None)
|
|
61
|
+
"""
|
|
62
|
+
Daily spending breakdown for this service
|
|
63
|
+
"""
|
|
64
|
+
|
|
65
|
+
if IS_PYDANTIC_V2:
|
|
66
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
67
|
+
else:
|
|
68
|
+
|
|
69
|
+
class Config:
|
|
70
|
+
frozen = True
|
|
71
|
+
smart_union = True
|
|
72
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,62 @@
|
|
|
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 .provider_service_breakdown_item import ProviderServiceBreakdownItem
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ProviderServiceBreakdownRawData(UniversalBaseModel):
|
|
11
|
+
"""
|
|
12
|
+
Provider service breakdown raw data without pagination
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
provider_id: str = pydantic.Field()
|
|
16
|
+
"""
|
|
17
|
+
Provider identifier
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
provider_name: str = pydantic.Field()
|
|
21
|
+
"""
|
|
22
|
+
Display name
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
period: str = pydantic.Field()
|
|
26
|
+
"""
|
|
27
|
+
Period in YYYY-MM format
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
start_date: str = pydantic.Field()
|
|
31
|
+
"""
|
|
32
|
+
Start date in YYYY-MM-DD format
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
end_date: str = pydantic.Field()
|
|
36
|
+
"""
|
|
37
|
+
End date in YYYY-MM-DD format
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
total_period_cost: float = pydantic.Field()
|
|
41
|
+
"""
|
|
42
|
+
Total cost for the period
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
items: typing.List[ProviderServiceBreakdownItem] = pydantic.Field()
|
|
46
|
+
"""
|
|
47
|
+
All service breakdown items (no pagination)
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
total_items: int = pydantic.Field()
|
|
51
|
+
"""
|
|
52
|
+
Total number of items
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
if IS_PYDANTIC_V2:
|
|
56
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
57
|
+
else:
|
|
58
|
+
|
|
59
|
+
class Config:
|
|
60
|
+
frozen = True
|
|
61
|
+
smart_union = True
|
|
62
|
+
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 .provider_service_breakdown_raw_data import ProviderServiceBreakdownRawData
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ProviderServiceBreakdownRawResponse(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
Response for raw provider service breakdown (all records)
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
success: typing.Optional[bool] = None
|
|
17
|
+
timestamp: typing.Optional[dt.datetime] = None
|
|
18
|
+
data: ProviderServiceBreakdownRawData
|
|
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 .provider_service_breakdown_data import ProviderServiceBreakdownData
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ProviderServiceBreakdownResponse(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
Response for provider service breakdown
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
success: typing.Optional[bool] = None
|
|
17
|
+
timestamp: typing.Optional[dt.datetime] = None
|
|
18
|
+
data: ProviderServiceBreakdownData
|
|
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,62 @@
|
|
|
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 .provider_service_costs_data_point import ProviderServiceCostsDataPoint
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ProviderServiceCostsBreakdownData(UniversalBaseModel):
|
|
11
|
+
"""
|
|
12
|
+
Provider costs breakdown chart data for stacked bar visualization, grouped by service/account/region/tag
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
provider_id: str = pydantic.Field()
|
|
16
|
+
"""
|
|
17
|
+
Provider identifier: aws, gcp, azure, k8s
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
provider_name: str = pydantic.Field()
|
|
21
|
+
"""
|
|
22
|
+
Display name
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
granularity: str = pydantic.Field()
|
|
26
|
+
"""
|
|
27
|
+
Granularity: 'daily' or 'monthly'
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
start_date: str = pydantic.Field()
|
|
31
|
+
"""
|
|
32
|
+
Start date in YYYY-MM-DD format
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
end_date: str = pydantic.Field()
|
|
36
|
+
"""
|
|
37
|
+
End date in YYYY-MM-DD format
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
groups: typing.List[str] = pydantic.Field()
|
|
41
|
+
"""
|
|
42
|
+
Ordered list of group keys: ['RDS', 'EC2', 'other']
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
data_points: typing.List[ProviderServiceCostsDataPoint] = pydantic.Field()
|
|
46
|
+
"""
|
|
47
|
+
Time series data points
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
totals: typing.Dict[str, float] = pydantic.Field()
|
|
51
|
+
"""
|
|
52
|
+
Total per group for the period
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
if IS_PYDANTIC_V2:
|
|
56
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
57
|
+
else:
|
|
58
|
+
|
|
59
|
+
class Config:
|
|
60
|
+
frozen = True
|
|
61
|
+
smart_union = True
|
|
62
|
+
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 .provider_service_costs_breakdown_data import ProviderServiceCostsBreakdownData
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ProviderServiceCostsBreakdownResponse(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
Response for provider service costs breakdown chart
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
success: typing.Optional[bool] = None
|
|
17
|
+
timestamp: typing.Optional[dt.datetime] = None
|
|
18
|
+
data: ProviderServiceCostsBreakdownData
|
|
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 ProviderServiceCostsDataPoint(UniversalBaseModel):
|
|
10
|
+
"""
|
|
11
|
+
Single data point for provider 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: {'RDS': 185.30, 'EC2': 245.50, 'other': 128.65}
|
|
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,61 @@
|
|
|
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 ProviderSpending(UniversalBaseModel):
|
|
10
|
+
"""
|
|
11
|
+
Provider-level spending for dashboard summary
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
provider_id: str = pydantic.Field()
|
|
15
|
+
"""
|
|
16
|
+
Provider identifier: aws, gcp, azure, k8s
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
provider_name: str = pydantic.Field()
|
|
20
|
+
"""
|
|
21
|
+
Display name: AWS, GCP, etc.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
monthly_spending: float = pydantic.Field()
|
|
25
|
+
"""
|
|
26
|
+
Current month spending for this provider
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
monthly_spending_percentage: typing.Optional[float] = pydantic.Field(default=None)
|
|
30
|
+
"""
|
|
31
|
+
MoM change percentage
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
monthly_spending_change: typing.Optional[float] = pydantic.Field(default=None)
|
|
35
|
+
"""
|
|
36
|
+
MoM change in dollar amount
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
previous_month_spending: typing.Optional[float] = pydantic.Field(default=None)
|
|
40
|
+
"""
|
|
41
|
+
Previous fully closed month total spending
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
potential_savings: float = pydantic.Field()
|
|
45
|
+
"""
|
|
46
|
+
Total potential monthly savings
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
potential_savings_percentage: float = pydantic.Field()
|
|
50
|
+
"""
|
|
51
|
+
Savings as percentage of spending
|
|
52
|
+
"""
|
|
53
|
+
|
|
54
|
+
if IS_PYDANTIC_V2:
|
|
55
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
56
|
+
else:
|
|
57
|
+
|
|
58
|
+
class Config:
|
|
59
|
+
frozen = True
|
|
60
|
+
smart_union = True
|
|
61
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,67 @@
|
|
|
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 .provider_top_service import ProviderTopService
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ProviderSpendingSummaryData(UniversalBaseModel):
|
|
11
|
+
"""
|
|
12
|
+
Provider-specific spending summary
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
provider_id: str = pydantic.Field()
|
|
16
|
+
"""
|
|
17
|
+
Provider identifier: aws, gcp, azure, k8s
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
provider_name: str = pydantic.Field()
|
|
21
|
+
"""
|
|
22
|
+
Display name
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
monthly_spending: float = pydantic.Field()
|
|
26
|
+
"""
|
|
27
|
+
Current month spending
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
monthly_spending_percentage: typing.Optional[float] = pydantic.Field(default=None)
|
|
31
|
+
"""
|
|
32
|
+
MoM change percentage
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
forecasted_monthly_costs: float = pydantic.Field()
|
|
36
|
+
"""
|
|
37
|
+
Projected full month costs based on daily run rate
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
forecasted_monthly_costs_percentage: typing.Optional[float] = pydantic.Field(default=None)
|
|
41
|
+
"""
|
|
42
|
+
Forecast vs previous month actual percentage
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
potential_savings: float = pydantic.Field()
|
|
46
|
+
"""
|
|
47
|
+
Total potential savings for this provider
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
potential_savings_percentage: float = pydantic.Field()
|
|
51
|
+
"""
|
|
52
|
+
Savings as percentage of spending
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
top_services: typing.List[ProviderTopService] = pydantic.Field()
|
|
56
|
+
"""
|
|
57
|
+
Top 3 services by cost
|
|
58
|
+
"""
|
|
59
|
+
|
|
60
|
+
if IS_PYDANTIC_V2:
|
|
61
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
62
|
+
else:
|
|
63
|
+
|
|
64
|
+
class Config:
|
|
65
|
+
frozen = True
|
|
66
|
+
smart_union = True
|
|
67
|
+
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 .provider_spending_summary_data import ProviderSpendingSummaryData
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ProviderSpendingSummaryResponse(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
Response for provider spending summary
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
success: typing.Optional[bool] = None
|
|
17
|
+
timestamp: typing.Optional[dt.datetime] = None
|
|
18
|
+
data: ProviderSpendingSummaryData
|
|
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,57 @@
|
|
|
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 ProviderTimelineData(UniversalBaseModel):
|
|
11
|
+
"""
|
|
12
|
+
Provider spending timeline data
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
provider_id: str = pydantic.Field()
|
|
16
|
+
"""
|
|
17
|
+
Provider identifier
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
provider_name: str = pydantic.Field()
|
|
21
|
+
"""
|
|
22
|
+
Display name
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
granularity: str = pydantic.Field()
|
|
26
|
+
"""
|
|
27
|
+
Granularity: 'daily' or 'monthly'
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
start_date: str = pydantic.Field()
|
|
31
|
+
"""
|
|
32
|
+
Start date in YYYY-MM-DD format
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
end_date: str = pydantic.Field()
|
|
36
|
+
"""
|
|
37
|
+
End date in YYYY-MM-DD format
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
data_points: typing.List[DailySpendingDataPoint] = pydantic.Field()
|
|
41
|
+
"""
|
|
42
|
+
Timeline data points
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
total: float = pydantic.Field()
|
|
46
|
+
"""
|
|
47
|
+
Total cost for the period
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
if IS_PYDANTIC_V2:
|
|
51
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
52
|
+
else:
|
|
53
|
+
|
|
54
|
+
class Config:
|
|
55
|
+
frozen = True
|
|
56
|
+
smart_union = True
|
|
57
|
+
extra = pydantic.Extra.allow
|