-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[EG] Regenerate Code #17053
[EG] Regenerate Code #17053
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,11 +8,11 @@ | |
from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar | ||
import warnings | ||
|
||
from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error | ||
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error | ||
from azure.core.pipeline import PipelineResponse | ||
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest | ||
|
||
from ... import models | ||
from ... import models as _models | ||
|
||
T = TypeVar('T') | ||
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] | ||
|
@@ -22,7 +22,7 @@ class EventGridPublisherClientOperationsMixin: | |
async def publish_events( | ||
self, | ||
topic_hostname: str, | ||
events: List["models.EventGridEvent"], | ||
events: List["_models.EventGridEvent"], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. random question: how would this be rendered on doc/type hint? wondering if users would get confused that how they create There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not much concerned about this - this is an autogenerated method from swagger which is not used anywhere in our code. (we just need this in the swagger for the sake of other languages) |
||
**kwargs | ||
) -> None: | ||
"""Publishes a batch of events to an Azure Event Grid topic. | ||
|
@@ -37,7 +37,9 @@ async def publish_events( | |
:raises: ~azure.core.exceptions.HttpResponseError | ||
""" | ||
cls = kwargs.pop('cls', None) # type: ClsType[None] | ||
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} | ||
error_map = { | ||
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError | ||
} | ||
error_map.update(kwargs.pop('error_map', {})) | ||
api_version = "2018-01-01" | ||
content_type = kwargs.pop("content_type", "application/json") | ||
|
@@ -76,7 +78,7 @@ async def publish_events( | |
async def publish_cloud_event_events( | ||
self, | ||
topic_hostname: str, | ||
events: List["models.CloudEvent"], | ||
events: List["_models.CloudEvent"], | ||
**kwargs | ||
) -> None: | ||
"""Publishes a batch of events to an Azure Event Grid topic. | ||
|
@@ -91,7 +93,9 @@ async def publish_cloud_event_events( | |
:raises: ~azure.core.exceptions.HttpResponseError | ||
""" | ||
cls = kwargs.pop('cls', None) # type: ClsType[None] | ||
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} | ||
error_map = { | ||
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError | ||
} | ||
error_map.update(kwargs.pop('error_map', {})) | ||
api_version = "2018-01-01" | ||
content_type = kwargs.pop("content_type", "application/cloudevents-batch+json; charset=utf-8") | ||
|
@@ -145,7 +149,9 @@ async def publish_custom_event_events( | |
:raises: ~azure.core.exceptions.HttpResponseError | ||
""" | ||
cls = kwargs.pop('cls', None) # type: ClsType[None] | ||
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} | ||
error_map = { | ||
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError | ||
} | ||
error_map.update(kwargs.pop('error_map', {})) | ||
api_version = "2018-01-01" | ||
content_type = kwargs.pop("content_type", "application/json") | ||
|
Large diffs are not rendered by default.
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this something public in the previous release?
naming change seems to be a breaking change to me (although it's just
ACS*
toAcs*
, probably something worth to mention in the changelog.If those are just added in this release, then I have no concern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i was on fence to add this in the changelog, but i agree -updated