From e18406e7d1c5acb29f568a8f5242ed3cda75a720 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Sat, 8 May 2021 04:27:53 +0000 Subject: [PATCH] CodeGen from PR 14311 in Azure/azure-rest-api-specs Merge ecde128cfe1d34d162308d041e67719d2218fa83 into 4b7dca50a9a7559865803927a87a06ad0d73ff06 --- sdk/iothub/azure-mgmt-iotcentral/MANIFEST.in | 1 + sdk/iothub/azure-mgmt-iotcentral/_meta.json | 8 ++++++++ .../azure/mgmt/iotcentral/_iot_central_client.py | 2 +- .../azure/mgmt/iotcentral/models/__init__.py | 2 ++ .../models/_iot_central_client_enums.py | 8 +++++++- .../azure/mgmt/iotcentral/models/_models.py | 12 +++++++++++- .../azure/mgmt/iotcentral/models/_models_py3.py | 16 +++++++++++++--- .../iotcentral/operations/_apps_operations.py | 4 ++-- .../mgmt/iotcentral/operations/_operations.py | 6 +++--- 9 files changed, 48 insertions(+), 11 deletions(-) create mode 100644 sdk/iothub/azure-mgmt-iotcentral/_meta.json diff --git a/sdk/iothub/azure-mgmt-iotcentral/MANIFEST.in b/sdk/iothub/azure-mgmt-iotcentral/MANIFEST.in index a3cb07df87658..3a9b6517412bc 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/MANIFEST.in +++ b/sdk/iothub/azure-mgmt-iotcentral/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/iothub/azure-mgmt-iotcentral/_meta.json b/sdk/iothub/azure-mgmt-iotcentral/_meta.json new file mode 100644 index 0000000000000..b05c267615f34 --- /dev/null +++ b/sdk/iothub/azure-mgmt-iotcentral/_meta.json @@ -0,0 +1,8 @@ +{ + "autorest": "V2", + "use": "@microsoft.azure/autorest.python@~4.0.71", + "commit": "bb595a850fd98dbff142fec6fcc9709efb45d604", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/iotcentral/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --use=@microsoft.azure/autorest.python@~4.0.71 --version=V2", + "readme": "specification/iotcentral/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_iot_central_client.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_iot_central_client.py index d5e718427557b..19cbded2c25d1 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_iot_central_client.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_iot_central_client.py @@ -44,7 +44,7 @@ def __init__( super(IotCentralClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-09-01' + self.api_version = '2021-06-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/__init__.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/__init__.py index 93d61ff4cb927..0310e73a8fc20 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/__init__.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/__init__.py @@ -37,6 +37,7 @@ from ._paged_models import AppTemplatePaged from ._paged_models import OperationPaged from ._iot_central_client_enums import ( + AppState, AppSku, ) @@ -55,5 +56,6 @@ 'AppPaged', 'AppTemplatePaged', 'OperationPaged', + 'AppState', 'AppSku', ] diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_iot_central_client_enums.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_iot_central_client_enums.py index 260dac79c36af..e12bd60ba637b 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_iot_central_client_enums.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_iot_central_client_enums.py @@ -12,10 +12,16 @@ from enum import Enum +class AppState(str, Enum): + + created = "created" + deleted = "deleted" + suspended = "suspended" + + class AppSku(str, Enum): f1 = "F1" - s1 = "S1" st0 = "ST0" st1 = "ST1" st2 = "ST2" diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_models.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_models.py index e5536dc87ac65..2aed280a30a4a 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_models.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_models.py @@ -86,6 +86,9 @@ class App(Resource): Optional; if not specified, defaults to a blank blueprint and allows the application to be defined from scratch. :type template: str + :param state: The current state of the application. Possible values + include: 'created', 'deleted', 'suspended' + :type state: str or ~azure.mgmt.iotcentral.models.AppState :param sku: Required. A valid instance SKU. :type sku: ~azure.mgmt.iotcentral.models.AppSkuInfo """ @@ -109,6 +112,7 @@ class App(Resource): 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'subdomain': {'key': 'properties.subdomain', 'type': 'str'}, 'template': {'key': 'properties.template', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, 'sku': {'key': 'sku', 'type': 'AppSkuInfo'}, } @@ -118,6 +122,7 @@ def __init__(self, **kwargs): self.display_name = kwargs.get('display_name', None) self.subdomain = kwargs.get('subdomain', None) self.template = kwargs.get('template', None) + self.state = kwargs.get('state', None) self.sku = kwargs.get('sku', None) @@ -177,6 +182,9 @@ class AppPatch(Model): Optional; if not specified, defaults to a blank blueprint and allows the application to be defined from scratch. :type template: str + :param state: The current state of the application. Possible values + include: 'created', 'deleted', 'suspended' + :type state: str or ~azure.mgmt.iotcentral.models.AppState """ _validation = { @@ -190,6 +198,7 @@ class AppPatch(Model): 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'subdomain': {'key': 'properties.subdomain', 'type': 'str'}, 'template': {'key': 'properties.template', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, } def __init__(self, **kwargs): @@ -200,6 +209,7 @@ def __init__(self, **kwargs): self.display_name = kwargs.get('display_name', None) self.subdomain = kwargs.get('subdomain', None) self.template = kwargs.get('template', None) + self.state = kwargs.get('state', None) class AppSkuInfo(Model): @@ -208,7 +218,7 @@ class AppSkuInfo(Model): All required parameters must be populated in order to send to Azure. :param name: Required. The name of the SKU. Possible values include: 'F1', - 'S1', 'ST0', 'ST1', 'ST2' + 'ST0', 'ST1', 'ST2' :type name: str or ~azure.mgmt.iotcentral.models.AppSku """ diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_models_py3.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_models_py3.py index c65b3b5b299f4..99738aa719e04 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_models_py3.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_models_py3.py @@ -86,6 +86,9 @@ class App(Resource): Optional; if not specified, defaults to a blank blueprint and allows the application to be defined from scratch. :type template: str + :param state: The current state of the application. Possible values + include: 'created', 'deleted', 'suspended' + :type state: str or ~azure.mgmt.iotcentral.models.AppState :param sku: Required. A valid instance SKU. :type sku: ~azure.mgmt.iotcentral.models.AppSkuInfo """ @@ -109,15 +112,17 @@ class App(Resource): 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'subdomain': {'key': 'properties.subdomain', 'type': 'str'}, 'template': {'key': 'properties.template', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, 'sku': {'key': 'sku', 'type': 'AppSkuInfo'}, } - def __init__(self, *, location: str, sku, tags=None, display_name: str=None, subdomain: str=None, template: str=None, **kwargs) -> None: + def __init__(self, *, location: str, sku, tags=None, display_name: str=None, subdomain: str=None, template: str=None, state=None, **kwargs) -> None: super(App, self).__init__(location=location, tags=tags, **kwargs) self.application_id = None self.display_name = display_name self.subdomain = subdomain self.template = template + self.state = state self.sku = sku @@ -177,6 +182,9 @@ class AppPatch(Model): Optional; if not specified, defaults to a blank blueprint and allows the application to be defined from scratch. :type template: str + :param state: The current state of the application. Possible values + include: 'created', 'deleted', 'suspended' + :type state: str or ~azure.mgmt.iotcentral.models.AppState """ _validation = { @@ -190,9 +198,10 @@ class AppPatch(Model): 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'subdomain': {'key': 'properties.subdomain', 'type': 'str'}, 'template': {'key': 'properties.template', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, } - def __init__(self, *, tags=None, sku=None, display_name: str=None, subdomain: str=None, template: str=None, **kwargs) -> None: + def __init__(self, *, tags=None, sku=None, display_name: str=None, subdomain: str=None, template: str=None, state=None, **kwargs) -> None: super(AppPatch, self).__init__(**kwargs) self.tags = tags self.sku = sku @@ -200,6 +209,7 @@ def __init__(self, *, tags=None, sku=None, display_name: str=None, subdomain: st self.display_name = display_name self.subdomain = subdomain self.template = template + self.state = state class AppSkuInfo(Model): @@ -208,7 +218,7 @@ class AppSkuInfo(Model): All required parameters must be populated in order to send to Azure. :param name: Required. The name of the SKU. Possible values include: 'F1', - 'S1', 'ST0', 'ST1', 'ST2' + 'ST0', 'ST1', 'ST2' :type name: str or ~azure.mgmt.iotcentral.models.AppSku """ diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/_apps_operations.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/_apps_operations.py index 73923c84963b4..1f68e07274582 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/_apps_operations.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/_apps_operations.py @@ -27,7 +27,7 @@ class AppsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. Constant value: "2018-09-01". + :ivar api_version: The version of the API. Constant value: "2021-06-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-09-01" + self.api_version = "2021-06-01" self.config = config diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/_operations.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/_operations.py index 764115f4f92d3..82446f6989c78 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/_operations.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/_operations.py @@ -25,7 +25,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. Constant value: "2018-09-01". + :ivar api_version: The version of the API. Constant value: "2021-06-01". """ models = models @@ -35,13 +35,13 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-09-01" + self.api_version = "2021-06-01" self.config = config def list( self, custom_headers=None, raw=False, **operation_config): - """Lists all of the available IoT Central application REST API operations. + """Lists all of the available IoT Central Resource Provider operations. :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the