Compare commits
8 commits
master
...
iwahbe/830
Author | SHA1 | Date | |
---|---|---|---|
bd7a89af9f | |||
3a80b48874 | |||
a9b899df5d | |||
c4784a518a | |||
b30ce26d8c | |||
5ad57d543b | |||
9208ea2aef | |||
420f9546f0 |
|
@ -21,6 +21,9 @@
|
|||
- [codegen/typescript] - Respect default values in Pulumi object types.
|
||||
[#8400](https://github.com/pulumi/pulumi/pull/8400)
|
||||
|
||||
- [codegen] - Forbid nonsensical combinations of schema property flags.
|
||||
[#8373](https://github.com/pulumi/pulumi/pull/8373)
|
||||
|
||||
- [sdk/python] - Correctly handle version checking python virtual environments.
|
||||
[#8465](https://github.com/pulumi/pulumi/pull/8465)
|
||||
|
||||
|
|
|
@ -60,7 +60,8 @@ var sdkTests = []sdkTest{
|
|||
Directory: "external-resource-schema",
|
||||
Description: "External resource schema",
|
||||
SkipCompileCheck: codegen.NewStringSet(nodejs, golang),
|
||||
Skip: codegen.NewStringSet("python/test", "nodejs/test"),
|
||||
Skip: codegen.NewStringSet("python/test", "nodejs/test",
|
||||
/* TODO[pulumi/pulumi#8308] */ "all"),
|
||||
},
|
||||
{
|
||||
Directory: "nested-module",
|
||||
|
@ -77,7 +78,8 @@ var sdkTests = []sdkTest{
|
|||
{
|
||||
Directory: "plain-schema-gh6957",
|
||||
Description: "Repro for #6957",
|
||||
Skip: codegen.NewStringSet("python/test", "nodejs/test"),
|
||||
Skip: codegen.NewStringSet("python/test", "nodejs/test",
|
||||
/* TODO[pulumi/pulumi#8308] */ "all"),
|
||||
},
|
||||
{
|
||||
Directory: "resource-args-python-case-insensitive",
|
||||
|
@ -153,7 +155,8 @@ var sdkTests = []sdkTest{
|
|||
Description: "A resource url with a hyphen in its path",
|
||||
// TODO[pulumi/pulumi#8370]: Re-enable compiling for Go.
|
||||
SkipCompileCheck: codegen.NewStringSet(golang),
|
||||
Skip: codegen.NewStringSet("python/test", "nodejs/test"),
|
||||
Skip: codegen.NewStringSet("python/test", "nodejs/test",
|
||||
/* TODO[pulumi/pulumi#8308] */ "all"),
|
||||
},
|
||||
{
|
||||
Directory: "output-funcs",
|
||||
|
@ -291,6 +294,11 @@ func TestSDKCodegen(t *testing.T, opts *SDKCodegenOptions) { // revive:disable-l
|
|||
}
|
||||
|
||||
t.Log(tt.Description)
|
||||
// Skip all check. This needs to be here because it needs to skip
|
||||
// the codegen.
|
||||
if tt.Skip.Has("all") {
|
||||
t.SkipNow()
|
||||
}
|
||||
|
||||
dirPath := filepath.Join(testDir, filepath.FromSlash(tt.Directory))
|
||||
|
||||
|
|
|
@ -167,14 +167,6 @@ The RubberTree resource accepts the following [input]({{< relref "/docs/intro/co
|
|||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#diameter">Pulumi.<wbr>Plant.<wbr>Tree.<wbr>V1.<wbr>Diameter</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-required"
|
||||
title="Required">
|
||||
<span id="type_csharp">
|
||||
<a href="#type_csharp" style="color: inherit; text-decoration: inherit;">Type</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#rubbertreevariety">Pulumi.<wbr>Plant.<wbr>Tree.<wbr>V1.<wbr>Rubber<wbr>Tree<wbr>Variety</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="container_csharp">
|
||||
|
@ -199,6 +191,14 @@ The RubberTree resource accepts the following [input]({{< relref "/docs/intro/co
|
|||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#treesize">Pulumi.<wbr>Plant.<wbr>Tree.<wbr>V1.<wbr>Tree<wbr>Size</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="type_csharp">
|
||||
<a href="#type_csharp" style="color: inherit; text-decoration: inherit;">Type</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#rubbertreevariety">Pulumi.<wbr>Plant.<wbr>Tree.<wbr>V1.<wbr>Rubber<wbr>Tree<wbr>Variety</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd></dl>
|
||||
{{% /choosable %}}
|
||||
|
||||
|
@ -211,14 +211,6 @@ The RubberTree resource accepts the following [input]({{< relref "/docs/intro/co
|
|||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#diameter">Diameter</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-required"
|
||||
title="Required">
|
||||
<span id="type_go">
|
||||
<a href="#type_go" style="color: inherit; text-decoration: inherit;">Type</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#rubbertreevariety">Rubber<wbr>Tree<wbr>Variety</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="container_go">
|
||||
|
@ -243,6 +235,14 @@ The RubberTree resource accepts the following [input]({{< relref "/docs/intro/co
|
|||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#treesize">Tree<wbr>Size</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="type_go">
|
||||
<a href="#type_go" style="color: inherit; text-decoration: inherit;">Type</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#rubbertreevariety">Rubber<wbr>Tree<wbr>Variety</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd></dl>
|
||||
{{% /choosable %}}
|
||||
|
||||
|
@ -255,14 +255,6 @@ The RubberTree resource accepts the following [input]({{< relref "/docs/intro/co
|
|||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#diameter">Diameter</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-required"
|
||||
title="Required">
|
||||
<span id="type_nodejs">
|
||||
<a href="#type_nodejs" style="color: inherit; text-decoration: inherit;">type</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#rubbertreevariety">Rubber<wbr>Tree<wbr>Variety</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="container_nodejs">
|
||||
|
@ -287,6 +279,14 @@ The RubberTree resource accepts the following [input]({{< relref "/docs/intro/co
|
|||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#treesize">Tree<wbr>Size</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="type_nodejs">
|
||||
<a href="#type_nodejs" style="color: inherit; text-decoration: inherit;">type</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#rubbertreevariety">Rubber<wbr>Tree<wbr>Variety</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd></dl>
|
||||
{{% /choosable %}}
|
||||
|
||||
|
@ -299,14 +299,6 @@ The RubberTree resource accepts the following [input]({{< relref "/docs/intro/co
|
|||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#diameter">Diameter</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-required"
|
||||
title="Required">
|
||||
<span id="type_python">
|
||||
<a href="#type_python" style="color: inherit; text-decoration: inherit;">type</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#rubbertreevariety">Rubber<wbr>Tree<wbr>Variety</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="container_python">
|
||||
|
@ -331,6 +323,14 @@ The RubberTree resource accepts the following [input]({{< relref "/docs/intro/co
|
|||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#treesize">Tree<wbr>Size</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="type_python">
|
||||
<a href="#type_python" style="color: inherit; text-decoration: inherit;">type</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#rubbertreevariety">Rubber<wbr>Tree<wbr>Variety</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd></dl>
|
||||
{{% /choosable %}}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace Pulumi.Plant.Tree.V1
|
|||
public Output<Pulumi.Plant.Tree.V1.TreeSize?> Size { get; private set; } = null!;
|
||||
|
||||
[Output("type")]
|
||||
public Output<Pulumi.Plant.Tree.V1.RubberTreeVariety> Type { get; private set; } = null!;
|
||||
public Output<Pulumi.Plant.Tree.V1.RubberTreeVariety?> Type { get; private set; } = null!;
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
@ -85,12 +85,11 @@ namespace Pulumi.Plant.Tree.V1
|
|||
[Input("size")]
|
||||
public Input<Pulumi.Plant.Tree.V1.TreeSize>? Size { get; set; }
|
||||
|
||||
[Input("type", required: true)]
|
||||
public Input<Pulumi.Plant.Tree.V1.RubberTreeVariety> Type { get; set; } = null!;
|
||||
[Input("type")]
|
||||
public Input<Pulumi.Plant.Tree.V1.RubberTreeVariety>? Type { get; set; }
|
||||
|
||||
public RubberTreeArgs()
|
||||
{
|
||||
Diameter = Pulumi.Plant.Tree.V1.Diameter.Sixinch;
|
||||
Farm = "(unknown)";
|
||||
Size = Pulumi.Plant.Tree.V1.TreeSize.Medium;
|
||||
Type = Pulumi.Plant.Tree.V1.RubberTreeVariety.Burgundy;
|
||||
|
|
|
@ -19,7 +19,7 @@ type RubberTree struct {
|
|||
Diameter DiameterOutput `pulumi:"diameter"`
|
||||
Farm pulumi.StringPtrOutput `pulumi:"farm"`
|
||||
Size TreeSizePtrOutput `pulumi:"size"`
|
||||
Type RubberTreeVarietyOutput `pulumi:"type"`
|
||||
Type RubberTreeVarietyPtrOutput `pulumi:"type"`
|
||||
}
|
||||
|
||||
// NewRubberTree registers a new resource with the given unique name, arguments, and options.
|
||||
|
@ -30,7 +30,7 @@ func NewRubberTree(ctx *pulumi.Context,
|
|||
}
|
||||
|
||||
if args.Diameter == nil {
|
||||
args.Diameter = Diameter(6.0)
|
||||
return nil, errors.New("invalid value for required argument 'Diameter'")
|
||||
}
|
||||
if args.Farm == nil {
|
||||
args.Farm = pulumi.StringPtr("(unknown)")
|
||||
|
@ -79,7 +79,7 @@ type rubberTreeArgs struct {
|
|||
Diameter Diameter `pulumi:"diameter"`
|
||||
Farm *string `pulumi:"farm"`
|
||||
Size *TreeSize `pulumi:"size"`
|
||||
Type RubberTreeVariety `pulumi:"type"`
|
||||
Type *RubberTreeVariety `pulumi:"type"`
|
||||
}
|
||||
|
||||
// The set of arguments for constructing a RubberTree resource.
|
||||
|
@ -88,7 +88,7 @@ type RubberTreeArgs struct {
|
|||
Diameter DiameterInput
|
||||
Farm pulumi.StringPtrInput
|
||||
Size TreeSizePtrInput
|
||||
Type RubberTreeVarietyInput
|
||||
Type RubberTreeVarietyPtrInput
|
||||
}
|
||||
|
||||
func (RubberTreeArgs) ElementType() reflect.Type {
|
||||
|
|
|
@ -37,7 +37,7 @@ export class RubberTree extends pulumi.CustomResource {
|
|||
public readonly diameter!: pulumi.Output<enums.tree.v1.Diameter>;
|
||||
public readonly farm!: pulumi.Output<enums.tree.v1.Farm | string | undefined>;
|
||||
public readonly size!: pulumi.Output<enums.tree.v1.TreeSize | undefined>;
|
||||
public readonly type!: pulumi.Output<enums.tree.v1.RubberTreeVariety>;
|
||||
public readonly type!: pulumi.Output<enums.tree.v1.RubberTreeVariety | undefined>;
|
||||
|
||||
/**
|
||||
* Create a RubberTree resource with the given unique name, arguments, and options.
|
||||
|
@ -58,11 +58,8 @@ export class RubberTree extends pulumi.CustomResource {
|
|||
if ((!args || args.diameter === undefined) && !opts.urn) {
|
||||
throw new Error("Missing required property 'diameter'");
|
||||
}
|
||||
if ((!args || args.type === undefined) && !opts.urn) {
|
||||
throw new Error("Missing required property 'type'");
|
||||
}
|
||||
resourceInputs["container"] = args ? (args.container ? pulumi.output(args.container).apply(inputs.containerArgsProvideDefaults) : undefined) : undefined;
|
||||
resourceInputs["diameter"] = (args ? args.diameter : undefined) ?? 6;
|
||||
resourceInputs["diameter"] = args ? args.diameter : undefined;
|
||||
resourceInputs["farm"] = (args ? args.farm : undefined) ?? "(unknown)";
|
||||
resourceInputs["size"] = (args ? args.size : undefined) ?? "medium";
|
||||
resourceInputs["type"] = (args ? args.type : undefined) ?? "Burgundy";
|
||||
|
@ -86,5 +83,5 @@ export interface RubberTreeArgs {
|
|||
diameter: pulumi.Input<enums.tree.v1.Diameter>;
|
||||
farm?: pulumi.Input<enums.tree.v1.Farm | string>;
|
||||
size?: pulumi.Input<enums.tree.v1.TreeSize>;
|
||||
type: pulumi.Input<enums.tree.v1.RubberTreeVariety>;
|
||||
type?: pulumi.Input<enums.tree.v1.RubberTreeVariety>;
|
||||
}
|
||||
|
|
|
@ -18,19 +18,14 @@ __all__ = ['RubberTreeArgs', 'RubberTree']
|
|||
class RubberTreeArgs:
|
||||
def __init__(__self__, *,
|
||||
diameter: pulumi.Input['Diameter'],
|
||||
type: pulumi.Input['RubberTreeVariety'],
|
||||
container: Optional[pulumi.Input['_root_inputs.ContainerArgs']] = None,
|
||||
farm: Optional[pulumi.Input[Union['Farm', str]]] = None,
|
||||
size: Optional[pulumi.Input['TreeSize']] = None):
|
||||
size: Optional[pulumi.Input['TreeSize']] = None,
|
||||
type: Optional[pulumi.Input['RubberTreeVariety']] = None):
|
||||
"""
|
||||
The set of arguments for constructing a RubberTree resource.
|
||||
"""
|
||||
if diameter is None:
|
||||
diameter = 6
|
||||
pulumi.set(__self__, "diameter", diameter)
|
||||
if type is None:
|
||||
type = 'Burgundy'
|
||||
pulumi.set(__self__, "type", type)
|
||||
if container is not None:
|
||||
pulumi.set(__self__, "container", container)
|
||||
if farm is None:
|
||||
|
@ -41,6 +36,10 @@ class RubberTreeArgs:
|
|||
size = 'medium'
|
||||
if size is not None:
|
||||
pulumi.set(__self__, "size", size)
|
||||
if type is None:
|
||||
type = 'Burgundy'
|
||||
if type is not None:
|
||||
pulumi.set(__self__, "type", type)
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
|
@ -51,15 +50,6 @@ class RubberTreeArgs:
|
|||
def diameter(self, value: pulumi.Input['Diameter']):
|
||||
pulumi.set(self, "diameter", value)
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def type(self) -> pulumi.Input['RubberTreeVariety']:
|
||||
return pulumi.get(self, "type")
|
||||
|
||||
@type.setter
|
||||
def type(self, value: pulumi.Input['RubberTreeVariety']):
|
||||
pulumi.set(self, "type", value)
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def container(self) -> Optional[pulumi.Input['_root_inputs.ContainerArgs']]:
|
||||
|
@ -87,6 +77,15 @@ class RubberTreeArgs:
|
|||
def size(self, value: Optional[pulumi.Input['TreeSize']]):
|
||||
pulumi.set(self, "size", value)
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def type(self) -> Optional[pulumi.Input['RubberTreeVariety']]:
|
||||
return pulumi.get(self, "type")
|
||||
|
||||
@type.setter
|
||||
def type(self, value: Optional[pulumi.Input['RubberTreeVariety']]):
|
||||
pulumi.set(self, "type", value)
|
||||
|
||||
|
||||
@pulumi.input_type
|
||||
class _RubberTreeState:
|
||||
|
@ -167,8 +166,6 @@ class RubberTree(pulumi.CustomResource):
|
|||
__props__ = RubberTreeArgs.__new__(RubberTreeArgs)
|
||||
|
||||
__props__.__dict__["container"] = container
|
||||
if diameter is None:
|
||||
diameter = 6
|
||||
if diameter is None and not opts.urn:
|
||||
raise TypeError("Missing required property 'diameter'")
|
||||
__props__.__dict__["diameter"] = diameter
|
||||
|
@ -180,8 +177,6 @@ class RubberTree(pulumi.CustomResource):
|
|||
__props__.__dict__["size"] = size
|
||||
if type is None:
|
||||
type = 'Burgundy'
|
||||
if type is None and not opts.urn:
|
||||
raise TypeError("Missing required property 'type'")
|
||||
__props__.__dict__["type"] = type
|
||||
super(RubberTree, __self__).__init__(
|
||||
'plant:tree/v1:RubberTree',
|
||||
|
@ -235,6 +230,6 @@ class RubberTree(pulumi.CustomResource):
|
|||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def type(self) -> pulumi.Output['RubberTreeVariety']:
|
||||
def type(self) -> pulumi.Output[Optional['RubberTreeVariety']]:
|
||||
return pulumi.get(self, "type")
|
||||
|
||||
|
|
|
@ -42,8 +42,7 @@
|
|||
"default": "medium"
|
||||
},
|
||||
"diameter": {
|
||||
"$ref": "#/types/plant:tree/v1:Diameter",
|
||||
"default": 6
|
||||
"$ref": "#/types/plant:tree/v1:Diameter"
|
||||
}
|
||||
},
|
||||
"stateInputs": {
|
||||
|
@ -75,12 +74,11 @@
|
|||
"default": "medium"
|
||||
},
|
||||
"diameter": {
|
||||
"$ref": "#/types/plant:tree/v1:Diameter",
|
||||
"default": 6
|
||||
"$ref": "#/types/plant:tree/v1:Diameter"
|
||||
}
|
||||
},
|
||||
"required": ["type", "diameter"],
|
||||
"requiredInputs": ["type", "diameter"]
|
||||
"required": ["diameter"],
|
||||
"requiredInputs": ["diameter"]
|
||||
}
|
||||
},
|
||||
"types": {
|
||||
|
|
|
@ -639,15 +639,7 @@ All [input](#inputs) properties are implicitly available as output properties. A
|
|||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#helmreleasesettings">Helm<wbr>Release<wbr>Settings</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-required"
|
||||
title="Required">
|
||||
<span id="thinker_csharp">
|
||||
<a href="#thinker_csharp" style="color: inherit; text-decoration: inherit;">Thinker</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type">string</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}To ask and answer{{% /md %}}</dd><dt class="property-optional"
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="answer_csharp">
|
||||
<a href="#answer_csharp" style="color: inherit; text-decoration: inherit;">Answer</a>
|
||||
|
@ -679,7 +671,15 @@ All [input](#inputs) properties are implicitly available as output properties. A
|
|||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#layeredtype">Layered<wbr>Type</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd></dl>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="thinker_csharp">
|
||||
<a href="#thinker_csharp" style="color: inherit; text-decoration: inherit;">Thinker</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type">string</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}To ask and answer{{% /md %}}</dd></dl>
|
||||
{{% /choosable %}}
|
||||
|
||||
{{% choosable language go %}}
|
||||
|
@ -691,15 +691,7 @@ All [input](#inputs) properties are implicitly available as output properties. A
|
|||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#helmreleasesettings">Helm<wbr>Release<wbr>Settings</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-required"
|
||||
title="Required">
|
||||
<span id="thinker_go">
|
||||
<a href="#thinker_go" style="color: inherit; text-decoration: inherit;">Thinker</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type">string</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}To ask and answer{{% /md %}}</dd><dt class="property-optional"
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="answer_go">
|
||||
<a href="#answer_go" style="color: inherit; text-decoration: inherit;">Answer</a>
|
||||
|
@ -731,7 +723,15 @@ All [input](#inputs) properties are implicitly available as output properties. A
|
|||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#layeredtype">Layered<wbr>Type</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd></dl>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="thinker_go">
|
||||
<a href="#thinker_go" style="color: inherit; text-decoration: inherit;">Thinker</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type">string</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}To ask and answer{{% /md %}}</dd></dl>
|
||||
{{% /choosable %}}
|
||||
|
||||
{{% choosable language nodejs %}}
|
||||
|
@ -743,15 +743,7 @@ All [input](#inputs) properties are implicitly available as output properties. A
|
|||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#helmreleasesettings">Helm<wbr>Release<wbr>Settings</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-required"
|
||||
title="Required">
|
||||
<span id="thinker_nodejs">
|
||||
<a href="#thinker_nodejs" style="color: inherit; text-decoration: inherit;">thinker</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type">string</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}To ask and answer{{% /md %}}</dd><dt class="property-optional"
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="answer_nodejs">
|
||||
<a href="#answer_nodejs" style="color: inherit; text-decoration: inherit;">answer</a>
|
||||
|
@ -783,7 +775,15 @@ All [input](#inputs) properties are implicitly available as output properties. A
|
|||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#layeredtype">Layered<wbr>Type</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd></dl>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="thinker_nodejs">
|
||||
<a href="#thinker_nodejs" style="color: inherit; text-decoration: inherit;">thinker</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type">string</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}To ask and answer{{% /md %}}</dd></dl>
|
||||
{{% /choosable %}}
|
||||
|
||||
{{% choosable language python %}}
|
||||
|
@ -795,15 +795,7 @@ All [input](#inputs) properties are implicitly available as output properties. A
|
|||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#helmreleasesettings">Helm<wbr>Release<wbr>Settings</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-required"
|
||||
title="Required">
|
||||
<span id="thinker_python">
|
||||
<a href="#thinker_python" style="color: inherit; text-decoration: inherit;">thinker</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type">str</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}To ask and answer{{% /md %}}</dd><dt class="property-optional"
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="answer_python">
|
||||
<a href="#answer_python" style="color: inherit; text-decoration: inherit;">answer</a>
|
||||
|
@ -835,7 +827,15 @@ All [input](#inputs) properties are implicitly available as output properties. A
|
|||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#layeredtype">Layered<wbr>Type</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd></dl>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="thinker_python">
|
||||
<a href="#thinker_python" style="color: inherit; text-decoration: inherit;">thinker</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type">str</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}To ask and answer{{% /md %}}</dd></dl>
|
||||
{{% /choosable %}}
|
||||
|
||||
|
||||
|
|
|
@ -42,8 +42,8 @@ namespace Pulumi.Example.Inputs
|
|||
/// <summary>
|
||||
/// To ask and answer
|
||||
/// </summary>
|
||||
[Input("thinker", required: true)]
|
||||
public Input<string> Thinker { get; set; } = null!;
|
||||
[Input("thinker")]
|
||||
public Input<string>? Thinker { get; set; }
|
||||
|
||||
public LayeredTypeArgs()
|
||||
{
|
||||
|
|
|
@ -375,7 +375,7 @@ type LayeredType struct {
|
|||
Question *string `pulumi:"question"`
|
||||
Recursive *LayeredType `pulumi:"recursive"`
|
||||
// To ask and answer
|
||||
Thinker string `pulumi:"thinker"`
|
||||
Thinker *string `pulumi:"thinker"`
|
||||
}
|
||||
|
||||
// LayeredTypeInput is an input type that accepts LayeredTypeArgs and LayeredTypeOutput values.
|
||||
|
@ -400,7 +400,7 @@ type LayeredTypeArgs struct {
|
|||
Question pulumi.StringPtrInput `pulumi:"question"`
|
||||
Recursive LayeredTypePtrInput `pulumi:"recursive"`
|
||||
// To ask and answer
|
||||
Thinker pulumi.StringInput `pulumi:"thinker"`
|
||||
Thinker pulumi.StringPtrInput `pulumi:"thinker"`
|
||||
}
|
||||
|
||||
func (LayeredTypeArgs) ElementType() reflect.Type {
|
||||
|
@ -505,8 +505,8 @@ func (o LayeredTypeOutput) Recursive() LayeredTypePtrOutput {
|
|||
}
|
||||
|
||||
// To ask and answer
|
||||
func (o LayeredTypeOutput) Thinker() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v LayeredType) string { return v.Thinker }).(pulumi.StringOutput)
|
||||
func (o LayeredTypeOutput) Thinker() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v LayeredType) *string { return v.Thinker }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
type LayeredTypePtrOutput struct{ *pulumi.OutputState }
|
||||
|
@ -587,7 +587,7 @@ func (o LayeredTypePtrOutput) Thinker() pulumi.StringPtrOutput {
|
|||
if v == nil {
|
||||
return nil
|
||||
}
|
||||
return &v.Thinker
|
||||
return v.Thinker
|
||||
}).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ export interface LayeredTypeArgs {
|
|||
/**
|
||||
* To ask and answer
|
||||
*/
|
||||
thinker: pulumi.Input<string>;
|
||||
thinker?: pulumi.Input<string>;
|
||||
}
|
||||
/**
|
||||
* layeredTypeArgsProvideDefaults sets the appropriate defaults for LayeredTypeArgs
|
||||
|
|
|
@ -196,22 +196,19 @@ class KubeClientSettingsArgs:
|
|||
class LayeredTypeArgs:
|
||||
def __init__(__self__, *,
|
||||
other: pulumi.Input['HelmReleaseSettingsArgs'],
|
||||
thinker: pulumi.Input[str],
|
||||
answer: Optional[pulumi.Input[float]] = None,
|
||||
plain_other: Optional['HelmReleaseSettingsArgs'] = None,
|
||||
question: Optional[pulumi.Input[str]] = None,
|
||||
recursive: Optional[pulumi.Input['LayeredTypeArgs']] = None):
|
||||
recursive: Optional[pulumi.Input['LayeredTypeArgs']] = None,
|
||||
thinker: Optional[pulumi.Input[str]] = None):
|
||||
"""
|
||||
Make sure that defaults propagate through types
|
||||
:param pulumi.Input[str] thinker: To ask and answer
|
||||
:param pulumi.Input[float] answer: The answer to the question
|
||||
:param 'HelmReleaseSettingsArgs' plain_other: Test how plain types interact
|
||||
:param pulumi.Input[str] question: The question already answered
|
||||
:param pulumi.Input[str] thinker: To ask and answer
|
||||
"""
|
||||
pulumi.set(__self__, "other", other)
|
||||
if thinker is None:
|
||||
thinker = 'not a good interaction'
|
||||
pulumi.set(__self__, "thinker", thinker)
|
||||
if answer is None:
|
||||
answer = 42
|
||||
if answer is not None:
|
||||
|
@ -224,6 +221,10 @@ class LayeredTypeArgs:
|
|||
pulumi.set(__self__, "question", question)
|
||||
if recursive is not None:
|
||||
pulumi.set(__self__, "recursive", recursive)
|
||||
if thinker is None:
|
||||
thinker = 'not a good interaction'
|
||||
if thinker is not None:
|
||||
pulumi.set(__self__, "thinker", thinker)
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
|
@ -234,18 +235,6 @@ class LayeredTypeArgs:
|
|||
def other(self, value: pulumi.Input['HelmReleaseSettingsArgs']):
|
||||
pulumi.set(self, "other", value)
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def thinker(self) -> pulumi.Input[str]:
|
||||
"""
|
||||
To ask and answer
|
||||
"""
|
||||
return pulumi.get(self, "thinker")
|
||||
|
||||
@thinker.setter
|
||||
def thinker(self, value: pulumi.Input[str]):
|
||||
pulumi.set(self, "thinker", value)
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def answer(self) -> Optional[pulumi.Input[float]]:
|
||||
|
@ -291,6 +280,18 @@ class LayeredTypeArgs:
|
|||
def recursive(self, value: Optional[pulumi.Input['LayeredTypeArgs']]):
|
||||
pulumi.set(self, "recursive", value)
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def thinker(self) -> Optional[pulumi.Input[str]]:
|
||||
"""
|
||||
To ask and answer
|
||||
"""
|
||||
return pulumi.get(self, "thinker")
|
||||
|
||||
@thinker.setter
|
||||
def thinker(self, value: Optional[pulumi.Input[str]]):
|
||||
pulumi.set(self, "thinker", value)
|
||||
|
||||
|
||||
@pulumi.input_type
|
||||
class TypArgs:
|
||||
|
|
|
@ -156,7 +156,7 @@
|
|||
"$ref": "#/types/example:index:LayeredType"
|
||||
}
|
||||
},
|
||||
"required": ["other", "thinker"]
|
||||
"required": ["other"]
|
||||
},
|
||||
"example:index:KubeClientSettings": {
|
||||
"description": "Options for tuning the Kubernetes client used by a Provider.",
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace Pulumi.Myedgeorder.Outputs
|
|||
/// Represents billing type.
|
||||
/// Expected value is 'Pav2'.
|
||||
/// </summary>
|
||||
public readonly string BillingType;
|
||||
public readonly string? BillingType;
|
||||
/// <summary>
|
||||
/// Charging type.
|
||||
/// </summary>
|
||||
|
@ -36,7 +36,7 @@ namespace Pulumi.Myedgeorder.Outputs
|
|||
|
||||
[OutputConstructor]
|
||||
private Pav2MeterDetailsResponse(
|
||||
string billingType,
|
||||
string? billingType,
|
||||
|
||||
string chargingType,
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace Pulumi.Myedgeorder.Outputs
|
|||
/// Represents billing type.
|
||||
/// Expected value is 'Purchase'.
|
||||
/// </summary>
|
||||
public readonly string BillingType;
|
||||
public readonly string? BillingType;
|
||||
/// <summary>
|
||||
/// Charging type.
|
||||
/// </summary>
|
||||
|
@ -44,7 +44,7 @@ namespace Pulumi.Myedgeorder.Outputs
|
|||
|
||||
[OutputConstructor]
|
||||
private PurchaseMeterDetailsResponse(
|
||||
string billingType,
|
||||
string? billingType,
|
||||
|
||||
string chargingType,
|
||||
|
||||
|
|
|
@ -1657,7 +1657,7 @@ func (o LinkResponseArrayOutput) Index(i pulumi.IntInput) LinkResponseOutput {
|
|||
type Pav2MeterDetailsResponse struct {
|
||||
// Represents billing type.
|
||||
// Expected value is 'Pav2'.
|
||||
BillingType string `pulumi:"billingType"`
|
||||
BillingType *string `pulumi:"billingType"`
|
||||
// Charging type.
|
||||
ChargingType string `pulumi:"chargingType"`
|
||||
// Validation status of requested data center and transport.
|
||||
|
@ -1681,7 +1681,7 @@ type Pav2MeterDetailsResponseInput interface {
|
|||
type Pav2MeterDetailsResponseArgs struct {
|
||||
// Represents billing type.
|
||||
// Expected value is 'Pav2'.
|
||||
BillingType pulumi.StringInput `pulumi:"billingType"`
|
||||
BillingType pulumi.StringPtrInput `pulumi:"billingType"`
|
||||
// Charging type.
|
||||
ChargingType pulumi.StringInput `pulumi:"chargingType"`
|
||||
// Validation status of requested data center and transport.
|
||||
|
@ -1719,8 +1719,8 @@ func (o Pav2MeterDetailsResponseOutput) ToPav2MeterDetailsResponseOutputWithCont
|
|||
|
||||
// Represents billing type.
|
||||
// Expected value is 'Pav2'.
|
||||
func (o Pav2MeterDetailsResponseOutput) BillingType() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v Pav2MeterDetailsResponse) string { return v.BillingType }).(pulumi.StringOutput)
|
||||
func (o Pav2MeterDetailsResponseOutput) BillingType() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v Pav2MeterDetailsResponse) *string { return v.BillingType }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
// Charging type.
|
||||
|
@ -2231,7 +2231,7 @@ func (o ProductResponseArrayOutput) Index(i pulumi.IntInput) ProductResponseOutp
|
|||
type PurchaseMeterDetailsResponse struct {
|
||||
// Represents billing type.
|
||||
// Expected value is 'Purchase'.
|
||||
BillingType string `pulumi:"billingType"`
|
||||
BillingType *string `pulumi:"billingType"`
|
||||
// Charging type.
|
||||
ChargingType string `pulumi:"chargingType"`
|
||||
// Billing unit applicable for Pav2 billing
|
||||
|
@ -2259,7 +2259,7 @@ type PurchaseMeterDetailsResponseInput interface {
|
|||
type PurchaseMeterDetailsResponseArgs struct {
|
||||
// Represents billing type.
|
||||
// Expected value is 'Purchase'.
|
||||
BillingType pulumi.StringInput `pulumi:"billingType"`
|
||||
BillingType pulumi.StringPtrInput `pulumi:"billingType"`
|
||||
// Charging type.
|
||||
ChargingType pulumi.StringInput `pulumi:"chargingType"`
|
||||
// Billing unit applicable for Pav2 billing
|
||||
|
@ -2301,8 +2301,8 @@ func (o PurchaseMeterDetailsResponseOutput) ToPurchaseMeterDetailsResponseOutput
|
|||
|
||||
// Represents billing type.
|
||||
// Expected value is 'Purchase'.
|
||||
func (o PurchaseMeterDetailsResponseOutput) BillingType() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v PurchaseMeterDetailsResponse) string { return v.BillingType }).(pulumi.StringOutput)
|
||||
func (o PurchaseMeterDetailsResponseOutput) BillingType() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v PurchaseMeterDetailsResponse) *string { return v.BillingType }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
// Charging type.
|
||||
|
|
|
@ -236,7 +236,7 @@ export interface Pav2MeterDetailsResponse {
|
|||
* Represents billing type.
|
||||
* Expected value is 'Pav2'.
|
||||
*/
|
||||
billingType: "Pav2";
|
||||
billingType?: "Pav2";
|
||||
/**
|
||||
* Charging type.
|
||||
*/
|
||||
|
@ -373,7 +373,7 @@ export interface PurchaseMeterDetailsResponse {
|
|||
* Represents billing type.
|
||||
* Expected value is 'Purchase'.
|
||||
*/
|
||||
billingType: "Purchase";
|
||||
billingType?: "Purchase";
|
||||
/**
|
||||
* Charging type.
|
||||
*/
|
||||
|
|
|
@ -600,31 +600,23 @@ class Pav2MeterDetailsResponse(dict):
|
|||
Billing type PAV2 meter details
|
||||
"""
|
||||
def __init__(__self__, *,
|
||||
billing_type: str,
|
||||
charging_type: str,
|
||||
meter_guid: str,
|
||||
multiplier: float):
|
||||
multiplier: float,
|
||||
billing_type: Optional[str] = None):
|
||||
"""
|
||||
Billing type PAV2 meter details
|
||||
:param str billing_type: Represents billing type.
|
||||
Expected value is 'Pav2'.
|
||||
:param str charging_type: Charging type.
|
||||
:param str meter_guid: Validation status of requested data center and transport.
|
||||
:param float multiplier: Billing unit applicable for Pav2 billing
|
||||
:param str billing_type: Represents billing type.
|
||||
Expected value is 'Pav2'.
|
||||
"""
|
||||
pulumi.set(__self__, "billing_type", 'Pav2')
|
||||
pulumi.set(__self__, "charging_type", charging_type)
|
||||
pulumi.set(__self__, "meter_guid", meter_guid)
|
||||
pulumi.set(__self__, "multiplier", multiplier)
|
||||
|
||||
@property
|
||||
@pulumi.getter(name="billingType")
|
||||
def billing_type(self) -> str:
|
||||
"""
|
||||
Represents billing type.
|
||||
Expected value is 'Pav2'.
|
||||
"""
|
||||
return pulumi.get(self, "billing_type")
|
||||
if billing_type is not None:
|
||||
pulumi.set(__self__, "billing_type", 'Pav2')
|
||||
|
||||
@property
|
||||
@pulumi.getter(name="chargingType")
|
||||
|
@ -650,6 +642,15 @@ class Pav2MeterDetailsResponse(dict):
|
|||
"""
|
||||
return pulumi.get(self, "multiplier")
|
||||
|
||||
@property
|
||||
@pulumi.getter(name="billingType")
|
||||
def billing_type(self) -> Optional[str]:
|
||||
"""
|
||||
Represents billing type.
|
||||
Expected value is 'Pav2'.
|
||||
"""
|
||||
return pulumi.get(self, "billing_type")
|
||||
|
||||
|
||||
@pulumi.output_type
|
||||
class ProductFamilyResponse(dict):
|
||||
|
@ -954,37 +955,29 @@ class PurchaseMeterDetailsResponse(dict):
|
|||
Billing type Purchase meter details
|
||||
"""
|
||||
def __init__(__self__, *,
|
||||
billing_type: str,
|
||||
charging_type: str,
|
||||
multiplier: float,
|
||||
product_id: str,
|
||||
sku_id: str,
|
||||
term_id: str):
|
||||
term_id: str,
|
||||
billing_type: Optional[str] = None):
|
||||
"""
|
||||
Billing type Purchase meter details
|
||||
:param str billing_type: Represents billing type.
|
||||
Expected value is 'Purchase'.
|
||||
:param str charging_type: Charging type.
|
||||
:param float multiplier: Billing unit applicable for Pav2 billing
|
||||
:param str product_id: Product Id
|
||||
:param str sku_id: Sku Id
|
||||
:param str term_id: Term Id
|
||||
:param str billing_type: Represents billing type.
|
||||
Expected value is 'Purchase'.
|
||||
"""
|
||||
pulumi.set(__self__, "billing_type", 'Purchase')
|
||||
pulumi.set(__self__, "charging_type", charging_type)
|
||||
pulumi.set(__self__, "multiplier", multiplier)
|
||||
pulumi.set(__self__, "product_id", product_id)
|
||||
pulumi.set(__self__, "sku_id", sku_id)
|
||||
pulumi.set(__self__, "term_id", term_id)
|
||||
|
||||
@property
|
||||
@pulumi.getter(name="billingType")
|
||||
def billing_type(self) -> str:
|
||||
"""
|
||||
Represents billing type.
|
||||
Expected value is 'Purchase'.
|
||||
"""
|
||||
return pulumi.get(self, "billing_type")
|
||||
if billing_type is not None:
|
||||
pulumi.set(__self__, "billing_type", 'Purchase')
|
||||
|
||||
@property
|
||||
@pulumi.getter(name="chargingType")
|
||||
|
@ -1026,6 +1019,15 @@ class PurchaseMeterDetailsResponse(dict):
|
|||
"""
|
||||
return pulumi.get(self, "term_id")
|
||||
|
||||
@property
|
||||
@pulumi.getter(name="billingType")
|
||||
def billing_type(self) -> Optional[str]:
|
||||
"""
|
||||
Represents billing type.
|
||||
Expected value is 'Purchase'.
|
||||
"""
|
||||
return pulumi.get(self, "billing_type")
|
||||
|
||||
|
||||
@pulumi.output_type
|
||||
class SpecificationResponse(dict):
|
||||
|
|
|
@ -814,7 +814,6 @@
|
|||
},
|
||||
"type": "object",
|
||||
"required": [
|
||||
"billingType",
|
||||
"chargingType",
|
||||
"multiplier",
|
||||
"productId",
|
||||
|
@ -845,7 +844,6 @@
|
|||
},
|
||||
"type": "object",
|
||||
"required": [
|
||||
"billingType",
|
||||
"chargingType",
|
||||
"meterGuid",
|
||||
"multiplier"
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace Pulumi.Mypkg.Outputs
|
|||
/// The type of SSIS object metadata.
|
||||
/// Expected value is 'Environment'.
|
||||
/// </summary>
|
||||
public readonly string Type;
|
||||
public readonly string? Type;
|
||||
/// <summary>
|
||||
/// Variable in environment
|
||||
/// </summary>
|
||||
|
@ -52,7 +52,7 @@ namespace Pulumi.Mypkg.Outputs
|
|||
|
||||
string? name,
|
||||
|
||||
string type,
|
||||
string? type,
|
||||
|
||||
ImmutableArray<Outputs.SsisVariableResponse> variables)
|
||||
{
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace Pulumi.Mypkg.Outputs
|
|||
/// The type of SSIS object metadata.
|
||||
/// Expected value is 'Folder'.
|
||||
/// </summary>
|
||||
public readonly string Type;
|
||||
public readonly string? Type;
|
||||
|
||||
[OutputConstructor]
|
||||
private SsisFolderResponse(
|
||||
|
@ -42,7 +42,7 @@ namespace Pulumi.Mypkg.Outputs
|
|||
|
||||
string? name,
|
||||
|
||||
string type)
|
||||
string? type)
|
||||
{
|
||||
Description = description;
|
||||
Id = id;
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace Pulumi.Mypkg.Outputs
|
|||
/// The type of SSIS object metadata.
|
||||
/// Expected value is 'Package'.
|
||||
/// </summary>
|
||||
public readonly string Type;
|
||||
public readonly string? Type;
|
||||
|
||||
[OutputConstructor]
|
||||
private SsisPackageResponse(
|
||||
|
@ -66,7 +66,7 @@ namespace Pulumi.Mypkg.Outputs
|
|||
|
||||
double? projectVersion,
|
||||
|
||||
string type)
|
||||
string? type)
|
||||
{
|
||||
Description = description;
|
||||
FolderId = folderId;
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace Pulumi.Mypkg.Outputs
|
|||
/// The type of SSIS object metadata.
|
||||
/// Expected value is 'Project'.
|
||||
/// </summary>
|
||||
public readonly string Type;
|
||||
public readonly string? Type;
|
||||
/// <summary>
|
||||
/// Project version.
|
||||
/// </summary>
|
||||
|
@ -64,7 +64,7 @@ namespace Pulumi.Mypkg.Outputs
|
|||
|
||||
ImmutableArray<Outputs.SsisParameterResponse> parameters,
|
||||
|
||||
string type,
|
||||
string? type,
|
||||
|
||||
double? version)
|
||||
{
|
||||
|
|
|
@ -249,7 +249,7 @@ type SsisEnvironmentResponse struct {
|
|||
Name *string `pulumi:"name"`
|
||||
// The type of SSIS object metadata.
|
||||
// Expected value is 'Environment'.
|
||||
Type string `pulumi:"type"`
|
||||
Type *string `pulumi:"type"`
|
||||
// Variable in environment
|
||||
Variables []SsisVariableResponse `pulumi:"variables"`
|
||||
}
|
||||
|
@ -277,7 +277,7 @@ type SsisEnvironmentResponseArgs struct {
|
|||
Name pulumi.StringPtrInput `pulumi:"name"`
|
||||
// The type of SSIS object metadata.
|
||||
// Expected value is 'Environment'.
|
||||
Type pulumi.StringInput `pulumi:"type"`
|
||||
Type pulumi.StringPtrInput `pulumi:"type"`
|
||||
// Variable in environment
|
||||
Variables SsisVariableResponseArrayInput `pulumi:"variables"`
|
||||
}
|
||||
|
@ -331,8 +331,8 @@ func (o SsisEnvironmentResponseOutput) Name() pulumi.StringPtrOutput {
|
|||
|
||||
// The type of SSIS object metadata.
|
||||
// Expected value is 'Environment'.
|
||||
func (o SsisEnvironmentResponseOutput) Type() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v SsisEnvironmentResponse) string { return v.Type }).(pulumi.StringOutput)
|
||||
func (o SsisEnvironmentResponseOutput) Type() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v SsisEnvironmentResponse) *string { return v.Type }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
// Variable in environment
|
||||
|
@ -350,7 +350,7 @@ type SsisFolderResponse struct {
|
|||
Name *string `pulumi:"name"`
|
||||
// The type of SSIS object metadata.
|
||||
// Expected value is 'Folder'.
|
||||
Type string `pulumi:"type"`
|
||||
Type *string `pulumi:"type"`
|
||||
}
|
||||
|
||||
// SsisFolderResponseInput is an input type that accepts SsisFolderResponseArgs and SsisFolderResponseOutput values.
|
||||
|
@ -374,7 +374,7 @@ type SsisFolderResponseArgs struct {
|
|||
Name pulumi.StringPtrInput `pulumi:"name"`
|
||||
// The type of SSIS object metadata.
|
||||
// Expected value is 'Folder'.
|
||||
Type pulumi.StringInput `pulumi:"type"`
|
||||
Type pulumi.StringPtrInput `pulumi:"type"`
|
||||
}
|
||||
|
||||
func (SsisFolderResponseArgs) ElementType() reflect.Type {
|
||||
|
@ -421,8 +421,8 @@ func (o SsisFolderResponseOutput) Name() pulumi.StringPtrOutput {
|
|||
|
||||
// The type of SSIS object metadata.
|
||||
// Expected value is 'Folder'.
|
||||
func (o SsisFolderResponseOutput) Type() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v SsisFolderResponse) string { return v.Type }).(pulumi.StringOutput)
|
||||
func (o SsisFolderResponseOutput) Type() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v SsisFolderResponse) *string { return v.Type }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
// Ssis Package.
|
||||
|
@ -443,7 +443,7 @@ type SsisPackageResponse struct {
|
|||
ProjectVersion *float64 `pulumi:"projectVersion"`
|
||||
// The type of SSIS object metadata.
|
||||
// Expected value is 'Package'.
|
||||
Type string `pulumi:"type"`
|
||||
Type *string `pulumi:"type"`
|
||||
}
|
||||
|
||||
// SsisPackageResponseInput is an input type that accepts SsisPackageResponseArgs and SsisPackageResponseOutput values.
|
||||
|
@ -475,7 +475,7 @@ type SsisPackageResponseArgs struct {
|
|||
ProjectVersion pulumi.Float64PtrInput `pulumi:"projectVersion"`
|
||||
// The type of SSIS object metadata.
|
||||
// Expected value is 'Package'.
|
||||
Type pulumi.StringInput `pulumi:"type"`
|
||||
Type pulumi.StringPtrInput `pulumi:"type"`
|
||||
}
|
||||
|
||||
func (SsisPackageResponseArgs) ElementType() reflect.Type {
|
||||
|
@ -542,8 +542,8 @@ func (o SsisPackageResponseOutput) ProjectVersion() pulumi.Float64PtrOutput {
|
|||
|
||||
// The type of SSIS object metadata.
|
||||
// Expected value is 'Package'.
|
||||
func (o SsisPackageResponseOutput) Type() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v SsisPackageResponse) string { return v.Type }).(pulumi.StringOutput)
|
||||
func (o SsisPackageResponseOutput) Type() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v SsisPackageResponse) *string { return v.Type }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
// Ssis parameter.
|
||||
|
@ -761,7 +761,7 @@ type SsisProjectResponse struct {
|
|||
Parameters []SsisParameterResponse `pulumi:"parameters"`
|
||||
// The type of SSIS object metadata.
|
||||
// Expected value is 'Project'.
|
||||
Type string `pulumi:"type"`
|
||||
Type *string `pulumi:"type"`
|
||||
// Project version.
|
||||
Version *float64 `pulumi:"version"`
|
||||
}
|
||||
|
@ -793,7 +793,7 @@ type SsisProjectResponseArgs struct {
|
|||
Parameters SsisParameterResponseArrayInput `pulumi:"parameters"`
|
||||
// The type of SSIS object metadata.
|
||||
// Expected value is 'Project'.
|
||||
Type pulumi.StringInput `pulumi:"type"`
|
||||
Type pulumi.StringPtrInput `pulumi:"type"`
|
||||
// Project version.
|
||||
Version pulumi.Float64PtrInput `pulumi:"version"`
|
||||
}
|
||||
|
@ -857,8 +857,8 @@ func (o SsisProjectResponseOutput) Parameters() SsisParameterResponseArrayOutput
|
|||
|
||||
// The type of SSIS object metadata.
|
||||
// Expected value is 'Project'.
|
||||
func (o SsisProjectResponseOutput) Type() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v SsisProjectResponse) string { return v.Type }).(pulumi.StringOutput)
|
||||
func (o SsisProjectResponseOutput) Type() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v SsisProjectResponse) *string { return v.Type }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
// Project version.
|
||||
|
|
|
@ -50,7 +50,7 @@ export interface SsisEnvironmentResponse {
|
|||
* The type of SSIS object metadata.
|
||||
* Expected value is 'Environment'.
|
||||
*/
|
||||
type: "Environment";
|
||||
type?: "Environment";
|
||||
/**
|
||||
* Variable in environment
|
||||
*/
|
||||
|
@ -77,7 +77,7 @@ export interface SsisFolderResponse {
|
|||
* The type of SSIS object metadata.
|
||||
* Expected value is 'Folder'.
|
||||
*/
|
||||
type: "Folder";
|
||||
type?: "Folder";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -116,7 +116,7 @@ export interface SsisPackageResponse {
|
|||
* The type of SSIS object metadata.
|
||||
* Expected value is 'Package'.
|
||||
*/
|
||||
type: "Package";
|
||||
type?: "Package";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -205,7 +205,7 @@ export interface SsisProjectResponse {
|
|||
* The type of SSIS object metadata.
|
||||
* Expected value is 'Project'.
|
||||
*/
|
||||
type: "Project";
|
||||
type?: "Project";
|
||||
/**
|
||||
* Project version.
|
||||
*/
|
||||
|
|
|
@ -85,23 +85,22 @@ class SsisEnvironmentResponse(dict):
|
|||
Ssis environment.
|
||||
"""
|
||||
def __init__(__self__, *,
|
||||
type: str,
|
||||
description: Optional[str] = None,
|
||||
folder_id: Optional[float] = None,
|
||||
id: Optional[float] = None,
|
||||
name: Optional[str] = None,
|
||||
type: Optional[str] = None,
|
||||
variables: Optional[Sequence['outputs.SsisVariableResponse']] = None):
|
||||
"""
|
||||
Ssis environment.
|
||||
:param str type: The type of SSIS object metadata.
|
||||
Expected value is 'Environment'.
|
||||
:param str description: Metadata description.
|
||||
:param float folder_id: Folder id which contains environment.
|
||||
:param float id: Metadata id.
|
||||
:param str name: Metadata name.
|
||||
:param str type: The type of SSIS object metadata.
|
||||
Expected value is 'Environment'.
|
||||
:param Sequence['SsisVariableResponse'] variables: Variable in environment
|
||||
"""
|
||||
pulumi.set(__self__, "type", 'Environment')
|
||||
if description is not None:
|
||||
pulumi.set(__self__, "description", description)
|
||||
if folder_id is not None:
|
||||
|
@ -110,18 +109,11 @@ class SsisEnvironmentResponse(dict):
|
|||
pulumi.set(__self__, "id", id)
|
||||
if name is not None:
|
||||
pulumi.set(__self__, "name", name)
|
||||
if type is not None:
|
||||
pulumi.set(__self__, "type", 'Environment')
|
||||
if variables is not None:
|
||||
pulumi.set(__self__, "variables", variables)
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def type(self) -> str:
|
||||
"""
|
||||
The type of SSIS object metadata.
|
||||
Expected value is 'Environment'.
|
||||
"""
|
||||
return pulumi.get(self, "type")
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def description(self) -> Optional[str]:
|
||||
|
@ -154,6 +146,15 @@ class SsisEnvironmentResponse(dict):
|
|||
"""
|
||||
return pulumi.get(self, "name")
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def type(self) -> Optional[str]:
|
||||
"""
|
||||
The type of SSIS object metadata.
|
||||
Expected value is 'Environment'.
|
||||
"""
|
||||
return pulumi.get(self, "type")
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def variables(self) -> Optional[Sequence['outputs.SsisVariableResponse']]:
|
||||
|
@ -169,34 +170,26 @@ class SsisFolderResponse(dict):
|
|||
Ssis folder.
|
||||
"""
|
||||
def __init__(__self__, *,
|
||||
type: str,
|
||||
description: Optional[str] = None,
|
||||
id: Optional[float] = None,
|
||||
name: Optional[str] = None):
|
||||
name: Optional[str] = None,
|
||||
type: Optional[str] = None):
|
||||
"""
|
||||
Ssis folder.
|
||||
:param str type: The type of SSIS object metadata.
|
||||
Expected value is 'Folder'.
|
||||
:param str description: Metadata description.
|
||||
:param float id: Metadata id.
|
||||
:param str name: Metadata name.
|
||||
:param str type: The type of SSIS object metadata.
|
||||
Expected value is 'Folder'.
|
||||
"""
|
||||
pulumi.set(__self__, "type", 'Folder')
|
||||
if description is not None:
|
||||
pulumi.set(__self__, "description", description)
|
||||
if id is not None:
|
||||
pulumi.set(__self__, "id", id)
|
||||
if name is not None:
|
||||
pulumi.set(__self__, "name", name)
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def type(self) -> str:
|
||||
"""
|
||||
The type of SSIS object metadata.
|
||||
Expected value is 'Folder'.
|
||||
"""
|
||||
return pulumi.get(self, "type")
|
||||
if type is not None:
|
||||
pulumi.set(__self__, "type", 'Folder')
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
|
@ -222,6 +215,15 @@ class SsisFolderResponse(dict):
|
|||
"""
|
||||
return pulumi.get(self, "name")
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def type(self) -> Optional[str]:
|
||||
"""
|
||||
The type of SSIS object metadata.
|
||||
Expected value is 'Folder'.
|
||||
"""
|
||||
return pulumi.get(self, "type")
|
||||
|
||||
|
||||
@pulumi.output_type
|
||||
class SsisPackageResponse(dict):
|
||||
|
@ -229,18 +231,16 @@ class SsisPackageResponse(dict):
|
|||
Ssis Package.
|
||||
"""
|
||||
def __init__(__self__, *,
|
||||
type: str,
|
||||
description: Optional[str] = None,
|
||||
folder_id: Optional[float] = None,
|
||||
id: Optional[float] = None,
|
||||
name: Optional[str] = None,
|
||||
parameters: Optional[Sequence['outputs.SsisParameterResponse']] = None,
|
||||
project_id: Optional[float] = None,
|
||||
project_version: Optional[float] = None):
|
||||
project_version: Optional[float] = None,
|
||||
type: Optional[str] = None):
|
||||
"""
|
||||
Ssis Package.
|
||||
:param str type: The type of SSIS object metadata.
|
||||
Expected value is 'Package'.
|
||||
:param str description: Metadata description.
|
||||
:param float folder_id: Folder id which contains package.
|
||||
:param float id: Metadata id.
|
||||
|
@ -248,8 +248,9 @@ class SsisPackageResponse(dict):
|
|||
:param Sequence['SsisParameterResponse'] parameters: Parameters in package
|
||||
:param float project_id: Project id which contains package.
|
||||
:param float project_version: Project version which contains package.
|
||||
:param str type: The type of SSIS object metadata.
|
||||
Expected value is 'Package'.
|
||||
"""
|
||||
pulumi.set(__self__, "type", 'Package')
|
||||
if description is not None:
|
||||
pulumi.set(__self__, "description", description)
|
||||
if folder_id is not None:
|
||||
|
@ -264,15 +265,8 @@ class SsisPackageResponse(dict):
|
|||
pulumi.set(__self__, "project_id", project_id)
|
||||
if project_version is not None:
|
||||
pulumi.set(__self__, "project_version", project_version)
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def type(self) -> str:
|
||||
"""
|
||||
The type of SSIS object metadata.
|
||||
Expected value is 'Package'.
|
||||
"""
|
||||
return pulumi.get(self, "type")
|
||||
if type is not None:
|
||||
pulumi.set(__self__, "type", 'Package')
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
|
@ -330,6 +324,15 @@ class SsisPackageResponse(dict):
|
|||
"""
|
||||
return pulumi.get(self, "project_version")
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def type(self) -> Optional[str]:
|
||||
"""
|
||||
The type of SSIS object metadata.
|
||||
Expected value is 'Package'.
|
||||
"""
|
||||
return pulumi.get(self, "type")
|
||||
|
||||
|
||||
@pulumi.output_type
|
||||
class SsisParameterResponse(dict):
|
||||
|
@ -492,27 +495,26 @@ class SsisProjectResponse(dict):
|
|||
Ssis project.
|
||||
"""
|
||||
def __init__(__self__, *,
|
||||
type: str,
|
||||
description: Optional[str] = None,
|
||||
environment_refs: Optional[Sequence['outputs.SsisEnvironmentReferenceResponse']] = None,
|
||||
folder_id: Optional[float] = None,
|
||||
id: Optional[float] = None,
|
||||
name: Optional[str] = None,
|
||||
parameters: Optional[Sequence['outputs.SsisParameterResponse']] = None,
|
||||
type: Optional[str] = None,
|
||||
version: Optional[float] = None):
|
||||
"""
|
||||
Ssis project.
|
||||
:param str type: The type of SSIS object metadata.
|
||||
Expected value is 'Project'.
|
||||
:param str description: Metadata description.
|
||||
:param Sequence['SsisEnvironmentReferenceResponse'] environment_refs: Environment reference in project
|
||||
:param float folder_id: Folder id which contains project.
|
||||
:param float id: Metadata id.
|
||||
:param str name: Metadata name.
|
||||
:param Sequence['SsisParameterResponse'] parameters: Parameters in project
|
||||
:param str type: The type of SSIS object metadata.
|
||||
Expected value is 'Project'.
|
||||
:param float version: Project version.
|
||||
"""
|
||||
pulumi.set(__self__, "type", 'Project')
|
||||
if description is not None:
|
||||
pulumi.set(__self__, "description", description)
|
||||
if environment_refs is not None:
|
||||
|
@ -525,18 +527,11 @@ class SsisProjectResponse(dict):
|
|||
pulumi.set(__self__, "name", name)
|
||||
if parameters is not None:
|
||||
pulumi.set(__self__, "parameters", parameters)
|
||||
if type is not None:
|
||||
pulumi.set(__self__, "type", 'Project')
|
||||
if version is not None:
|
||||
pulumi.set(__self__, "version", version)
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def type(self) -> str:
|
||||
"""
|
||||
The type of SSIS object metadata.
|
||||
Expected value is 'Project'.
|
||||
"""
|
||||
return pulumi.get(self, "type")
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def description(self) -> Optional[str]:
|
||||
|
@ -585,6 +580,15 @@ class SsisProjectResponse(dict):
|
|||
"""
|
||||
return pulumi.get(self, "parameters")
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def type(self) -> Optional[str]:
|
||||
"""
|
||||
The type of SSIS object metadata.
|
||||
Expected value is 'Project'.
|
||||
"""
|
||||
return pulumi.get(self, "type")
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def version(self) -> Optional[float]:
|
||||
|
|
|
@ -356,10 +356,7 @@
|
|||
"description": "Variable in environment"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"required": [
|
||||
"type"
|
||||
]
|
||||
"type": "object"
|
||||
},
|
||||
"mypkg::SsisFolderResponse": {
|
||||
"description": "Ssis folder.",
|
||||
|
@ -382,10 +379,7 @@
|
|||
"const": "Folder"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"required": [
|
||||
"type"
|
||||
]
|
||||
"type": "object"
|
||||
},
|
||||
"mypkg::SsisPackageResponse": {
|
||||
"description": "Ssis Package.",
|
||||
|
@ -428,10 +422,7 @@
|
|||
"const": "Package"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"required": [
|
||||
"type"
|
||||
]
|
||||
"type": "object"
|
||||
},
|
||||
"mypkg::SsisProjectResponse": {
|
||||
"description": "Ssis project.",
|
||||
|
@ -478,10 +469,7 @@
|
|||
"description": "Project version."
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"required": [
|
||||
"type"
|
||||
]
|
||||
"type": "object"
|
||||
},
|
||||
"mypkg::SsisEnvironmentReferenceResponse": {
|
||||
"description": "Ssis environment reference.",
|
||||
|
|
|
@ -27,14 +27,16 @@ no_edit_this_page: true
|
|||
<div class="highlight"><pre class="chroma"><code class="language-python" data-lang="python"><span class=nd>@overload</span>
|
||||
<span class="k">def </span><span class="nx">ModuleResource</span><span class="p">(</span><span class="nx">resource_name</span><span class="p">:</span> <span class="nx">str</span><span class="p">,</span>
|
||||
<span class="nx">opts</span><span class="p">:</span> <span class="nx"><a href="/docs/reference/pkg/python/pulumi/#pulumi.ResourceOptions">Optional[ResourceOptions]</a></span> = None<span class="p">,</span>
|
||||
<span class="nx">optional_bool</span><span class="p">:</span> <span class="nx">Optional[bool]</span> = None<span class="p">,</span>
|
||||
<span class="nx">default_bool</span><span class="p">:</span> <span class="nx">Optional[bool]</span> = None<span class="p">,</span>
|
||||
<span class="nx">default_enum</span><span class="p">:</span> <span class="nx">Optional[EnumThing]</span> = None<span class="p">,</span>
|
||||
<span class="nx">default_number</span><span class="p">:</span> <span class="nx">Optional[float]</span> = None<span class="p">,</span>
|
||||
<span class="nx">default_string</span><span class="p">:</span> <span class="nx">Optional[str]</span> = None<span class="p">,</span>
|
||||
<span class="nx">optional_enum</span><span class="p">:</span> <span class="nx">Optional[EnumThing]</span> = None<span class="p">,</span>
|
||||
<span class="nx">optional_number</span><span class="p">:</span> <span class="nx">Optional[float]</span> = None<span class="p">,</span>
|
||||
<span class="nx">optional_string</span><span class="p">:</span> <span class="nx">Optional[str]</span> = None<span class="p">,</span>
|
||||
<span class="nx">plain_optional_bool</span><span class="p">:</span> <span class="nx">Optional[bool]</span> = None<span class="p">,</span>
|
||||
<span class="nx">plain_optional_number</span><span class="p">:</span> <span class="nx">Optional[float]</span> = None<span class="p">,</span>
|
||||
<span class="nx">plain_optional_string</span><span class="p">:</span> <span class="nx">Optional[str]</span> = None<span class="p">,</span>
|
||||
<span class="nx">plain_required_bool</span><span class="p">:</span> <span class="nx">Optional[bool]</span> = None<span class="p">,</span>
|
||||
<span class="nx">plain_required_enum</span><span class="p">:</span> <span class="nx">Optional[EnumThing]</span> = None<span class="p">,</span>
|
||||
<span class="nx">plain_required_number</span><span class="p">:</span> <span class="nx">Optional[float]</span> = None<span class="p">,</span>
|
||||
<span class="nx">plain_required_string</span><span class="p">:</span> <span class="nx">Optional[str]</span> = None<span class="p">,</span>
|
||||
<span class="nx">required_bool</span><span class="p">:</span> <span class="nx">Optional[bool]</span> = None<span class="p">,</span>
|
||||
|
@ -176,6 +178,14 @@ The ModuleResource resource accepts the following [input]({{< relref "/docs/intr
|
|||
<span class="property-indicator"></span>
|
||||
<span class="property-type">bool</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-required"
|
||||
title="Required">
|
||||
<span id="plain_required_enum_csharp">
|
||||
<a href="#plain_required_enum_csharp" style="color: inherit; text-decoration: inherit;">Plain_<wbr>required_<wbr>enum</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#enumthing">Pulumi.<wbr>Foo<wbr>Bar.<wbr>Enum<wbr>Thing</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-required"
|
||||
title="Required">
|
||||
<span id="plain_required_number_csharp">
|
||||
|
@ -226,12 +236,36 @@ The ModuleResource resource accepts the following [input]({{< relref "/docs/intr
|
|||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="optional_bool_csharp">
|
||||
<a href="#optional_bool_csharp" style="color: inherit; text-decoration: inherit;">Optional_<wbr>bool</a>
|
||||
<span id="default_bool_csharp">
|
||||
<a href="#default_bool_csharp" style="color: inherit; text-decoration: inherit;">Default_<wbr>bool</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type">bool</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="default_enum_csharp">
|
||||
<a href="#default_enum_csharp" style="color: inherit; text-decoration: inherit;">Default_<wbr>enum</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#enumthing">Pulumi.<wbr>Foo<wbr>Bar.<wbr>Enum<wbr>Thing</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="default_number_csharp">
|
||||
<a href="#default_number_csharp" style="color: inherit; text-decoration: inherit;">Default_<wbr>number</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type">double</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="default_string_csharp">
|
||||
<a href="#default_string_csharp" style="color: inherit; text-decoration: inherit;">Default_<wbr>string</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type">string</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="optional_enum_csharp">
|
||||
|
@ -240,22 +274,6 @@ The ModuleResource resource accepts the following [input]({{< relref "/docs/intr
|
|||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#enumthing">Pulumi.<wbr>Foo<wbr>Bar.<wbr>Enum<wbr>Thing</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="optional_number_csharp">
|
||||
<a href="#optional_number_csharp" style="color: inherit; text-decoration: inherit;">Optional_<wbr>number</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type">double</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="optional_string_csharp">
|
||||
<a href="#optional_string_csharp" style="color: inherit; text-decoration: inherit;">Optional_<wbr>string</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type">string</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="plain_optional_bool_csharp">
|
||||
|
@ -292,6 +310,14 @@ The ModuleResource resource accepts the following [input]({{< relref "/docs/intr
|
|||
<span class="property-indicator"></span>
|
||||
<span class="property-type">bool</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-required"
|
||||
title="Required">
|
||||
<span id="plain_required_enum_go">
|
||||
<a href="#plain_required_enum_go" style="color: inherit; text-decoration: inherit;">Plain_<wbr>required_<wbr>enum</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#enumthing">Enum<wbr>Thing</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-required"
|
||||
title="Required">
|
||||
<span id="plain_required_number_go">
|
||||
|
@ -342,12 +368,36 @@ The ModuleResource resource accepts the following [input]({{< relref "/docs/intr
|
|||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="optional_bool_go">
|
||||
<a href="#optional_bool_go" style="color: inherit; text-decoration: inherit;">Optional_<wbr>bool</a>
|
||||
<span id="default_bool_go">
|
||||
<a href="#default_bool_go" style="color: inherit; text-decoration: inherit;">Default_<wbr>bool</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type">bool</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="default_enum_go">
|
||||
<a href="#default_enum_go" style="color: inherit; text-decoration: inherit;">Default_<wbr>enum</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#enumthing">Enum<wbr>Thing</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="default_number_go">
|
||||
<a href="#default_number_go" style="color: inherit; text-decoration: inherit;">Default_<wbr>number</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type">float64</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="default_string_go">
|
||||
<a href="#default_string_go" style="color: inherit; text-decoration: inherit;">Default_<wbr>string</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type">string</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="optional_enum_go">
|
||||
|
@ -356,22 +406,6 @@ The ModuleResource resource accepts the following [input]({{< relref "/docs/intr
|
|||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#enumthing">Enum<wbr>Thing</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="optional_number_go">
|
||||
<a href="#optional_number_go" style="color: inherit; text-decoration: inherit;">Optional_<wbr>number</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type">float64</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="optional_string_go">
|
||||
<a href="#optional_string_go" style="color: inherit; text-decoration: inherit;">Optional_<wbr>string</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type">string</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="plain_optional_bool_go">
|
||||
|
@ -408,6 +442,14 @@ The ModuleResource resource accepts the following [input]({{< relref "/docs/intr
|
|||
<span class="property-indicator"></span>
|
||||
<span class="property-type">boolean</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-required"
|
||||
title="Required">
|
||||
<span id="plain_required_enum_nodejs">
|
||||
<a href="#plain_required_enum_nodejs" style="color: inherit; text-decoration: inherit;">plain_<wbr>required_<wbr>enum</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#enumthing">Enum<wbr>Thing</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-required"
|
||||
title="Required">
|
||||
<span id="plain_required_number_nodejs">
|
||||
|
@ -458,12 +500,36 @@ The ModuleResource resource accepts the following [input]({{< relref "/docs/intr
|
|||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="optional_bool_nodejs">
|
||||
<a href="#optional_bool_nodejs" style="color: inherit; text-decoration: inherit;">optional_<wbr>bool</a>
|
||||
<span id="default_bool_nodejs">
|
||||
<a href="#default_bool_nodejs" style="color: inherit; text-decoration: inherit;">default_<wbr>bool</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type">boolean</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="default_enum_nodejs">
|
||||
<a href="#default_enum_nodejs" style="color: inherit; text-decoration: inherit;">default_<wbr>enum</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#enumthing">Enum<wbr>Thing</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="default_number_nodejs">
|
||||
<a href="#default_number_nodejs" style="color: inherit; text-decoration: inherit;">default_<wbr>number</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type">number</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="default_string_nodejs">
|
||||
<a href="#default_string_nodejs" style="color: inherit; text-decoration: inherit;">default_<wbr>string</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type">string</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="optional_enum_nodejs">
|
||||
|
@ -472,22 +538,6 @@ The ModuleResource resource accepts the following [input]({{< relref "/docs/intr
|
|||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#enumthing">Enum<wbr>Thing</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="optional_number_nodejs">
|
||||
<a href="#optional_number_nodejs" style="color: inherit; text-decoration: inherit;">optional_<wbr>number</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type">number</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="optional_string_nodejs">
|
||||
<a href="#optional_string_nodejs" style="color: inherit; text-decoration: inherit;">optional_<wbr>string</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type">string</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="plain_optional_bool_nodejs">
|
||||
|
@ -524,6 +574,14 @@ The ModuleResource resource accepts the following [input]({{< relref "/docs/intr
|
|||
<span class="property-indicator"></span>
|
||||
<span class="property-type">bool</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-required"
|
||||
title="Required">
|
||||
<span id="plain_required_enum_python">
|
||||
<a href="#plain_required_enum_python" style="color: inherit; text-decoration: inherit;">plain_<wbr>required_<wbr>enum</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#enumthing">Enum<wbr>Thing</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-required"
|
||||
title="Required">
|
||||
<span id="plain_required_number_python">
|
||||
|
@ -574,12 +632,36 @@ The ModuleResource resource accepts the following [input]({{< relref "/docs/intr
|
|||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="optional_bool_python">
|
||||
<a href="#optional_bool_python" style="color: inherit; text-decoration: inherit;">optional_<wbr>bool</a>
|
||||
<span id="default_bool_python">
|
||||
<a href="#default_bool_python" style="color: inherit; text-decoration: inherit;">default_<wbr>bool</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type">bool</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="default_enum_python">
|
||||
<a href="#default_enum_python" style="color: inherit; text-decoration: inherit;">default_<wbr>enum</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#enumthing">Enum<wbr>Thing</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="default_number_python">
|
||||
<a href="#default_number_python" style="color: inherit; text-decoration: inherit;">default_<wbr>number</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type">float</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="default_string_python">
|
||||
<a href="#default_string_python" style="color: inherit; text-decoration: inherit;">default_<wbr>string</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type">str</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="optional_enum_python">
|
||||
|
@ -588,22 +670,6 @@ The ModuleResource resource accepts the following [input]({{< relref "/docs/intr
|
|||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#enumthing">Enum<wbr>Thing</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="optional_number_python">
|
||||
<a href="#optional_number_python" style="color: inherit; text-decoration: inherit;">optional_<wbr>number</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type">float</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="optional_string_python">
|
||||
<a href="#optional_string_python" style="color: inherit; text-decoration: inherit;">optional_<wbr>string</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type">str</span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="plain_optional_bool_python">
|
||||
|
|
|
@ -32,9 +32,7 @@ namespace Pulumi.FooBar
|
|||
private static ModuleResourceArgs MakeArgs(ModuleResourceArgs args)
|
||||
{
|
||||
args ??= new ModuleResourceArgs();
|
||||
args.Optional_const = "val";
|
||||
args.Plain_optional_const = "val";
|
||||
args.Plain_required_const = "val";
|
||||
args.String_const = "val";
|
||||
return args;
|
||||
}
|
||||
|
||||
|
@ -65,27 +63,24 @@ namespace Pulumi.FooBar
|
|||
|
||||
public sealed class ModuleResourceArgs : Pulumi.ResourceArgs
|
||||
{
|
||||
[Input("optional_bool")]
|
||||
public Input<bool>? Optional_bool { get; set; }
|
||||
[Input("default_bool")]
|
||||
public Input<bool>? Default_bool { get; set; }
|
||||
|
||||
[Input("optional_const")]
|
||||
public Input<string>? Optional_const { get; set; }
|
||||
[Input("default_enum")]
|
||||
public Input<Pulumi.FooBar.EnumThing>? Default_enum { get; set; }
|
||||
|
||||
[Input("default_number")]
|
||||
public Input<double>? Default_number { get; set; }
|
||||
|
||||
[Input("default_string")]
|
||||
public Input<string>? Default_string { get; set; }
|
||||
|
||||
[Input("optional_enum")]
|
||||
public Input<Pulumi.FooBar.EnumThing>? Optional_enum { get; set; }
|
||||
|
||||
[Input("optional_number")]
|
||||
public Input<double>? Optional_number { get; set; }
|
||||
|
||||
[Input("optional_string")]
|
||||
public Input<string>? Optional_string { get; set; }
|
||||
|
||||
[Input("plain_optional_bool")]
|
||||
public bool? Plain_optional_bool { get; set; }
|
||||
|
||||
[Input("plain_optional_const")]
|
||||
public string? Plain_optional_const { get; set; }
|
||||
|
||||
[Input("plain_optional_number")]
|
||||
public double? Plain_optional_number { get; set; }
|
||||
|
||||
|
@ -95,8 +90,8 @@ namespace Pulumi.FooBar
|
|||
[Input("plain_required_bool", required: true)]
|
||||
public bool Plain_required_bool { get; set; }
|
||||
|
||||
[Input("plain_required_const", required: true)]
|
||||
public string Plain_required_const { get; set; } = null!;
|
||||
[Input("plain_required_enum", required: true)]
|
||||
public Pulumi.FooBar.EnumThing Plain_required_enum { get; set; }
|
||||
|
||||
[Input("plain_required_number", required: true)]
|
||||
public double Plain_required_number { get; set; }
|
||||
|
@ -116,25 +111,19 @@ namespace Pulumi.FooBar
|
|||
[Input("required_string", required: true)]
|
||||
public Input<string> Required_string { get; set; } = null!;
|
||||
|
||||
[Input("string_const")]
|
||||
public Input<string>? String_const { get; set; }
|
||||
|
||||
public ModuleResourceArgs()
|
||||
{
|
||||
Optional_bool = true;
|
||||
Optional_const = "another";
|
||||
Default_bool = true;
|
||||
Default_enum = Pulumi.FooBar.EnumThing.Four;
|
||||
Default_number = 42;
|
||||
Default_string = "buzzer";
|
||||
Optional_enum = Pulumi.FooBar.EnumThing.Eight;
|
||||
Optional_number = 42;
|
||||
Optional_string = "buzzer";
|
||||
Plain_optional_bool = true;
|
||||
Plain_optional_const = "another";
|
||||
Plain_optional_number = 42;
|
||||
Plain_optional_string = "buzzer";
|
||||
Plain_required_bool = true;
|
||||
Plain_required_const = "another";
|
||||
Plain_required_number = 42;
|
||||
Plain_required_string = "buzzer";
|
||||
Required_bool = true;
|
||||
Required_enum = Pulumi.FooBar.EnumThing.Four;
|
||||
Required_number = 42;
|
||||
Required_string = "buzzer";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,25 +22,37 @@ func NewModuleResource(ctx *pulumi.Context,
|
|||
return nil, errors.New("missing one or more required arguments")
|
||||
}
|
||||
|
||||
if args.Optional_bool == nil {
|
||||
args.Optional_bool = pulumi.BoolPtr(true)
|
||||
if args.Required_bool == nil {
|
||||
return nil, errors.New("invalid value for required argument 'Required_bool'")
|
||||
}
|
||||
if args.Required_enum == nil {
|
||||
return nil, errors.New("invalid value for required argument 'Required_enum'")
|
||||
}
|
||||
if args.Required_number == nil {
|
||||
return nil, errors.New("invalid value for required argument 'Required_number'")
|
||||
}
|
||||
if args.Required_string == nil {
|
||||
return nil, errors.New("invalid value for required argument 'Required_string'")
|
||||
}
|
||||
if args.Default_bool == nil {
|
||||
args.Default_bool = pulumi.BoolPtr(true)
|
||||
}
|
||||
if args.Default_enum == nil {
|
||||
args.Default_enum = EnumThing(4)
|
||||
}
|
||||
if args.Default_number == nil {
|
||||
args.Default_number = pulumi.Float64Ptr(42.0)
|
||||
}
|
||||
if args.Default_string == nil {
|
||||
args.Default_string = pulumi.StringPtr("buzzer")
|
||||
}
|
||||
args.Optional_const = pulumi.StringPtr("val")
|
||||
if args.Optional_enum == nil {
|
||||
args.Optional_enum = EnumThing(8)
|
||||
}
|
||||
if args.Optional_number == nil {
|
||||
args.Optional_number = pulumi.Float64Ptr(42.0)
|
||||
}
|
||||
if args.Optional_string == nil {
|
||||
args.Optional_string = pulumi.StringPtr("buzzer")
|
||||
}
|
||||
if args.Plain_optional_bool == nil {
|
||||
plain_optional_bool_ := true
|
||||
args.Plain_optional_bool = &plain_optional_bool_
|
||||
}
|
||||
plain_optional_const_ := "val"
|
||||
args.Plain_optional_const = &plain_optional_const_
|
||||
if args.Plain_optional_number == nil {
|
||||
plain_optional_number_ := 42.0
|
||||
args.Plain_optional_number = &plain_optional_number_
|
||||
|
@ -49,28 +61,7 @@ func NewModuleResource(ctx *pulumi.Context,
|
|||
plain_optional_string_ := "buzzer"
|
||||
args.Plain_optional_string = &plain_optional_string_
|
||||
}
|
||||
if args.Plain_required_bool == false {
|
||||
args.Plain_required_bool = true
|
||||
}
|
||||
args.Plain_required_const = "val"
|
||||
if args.Plain_required_number == 0.0 {
|
||||
args.Plain_required_number = 42.0
|
||||
}
|
||||
if args.Plain_required_string == "" {
|
||||
args.Plain_required_string = "buzzer"
|
||||
}
|
||||
if args.Required_bool == nil {
|
||||
args.Required_bool = pulumi.Bool(true)
|
||||
}
|
||||
if args.Required_enum == nil {
|
||||
args.Required_enum = EnumThing(4)
|
||||
}
|
||||
if args.Required_number == nil {
|
||||
args.Required_number = pulumi.Float64(42.0)
|
||||
}
|
||||
if args.Required_string == nil {
|
||||
args.Required_string = pulumi.String("buzzer")
|
||||
}
|
||||
args.String_const = pulumi.StringPtr("val")
|
||||
var resource ModuleResource
|
||||
err := ctx.RegisterResource("foobar::ModuleResource", name, args, &resource, opts...)
|
||||
if err != nil {
|
||||
|
@ -103,44 +94,44 @@ func (ModuleResourceState) ElementType() reflect.Type {
|
|||
}
|
||||
|
||||
type moduleResourceArgs struct {
|
||||
Optional_bool *bool `pulumi:"optional_bool"`
|
||||
Optional_const *string `pulumi:"optional_const"`
|
||||
Default_bool *bool `pulumi:"default_bool"`
|
||||
Default_enum *EnumThing `pulumi:"default_enum"`
|
||||
Default_number *float64 `pulumi:"default_number"`
|
||||
Default_string *string `pulumi:"default_string"`
|
||||
Optional_enum *EnumThing `pulumi:"optional_enum"`
|
||||
Optional_number *float64 `pulumi:"optional_number"`
|
||||
Optional_string *string `pulumi:"optional_string"`
|
||||
Plain_optional_bool *bool `pulumi:"plain_optional_bool"`
|
||||
Plain_optional_const *string `pulumi:"plain_optional_const"`
|
||||
Plain_optional_number *float64 `pulumi:"plain_optional_number"`
|
||||
Plain_optional_string *string `pulumi:"plain_optional_string"`
|
||||
Plain_required_bool bool `pulumi:"plain_required_bool"`
|
||||
Plain_required_const string `pulumi:"plain_required_const"`
|
||||
Plain_required_enum EnumThing `pulumi:"plain_required_enum"`
|
||||
Plain_required_number float64 `pulumi:"plain_required_number"`
|
||||
Plain_required_string string `pulumi:"plain_required_string"`
|
||||
Required_bool bool `pulumi:"required_bool"`
|
||||
Required_enum EnumThing `pulumi:"required_enum"`
|
||||
Required_number float64 `pulumi:"required_number"`
|
||||
Required_string string `pulumi:"required_string"`
|
||||
String_const *string `pulumi:"string_const"`
|
||||
}
|
||||
|
||||
// The set of arguments for constructing a ModuleResource resource.
|
||||
type ModuleResourceArgs struct {
|
||||
Optional_bool pulumi.BoolPtrInput
|
||||
Optional_const pulumi.StringPtrInput
|
||||
Default_bool pulumi.BoolPtrInput
|
||||
Default_enum EnumThingPtrInput
|
||||
Default_number pulumi.Float64PtrInput
|
||||
Default_string pulumi.StringPtrInput
|
||||
Optional_enum EnumThingPtrInput
|
||||
Optional_number pulumi.Float64PtrInput
|
||||
Optional_string pulumi.StringPtrInput
|
||||
Plain_optional_bool *bool
|
||||
Plain_optional_const *string
|
||||
Plain_optional_number *float64
|
||||
Plain_optional_string *string
|
||||
Plain_required_bool bool
|
||||
Plain_required_const string
|
||||
Plain_required_enum EnumThing
|
||||
Plain_required_number float64
|
||||
Plain_required_string string
|
||||
Required_bool pulumi.BoolInput
|
||||
Required_enum EnumThingInput
|
||||
Required_number pulumi.Float64Input
|
||||
Required_string pulumi.StringInput
|
||||
String_const pulumi.StringPtrInput
|
||||
}
|
||||
|
||||
func (ModuleResourceArgs) ElementType() reflect.Type {
|
||||
|
|
|
@ -47,8 +47,8 @@ export class ModuleResource extends pulumi.CustomResource {
|
|||
if ((!args || args.plain_required_bool === undefined) && !opts.urn) {
|
||||
throw new Error("Missing required property 'plain_required_bool'");
|
||||
}
|
||||
if ((!args || args.plain_required_const === undefined) && !opts.urn) {
|
||||
throw new Error("Missing required property 'plain_required_const'");
|
||||
if ((!args || args.plain_required_enum === undefined) && !opts.urn) {
|
||||
throw new Error("Missing required property 'plain_required_enum'");
|
||||
}
|
||||
if ((!args || args.plain_required_number === undefined) && !opts.urn) {
|
||||
throw new Error("Missing required property 'plain_required_number'");
|
||||
|
@ -68,23 +68,23 @@ export class ModuleResource extends pulumi.CustomResource {
|
|||
if ((!args || args.required_string === undefined) && !opts.urn) {
|
||||
throw new Error("Missing required property 'required_string'");
|
||||
}
|
||||
resourceInputs["optional_bool"] = (args ? args.optional_bool : undefined) ?? true;
|
||||
resourceInputs["optional_const"] = "val";
|
||||
resourceInputs["default_bool"] = (args ? args.default_bool : undefined) ?? true;
|
||||
resourceInputs["default_enum"] = (args ? args.default_enum : undefined) ?? 4;
|
||||
resourceInputs["default_number"] = (args ? args.default_number : undefined) ?? 42;
|
||||
resourceInputs["default_string"] = (args ? args.default_string : undefined) ?? "buzzer";
|
||||
resourceInputs["optional_enum"] = (args ? args.optional_enum : undefined) ?? 8;
|
||||
resourceInputs["optional_number"] = (args ? args.optional_number : undefined) ?? 42;
|
||||
resourceInputs["optional_string"] = (args ? args.optional_string : undefined) ?? "buzzer";
|
||||
resourceInputs["plain_optional_bool"] = (args ? args.plain_optional_bool : undefined) ?? true;
|
||||
resourceInputs["plain_optional_const"] = "val";
|
||||
resourceInputs["plain_optional_number"] = (args ? args.plain_optional_number : undefined) ?? 42;
|
||||
resourceInputs["plain_optional_string"] = (args ? args.plain_optional_string : undefined) ?? "buzzer";
|
||||
resourceInputs["plain_required_bool"] = (args ? args.plain_required_bool : undefined) ?? true;
|
||||
resourceInputs["plain_required_const"] = "val";
|
||||
resourceInputs["plain_required_number"] = (args ? args.plain_required_number : undefined) ?? 42;
|
||||
resourceInputs["plain_required_string"] = (args ? args.plain_required_string : undefined) ?? "buzzer";
|
||||
resourceInputs["required_bool"] = (args ? args.required_bool : undefined) ?? true;
|
||||
resourceInputs["required_enum"] = (args ? args.required_enum : undefined) ?? 4;
|
||||
resourceInputs["required_number"] = (args ? args.required_number : undefined) ?? 42;
|
||||
resourceInputs["required_string"] = (args ? args.required_string : undefined) ?? "buzzer";
|
||||
resourceInputs["plain_required_bool"] = args ? args.plain_required_bool : undefined;
|
||||
resourceInputs["plain_required_enum"] = args ? args.plain_required_enum : undefined;
|
||||
resourceInputs["plain_required_number"] = args ? args.plain_required_number : undefined;
|
||||
resourceInputs["plain_required_string"] = args ? args.plain_required_string : undefined;
|
||||
resourceInputs["required_bool"] = args ? args.required_bool : undefined;
|
||||
resourceInputs["required_enum"] = args ? args.required_enum : undefined;
|
||||
resourceInputs["required_number"] = args ? args.required_number : undefined;
|
||||
resourceInputs["required_string"] = args ? args.required_string : undefined;
|
||||
resourceInputs["string_const"] = "val";
|
||||
} else {
|
||||
}
|
||||
if (!opts.version) {
|
||||
|
@ -98,21 +98,21 @@ export class ModuleResource extends pulumi.CustomResource {
|
|||
* The set of arguments for constructing a ModuleResource resource.
|
||||
*/
|
||||
export interface ModuleResourceArgs {
|
||||
optional_bool?: pulumi.Input<boolean>;
|
||||
optional_const?: pulumi.Input<"val">;
|
||||
default_bool?: pulumi.Input<boolean>;
|
||||
default_enum?: pulumi.Input<enums.EnumThing>;
|
||||
default_number?: pulumi.Input<number>;
|
||||
default_string?: pulumi.Input<string>;
|
||||
optional_enum?: pulumi.Input<enums.EnumThing>;
|
||||
optional_number?: pulumi.Input<number>;
|
||||
optional_string?: pulumi.Input<string>;
|
||||
plain_optional_bool?: boolean;
|
||||
plain_optional_const?: "val";
|
||||
plain_optional_number?: number;
|
||||
plain_optional_string?: string;
|
||||
plain_required_bool: boolean;
|
||||
plain_required_const: "val";
|
||||
plain_required_enum: enums.EnumThing;
|
||||
plain_required_number: number;
|
||||
plain_required_string: string;
|
||||
required_bool: pulumi.Input<boolean>;
|
||||
required_enum: pulumi.Input<enums.EnumThing>;
|
||||
required_number: pulumi.Input<number>;
|
||||
required_string: pulumi.Input<string>;
|
||||
string_const?: pulumi.Input<"val">;
|
||||
}
|
||||
|
|
|
@ -15,77 +15,57 @@ __all__ = ['ModuleResourceArgs', 'ModuleResource']
|
|||
class ModuleResourceArgs:
|
||||
def __init__(__self__, *,
|
||||
plain_required_bool: bool,
|
||||
plain_required_const: str,
|
||||
plain_required_enum: 'EnumThing',
|
||||
plain_required_number: float,
|
||||
plain_required_string: str,
|
||||
required_bool: pulumi.Input[bool],
|
||||
required_enum: pulumi.Input['EnumThing'],
|
||||
required_number: pulumi.Input[float],
|
||||
required_string: pulumi.Input[str],
|
||||
optional_bool: Optional[pulumi.Input[bool]] = None,
|
||||
optional_const: Optional[pulumi.Input[str]] = None,
|
||||
default_bool: Optional[pulumi.Input[bool]] = None,
|
||||
default_enum: Optional[pulumi.Input['EnumThing']] = None,
|
||||
default_number: Optional[pulumi.Input[float]] = None,
|
||||
default_string: Optional[pulumi.Input[str]] = None,
|
||||
optional_enum: Optional[pulumi.Input['EnumThing']] = None,
|
||||
optional_number: Optional[pulumi.Input[float]] = None,
|
||||
optional_string: Optional[pulumi.Input[str]] = None,
|
||||
plain_optional_bool: Optional[bool] = None,
|
||||
plain_optional_const: Optional[str] = None,
|
||||
plain_optional_number: Optional[float] = None,
|
||||
plain_optional_string: Optional[str] = None):
|
||||
plain_optional_string: Optional[str] = None,
|
||||
string_const: Optional[pulumi.Input[str]] = None):
|
||||
"""
|
||||
The set of arguments for constructing a ModuleResource resource.
|
||||
"""
|
||||
if plain_required_bool is None:
|
||||
plain_required_bool = True
|
||||
pulumi.set(__self__, "plain_required_bool", plain_required_bool)
|
||||
if plain_required_const is None:
|
||||
plain_required_const = 'another'
|
||||
pulumi.set(__self__, "plain_required_const", 'val')
|
||||
if plain_required_number is None:
|
||||
plain_required_number = 42
|
||||
pulumi.set(__self__, "plain_required_enum", plain_required_enum)
|
||||
pulumi.set(__self__, "plain_required_number", plain_required_number)
|
||||
if plain_required_string is None:
|
||||
plain_required_string = 'buzzer'
|
||||
pulumi.set(__self__, "plain_required_string", plain_required_string)
|
||||
if required_bool is None:
|
||||
required_bool = True
|
||||
pulumi.set(__self__, "required_bool", required_bool)
|
||||
if required_enum is None:
|
||||
required_enum = 4
|
||||
pulumi.set(__self__, "required_enum", required_enum)
|
||||
if required_number is None:
|
||||
required_number = 42
|
||||
pulumi.set(__self__, "required_number", required_number)
|
||||
if required_string is None:
|
||||
required_string = 'buzzer'
|
||||
pulumi.set(__self__, "required_string", required_string)
|
||||
if optional_bool is None:
|
||||
optional_bool = True
|
||||
if optional_bool is not None:
|
||||
pulumi.set(__self__, "optional_bool", optional_bool)
|
||||
if optional_const is None:
|
||||
optional_const = 'another'
|
||||
if optional_const is not None:
|
||||
pulumi.set(__self__, "optional_const", 'val')
|
||||
if default_bool is None:
|
||||
default_bool = True
|
||||
if default_bool is not None:
|
||||
pulumi.set(__self__, "default_bool", default_bool)
|
||||
if default_enum is None:
|
||||
default_enum = 4
|
||||
if default_enum is not None:
|
||||
pulumi.set(__self__, "default_enum", default_enum)
|
||||
if default_number is None:
|
||||
default_number = 42
|
||||
if default_number is not None:
|
||||
pulumi.set(__self__, "default_number", default_number)
|
||||
if default_string is None:
|
||||
default_string = 'buzzer'
|
||||
if default_string is not None:
|
||||
pulumi.set(__self__, "default_string", default_string)
|
||||
if optional_enum is None:
|
||||
optional_enum = 8
|
||||
if optional_enum is not None:
|
||||
pulumi.set(__self__, "optional_enum", optional_enum)
|
||||
if optional_number is None:
|
||||
optional_number = 42
|
||||
if optional_number is not None:
|
||||
pulumi.set(__self__, "optional_number", optional_number)
|
||||
if optional_string is None:
|
||||
optional_string = 'buzzer'
|
||||
if optional_string is not None:
|
||||
pulumi.set(__self__, "optional_string", optional_string)
|
||||
if plain_optional_bool is None:
|
||||
plain_optional_bool = True
|
||||
if plain_optional_bool is not None:
|
||||
pulumi.set(__self__, "plain_optional_bool", plain_optional_bool)
|
||||
if plain_optional_const is None:
|
||||
plain_optional_const = 'another'
|
||||
if plain_optional_const is not None:
|
||||
pulumi.set(__self__, "plain_optional_const", 'val')
|
||||
if plain_optional_number is None:
|
||||
plain_optional_number = 42
|
||||
if plain_optional_number is not None:
|
||||
|
@ -94,6 +74,8 @@ class ModuleResourceArgs:
|
|||
plain_optional_string = 'buzzer'
|
||||
if plain_optional_string is not None:
|
||||
pulumi.set(__self__, "plain_optional_string", plain_optional_string)
|
||||
if string_const is not None:
|
||||
pulumi.set(__self__, "string_const", 'val')
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
|
@ -106,12 +88,12 @@ class ModuleResourceArgs:
|
|||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def plain_required_const(self) -> str:
|
||||
return pulumi.get(self, "plain_required_const")
|
||||
def plain_required_enum(self) -> 'EnumThing':
|
||||
return pulumi.get(self, "plain_required_enum")
|
||||
|
||||
@plain_required_const.setter
|
||||
def plain_required_const(self, value: str):
|
||||
pulumi.set(self, "plain_required_const", value)
|
||||
@plain_required_enum.setter
|
||||
def plain_required_enum(self, value: 'EnumThing'):
|
||||
pulumi.set(self, "plain_required_enum", value)
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
|
@ -169,21 +151,39 @@ class ModuleResourceArgs:
|
|||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def optional_bool(self) -> Optional[pulumi.Input[bool]]:
|
||||
return pulumi.get(self, "optional_bool")
|
||||
def default_bool(self) -> Optional[pulumi.Input[bool]]:
|
||||
return pulumi.get(self, "default_bool")
|
||||
|
||||
@optional_bool.setter
|
||||
def optional_bool(self, value: Optional[pulumi.Input[bool]]):
|
||||
pulumi.set(self, "optional_bool", value)
|
||||
@default_bool.setter
|
||||
def default_bool(self, value: Optional[pulumi.Input[bool]]):
|
||||
pulumi.set(self, "default_bool", value)
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def optional_const(self) -> Optional[pulumi.Input[str]]:
|
||||
return pulumi.get(self, "optional_const")
|
||||
def default_enum(self) -> Optional[pulumi.Input['EnumThing']]:
|
||||
return pulumi.get(self, "default_enum")
|
||||
|
||||
@optional_const.setter
|
||||
def optional_const(self, value: Optional[pulumi.Input[str]]):
|
||||
pulumi.set(self, "optional_const", value)
|
||||
@default_enum.setter
|
||||
def default_enum(self, value: Optional[pulumi.Input['EnumThing']]):
|
||||
pulumi.set(self, "default_enum", value)
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def default_number(self) -> Optional[pulumi.Input[float]]:
|
||||
return pulumi.get(self, "default_number")
|
||||
|
||||
@default_number.setter
|
||||
def default_number(self, value: Optional[pulumi.Input[float]]):
|
||||
pulumi.set(self, "default_number", value)
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def default_string(self) -> Optional[pulumi.Input[str]]:
|
||||
return pulumi.get(self, "default_string")
|
||||
|
||||
@default_string.setter
|
||||
def default_string(self, value: Optional[pulumi.Input[str]]):
|
||||
pulumi.set(self, "default_string", value)
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
|
@ -194,24 +194,6 @@ class ModuleResourceArgs:
|
|||
def optional_enum(self, value: Optional[pulumi.Input['EnumThing']]):
|
||||
pulumi.set(self, "optional_enum", value)
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def optional_number(self) -> Optional[pulumi.Input[float]]:
|
||||
return pulumi.get(self, "optional_number")
|
||||
|
||||
@optional_number.setter
|
||||
def optional_number(self, value: Optional[pulumi.Input[float]]):
|
||||
pulumi.set(self, "optional_number", value)
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def optional_string(self) -> Optional[pulumi.Input[str]]:
|
||||
return pulumi.get(self, "optional_string")
|
||||
|
||||
@optional_string.setter
|
||||
def optional_string(self, value: Optional[pulumi.Input[str]]):
|
||||
pulumi.set(self, "optional_string", value)
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def plain_optional_bool(self) -> Optional[bool]:
|
||||
|
@ -221,15 +203,6 @@ class ModuleResourceArgs:
|
|||
def plain_optional_bool(self, value: Optional[bool]):
|
||||
pulumi.set(self, "plain_optional_bool", value)
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def plain_optional_const(self) -> Optional[str]:
|
||||
return pulumi.get(self, "plain_optional_const")
|
||||
|
||||
@plain_optional_const.setter
|
||||
def plain_optional_const(self, value: Optional[str]):
|
||||
pulumi.set(self, "plain_optional_const", value)
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def plain_optional_number(self) -> Optional[float]:
|
||||
|
@ -248,29 +221,38 @@ class ModuleResourceArgs:
|
|||
def plain_optional_string(self, value: Optional[str]):
|
||||
pulumi.set(self, "plain_optional_string", value)
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def string_const(self) -> Optional[pulumi.Input[str]]:
|
||||
return pulumi.get(self, "string_const")
|
||||
|
||||
@string_const.setter
|
||||
def string_const(self, value: Optional[pulumi.Input[str]]):
|
||||
pulumi.set(self, "string_const", value)
|
||||
|
||||
|
||||
class ModuleResource(pulumi.CustomResource):
|
||||
@overload
|
||||
def __init__(__self__,
|
||||
resource_name: str,
|
||||
opts: Optional[pulumi.ResourceOptions] = None,
|
||||
optional_bool: Optional[pulumi.Input[bool]] = None,
|
||||
optional_const: Optional[pulumi.Input[str]] = None,
|
||||
default_bool: Optional[pulumi.Input[bool]] = None,
|
||||
default_enum: Optional[pulumi.Input['EnumThing']] = None,
|
||||
default_number: Optional[pulumi.Input[float]] = None,
|
||||
default_string: Optional[pulumi.Input[str]] = None,
|
||||
optional_enum: Optional[pulumi.Input['EnumThing']] = None,
|
||||
optional_number: Optional[pulumi.Input[float]] = None,
|
||||
optional_string: Optional[pulumi.Input[str]] = None,
|
||||
plain_optional_bool: Optional[bool] = None,
|
||||
plain_optional_const: Optional[str] = None,
|
||||
plain_optional_number: Optional[float] = None,
|
||||
plain_optional_string: Optional[str] = None,
|
||||
plain_required_bool: Optional[bool] = None,
|
||||
plain_required_const: Optional[str] = None,
|
||||
plain_required_enum: Optional['EnumThing'] = None,
|
||||
plain_required_number: Optional[float] = None,
|
||||
plain_required_string: Optional[str] = None,
|
||||
required_bool: Optional[pulumi.Input[bool]] = None,
|
||||
required_enum: Optional[pulumi.Input['EnumThing']] = None,
|
||||
required_number: Optional[pulumi.Input[float]] = None,
|
||||
required_string: Optional[pulumi.Input[str]] = None,
|
||||
string_const: Optional[pulumi.Input[str]] = None,
|
||||
__props__=None):
|
||||
"""
|
||||
Create a ModuleResource resource with the given unique name, props, and options.
|
||||
|
@ -300,23 +282,23 @@ class ModuleResource(pulumi.CustomResource):
|
|||
def _internal_init(__self__,
|
||||
resource_name: str,
|
||||
opts: Optional[pulumi.ResourceOptions] = None,
|
||||
optional_bool: Optional[pulumi.Input[bool]] = None,
|
||||
optional_const: Optional[pulumi.Input[str]] = None,
|
||||
default_bool: Optional[pulumi.Input[bool]] = None,
|
||||
default_enum: Optional[pulumi.Input['EnumThing']] = None,
|
||||
default_number: Optional[pulumi.Input[float]] = None,
|
||||
default_string: Optional[pulumi.Input[str]] = None,
|
||||
optional_enum: Optional[pulumi.Input['EnumThing']] = None,
|
||||
optional_number: Optional[pulumi.Input[float]] = None,
|
||||
optional_string: Optional[pulumi.Input[str]] = None,
|
||||
plain_optional_bool: Optional[bool] = None,
|
||||
plain_optional_const: Optional[str] = None,
|
||||
plain_optional_number: Optional[float] = None,
|
||||
plain_optional_string: Optional[str] = None,
|
||||
plain_required_bool: Optional[bool] = None,
|
||||
plain_required_const: Optional[str] = None,
|
||||
plain_required_enum: Optional['EnumThing'] = None,
|
||||
plain_required_number: Optional[float] = None,
|
||||
plain_required_string: Optional[str] = None,
|
||||
required_bool: Optional[pulumi.Input[bool]] = None,
|
||||
required_enum: Optional[pulumi.Input['EnumThing']] = None,
|
||||
required_number: Optional[pulumi.Input[float]] = None,
|
||||
required_string: Optional[pulumi.Input[str]] = None,
|
||||
string_const: Optional[pulumi.Input[str]] = None,
|
||||
__props__=None):
|
||||
if opts is None:
|
||||
opts = pulumi.ResourceOptions()
|
||||
|
@ -329,73 +311,55 @@ class ModuleResource(pulumi.CustomResource):
|
|||
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
|
||||
__props__ = ModuleResourceArgs.__new__(ModuleResourceArgs)
|
||||
|
||||
if optional_bool is None:
|
||||
optional_bool = True
|
||||
__props__.__dict__["optional_bool"] = optional_bool
|
||||
if optional_const is None:
|
||||
optional_const = 'another'
|
||||
__props__.__dict__["optional_const"] = 'val'
|
||||
if default_bool is None:
|
||||
default_bool = True
|
||||
__props__.__dict__["default_bool"] = default_bool
|
||||
if default_enum is None:
|
||||
default_enum = 4
|
||||
__props__.__dict__["default_enum"] = default_enum
|
||||
if default_number is None:
|
||||
default_number = 42
|
||||
__props__.__dict__["default_number"] = default_number
|
||||
if default_string is None:
|
||||
default_string = 'buzzer'
|
||||
__props__.__dict__["default_string"] = default_string
|
||||
if optional_enum is None:
|
||||
optional_enum = 8
|
||||
__props__.__dict__["optional_enum"] = optional_enum
|
||||
if optional_number is None:
|
||||
optional_number = 42
|
||||
__props__.__dict__["optional_number"] = optional_number
|
||||
if optional_string is None:
|
||||
optional_string = 'buzzer'
|
||||
__props__.__dict__["optional_string"] = optional_string
|
||||
if plain_optional_bool is None:
|
||||
plain_optional_bool = True
|
||||
__props__.__dict__["plain_optional_bool"] = plain_optional_bool
|
||||
if plain_optional_const is None:
|
||||
plain_optional_const = 'another'
|
||||
__props__.__dict__["plain_optional_const"] = 'val'
|
||||
if plain_optional_number is None:
|
||||
plain_optional_number = 42
|
||||
__props__.__dict__["plain_optional_number"] = plain_optional_number
|
||||
if plain_optional_string is None:
|
||||
plain_optional_string = 'buzzer'
|
||||
__props__.__dict__["plain_optional_string"] = plain_optional_string
|
||||
if plain_required_bool is None:
|
||||
plain_required_bool = True
|
||||
if plain_required_bool is None and not opts.urn:
|
||||
raise TypeError("Missing required property 'plain_required_bool'")
|
||||
__props__.__dict__["plain_required_bool"] = plain_required_bool
|
||||
if plain_required_const is None:
|
||||
plain_required_const = 'another'
|
||||
if plain_required_const is None and not opts.urn:
|
||||
raise TypeError("Missing required property 'plain_required_const'")
|
||||
__props__.__dict__["plain_required_const"] = 'val'
|
||||
if plain_required_number is None:
|
||||
plain_required_number = 42
|
||||
if plain_required_enum is None and not opts.urn:
|
||||
raise TypeError("Missing required property 'plain_required_enum'")
|
||||
__props__.__dict__["plain_required_enum"] = plain_required_enum
|
||||
if plain_required_number is None and not opts.urn:
|
||||
raise TypeError("Missing required property 'plain_required_number'")
|
||||
__props__.__dict__["plain_required_number"] = plain_required_number
|
||||
if plain_required_string is None:
|
||||
plain_required_string = 'buzzer'
|
||||
if plain_required_string is None and not opts.urn:
|
||||
raise TypeError("Missing required property 'plain_required_string'")
|
||||
__props__.__dict__["plain_required_string"] = plain_required_string
|
||||
if required_bool is None:
|
||||
required_bool = True
|
||||
if required_bool is None and not opts.urn:
|
||||
raise TypeError("Missing required property 'required_bool'")
|
||||
__props__.__dict__["required_bool"] = required_bool
|
||||
if required_enum is None:
|
||||
required_enum = 4
|
||||
if required_enum is None and not opts.urn:
|
||||
raise TypeError("Missing required property 'required_enum'")
|
||||
__props__.__dict__["required_enum"] = required_enum
|
||||
if required_number is None:
|
||||
required_number = 42
|
||||
if required_number is None and not opts.urn:
|
||||
raise TypeError("Missing required property 'required_number'")
|
||||
__props__.__dict__["required_number"] = required_number
|
||||
if required_string is None:
|
||||
required_string = 'buzzer'
|
||||
if required_string is None and not opts.urn:
|
||||
raise TypeError("Missing required property 'required_string'")
|
||||
__props__.__dict__["required_string"] = required_string
|
||||
__props__.__dict__["string_const"] = 'val'
|
||||
super(ModuleResource, __self__).__init__(
|
||||
'foobar::ModuleResource',
|
||||
resource_name,
|
||||
|
|
|
@ -4,12 +4,6 @@
|
|||
"resources": {
|
||||
"foobar::ModuleResource": {
|
||||
"inputProperties": {
|
||||
"plain_optional_const": {
|
||||
"type": "string",
|
||||
"const": "val",
|
||||
"default": "another",
|
||||
"plain": true
|
||||
},
|
||||
"plain_optional_string": {
|
||||
"type": "string",
|
||||
"default": "buzzer",
|
||||
|
@ -27,59 +21,53 @@
|
|||
},
|
||||
"plain_required_string": {
|
||||
"type": "string",
|
||||
"default": "buzzer",
|
||||
"plain": true
|
||||
},
|
||||
"plain_required_bool": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"plain": true
|
||||
},
|
||||
"plain_required_number": {
|
||||
"type": "number",
|
||||
"default": 42,
|
||||
"plain": true
|
||||
},
|
||||
"optional_const": {
|
||||
"string_const": {
|
||||
"type": "string",
|
||||
"const": "val",
|
||||
"default": "another"
|
||||
},
|
||||
"optional_string": {
|
||||
"type": "string",
|
||||
"default": "buzzer"
|
||||
},
|
||||
"optional_bool": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"optional_number": {
|
||||
"type": "number",
|
||||
"default": 42
|
||||
"const": "val"
|
||||
},
|
||||
"optional_enum": {
|
||||
"$ref": "#/types/foobar::EnumThing",
|
||||
"default": 8
|
||||
},
|
||||
"plain_required_const": {
|
||||
"type": "string",
|
||||
"const": "val",
|
||||
"default": "another",
|
||||
"required_string": {
|
||||
"type": "string"
|
||||
},
|
||||
"required_bool": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"required_number": {
|
||||
"type": "number"
|
||||
},
|
||||
"plain_required_enum": {
|
||||
"$ref": "#/types/foobar::EnumThing",
|
||||
"plain": true
|
||||
},
|
||||
"required_string": {
|
||||
"required_enum": {
|
||||
"$ref": "#/types/foobar::EnumThing"
|
||||
},
|
||||
"default_string": {
|
||||
"type": "string",
|
||||
"default": "buzzer"
|
||||
},
|
||||
"required_bool": {
|
||||
"default_bool": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"required_number": {
|
||||
"default_number": {
|
||||
"type": "number",
|
||||
"default": 42
|
||||
},
|
||||
"required_enum": {
|
||||
"default_enum": {
|
||||
"$ref": "#/types/foobar::EnumThing",
|
||||
"default": 4
|
||||
}
|
||||
|
@ -88,7 +76,7 @@
|
|||
"plain_required_string",
|
||||
"plain_required_bool",
|
||||
"plain_required_number",
|
||||
"plain_required_const",
|
||||
"plain_required_enum",
|
||||
"required_string",
|
||||
"required_bool",
|
||||
"required_number",
|
||||
|
|
|
@ -161,14 +161,6 @@ The RubberTree resource accepts the following [input]({{< relref "/docs/intro/co
|
|||
{{% choosable language csharp %}}
|
||||
<dl class="resources-properties"><dt class="property-required"
|
||||
title="Required">
|
||||
<span id="diameter_csharp">
|
||||
<a href="#diameter_csharp" style="color: inherit; text-decoration: inherit;">Diameter</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#diameter">Pulumi.<wbr>Plant.<wbr>Tree.<wbr>V1.<wbr>Diameter</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-required"
|
||||
title="Required">
|
||||
<span id="type_csharp">
|
||||
<a href="#type_csharp" style="color: inherit; text-decoration: inherit;">Type</a>
|
||||
</span>
|
||||
|
@ -183,6 +175,14 @@ The RubberTree resource accepts the following [input]({{< relref "/docs/intro/co
|
|||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#container">Pulumi.<wbr>Plant.<wbr>Inputs.<wbr>Container<wbr>Args</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="diameter_csharp">
|
||||
<a href="#diameter_csharp" style="color: inherit; text-decoration: inherit;">Diameter</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#diameter">Pulumi.<wbr>Plant.<wbr>Tree.<wbr>V1.<wbr>Diameter</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="farm_csharp">
|
||||
|
@ -205,14 +205,6 @@ The RubberTree resource accepts the following [input]({{< relref "/docs/intro/co
|
|||
{{% choosable language go %}}
|
||||
<dl class="resources-properties"><dt class="property-required"
|
||||
title="Required">
|
||||
<span id="diameter_go">
|
||||
<a href="#diameter_go" style="color: inherit; text-decoration: inherit;">Diameter</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#diameter">Diameter</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-required"
|
||||
title="Required">
|
||||
<span id="type_go">
|
||||
<a href="#type_go" style="color: inherit; text-decoration: inherit;">Type</a>
|
||||
</span>
|
||||
|
@ -227,6 +219,14 @@ The RubberTree resource accepts the following [input]({{< relref "/docs/intro/co
|
|||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#container">Container<wbr>Args</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="diameter_go">
|
||||
<a href="#diameter_go" style="color: inherit; text-decoration: inherit;">Diameter</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#diameter">Diameter</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="farm_go">
|
||||
|
@ -249,14 +249,6 @@ The RubberTree resource accepts the following [input]({{< relref "/docs/intro/co
|
|||
{{% choosable language nodejs %}}
|
||||
<dl class="resources-properties"><dt class="property-required"
|
||||
title="Required">
|
||||
<span id="diameter_nodejs">
|
||||
<a href="#diameter_nodejs" style="color: inherit; text-decoration: inherit;">diameter</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#diameter">Diameter</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-required"
|
||||
title="Required">
|
||||
<span id="type_nodejs">
|
||||
<a href="#type_nodejs" style="color: inherit; text-decoration: inherit;">type</a>
|
||||
</span>
|
||||
|
@ -271,6 +263,14 @@ The RubberTree resource accepts the following [input]({{< relref "/docs/intro/co
|
|||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#container">Container<wbr>Args</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="diameter_nodejs">
|
||||
<a href="#diameter_nodejs" style="color: inherit; text-decoration: inherit;">diameter</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#diameter">Diameter</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="farm_nodejs">
|
||||
|
@ -293,14 +293,6 @@ The RubberTree resource accepts the following [input]({{< relref "/docs/intro/co
|
|||
{{% choosable language python %}}
|
||||
<dl class="resources-properties"><dt class="property-required"
|
||||
title="Required">
|
||||
<span id="diameter_python">
|
||||
<a href="#diameter_python" style="color: inherit; text-decoration: inherit;">diameter</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#diameter">Diameter</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-required"
|
||||
title="Required">
|
||||
<span id="type_python">
|
||||
<a href="#type_python" style="color: inherit; text-decoration: inherit;">type</a>
|
||||
</span>
|
||||
|
@ -315,6 +307,14 @@ The RubberTree resource accepts the following [input]({{< relref "/docs/intro/co
|
|||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#container">Container<wbr>Args</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="diameter_python">
|
||||
<a href="#diameter_python" style="color: inherit; text-decoration: inherit;">diameter</a>
|
||||
</span>
|
||||
<span class="property-indicator"></span>
|
||||
<span class="property-type"><a href="#diameter">Diameter</a></span>
|
||||
</dt>
|
||||
<dd>{{% md %}}{{% /md %}}</dd><dt class="property-optional"
|
||||
title="Optional">
|
||||
<span id="farm_python">
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace Pulumi.Plant.Tree.V1
|
|||
public Output<Pulumi.Plant.Outputs.Container?> Container { get; private set; } = null!;
|
||||
|
||||
[Output("diameter")]
|
||||
public Output<Pulumi.Plant.Tree.V1.Diameter> Diameter { get; private set; } = null!;
|
||||
public Output<Pulumi.Plant.Tree.V1.Diameter?> Diameter { get; private set; } = null!;
|
||||
|
||||
[Output("farm")]
|
||||
public Output<string?> Farm { get; private set; } = null!;
|
||||
|
@ -76,8 +76,8 @@ namespace Pulumi.Plant.Tree.V1
|
|||
[Input("container")]
|
||||
public Input<Pulumi.Plant.Inputs.ContainerArgs>? Container { get; set; }
|
||||
|
||||
[Input("diameter", required: true)]
|
||||
public Input<Pulumi.Plant.Tree.V1.Diameter> Diameter { get; set; } = null!;
|
||||
[Input("diameter")]
|
||||
public Input<Pulumi.Plant.Tree.V1.Diameter>? Diameter { get; set; }
|
||||
|
||||
[Input("farm")]
|
||||
public InputUnion<Pulumi.Plant.Tree.V1.Farm, string>? Farm { get; set; }
|
||||
|
@ -93,7 +93,6 @@ namespace Pulumi.Plant.Tree.V1
|
|||
Diameter = Pulumi.Plant.Tree.V1.Diameter.Sixinch;
|
||||
Farm = "(unknown)";
|
||||
Size = Pulumi.Plant.Tree.V1.TreeSize.Medium;
|
||||
Type = Pulumi.Plant.Tree.V1.RubberTreeVariety.Burgundy;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ type RubberTree struct {
|
|||
pulumi.CustomResourceState
|
||||
|
||||
Container plant.ContainerPtrOutput `pulumi:"container"`
|
||||
Diameter DiameterOutput `pulumi:"diameter"`
|
||||
Diameter DiameterPtrOutput `pulumi:"diameter"`
|
||||
Farm pulumi.StringPtrOutput `pulumi:"farm"`
|
||||
Size TreeSizePtrOutput `pulumi:"size"`
|
||||
Type RubberTreeVarietyOutput `pulumi:"type"`
|
||||
|
@ -29,6 +29,9 @@ func NewRubberTree(ctx *pulumi.Context,
|
|||
return nil, errors.New("missing one or more required arguments")
|
||||
}
|
||||
|
||||
if args.Type == nil {
|
||||
return nil, errors.New("invalid value for required argument 'Type'")
|
||||
}
|
||||
if args.Diameter == nil {
|
||||
args.Diameter = Diameter(6.0)
|
||||
}
|
||||
|
@ -38,9 +41,6 @@ func NewRubberTree(ctx *pulumi.Context,
|
|||
if args.Size == nil {
|
||||
args.Size = TreeSize("medium")
|
||||
}
|
||||
if args.Type == nil {
|
||||
args.Type = RubberTreeVariety("Burgundy")
|
||||
}
|
||||
var resource RubberTree
|
||||
err := ctx.RegisterResource("plant:tree/v1:RubberTree", name, args, &resource, opts...)
|
||||
if err != nil {
|
||||
|
@ -76,7 +76,7 @@ func (RubberTreeState) ElementType() reflect.Type {
|
|||
|
||||
type rubberTreeArgs struct {
|
||||
Container *plant.Container `pulumi:"container"`
|
||||
Diameter Diameter `pulumi:"diameter"`
|
||||
Diameter *Diameter `pulumi:"diameter"`
|
||||
Farm *string `pulumi:"farm"`
|
||||
Size *TreeSize `pulumi:"size"`
|
||||
Type RubberTreeVariety `pulumi:"type"`
|
||||
|
@ -85,7 +85,7 @@ type rubberTreeArgs struct {
|
|||
// The set of arguments for constructing a RubberTree resource.
|
||||
type RubberTreeArgs struct {
|
||||
Container plant.ContainerPtrInput
|
||||
Diameter DiameterInput
|
||||
Diameter DiameterPtrInput
|
||||
Farm pulumi.StringPtrInput
|
||||
Size TreeSizePtrInput
|
||||
Type RubberTreeVarietyInput
|
||||
|
|
|
@ -34,7 +34,7 @@ export class RubberTree extends pulumi.CustomResource {
|
|||
}
|
||||
|
||||
public readonly container!: pulumi.Output<outputs.Container | undefined>;
|
||||
public readonly diameter!: pulumi.Output<enums.tree.v1.Diameter>;
|
||||
public readonly diameter!: pulumi.Output<enums.tree.v1.Diameter | undefined>;
|
||||
public readonly farm!: pulumi.Output<enums.tree.v1.Farm | string | undefined>;
|
||||
public readonly size!: pulumi.Output<enums.tree.v1.TreeSize | undefined>;
|
||||
public readonly type!: pulumi.Output<enums.tree.v1.RubberTreeVariety>;
|
||||
|
@ -55,9 +55,6 @@ export class RubberTree extends pulumi.CustomResource {
|
|||
resourceInputs["farm"] = state ? state.farm : undefined;
|
||||
} else {
|
||||
const args = argsOrState as RubberTreeArgs | undefined;
|
||||
if ((!args || args.diameter === undefined) && !opts.urn) {
|
||||
throw new Error("Missing required property 'diameter'");
|
||||
}
|
||||
if ((!args || args.type === undefined) && !opts.urn) {
|
||||
throw new Error("Missing required property 'type'");
|
||||
}
|
||||
|
@ -65,7 +62,7 @@ export class RubberTree extends pulumi.CustomResource {
|
|||
resourceInputs["diameter"] = (args ? args.diameter : undefined) ?? 6;
|
||||
resourceInputs["farm"] = (args ? args.farm : undefined) ?? "(unknown)";
|
||||
resourceInputs["size"] = (args ? args.size : undefined) ?? "medium";
|
||||
resourceInputs["type"] = (args ? args.type : undefined) ?? "Burgundy";
|
||||
resourceInputs["type"] = args ? args.type : undefined;
|
||||
}
|
||||
if (!opts.version) {
|
||||
opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()});
|
||||
|
@ -83,7 +80,7 @@ export interface RubberTreeState {
|
|||
*/
|
||||
export interface RubberTreeArgs {
|
||||
container?: pulumi.Input<inputs.ContainerArgs>;
|
||||
diameter: pulumi.Input<enums.tree.v1.Diameter>;
|
||||
diameter?: pulumi.Input<enums.tree.v1.Diameter>;
|
||||
farm?: pulumi.Input<enums.tree.v1.Farm | string>;
|
||||
size?: pulumi.Input<enums.tree.v1.TreeSize>;
|
||||
type: pulumi.Input<enums.tree.v1.RubberTreeVariety>;
|
||||
|
|
|
@ -17,22 +17,21 @@ __all__ = ['RubberTreeArgs', 'RubberTree']
|
|||
@pulumi.input_type
|
||||
class RubberTreeArgs:
|
||||
def __init__(__self__, *,
|
||||
diameter: pulumi.Input['Diameter'],
|
||||
type: pulumi.Input['RubberTreeVariety'],
|
||||
container: Optional[pulumi.Input['_root_inputs.ContainerArgs']] = None,
|
||||
diameter: Optional[pulumi.Input['Diameter']] = None,
|
||||
farm: Optional[pulumi.Input[Union['Farm', str]]] = None,
|
||||
size: Optional[pulumi.Input['TreeSize']] = None):
|
||||
"""
|
||||
The set of arguments for constructing a RubberTree resource.
|
||||
"""
|
||||
if diameter is None:
|
||||
diameter = 6
|
||||
pulumi.set(__self__, "diameter", diameter)
|
||||
if type is None:
|
||||
type = 'Burgundy'
|
||||
pulumi.set(__self__, "type", type)
|
||||
if container is not None:
|
||||
pulumi.set(__self__, "container", container)
|
||||
if diameter is None:
|
||||
diameter = 6
|
||||
if diameter is not None:
|
||||
pulumi.set(__self__, "diameter", diameter)
|
||||
if farm is None:
|
||||
farm = '(unknown)'
|
||||
if farm is not None:
|
||||
|
@ -42,15 +41,6 @@ class RubberTreeArgs:
|
|||
if size is not None:
|
||||
pulumi.set(__self__, "size", size)
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def diameter(self) -> pulumi.Input['Diameter']:
|
||||
return pulumi.get(self, "diameter")
|
||||
|
||||
@diameter.setter
|
||||
def diameter(self, value: pulumi.Input['Diameter']):
|
||||
pulumi.set(self, "diameter", value)
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def type(self) -> pulumi.Input['RubberTreeVariety']:
|
||||
|
@ -69,6 +59,15 @@ class RubberTreeArgs:
|
|||
def container(self, value: Optional[pulumi.Input['_root_inputs.ContainerArgs']]):
|
||||
pulumi.set(self, "container", value)
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def diameter(self) -> Optional[pulumi.Input['Diameter']]:
|
||||
return pulumi.get(self, "diameter")
|
||||
|
||||
@diameter.setter
|
||||
def diameter(self, value: Optional[pulumi.Input['Diameter']]):
|
||||
pulumi.set(self, "diameter", value)
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def farm(self) -> Optional[pulumi.Input[Union['Farm', str]]]:
|
||||
|
@ -169,8 +168,6 @@ class RubberTree(pulumi.CustomResource):
|
|||
__props__.__dict__["container"] = container
|
||||
if diameter is None:
|
||||
diameter = 6
|
||||
if diameter is None and not opts.urn:
|
||||
raise TypeError("Missing required property 'diameter'")
|
||||
__props__.__dict__["diameter"] = diameter
|
||||
if farm is None:
|
||||
farm = '(unknown)'
|
||||
|
@ -178,8 +175,6 @@ class RubberTree(pulumi.CustomResource):
|
|||
if size is None:
|
||||
size = 'medium'
|
||||
__props__.__dict__["size"] = size
|
||||
if type is None:
|
||||
type = 'Burgundy'
|
||||
if type is None and not opts.urn:
|
||||
raise TypeError("Missing required property 'type'")
|
||||
__props__.__dict__["type"] = type
|
||||
|
@ -220,7 +215,7 @@ class RubberTree(pulumi.CustomResource):
|
|||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def diameter(self) -> pulumi.Output['Diameter']:
|
||||
def diameter(self) -> pulumi.Output[Optional['Diameter']]:
|
||||
return pulumi.get(self, "diameter")
|
||||
|
||||
@property
|
||||
|
|
|
@ -27,8 +27,7 @@
|
|||
"$ref": "#/types/plant::Container"
|
||||
},
|
||||
"type": {
|
||||
"$ref": "#/types/plant:tree/v1:RubberTreeVariety",
|
||||
"default": "Burgundy"
|
||||
"$ref": "#/types/plant:tree/v1:RubberTreeVariety"
|
||||
},
|
||||
"farm": {
|
||||
"oneOf": [
|
||||
|
@ -79,8 +78,8 @@
|
|||
"default": 6
|
||||
}
|
||||
},
|
||||
"required": ["type", "diameter"],
|
||||
"requiredInputs": ["type", "diameter"]
|
||||
"required": ["type"],
|
||||
"requiredInputs": ["type"]
|
||||
}
|
||||
},
|
||||
"types": {
|
||||
|
|
|
@ -2253,10 +2253,11 @@ func bindDefaultValue(path string, value interface{}, spec *DefaultSpec, typ Typ
|
|||
return dv, diags
|
||||
}
|
||||
|
||||
// bindProperties binds the map of property specs and list of required properties into a sorted list of properties and
|
||||
// a lookup table.
|
||||
func (t *types) bindProperties(path string, properties map[string]PropertySpec, requiredPath string, required []string,
|
||||
inputShape bool) ([]*Property, map[string]*Property, hcl.Diagnostics, error) {
|
||||
// bindProperties binds the map of property specs and list of required properties into a sorted list
|
||||
// of properties and a lookup table.
|
||||
func (t *types) bindProperties(rootPath string, properties map[string]PropertySpec,
|
||||
requiredPath string, required []string, inputShape bool) (
|
||||
[]*Property, map[string]*Property, hcl.Diagnostics, error) {
|
||||
|
||||
var diags hcl.Diagnostics
|
||||
|
||||
|
@ -2264,7 +2265,7 @@ func (t *types) bindProperties(path string, properties map[string]PropertySpec,
|
|||
propertyMap := map[string]*Property{}
|
||||
var result []*Property
|
||||
for name, spec := range properties {
|
||||
propertyPath := path + "/" + name
|
||||
propertyPath := rootPath + "/" + name
|
||||
|
||||
typ, typDiags, err := t.bindType(propertyPath, spec.TypeSpec, inputShape)
|
||||
diags = diags.Extend(typDiags)
|
||||
|
@ -2310,6 +2311,23 @@ func (t *types) bindProperties(path string, properties map[string]PropertySpec,
|
|||
}
|
||||
}
|
||||
|
||||
for name, prop := range propertyMap {
|
||||
_, optional := prop.Type.(*OptionalType)
|
||||
error := func(message string) {
|
||||
diags = diags.Append(errorf(path.Join(rootPath, name), "Cannot combine flags "+message+
|
||||
" for the same property. Only one of these flags may be set at a time"))
|
||||
}
|
||||
if !optional && prop.ConstValue != nil && prop.DefaultValue != nil {
|
||||
error("'required', 'const' and 'default'")
|
||||
} else if !optional && prop.ConstValue != nil {
|
||||
error("'required' and 'const'")
|
||||
} else if !optional && prop.DefaultValue != nil {
|
||||
error("'required' and 'default'")
|
||||
} else if prop.DefaultValue != nil && prop.ConstValue != nil {
|
||||
error("'default' and 'const'")
|
||||
}
|
||||
}
|
||||
|
||||
sort.Slice(result, func(i, j int) bool {
|
||||
return result[i].Name < result[j].Name
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue