payi 0.1.0a110__py3-none-any.whl → 0.1.0a137__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.
Files changed (83) hide show
  1. payi/__init__.py +3 -1
  2. payi/_base_client.py +12 -12
  3. payi/_client.py +8 -8
  4. payi/_compat.py +48 -48
  5. payi/_models.py +87 -59
  6. payi/_qs.py +7 -7
  7. payi/_streaming.py +4 -6
  8. payi/_types.py +53 -12
  9. payi/_utils/__init__.py +9 -2
  10. payi/_utils/_compat.py +45 -0
  11. payi/_utils/_datetime_parse.py +136 -0
  12. payi/_utils/_sync.py +3 -31
  13. payi/_utils/_transform.py +13 -3
  14. payi/_utils/_typing.py +6 -1
  15. payi/_utils/_utils.py +5 -6
  16. payi/_version.py +1 -1
  17. payi/lib/AnthropicInstrumentor.py +83 -57
  18. payi/lib/BedrockInstrumentor.py +292 -57
  19. payi/lib/GoogleGenAiInstrumentor.py +18 -31
  20. payi/lib/OpenAIInstrumentor.py +56 -72
  21. payi/lib/ProviderRequest.py +216 -0
  22. payi/lib/StreamWrappers.py +379 -0
  23. payi/lib/VertexInstrumentor.py +18 -37
  24. payi/lib/VertexRequest.py +16 -2
  25. payi/lib/data/cohere_embed_english_v3.json +30706 -0
  26. payi/lib/helpers.py +53 -1
  27. payi/lib/instrument.py +404 -668
  28. payi/resources/categories/__init__.py +0 -14
  29. payi/resources/categories/categories.py +25 -53
  30. payi/resources/categories/resources.py +27 -23
  31. payi/resources/ingest.py +126 -132
  32. payi/resources/limits/__init__.py +14 -14
  33. payi/resources/limits/limits.py +58 -58
  34. payi/resources/limits/properties.py +171 -0
  35. payi/resources/requests/request_id/properties.py +8 -8
  36. payi/resources/requests/request_id/result.py +3 -3
  37. payi/resources/requests/response_id/properties.py +8 -8
  38. payi/resources/requests/response_id/result.py +3 -3
  39. payi/resources/use_cases/definitions/definitions.py +27 -27
  40. payi/resources/use_cases/definitions/kpis.py +23 -23
  41. payi/resources/use_cases/definitions/limit_config.py +14 -14
  42. payi/resources/use_cases/definitions/version.py +3 -3
  43. payi/resources/use_cases/kpis.py +15 -15
  44. payi/resources/use_cases/properties.py +6 -6
  45. payi/resources/use_cases/use_cases.py +7 -7
  46. payi/types/__init__.py +2 -0
  47. payi/types/bulk_ingest_response.py +3 -20
  48. payi/types/categories/__init__.py +0 -1
  49. payi/types/categories/resource_list_params.py +5 -1
  50. payi/types/category_list_resources_params.py +5 -1
  51. payi/types/category_resource_response.py +31 -1
  52. payi/types/ingest_event_param.py +7 -6
  53. payi/types/ingest_units_params.py +5 -4
  54. payi/types/limit_create_params.py +3 -3
  55. payi/types/limit_list_response.py +1 -3
  56. payi/types/limit_response.py +1 -3
  57. payi/types/limits/__init__.py +2 -9
  58. payi/types/limits/{tag_remove_params.py → property_update_params.py} +4 -5
  59. payi/types/limits/{tag_delete_response.py → property_update_response.py} +3 -3
  60. payi/types/requests/request_id/property_update_params.py +2 -2
  61. payi/types/requests/response_id/property_update_params.py +2 -2
  62. payi/types/shared/__init__.py +2 -0
  63. payi/types/shared/api_error.py +18 -0
  64. payi/types/shared/pay_i_common_models_budget_management_create_limit_base.py +3 -3
  65. payi/types/shared/properties_request.py +11 -0
  66. payi/types/shared/xproxy_result.py +2 -0
  67. payi/types/shared_params/pay_i_common_models_budget_management_create_limit_base.py +3 -3
  68. payi/types/use_cases/definitions/limit_config_create_params.py +3 -3
  69. payi/types/use_cases/property_update_params.py +2 -2
  70. {payi-0.1.0a110.dist-info → payi-0.1.0a137.dist-info}/METADATA +6 -6
  71. {payi-0.1.0a110.dist-info → payi-0.1.0a137.dist-info}/RECORD +73 -75
  72. payi/resources/categories/fixed_cost_resources.py +0 -196
  73. payi/resources/limits/tags.py +0 -507
  74. payi/types/categories/fixed_cost_resource_create_params.py +0 -21
  75. payi/types/limits/limit_tags.py +0 -16
  76. payi/types/limits/tag_create_params.py +0 -13
  77. payi/types/limits/tag_create_response.py +0 -10
  78. payi/types/limits/tag_list_response.py +0 -10
  79. payi/types/limits/tag_remove_response.py +0 -10
  80. payi/types/limits/tag_update_params.py +0 -13
  81. payi/types/limits/tag_update_response.py +0 -10
  82. {payi-0.1.0a110.dist-info → payi-0.1.0a137.dist-info}/WHEEL +0 -0
  83. {payi-0.1.0a110.dist-info → payi-0.1.0a137.dist-info}/licenses/LICENSE +0 -0
