Skip to content

Commit 0404903

Browse files
author
SDKAuto
committed
CodeGen from PR 16644 in Azure/azure-rest-api-specs
Merge f755487dd0a79058dd3c9aef6af3085fdd2c57ac into e0b5060
1 parent 49f51c0 commit 0404903

26 files changed

+5145
-178
lines changed

sdk/deviceupdate/azure-mgmt-deviceupdate/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
include _meta.json
12
recursive-include tests *.py *.yaml
23
include *.md
34
include azure/__init__.py
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"autorest": "3.4.5",
3+
"use": [
4+
"@autorest/python@5.8.4",
5+
"@autorest/modelerfour@4.19.2"
6+
],
7+
"commit": "179452014a251c0d7b8038a45ddeac4c9cd5b5e7",
8+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9+
"autorest_command": "autorest specification/deviceupdate/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5",
10+
"readme": "specification/deviceupdate/resource-manager/readme.md"
11+
}

sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/_device_update.py

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,32 @@
1616
from typing import Any, Optional
1717

1818
from azure.core.credentials import TokenCredential
19+
from azure.core.pipeline.transport import HttpRequest, HttpResponse
1920

2021
from ._configuration import DeviceUpdateConfiguration
22+
from .operations import DeviceUpdateOperationsMixin
2123
from .operations import AccountsOperations
2224
from .operations import InstancesOperations
25+
from .operations import PrivateEndpointConnectionsOperations
26+
from .operations import PrivateLinkResourcesOperations
27+
from .operations import PrivateEndpointConnectionProxiesOperations
2328
from .operations import Operations
2429
from . import models
2530

2631

