Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[T2]GA notificationhubs #15903

Merged
merged 1 commit into from
Jan 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions sdk/notificationhubs/azure-mgmt-notificationhubs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release History

## 7.0.0 (2020-12-22)

- GA release

## 7.0.0b1 (2020-10-28)

This is beta preview version.
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 = "7.0.0b1"
VERSION = "7.0.0"
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from azure.mgmt.core.exceptions import ARMErrorFormat
from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling

from ... import models
from ... import models as _models

T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
Expand All @@ -35,7 +35,7 @@ class NamespacesOperations:
:param deserializer: An object model deserializer.
"""

models = models
models = _models

def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
Expand All @@ -45,9 +45,9 @@ def __init__(self, client, config, serializer, deserializer) -> None:

async def check_availability(
self,
parameters: "models.CheckAvailabilityParameters",
parameters: "_models.CheckAvailabilityParameters",
**kwargs
) -> "models.CheckAvailabilityResult":
) -> "_models.CheckAvailabilityResult":
"""Checks the availability of the given service namespace across all Azure subscriptions. This is
useful because the domain name is created based on the service namespace name.

Expand All @@ -58,7 +58,7 @@ async def check_availability(
:rtype: ~azure.mgmt.notificationhubs.models.CheckAvailabilityResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.CheckAvailabilityResult"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckAvailabilityResult"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -106,9 +106,9 @@ async def create_or_update(
self,
resource_group_name: str,
namespace_name: str,
parameters: "models.NamespaceCreateOrUpdateParameters",
parameters: "_models.NamespaceCreateOrUpdateParameters",
**kwargs
) -> "models.NamespaceResource":
) -> "_models.NamespaceResource":
"""Creates/Updates a service namespace. Once created, this namespace's resource manifest is
immutable. This operation is idempotent.

Expand All @@ -123,7 +123,7 @@ async def create_or_update(
:rtype: ~azure.mgmt.notificationhubs.models.NamespaceResource
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.NamespaceResource"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.NamespaceResource"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -177,9 +177,9 @@ async def patch(
self,
resource_group_name: str,
namespace_name: str,
parameters: "models.NamespacePatchParameters",
parameters: "_models.NamespacePatchParameters",
**kwargs
) -> "models.NamespaceResource":
) -> "_models.NamespaceResource":
"""Patches the existing namespace.

:param resource_group_name: The name of the resource group.
Expand All @@ -193,7 +193,7 @@ async def patch(
:rtype: ~azure.mgmt.notificationhubs.models.NamespaceResource
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.NamespaceResource"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.NamespaceResource"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -326,7 +326,13 @@ def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})

if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'),
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}

if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
Expand All @@ -345,7 +351,7 @@ async def get(
resource_group_name: str,
namespace_name: str,
**kwargs
) -> "models.NamespaceResource":
) -> "_models.NamespaceResource":
"""Returns the description for the specified namespace.

:param resource_group_name: The name of the resource group.
Expand All @@ -357,7 +363,7 @@ async def get(
:rtype: ~azure.mgmt.notificationhubs.models.NamespaceResource
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.NamespaceResource"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.NamespaceResource"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -403,9 +409,9 @@ async def create_or_update_authorization_rule(
resource_group_name: str,
namespace_name: str,
authorization_rule_name: str,
parameters: "models.SharedAccessAuthorizationRuleCreateOrUpdateParameters",
parameters: "_models.SharedAccessAuthorizationRuleCreateOrUpdateParameters",
**kwargs
) -> "models.SharedAccessAuthorizationRuleResource":
) -> "_models.SharedAccessAuthorizationRuleResource":
"""Creates an authorization rule for a namespace.

:param resource_group_name: The name of the resource group.
Expand All @@ -421,7 +427,7 @@ async def create_or_update_authorization_rule(
:rtype: ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResource
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.SharedAccessAuthorizationRuleResource"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.SharedAccessAuthorizationRuleResource"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -531,7 +537,7 @@ async def get_authorization_rule(
namespace_name: str,
authorization_rule_name: str,
**kwargs
) -> "models.SharedAccessAuthorizationRuleResource":
) -> "_models.SharedAccessAuthorizationRuleResource":
"""Gets an authorization rule for a namespace by name.

:param resource_group_name: The name of the resource group.
Expand All @@ -545,7 +551,7 @@ async def get_authorization_rule(
:rtype: ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleResource
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.SharedAccessAuthorizationRuleResource"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.SharedAccessAuthorizationRuleResource"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -591,7 +597,7 @@ def list(
self,
resource_group_name: str,
**kwargs
) -> AsyncIterable["models.NamespaceListResult"]:
) -> AsyncIterable["_models.NamespaceListResult"]:
"""Lists the available namespaces within a resourceGroup.

:param resource_group_name: The name of the resource group. If resourceGroupName value is null
Expand All @@ -602,7 +608,7 @@ def list(
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.notificationhubs.models.NamespaceListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.NamespaceListResult"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.NamespaceListResult"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -661,15 +667,15 @@ async def get_next(next_link=None):
def list_all(
self,
**kwargs
) -> AsyncIterable["models.NamespaceListResult"]:
) -> AsyncIterable["_models.NamespaceListResult"]:
"""Lists all the available namespaces within the subscription irrespective of the resourceGroups.

:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either NamespaceListResult or the result of cls(response)
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.notificationhubs.models.NamespaceListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.NamespaceListResult"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.NamespaceListResult"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -729,7 +735,7 @@ def list_authorization_rules(
resource_group_name: str,
namespace_name: str,
**kwargs
) -> AsyncIterable["models.SharedAccessAuthorizationRuleListResult"]:
) -> AsyncIterable["_models.SharedAccessAuthorizationRuleListResult"]:
"""Gets the authorization rules for a namespace.

:param resource_group_name: The name of the resource group.
Expand All @@ -741,7 +747,7 @@ def list_authorization_rules(
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.SharedAccessAuthorizationRuleListResult"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.SharedAccessAuthorizationRuleListResult"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -804,7 +810,7 @@ async def list_keys(
namespace_name: str,
authorization_rule_name: str,
**kwargs
) -> "models.SharedAccessAuthorizationRuleListResult":
) -> "_models.SharedAccessAuthorizationRuleListResult":
"""Gets the Primary and Secondary ConnectionStrings to the namespace.

:param resource_group_name: The name of the resource group.
Expand All @@ -819,7 +825,7 @@ async def list_keys(
:rtype: ~azure.mgmt.notificationhubs.models.SharedAccessAuthorizationRuleListResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.SharedAccessAuthorizationRuleListResult"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.SharedAccessAuthorizationRuleListResult"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -866,9 +872,9 @@ async def regenerate_keys(
resource_group_name: str,
namespace_name: str,
authorization_rule_name: str,
parameters: "models.PolicykeyResource",
parameters: "_models.PolicykeyResource",
**kwargs
) -> "models.ResourceListKeys":
) -> "_models.ResourceListKeys":
"""Regenerates the Primary/Secondary Keys to the Namespace Authorization Rule.

:param resource_group_name: The name of the resource group.
Expand All @@ -885,7 +891,7 @@ async def regenerate_keys(
:rtype: ~azure.mgmt.notificationhubs.models.ResourceListKeys
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.ResourceListKeys"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceListKeys"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down
Loading