payi/resources/ingest.py CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Dict, List, Union, Iterable, Optional
5
+ from typing import Dict, Union, Iterable, Optional
6
6
  from datetime import datetime
7
7
 
8
8
  import httpx
@@ -10,7 +10,7 @@ import httpx
10
10
  from payi._utils._utils import is_given
11
11
 
12
12
  from ..types import ingest_units_params
13
- from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
13
+ from .._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
14
14
  from .._utils import maybe_transform, strip_not_given, async_maybe_transform
15
15
  from .._compat import cached_property
16
16
  from .._resource import SyncAPIResource, AsyncAPIResource
@@ -53,13 +53,13 @@ class IngestResource(SyncAPIResource):
53
53
  def bulk(
54
54
  self,
55
55
  *,
56
- events: Iterable[IngestEventParam] | NotGiven = NOT_GIVEN,
56
+ events: Iterable[IngestEventParam] | Omit = omit,
57
57
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
58
58
  # The extra values given here take precedence over values defined on the client or passed to this method.
59
59
  extra_headers: Headers | None = None,
60
60
  extra_query: Query | None = None,
61
61
  extra_body: Body | None = None,
62
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
62
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
63
63
  ) -> BulkIngestResponse:
64
64
  """
65
65
  Bulk Ingest
@@ -87,38 +87,39 @@ class IngestResource(SyncAPIResource):
87
87
  *,
88
88
  category: str,
89
89
  units: Dict[str, IngestUnits],
90
- end_to_end_latency_ms: Optional[int] | NotGiven = NOT_GIVEN,
91
- event_timestamp: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
92
- http_status_code: Optional[int] | NotGiven = NOT_GIVEN,
93
- properties: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
94
- provider_request_headers: Optional[Iterable[PayICommonModelsAPIRouterHeaderInfoParam]] | NotGiven = NOT_GIVEN,
95
- provider_request_json: Optional[str] | NotGiven = NOT_GIVEN,
96
- provider_request_reasoning_json: Optional[str] | NotGiven = NOT_GIVEN,
90
+ end_to_end_latency_ms: Optional[int] | Omit = omit,
91
+ event_timestamp: Union[str, datetime, None] | Omit = omit,
92
+ http_status_code: Optional[int] | Omit = omit,
93
+ properties: Optional[Dict[str, Optional[str]]] | Omit = omit,
94
+ provider_request_headers: Optional[Iterable[PayICommonModelsAPIRouterHeaderInfoParam]] | Omit = omit,
95
+ provider_request_json: Optional[str] | Omit = omit,
96
+ provider_request_reasoning_json: Optional[str] | Omit = omit,
97
97
  provider_response_function_calls: Optional[Iterable[ingest_units_params.ProviderResponseFunctionCall]]
98
- | NotGiven = NOT_GIVEN,
99
- provider_response_headers: Optional[Iterable[PayICommonModelsAPIRouterHeaderInfoParam]] | NotGiven = NOT_GIVEN,
100
- provider_response_id: Optional[str] | NotGiven = NOT_GIVEN,
101
- provider_response_json: Union[str, List[str], None] | NotGiven = NOT_GIVEN,
102
- provider_uri: Optional[str] | NotGiven = NOT_GIVEN,
103
- resource: Optional[str] | NotGiven = NOT_GIVEN,
104
- time_to_first_completion_token_ms: Optional[int] | NotGiven = NOT_GIVEN,
105
- time_to_first_token_ms: Optional[int] | NotGiven = NOT_GIVEN,
106
- use_case_properties: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
107
- limit_ids: Optional[list[str]] | NotGiven = NOT_GIVEN,
108
- request_tags: Optional[list[str]] | NotGiven = NOT_GIVEN,
109
- use_case_id: Optional[str] | NotGiven = NOT_GIVEN,
110
- use_case_name: Optional[str] | NotGiven = NOT_GIVEN,
111
- use_case_step: Optional[str] | NotGiven = NOT_GIVEN,
112
- use_case_version: Optional[int] | NotGiven = NOT_GIVEN,
113
- user_id: Optional[str] | NotGiven = NOT_GIVEN,
114
- resource_scope: Optional[str] | NotGiven = NOT_GIVEN,
115
- account_name: Optional[str] | NotGiven = NOT_GIVEN,
98
+ | Omit = omit,
99
+ provider_response_headers: Optional[Iterable[PayICommonModelsAPIRouterHeaderInfoParam]] | Omit = omit,
100
+ provider_response_id: Optional[str] | Omit = omit,
101
+ provider_response_json: Union[str, SequenceNotStr[str], None] | Omit = omit,
102
+ provider_uri: Optional[str] | Omit = omit,
103
+ resource: Optional[str] | Omit = omit,
104
+ time_to_first_completion_token_ms: Optional[int] | Omit = omit,
105
+ time_to_first_token_ms: Optional[int] | Omit = omit,
106
+ use_case_properties: Optional[Dict[str, Optional[str]]] | Omit = omit,
107
+ limit_ids: Optional[list[str]] | Omit = omit,
108
+ disable_logging: Optional[bool] | Omit = omit,
109
+ request_tags: Optional[list[str]] | Omit = omit,
110
+ use_case_id: Optional[str] | Omit = omit,
111
+ use_case_name: Optional[str] | Omit = omit,
112
+ use_case_step: Optional[str] | Omit = omit,
113
+ use_case_version: Optional[int] | Omit = omit,
114
+ user_id: Optional[str] | Omit = omit,
115
+ resource_scope: Optional[str] | Omit = omit,
116
+ account_name: Optional[str] | Omit = omit,
116
117
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
117
118
  # The extra values given here take precedence over values defined on the client or passed to this method.
118
119
  extra_headers: Headers | None = None,
119
120
  extra_query: Query | None = None,
120
121
  extra_body: Body | None = None,
121
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
122
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
122
123
  ) -> IngestResponse:
123
124
  """
