payi 0.1.0a1__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.
Potentially problematic release.
This version of payi might be problematic. Click here for more details.
- payi/__init__.py +83 -0
- payi/_base_client.py +2006 -0
- payi/_client.py +414 -0
- payi/_compat.py +222 -0
- payi/_constants.py +14 -0
- payi/_exceptions.py +108 -0
- payi/_files.py +127 -0
- payi/_models.py +739 -0
- payi/_qs.py +150 -0
- payi/_resource.py +43 -0
- payi/_response.py +820 -0
- payi/_streaming.py +333 -0
- payi/_types.py +220 -0
- payi/_utils/__init__.py +52 -0
- payi/_utils/_logs.py +25 -0
- payi/_utils/_proxy.py +63 -0
- payi/_utils/_reflection.py +8 -0
- payi/_utils/_streams.py +12 -0
- payi/_utils/_sync.py +81 -0
- payi/_utils/_transform.py +382 -0
- payi/_utils/_typing.py +120 -0
- payi/_utils/_utils.py +402 -0
- payi/_version.py +4 -0
- payi/lib/.keep +4 -0
- payi/py.typed +0 -0
- payi/resources/__init__.py +33 -0
- payi/resources/budgets/__init__.py +33 -0
- payi/resources/budgets/budgets.py +717 -0
- payi/resources/budgets/tags.py +529 -0
- payi/resources/ingest_requests.py +187 -0
- payi/types/__init__.py +13 -0
- payi/types/budget_create_params.py +26 -0
- payi/types/budget_history_response.py +110 -0
- payi/types/budget_list_params.py +25 -0
- payi/types/budget_response.py +98 -0
- payi/types/budget_update_params.py +17 -0
- payi/types/budgets/__init__.py +13 -0
- payi/types/budgets/budget_tags_response.py +18 -0
- payi/types/budgets/tag_create_params.py +16 -0
- payi/types/budgets/tag_create_response.py +9 -0
- payi/types/budgets/tag_delete_response.py +9 -0
- payi/types/budgets/tag_list_response.py +9 -0
- payi/types/budgets/tag_remove_params.py +16 -0
- payi/types/budgets/tag_remove_response.py +9 -0
- payi/types/budgets/tag_update_params.py +16 -0
- payi/types/budgets/tag_update_response.py +9 -0
- payi/types/default_response.py +13 -0
- payi/types/ingest_request_create_params.py +27 -0
- payi/types/paged_budget_list.py +110 -0
- payi/types/successful_proxy_result.py +43 -0
- payi-0.1.0a1.dist-info/METADATA +355 -0
- payi-0.1.0a1.dist-info/RECORD +54 -0
- payi-0.1.0a1.dist-info/WHEEL +4 -0
- payi-0.1.0a1.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ..types import ingest_request_create_params
|
|
8
|
+
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
9
|
+
from .._utils import (
|
|
10
|
+
maybe_transform,
|
|
11
|
+
strip_not_given,
|
|
12
|
+
async_maybe_transform,
|
|
13
|
+
)
|
|
14
|
+
from .._compat import cached_property
|
|
15
|
+
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
16
|
+
from .._response import (
|
|
17
|
+
to_raw_response_wrapper,
|
|
18
|
+
to_streamed_response_wrapper,
|
|
19
|
+
async_to_raw_response_wrapper,
|
|
20
|
+
async_to_streamed_response_wrapper,
|
|
21
|
+
)
|
|
22
|
+
from .._base_client import (
|
|
23
|
+
make_request_options,
|
|
24
|
+
)
|
|
25
|
+
from ..types.successful_proxy_result import SuccessfulProxyResult
|
|
26
|
+
|
|
27
|
+
__all__ = ["IngestRequestsResource", "AsyncIngestRequestsResource"]
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class IngestRequestsResource(SyncAPIResource):
|
|
31
|
+
@cached_property
|
|
32
|
+
def with_raw_response(self) -> IngestRequestsResourceWithRawResponse:
|
|
33
|
+
return IngestRequestsResourceWithRawResponse(self)
|
|
34
|
+
|
|
35
|
+
@cached_property
|
|
36
|
+
def with_streaming_response(self) -> IngestRequestsResourceWithStreamingResponse:
|
|
37
|
+
return IngestRequestsResourceWithStreamingResponse(self)
|
|
38
|
+
|
|
39
|
+
def create(
|
|
40
|
+
self,
|
|
41
|
+
*,
|
|
42
|
+
category: str,
|
|
43
|
+
resource: str,
|
|
44
|
+
units: ingest_request_create_params.Units,
|
|
45
|
+
x_proxy_budget_ids: str | NotGiven = NOT_GIVEN,
|
|
46
|
+
x_proxy_request_tags: str | NotGiven = NOT_GIVEN,
|
|
47
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
48
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
49
|
+
extra_headers: Headers | None = None,
|
|
50
|
+
extra_query: Query | None = None,
|
|
51
|
+
extra_body: Body | None = None,
|
|
52
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
53
|
+
) -> SuccessfulProxyResult:
|
|
54
|
+
"""
|
|
55
|
+
Ingest a request
|
|
56
|
+
|
|
57
|
+
Args:
|
|
58
|
+
extra_headers: Send extra headers
|
|
59
|
+
|
|
60
|
+
extra_query: Add additional query parameters to the request
|
|
61
|
+
|
|
62
|
+
extra_body: Add additional JSON properties to the request
|
|
63
|
+
|
|
64
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
65
|
+
"""
|
|
66
|
+
extra_headers = {
|
|
67
|
+
**strip_not_given(
|
|
68
|
+
{
|
|
69
|
+
"xProxy-Budget-IDs": x_proxy_budget_ids,
|
|
70
|
+
"xProxy-Request-Tags": x_proxy_request_tags,
|
|
71
|
+
}
|
|
72
|
+
),
|
|
73
|
+
**(extra_headers or {}),
|
|
74
|
+
}
|
|
75
|
+
return self._post(
|
|
76
|
+
"/api/v1/ingest",
|
|
77
|
+
body=maybe_transform(
|
|
78
|
+
{
|
|
79
|
+
"category": category,
|
|
80
|
+
"resource": resource,
|
|
81
|
+
"units": units,
|
|
82
|
+
},
|
|
83
|
+
ingest_request_create_params.IngestRequestCreateParams,
|
|
84
|
+
),
|
|
85
|
+
options=make_request_options(
|
|
86
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
87
|
+
),
|
|
88
|
+
cast_to=SuccessfulProxyResult,
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
class AsyncIngestRequestsResource(AsyncAPIResource):
|
|
93
|
+
@cached_property
|
|
94
|
+
def with_raw_response(self) -> AsyncIngestRequestsResourceWithRawResponse:
|
|
95
|
+
return AsyncIngestRequestsResourceWithRawResponse(self)
|
|
96
|
+
|
|
97
|
+
@cached_property
|
|
98
|
+
def with_streaming_response(self) -> AsyncIngestRequestsResourceWithStreamingResponse:
|
|
99
|
+
return AsyncIngestRequestsResourceWithStreamingResponse(self)
|
|
100
|
+
|
|
101
|
+
async def create(
|
|
102
|
+
self,
|
|
103
|
+
*,
|
|
104
|
+
category: str,
|
|
105
|
+
resource: str,
|
|
106
|
+
units: ingest_request_create_params.Units,
|
|
107
|
+
x_proxy_budget_ids: str | NotGiven = NOT_GIVEN,
|
|
108
|
+
x_proxy_request_tags: str | NotGiven = NOT_GIVEN,
|
|
109
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
110
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
111
|
+
extra_headers: Headers | None = None,
|
|
112
|
+
extra_query: Query | None = None,
|
|
113
|
+
extra_body: Body | None = None,
|
|
114
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
115
|
+
) -> SuccessfulProxyResult:
|
|
116
|
+
"""
|
|
117
|
+
Ingest a request
|
|
118
|
+
|
|
119
|
+
Args:
|
|
120
|
+
extra_headers: Send extra headers
|
|
121
|
+
|
|
122
|
+
extra_query: Add additional query parameters to the request
|
|
123
|
+
|
|
124
|
+
extra_body: Add additional JSON properties to the request
|
|
125
|
+
|
|
126
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
127
|
+
"""
|
|
128
|
+
extra_headers = {
|
|
129
|
+
**strip_not_given(
|
|
130
|
+
{
|
|
131
|
+
"xProxy-Budget-IDs": x_proxy_budget_ids,
|
|
132
|
+
"xProxy-Request-Tags": x_proxy_request_tags,
|
|
133
|
+
}
|
|
134
|
+
),
|
|
135
|
+
**(extra_headers or {}),
|
|
136
|
+
}
|
|
137
|
+
return await self._post(
|
|
138
|
+
"/api/v1/ingest",
|
|
139
|
+
body=await async_maybe_transform(
|
|
140
|
+
{
|
|
141
|
+
"category": category,
|
|
142
|
+
"resource": resource,
|
|
143
|
+
"units": units,
|
|
144
|
+
},
|
|
145
|
+
ingest_request_create_params.IngestRequestCreateParams,
|
|
146
|
+
),
|
|
147
|
+
options=make_request_options(
|
|
148
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
149
|
+
),
|
|
150
|
+
cast_to=SuccessfulProxyResult,
|
|
151
|
+
)
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
class IngestRequestsResourceWithRawResponse:
|
|
155
|
+
def __init__(self, ingest_requests: IngestRequestsResource) -> None:
|
|
156
|
+
self._ingest_requests = ingest_requests
|
|
157
|
+
|
|
158
|
+
self.create = to_raw_response_wrapper(
|
|
159
|
+
ingest_requests.create,
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
class AsyncIngestRequestsResourceWithRawResponse:
|
|
164
|
+
def __init__(self, ingest_requests: AsyncIngestRequestsResource) -> None:
|
|
165
|
+
self._ingest_requests = ingest_requests
|
|
166
|
+
|
|
167
|
+
self.create = async_to_raw_response_wrapper(
|
|
168
|
+
ingest_requests.create,
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
class IngestRequestsResourceWithStreamingResponse:
|
|
173
|
+
def __init__(self, ingest_requests: IngestRequestsResource) -> None:
|
|
174
|
+
self._ingest_requests = ingest_requests
|
|
175
|
+
|
|
176
|
+
self.create = to_streamed_response_wrapper(
|
|
177
|
+
ingest_requests.create,
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
class AsyncIngestRequestsResourceWithStreamingResponse:
|
|
182
|
+
def __init__(self, ingest_requests: AsyncIngestRequestsResource) -> None:
|
|
183
|
+
self._ingest_requests = ingest_requests
|
|
184
|
+
|
|
185
|
+
self.create = async_to_streamed_response_wrapper(
|
|
186
|
+
ingest_requests.create,
|
|
187
|
+
)
|
payi/types/__init__.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .budget_response import BudgetResponse as BudgetResponse
|
|
6
|
+
from .default_response import DefaultResponse as DefaultResponse
|
|
7
|
+
from .paged_budget_list import PagedBudgetList as PagedBudgetList
|
|
8
|
+
from .budget_list_params import BudgetListParams as BudgetListParams
|
|
9
|
+
from .budget_create_params import BudgetCreateParams as BudgetCreateParams
|
|
10
|
+
from .budget_update_params import BudgetUpdateParams as BudgetUpdateParams
|
|
11
|
+
from .budget_history_response import BudgetHistoryResponse as BudgetHistoryResponse
|
|
12
|
+
from .successful_proxy_result import SuccessfulProxyResult as SuccessfulProxyResult
|
|
13
|
+
from .ingest_request_create_params import IngestRequestCreateParams as IngestRequestCreateParams
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import List, Optional
|
|
6
|
+
from typing_extensions import Literal, Required, Annotated, TypedDict
|
|
7
|
+
|
|
8
|
+
from .._utils import PropertyInfo
|
|
9
|
+
|
|
10
|
+
__all__ = ["BudgetCreateParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class BudgetCreateParams(TypedDict, total=False):
|
|
14
|
+
budget_name: Required[str]
|
|
15
|
+
|
|
16
|
+
max: Required[float]
|
|
17
|
+
|
|
18
|
+
base_cost_estimate: Literal["Max"]
|
|
19
|
+
|
|
20
|
+
budget_response_type: Literal["Block", "Allow"]
|
|
21
|
+
|
|
22
|
+
budget_tags: Optional[List[str]]
|
|
23
|
+
|
|
24
|
+
budget_type: Literal["Conservative", "Liberal"]
|
|
25
|
+
|
|
26
|
+
x_proxy_application_key: Annotated[str, PropertyInfo(alias="xProxy-Application-Key")]
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from pydantic import Field as FieldInfo
|
|
8
|
+
|
|
9
|
+
from .._models import BaseModel
|
|
10
|
+
|
|
11
|
+
__all__ = [
|
|
12
|
+
"BudgetHistoryResponse",
|
|
13
|
+
"BudgetHistory",
|
|
14
|
+
"BudgetHistoryTotals",
|
|
15
|
+
"BudgetHistoryTotalsCost",
|
|
16
|
+
"BudgetHistoryTotalsCostInput",
|
|
17
|
+
"BudgetHistoryTotalsCostOutput",
|
|
18
|
+
"BudgetHistoryTotalsCostTotal",
|
|
19
|
+
"BudgetHistoryTotalsRequests",
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class BudgetHistoryTotalsCostInput(BaseModel):
|
|
24
|
+
base: Optional[float] = None
|
|
25
|
+
|
|
26
|
+
billed: Optional[float] = None
|
|
27
|
+
|
|
28
|
+
overrun_base: Optional[float] = FieldInfo(alias="overrunBase", default=None)
|
|
29
|
+
|
|
30
|
+
overrun_billed: Optional[float] = FieldInfo(alias="overrunBilled", default=None)
|
|
31
|
+
|
|
32
|
+
revenue: Optional[float] = None
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class BudgetHistoryTotalsCostOutput(BaseModel):
|
|
36
|
+
base: Optional[float] = None
|
|
37
|
+
|
|
38
|
+
billed: Optional[float] = None
|
|
39
|
+
|
|
40
|
+
overrun_base: Optional[float] = FieldInfo(alias="overrunBase", default=None)
|
|
41
|
+
|
|
42
|
+
overrun_billed: Optional[float] = FieldInfo(alias="overrunBilled", default=None)
|
|
43
|
+
|
|
44
|
+
revenue: Optional[float] = None
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class BudgetHistoryTotalsCostTotal(BaseModel):
|
|
48
|
+
base: Optional[float] = None
|
|
49
|
+
|
|
50
|
+
billed: Optional[float] = None
|
|
51
|
+
|
|
52
|
+
overrun_base: Optional[float] = FieldInfo(alias="overrunBase", default=None)
|
|
53
|
+
|
|
54
|
+
overrun_billed: Optional[float] = FieldInfo(alias="overrunBilled", default=None)
|
|
55
|
+
|
|
56
|
+
revenue: Optional[float] = None
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class BudgetHistoryTotalsCost(BaseModel):
|
|
60
|
+
input: Optional[BudgetHistoryTotalsCostInput] = None
|
|
61
|
+
|
|
62
|
+
output: Optional[BudgetHistoryTotalsCostOutput] = None
|
|
63
|
+
|
|
64
|
+
total: Optional[BudgetHistoryTotalsCostTotal] = None
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class BudgetHistoryTotalsRequests(BaseModel):
|
|
68
|
+
blocked: Optional[int] = None
|
|
69
|
+
|
|
70
|
+
exceeded: Optional[int] = None
|
|
71
|
+
|
|
72
|
+
failed: Optional[int] = None
|
|
73
|
+
|
|
74
|
+
successful: Optional[int] = None
|
|
75
|
+
|
|
76
|
+
total: Optional[int] = None
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
class BudgetHistoryTotals(BaseModel):
|
|
80
|
+
cost: Optional[BudgetHistoryTotalsCost] = None
|
|
81
|
+
|
|
82
|
+
requests: Optional[BudgetHistoryTotalsRequests] = None
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
class BudgetHistory(BaseModel):
|
|
86
|
+
base_cost_estimate: Optional[Literal["Max"]] = None
|
|
87
|
+
|
|
88
|
+
budget_id: Optional[str] = None
|
|
89
|
+
|
|
90
|
+
budget_name: Optional[str] = None
|
|
91
|
+
|
|
92
|
+
budget_response_type: Optional[Literal["Block", "Allow"]] = None
|
|
93
|
+
|
|
94
|
+
budget_tags: Optional[List[str]] = None
|
|
95
|
+
|
|
96
|
+
budget_type: Optional[Literal["Conservative", "Liberal"]] = None
|
|
97
|
+
|
|
98
|
+
max: Optional[float] = None
|
|
99
|
+
|
|
100
|
+
reset_date: Optional[datetime] = None
|
|
101
|
+
|
|
102
|
+
totals: Optional[BudgetHistoryTotals] = None
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
class BudgetHistoryResponse(BaseModel):
|
|
106
|
+
budget_history: BudgetHistory
|
|
107
|
+
|
|
108
|
+
request_id: str
|
|
109
|
+
|
|
110
|
+
message: Optional[str] = None
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from .._utils import PropertyInfo
|
|
8
|
+
|
|
9
|
+
__all__ = ["BudgetListParams"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class BudgetListParams(TypedDict, total=False):
|
|
13
|
+
budget_name: Annotated[str, PropertyInfo(alias="BudgetName")]
|
|
14
|
+
|
|
15
|
+
page_number: Annotated[int, PropertyInfo(alias="PageNumber")]
|
|
16
|
+
|
|
17
|
+
page_size: Annotated[int, PropertyInfo(alias="PageSize")]
|
|
18
|
+
|
|
19
|
+
sort_ascending: Annotated[bool, PropertyInfo(alias="SortAscending")]
|
|
20
|
+
|
|
21
|
+
sort_by: Annotated[str, PropertyInfo(alias="SortBy")]
|
|
22
|
+
|
|
23
|
+
tags: Annotated[str, PropertyInfo(alias="Tags")]
|
|
24
|
+
|
|
25
|
+
x_proxy_application_key: Annotated[str, PropertyInfo(alias="xProxy-Application-Key")]
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from pydantic import Field as FieldInfo
|
|
8
|
+
|
|
9
|
+
from .._models import BaseModel
|
|
10
|
+
|
|
11
|
+
__all__ = [
|
|
12
|
+
"BudgetResponse",
|
|
13
|
+
"Budget",
|
|
14
|
+
"BudgetTotals",
|
|
15
|
+
"BudgetTotalsCost",
|
|
16
|
+
"BudgetTotalsCostInputCost",
|
|
17
|
+
"BudgetTotalsCostOutputCost",
|
|
18
|
+
"BudgetTotalsCostTotalCost",
|
|
19
|
+
"BudgetTotalsRequests",
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class BudgetTotalsCostInputCost(BaseModel):
|
|
24
|
+
base: Optional[float] = None
|
|
25
|
+
|
|
26
|
+
overrun_base: Optional[float] = None
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class BudgetTotalsCostOutputCost(BaseModel):
|
|
30
|
+
base: Optional[float] = None
|
|
31
|
+
|
|
32
|
+
overrun_base: Optional[float] = None
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class BudgetTotalsCostTotalCost(BaseModel):
|
|
36
|
+
base: Optional[float] = None
|
|
37
|
+
|
|
38
|
+
overrun_base: Optional[float] = None
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class BudgetTotalsCost(BaseModel):
|
|
42
|
+
input_cost: Optional[BudgetTotalsCostInputCost] = FieldInfo(alias="inputCost", default=None)
|
|
43
|
+
|
|
44
|
+
output_cost: Optional[BudgetTotalsCostOutputCost] = FieldInfo(alias="outputCost", default=None)
|
|
45
|
+
|
|
46
|
+
total_cost: Optional[BudgetTotalsCostTotalCost] = FieldInfo(alias="totalCost", default=None)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class BudgetTotalsRequests(BaseModel):
|
|
50
|
+
blocked: Optional[int] = None
|
|
51
|
+
|
|
52
|
+
error: Optional[int] = None
|
|
53
|
+
|
|
54
|
+
exceeded: Optional[int] = None
|
|
55
|
+
|
|
56
|
+
failed: Optional[int] = None
|
|
57
|
+
|
|
58
|
+
successful: Optional[int] = None
|
|
59
|
+
|
|
60
|
+
total: Optional[int] = None
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class BudgetTotals(BaseModel):
|
|
64
|
+
cost: Optional[BudgetTotalsCost] = None
|
|
65
|
+
|
|
66
|
+
requests: Optional[BudgetTotalsRequests] = None
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class Budget(BaseModel):
|
|
70
|
+
base_cost_estimate: Literal["Max"]
|
|
71
|
+
|
|
72
|
+
budget_creation_timestamp: datetime
|
|
73
|
+
|
|
74
|
+
budget_id: str
|
|
75
|
+
|
|
76
|
+
budget_name: str
|
|
77
|
+
|
|
78
|
+
budget_response_type: Literal["Block", "Allow"]
|
|
79
|
+
|
|
80
|
+
budget_type: Literal["Conservative", "Liberal"]
|
|
81
|
+
|
|
82
|
+
budget_update_timestamp: datetime
|
|
83
|
+
|
|
84
|
+
currency: str
|
|
85
|
+
|
|
86
|
+
max: float
|
|
87
|
+
|
|
88
|
+
totals: BudgetTotals
|
|
89
|
+
|
|
90
|
+
budget_tags: Optional[List[str]] = None
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
class BudgetResponse(BaseModel):
|
|
94
|
+
budget: Budget
|
|
95
|
+
|
|
96
|
+
request_id: str
|
|
97
|
+
|
|
98
|
+
message: Optional[str] = None
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Required, Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from .._utils import PropertyInfo
|
|
8
|
+
|
|
9
|
+
__all__ = ["BudgetUpdateParams"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class BudgetUpdateParams(TypedDict, total=False):
|
|
13
|
+
budget_name: Required[str]
|
|
14
|
+
|
|
15
|
+
max: float
|
|
16
|
+
|
|
17
|
+
x_proxy_application_key: Annotated[str, PropertyInfo(alias="xProxy-Application-Key")]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .tag_create_params import TagCreateParams as TagCreateParams
|
|
6
|
+
from .tag_list_response import TagListResponse as TagListResponse
|
|
7
|
+
from .tag_remove_params import TagRemoveParams as TagRemoveParams
|
|
8
|
+
from .tag_update_params import TagUpdateParams as TagUpdateParams
|
|
9
|
+
from .tag_create_response import TagCreateResponse as TagCreateResponse
|
|
10
|
+
from .tag_delete_response import TagDeleteResponse as TagDeleteResponse
|
|
11
|
+
from .tag_remove_response import TagRemoveResponse as TagRemoveResponse
|
|
12
|
+
from .tag_update_response import TagUpdateResponse as TagUpdateResponse
|
|
13
|
+
from .budget_tags_response import BudgetTagsResponse as BudgetTagsResponse
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
|
|
6
|
+
from pydantic import Field as FieldInfo
|
|
7
|
+
|
|
8
|
+
from ..._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["BudgetTagsResponse"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class BudgetTagsResponse(BaseModel):
|
|
14
|
+
created_on: Optional[datetime] = FieldInfo(alias="createdOn", default=None)
|
|
15
|
+
|
|
16
|
+
tag_id: Optional[int] = FieldInfo(alias="tagId", default=None)
|
|
17
|
+
|
|
18
|
+
tag_name: Optional[str] = FieldInfo(alias="tagName", default=None)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import List
|
|
6
|
+
from typing_extensions import Required, Annotated, TypedDict
|
|
7
|
+
|
|
8
|
+
from ..._utils import PropertyInfo
|
|
9
|
+
|
|
10
|
+
__all__ = ["TagCreateParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class TagCreateParams(TypedDict, total=False):
|
|
14
|
+
budget_tags: Required[List[str]]
|
|
15
|
+
|
|
16
|
+
x_proxy_application_key: Annotated[str, PropertyInfo(alias="xProxy-Application-Key")]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import List
|
|
6
|
+
from typing_extensions import Required, Annotated, TypedDict
|
|
7
|
+
|
|
8
|
+
from ..._utils import PropertyInfo
|
|
9
|
+
|
|
10
|
+
__all__ = ["TagRemoveParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class TagRemoveParams(TypedDict, total=False):
|
|
14
|
+
budget_tags: Required[List[str]]
|
|
15
|
+
|
|
16
|
+
x_proxy_application_key: Annotated[str, PropertyInfo(alias="xProxy-Application-Key")]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import List
|
|
6
|
+
from typing_extensions import Required, Annotated, TypedDict
|
|
7
|
+
|
|
8
|
+
from ..._utils import PropertyInfo
|
|
9
|
+
|
|
10
|
+
__all__ = ["TagUpdateParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class TagUpdateParams(TypedDict, total=False):
|
|
14
|
+
budget_tags: Required[List[str]]
|
|
15
|
+
|
|
16
|
+
x_proxy_application_key: Annotated[str, PropertyInfo(alias="xProxy-Application-Key")]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["DefaultResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class DefaultResponse(BaseModel):
|
|
11
|
+
request_id: str
|
|
12
|
+
|
|
13
|
+
message: Optional[str] = None
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Required, Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from .._utils import PropertyInfo
|
|
8
|
+
|
|
9
|
+
__all__ = ["IngestRequestCreateParams", "Units"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class IngestRequestCreateParams(TypedDict, total=False):
|
|
13
|
+
category: Required[str]
|
|
14
|
+
|
|
15
|
+
resource: Required[str]
|
|
16
|
+
|
|
17
|
+
units: Required[Units]
|
|
18
|
+
|
|
19
|
+
x_proxy_budget_ids: Annotated[str, PropertyInfo(alias="xProxy-Budget-IDs")]
|
|
20
|
+
|
|
21
|
+
x_proxy_request_tags: Annotated[str, PropertyInfo(alias="xProxy-Request-Tags")]
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class Units(TypedDict, total=False):
|
|
25
|
+
input: int
|
|
26
|
+
|
|
27
|
+
output: int
|