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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Generated from 743fe428402054a1d35ba99da95e97a8f2ee7cd5
fix prettier checks on examples & evergrid swagger
  • Loading branch information
SDK Automation committed Jan 17, 2020
commit d8e43c781992c4c7f9f1aef727ba49908f9256fb
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,8 @@ class Domain(TrackedResource):
which specified the info about mapping event payload.
:type input_schema_mapping:
~azure.mgmt.eventgrid.models.InputSchemaMapping
:param metric_resource_id: Metric resource id for the domain.
:type metric_resource_id: str
:ivar metric_resource_id: Metric resource id for the domain.
:vartype metric_resource_id: str
:param allow_traffic_from_all_ips: This determines if IP filtering rules
ought to be evaluated or not. By default it will not evaluate and will
allow traffic from all IPs.
Expand All @@ -325,6 +325,7 @@ class Domain(TrackedResource):
'location': {'required': True},
'provisioning_state': {'readonly': True},
'endpoint': {'readonly': True},
'metric_resource_id': {'readonly': True},
}

_attribute_map = {
Expand All @@ -348,7 +349,7 @@ def __init__(self, **kwargs):
self.endpoint = None
self.input_schema = kwargs.get('input_schema', "EventGridSchema")
self.input_schema_mapping = kwargs.get('input_schema_mapping', None)
self.metric_resource_id = kwargs.get('metric_resource_id', None)
self.metric_resource_id = None
self.allow_traffic_from_all_ips = kwargs.get('allow_traffic_from_all_ips', None)
self.inbound_ip_rules = kwargs.get('inbound_ip_rules', None)

Expand Down Expand Up @@ -437,15 +438,26 @@ class DomainUpdateParameters(Model):

:param tags: Tags of the domains resource
:type tags: dict[str, str]
:param allow_traffic_from_all_ips: This determines if IP filtering rules
ought to be evaluated or not. By default it will not evaluate and will
allow traffic from all IPs.
:type allow_traffic_from_all_ips: bool
:param inbound_ip_rules: This determines the IP filtering rules that ought
be applied when events are received on this domain.
:type inbound_ip_rules: list[~azure.mgmt.eventgrid.models.InboundIpRule]
"""

_attribute_map = {
'tags': {'key': 'tags', 'type': '{str}'},
'allow_traffic_from_all_ips': {'key': 'allowTrafficFromAllIPs', 'type': 'bool'},
'inbound_ip_rules': {'key': 'inboundIpRules', 'type': '[InboundIpRule]'},
}

def __init__(self, **kwargs):
super(DomainUpdateParameters, self).__init__(**kwargs)
self.tags = kwargs.get('tags', None)
self.allow_traffic_from_all_ips = kwargs.get('allow_traffic_from_all_ips', None)
self.inbound_ip_rules = kwargs.get('inbound_ip_rules', None)


class EventHubEventSubscriptionDestination(EventSubscriptionDestination):
Expand Down Expand Up @@ -1456,8 +1468,8 @@ class Topic(TrackedResource):
schema.
:type input_schema_mapping:
~azure.mgmt.eventgrid.models.InputSchemaMapping
:param metric_resource_id: Metric resource id for the topic.
:type metric_resource_id: str
:ivar metric_resource_id: Metric resource id for the topic.
:vartype metric_resource_id: str
:param allow_traffic_from_all_ips: This determines if IP filtering rules
ought to be evaluated or not. By default it will not evaluate and will
allow traffic from all IPs.
Expand All @@ -1474,6 +1486,7 @@ class Topic(TrackedResource):
'location': {'required': True},
'provisioning_state': {'readonly': True},
'endpoint': {'readonly': True},
'metric_resource_id': {'readonly': True},
}

_attribute_map = {
Expand All @@ -1497,7 +1510,7 @@ def __init__(self, **kwargs):
self.endpoint = None
self.input_schema = kwargs.get('input_schema', "EventGridSchema")
self.input_schema_mapping = kwargs.get('input_schema_mapping', None)
self.metric_resource_id = kwargs.get('metric_resource_id', None)
self.metric_resource_id = None
self.allow_traffic_from_all_ips = kwargs.get('allow_traffic_from_all_ips', None)
self.inbound_ip_rules = kwargs.get('inbound_ip_rules', None)

Expand Down Expand Up @@ -1613,15 +1626,26 @@ class TopicUpdateParameters(Model):

:param tags: Tags of the resource.
:type tags: dict[str, str]
:param allow_traffic_from_all_ips: This determines if IP filtering rules
ought to be evaluated or not. By default it will not evaluate and will
allow traffic from all IPs.
:type allow_traffic_from_all_ips: bool
:param inbound_ip_rules: This determines the IP filtering rules that ought
be applied when events are received on this domain.
:type inbound_ip_rules: list[~azure.mgmt.eventgrid.models.InboundIpRule]
"""

_attribute_map = {
'tags': {'key': 'tags', 'type': '{str}'},
'allow_traffic_from_all_ips': {'key': 'allowTrafficFromAllIPs', 'type': 'bool'},
'inbound_ip_rules': {'key': 'inboundIpRules', 'type': '[InboundIpRule]'},
}

def __init__(self, **kwargs):
super(TopicUpdateParameters, self).__init__(**kwargs)
self.tags = kwargs.get('tags', None)
self.allow_traffic_from_all_ips = kwargs.get('allow_traffic_from_all_ips', None)
self.inbound_ip_rules = kwargs.get('inbound_ip_rules', None)


class WebHookEventSubscriptionDestination(EventSubscriptionDestination):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,8 @@ class Domain(TrackedResource):
which specified the info about mapping event payload.
:type input_schema_mapping:
~azure.mgmt.eventgrid.models.InputSchemaMapping
:param metric_resource_id: Metric resource id for the domain.
:type metric_resource_id: str
:ivar metric_resource_id: Metric resource id for the domain.
:vartype metric_resource_id: str
:param allow_traffic_from_all_ips: This determines if IP filtering rules
ought to be evaluated or not. By default it will not evaluate and will
allow traffic from all IPs.
Expand All @@ -325,6 +325,7 @@ class Domain(TrackedResource):
'location': {'required': True},
'provisioning_state': {'readonly': True},
'endpoint': {'readonly': True},
'metric_resource_id': {'readonly': True},
}

