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 datetime as dt
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
import pydantic
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
|
+
from .recommendations_overview_data import RecommendationsOverviewData
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class RecommendationsOverviewResponse(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
Response for recommendations overview
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
success: typing.Optional[bool] = None
|
|
17
|
+
timestamp: typing.Optional[dt.datetime] = None
|
|
18
|
+
data: RecommendationsOverviewData
|
|
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,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 .endpoint_data import EndpointData
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class RegisterEndpointResponse(UniversalBaseModel):
|
|
12
|
+
success: typing.Optional[bool] = None
|
|
13
|
+
timestamp: typing.Optional[dt.datetime] = None
|
|
14
|
+
data: EndpointData
|
|
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
|
+
|
|
8
|
+
|
|
9
|
+
class ResourceChange(UniversalBaseModel):
|
|
10
|
+
resource_type: str = pydantic.Field()
|
|
11
|
+
"""
|
|
12
|
+
Terraform resource type, e.g. aws_instance
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
resource_name: str = pydantic.Field()
|
|
16
|
+
"""
|
|
17
|
+
Terraform resource name, e.g. api_server
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
change_type: str = pydantic.Field()
|
|
21
|
+
"""
|
|
22
|
+
One of: added, modified, removed
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
file: str = pydantic.Field()
|
|
26
|
+
"""
|
|
27
|
+
Source .tf filename
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
attributes_changed: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None)
|
|
31
|
+
"""
|
|
32
|
+
Changed attributes with old/new values
|
|
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,21 @@
|
|
|
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 ResourceSnapshot(UniversalBaseModel):
|
|
10
|
+
resource_type: str
|
|
11
|
+
resource_name: str
|
|
12
|
+
attributes: typing.Optional[typing.Dict[str, typing.Any]] = None
|
|
13
|
+
|
|
14
|
+
if IS_PYDANTIC_V2:
|
|
15
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
16
|
+
else:
|
|
17
|
+
|
|
18
|
+
class Config:
|
|
19
|
+
frozen = True
|
|
20
|
+
smart_union = True
|
|
21
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,20 @@
|
|
|
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 RevokeApiKeyData(UniversalBaseModel):
|
|
10
|
+
id: str
|
|
11
|
+
revoked: bool
|
|
12
|
+
|
|
13
|
+
if IS_PYDANTIC_V2:
|
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
15
|
+
else:
|
|
16
|
+
|
|
17
|
+
class Config:
|
|
18
|
+
frozen = True
|
|
19
|
+
smart_union = True
|
|
20
|
+
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 .revoke_api_key_data import RevokeApiKeyData
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class RevokeApiKeyResponse(UniversalBaseModel):
|
|
12
|
+
success: typing.Optional[bool] = None
|
|
13
|
+
timestamp: typing.Optional[dt.datetime] = None
|
|
14
|
+
data: RevokeApiKeyData
|
|
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,29 @@
|
|
|
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 .risk_factor import RiskFactor
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class RiskAssessment(UniversalBaseModel):
|
|
11
|
+
level: str = pydantic.Field()
|
|
12
|
+
"""
|
|
13
|
+
LOW, MODERATE, HIGH, CRITICAL
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
factors: typing.Optional[typing.List[RiskFactor]] = None
|
|
17
|
+
sources: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
|
18
|
+
"""
|
|
19
|
+
Documentation URLs used for the recommendation
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
if IS_PYDANTIC_V2:
|
|
23
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
24
|
+
else:
|
|
25
|
+
|
|
26
|
+
class Config:
|
|
27
|
+
frozen = True
|
|
28
|
+
smart_union = True
|
|
29
|
+
extra = pydantic.Extra.allow
|
|
@@ -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 RiskFactor(UniversalBaseModel):
|
|
10
|
+
factor: str = pydantic.Field()
|
|
11
|
+
"""
|
|
12
|
+
Risk factor name
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
detail: str = pydantic.Field()
|
|
16
|
+
"""
|
|
17
|
+
Risk explanation
|
|
18
|
+
"""
|
|
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
|
+
from .pagination_meta import PaginationMeta
|
|
8
|
+
from .saved_item import SavedItem
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class SavedBreakdownData(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
Saved breakdown data with pagination
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
total_savings: float = pydantic.Field()
|
|
17
|
+
"""
|
|
18
|
+
Sum of monthly_savings across all filtered results
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
items: typing.List[SavedItem]
|
|
22
|
+
pagination: PaginationMeta
|
|
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
|
|
@@ -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 .saved_breakdown_data import SavedBreakdownData
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class SavedBreakdownResponse(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
Response for saved breakdown
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
success: typing.Optional[bool] = None
|
|
17
|
+
timestamp: typing.Optional[dt.datetime] = None
|
|
18
|
+
data: SavedBreakdownData
|
|
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
|
+
from .pagination_meta import PaginationMeta
|
|
8
|
+
from .saved_by_provider_item import SavedByProviderItem
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class SavedByProviderBreakdownData(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
Saved by provider breakdown data with pagination
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
total_savings: float = pydantic.Field()
|
|
17
|
+
"""
|
|
18
|
+
Sum of monthly_savings for this provider (filtered)
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
items: typing.List[SavedByProviderItem]
|
|
22
|
+
pagination: PaginationMeta
|
|
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
|
|
@@ -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 .saved_by_provider_breakdown_data import SavedByProviderBreakdownData
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class SavedByProviderBreakdownResponse(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
Response for saved by provider breakdown
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
success: typing.Optional[bool] = None
|
|
17
|
+
timestamp: typing.Optional[dt.datetime] = None
|
|
18
|
+
data: SavedByProviderBreakdownData
|
|
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,76 @@
|
|
|
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 SavedByProviderItem(UniversalBaseModel):
|
|
10
|
+
"""
|
|
11
|
+
Item for Savings Audit breakdown by provider
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
period: str = pydantic.Field()
|
|
15
|
+
"""
|
|
16
|
+
Period in YYYY-MM format
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
account_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
20
|
+
"""
|
|
21
|
+
Cloud account ID
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
environment: typing.Optional[str] = pydantic.Field(default=None)
|
|
25
|
+
"""
|
|
26
|
+
Environment: Production, Staging, etc.
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
provider: str = pydantic.Field()
|
|
30
|
+
"""
|
|
31
|
+
Provider identifier: aws, gcp, azure, k8s
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
service: str = pydantic.Field()
|
|
35
|
+
"""
|
|
36
|
+
Resource/service name - maps to Resource column in UI
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
usage_type: str = pydantic.Field()
|
|
40
|
+
"""
|
|
41
|
+
Usage type description
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
usage_quantity: float = pydantic.Field()
|
|
45
|
+
"""
|
|
46
|
+
Usage quantity
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
usage_unit: str = pydantic.Field()
|
|
50
|
+
"""
|
|
51
|
+
Usage unit
|
|
52
|
+
"""
|
|
53
|
+
|
|
54
|
+
cost: float = pydantic.Field()
|
|
55
|
+
"""
|
|
56
|
+
Pre-optimization cost
|
|
57
|
+
"""
|
|
58
|
+
|
|
59
|
+
savings: float = pydantic.Field()
|
|
60
|
+
"""
|
|
61
|
+
Monthly savings amount
|
|
62
|
+
"""
|
|
63
|
+
|
|
64
|
+
author: typing.Optional[str] = pydantic.Field(default=None)
|
|
65
|
+
"""
|
|
66
|
+
User who approved - maps from approved_by
|
|
67
|
+
"""
|
|
68
|
+
|
|
69
|
+
if IS_PYDANTIC_V2:
|
|
70
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
71
|
+
else:
|
|
72
|
+
|
|
73
|
+
class Config:
|
|
74
|
+
frozen = True
|
|
75
|
+
smart_union = True
|
|
76
|
+
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
|
+
|
|
8
|
+
|
|
9
|
+
class SavedItem(UniversalBaseModel):
|
|
10
|
+
"""
|
|
11
|
+
Detailed saved item
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
period: str
|
|
15
|
+
account_id: typing.Optional[str] = None
|
|
16
|
+
environment: typing.Optional[str] = None
|
|
17
|
+
service: str
|
|
18
|
+
usage_type: str
|
|
19
|
+
usage_quantity: float
|
|
20
|
+
usage_unit: str
|
|
21
|
+
approved_by: typing.Optional[str] = None
|
|
22
|
+
pre_optimization_cost: float
|
|
23
|
+
post_optimization_cost: float
|
|
24
|
+
monthly_savings: float
|
|
25
|
+
annual_savings: float
|
|
26
|
+
roi: float
|
|
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,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 SavedProviderSummary(UniversalBaseModel):
|
|
10
|
+
"""
|
|
11
|
+
Provider-level savings summary for Savings Audit
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
provider_id: str = pydantic.Field()
|
|
15
|
+
"""
|
|
16
|
+
Provider identifier: aws, gcp, azure, k8s
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
provider: str = pydantic.Field()
|
|
20
|
+
"""
|
|
21
|
+
Display name: AWS, GCP, etc.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
total_savings: float = pydantic.Field()
|
|
25
|
+
"""
|
|
26
|
+
Total monthly savings for this provider
|
|
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,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 .saved_provider_summary import SavedProviderSummary
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class SavedSummaryData(UniversalBaseModel):
|
|
11
|
+
"""
|
|
12
|
+
Savings Audit summary data - simplified for UI BigNumbers
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
total_monthly_savings: float = pydantic.Field()
|
|
16
|
+
"""
|
|
17
|
+
Total monthly savings from implemented recommendations
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
total_monthly_savings_percentage: typing.Optional[float] = pydantic.Field(default=None)
|
|
21
|
+
"""
|
|
22
|
+
MoM change percentage
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
total_annual_savings: float = pydantic.Field()
|
|
26
|
+
"""
|
|
27
|
+
Total annual savings
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
payback: typing.Optional[float] = pydantic.Field(default=None)
|
|
31
|
+
"""
|
|
32
|
+
Payback period in months
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
average_roi: float = pydantic.Field()
|
|
36
|
+
"""
|
|
37
|
+
Average ROI percentage
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
total_savings: float = pydantic.Field()
|
|
41
|
+
"""
|
|
42
|
+
Savings Audit total (annualized)
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
providers: typing.Optional[typing.List[SavedProviderSummary]] = pydantic.Field(default=None)
|
|
46
|
+
"""
|
|
47
|
+
Per-provider savings breakdown for filtering
|
|
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
|
|
@@ -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 .saved_summary_data import SavedSummaryData
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class SavedSummaryResponse(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
Response for saved summary
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
success: typing.Optional[bool] = None
|
|
17
|
+
timestamp: typing.Optional[dt.datetime] = None
|
|
18
|
+
data: SavedSummaryData
|
|
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,28 @@
|
|
|
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 SavingsDecisionData(UniversalBaseModel):
|
|
10
|
+
"""
|
|
11
|
+
Data returned after making a decision
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
recommendation_id: str
|
|
15
|
+
saving_acceptance: str
|
|
16
|
+
saving_accepted_by: str
|
|
17
|
+
saving_accepted_at: str
|
|
18
|
+
rejection_reason: typing.Optional[str] = None
|
|
19
|
+
rejection_explanation: typing.Optional[str] = None
|
|
20
|
+
|
|
21
|
+
if IS_PYDANTIC_V2:
|
|
22
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
23
|
+
else:
|
|
24
|
+
|
|
25
|
+
class Config:
|
|
26
|
+
frozen = True
|
|
27
|
+
smart_union = True
|
|
28
|
+
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 .savings_decision_data import SavingsDecisionData
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class SavingsDecisionResponse(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
Response after making a decision
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
success: typing.Optional[bool] = None
|
|
17
|
+
timestamp: typing.Optional[dt.datetime] = None
|
|
18
|
+
data: SavingsDecisionData
|
|
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 SpendingByDateItem(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
|
+
value: float = pydantic.Field()
|
|
20
|
+
"""
|
|
21
|
+
Cost for this date
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
change_percentage: typing.Optional[float] = pydantic.Field(default=None)
|
|
25
|
+
"""
|
|
26
|
+
Change from previous day
|
|
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
|