Skip to content

Commit 6cacca6

Browse files
author
SDKAuto
committed
CodeGen from PR 15885 in Azure/azure-rest-api-specs
Merge 8e1d55cc7b4fb0f0e064a2dd310eb97841b99fda into c8d9a26
1 parent 03516c3 commit 6cacca6

File tree

172 files changed

+14043
-8435
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+14043
-8435
lines changed

sdk/eventgrid/azure-eventgrid/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
include _meta.json
12
recursive-include tests *.py *.yaml
23
include *.md
34
include azure/__init__.py
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"autorest": "V2",
3+
"use": "@microsoft.azure/autorest.python@~4.0.71",
4+
"commit": "a9a4c98c3d58421150347d86b5bd94bc742db133",
5+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
6+
"autorest_command": "autorest specification/eventgrid/data-plane/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk [email protected]/autorest.python@~4.0.71 --version=V2",
7+
"readme": "specification/eventgrid/data-plane/readme.md"
8+
}

sdk/eventgrid/azure-eventgrid/azure/eventgrid/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
# regenerated.
1010
# --------------------------------------------------------------------------
1111

12-
from .event_grid_client import EventGridClient
13-
from .version import VERSION
12+
from ._configuration import EventGridClientConfiguration
13+
from ._event_grid_client import EventGridClient
14+
__all__ = ['EventGridClient', 'EventGridClientConfiguration']
1415

15-
__all__ = ['EventGridClient']
16+
from .version import VERSION
1617

1718
__version__ = VERSION
1819

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest import Configuration
13+
14+
from .version import VERSION
15+
16+
17+
class EventGridClientConfiguration(Configuration):
18+
"""Configuration for EventGridClient
19+
Note that all parameters used to create this instance are saved as instance
20+
attributes.
21+
22+
:param credentials: Subscription credentials which uniquely identify
23+
client subscription.
24+
:type credentials: None
25+
"""
26+
27+
def __init__(
28+
self, credentials):
29+
30+
if credentials is None:
31+
raise ValueError("Parameter 'credentials' must not be None.")
32+
base_url = 'https://{topicHostname}'
33+
34+
super(EventGridClientConfiguration, self).__init__(base_url)
35+
36+
# Starting Autorest.Python 4.0.64, make connection pool activated by default
37+
self.keep_alive = True
38+
39+
self.add_user_agent('azure-eventgrid/{}'.format(VERSION))
40+
41+
self.credentials = credentials
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.service_client import SDKClient
13+
from msrest import Serializer, Deserializer
14+
15+
from ._configuration import EventGridClientConfiguration
16+
from .operations import EventGridClientOperationsMixin
17+
from msrest.exceptions import HttpOperationError
18+
from . import models
19+
20+
21+
class EventGridClient(EventGridClientOperationsMixin, SDKClient):
22+
"""EventGrid Client
23+
24+
:ivar config: Configuration for client.
25+
:vartype config: EventGridClientConfiguration
26+
27+
:param credentials: Subscription credentials which uniquely identify
28+
client subscription.
29+
:type credentials: None
30+
"""
31+
32+
def __init__(
33+
self, credentials):
34+
35+
self.config = EventGridClientConfiguration(credentials)
36+
super(EventGridClient, self).__init__(self.config.credentials, self.config)
37+
38+
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
39+
self.api_version = '2018-01-01'
40+
self._serialize = Serializer(client_models)
41+
self._deserialize = Deserializer(client_models)
42+

sdk/eventgrid/azure-eventgrid/azure/eventgrid/event_grid_client.py

Lines changed: 0 additions & 116 deletions
This file was deleted.

0 commit comments

Comments
 (0)