_attribute_map = {
Expand All @@ -342,13 +343,13 @@ class Domain(TrackedResource):
'inbound_ip_rules': {'key': 'properties.inboundIpRules', 'type': '[InboundIpRule]'},
}

def __init__(self, *, location: str, tags=None, input_schema="EventGridSchema", input_schema_mapping=None, metric_resource_id: str=None, allow_traffic_from_all_ips: bool=None, inbound_ip_rules=None, **kwargs) -> None:
def __init__(self, *, location: str, tags=None, input_schema="EventGridSchema", input_schema_mapping=None, allow_traffic_from_all_ips: bool=None, inbound_ip_rules=None, **kwargs) -> None:
super(Domain, self).__init__(location=location, tags=tags, **kwargs)
self.provisioning_state = None
self.endpoint = None
self.input_schema = input_schema
self.input_schema_mapping = input_schema_mapping
self.metric_resource_id = metric_resource_id
self.metric_resource_id = None
self.allow_traffic_from_all_ips = allow_traffic_from_all_ips
self.inbound_ip_rules = inbound_ip_rules

Expand Down Expand Up @@ -437,15 +438,26 @@ class DomainUpdateParameters(Model):

:param tags: Tags of the domains resource
:type tags: dict[str, str]
:param allow_traffic_from_all_ips: This determines if IP filtering rules
ought to be evaluated or not. By default it will not evaluate and will
allow traffic from all IPs.
:type allow_traffic_from_all_ips: bool
:param inbound_ip_rules: This determines the IP filtering rules that ought
be applied when events are received on this domain.
:type inbound_ip_rules: list[~azure.mgmt.eventgrid.models.InboundIpRule]
"""

_attribute_map = {
'tags': {'key': 'tags', 'type': '{str}'},
'allow_traffic_from_all_ips': {'key': 'allowTrafficFromAllIPs', 'type': 'bool'},
'inbound_ip_rules': {'key': 'inboundIpRules', 'type': '[InboundIpRule]'},
}

def __init__(self, *, tags=None, **kwargs) -> None:
def __init__(self, *, tags=None, allow_traffic_from_all_ips: bool=None, inbound_ip_rules=None, **kwargs) -> None:
super(DomainUpdateParameters, self).__init__(**kwargs)
self.tags = tags
self.allow_traffic_from_all_ips = allow_traffic_from_all_ips
self.inbound_ip_rules = inbound_ip_rules


class EventHubEventSubscriptionDestination(EventSubscriptionDestination):
Expand Down Expand Up @@ -1456,8 +1468,8 @@ class Topic(TrackedResource):
schema.
:type input_schema_mapping:
~azure.mgmt.eventgrid.models.InputSchemaMapping
:param metric_resource_id: Metric resource id for the topic.
:type metric_resource_id: str
:ivar metric_resource_id: Metric resource id for the topic.
:vartype metric_resource_id: str
:param allow_traffic_from_all_ips: This determines if IP filtering rules
ought to be evaluated or not. By default it will not evaluate and will
allow traffic from all IPs.
Expand All @@ -1474,6 +1486,7 @@ class Topic(TrackedResource):
'location': {'required': True},
'provisioning_state': {'readonly': True},
'endpoint': {'readonly': True},
'metric_resource_id': {'readonly': True},
}

_attribute_map = {
Expand All @@ -1491,13 +1504,13 @@ class Topic(TrackedResource):
'inbound_ip_rules': {'key': 'properties.inboundIpRules', 'type': '[InboundIpRule]'},
}

def __init__(self, *, location: str, tags=None, input_schema="EventGridSchema", input_schema_mapping=None, metric_resource_id: str=None, allow_traffic_from_all_ips: bool=None, inbound_ip_rules=None, **kwargs) -> None:
def __init__(self, *, location: str, tags=None, input_schema="EventGridSchema", input_schema_mapping=None, allow_traffic_from_all_ips: bool=None, inbound_ip_rules=None, **kwargs) -> None:
super(Topic, self).__init__(location=location, tags=tags, **kwargs)
self.provisioning_state = None
self.endpoint = None
self.input_schema = input_schema
self.input_schema_mapping = input_schema_mapping
self.metric_resource_id = metric_resource_id
self.metric_resource_id = None
self.allow_traffic_from_all_ips = allow_traffic_from_all_ips
self.inbound_ip_rules = inbound_ip_rules

Expand Down Expand Up @@ -1613,15 +1626,26 @@ class TopicUpdateParameters(Model):

:param tags: Tags of the resource.
:type tags: dict[str, str]
:param allow_traffic_from_all_ips: This determines if IP filtering rules
ought to be evaluated or not. By default it will not evaluate and will
allow traffic from all IPs.
:type allow_traffic_from_all_ips: bool
:param inbound_ip_rules: This determines the IP filtering rules that ought
be applied when events are received on this domain.
:type inbound_ip_rules: list[~azure.mgmt.eventgrid.models.InboundIpRule]
"""

