Skip to content

Commit

Permalink
Generated from 62120860065432e40cadb266c1c15e48550062f8
Browse files Browse the repository at this point in the history
updated examples
  • Loading branch information
SDK Automation committed Sep 3, 2020
1 parent f3360b4 commit 140511e
Show file tree
Hide file tree
Showing 18 changed files with 1,190 additions and 70 deletions.
2 changes: 1 addition & 1 deletion sdk/eventhub/azure-mgmt-eventhub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ For a more complete view of Azure libraries, see the [azure sdk python release](

# Usage

For code examples, see [EventHub Management](https://docs.microsoft.com/python/api/overview/azure/event-hub?view=azure-python-preview)
For code examples, see [EventHub Management](https://docs.microsoft.com/python/api/overview/azure/event-hub)
on docs.microsoft.com.


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,32 @@ def operations(self):
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def private_endpoint_connections(self):
"""Instance depends on the API version:
* 2018-01-01-preview: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.eventhub.v2018_01_01_preview.operations.PrivateEndpointConnectionsOperations>`
"""
api_version = self._get_api_version('private_endpoint_connections')
if api_version == '2018-01-01-preview':
from .v2018_01_01_preview.operations import PrivateEndpointConnectionsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def private_link_resources(self):
"""Instance depends on the API version:
* 2018-01-01-preview: :class:`PrivateLinkResourcesOperations<azure.mgmt.eventhub.v2018_01_01_preview.operations.PrivateLinkResourcesOperations>`
"""
api_version = self._get_api_version('private_link_resources')
if api_version == '2018-01-01-preview':
from .v2018_01_01_preview.operations import PrivateLinkResourcesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def regions(self):
"""Instance depends on the API version:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
from ._models_py3 import ConsumerGroup
from ._models_py3 import Destination
from ._models_py3 import EHNamespace
from ._models_py3 import ErrorAdditionalInfo
from ._models_py3 import ErrorResponse, ErrorResponseException
from ._models_py3 import ErrorResponseError
from ._models_py3 import Eventhub
from ._models_py3 import MessagingPlan
from ._models_py3 import MessagingRegions
Expand All @@ -44,7 +46,9 @@
from ._models import ConsumerGroup
from ._models import Destination
from ._models import EHNamespace
from ._models import ErrorAdditionalInfo
from ._models import ErrorResponse, ErrorResponseException
from ._models import ErrorResponseError
from ._models import Eventhub
from ._models import MessagingPlan
from ._models import MessagingRegions
Expand Down Expand Up @@ -91,7 +95,9 @@
'ConsumerGroup',
'Destination',
'EHNamespace',
'ErrorAdditionalInfo',
'ErrorResponse', 'ErrorResponseException',
'ErrorResponseError',
'Eventhub',
'MessagingPlan',
'MessagingRegions',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -523,25 +523,48 @@ def __init__(self, **kwargs):
self.kafka_enabled = kwargs.get('kafka_enabled', None)


class ErrorAdditionalInfo(Model):
"""The resource management error additional info.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar type: The additional info type.
:vartype type: str
:ivar info: The additional info.
:vartype info: object
"""

_validation = {
'type': {'readonly': True},
'info': {'readonly': True},
}

_attribute_map = {
'type': {'key': 'type', 'type': 'str'},
'info': {'key': 'info', 'type': 'object'},
}

def __init__(self, **kwargs):
super(ErrorAdditionalInfo, self).__init__(**kwargs)
self.type = None
self.info = None


class ErrorResponse(Model):
"""Error response indicates Event Hub service is not able to process the
incoming request. The reason is provided in the error message.
"""The resource management error response.
:param code: Error code.
:type code: str
:param message: Error message indicating why the operation failed.
:type message: str
:param error: The error object.
:type error: ~azure.mgmt.eventhub.v2017_04_01.models.ErrorResponseError
"""

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
'error': {'key': 'error', 'type': 'ErrorResponseError'},
}

def __init__(self, **kwargs):
super(ErrorResponse, self).__init__(**kwargs)
self.code = kwargs.get('code', None)
self.message = kwargs.get('message', None)
self.error = kwargs.get('error', None)


class ErrorResponseException(HttpOperationError):
Expand All @@ -556,6 +579,51 @@ def __init__(self, deserialize, response, *args):
super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args)


class ErrorResponseError(Model):
"""The error object.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar code: The error code.
:vartype code: str
:ivar message: The error message.
:vartype message: str
:ivar target: The error target.
:vartype target: str
:ivar details: The error details.
:vartype details:
list[~azure.mgmt.eventhub.v2017_04_01.models.ErrorResponse]
:ivar additional_info: The error additional info.
:vartype additional_info:
list[~azure.mgmt.eventhub.v2017_04_01.models.ErrorAdditionalInfo]
"""

_validation = {
'code': {'readonly': True},
'message': {'readonly': True},
'target': {'readonly': True},
'details': {'readonly': True},
'additional_info': {'readonly': True},
}

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
'target': {'key': 'target', 'type': 'str'},
'details': {'key': 'details', 'type': '[ErrorResponse]'},
'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'},
}

