Skip to content

Commit

Permalink
Generated from eccd0ab7c8d44acd1bbb8413573076ebf3f8b74f (#2045)
Browse files Browse the repository at this point in the history
Added the missing API discovered in ARM_RP_Fundamentals to the respective API version swagger and review comments
  • Loading branch information
AutorestCI committed Feb 28, 2018
1 parent f746c62 commit 423fe60
Show file tree
Hide file tree
Showing 15 changed files with 493 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
from .version import VERSION
from .operations.operations import Operations
from .operations.namespaces_operations import NamespacesOperations
from .operations.messaging_plan_operations import MessagingPlanOperations
from .operations.disaster_recovery_configs_operations import DisasterRecoveryConfigsOperations
from .operations.event_hubs_operations import EventHubsOperations
from .operations.consumer_groups_operations import ConsumerGroupsOperations
from .operations.regions_operations import RegionsOperations
from . import models


Expand Down Expand Up @@ -65,12 +67,16 @@ class EventHubManagementClient(object):
:vartype operations: azure.mgmt.eventhub.operations.Operations
:ivar namespaces: Namespaces operations
:vartype namespaces: azure.mgmt.eventhub.operations.NamespacesOperations
:ivar messaging_plan: MessagingPlan operations
:vartype messaging_plan: azure.mgmt.eventhub.operations.MessagingPlanOperations
:ivar disaster_recovery_configs: DisasterRecoveryConfigs operations
:vartype disaster_recovery_configs: azure.mgmt.eventhub.operations.DisasterRecoveryConfigsOperations
:ivar event_hubs: EventHubs operations
:vartype event_hubs: azure.mgmt.eventhub.operations.EventHubsOperations
:ivar consumer_groups: ConsumerGroups operations
:vartype consumer_groups: azure.mgmt.eventhub.operations.ConsumerGroupsOperations
:ivar regions: Regions operations
:vartype regions: azure.mgmt.eventhub.operations.RegionsOperations
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand All @@ -97,9 +103,13 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.namespaces = NamespacesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.messaging_plan = MessagingPlanOperations(
self._client, self.config, self._serialize, self._deserialize)
self.disaster_recovery_configs = DisasterRecoveryConfigsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.event_hubs = EventHubsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.consumer_groups = ConsumerGroupsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.regions = RegionsOperations(
self._client, self.config, self._serialize, self._deserialize)
8 changes: 8 additions & 0 deletions azure-mgmt-eventhub/azure/mgmt/eventhub/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@
from .operation import Operation
from .error_response import ErrorResponse, ErrorResponseException
from .arm_disaster_recovery import ArmDisasterRecovery
from .messaging_regions_properties import MessagingRegionsProperties
from .messaging_regions import MessagingRegions
from .messaging_plan import MessagingPlan
from .operation_paged import OperationPaged
from .eh_namespace_paged import EHNamespacePaged
from .authorization_rule_paged import AuthorizationRulePaged
from .arm_disaster_recovery_paged import ArmDisasterRecoveryPaged
from .eventhub_paged import EventhubPaged
from .consumer_group_paged import ConsumerGroupPaged
from .messaging_regions_paged import MessagingRegionsPaged
from .event_hub_management_client_enums import (
SkuName,
SkuTier,
Expand Down Expand Up @@ -62,12 +66,16 @@
'Operation',
'ErrorResponse', 'ErrorResponseException',
'ArmDisasterRecovery',
'MessagingRegionsProperties',
'MessagingRegions',
'MessagingPlan',
'OperationPaged',
'EHNamespacePaged',
'AuthorizationRulePaged',
'ArmDisasterRecoveryPaged',
'EventhubPaged',
'ConsumerGroupPaged',
'MessagingRegionsPaged',
'SkuName',
'SkuTier',
'AccessRights',
Expand Down
65 changes: 65 additions & 0 deletions azure-mgmt-eventhub/azure/mgmt/eventhub/models/messaging_plan.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from .tracked_resource import TrackedResource


class MessagingPlan(TrackedResource):
"""Messaging.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
:param location: Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
:param sku: Sku type
:type sku: int
:param selected_event_hub_unit: Selected event hub unit
:type selected_event_hub_unit: int
:ivar updated_at: The exact time the messaging plan was updated.
:vartype updated_at: datetime
:param revision: revision number
:type revision: long
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'updated_at': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'sku': {'key': 'properties.sku', 'type': 'int'},
'selected_event_hub_unit': {'key': 'properties.selectedEventHubUnit', 'type': 'int'},
'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'},
'revision': {'key': 'properties.revision', 'type': 'long'},
}

def __init__(self, location=None, tags=None, sku=None, selected_event_hub_unit=None, revision=None):
super(MessagingPlan, self).__init__(location=location, tags=tags)
self.sku = sku
self.selected_event_hub_unit = selected_event_hub_unit
self.updated_at = None
self.revision = revision
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from .tracked_resource import TrackedResource


class MessagingRegions(TrackedResource):
"""Messaging Region.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
:param location: Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
:param properties:
:type properties: ~azure.mgmt.eventhub.models.MessagingRegionsProperties
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'properties': {'key': 'properties', 'type': 'MessagingRegionsProperties'},
}

def __init__(self, location=None, tags=None, properties=None):
super(MessagingRegions, self).__init__(location=location, tags=tags)
self.properties = properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.paging import Paged


class MessagingRegionsPaged(Paged):
"""
A paging container for iterating over a list of :class:`MessagingRegions <azure.mgmt.eventhub.models.MessagingRegions>` object
"""

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[MessagingRegions]'}
}

