pulumi/tests/testdata/codegen/assets-and-archives/python/pulumi_example/outputs.py

75 lines
2.3 KiB
Python

# coding=utf-8
# *** WARNING: this file was generated by test. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import copy
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
from typing import NotRequired, TypedDict, TypeAlias
else:
from typing_extensions import NotRequired, TypedDict, TypeAlias
from . import _utilities
__all__ = [
'TypeWithAssets',
]
@pulumi.output_type
class TypeWithAssets(dict):
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "plainArchive":
suggest = "plain_archive"
elif key == "plainAsset":
suggest = "plain_asset"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in TypeWithAssets. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
TypeWithAssets.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
TypeWithAssets.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
asset: Union[pulumi.Asset, pulumi.Archive],
plain_archive: pulumi.Archive,
archive: Optional[pulumi.Archive] = None,
plain_asset: Optional[Union[pulumi.Asset, pulumi.Archive]] = None):
pulumi.set(__self__, "asset", asset)
pulumi.set(__self__, "plain_archive", plain_archive)
if archive is not None:
pulumi.set(__self__, "archive", archive)
if plain_asset is not None:
pulumi.set(__self__, "plain_asset", plain_asset)
@property
@pulumi.getter
def asset(self) -> Union[pulumi.Asset, pulumi.Archive]:
return pulumi.get(self, "asset")
@property
@pulumi.getter(name="plainArchive")
def plain_archive(self) -> pulumi.Archive:
return pulumi.get(self, "plain_archive")
@property
@pulumi.getter
def archive(self) -> Optional[pulumi.Archive]:
return pulumi.get(self, "archive")
@property
@pulumi.getter(name="plainAsset")
def plain_asset(self) -> Optional[Union[pulumi.Asset, pulumi.Archive]]:
return pulumi.get(self, "plain_asset")