27-
class DeviceUpdate(object):
32+
class DeviceUpdate(DeviceUpdateOperationsMixin):
2833
"""Microsoft Device Update resource provider.
2934
3035
:ivar accounts: AccountsOperations operations
3136
:vartype accounts: device_update.operations.AccountsOperations
3237
:ivar instances: InstancesOperations operations
3338
:vartype instances: device_update.operations.InstancesOperations
39+
:ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
40+
:vartype private_endpoint_connections: device_update.operations.PrivateEndpointConnectionsOperations
41+
:ivar private_link_resources: PrivateLinkResourcesOperations operations
42+
:vartype private_link_resources: device_update.operations.PrivateLinkResourcesOperations
43+
:ivar private_endpoint_connection_proxies: PrivateEndpointConnectionProxiesOperations operations
44+
:vartype private_endpoint_connection_proxies: device_update.operations.PrivateEndpointConnectionProxiesOperations
3445
:ivar operations: Operations operations
3546
:vartype operations: device_update.operations.Operations
3647
:param credential: Credential needed for the client to connect to Azure.
@@ -56,15 +67,40 @@ def __init__(
5667

5768
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
5869
self._serialize = Serializer(client_models)
70+
self._serialize.client_side_validation = False
5971
self._deserialize = Deserializer(client_models)
6072

6173
self.accounts = AccountsOperations(
6274
self._client, self._config, self._serialize, self._deserialize)
6375
self.instances = InstancesOperations(
6476
self._client, self._config, self._serialize, self._deserialize)
77+
self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
78+
self._client, self._config, self._serialize, self._deserialize)
79+
self.private_link_resources = PrivateLinkResourcesOperations(
80+
self._client, self._config, self._serialize, self._deserialize)
81+
self.private_endpoint_connection_proxies = PrivateEndpointConnectionProxiesOperations(
82+
self._client, self._config, self._serialize, self._deserialize)
6583
self.operations = Operations(
6684
self._client, self._config, self._serialize, self._deserialize)
6785

86+
def _send_request(self, http_request, **kwargs):
87+
# type: (HttpRequest, Any) -> HttpResponse
88+
"""Runs the network request through the client's chained policies.
89+
90+
:param http_request: The network request you want to make. Required.
91+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
92+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
93+
:return: The response of your network call. Does not do error handling on your response.
94+
:rtype: ~azure.core.pipeline.transport.HttpResponse
95+
"""
96+
path_format_arguments = {
97+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
98+
}
99+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
100+
stream = kwargs.pop("stream", True)
101+
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
102+
return pipeline_response.http_response
103+
68104
def close(self):
69105
# type: () -> None
70106
self._client.close()

sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/_metadata.json

Lines changed: 71 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
"custom_base_url": null,
1010
"azure_arm": true,
1111
"has_lro_operations": true,
12-
"client_side_validation": true
12+
"client_side_validation": false,
13+
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DeviceUpdateConfiguration\"], \"._operations_mixin\": [\"DeviceUpdateOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
14+
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DeviceUpdateConfiguration\"], \"._operations_mixin\": [\"DeviceUpdateOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
1315
},
1416
"global_parameters": {
1517
"sync": {
@@ -28,36 +30,97 @@
2830
},
2931
"async": {
3032
"credential": {
31-
"signature": "credential, # type: \"AsyncTokenCredential\"",
33+
"signature": "credential: \"AsyncTokenCredential\",",
3234
"description": "Credential needed for the client to connect to Azure.",
3335
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
3436
"required": true
3537
},
3638
"subscription_id": {
37-
"signature": "subscription_id, # type: str",
39+
"signature": "subscription_id: str,",
3840
"description": "The Azure subscription ID.",
3941
"docstring_type": "str",
4042
"required": true
4143
}
4244
},
4345
"constant": {
4446
},
45-
"call": "credential, subscription_id"
47+
"call": "credential, subscription_id",
48+
"service_client_specific": {
49+
"sync": {
50+
"api_version": {
51+
"signature": "api_version=None, # type: Optional[str]",
52+
"description": "API version to use if no profile is provided, or if missing in profile.",
53+
"docstring_type": "str",
54+
"required": false
55+
},
56+
"base_url": {
57+
"signature": "base_url=None, # type: Optional[str]",
58+
"description": "Service URL",
59+
"docstring_type": "str",
60+
"required": false
61+
},
62+
"profile": {
63+
"signature": "profile=KnownProfiles.default, # type: KnownProfiles",
64+
"description": "A profile definition, from KnownProfiles to dict.",
65+
"docstring_type": "azure.profiles.KnownProfiles",
66+
"required": false
67+
}
68+
},
69+
"async": {
70+
"api_version": {
71+
"signature": "api_version: Optional[str] = None,",
72+
"description": "API version to use if no profile is provided, or if missing in profile.",
73+
"docstring_type": "str",
74+
"required": false
75+
},
76+
"base_url": {
77+
"signature": "base_url: Optional[str] = None,",
78+
"description": "Service URL",
79+
"docstring_type": "str",
80+
"required": false
81+
},
82+
"profile": {
83+
"signature": "profile: KnownProfiles = KnownProfiles.default,",
84+
"description": "A profile definition, from KnownProfiles to dict.",
85+
"docstring_type": "azure.profiles.KnownProfiles",
86+
"required": false
87+
}
88+
}
89+
}
4690
},
4791
"config": {
4892
"credential": true,
4993
"credential_scopes": ["https://management.azure.com/.default"],
5094
"credential_default_policy_type": "BearerTokenCredentialPolicy",
5195
"credential_default_policy_type_has_async_version": true,
52-
"credential_key_header_name": null
96+
"credential_key_header_name": null,
97+
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}",
98+
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
5399
},
54100
"operation_groups": {
55101
"accounts": "AccountsOperations",
56102
"instances": "InstancesOperations",
103+
"private_endpoint_connections": "PrivateEndpointConnectionsOperations",
104+
"private_link_resources": "PrivateLinkResourcesOperations",
105+
"private_endpoint_connection_proxies": "PrivateEndpointConnectionProxiesOperations",
57106
"operations": "Operations"
58107
},
59108
"operation_mixins": {
60-
},
61-
"sync_imports": "None",
62-
"async_imports": "None"
109+
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}",
110+
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}",
111+
"operations": {
112+
"check_name_availability" : {
113+
"sync": {
114+
"signature": "def check_name_availability(\n self,\n request, # type: \"_models.CheckNameAvailabilityRequest\"\n **kwargs # type: Any\n):\n",
115+
"doc": "\"\"\"Checks ADU resource name availability.\n\n:param request: Check Name Availability Request.\n:type request: ~device_update.models.CheckNameAvailabilityRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: CheckNameAvailabilityResponse, or the result of cls(response)\n:rtype: ~device_update.models.CheckNameAvailabilityResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\""
116+
},
117+
"async": {
118+
"coroutine": true,
119+
"signature": "async def check_name_availability(\n self,\n request: \"_models.CheckNameAvailabilityRequest\",\n **kwargs: Any\n) -\u003e \"_models.CheckNameAvailabilityResponse\":\n",
120+
"doc": "\"\"\"Checks ADU resource name availability.\n\n:param request: Check Name Availability Request.\n:type request: ~device_update.models.CheckNameAvailabilityRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: CheckNameAvailabilityResponse, or the result of cls(response)\n:rtype: ~device_update.models.CheckNameAvailabilityResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\""
121+
},
122+
"call": "request"
123+
}
124+
}
125+
}
63126
}

sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "1.0.0b2"
9+
VERSION = "1.0.0b1"

sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/_device_update.py

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from typing import Any, Optional, TYPE_CHECKING
1010

11+
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
1112
from azure.mgmt.core import AsyncARMPipelineClient
1213
from msrest import Deserializer, Serializer
1314

@@ -16,19 +17,29 @@
1617
from azure.core.credentials_async import AsyncTokenCredential
1718

1819
from ._configuration import DeviceUpdateConfiguration
20+
from .operations import DeviceUpdateOperationsMixin
1921
from .operations import AccountsOperations
2022
from .operations import InstancesOperations
23+
from .operations import PrivateEndpointConnectionsOperations
24+
from .operations import PrivateLinkResourcesOperations
25+
from .operations import PrivateEndpointConnectionProxiesOperations
2126
from .operations import Operations
2227
from .. import models
2328

2429

25-
class DeviceUpdate(object):
30+
class DeviceUpdate(DeviceUpdateOperationsMixin):
2631
"""Microsoft Device Update resource provider.
2732
2833
:ivar accounts: AccountsOperations operations
2934
:vartype accounts: device_update.aio.operations.AccountsOperations
3035
:ivar instances: InstancesOperations operations
3136
:vartype instances: device_update.aio.operations.InstancesOperations
37+
:ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
38+
:vartype private_endpoint_connections: device_update.aio.operations.PrivateEndpointConnectionsOperations
39+
:ivar private_link_resources: PrivateLinkResourcesOperations operations
40+
:vartype private_link_resources: device_update.aio.operations.PrivateLinkResourcesOperations
41+
:ivar private_endpoint_connection_proxies: PrivateEndpointConnectionProxiesOperations operations
42+
:vartype private_endpoint_connection_proxies: device_update.aio.operations.PrivateEndpointConnectionProxiesOperations
3243
:ivar operations: Operations operations
3344
:vartype operations: device_update.aio.operations.Operations
3445
:param credential: Credential needed for the client to connect to Azure.
@@ -53,15 +64,39 @@ def __init__(
5364

5465
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
5566
self._serialize = Serializer(client_models)
67+
self._serialize.client_side_validation = False
5668
self._deserialize = Deserializer(client_models)
5769

5870
self.accounts = AccountsOperations(
5971
self._client, self._config, self._serialize, self._deserialize)
6072
self.instances = InstancesOperations(
6173
self._client, self._config, self._serialize, self._deserialize)
74+
self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
75+
self._client, self._config, self._serialize, self._deserialize)
76+
self.private_link_resources = PrivateLinkResourcesOperations(
77+
self._client, self._config, self._serialize, self._deserialize)
78+
self.private_endpoint_connection_proxies = PrivateEndpointConnectionProxiesOperations(
79+
self._client, self._config, self._serialize, self._deserialize)
6280
self.operations = Operations(
6381
self._client, self._config, self._serialize, self._deserialize)
6482