_attribute_map = {
'tags': {'key': 'tags', 'type': '{str}'},
'allow_traffic_from_all_ips': {'key': 'allowTrafficFromAllIPs', 'type': 'bool'},
'inbound_ip_rules': {'key': 'inboundIpRules', 'type': '[InboundIpRule]'},
}

def __init__(self, *, tags=None, **kwargs) -> None:
def __init__(self, *, tags=None, allow_traffic_from_all_ips: bool=None, inbound_ip_rules=None, **kwargs) -> None:
super(TopicUpdateParameters, self).__init__(**kwargs)
self.tags = tags
self.allow_traffic_from_all_ips = allow_traffic_from_all_ips
self.inbound_ip_rules = inbound_ip_rules


class WebHookEventSubscriptionDestination(EventSubscriptionDestination):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,7 @@ def get_long_running_output(response):


def _update_initial(
self, resource_group_name, domain_name, tags=None, custom_headers=None, raw=False, **operation_config):
domain_update_parameters = models.DomainUpdateParameters(tags=tags)

self, resource_group_name, domain_name, domain_update_parameters, custom_headers=None, raw=False, **operation_config):
# Construct URL
url = self.update.metadata['url']
path_format_arguments = {
Expand Down Expand Up @@ -344,7 +342,7 @@ def _update_initial(
return deserialized

def update(
self, resource_group_name, domain_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config):
self, resource_group_name, domain_name, domain_update_parameters, custom_headers=None, raw=False, polling=True, **operation_config):
"""Update a domain.

Asynchronously updates a domain with the specified parameters.
Expand All @@ -354,8 +352,9 @@ def update(
:type resource_group_name: str
:param domain_name: Name of the domain.
:type domain_name: str
:param tags: Tags of the domains resource
:type tags: dict[str, str]
:param domain_update_parameters: Domain update information.
:type domain_update_parameters:
~azure.mgmt.eventgrid.models.DomainUpdateParameters
:param dict custom_headers: headers that will be added to the request
:param bool raw: The poller return type is ClientRawResponse, the
direct response alongside the deserialized response
Expand All @@ -372,7 +371,7 @@ def update(
raw_result = self._update_initial(
resource_group_name=resource_group_name,
domain_name=domain_name,
tags=tags,
domain_update_parameters=domain_update_parameters,
custom_headers=custom_headers,
raw=True,
**operation_config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def list_event_types(

List event types for a topic type.

:param topic_type_name: Name of the topic type
:param topic_type_name: Name of the topic type.
:type topic_type_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,7 @@ def get_long_running_output(response):


def _update_initial(
self, resource_group_name, topic_name, tags=None, custom_headers=None, raw=False, **operation_config):
topic_update_parameters = models.TopicUpdateParameters(tags=tags)

self, resource_group_name, topic_name, topic_update_parameters, custom_headers=None, raw=False, **operation_config):
# Construct URL
url = self.update.metadata['url']
path_format_arguments = {
Expand Down Expand Up @@ -343,7 +341,7 @@ def _update_initial(
return deserialized

def update(
self, resource_group_name, topic_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config):
self, resource_group_name, topic_name, topic_update_parameters, custom_headers=None, raw=False, polling=True, **operation_config):
"""Update a topic.

Asynchronously updates a topic with the specified parameters.
Expand All @@ -353,8 +351,9 @@ def update(
:type resource_group_name: str
:param topic_name: Name of the topic.
:type topic_name: str
:param tags: Tags of the resource.
:type tags: dict[str, str]
:param topic_update_parameters: Topic update information.
:type topic_update_parameters:
~azure.mgmt.eventgrid.models.TopicUpdateParameters
:param dict custom_headers: headers that will be added to the request
:param bool raw: The poller return type is ClientRawResponse, the
direct response alongside the deserialized response
Expand All @@ -371,7 +370,7 @@ def update(
raw_result = self._update_initial(
resource_group_name=resource_group_name,
topic_name=topic_name,
tags=tags,
topic_update_parameters=topic_update_parameters,
custom_headers=custom_headers,
raw=True,
**operation_config
Expand Down