def __init__(self, **kwargs):
super(ErrorResponseError, self).__init__(**kwargs)
self.code = None
self.message = None
self.target = None
self.details = None
self.additional_info = None


class Eventhub(Resource):
"""Single item in List or Get Event Hub operation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -523,25 +523,48 @@ def __init__(self, *, location: str=None, tags=None, sku=None, is_auto_inflate_e
self.kafka_enabled = kafka_enabled


class ErrorAdditionalInfo(Model):
"""The resource management error additional info.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar type: The additional info type.
:vartype type: str
:ivar info: The additional info.
:vartype info: object
"""

_validation = {
'type': {'readonly': True},
'info': {'readonly': True},
}

_attribute_map = {
'type': {'key': 'type', 'type': 'str'},
'info': {'key': 'info', 'type': 'object'},
}

def __init__(self, **kwargs) -> None:
super(ErrorAdditionalInfo, self).__init__(**kwargs)
self.type = None
self.info = None


class ErrorResponse(Model):
"""Error response indicates Event Hub service is not able to process the
incoming request. The reason is provided in the error message.
"""The resource management error response.
:param code: Error code.
:type code: str
:param message: Error message indicating why the operation failed.
:type message: str
:param error: The error object.
:type error: ~azure.mgmt.eventhub.v2017_04_01.models.ErrorResponseError
"""

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
'error': {'key': 'error', 'type': 'ErrorResponseError'},
}

def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None:
def __init__(self, *, error=None, **kwargs) -> None:
super(ErrorResponse, self).__init__(**kwargs)
self.code = code
self.message = message
self.error = error


class ErrorResponseException(HttpOperationError):
Expand All @@ -556,6 +579,51 @@ def __init__(self, deserialize, response, *args):
super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args)


class ErrorResponseError(Model):
"""The error object.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar code: The error code.
:vartype code: str
:ivar message: The error message.
:vartype message: str
:ivar target: The error target.
:vartype target: str
:ivar details: The error details.
:vartype details:
list[~azure.mgmt.eventhub.v2017_04_01.models.ErrorResponse]
:ivar additional_info: The error additional info.
:vartype additional_info:
list[~azure.mgmt.eventhub.v2017_04_01.models.ErrorAdditionalInfo]
"""

_validation = {
'code': {'readonly': True},
'message': {'readonly': True},
'target': {'readonly': True},
'details': {'readonly': True},
'additional_info': {'readonly': True},
}

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
'target': {'key': 'target', 'type': 'str'},
'details': {'key': 'details', 'type': '[ErrorResponse]'},
'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'},
}

def __init__(self, **kwargs) -> None:
super(ErrorResponseError, self).__init__(**kwargs)
self.code = None
self.message = None
self.target = None
self.details = None
self.additional_info = None


class Eventhub(Resource):
"""Single item in List or Get Event Hub operation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def create_or_update(
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6),
'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1),
'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1),
'consumerGroupName': self._serialize.url("consumer_group_name", consumer_group_name, 'str', max_length=50, min_length=1),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
Expand Down Expand Up @@ -146,7 +146,7 @@ def delete(
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6),
'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1),
'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1),
'consumerGroupName': self._serialize.url("consumer_group_name", consumer_group_name, 'str', max_length=50, min_length=1),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
Expand Down Expand Up @@ -206,7 +206,7 @@ def get(
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6),
'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1),
'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1),
'consumerGroupName': self._serialize.url("consumer_group_name", consumer_group_name, 'str', max_length=50, min_length=1),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
Expand Down Expand Up @@ -282,7 +282,7 @@ def prepare_request(next_link=None):
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6),
'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=50, min_length=1),
'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down
Loading

0 comments on commit 140511e

Please sign in to comment.