Skip to content

Commit

Permalink
CodeGen from PR 12591 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
fix readme Configuration Tags for eventhub (Azure#12591)
  • Loading branch information
SDKAuto committed Feb 22, 2021
1 parent 47957be commit f0fc0f2
Show file tree
Hide file tree
Showing 51 changed files with 1,075 additions and 954 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ def __init__(

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

self.operations = Operations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,33 @@
"base_url": "\u0027https://management.azure.com\u0027",
"custom_base_url": null,
"azure_arm": true,
"has_lro_operations": true
"has_lro_operations": true,
"client_side_validation": true
},
"global_parameters": {
"sync_method": {
"sync": {
"credential": {
"method_signature": "credential, # type: \"TokenCredential\"",
"signature": "credential, # type: \"TokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials.TokenCredential",
"required": true
},
"subscription_id": {
"method_signature": "subscription_id, # type: str",
"signature": "subscription_id, # type: str",
"description": "Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
"docstring_type": "str",
"required": true
}
},
"async_method": {
"async": {
"credential": {
"method_signature": "credential, # type: \"AsyncTokenCredential\"",
"signature": "credential, # type: \"AsyncTokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
"required": true
},
"subscription_id": {
"method_signature": "subscription_id, # type: str",
"signature": "subscription_id, # type: str",
"description": "Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
"docstring_type": "str",
"required": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ def __init__(

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

self.operations = Operations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.mgmt.core.exceptions import ARMErrorFormat

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

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

models = models
models = _models

def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
Expand All @@ -47,9 +47,9 @@ async def create_or_update(
namespace_name: str,
event_hub_name: str,
consumer_group_name: str,
parameters: "models.ConsumerGroupCreateOrUpdateParameters",
parameters: "_models.ConsumerGroupCreateOrUpdateParameters",
**kwargs
) -> "models.ConsumerGroupResource":
) -> "_models.ConsumerGroupResource":
"""Creates or updates an Event Hubs consumer group as a nested resource within a Namespace.
:param resource_group_name: Name of the resource group within the azure subscription.
Expand All @@ -67,7 +67,7 @@ async def create_or_update(
:rtype: ~azure.mgmt.eventhub.v2015_08_01.models.ConsumerGroupResource
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.ConsumerGroupResource"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.ConsumerGroupResource"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -183,7 +183,7 @@ async def get(
event_hub_name: str,
consumer_group_name: str,
**kwargs
) -> "models.ConsumerGroupResource":
) -> "_models.ConsumerGroupResource":
"""Gets a description for the specified consumer group.
:param resource_group_name: Name of the resource group within the azure subscription.
Expand All @@ -199,7 +199,7 @@ async def get(
:rtype: ~azure.mgmt.eventhub.v2015_08_01.models.ConsumerGroupResource
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.ConsumerGroupResource"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.ConsumerGroupResource"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -248,7 +248,7 @@ def list_all(
namespace_name: str,
event_hub_name: str,
**kwargs
) -> AsyncIterable["models.ConsumerGroupListResult"]:
) -> AsyncIterable["_models.ConsumerGroupListResult"]:
"""Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group
exists in the Namespace.
Expand All @@ -263,7 +263,7 @@ def list_all(
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventhub.v2015_08_01.models.ConsumerGroupListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.ConsumerGroupListResult"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.ConsumerGroupListResult"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.mgmt.core.exceptions import ARMErrorFormat

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

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

models = models
models = _models

def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
Expand All @@ -46,7 +46,7 @@ def list_all(
resource_group_name: str,
namespace_name: str,
**kwargs
) -> AsyncIterable["models.EventHubListResult"]:
) -> AsyncIterable["_models.EventHubListResult"]:
"""Gets all the Event Hubs in a Namespace.
:param resource_group_name: Name of the resource group within the azure subscription.
Expand All @@ -58,7 +58,7 @@ def list_all(
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventhub.v2015_08_01.models.EventHubListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.EventHubListResult"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.EventHubListResult"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -120,9 +120,9 @@ async def create_or_update(
resource_group_name: str,
namespace_name: str,
event_hub_name: str,
parameters: "models.EventHubCreateOrUpdateParameters",
parameters: "_models.EventHubCreateOrUpdateParameters",
**kwargs
) -> "models.EventHubResource":
) -> "_models.EventHubResource":
"""Creates or updates a new Event Hub as a nested resource within a Namespace.
:param resource_group_name: Name of the resource group within the azure subscription.
Expand All @@ -138,7 +138,7 @@ async def create_or_update(
:rtype: ~azure.mgmt.eventhub.v2015_08_01.models.EventHubResource
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.EventHubResource"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.EventHubResource"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -248,7 +248,7 @@ async def get(
namespace_name: str,
event_hub_name: str,
**kwargs
) -> "models.EventHubResource":
) -> "_models.EventHubResource":
"""Gets an Event Hubs description for the specified Event Hub.
:param resource_group_name: Name of the resource group within the azure subscription.
Expand All @@ -262,7 +262,7 @@ async def get(
:rtype: ~azure.mgmt.eventhub.v2015_08_01.models.EventHubResource
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.EventHubResource"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.EventHubResource"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -310,7 +310,7 @@ def list_authorization_rules(
namespace_name: str,
event_hub_name: str,
**kwargs
) -> AsyncIterable["models.SharedAccessAuthorizationRuleListResult"]:
) -> AsyncIterable["_models.SharedAccessAuthorizationRuleListResult"]:
"""Gets the authorization rules for an Event Hub.
:param resource_group_name: Name of the resource group within the azure subscription.
Expand All @@ -324,7 +324,7 @@ def list_authorization_rules(
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventhub.v2015_08_01.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 @@ -388,9 +388,9 @@ async def create_or_update_authorization_rule(
namespace_name: str,
event_hub_name: str,
authorization_rule_name: str,
parameters: "models.SharedAccessAuthorizationRuleCreateOrUpdateParameters",
parameters: "_models.SharedAccessAuthorizationRuleCreateOrUpdateParameters",
**kwargs
) -> "models.SharedAccessAuthorizationRuleResource":
) -> "_models.SharedAccessAuthorizationRuleResource":
"""Creates or updates an AuthorizationRule for the specified Event Hub.
:param resource_group_name: Name of the resource group within the azure subscription.
Expand All @@ -408,7 +408,7 @@ async def create_or_update_authorization_rule(
:rtype: ~azure.mgmt.eventhub.v2015_08_01.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 @@ -463,7 +463,7 @@ async def get_authorization_rule(
event_hub_name: str,
authorization_rule_name: str,
**kwargs
) -> "models.SharedAccessAuthorizationRuleResource":
) -> "_models.SharedAccessAuthorizationRuleResource":
"""Gets an AuthorizationRule for an Event Hub by rule name.
:param resource_group_name: Name of the resource group within the azure subscription.
Expand All @@ -479,7 +479,7 @@ async def get_authorization_rule(
:rtype: ~azure.mgmt.eventhub.v2015_08_01.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 @@ -529,7 +529,7 @@ async def post_authorization_rule(
event_hub_name: str,
authorization_rule_name: str,
**kwargs
) -> "models.SharedAccessAuthorizationRuleResource":
) -> "_models.SharedAccessAuthorizationRuleResource":
"""Gets an AuthorizationRule for an Event Hub by rule name.
:param resource_group_name: Name of the resource group within the azure subscription.
Expand All @@ -545,7 +545,7 @@ async def post_authorization_rule(
:rtype: ~azure.mgmt.eventhub.v2015_08_01.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 @@ -656,7 +656,7 @@ async def list_keys(
event_hub_name: str,
authorization_rule_name: str,
**kwargs
) -> "models.ResourceListKeys":
) -> "_models.ResourceListKeys":
"""Gets the ACS and SAS connection strings for the Event Hub.
:param resource_group_name: Name of the resource group within the azure subscription.
Expand All @@ -672,7 +672,7 @@ async def list_keys(
:rtype: ~azure.mgmt.eventhub.v2015_08_01.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 Expand Up @@ -721,9 +721,9 @@ async def regenerate_keys(
namespace_name: str,
event_hub_name: str,
authorization_rule_name: str,
parameters: "models.RegenerateKeysParameters",
parameters: "_models.RegenerateKeysParameters",
**kwargs
) -> "models.ResourceListKeys":
) -> "_models.ResourceListKeys":
"""Regenerates the ACS and SAS connection strings for the Event Hub.
:param resource_group_name: Name of the resource group within the azure subscription.
Expand All @@ -742,7 +742,7 @@ async def regenerate_keys(
:rtype: ~azure.mgmt.eventhub.v2015_08_01.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

0 comments on commit f0fc0f2

Please sign in to comment.