124
125
  Ingest an Event
@@ -134,9 +135,11 @@ class IngestResource(SyncAPIResource):
134
135
 
135
136
  event_timestamp: (str, datetime, None): The timestamp of the event
136
137
 
138
+ disable_logging (bool, optional): Disable logging for the request
139
+
137
140
  limit_ids (list[str], optional): The limit IDs to associate with the request
138
141
 
139
- properties (Dict[str, str], optional): Properties to associate with the request
142
+ properties (Dict[str, Optional[str]], optional): Properties to associate with the request
140
143
 
141
144
  request_tags (list[str], optional): The request tags to associate with the request
142
145
 
@@ -148,7 +151,7 @@ class IngestResource(SyncAPIResource):
148
151
 
149
152
  use_case_version (int, optional): The use case instance version
150
153
 
151
- use_case_properties (Dict[str, str], optional): The use case properties
154
+ use_case_properties (Dict[str, Optional[str]], optional): The use case properties
152
155
 
153
156
  user_id (str, optional): The user id
154
157
 
@@ -164,65 +167,59 @@ class IngestResource(SyncAPIResource):
164
167
 
165
168
  timeout (Union[float, None], optional): The timeout for the request in seconds. Defaults to None.
166
169
  """
167
- valid_ids_str: str | NotGiven = NOT_GIVEN
168
- _valid_tags_str: str | NotGiven = NOT_GIVEN
169
- use_case_version_str: str | NotGiven = NOT_GIVEN
170
+ request_tags = request_tags
171
+ valid_ids_str: str | Omit = omit
172
+ use_case_version_str: str | Omit = omit
170
173
 
171
- if limit_ids is None or isinstance(limit_ids, NotGiven):
172
- valid_ids_str = NOT_GIVEN
174
+ if limit_ids is None or not is_given(limit_ids):
175
+ valid_ids_str = omit
173
176
  elif not isinstance(limit_ids, list): # type: ignore
174
177
  raise TypeError("limit_ids must be a list")
175
178
  else:
176
- # Proceed with the list comprehension if limit_ids is not NotGiven
179
+ # Proceed with the list comprehension if limit_ids is given
177
180
  valid_ids = [id.strip() for id in limit_ids if id.strip()]
178
- valid_ids_str = ",".join(valid_ids) if valid_ids else NOT_GIVEN
181
+ valid_ids_str = ",".join(valid_ids) if valid_ids else omit
179
182
 
180
- if request_tags is None or isinstance(request_tags, NotGiven):
181
- _valid_tags_str = NOT_GIVEN
182
- elif not isinstance(request_tags, list): # type: ignore
183
- raise TypeError("request_tags must be a list")
184
- else:
185
- # Proceed with the list comprehension if request_tags is not NotGiven
186
- valid_tags = [tag.strip() for tag in request_tags if tag.strip()]
187
- _valid_tags_str = ",".join(valid_tags) if valid_tags else NOT_GIVEN
188
-
189
- if use_case_name is None or isinstance(use_case_name, NotGiven):
190
- use_case_name = NOT_GIVEN
191
-
192
- if use_case_step is None or isinstance(use_case_step, NotGiven):
193
- use_case_step = NOT_GIVEN
194
-
195
- if use_case_id is None or isinstance(use_case_id, NotGiven):
196
- use_case_id = NOT_GIVEN
197
-
198
- if use_case_version is None or isinstance(use_case_version, NotGiven):
199
- use_case_version_str = NOT_GIVEN
183
+ if use_case_name is None or not is_given(use_case_name):
184
+ use_case_name = omit
185
+
186
+ if use_case_step is None or not is_given(use_case_step):
187
+ use_case_step = omit
188
+
189
+ if use_case_id is None or not is_given(use_case_id):
190
+ use_case_id = omit
191
+
192
+ if use_case_version is None or not is_given(use_case_version):
193
+ use_case_version_str = omit
200
194
  else:
201
195
  use_case_version_str = str(use_case_version)
202
196
 
203
- if user_id is None or isinstance(user_id, NotGiven):
204
- user_id = NOT_GIVEN
197
+ if user_id is None or not is_given(user_id):
198
+ user_id = omit
205
199
 
206
- if resource_scope is None or isinstance(resource_scope, NotGiven):
207
- resource_scope = NOT_GIVEN
200
+ if resource_scope is None or not is_given(resource_scope):
201
+ resource_scope = omit
208
202
 
209
- if account_name is None or isinstance(account_name, NotGiven):
210
- account_name = NOT_GIVEN
203
+ if account_name is None or not is_given(account_name):
204
+ account_name = omit
211
205
 
212
206
  extra_headers = {
213
207
  **strip_not_given(
214
208
  {
215
209
  "xProxy-Limit-IDs": valid_ids_str,
216
- "xProxy-Request-Tags": NOT_GIVEN, # _valid_tags_str
210
+ "xProxy-Request-Tags": omit,
217
211
  "xProxy-UseCase-ID": use_case_id,
218
212
  "xProxy-UseCase-Name": use_case_name,
219
213
  "xProxy-UseCase-Step": use_case_step,
220
214
  "xProxy-UseCase-Version": use_case_version_str
221
215
  if is_given(use_case_version)
222
- else NOT_GIVEN,
216
+ else not_given,
223
217
  "xProxy-User-ID": user_id,
224
218
  "xProxy-Resource-Scope": resource_scope,
225
219
  "xProxy-Account-Name": account_name,
220
+ "xProxy-Logging-Disable": str(disable_logging)
221
+ if is_given(disable_logging)
222
+ else not_given,
226
223
  }
227
224
  ),
228
225
  **(extra_headers or {}),
@@ -283,13 +280,13 @@ class AsyncIngestResource(AsyncAPIResource):
283
280
  async def bulk(
284
281
  self,
285
282
  *,
286
- events: Iterable[IngestEventParam] | NotGiven = NOT_GIVEN,
283
+ events: Iterable[IngestEventParam] | Omit = omit,
287
284
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
288
285
  # The extra values given here take precedence over values defined on the client or passed to this method.
289
286
  extra_headers: Headers | None = None,
290
287
  extra_query: Query | None = None,
291
288
  extra_body: Body | None = None,
292
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
289
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
293
290
  ) -> BulkIngestResponse:
294
291
  """
