Skip to content

Commit 71a4540

Browse files
author
SDKAuto
committed
CodeGen from PR 15836 in Azure/azure-rest-api-specs
Merge 0c37361b8dea86d66c4cd9c14c11bf37e3a446ea into f9e4843
1 parent 0320ace commit 71a4540

File tree

258 files changed

+46151
-489
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

258 files changed

+46151
-489
lines changed

sdk/authorization/azure-mgmt-authorization/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/[email protected]",
5+
"@autorest/[email protected]"
6+
],
7+
"commit": "658fa768ea56d1f60ae13ba82c1edeab95ee040c",
8+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9+
"autorest_command": "autorest specification/authorization/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/[email protected] --use=@autorest/[email protected] --version=3.4.5",
10+
"readme": "specification/authorization/resource-manager/readme.md"
11+
}

sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/_authorization_management_client.py

Lines changed: 438 additions & 8 deletions
Large diffs are not rendered by default.

sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/_configuration.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,19 @@
88
# Changes may cause incorrect behavior and will be lost if the code is
99
# regenerated.
1010
# --------------------------------------------------------------------------
11-
from typing import Any
11+
from typing import TYPE_CHECKING
1212

1313
from azure.core.configuration import Configuration
1414
from azure.core.pipeline import policies
1515
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
1616

1717
from ._version import VERSION
1818

19+
if TYPE_CHECKING:
20+
# pylint: disable=unused-import,ungrouped-imports
21+
from typing import Any
22+
23+
from azure.core.credentials import TokenCredential
1924

2025
class AuthorizationManagementClientConfiguration(Configuration):
2126
"""Configuration for AuthorizationManagementClient.

sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/aio/_authorization_management_client.py

Lines changed: 438 additions & 10 deletions
Large diffs are not rendered by default.

sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/aio/_configuration.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@
88
# Changes may cause incorrect behavior and will be lost if the code is
99
# regenerated.
1010
# --------------------------------------------------------------------------
11-
from typing import Any
11+
from typing import Any, TYPE_CHECKING
1212

1313
from azure.core.configuration import Configuration
1414
from azure.core.pipeline import policies
1515
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
1616

1717
from .._version import VERSION
1818

19+
if TYPE_CHECKING:
20+
# pylint: disable=unused-import,ungrouped-imports
21+
from azure.core.credentials_async import AsyncTokenCredential
1922

2023
class AuthorizationManagementClientConfiguration(Configuration):
2124
"""Configuration for AuthorizationManagementClient.
@@ -31,8 +34,8 @@ class AuthorizationManagementClientConfiguration(Configuration):
3134

3235
def __init__(
3336
self,
34-
credential, # type: "AsyncTokenCredential"
35-
subscription_id, # type: str
37+
credential: "AsyncTokenCredential",
38+
subscription_id: str,
3639
**kwargs # type: Any
3740
) -> None:
3841
if credential is None:

sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2015_06_01/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
# --------------------------------------------------------------------------
88

99
from ._authorization_management_client import AuthorizationManagementClient
10+
from ._version import VERSION
11+
12+
__version__ = VERSION
1013
__all__ = ['AuthorizationManagementClient']
1114

1215
try:

sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2015_06_01/_authorization_management_client.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
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 AuthorizationManagementClientConfiguration
2122
from .operations import ClassicAdministratorsOperations
@@ -55,6 +56,24 @@ def __init__(
5556
self.classic_administrators = ClassicAdministratorsOperations(
5657
self._client, self._config, self._serialize, self._deserialize)
5758

59+
def _send_request(self, http_request, **kwargs):
60+
# type: (HttpRequest, Any) -> HttpResponse
61+
"""Runs the network request through the client's chained policies.
62+
63+
:param http_request: The network request you want to make. Required.
64+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
65+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
66+
:return: The response of your network call. Does not do error handling on your response.
67+
:rtype: ~azure.core.pipeline.transport.HttpResponse
68+
"""
69+
path_format_arguments = {
70+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
71+
}
72+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
73+
stream = kwargs.pop("stream", True)
74+
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
75+
return pipeline_response.http_response
76+
5877
def close(self):
5978
# type: () -> None
6079
self._client.close()

sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2015_06_01/_configuration.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@
1212
from azure.core.pipeline import policies
1313
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
1414

15+
from ._version import VERSION
16+
1517
if TYPE_CHECKING:
1618
# pylint: disable=unused-import,ungrouped-imports
1719
from typing import Any
1820

1921
from azure.core.credentials import TokenCredential
2022

21-
VERSION = "unknown"
2223

2324
class AuthorizationManagementClientConfiguration(Configuration):
2425
"""Configuration for AuthorizationManagementClient.

sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2015_06_01/_metadata.json

Lines changed: 52 additions & 10 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": false,
12-
"client_side_validation": false
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\": [\"AuthorizationManagementClientConfiguration\"]}}, \"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\": [\"AuthorizationManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
1315
},
1416
"global_parameters": {
1517
"sync": {
@@ -28,34 +30,74 @@
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 ID of the target subscription.",
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
"classic_administrators": "ClassicAdministratorsOperations"
56-
},
57-
"operation_mixins": {
58-
},
59-
"sync_imports": "None",
60-
"async_imports": "None"
102+
}
61103
}

0 commit comments

Comments
 (0)