Skip to content

Commit

Permalink
[AutoPR] eventgrid/resource-manager (#4430)
Browse files Browse the repository at this point in the history
* [AutoPR eventgrid/resource-manager] EventGrid: Swagger Changes for 2019-02-01-preview (#4397)

* Generated from 9b8252073be1dc515ff7a29bb4aa19a954991e60

Copy 2018-09-15-preview files to get a baseline

* Packaging update of azure-mgmt-eventgrid

* Generated from 46cf5eb760200cfa581a2988ac88c7d790c895c0

update readme.md file and address some violations

* Generated from a24d800830002278277351bbf1a580248c585274

update summary text per code review comments

* Generated from c681e1b7ce8baad94433d826b119127fc9c4891b

Address CR comments

* 2.1.0rc1

* Packaging update of azure-mgmt-eventgrid
  • Loading branch information
AutorestCI authored and lmazuel committed Mar 11, 2019
1 parent 6a45cf2 commit 47490fe
Show file tree
Hide file tree
Showing 76 changed files with 3,634 additions and 76 deletions.
15 changes: 14 additions & 1 deletion azure-mgmt-eventgrid/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,25 @@
Release History
===============

2.1.0rc1 (2019-03-11)
+++++++++++++++++++++

**Disclaimer**

Preview features that were on 2.0.0rc2 only and not on 2.0.0 has been ported in this version.

This version also adds the following preview features:
- Manual Add/delete of domain topics.
- Pagination/search filtering for list operations.
- Adding service bus queue as destination


2.0.0 (2019-02-01)
++++++++++++++++++

**Disclaimer**

Note all preview features of the 2.0.0rc2 were confirmed in this 2.0.0 stable version. In particular, the following features will still be available only in the 2.0.0rc2 for now:
Not all preview features of the 2.0.0rc2 were confirmed in this 2.0.0 stable version. In particular, the following features will still be available only in the 2.0.0rc2 for now:

- Domains.
- Advanced filters support.
Expand Down
1 change: 1 addition & 0 deletions azure-mgmt-eventgrid/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
recursive-include tests *.py *.yaml
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py
Expand Down
19 changes: 0 additions & 19 deletions azure-mgmt-eventgrid/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,6 @@ For the older Azure Service Management (ASM) libraries, see
For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Compatibility
=============

**IMPORTANT**: If you have an earlier version of the azure package
(version < 1.0), you should uninstall it before installing this package.

You can check the version using pip:

.. code:: shell
pip freeze
If you see azure==0.11.0 (or any version below 1.0), uninstall it first:

.. code:: shell
pip uninstall azure
Usage
=====

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.domains_operations import DomainsOperations
from .operations.domain_topics_operations import DomainTopicsOperations
from .operations.event_subscriptions_operations import EventSubscriptionsOperations
from .operations.operations import Operations
from .operations.topics_operations import TopicsOperations
Expand Down Expand Up @@ -60,6 +62,10 @@ class EventGridManagementClient(SDKClient):
:ivar config: Configuration for client.
:vartype config: EventGridManagementClientConfiguration
:ivar domains: Domains operations
:vartype domains: azure.mgmt.eventgrid.operations.DomainsOperations
:ivar domain_topics: DomainTopics operations
:vartype domain_topics: azure.mgmt.eventgrid.operations.DomainTopicsOperations
:ivar event_subscriptions: EventSubscriptions operations
:vartype event_subscriptions: azure.mgmt.eventgrid.operations.EventSubscriptionsOperations
:ivar operations: Operations operations
Expand All @@ -86,10 +92,14 @@ def __init__(
super(EventGridManagementClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2019-01-01'
self.api_version = '2019-02-01-preview'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.domains = DomainsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.domain_topics = DomainTopicsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.event_subscriptions = EventSubscriptionsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
Expand Down
93 changes: 87 additions & 6 deletions azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,92 +10,173 @@
# --------------------------------------------------------------------------

try:
from .input_schema_mapping_py3 import InputSchemaMapping
from .resource_py3 import Resource
from .json_field_py3 import JsonField
from .json_field_with_default_py3 import JsonFieldWithDefault
from .json_input_schema_mapping_py3 import JsonInputSchemaMapping
from .tracked_resource_py3 import TrackedResource
from .domain_py3 import Domain
from .domain_update_parameters_py3 import DomainUpdateParameters
from .domain_shared_access_keys_py3 import DomainSharedAccessKeys
from .domain_regenerate_key_request_py3 import DomainRegenerateKeyRequest
from .domain_topic_py3 import DomainTopic
from .event_subscription_destination_py3 import EventSubscriptionDestination
from .advanced_filter_py3 import AdvancedFilter
from .event_subscription_filter_py3 import EventSubscriptionFilter
from .retry_policy_py3 import RetryPolicy
from .dead_letter_destination_py3 import DeadLetterDestination
from .resource_py3 import Resource
from .number_in_advanced_filter_py3 import NumberInAdvancedFilter
from .storage_blob_dead_letter_destination_py3 import StorageBlobDeadLetterDestination
from .number_not_in_advanced_filter_py3 import NumberNotInAdvancedFilter
from .number_less_than_advanced_filter_py3 import NumberLessThanAdvancedFilter
from .number_greater_than_advanced_filter_py3 import NumberGreaterThanAdvancedFilter
from .number_less_than_or_equals_advanced_filter_py3 import NumberLessThanOrEqualsAdvancedFilter
from .number_greater_than_or_equals_advanced_filter_py3 import NumberGreaterThanOrEqualsAdvancedFilter
from .bool_equals_advanced_filter_py3 import BoolEqualsAdvancedFilter
from .string_in_advanced_filter_py3 import StringInAdvancedFilter
from .string_not_in_advanced_filter_py3 import StringNotInAdvancedFilter
from .string_begins_with_advanced_filter_py3 import StringBeginsWithAdvancedFilter
from .string_ends_with_advanced_filter_py3 import StringEndsWithAdvancedFilter
from .string_contains_advanced_filter_py3 import StringContainsAdvancedFilter
from .web_hook_event_subscription_destination_py3 import WebHookEventSubscriptionDestination
from .event_hub_event_subscription_destination_py3 import EventHubEventSubscriptionDestination
from .storage_queue_event_subscription_destination_py3 import StorageQueueEventSubscriptionDestination
from .hybrid_connection_event_subscription_destination_py3 import HybridConnectionEventSubscriptionDestination
from .service_bus_queue_event_subscription_destination_py3 import ServiceBusQueueEventSubscriptionDestination
from .event_subscription_py3 import EventSubscription
from .event_subscription_update_parameters_py3 import EventSubscriptionUpdateParameters
from .event_subscription_full_url_py3 import EventSubscriptionFullUrl
from .operation_info_py3 import OperationInfo
from .operation_py3 import Operation
from .tracked_resource_py3 import TrackedResource
from .topic_py3 import Topic
from .topic_update_parameters_py3 import TopicUpdateParameters
from .topic_shared_access_keys_py3 import TopicSharedAccessKeys
from .topic_regenerate_key_request_py3 import TopicRegenerateKeyRequest
from .event_type_py3 import EventType
from .topic_type_info_py3 import TopicTypeInfo
except (SyntaxError, ImportError):
from .input_schema_mapping import InputSchemaMapping
from .resource import Resource
from .json_field import JsonField
from .json_field_with_default import JsonFieldWithDefault
from .json_input_schema_mapping import JsonInputSchemaMapping
from .tracked_resource import TrackedResource
from .domain import Domain
from .domain_update_parameters import DomainUpdateParameters
from .domain_shared_access_keys import DomainSharedAccessKeys
from .domain_regenerate_key_request import DomainRegenerateKeyRequest
from .domain_topic import DomainTopic
from .event_subscription_destination import EventSubscriptionDestination
from .advanced_filter import AdvancedFilter
from .event_subscription_filter import EventSubscriptionFilter
from .retry_policy import RetryPolicy
from .dead_letter_destination import DeadLetterDestination
from .resource import Resource
from .number_in_advanced_filter import NumberInAdvancedFilter
from .storage_blob_dead_letter_destination import StorageBlobDeadLetterDestination
from .number_not_in_advanced_filter import NumberNotInAdvancedFilter
from .number_less_than_advanced_filter import NumberLessThanAdvancedFilter
from .number_greater_than_advanced_filter import NumberGreaterThanAdvancedFilter
from .number_less_than_or_equals_advanced_filter import NumberLessThanOrEqualsAdvancedFilter
from .number_greater_than_or_equals_advanced_filter import NumberGreaterThanOrEqualsAdvancedFilter
from .bool_equals_advanced_filter import BoolEqualsAdvancedFilter
from .string_in_advanced_filter import StringInAdvancedFilter
from .string_not_in_advanced_filter import StringNotInAdvancedFilter
from .string_begins_with_advanced_filter import StringBeginsWithAdvancedFilter
from .string_ends_with_advanced_filter import StringEndsWithAdvancedFilter
from .string_contains_advanced_filter import StringContainsAdvancedFilter
from .web_hook_event_subscription_destination import WebHookEventSubscriptionDestination
from .event_hub_event_subscription_destination import EventHubEventSubscriptionDestination
from .storage_queue_event_subscription_destination import StorageQueueEventSubscriptionDestination
from .hybrid_connection_event_subscription_destination import HybridConnectionEventSubscriptionDestination
from .service_bus_queue_event_subscription_destination import ServiceBusQueueEventSubscriptionDestination
from .event_subscription import EventSubscription
from .event_subscription_update_parameters import EventSubscriptionUpdateParameters
from .event_subscription_full_url import EventSubscriptionFullUrl
from .operation_info import OperationInfo
from .operation import Operation
from .tracked_resource import TrackedResource
from .topic import Topic
from .topic_update_parameters import TopicUpdateParameters
from .topic_shared_access_keys import TopicSharedAccessKeys
from .topic_regenerate_key_request import TopicRegenerateKeyRequest
from .event_type import EventType
from .topic_type_info import TopicTypeInfo
from .domain_paged import DomainPaged
from .domain_topic_paged import DomainTopicPaged
from .event_subscription_paged import EventSubscriptionPaged
from .operation_paged import OperationPaged
from .topic_paged import TopicPaged
from .event_type_paged import EventTypePaged
from .topic_type_info_paged import TopicTypeInfoPaged
from .event_grid_management_client_enums import (
DomainProvisioningState,
InputSchema,
DomainTopicProvisioningState,
EventSubscriptionProvisioningState,
EventDeliverySchema,
TopicProvisioningState,
ResourceRegionType,
TopicTypeProvisioningState,
)

__all__ = [
'InputSchemaMapping',
'Resource',
'JsonField',
'JsonFieldWithDefault',
'JsonInputSchemaMapping',
'TrackedResource',
'Domain',
'DomainUpdateParameters',
'DomainSharedAccessKeys',
'DomainRegenerateKeyRequest',
'DomainTopic',
'EventSubscriptionDestination',
'AdvancedFilter',
'EventSubscriptionFilter',
'RetryPolicy',
'DeadLetterDestination',
'Resource',
'NumberInAdvancedFilter',
'StorageBlobDeadLetterDestination',
'NumberNotInAdvancedFilter',
'NumberLessThanAdvancedFilter',
'NumberGreaterThanAdvancedFilter',
'NumberLessThanOrEqualsAdvancedFilter',
'NumberGreaterThanOrEqualsAdvancedFilter',
'BoolEqualsAdvancedFilter',
'StringInAdvancedFilter',
'StringNotInAdvancedFilter',
'StringBeginsWithAdvancedFilter',
'StringEndsWithAdvancedFilter',
'StringContainsAdvancedFilter',
'WebHookEventSubscriptionDestination',
'EventHubEventSubscriptionDestination',
'StorageQueueEventSubscriptionDestination',
'HybridConnectionEventSubscriptionDestination',
'ServiceBusQueueEventSubscriptionDestination',
'EventSubscription',
'EventSubscriptionUpdateParameters',
'EventSubscriptionFullUrl',
'OperationInfo',
'Operation',
'TrackedResource',
'Topic',
'TopicUpdateParameters',
'TopicSharedAccessKeys',
'TopicRegenerateKeyRequest',
'EventType',
'TopicTypeInfo',
'DomainPaged',
'DomainTopicPaged',
'EventSubscriptionPaged',
'OperationPaged',
'TopicPaged',
'EventTypePaged',
'TopicTypeInfoPaged',
'DomainProvisioningState',
'InputSchema',
'DomainTopicProvisioningState',
'EventSubscriptionProvisioningState',
'EventDeliverySchema',
'TopicProvisioningState',
'ResourceRegionType',
'TopicTypeProvisioningState',
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 AdvancedFilter(Model):
"""This is the base type that represents an advanced filter. To configure an
advanced filter, do not directly instantiate an object of this class.
Instead, instantiate an object of a derived class such as
BoolEqualsAdvancedFilter, NumberInAdvancedFilter,
StringEqualsAdvancedFilter etc. depending on the type of the key based on
which you want to filter.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: NumberInAdvancedFilter, NumberNotInAdvancedFilter,
NumberLessThanAdvancedFilter, NumberGreaterThanAdvancedFilter,
NumberLessThanOrEqualsAdvancedFilter,
NumberGreaterThanOrEqualsAdvancedFilter, BoolEqualsAdvancedFilter,
StringInAdvancedFilter, StringNotInAdvancedFilter,
StringBeginsWithAdvancedFilter, StringEndsWithAdvancedFilter,
StringContainsAdvancedFilter
All required parameters must be populated in order to send to Azure.
:param key: The field/property in the event based on which you want to
filter.
:type key: str
:param operator_type: Required. Constant filled by server.
:type operator_type: str
"""

_validation = {
'operator_type': {'required': True},
}

_attribute_map = {
'key': {'key': 'key', 'type': 'str'},
'operator_type': {'key': 'operatorType', 'type': 'str'},
}

_subtype_map = {
'operator_type': {'NumberIn': 'NumberInAdvancedFilter', 'NumberNotIn': 'NumberNotInAdvancedFilter', 'NumberLessThan': 'NumberLessThanAdvancedFilter', 'NumberGreaterThan': 'NumberGreaterThanAdvancedFilter', 'NumberLessThanOrEquals': 'NumberLessThanOrEqualsAdvancedFilter', 'NumberGreaterThanOrEquals': 'NumberGreaterThanOrEqualsAdvancedFilter', 'BoolEquals': 'BoolEqualsAdvancedFilter', 'StringIn': 'StringInAdvancedFilter', 'StringNotIn': 'StringNotInAdvancedFilter', 'StringBeginsWith': 'StringBeginsWithAdvancedFilter', 'StringEndsWith': 'StringEndsWithAdvancedFilter', 'StringContains': 'StringContainsAdvancedFilter'}
}

def __init__(self, **kwargs):
super(AdvancedFilter, self).__init__(**kwargs)
self.key = kwargs.get('key', None)
self.operator_type = None
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 AdvancedFilter(Model):
"""This is the base type that represents an advanced filter. To configure an
advanced filter, do not directly instantiate an object of this class.
Instead, instantiate an object of a derived class such as
BoolEqualsAdvancedFilter, NumberInAdvancedFilter,
StringEqualsAdvancedFilter etc. depending on the type of the key based on
which you want to filter.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: NumberInAdvancedFilter, NumberNotInAdvancedFilter,
NumberLessThanAdvancedFilter, NumberGreaterThanAdvancedFilter,
NumberLessThanOrEqualsAdvancedFilter,
NumberGreaterThanOrEqualsAdvancedFilter, BoolEqualsAdvancedFilter,
StringInAdvancedFilter, StringNotInAdvancedFilter,
StringBeginsWithAdvancedFilter, StringEndsWithAdvancedFilter,
StringContainsAdvancedFilter
All required parameters must be populated in order to send to Azure.
:param key: The field/property in the event based on which you want to
filter.
:type key: str
:param operator_type: Required. Constant filled by server.
:type operator_type: str
"""

_validation = {
'operator_type': {'required': True},
}

_attribute_map = {
'key': {'key': 'key', 'type': 'str'},
'operator_type': {'key': 'operatorType', 'type': 'str'},
}

_subtype_map = {
'operator_type': {'NumberIn': 'NumberInAdvancedFilter', 'NumberNotIn': 'NumberNotInAdvancedFilter', 'NumberLessThan': 'NumberLessThanAdvancedFilter', 'NumberGreaterThan': 'NumberGreaterThanAdvancedFilter', 'NumberLessThanOrEquals': 'NumberLessThanOrEqualsAdvancedFilter', 'NumberGreaterThanOrEquals': 'NumberGreaterThanOrEqualsAdvancedFilter', 'BoolEquals': 'BoolEqualsAdvancedFilter', 'StringIn': 'StringInAdvancedFilter', 'StringNotIn': 'StringNotInAdvancedFilter', 'StringBeginsWith': 'StringBeginsWithAdvancedFilter', 'StringEndsWith': 'StringEndsWithAdvancedFilter', 'StringContains': 'StringContainsAdvancedFilter'}
}

def __init__(self, *, key: str=None, **kwargs) -> None:
super(AdvancedFilter, self).__init__(**kwargs)
self.key = key
self.operator_type = None
Loading

0 comments on commit 47490fe

Please sign in to comment.