Skip to content

Commit

Permalink
make build_sdks
Browse files Browse the repository at this point in the history
  • Loading branch information
pulumi-bot committed Oct 28, 2023
1 parent 30c19a0 commit 5a64b45
Show file tree
Hide file tree
Showing 25 changed files with 572 additions and 3,253 deletions.
513 changes: 63 additions & 450 deletions sdk/python/pulumi_ns1/_inputs.py

Large diffs are not rendered by default.

19 changes: 0 additions & 19 deletions sdk/python/pulumi_ns1/_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,24 +246,5 @@ def lifted_func(*args, opts=None, **kwargs):

return (lambda _: lifted_func)


def configure(val, cls: type, input: bool):
def _apply(v):
if isinstance(v, typing.Mapping):
def _setter(key, value):
v[key] = value
cls._configure(_setter, **v)
return v

# Check that cls has a static _configure method. External classes may
# not have it if it was generated with older codegen.
if hasattr(cls, "_configure"):
if isinstance(val, typing.Mapping):
return _apply(val)
elif input and val is not None and not isinstance(val, cls):
return pulumi.Output.from_input(val).apply(_apply)

return val

def get_plugin_download_url():
return None
42 changes: 5 additions & 37 deletions sdk/python/pulumi_ns1/account_whitelist.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities

