Skip to content

Commit

Permalink
CodeGen from PR 3112 in openapi-env-test/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge e1c11a0fb7b1f627ff005e3ac37fab857db30f39 into dd528db889505ce821d95459404aba16870aef24
  • Loading branch information
SDKAuto committed May 9, 2022
1 parent eb61f67 commit b11d87d
Show file tree
Hide file tree
Showing 15 changed files with 3,259 additions and 2,163 deletions.
1 change: 1 addition & 0 deletions sdk/deviceupdate/azure-iot-deviceupdate/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include _meta.json
recursive-include tests *.py
recursive-include samples *.py *.md
include LICENSE
Expand Down
11 changes: 11 additions & 0 deletions sdk/deviceupdate/azure-iot-deviceupdate/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"autorest": "3.7.2",
"use": [
"@autorest/python@5.16.0",
"@autorest/modelerfour@4.19.3"
],
"commit": "a69b4cc9bbf5e152f6253cbb878b266b1e1636e3",
"repository_url": "https://github.com/openapi-env-test/azure-rest-api-specs",
"autorest_command": "autorest specification/deviceupdate/data-plane/readme.md --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@5.16.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2 --version-tolerant",
"readme": "specification/deviceupdate/data-plane/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,18 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._device_update_client import DeviceUpdateClient
from ._client import DeviceUpdateClient
from ._version import VERSION

__version__ = VERSION

try:
from ._patch import __all__ as _patch_all
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk
__all__ = ['DeviceUpdateClient']
__all__.extend([p for p in _patch_all if p not in __all__])

# `._patch.py` is used for handwritten extensions to the generated code
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
from ._patch import patch_sdk
patch_sdk()
_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
# --------------------------------------------------------------------------

from copy import deepcopy
from typing import Any, Optional, TYPE_CHECKING
from typing import Any, TYPE_CHECKING

from msrest import Deserializer, Serializer

from azure.core import PipelineClient
from azure.core.rest import HttpRequest, HttpResponse
from msrest import Deserializer, Serializer

from ._configuration import DeviceUpdateClientConfiguration
from .operations import DeviceManagementOperations, DeviceUpdateOperations
Expand All @@ -23,7 +24,12 @@
from azure.core.credentials import TokenCredential

