Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
[AutoPR eventhub/resource-manager] EventHub: moved VNet, IpFilter rul…
…es and Kafka from 2018-preview to 2017 API Version (#3627)

* Generated from 9bda7330f3302a3aca9893b278456f3b3b81fc45

moved VNet, IpFilter rules and Kafka from 2018-preview to 2017 API version

* Packaging update of azure-mgmt-eventhub
  • Loading branch information
AutorestCI authored Oct 19, 2018
commit 452f7e2584f77c91c32d2e548e18a91e620e3d0b
4 changes: 3 additions & 1 deletion azure-mgmt-eventhub/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
include *.rst
include azure_bdist_wheel.py
include azure/__init__.py
include azure/mgmt/__init__.py

2 changes: 1 addition & 1 deletion azure-mgmt-eventhub/azure/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__import__('pkg_resources').declare_namespace(__name__)
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
2 changes: 1 addition & 1 deletion azure-mgmt-eventhub/azure/mgmt/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__import__('pkg_resources').declare_namespace(__name__)
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
12 changes: 12 additions & 0 deletions azure-mgmt-eventhub/azure/mgmt/eventhub/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
from .messaging_regions_properties_py3 import MessagingRegionsProperties
from .messaging_regions_py3 import MessagingRegions
from .messaging_plan_py3 import MessagingPlan
from .ip_filter_rule_py3 import IpFilterRule
from .virtual_network_rule_py3 import VirtualNetworkRule
except (SyntaxError, ImportError):
from .tracked_resource import TrackedResource
from .resource import Resource
Expand All @@ -51,9 +53,13 @@
from .messaging_regions_properties import MessagingRegionsProperties
from .messaging_regions import MessagingRegions
from .messaging_plan import MessagingPlan
from .ip_filter_rule import IpFilterRule
from .virtual_network_rule import VirtualNetworkRule
from .operation_paged import OperationPaged
from .eh_namespace_paged import EHNamespacePaged
from .authorization_rule_paged import AuthorizationRulePaged
from .ip_filter_rule_paged import IpFilterRulePaged
from .virtual_network_rule_paged import VirtualNetworkRulePaged
from .arm_disaster_recovery_paged import ArmDisasterRecoveryPaged
from .eventhub_paged import EventhubPaged
from .consumer_group_paged import ConsumerGroupPaged
Expand All @@ -68,6 +74,7 @@
UnavailableReason,
ProvisioningStateDR,
RoleDisasterRecovery,
IPAction,
)

__all__ = [
Expand All @@ -91,9 +98,13 @@
'MessagingRegionsProperties',
'MessagingRegions',
'MessagingPlan',
'IpFilterRule',
'VirtualNetworkRule',
'OperationPaged',
'EHNamespacePaged',
'AuthorizationRulePaged',
'IpFilterRulePaged',
'VirtualNetworkRulePaged',
'ArmDisasterRecoveryPaged',
'EventhubPaged',
'ConsumerGroupPaged',
Expand All @@ -107,4 +118,5 @@
'UnavailableReason',
'ProvisioningStateDR',
'RoleDisasterRecovery',
'IPAction',
]
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ class EHNamespace(TrackedResource):
AutoInflate is enabled, vaule should be within 0 to 20 throughput units. (
'0' if AutoInflateEnabled = true)
:type maximum_throughput_units: int
:param kafka_enabled: Value that indicates whether Kafka is enabled for
eventhub namespace.
:type kafka_enabled: bool
"""

_validation = {
Expand Down Expand Up @@ -76,6 +79,7 @@ class EHNamespace(TrackedResource):
'metric_id': {'key': 'properties.metricId', 'type': 'str'},
'is_auto_inflate_enabled': {'key': 'properties.isAutoInflateEnabled', 'type': 'bool'},
'maximum_throughput_units': {'key': 'properties.maximumThroughputUnits', 'type': 'int'},
'kafka_enabled': {'key': 'properties.kafkaEnabled', 'type': 'bool'},
}

def __init__(self, **kwargs):
Expand All @@ -88,3 +92,4 @@ def __init__(self, **kwargs):
self.metric_id = None
self.is_auto_inflate_enabled = kwargs.get('is_auto_inflate_enabled', None)
self.maximum_throughput_units = kwargs.get('maximum_throughput_units', None)
self.kafka_enabled = kwargs.get('kafka_enabled', None)
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ class EHNamespace(TrackedResource):
AutoInflate is enabled, vaule should be within 0 to 20 throughput units. (
'0' if AutoInflateEnabled = true)
:type maximum_throughput_units: int
:param kafka_enabled: Value that indicates whether Kafka is enabled for
eventhub namespace.
:type kafka_enabled: bool
"""