def __init__(self, *args, **kwargs):

super(MessagingRegionsPaged, self).__init__(*args, **kwargs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class MessagingRegionsProperties(Model):
"""MessagingRegionsProperties.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar code: Region code
:vartype code: str
:ivar full_name: Full name of the region
:vartype full_name: str
"""

_validation = {
'code': {'readonly': True},
'full_name': {'readonly': True},
}

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'full_name': {'key': 'fullName', 'type': 'str'},
}

def __init__(self):
super(MessagingRegionsProperties, self).__init__()
self.code = None
self.full_name = None
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@

from .operations import Operations
from .namespaces_operations import NamespacesOperations
from .messaging_plan_operations import MessagingPlanOperations
from .disaster_recovery_configs_operations import DisasterRecoveryConfigsOperations
from .event_hubs_operations import EventHubsOperations
from .consumer_groups_operations import ConsumerGroupsOperations
from .regions_operations import RegionsOperations

__all__ = [
'Operations',
'NamespacesOperations',
'MessagingPlanOperations',
'DisasterRecoveryConfigsOperations',
'EventHubsOperations',
'ConsumerGroupsOperations',
'RegionsOperations',
]
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ConsumerGroupsOperations(object):
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An objec model deserializer.
:param deserializer: An object model deserializer.
:ivar api_version: Client API Version. Constant value: "2017-04-01".
"""

Expand Down Expand Up @@ -69,7 +69,7 @@ def create_or_update(
parameters = models.ConsumerGroup(user_metadata=user_metadata)

# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}'
url = self.create_or_update.metadata['url']
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),
Expand Down Expand Up @@ -114,6 +114,7 @@ def create_or_update(
return client_raw_response

return deserialized
create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}'}

def delete(
self, resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers=None, raw=False, **operation_config):
Expand All @@ -140,7 +141,7 @@ def delete(
:class:`ErrorResponseException<azure.mgmt.eventhub.models.ErrorResponseException>`
"""
# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}'
url = self.delete.metadata['url']
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),
Expand Down Expand Up @@ -174,6 +175,7 @@ def delete(
if raw:
client_raw_response = ClientRawResponse(None, response)
return client_raw_response
delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}'}

def get(
self, resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers=None, raw=False, **operation_config):
Expand All @@ -200,7 +202,7 @@ def get(
:class:`ErrorResponseException<azure.mgmt.eventhub.models.ErrorResponseException>`
"""
# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}'
url = self.get.metadata['url']
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),
Expand Down Expand Up @@ -241,6 +243,7 @@ def get(
return client_raw_response

return deserialized
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}'}

def list_by_event_hub(
self, resource_group_name, namespace_name, event_hub_name, custom_headers=None, raw=False, **operation_config):
Expand Down Expand Up @@ -269,7 +272,7 @@ def internal_paging(next_link=None, raw=False):

if not next_link:
# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups'
url = self.list_by_event_hub.metadata['url']
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),
Expand Down Expand Up @@ -315,3 +318,4 @@ def internal_paging(next_link=None, raw=False):
return client_raw_response

return deserialized
list_by_event_hub.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups'}
Loading

0 comments on commit 423fe60

Please sign in to comment.