class DeviceUpdateClient:
"""Device Update for IoT Hub is an Azure service that enables customers to publish update for their IoT devices to the cloud, and then deploy that update to their devices (approve updates to groups of devices managed and provisioned in IoT Hub). It leverages the proven security and reliability of the Windows Update platform, optimized for IoT devices. It works globally and knows when and how to update devices, enabling customers to focus on their business goals and let Device Update for IoT Hub handle the updates.
"""Device Update for IoT Hub is an Azure service that enables customers to publish update for
their IoT devices to the cloud, and then deploy that update to their devices (approve updates
to groups of devices managed and provisioned in IoT Hub). It leverages the proven security and
reliability of the Windows Update platform, optimized for IoT devices. It works globally and
knows when and how to update devices, enabling customers to focus on their business goals and
let Device Update for IoT Hub handle the updates.
:ivar device_update: DeviceUpdateOperations operations
:vartype device_update: azure.iot.deviceupdate.operations.DeviceUpdateOperations
Expand All @@ -35,8 +41,8 @@ class DeviceUpdateClient:
:type instance_id: str
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:keyword api_version: Api Version. The default value is "2021-06-01-preview". Note that
overriding this default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2021-06-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
Expand All @@ -56,13 +62,17 @@ def __init__(
self._serialize = Serializer()
self._deserialize = Deserializer()
self._serialize.client_side_validation = False
self.device_update = DeviceUpdateOperations(self._client, self._config, self._serialize, self._deserialize)
self.device_management = DeviceManagementOperations(self._client, self._config, self._serialize, self._deserialize)
self.device_update = DeviceUpdateOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.device_management = DeviceManagementOperations(
self._client, self._config, self._serialize, self._deserialize
)


def send_request(
self,
request, # type: HttpRequest
request: HttpRequest,
**kwargs: Any
) -> HttpResponse:
"""Runs the network request through the client's chained policies.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from azure.core.credentials import TokenCredential


class DeviceUpdateClientConfiguration(Configuration):
class DeviceUpdateClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
"""Configuration for DeviceUpdateClient.
Note that all parameters used to create this instance are saved as instance
Expand All @@ -30,7 +30,8 @@ class DeviceUpdateClientConfiguration(Configuration):
:type instance_id: str
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:keyword api_version: Api Version. The default value is "2021-06-01-preview". Note that overriding this default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2021-06-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "1.0.0b2"
VERSION = "3.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._device_update_client import DeviceUpdateClient
from ._client import DeviceUpdateClient

try:
from ._patch import __all__ as _patch_all
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk
__all__ = ['DeviceUpdateClient']
__all__.extend([p for p in _patch_all if p not in __all__])

# `._patch.py` is used for handwritten extensions to the generated code
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
from ._patch import patch_sdk
patch_sdk()
_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
# --------------------------------------------------------------------------

from copy import deepcopy
from typing import Any, Awaitable, Optional, TYPE_CHECKING
from typing import Any, Awaitable, TYPE_CHECKING

from msrest import Deserializer, Serializer

from azure.core import AsyncPipelineClient
from azure.core.rest import AsyncHttpResponse, HttpRequest
from msrest import Deserializer, Serializer

from ._configuration import DeviceUpdateClientConfiguration
from .operations import DeviceManagementOperations, DeviceUpdateOperations
Expand All @@ -23,7 +24,12 @@
from azure.core.credentials_async import AsyncTokenCredential

class DeviceUpdateClient:
"""Device Update for IoT Hub is an Azure service that enables customers to publish update for their IoT devices to the cloud, and then deploy that update to their devices (approve updates to groups of devices managed and provisioned in IoT Hub). It leverages the proven security and reliability of the Windows Update platform, optimized for IoT devices. It works globally and knows when and how to update devices, enabling customers to focus on their business goals and let Device Update for IoT Hub handle the updates.
"""Device Update for IoT Hub is an Azure service that enables customers to publish update for
their IoT devices to the cloud, and then deploy that update to their devices (approve updates
to groups of devices managed and provisioned in IoT Hub). It leverages the proven security and
reliability of the Windows Update platform, optimized for IoT devices. It works globally and
knows when and how to update devices, enabling customers to focus on their business goals and
let Device Update for IoT Hub handle the updates.
:ivar device_update: DeviceUpdateOperations operations
:vartype device_update: azure.iot.deviceupdate.aio.operations.DeviceUpdateOperations
Expand All @@ -35,8 +41,8 @@ class DeviceUpdateClient:
:type instance_id: str
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:keyword api_version: Api Version. The default value is "2021-06-01-preview". Note that
overriding this default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2021-06-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
Expand All @@ -56,8 +62,12 @@ def __init__(
self._serialize = Serializer()
self._deserialize = Deserializer()
self._serialize.client_side_validation = False
self.device_update = DeviceUpdateOperations(self._client, self._config, self._serialize, self._deserialize)
self.device_management = DeviceManagementOperations(self._client, self._config, self._serialize, self._deserialize)
self.device_update = DeviceUpdateOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.device_management = DeviceManagementOperations(
self._client, self._config, self._serialize, self._deserialize
)


def send_request(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from azure.core.credentials_async import AsyncTokenCredential


class DeviceUpdateClientConfiguration(Configuration):
class DeviceUpdateClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
"""Configuration for DeviceUpdateClient.
Note that all parameters used to create this instance are saved as instance
Expand All @@ -30,7 +30,8 @@ class DeviceUpdateClientConfiguration(Configuration):
:type instance_id: str
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:keyword api_version: Api Version. The default value is "2021-06-01-preview". Note that overriding this default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2021-06-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
from ._operations import DeviceUpdateOperations
from ._operations import DeviceManagementOperations

from ._patch import __all__ as _patch_all
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
from ._patch import patch_sdk as _patch_sdk
__all__ = [
'DeviceUpdateOperations',
'DeviceManagementOperations',
]
__all__.extend([p for p in _patch_all if p not in __all__])
_patch_sdk()
Loading

0 comments on commit b11d87d

Please sign in to comment.