Skip to content
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions azure-mgmt-eventhub/azure/mgmt/eventhub/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
from .authorization_rule import AuthorizationRule
from .access_keys import AccessKeys
from .regenerate_access_key_parameters import RegenerateAccessKeyParameters
from .destination import Destination
from .capture_description import CaptureDescription
from .eventhub import Eventhub
from .consumer_group import ConsumerGroup
from .check_name_availability_parameter import CheckNameAvailabilityParameter
Expand All @@ -34,6 +36,7 @@
AccessRights,
KeyType,
EntityStatus,
EncodingCaptureDescription,
UnavailableReason,
)

Expand All @@ -45,6 +48,8 @@
'AuthorizationRule',
'AccessKeys',
'RegenerateAccessKeyParameters',
'Destination',
'CaptureDescription',
'Eventhub',
'ConsumerGroup',
'CheckNameAvailabilityParameter',
Expand All @@ -62,5 +67,6 @@
'AccessRights',
'KeyType',
'EntityStatus',
'EncodingCaptureDescription',
'UnavailableReason',
]
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

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

_attribute_map = {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# 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 CaptureDescription(Model):
"""Properties to configure capture description for eventhub.

:param enabled: A value that indicates whether capture description is
enabled.
:type enabled: bool
:param encoding: Enumerates the possible values for the encoding format of
capture description. Possible values include: 'Avro', 'AvroDeflate'
:type encoding: str or :class:`EncodingCaptureDescription
<azure.mgmt.eventhub.models.EncodingCaptureDescription>`
:param interval_in_seconds: The time window allows you to set the
frequency with which the capture to Azure Blobs will happen, value should
between 60 to 900 seconds
:type interval_in_seconds: int
:param size_limit_in_bytes: The size window defines the amount of data
built up in your Event Hub before an capture operation, value should be
between 10485760 to 524288000 bytes
:type size_limit_in_bytes: int
:param destination: Properties of Destination where capture will be
stored. (Storage Account, Blob Names)
:type destination: :class:`Destination
<azure.mgmt.eventhub.models.Destination>`
"""

_validation = {
'interval_in_seconds': {'maximum': 900, 'minimum': 60},
'size_limit_in_bytes': {'maximum': 524288000, 'minimum': 10485760},
}

_attribute_map = {
'enabled': {'key': 'enabled', 'type': 'bool'},
'encoding': {'key': 'encoding', 'type': 'EncodingCaptureDescription'},
'interval_in_seconds': {'key': 'intervalInSeconds', 'type': 'int'},
'size_limit_in_bytes': {'key': 'sizeLimitInBytes', 'type': 'int'},
'destination': {'key': 'destination', 'type': 'Destination'},
}

def __init__(self, enabled=None, encoding=None, interval_in_seconds=None, size_limit_in_bytes=None, destination=None):
self.enabled = enabled
self.encoding = encoding
self.interval_in_seconds = interval_in_seconds
self.size_limit_in_bytes = size_limit_in_bytes
self.destination = destination
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

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

_attribute_map = {
Expand Down
43 changes: 43 additions & 0 deletions azure-mgmt-eventhub/azure/mgmt/eventhub/models/destination.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 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 Destination(Model):
"""Capture storage details for capture description.

:param name: Name for capture destination
:type name: str
:param storage_account_resource_id: Resource id of the storage account to
be used to create the blobs
:type storage_account_resource_id: str
:param blob_container: Blob container Name
:type blob_container: str
:param archive_name_format: Blob naming convention for archive, e.g.
{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}.
Here all the parameters (Namespace,EventHub .. etc) are mandatory
irrespective of order
:type archive_name_format: str
"""

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'storage_account_resource_id': {'key': 'properties.storageAccountResourceId', 'type': 'str'},
'blob_container': {'key': 'properties.blobContainer', 'type': 'str'},
'archive_name_format': {'key': 'properties.archiveNameFormat', 'type': 'str'},
}

def __init__(self, name=None, storage_account_resource_id=None, blob_container=None, archive_name_format=None):
self.name = name
self.storage_account_resource_id = storage_account_resource_id
self.blob_container = blob_container
self.archive_name_format = archive_name_format
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

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

_attribute_map = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ class EntityStatus(Enum):
unknown = "Unknown"


class EncodingCaptureDescription(Enum):

avro = "Avro"
avro_deflate = "AvroDeflate"


class UnavailableReason(Enum):

none = "None"
Expand Down
7 changes: 6 additions & 1 deletion azure-mgmt-eventhub/azure/mgmt/eventhub/models/eventhub.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ class Eventhub(Resource):
'Unknown'
:type status: str or :class:`EntityStatus
<azure.mgmt.eventhub.models.EntityStatus>`
:param capture_description: Properties of capture description
:type capture_description: :class:`CaptureDescription
<azure.mgmt.eventhub.models.CaptureDescription>`
"""

_validation = {
Expand All @@ -65,13 +68,15 @@ class Eventhub(Resource):
'message_retention_in_days': {'key': 'properties.messageRetentionInDays', 'type': 'long'},
'partition_count': {'key': 'properties.partitionCount', 'type': 'long'},
'status': {'key': 'properties.status', 'type': 'EntityStatus'},
'capture_description': {'key': 'properties.captureDescription', 'type': 'CaptureDescription'},
}

def __init__(self, message_retention_in_days=None, partition_count=None, status=None):
def __init__(self, message_retention_in_days=None, partition_count=None, status=None, capture_description=None):
super(Eventhub, self).__init__()
self.partition_ids = None
self.created_at = None
self.updated_at = None
self.message_retention_in_days = message_retention_in_days
self.partition_count = partition_count
self.status = status
self.capture_description = capture_description
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

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

_attribute_map = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

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

_attribute_map = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
# regenerated.
# --------------------------------------------------------------------------

from msrest.pipeline import ClientRawResponse
import uuid
from msrest.pipeline import ClientRawResponse

from .. import models

Expand Down Expand Up @@ -58,10 +58,13 @@ def create_or_update(
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: :class:`ConsumerGroup
<azure.mgmt.eventhub.models.ConsumerGroup>` or
:class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>` if
raw=true
:rtype: :class:`ConsumerGroup
<azure.mgmt.eventhub.models.ConsumerGroup>`
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
if raw=true
<azure.mgmt.eventhub.models.ConsumerGroup>` or
:class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
:raises:
:class:`ErrorResponseException<azure.mgmt.eventhub.models.ErrorResponseException>`
"""
Expand All @@ -72,8 +75,8 @@ 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),
'consumerGroupName': self._serialize.url("consumer_group_name", consumer_group_name, 'str', max_length=50, min_length=1),
'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1),
'consumerGroupName': self._serialize.url("consumer_group_name", consumer_group_name, 'str', 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 Expand Up @@ -133,9 +136,11 @@ def delete(
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:rtype: None
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
if raw=true
:return: None or
:class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>` if
raw=true
:rtype: None or
:class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
:raises:
:class:`ErrorResponseException<azure.mgmt.eventhub.models.ErrorResponseException>`
"""
Expand All @@ -144,8 +149,8 @@ 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),
'consumerGroupName': self._serialize.url("consumer_group_name", consumer_group_name, 'str', max_length=50, min_length=1),
'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1),
'consumerGroupName': self._serialize.url("consumer_group_name", consumer_group_name, 'str', 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 Expand Up @@ -193,10 +198,13 @@ def get(
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: :class:`ConsumerGroup
<azure.mgmt.eventhub.models.ConsumerGroup>` or
:class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>` if
raw=true
:rtype: :class:`ConsumerGroup
<azure.mgmt.eventhub.models.ConsumerGroup>`
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
if raw=true
<azure.mgmt.eventhub.models.ConsumerGroup>` or
:class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
:raises:
:class:`ErrorResponseException<azure.mgmt.eventhub.models.ErrorResponseException>`
"""
Expand All @@ -205,8 +213,8 @@ 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),
'consumerGroupName': self._serialize.url("consumer_group_name", consumer_group_name, 'str', max_length=50, min_length=1),
'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', min_length=1),
'consumerGroupName': self._serialize.url("consumer_group_name", consumer_group_name, 'str', 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 Expand Up @@ -260,6 +268,8 @@ def list_by_event_hub(
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: An iterator like instance of :class:`ConsumerGroup
<azure.mgmt.eventhub.models.ConsumerGroup>`
:rtype: :class:`ConsumerGroupPaged
<azure.mgmt.eventhub.models.ConsumerGroupPaged>`
:raises:
Expand All @@ -273,7 +283,7 @@ def internal_paging(next_link=None, raw=False):
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', 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