Skip to content

Commit

Permalink
CodeGen from PR 30578 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 9f730fd52e48c9e604f212e0e69481df27c1fa99 into 63c41aa20e38fe6d2ddd1a367b4fe57e8b601c34
  • Loading branch information
SDKAuto committed Oct 9, 2024
1 parent c065216 commit ceda957
Show file tree
Hide file tree
Showing 60 changed files with 852 additions and 6,896 deletions.
6 changes: 6 additions & 0 deletions sdk/eventgrid/azure-eventgrid/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"commit": "9c243d7f39e96402c94facc2ceb591e13a4f62b4",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"typespec_src": "specification/eventgrid/Azure.Messaging.EventGrid",
"@azure-tools/typespec-python": "0.35.1"
}
4 changes: 2 additions & 2 deletions sdk/eventgrid/azure-eventgrid/azure/eventgrid/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._patch import EventGridPublisherClient
from ._patch import EventGridConsumerClient
from ._client import EventGridPublisherClient
from ._client import EventGridConsumerClient
from ._version import VERSION

__version__ = VERSION
Expand Down
14 changes: 5 additions & 9 deletions sdk/eventgrid/azure-eventgrid/azure/eventgrid/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from copy import deepcopy
from typing import Any, TYPE_CHECKING, Union
from typing_extensions import Self

from azure.core import PipelineClient
from azure.core.credentials import AzureKeyCredential
Expand All @@ -19,13 +20,10 @@
from ._serialization import Deserializer, Serializer

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential


class EventGridPublisherClient(
EventGridPublisherClientOperationsMixin
): # pylint: disable=client-accepts-api-version-keyword
class EventGridPublisherClient(EventGridPublisherClientOperationsMixin):
"""EventGridPublisherClient.
:param endpoint: The host name of the namespace, e.g.
Expand Down Expand Up @@ -95,17 +93,15 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
def close(self) -> None:
self._client.close()

def __enter__(self) -> "EventGridPublisherClient":
def __enter__(self) -> Self:
self._client.__enter__()
return self

def __exit__(self, *exc_details: Any) -> None:
self._client.__exit__(*exc_details)


class EventGridConsumerClient(
EventGridConsumerClientOperationsMixin
): # pylint: disable=client-accepts-api-version-keyword
class EventGridConsumerClient(EventGridConsumerClientOperationsMixin):
"""EventGridConsumerClient.
:param endpoint: The host name of the namespace, e.g.
Expand Down Expand Up @@ -175,7 +171,7 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
def close(self) -> None:
self._client.close()

def __enter__(self) -> "EventGridConsumerClient":
def __enter__(self) -> Self:
self._client.__enter__()
return self

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
from ._version import VERSION

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential


class EventGridPublisherClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
class EventGridPublisherClientConfiguration: # pylint: disable=too-many-instance-attributes
"""Configuration for EventGridPublisherClient.
Note that all parameters used to create this instance are saved as instance
Expand Down Expand Up @@ -75,7 +74,7 @@ def _configure(self, **kwargs: Any) -> None:
self.authentication_policy = self._infer_policy(**kwargs)


class EventGridConsumerClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
class EventGridConsumerClientConfiguration: # pylint: disable=too-many-instance-attributes
"""Configuration for EventGridConsumerClient.
Note that all parameters used to create this instance are saved as instance
Expand Down
19 changes: 0 additions & 19 deletions sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/__init__.py

This file was deleted.

This file was deleted.

Loading

0 comments on commit ceda957

Please sign in to comment.