295
292
  Bulk Ingest
@@ -317,37 +314,38 @@ class AsyncIngestResource(AsyncAPIResource):
317
314
  *,
318
315
  category: str,
319
316
  units: Dict[str, IngestUnits],
320
- end_to_end_latency_ms: Optional[int] | NotGiven = NOT_GIVEN,
321
- event_timestamp: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
322
- http_status_code: Optional[int] | NotGiven = NOT_GIVEN,
323
- properties: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
324
- provider_request_headers: Optional[Iterable[PayICommonModelsAPIRouterHeaderInfoParam]] | NotGiven = NOT_GIVEN,
325
- provider_request_json: Optional[str] | NotGiven = NOT_GIVEN,
326
- provider_request_reasoning_json: Optional[str] | NotGiven = NOT_GIVEN,
317
+ end_to_end_latency_ms: Optional[int] | Omit = omit,
318
+ event_timestamp: Union[str, datetime, None] | Omit = omit,
319
+ http_status_code: Optional[int] | Omit = omit,
320
+ properties: Optional[Dict[str, Optional[str]]] | Omit = omit,
321
+ provider_request_headers: Optional[Iterable[PayICommonModelsAPIRouterHeaderInfoParam]] | Omit = omit,
322
+ provider_request_json: Optional[str] | Omit = omit,
323
+ provider_request_reasoning_json: Optional[str] | Omit = omit,
327
324
  provider_response_function_calls: Optional[Iterable[ingest_units_params.ProviderResponseFunctionCall]]
