4b7985384c
* Add test case * Fix tests * Add test dependencies correctly * Feed through error handling * Include test output * Get types to line up * Add remaining test files * Update changelog * Correctly find type paths * Handle transitive objects * Handle required fields * Add feature flag for go * Add required+default test case * Don't `<any>` cast known types. * Add more flags. I realize this should really wait for PR#8400 to merge. * Add plain object to env-helper test This test fails right now. My next problem is fixing it. * Handle plain types * Handle function inputs * Fix the indentation * Handle output types correctly * Remove unnecessary `!` * Add test case * Fix tests * Add test dependencies correctly * Feed through error handling * Include test output * Get types to line up * Add remaining test files * Update changelog * Correctly find type paths * Handle transitive objects * Handle required fields * Add required+default test case * Don't `<any>` cast known types. * Add plain object to env-helper test This test fails right now. My next problem is fixing it. * Handle plain types * Handle function inputs * Fix the indentation * Handle output types correctly * Remove unnecessary `!` * Start on `genPlainObjectDefaultFunc` * Add missing change to fix test * Run tests with merge * Refactor out assign * Merge in next _index.md diff * Change method name to `Defaults` * Handle enums correctly * Another attempt at _index.md * Make module generation deterministic * Add checks for old values * Insert defaults in resources * Fix docs generation Credit to @praneetloke * Progress on adding defaults to Resource arguments * Handle resource argument defaults * Don't create defaults if disableObjectDefaults * Rename test folder * Add test for disable flag * Fix disable test * Update docs * Abstract out nil comparisons * Use reflection to test for empty values * Simplify Ptr and pulumi.Any type handling * Remove unused function * Apply defaults to functions * Update new test with master codegen * Tests + nil check
76 lines
2.5 KiB
Python
76 lines
2.5 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 warnings
|
|
import pulumi
|
|
import pulumi.runtime
|
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
from . import _utilities
|
|
from ._inputs import *
|
|
|
|
__all__ = [
|
|
'FuncWithAllOptionalInputsResult',
|
|
'AwaitableFuncWithAllOptionalInputsResult',
|
|
'func_with_all_optional_inputs',
|
|
'func_with_all_optional_inputs_output',
|
|
]
|
|
|
|
@pulumi.output_type
|
|
class FuncWithAllOptionalInputsResult:
|
|
def __init__(__self__, r=None):
|
|
if r and not isinstance(r, str):
|
|
raise TypeError("Expected argument 'r' to be a str")
|
|
pulumi.set(__self__, "r", r)
|
|
|
|
@property
|
|
@pulumi.getter
|
|
def r(self) -> str:
|
|
return pulumi.get(self, "r")
|
|
|
|
|
|
class AwaitableFuncWithAllOptionalInputsResult(FuncWithAllOptionalInputsResult):
|
|
# pylint: disable=using-constant-test
|
|
def __await__(self):
|
|
if False:
|
|
yield self
|
|
return FuncWithAllOptionalInputsResult(
|
|
r=self.r)
|
|
|
|
|
|
def func_with_all_optional_inputs(a: Optional[pulumi.InputType['HelmReleaseSettings']] = None,
|
|
b: Optional[str] = None,
|
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableFuncWithAllOptionalInputsResult:
|
|
"""
|
|
Check codegen of functions with all optional inputs.
|
|
|
|
|
|
:param pulumi.InputType['HelmReleaseSettings'] a: Property A
|
|
:param str b: Property B
|
|
"""
|
|
__args__ = dict()
|
|
__args__['a'] = a
|
|
__args__['b'] = b
|
|
if opts is None:
|
|
opts = pulumi.InvokeOptions()
|
|
if opts.version is None:
|
|
opts.version = _utilities.get_version()
|
|
__ret__ = pulumi.runtime.invoke('mypkg::funcWithAllOptionalInputs', __args__, opts=opts, typ=FuncWithAllOptionalInputsResult).value
|
|
|
|
return AwaitableFuncWithAllOptionalInputsResult(
|
|
r=__ret__.r)
|
|
|
|
|
|
@_utilities.lift_output_func(func_with_all_optional_inputs)
|
|
def func_with_all_optional_inputs_output(a: Optional[pulumi.Input[Optional[pulumi.InputType['HelmReleaseSettings']]]] = None,
|
|
b: Optional[pulumi.Input[Optional[str]]] = None,
|
|
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[FuncWithAllOptionalInputsResult]:
|
|
"""
|
|
Check codegen of functions with all optional inputs.
|
|
|
|
|
|
:param pulumi.InputType['HelmReleaseSettings'] a: Property A
|
|
:param str b: Property B
|
|
"""
|
|
...
|