_validation = {
Expand Down Expand Up @@ -76,9 +79,10 @@ class EHNamespace(TrackedResource):
'metric_id': {'key': 'properties.metricId', 'type': 'str'},
'is_auto_inflate_enabled': {'key': 'properties.isAutoInflateEnabled', 'type': 'bool'},
'maximum_throughput_units': {'key': 'properties.maximumThroughputUnits', 'type': 'int'},
'kafka_enabled': {'key': 'properties.kafkaEnabled', 'type': 'bool'},
}

def __init__(self, *, location: str=None, tags=None, sku=None, is_auto_inflate_enabled: bool=None, maximum_throughput_units: int=None, **kwargs) -> None:
def __init__(self, *, location: str=None, tags=None, sku=None, is_auto_inflate_enabled: bool=None, maximum_throughput_units: int=None, kafka_enabled: bool=None, **kwargs) -> None:
super(EHNamespace, self).__init__(location=location, tags=tags, **kwargs)
self.sku = sku
self.provisioning_state = None
Expand All @@ -88,3 +92,4 @@ def __init__(self, *, location: str=None, tags=None, sku=None, is_auto_inflate_e
self.metric_id = None
self.is_auto_inflate_enabled = is_auto_inflate_enabled
self.maximum_throughput_units = maximum_throughput_units
self.kafka_enabled = kafka_enabled
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,9 @@ class RoleDisasterRecovery(str, Enum):
primary = "Primary"
primary_not_replicating = "PrimaryNotReplicating"
secondary = "Secondary"


class IPAction(str, Enum):

accept = "Accept"
reject = "Reject"
55 changes: 55 additions & 0 deletions azure-mgmt-eventhub/azure/mgmt/eventhub/models/ip_filter_rule.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# 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 .resource import Resource


class IpFilterRule(Resource):
"""Single item in a List or Get IpFilterRules operation.

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 ip_mask: IP Mask
:type ip_mask: str
:param action: The IP Filter Action. Possible values include: 'Accept',
'Reject'
:type action: str or ~azure.mgmt.eventhub.models.IPAction
:param filter_name: IP Filter name
:type filter_name: str
"""

_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'},
'ip_mask': {'key': 'properties.ipMask', 'type': 'str'},
'action': {'key': 'properties.action', 'type': 'str'},
'filter_name': {'key': 'properties.filterName', 'type': 'str'},
}

def __init__(self, **kwargs):
super(IpFilterRule, self).__init__(**kwargs)
self.ip_mask = kwargs.get('ip_mask', None)
self.action = kwargs.get('action', None)
self.filter_name = kwargs.get('filter_name', None)
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 IpFilterRulePaged(Paged):
"""
A paging container for iterating over a list of :class:`IpFilterRule <azure.mgmt.eventhub.models.IpFilterRule>` object
"""

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

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

super(IpFilterRulePaged, self).__init__(*args, **kwargs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# 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 .resource_py3 import Resource


class IpFilterRule(Resource):
"""Single item in a List or Get IpFilterRules operation.

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 ip_mask: IP Mask
:type ip_mask: str
:param action: The IP Filter Action. Possible values include: 'Accept',
'Reject'
:type action: str or ~azure.mgmt.eventhub.models.IPAction
:param filter_name: IP Filter name
:type filter_name: str
"""

_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'},
'ip_mask': {'key': 'properties.ipMask', 'type': 'str'},
'action': {'key': 'properties.action', 'type': 'str'},
'filter_name': {'key': 'properties.filterName', 'type': 'str'},
}

def __init__(self, *, ip_mask: str=None, action=None, filter_name: str=None, **kwargs) -> None:
super(IpFilterRule, self).__init__(**kwargs)
self.ip_mask = ip_mask
self.action = action
self.filter_name = filter_name
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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 .resource import Resource


class VirtualNetworkRule(Resource):
"""Single item in a List or Get VirtualNetworkRules operation.

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 virtual_network_subnet_id: ARM ID of Virtual Network Subnet
:type virtual_network_subnet_id: str
"""

_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'},
'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'},
}

def __init__(self, **kwargs):
super(VirtualNetworkRule, self).__init__(**kwargs)
self.virtual_network_subnet_id = kwargs.get('virtual_network_subnet_id', None)
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 VirtualNetworkRulePaged(Paged):
"""
A paging container for iterating over a list of :class:`VirtualNetworkRule <azure.mgmt.eventhub.models.VirtualNetworkRule>` object
"""

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

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

super(VirtualNetworkRulePaged, self).__init__(*args, **kwargs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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 .resource_py3 import Resource


class VirtualNetworkRule(Resource):
"""Single item in a List or Get VirtualNetworkRules operation.

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 virtual_network_subnet_id: ARM ID of Virtual Network Subnet
:type virtual_network_subnet_id: str
"""

_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'},
'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'},
}

def __init__(self, *, virtual_network_subnet_id: str=None, **kwargs) -> None:
super(VirtualNetworkRule, self).__init__(**kwargs)
self.virtual_network_subnet_id = virtual_network_subnet_id
Loading