328
- | NotGiven = NOT_GIVEN,
329
- provider_response_headers: Optional[Iterable[PayICommonModelsAPIRouterHeaderInfoParam]] | NotGiven = NOT_GIVEN,
330
- provider_response_id: Optional[str] | NotGiven = NOT_GIVEN,
331
- provider_response_json: Union[str, List[str], None] | NotGiven = NOT_GIVEN,
332
- provider_uri: Optional[str] | NotGiven = NOT_GIVEN,
333
- resource: Optional[str] | NotGiven = NOT_GIVEN,
334
- time_to_first_completion_token_ms: Optional[int] | NotGiven = NOT_GIVEN,
335
- time_to_first_token_ms: Optional[int] | NotGiven = NOT_GIVEN,
336
- use_case_properties: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
337
- limit_ids: Optional[list[str]] | NotGiven = NOT_GIVEN,
338
- request_tags: Optional[list[str]] | NotGiven = NOT_GIVEN,
339
- use_case_id: Optional[str] | NotGiven = NOT_GIVEN,
340
- use_case_name: Optional[str] | NotGiven = NOT_GIVEN,
341
- use_case_step: Optional[str] | NotGiven = NOT_GIVEN,
342
- use_case_version: Optional[int] | NotGiven = NOT_GIVEN,
343
- user_id: Optional[str] | NotGiven = NOT_GIVEN,
344
- resource_scope: Union[str, None] | NotGiven = NOT_GIVEN,
345
- account_name: Optional[str] | NotGiven = NOT_GIVEN,
325
+ | Omit = omit,
326
+ provider_response_headers: Optional[Iterable[PayICommonModelsAPIRouterHeaderInfoParam]] | Omit = omit,
327
+ provider_response_id: Optional[str] | Omit = omit,
328
+ provider_response_json: Union[str, SequenceNotStr[str], None] | Omit = omit,
329
+ provider_uri: Optional[str] | Omit = omit,
330
+ resource: Optional[str] | Omit = omit,
331
+ time_to_first_completion_token_ms: Optional[int] | Omit = omit,
332
+ time_to_first_token_ms: Optional[int] | Omit = omit,
333
+ use_case_properties: Optional[Dict[str, Optional[str]]] | Omit = omit,
334
+ limit_ids: Optional[list[str]] | Omit = omit,
335
+ disable_logging: Optional[bool] | Omit = omit,
336
+ request_tags: Optional[list[str]] | Omit = omit,
337
+ use_case_id: Optional[str] | Omit = omit,
338
+ use_case_name: Optional[str] | Omit = omit,
339
+ use_case_step: Optional[str] | Omit = omit,
340
+ use_case_version: Optional[int] | Omit = omit,
341
+ user_id: Optional[str] | Omit = omit,
342
+ resource_scope: Union[str, None] | Omit = omit,
343
+ account_name: Optional[str] | Omit = omit,
346
344
  # The extra values given here take precedence over values defined on the client or passed to this method.
