Skip to content

Commit ad8c3bb

Browse files
author
SDKAuto
committed
CodeGen from PR 16431 in Azure/azure-rest-api-specs
Merge 55237cfe8ea393799b30c95c029cfee68aa09574 into 62ec790
1 parent 14496e7 commit ad8c3bb

File tree

14 files changed

+198
-44
lines changed

14 files changed

+198
-44
lines changed

sdk/notificationhubs/azure-mgmt-notificationhubs/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": "0418ecbffbf97c145408c915d741d7c73ab2295c",
8+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9+
"autorest_command": "autorest specification/notificationhubs/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/notificationhubs/resource-manager/readme.md"
11+
}
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
{
2+
"chosen_version": "2017-04-01",
3+
"total_api_version_list": ["2017-04-01"],
4+
"client": {
5+
"name": "NotificationHubsManagementClient",
6+
"filename": "_notification_hubs_management_client",
7+
"description": "Azure NotificationHub client.",
8+
"base_url": "\u0027https://management.azure.com\u0027",
9+
"custom_base_url": null,
10+
"azure_arm": true,
11+
"has_lro_operations": 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\": [\"NotificationHubsManagementClientConfiguration\"]}}, \"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\": [\"NotificationHubsManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
15+
},
16+
"global_parameters": {
17+
"sync": {
18+
"credential": {
19+
"signature": "credential, # type: \"TokenCredential\"",
20+
"description": "Credential needed for the client to connect to Azure.",
21+
"docstring_type": "~azure.core.credentials.TokenCredential",
22+
"required": true
23+
},
24+
"subscription_id": {
25+
"signature": "subscription_id, # type: str",
26+
"description": "Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
27+
"docstring_type": "str",
28+
"required": true
29+
}
30+
},
31+
"async": {
32+
"credential": {
33+
"signature": "credential: \"AsyncTokenCredential\",",
34+
"description": "Credential needed for the client to connect to Azure.",
35+
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
36+
"required": true
37+
},
38+
"subscription_id": {
39+
"signature": "subscription_id: str,",
40+
"description": "Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
41+
"docstring_type": "str",
42+
"required": true
43+
}
44+
},
45+
"constant": {
46+
},
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+
}
90+
},
91+
"config": {
92+
"credential": true,
93+
"credential_scopes": ["https://management.azure.com/.default"],
94+
"credential_default_policy_type": "BearerTokenCredentialPolicy",
95+
"credential_default_policy_type_has_async_version": true,
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\"]}}}"
99+
},
100+
"operation_groups": {
101+
"operations": "Operations",
102+
"namespaces": "NamespacesOperations",
103+
"notification_hubs": "NotificationHubsOperations"
104+
}
105+
}

sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/_notification_hubs_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 NotificationHubsManagementClientConfiguration
2122
from .operations import Operations
@@ -66,6 +67,24 @@ def __init__(
6667
self.notification_hubs = NotificationHubsOperations(
6768
self._client, self._config, self._serialize, self._deserialize)
6869

70+
def _send_request(self, http_request, **kwargs):
71+
# type: (HttpRequest, Any) -> HttpResponse
72+
"""Runs the network request through the client's chained policies.
73+
74+
:param http_request: The network request you want to make. Required.
75+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
76+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
77+
:return: The response of your network call. Does not do error handling on your response.
78+
:rtype: ~azure.core.pipeline.transport.HttpResponse
79+
"""
80+
path_format_arguments = {
81+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
82+
}
83+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
84+
stream = kwargs.pop("stream", True)
85+
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
86+
return pipeline_response.http_response
87+
6988
def close(self):
7089
# type: () -> None
7190
self._client.close()

sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/_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 = "7.0.0"
9+
VERSION = "7.0.0b1"

sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/aio/_notification_hubs_management_client.py

Lines changed: 18 additions & 0 deletions
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

@@ -63,6 +64,23 @@ def __init__(
6364
self.notification_hubs = NotificationHubsOperations(
6465
self._client, self._config, self._serialize, self._deserialize)
6566

67+
async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
68+
"""Runs the network request through the client's chained policies.
69+
70+
:param http_request: The network request you want to make. Required.
71+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
72+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
73+
:return: The response of your network call. Does not do error handling on your response.
74+
:rtype: ~azure.core.pipeline.transport.AsyncHttpResponse
75+
"""
76+
path_format_arguments = {
77+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
78+
}
79+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
80+
stream = kwargs.pop("stream", True)
81+
pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs)
82+
return pipeline_response.http_response
83+
6684
async def close(self) -> None:
6785
await self._client.close()
6886

sdk/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/aio/operations/_namespaces_operations.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:
4646
async def check_availability(
4747
self,
4848
parameters: "_models.CheckAvailabilityParameters",
49-
**kwargs
49+
**kwargs: Any
5050
) -> "_models.CheckAvailabilityResult":
5151
"""Checks the availability of the given service namespace across all Azure subscriptions. This is
5252
useful because the domain name is created based on the service namespace name.
@@ -107,7 +107,7 @@ async def create_or_update(
107107
resource_group_name: str,
108108
namespace_name: str,
109109
parameters: "_models.NamespaceCreateOrUpdateParameters",
110-
**kwargs
110+
**kwargs: Any
111111
) -> "_models.NamespaceResource":
112112
"""Creates/Updates a service namespace. Once created, this namespace's resource manifest is
113113
immutable. This operation is idempotent.
@@ -178,7 +178,7 @@ async def patch(
178178
resource_group_name: str,
179179
namespace_name: str,
180180
parameters: "_models.NamespacePatchParameters",
181-
**kwargs
181+
**kwargs: Any
182182
) -> "_models.NamespaceResource":
183183
"""Patches the existing namespace.
184184
@@ -243,7 +243,7 @@ async def _delete_initial(
243243
self,
244244
resource_group_name: str,
245245
namespace_name: str,
246-
**kwargs
246+
**kwargs: Any
247247
) -> None:
248248
cls = kwargs.pop('cls', None) # type: ClsType[None]
249249
error_map = {
@@ -285,7 +285,7 @@ async def begin_delete(
285285
self,
286286
resource_group_name: str,
287287
namespace_name: str,
288-
**kwargs
288+
**kwargs: Any
289289
) -> AsyncLROPoller[None]:
290290
"""Deletes an existing namespace. This operation also removes all associated notificationHubs
291291
under the namespace.
@@ -296,8 +296,8 @@ async def begin_delete(
296296
:type namespace_name: str
297297
:keyword callable cls: A custom type or function that will be passed the direct response
298298
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
299-
:keyword polling: True for ARMPolling, False for no polling, or a
300-
polling object for personal polling strategy
299+
:keyword polling: By default, your polling method will be AsyncARMPolling.
300+
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
301301
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
302302
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
303303
:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
@@ -350,7 +350,7 @@ async def get(
350350
self,
351351
resource_group_name: str,
352352
namespace_name: str,
353-
**kwargs
353+
**kwargs: Any
354354
) -> "_models.NamespaceResource":
355355
"""Returns the description for the specified namespace.
356356
@@ -410,7 +410,7 @@ async def create_or_update_authorization_rule(
410410
namespace_name: str,
411411
authorization_rule_name: str,
412412
parameters: "_models.SharedAccessAuthorizationRuleCreateOrUpdateParameters",
413-
**kwargs
413+
**kwargs: Any
414414
) -> "_models.SharedAccessAuthorizationRuleResource":
415415
"""Creates an authorization rule for a namespace.
416416
@@ -479,7 +479,7 @@ async def delete_authorization_rule(
479479
resource_group_name: str,
480480
namespace_name: str,
481481
authorization_rule_name: str,
482-
**kwargs
482+
**kwargs: Any
483483
) -> None:
484484
"""Deletes a namespace authorization rule.
485485
@@ -536,7 +536,7 @@ async def get_authorization_rule(
536536
resource_group_name: str,
537537
namespace_name: str,
538538
authorization_rule_name: str,
539-
**kwargs
539+
**kwargs: Any
540540
) -> "_models.SharedAccessAuthorizationRuleResource":
541541
"""Gets an authorization rule for a namespace by name.
542542
@@ -596,7 +596,7 @@ async def get_authorization_rule(
596596
def list(
597597
self,
598598
resource_group_name: str,
599-
**kwargs
599+
**kwargs: Any
600600
) -> AsyncIterable["_models.NamespaceListResult"]:
601601
"""Lists the available namespaces within a resourceGroup.
602602
@@ -666,7 +666,7 @@ async def get_next(next_link=None):
666666

667667
def list_all(
668668
self,
669-
**kwargs
669+
**kwargs: Any
670670
) -> AsyncIterable["_models.NamespaceListResult"]:
671671
"""Lists all the available namespaces within the subscription irrespective of the resourceGroups.
672672
@@ -734,7 +734,7 @@ def list_authorization_rules(
734734
self,
735735
resource_group_name: str,
736736
namespace_name: str,
737-
**kwargs
737+
**kwargs: Any
738738
) -> AsyncIterable["_models.SharedAccessAuthorizationRuleListResult"]:
739739
"""Gets the authorization rules for a namespace.
740740
@@ -809,7 +809,7 @@ async def list_keys(
809809
resource_group_name: str,
810810
namespace_name: str,
811811
authorization_rule_name: str,
812-
**kwargs
812+
**kwargs: Any
813813
) -> "_models.SharedAccessAuthorizationRuleListResult":
814814
"""Gets the Primary and Secondary ConnectionStrings to the namespace.
815815
@@ -873,7 +873,7 @@ async def regenerate_keys(
873873
namespace_name: str,
874874
authorization_rule_name: str,
875875
parameters: "_models.PolicykeyResource",
876-
**kwargs
876+
**kwargs: Any
877877
) -> "_models.ResourceListKeys":
878878
"""Regenerates the Primary/Secondary Keys to the Namespace Authorization Rule.
879879

0 commit comments

Comments
 (0)