__all__ = ['AccountWhitelistArgs', 'AccountWhitelist']
Expand All @@ -21,24 +21,9 @@ def __init__(__self__, *,
:param pulumi.Input[Sequence[pulumi.Input[str]]] values: Array of IP addresses/networks from which to allow access.
:param pulumi.Input[str] name: The free form name of the whitelist.
"""
AccountWhitelistArgs._configure(
lambda key, value: pulumi.set(__self__, key, value),
values=values,
name=name,
)
@staticmethod
def _configure(
_setter: Callable[[Any, Any], None],
values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name: Optional[pulumi.Input[str]] = None,
opts: Optional[pulumi.ResourceOptions] = None,
**kwargs):
if values is None:
raise TypeError("Missing 'values' argument")

_setter("values", values)
pulumi.set(__self__, "values", values)
if name is not None:
_setter("name", name)
pulumi.set(__self__, "name", name)

@property
@pulumi.getter
Expand Down Expand Up @@ -75,23 +60,10 @@ def __init__(__self__, *,
:param pulumi.Input[str] name: The free form name of the whitelist.
:param pulumi.Input[Sequence[pulumi.Input[str]]] values: Array of IP addresses/networks from which to allow access.
"""
_AccountWhitelistState._configure(
lambda key, value: pulumi.set(__self__, key, value),
name=name,
values=values,
)
@staticmethod
def _configure(
_setter: Callable[[Any, Any], None],
name: Optional[pulumi.Input[str]] = None,
values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
opts: Optional[pulumi.ResourceOptions] = None,
**kwargs):

if name is not None:
_setter("name", name)
pulumi.set(__self__, "name", name)
if values is not None:
_setter("values", values)
pulumi.set(__self__, "values", values)

@property
@pulumi.getter
Expand Down Expand Up @@ -203,10 +175,6 @@ def __init__(__self__, resource_name: str, *args, **kwargs):
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
kwargs = kwargs or {}
def _setter(key, value):
kwargs[key] = value
AccountWhitelistArgs._configure(_setter, **kwargs)
__self__._internal_init(resource_name, *args, **kwargs)

def _internal_init(__self__,
Expand Down
404 changes: 66 additions & 338 deletions sdk/python/pulumi_ns1/api_key.py

Large diffs are not rendered by default.

77 changes: 11 additions & 66 deletions sdk/python/pulumi_ns1/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities
from . import outputs
from ._inputs import *
Expand All @@ -32,41 +32,16 @@ def __init__(__self__, *,
:param pulumi.Input[int] jobs_per_transaction: Number of jobs to measure per user impression.
:param pulumi.Input[str] name: Descriptive name for this Pulsar app.
"""
ApplicationArgs._configure(
lambda key, value: pulumi.set(__self__, key, value),
active=active,
browser_wait_millis=browser_wait_millis,
default_config=default_config,
jobs_per_transaction=jobs_per_transaction,
name=name,
)
@staticmethod
def _configure(
_setter: Callable[[Any, Any], None],
active: Optional[pulumi.Input[bool]] = None,
browser_wait_millis: Optional[pulumi.Input[int]] = None,
default_config: Optional[pulumi.Input['ApplicationDefaultConfigArgs']] = None,
jobs_per_transaction: Optional[pulumi.Input[int]] = None,
name: Optional[pulumi.Input[str]] = None,
opts: Optional[pulumi.ResourceOptions] = None,
**kwargs):
if browser_wait_millis is None and 'browserWaitMillis' in kwargs:
browser_wait_millis = kwargs['browserWaitMillis']
if default_config is None and 'defaultConfig' in kwargs:
default_config = kwargs['defaultConfig']
if jobs_per_transaction is None and 'jobsPerTransaction' in kwargs:
jobs_per_transaction = kwargs['jobsPerTransaction']

if active is not None:
_setter("active", active)
pulumi.set(__self__, "active", active)
if browser_wait_millis is not None:
_setter("browser_wait_millis", browser_wait_millis)
pulumi.set(__self__, "browser_wait_millis", browser_wait_millis)
if default_config is not None:
_setter("default_config", default_config)
pulumi.set(__self__, "default_config", default_config)
if jobs_per_transaction is not None:
_setter("jobs_per_transaction", jobs_per_transaction)
pulumi.set(__self__, "jobs_per_transaction", jobs_per_transaction)
if name is not None:
_setter("name", name)
pulumi.set(__self__, "name", name)

@property
@pulumi.getter
Expand Down Expand Up @@ -151,41 +126,16 @@ def __init__(__self__, *,
:param pulumi.Input[int] jobs_per_transaction: Number of jobs to measure per user impression.
:param pulumi.Input[str] name: Descriptive name for this Pulsar app.
"""
_ApplicationState._configure(
lambda key, value: pulumi.set(__self__, key, value),
active=active,
browser_wait_millis=browser_wait_millis,
default_config=default_config,
jobs_per_transaction=jobs_per_transaction,
name=name,
)
@staticmethod
def _configure(
_setter: Callable[[Any, Any], None],
active: Optional[pulumi.Input[bool]] = None,
browser_wait_millis: Optional[pulumi.Input[int]] = None,
default_config: Optional[pulumi.Input['ApplicationDefaultConfigArgs']] = None,
jobs_per_transaction: Optional[pulumi.Input[int]] = None,
name: Optional[pulumi.Input[str]] = None,
opts: Optional[pulumi.ResourceOptions] = None,
**kwargs):
if browser_wait_millis is None and 'browserWaitMillis' in kwargs:
browser_wait_millis = kwargs['browserWaitMillis']
if default_config is None and 'defaultConfig' in kwargs:
default_config = kwargs['defaultConfig']
if jobs_per_transaction is None and 'jobsPerTransaction' in kwargs:
jobs_per_transaction = kwargs['jobsPerTransaction']

if active is not None:
_setter("active", active)
pulumi.set(__self__, "active", active)
if browser_wait_millis is not None:
_setter("browser_wait_millis", browser_wait_millis)
pulumi.set(__self__, "browser_wait_millis", browser_wait_millis)
if default_config is not None:
_setter("default_config", default_config)
pulumi.set(__self__, "default_config", default_config)
if jobs_per_transaction is not None:
_setter("jobs_per_transaction", jobs_per_transaction)
pulumi.set(__self__, "jobs_per_transaction", jobs_per_transaction)
if name is not None:
_setter("name", name)
pulumi.set(__self__, "name", name)

@property
@pulumi.getter
Expand Down Expand Up @@ -357,10 +307,6 @@ def __init__(__self__, resource_name: str, *args, **kwargs):
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
kwargs = kwargs or {}
def _setter(key, value):
kwargs[key] = value
ApplicationArgs._configure(_setter, **kwargs)
__self__._internal_init(resource_name, *args, **kwargs)

def _internal_init(__self__,
Expand All @@ -382,7 +328,6 @@ def _internal_init(__self__,

__props__.__dict__["active"] = active
__props__.__dict__["browser_wait_millis"] = browser_wait_millis
default_config = _utilities.configure(default_config, ApplicationDefaultConfigArgs, True)
__props__.__dict__["default_config"] = default_config
__props__.__dict__["jobs_per_transaction"] = jobs_per_transaction
__props__.__dict__["name"] = name
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/pulumi_ns1/config/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities

apikey: Optional[str]
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/pulumi_ns1/config/vars.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities

import types
Expand Down
54 changes: 7 additions & 47 deletions sdk/python/pulumi_ns1/data_feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities

__all__ = ['DataFeedArgs', 'DataFeed']
Expand All @@ -24,30 +24,11 @@ def __init__(__self__, *,
`feed_config` from /data/sourcetypes. `jobid` is required in the `config` for datafeeds connected to NS1 monitoring.
:param pulumi.Input[str] name: The free form name of the data feed.
"""
DataFeedArgs._configure(
lambda key, value: pulumi.set(__self__, key, value),
source_id=source_id,
config=config,
name=name,
)
@staticmethod
def _configure(
_setter: Callable[[Any, Any], None],
source_id: Optional[pulumi.Input[str]] = None,
config: Optional[pulumi.Input[Mapping[str, Any]]] = None,
name: Optional[pulumi.Input[str]] = None,
opts: Optional[pulumi.ResourceOptions] = None,
**kwargs):
if source_id is None and 'sourceId' in kwargs:
source_id = kwargs['sourceId']
if source_id is None:
raise TypeError("Missing 'source_id' argument")

_setter("source_id", source_id)
pulumi.set(__self__, "source_id", source_id)
if config is not None:
_setter("config", config)
pulumi.set(__self__, "config", config)
if name is not None:
_setter("name", name)
pulumi.set(__self__, "name", name)

@property
@pulumi.getter(name="sourceId")
Expand Down Expand Up @@ -100,29 +81,12 @@ def __init__(__self__, *,
:param pulumi.Input[str] name: The free form name of the data feed.
:param pulumi.Input[str] source_id: The data source id that this feed is connected to.
"""
_DataFeedState._configure(
lambda key, value: pulumi.set(__self__, key, value),
config=config,
name=name,
source_id=source_id,
)
@staticmethod
def _configure(
_setter: Callable[[Any, Any], None],
config: Optional[pulumi.Input[Mapping[str, Any]]] = None,
name: Optional[pulumi.Input[str]] = None,
source_id: Optional[pulumi.Input[str]] = None,
opts: Optional[pulumi.ResourceOptions] = None,
**kwargs):
if source_id is None and 'sourceId' in kwargs:
source_id = kwargs['sourceId']

if config is not None:
_setter("config", config)
pulumi.set(__self__, "config", config)
if name is not None:
_setter("name", name)
pulumi.set(__self__, "name", name)
if source_id is not None:
_setter("source_id", source_id)
pulumi.set(__self__, "source_id", source_id)

@property
@pulumi.getter
Expand Down Expand Up @@ -268,10 +232,6 @@ def __init__(__self__, resource_name: str, *args, **kwargs):
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
kwargs = kwargs or {}
def _setter(key, value):
kwargs[key] = value
DataFeedArgs._configure(_setter, **kwargs)
__self__._internal_init(resource_name, *args, **kwargs)

def _internal_init(__self__,
Expand Down
Loading

0 comments on commit 5a64b45

Please sign in to comment.