83+
async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
84+
"""Runs the network request through the client's chained policies.
85+
86+
:param http_request: The network request you want to make. Required.
87+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
88+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
89+
:return: The response of your network call. Does not do error handling on your response.
90+
:rtype: ~azure.core.pipeline.transport.AsyncHttpResponse
91+
"""
92+
path_format_arguments = {
93+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
94+
}
95+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
96+
stream = kwargs.pop("stream", True)
97+
pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs)
98+
return pipeline_response.http_response
99+
65100
async def close(self) -> None:
66101
await self._client.close()
67102

sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,20 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9+
from ._device_update_operations import DeviceUpdateOperationsMixin
910
from ._accounts_operations import AccountsOperations
1011
from ._instances_operations import InstancesOperations
12+
from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations
13+
from ._private_link_resources_operations import PrivateLinkResourcesOperations
14+
from ._private_endpoint_connection_proxies_operations import PrivateEndpointConnectionProxiesOperations
1115
from ._operations import Operations
1216

1317
__all__ = [
18+
'DeviceUpdateOperationsMixin',
1419
'AccountsOperations',
1520
'InstancesOperations',
21+
'PrivateEndpointConnectionsOperations',
22+
'PrivateLinkResourcesOperations',
23+
'PrivateEndpointConnectionProxiesOperations',
1624
'Operations',
1725
]

0 commit comments

Comments
 (0)