347
345
  extra_headers: Headers | None = None,
348
346
  extra_query: Query | None = None,
349
347
  extra_body: Body | None = None,
350
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
348
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
351
349
  ) -> IngestResponse:
352
350
  """
353
351
  Ingest an Event
@@ -363,9 +361,11 @@ class AsyncIngestResource(AsyncAPIResource):
363
361
 
364
362
  event_timestamp: (datetime, None): The timestamp of the event
365
363
 
364
+ disable_logging: (bool, optional): Disable logging for the request
365
+
366
366
  limit_ids (list[str], optional): The limit IDs to associate with the request
367
367
 
368
- properties (Dict[str, str], optional): Properties to associate with the request
368
+ properties (Dict[str, Optional[str]], optional): Properties to associate with the request
369
369
 
370
370
  request_tags (list[str], optional): The request tags to associate with the request
371
371
 
@@ -377,7 +377,7 @@ class AsyncIngestResource(AsyncAPIResource):
377
377
 
378
378
  use_case_version (int, optional): The use case instance version
379
379
 
380
- use_case_properties (Dict[str, str], optional): The use case properties
380
+ use_case_properties (Dict[str, Optional[str]], optional): The use case properties
381
381
 
382
382
  user_id (str, optional): The user id
383
383
 
@@ -393,65 +393,59 @@ class AsyncIngestResource(AsyncAPIResource):
393
393
 
394
394
  timeout (Union[float, None], optional): The timeout for the request in seconds. Defaults to None.
395
395
  """
396
- valid_ids_str: str | NotGiven = NOT_GIVEN
397
- _valid_tags_str: str | NotGiven = NOT_GIVEN
398
- use_case_version_str: str | NotGiven = NOT_GIVEN
396
+ request_tags = request_tags
397
+ valid_ids_str: str | Omit = omit
398
+ use_case_version_str: str | Omit = omit
399
399
 
400
- if limit_ids is None or isinstance(limit_ids, NotGiven):
401
- valid_ids_str = NOT_GIVEN
400
+ if limit_ids is None or not is_given(limit_ids):
401
+ valid_ids_str = omit
402
402
  elif not isinstance(limit_ids, list): # type: ignore
403
403
  raise TypeError("limit_ids must be a list")
404
404
  else:
405
- # Proceed with the list comprehension if limit_ids is not NotGiven
405
+ # Proceed with the list comprehension if limit_ids is given
406
406
  valid_ids = [id.strip() for id in limit_ids if id.strip()]
407
- valid_ids_str = ",".join(valid_ids) if valid_ids else NOT_GIVEN
407
+ valid_ids_str = ",".join(valid_ids) if valid_ids else omit
408
408
 
409
- if request_tags is None or isinstance(request_tags, NotGiven):
410
- _valid_tags_str = NOT_GIVEN
411
- elif not isinstance(request_tags, list): # type: ignore
412
- raise TypeError("request_tags must be a list")
413
- else:
414
- # Proceed with the list comprehension if request_tags is not NotGiven
415
- valid_tags = [tag.strip() for tag in request_tags if tag.strip()]
416
- _valid_tags_str = ",".join(valid_tags) if valid_tags else NOT_GIVEN
417
-
418
- if use_case_name is None or isinstance(use_case_name, NotGiven):
419
- use_case_name = NOT_GIVEN
420
-
421
- if use_case_step is None or isinstance(use_case_step, NotGiven):
422
- use_case_step = NOT_GIVEN
423
-
424
- if use_case_id is None or isinstance(use_case_id, NotGiven):
425
- use_case_id = NOT_GIVEN
426
-
427
- if use_case_version is None or isinstance(use_case_version, NotGiven):
428
- use_case_version_str = NOT_GIVEN
409
+ if use_case_name is None or not is_given(use_case_name):
410
+ use_case_name = omit
411
+
412
+ if use_case_step is None or not is_given(use_case_step):
413
+ use_case_step = omit
414
+
415
+ if use_case_id is None or not is_given(use_case_id):
416
+ use_case_id = omit
417
+
418
+ if use_case_version is None or not is_given(use_case_version):
419
+ use_case_version_str = omit
429
420
  else:
