Skip to content

Commit

Permalink
make build_sdks
Browse files Browse the repository at this point in the history
  • Loading branch information
ringods committed Aug 19, 2024
1 parent 1804fd1 commit 7db10d9
Show file tree
Hide file tree
Showing 11 changed files with 169 additions and 77 deletions.
6 changes: 6 additions & 0 deletions sdk/dotnet/Inputs/PermissionGroupEnvironmentAccessArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@ namespace Pulumiverse.Configcat.Inputs

public sealed class PermissionGroupEnvironmentAccessArgs : global::Pulumi.ResourceArgs
{
/// <summary>
/// Represent the environment specific Feature Management permission. Possible values: full, readOnly, none. Default: none.
/// </summary>
[Input("environmentAccesstype")]
public Input<string>? EnvironmentAccesstype { get; set; }

/// <summary>
/// The unique [Environment](https://configcat.com/docs/main-concepts/#environment) ID.
/// </summary>
[Input("environmentId", required: true)]
public Input<string> EnvironmentId { get; set; } = null!;

Expand Down
6 changes: 6 additions & 0 deletions sdk/dotnet/Inputs/PermissionGroupEnvironmentAccessGetArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@ namespace Pulumiverse.Configcat.Inputs

public sealed class PermissionGroupEnvironmentAccessGetArgs : global::Pulumi.ResourceArgs
{
/// <summary>
/// Represent the environment specific Feature Management permission. Possible values: full, readOnly, none. Default: none.
/// </summary>
[Input("environmentAccesstype")]
public Input<string>? EnvironmentAccesstype { get; set; }

/// <summary>
/// The unique [Environment](https://configcat.com/docs/main-concepts/#environment) ID.
/// </summary>
[Input("environmentId", required: true)]
public Input<string> EnvironmentId { get; set; } = null!;

Expand Down
6 changes: 6 additions & 0 deletions sdk/dotnet/Outputs/PermissionGroupEnvironmentAccess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ namespace Pulumiverse.Configcat.Outputs
[OutputType]
public sealed class PermissionGroupEnvironmentAccess
{
/// <summary>
/// Represent the environment specific Feature Management permission. Possible values: full, readOnly, none. Default: none.
/// </summary>
public readonly string? EnvironmentAccesstype;
/// <summary>
/// The unique [Environment](https://configcat.com/docs/main-concepts/#environment) ID.
/// </summary>
public readonly string EnvironmentId;

[OutputConstructor]
Expand Down
10 changes: 8 additions & 2 deletions sdk/go/configcat/pulumiTypes.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions sdk/nodejs/types/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ import * as inputs from "../types/input";
import * as outputs from "../types/output";

export interface PermissionGroupEnvironmentAccess {
/**
* Represent the environment specific Feature Management permission. Possible values: full, readOnly, none. Default: none.
*/
environmentAccesstype?: pulumi.Input<string>;
/**
* The unique [Environment](https://configcat.com/docs/main-concepts/#environment) ID.
*/
environmentId: pulumi.Input<string>;
}

Expand Down
6 changes: 6 additions & 0 deletions sdk/nodejs/types/output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,13 @@ export interface GetTagsTag {
}

export interface PermissionGroupEnvironmentAccess {
/**
* Represent the environment specific Feature Management permission. Possible values: full, readOnly, none. Default: none.
*/
environmentAccesstype?: string;
/**
* The unique [Environment](https://configcat.com/docs/main-concepts/#environment) ID.
*/
environmentId: string;
}

Expand Down
10 changes: 10 additions & 0 deletions sdk/python/pulumiverse_configcat/_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,20 @@ class PermissionGroupEnvironmentAccessArgs:
def __init__(__self__, *,
environment_id: pulumi.Input[str],
environment_accesstype: Optional[pulumi.Input[str]] = None):
"""
:param pulumi.Input[str] environment_id: The unique [Environment](https://configcat.com/docs/main-concepts/#environment) ID.
:param pulumi.Input[str] environment_accesstype: Represent the environment specific Feature Management permission. Possible values: full, readOnly, none. Default: none.
"""
pulumi.set(__self__, "environment_id", environment_id)
if environment_accesstype is not None:
pulumi.set(__self__, "environment_accesstype", environment_accesstype)

@property
@pulumi.getter(name="environmentId")
def environment_id(self) -> pulumi.Input[str]:
"""
The unique [Environment](https://configcat.com/docs/main-concepts/#environment) ID.
"""
return pulumi.get(self, "environment_id")

@environment_id.setter
Expand All @@ -36,6 +43,9 @@ def environment_id(self, value: pulumi.Input[str]):
@property
@pulumi.getter(name="environmentAccesstype")
def environment_accesstype(self) -> Optional[pulumi.Input[str]]:
"""
Represent the environment specific Feature Management permission. Possible values: full, readOnly, none. Default: none.
"""
return pulumi.get(self, "environment_accesstype")

@environment_accesstype.setter
Expand Down
44 changes: 40 additions & 4 deletions sdk/python/pulumiverse_configcat/_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,27 @@


import asyncio
import functools
import importlib.metadata
import importlib.util
import inspect
import json
import os
import sys
import typing
import warnings
import base64

import pulumi
import pulumi.runtime
from pulumi.runtime.sync_await import _sync_await
from pulumi.runtime.proto import resource_pb2

from semver import VersionInfo as SemverVersion
from parver import Version as PEP440Version

C = typing.TypeVar("C", bound=typing.Callable)


def get_env(*args):
for v in args:
Expand Down Expand Up @@ -96,10 +102,6 @@ def _get_semver_version():
_version = _get_semver_version()
_version_str = str(_version)


def get_version():
return _version_str

def get_resource_opts_defaults() -> pulumi.ResourceOptions:
return pulumi.ResourceOptions(
version=get_version(),
Expand Down Expand Up @@ -287,5 +289,39 @@ async def _await_output(o: pulumi.Output[typing.Any]) -> typing.Tuple[object, bo
await o._resources,
)


# This is included to provide an upgrade path for users who are using a version
# of the Pulumi SDK (<3.121.0) that does not include the `deprecated` decorator.
def deprecated(message: str) -> typing.Callable[[C], C]:
"""
Decorator to indicate a function is deprecated.
As well as inserting appropriate statements to indicate that the function is
deprecated, this decorator also tags the function with a special attribute
so that Pulumi code can detect that it is deprecated and react appropriately
in certain situations.
message is the deprecation message that should be printed if the function is called.
"""

def decorator(fn: C) -> C:
if not callable(fn):
raise TypeError("Expected fn to be callable")

@functools.wraps(fn)
def deprecated_fn(*args, **kwargs):
warnings.warn(message)
pulumi.warn(f"{fn.__name__} is deprecated: {message}")

return fn(*args, **kwargs)

deprecated_fn.__dict__["_pulumi_deprecated_callable"] = fn
return typing.cast(C, deprecated_fn)

return decorator

def get_plugin_download_url():
return "api://github.com/pulumiverse"

def get_version():
return _version_str
10 changes: 10 additions & 0 deletions sdk/python/pulumiverse_configcat/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,28 @@ def get(self, key: str, default = None) -> Any:
def __init__(__self__, *,
environment_id: str,
environment_accesstype: Optional[str] = None):
"""
:param str environment_id: The unique [Environment](https://configcat.com/docs/main-concepts/#environment) ID.
:param str environment_accesstype: Represent the environment specific Feature Management permission. Possible values: full, readOnly, none. Default: none.
"""
pulumi.set(__self__, "environment_id", environment_id)
if environment_accesstype is not None:
pulumi.set(__self__, "environment_accesstype", environment_accesstype)

@property
@pulumi.getter(name="environmentId")
def environment_id(self) -> str:
"""
The unique [Environment](https://configcat.com/docs/main-concepts/#environment) ID.
"""
return pulumi.get(self, "environment_id")

@property
@pulumi.getter(name="environmentAccesstype")
def environment_accesstype(self) -> Optional[str]:
"""
Represent the environment specific Feature Management permission. Possible values: full, readOnly, none. Default: none.
"""
return pulumi.get(self, "environment_accesstype")


Expand Down
42 changes: 21 additions & 21 deletions sdk/python/pulumiverse_configcat/permission_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ def __init__(__self__,
can_view_product_auditlog: Optional[pulumi.Input[bool]] = None,
can_view_product_statistics: Optional[pulumi.Input[bool]] = None,
can_view_sdkkey: Optional[pulumi.Input[bool]] = None,
environment_accesses: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PermissionGroupEnvironmentAccessArgs']]]]] = None,
environment_accesses: Optional[pulumi.Input[Sequence[pulumi.Input[Union['PermissionGroupEnvironmentAccessArgs', 'PermissionGroupEnvironmentAccessArgsDict']]]]] = None,
name: Optional[pulumi.Input[str]] = None,
new_environment_accesstype: Optional[pulumi.Input[str]] = None,
product_id: Optional[pulumi.Input[str]] = None,
Expand Down Expand Up @@ -896,14 +896,14 @@ def __init__(__self__,
product_id=my_products.products[0].product_id,
accesstype="custom",
environment_accesses=[
configcat.PermissionGroupEnvironmentAccessArgs(
environment_id=my_test_environments.environments[0].environment_id,
environment_accesstype="full",
),
configcat.PermissionGroupEnvironmentAccessArgs(
environment_id=my_production_environments.environments[0].environment_id,
environment_accesstype="none",
),
{
"environment_id": my_test_environments.environments[0].environment_id,
"environment_accesstype": "full",
},
{
"environment_id": my_production_environments.environments[0].environment_id,
"environment_accesstype": "none",
},
])
pulumi.export("permissionGroupId", my_permission_group.id)
```
Expand Down Expand Up @@ -945,7 +945,7 @@ def __init__(__self__,
:param pulumi.Input[bool] can_view_product_auditlog: Group members has access to audit logs. Default: false.
:param pulumi.Input[bool] can_view_product_statistics: Group members has access to product statistics. Default: false.
:param pulumi.Input[bool] can_view_sdkkey: Group members has access to SDK keys. Default: false.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PermissionGroupEnvironmentAccessArgs']]]] environment_accesses: The environment specific permissions list block defined as below.
:param pulumi.Input[Sequence[pulumi.Input[Union['PermissionGroupEnvironmentAccessArgs', 'PermissionGroupEnvironmentAccessArgsDict']]]] environment_accesses: The environment specific permissions list block defined as below.
:param pulumi.Input[str] name: The name of the Permission Group.
:param pulumi.Input[str] new_environment_accesstype: Represent the environment specific Feature Management permission for new Environments and for those that are not specified in the environment_access list. Possible values: full, readOnly, none. Default: none.
:param pulumi.Input[str] product_id: The ID of the Product.
Expand Down Expand Up @@ -1009,14 +1009,14 @@ def __init__(__self__,
product_id=my_products.products[0].product_id,
accesstype="custom",
environment_accesses=[
configcat.PermissionGroupEnvironmentAccessArgs(
environment_id=my_test_environments.environments[0].environment_id,
environment_accesstype="full",
),
configcat.PermissionGroupEnvironmentAccessArgs(
environment_id=my_production_environments.environments[0].environment_id,
environment_accesstype="none",
),
{
"environment_id": my_test_environments.environments[0].environment_id,
"environment_accesstype": "full",
},
{
"environment_id": my_production_environments.environments[0].environment_id,
"environment_accesstype": "none",
},
])
pulumi.export("permissionGroupId", my_permission_group.id)
```
Expand Down Expand Up @@ -1073,7 +1073,7 @@ def _internal_init(__self__,
can_view_product_auditlog: Optional[pulumi.Input[bool]] = None,
can_view_product_statistics: Optional[pulumi.Input[bool]] = None,
can_view_sdkkey: Optional[pulumi.Input[bool]] = None,
environment_accesses: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PermissionGroupEnvironmentAccessArgs']]]]] = None,
environment_accesses: Optional[pulumi.Input[Sequence[pulumi.Input[Union['PermissionGroupEnvironmentAccessArgs', 'PermissionGroupEnvironmentAccessArgsDict']]]]] = None,
name: Optional[pulumi.Input[str]] = None,
new_environment_accesstype: Optional[pulumi.Input[str]] = None,
product_id: Optional[pulumi.Input[str]] = None,
Expand Down Expand Up @@ -1144,7 +1144,7 @@ def get(resource_name: str,
can_view_product_auditlog: Optional[pulumi.Input[bool]] = None,
can_view_product_statistics: Optional[pulumi.Input[bool]] = None,
can_view_sdkkey: Optional[pulumi.Input[bool]] = None,
environment_accesses: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PermissionGroupEnvironmentAccessArgs']]]]] = None,
environment_accesses: Optional[pulumi.Input[Sequence[pulumi.Input[Union['PermissionGroupEnvironmentAccessArgs', 'PermissionGroupEnvironmentAccessArgsDict']]]]] = None,
name: Optional[pulumi.Input[str]] = None,
new_environment_accesstype: Optional[pulumi.Input[str]] = None,
product_id: Optional[pulumi.Input[str]] = None) -> 'PermissionGroup':
Expand Down Expand Up @@ -1174,7 +1174,7 @@ def get(resource_name: str,
:param pulumi.Input[bool] can_view_product_auditlog: Group members has access to audit logs. Default: false.
:param pulumi.Input[bool] can_view_product_statistics: Group members has access to product statistics. Default: false.
:param pulumi.Input[bool] can_view_sdkkey: Group members has access to SDK keys. Default: false.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PermissionGroupEnvironmentAccessArgs']]]] environment_accesses: The environment specific permissions list block defined as below.
:param pulumi.Input[Sequence[pulumi.Input[Union['PermissionGroupEnvironmentAccessArgs', 'PermissionGroupEnvironmentAccessArgsDict']]]] environment_accesses: The environment specific permissions list block defined as below.
:param pulumi.Input[str] name: The name of the Permission Group.
:param pulumi.Input[str] new_environment_accesstype: Represent the environment specific Feature Management permission for new Environments and for those that are not specified in the environment_access list. Possible values: full, readOnly, none. Default: none.
:param pulumi.Input[str] product_id: The ID of the Product.
Expand Down
Loading

0 comments on commit 7db10d9

Please sign in to comment.