|
1 | 1 | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. |
2 | | -# isort: skip_file |
3 | 2 |
|
4 | 3 | from __future__ import annotations |
5 | 4 |
|
|
15 | 14 | blueprint_create_from_inspection_params, |
16 | 15 | ) |
17 | 16 | from .._types import NOT_GIVEN, Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given |
18 | | -from .._utils import maybe_transform, async_maybe_transform |
19 | | -from .._utils._validation import ValidationNotification |
| 17 | +from .._utils import is_given, maybe_transform, async_maybe_transform |
20 | 18 | from .._compat import cached_property |
21 | 19 | from .._resource import SyncAPIResource, AsyncAPIResource |
22 | 20 | from .._response import ( |
|
31 | 29 | from ..lib.polling import PollingConfig, poll_until |
32 | 30 | from .._base_client import AsyncPaginator, make_request_options |
33 | 31 | from ..lib.polling_async import async_poll_until |
| 32 | +from .._utils._validation import ValidationNotification |
34 | 33 | from ..types.blueprint_view import BlueprintView |
35 | 34 | from ..types.blueprint_preview_view import BlueprintPreviewView |
36 | 35 | from ..types.inspection_source_param import InspectionSourceParam |
@@ -79,7 +78,7 @@ def _validate_file_mounts(file_mounts: Optional[Dict[str, str]] | Omit) -> Valid |
79 | 78 |
|
80 | 79 | note = ValidationNotification() |
81 | 80 |
|
82 | | - if file_mounts is omit or file_mounts is None: |
| 81 | + if file_mounts is None or not is_given(file_mounts): |
83 | 82 | return note |
84 | 83 |
|
85 | 84 | total_size_bytes = 0 |
@@ -327,11 +326,13 @@ def create_and_await_build_complete( |
327 | 326 | base_blueprint_id: Optional[str] | Omit = omit, |
328 | 327 | base_blueprint_name: Optional[str] | Omit = omit, |
329 | 328 | build_args: Optional[Dict[str, str]] | Omit = omit, |
| 329 | + build_context: Optional[blueprint_create_params.BuildContext] | Omit = omit, |
330 | 330 | code_mounts: Optional[Iterable[CodeMountParameters]] | Omit = omit, |
331 | 331 | dockerfile: Optional[str] | Omit = omit, |
332 | 332 | file_mounts: Optional[Dict[str, str]] | Omit = omit, |
333 | 333 | launch_parameters: Optional[LaunchParameters] | Omit = omit, |
334 | 334 | metadata: Optional[Dict[str, str]] | Omit = omit, |
| 335 | + named_build_contexts: Optional[Dict[str, blueprint_create_params.NamedBuildContexts]] | Omit = omit, |
335 | 336 | secrets: Optional[Dict[str, str]] | Omit = omit, |
336 | 337 | services: Optional[Iterable[blueprint_create_params.Service]] | Omit = omit, |
337 | 338 | system_setup_commands: Optional[SequenceNotStr[str]] | Omit = omit, |
@@ -365,11 +366,13 @@ def create_and_await_build_complete( |
365 | 366 | base_blueprint_id=base_blueprint_id, |
366 | 367 | base_blueprint_name=base_blueprint_name, |
367 | 368 | build_args=build_args, |
| 369 | + build_context=build_context, |
368 | 370 | code_mounts=code_mounts, |
369 | 371 | dockerfile=dockerfile, |
370 | 372 | file_mounts=file_mounts, |
371 | 373 | launch_parameters=launch_parameters, |
372 | 374 | metadata=metadata, |
| 375 | + named_build_contexts=named_build_contexts, |
373 | 376 | secrets=secrets, |
374 | 377 | services=services, |
375 | 378 | system_setup_commands=system_setup_commands, |
|
0 commit comments