430
421
  use_case_version_str = str(use_case_version)
431
422
 
432
- if user_id is None or isinstance(user_id, NotGiven):
433
- user_id = NOT_GIVEN
423
+ if user_id is None or not is_given(user_id):
424
+ user_id = omit
434
425
 
435
- if resource_scope is None or isinstance(resource_scope, NotGiven):
436
- resource_scope = NOT_GIVEN
426
+ if resource_scope is None or not is_given(resource_scope):
427
+ resource_scope = omit
437
428
 
438
- if account_name is None or isinstance(account_name, NotGiven):
439
- account_name = NOT_GIVEN
429
+ if account_name is None or not is_given(account_name):
430
+ account_name = omit
440
431
 
441
432
  extra_headers = {
442
433
  **strip_not_given(
443
434
  {
444
435
  "xProxy-Account-Name": account_name,
445
436
  "xProxy-Limit-IDs": valid_ids_str,
446
- "xProxy-Request-Tags": NOT_GIVEN, # _valid_tags_str,
437
+ "xProxy-Request-Tags": omit,
447
438
  "xProxy-UseCase-ID": use_case_id,
448
439
  "xProxy-UseCase-Name": use_case_name,
449
440
  "xProxy-UseCase-Step": use_case_step,
450
441
  "xProxy-UseCase-Version": use_case_version_str
451
442
  if is_given(use_case_version)
452
- else NOT_GIVEN,
443
+ else not_given,
453
444
  "xProxy-User-ID": user_id,
454
445
  "xProxy-Resource-Scope": resource_scope,
446
+ "xProxy-Logging-Disable": str(disable_logging)
447
+ if is_given(disable_logging)
448
+ else not_given,
455
449
  }
456
450
  ),
457
451
  **(extra_headers or {}),
@@ -1,13 +1,5 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- from .tags import (
4
- TagsResource,
5
- AsyncTagsResource,
6
- TagsResourceWithRawResponse,
7
- AsyncTagsResourceWithRawResponse,
8
- TagsResourceWithStreamingResponse,
9
- AsyncTagsResourceWithStreamingResponse,
10
- )
11
3
  from .limits import (
12
4
  LimitsResource,
13
5
  AsyncLimitsResource,
@@ -16,14 +8,22 @@ from .limits import (
16
8
  LimitsResourceWithStreamingResponse,
17
9
  AsyncLimitsResourceWithStreamingResponse,
18
10
  )
11
+ from .properties import (
12
+ PropertiesResource,
13
+ AsyncPropertiesResource,
14
+ PropertiesResourceWithRawResponse,
15
+ AsyncPropertiesResourceWithRawResponse,
16
+ PropertiesResourceWithStreamingResponse,
17
+ AsyncPropertiesResourceWithStreamingResponse,
18
+ )
19
19
 
20
20
  __all__ = [
21
- "TagsResource",
22
- "AsyncTagsResource",
23
- "TagsResourceWithRawResponse",
24
- "AsyncTagsResourceWithRawResponse",
25
- "TagsResourceWithStreamingResponse",
26
- "AsyncTagsResourceWithStreamingResponse",
21
+ "PropertiesResource",
22
+ "AsyncPropertiesResource",
23
+ "PropertiesResourceWithRawResponse",
24
+ "AsyncPropertiesResourceWithRawResponse",
25
+ "PropertiesResourceWithStreamingResponse",
26
+ "AsyncPropertiesResourceWithStreamingResponse",
27
27
  "LimitsResource",
28
28
  "AsyncLimitsResource",
29
29
  "LimitsResourceWithRawResponse",