Skip to content

Commit

Permalink
[EG] GA Namespaces (#35831)
Browse files Browse the repository at this point in the history
* [EGv2] Build Release (#30325)

* move old sdk under legacy

* gen typespec code

* naming changes from archboard

* samples

* update patch naming

* update imports with new gen

* update samples

* update client naming on aio

* update receive op

* update async to close client

* update receive()

* update gen code

* moving around samples

* updating samples

* update samples

* update patch and samples

* patch internalmodels

* spacing

* updating model patch

* update patch models

* add both models back

* update docstring

* update docs

* updating patch for receive

* old EG models

* add reject samples

* patch

* update format

* update patch

* eventgrid_client exceptions

* update test imports

* update total sample

* receive patch fix

* add in more tests

* update test file

* remove locktoken model

* remove LockToken in patch

* remove event delivery delay

* eg client exceptions

* .8.5 generation, and deliveryCount

* rename sample

* update version for beta

* changelog

* updating for gen

* regen

* generate via commit

* publish result

* fix docstring

* publish docstring

* return type

* publish result

* return publish result -- is none

* format

* update Publish result model

* deliverycount patch

* update from main

* add copyright

* added to readme

* remove from readme

* force publish_result response

* update patch tp unindent

* cspell

* update mypy.ini

* import order

* mark livetest

* update operations init

* rename async

* mypy

* ignore mypy

* pylint

* pylint

* ignore pylint for now to avoid gen code errors

* ignore samples until ARM setup

* update patches

* remove publish result

* remove PublishResult

* remove publishresult

* comma

Co-authored-by: swathipil <[email protected]>

* update publishResult

* change to .value

* gen code " to '

* remove comment

* ran black

* update changelog

* update sample readme

* gen code without query name

* gen code

* update tsp commit

* remove publishresult

* readme disclaimer

* update changelog

---------

Co-authored-by: swathipil <[email protected]>

* link to samples

* remove comment

* remove uneeded test

* [EGv2] doc updates (#30483)

* doc updates

* doc update

* doc

* [EGv2] Eg typing/formatting (#30492)

* mypy pylint

* update samples

* remove version disclaimer

* Beta LiveTests (#30728)

* add bicep file for tests

* update output

* update test

* secret sanitization

* refactor failing test

* update conftest

* update assets and sanitizers

* update preparer loc

* update conftest

* conftest

* update conftest

* remove variables for now

* update assets

* update tests

* try to update regex

* update recordings

* update conftest

* update preparer

* update test

* update exception test

* update tests

* update asset

* update conftest

* pr comments

* default needs to be eastus

* import

* [EGv2] generate with newer emitter (#31962)

* [EGv2] Build Release (#30325)

* move old sdk under legacy

* gen typespec code

* naming changes from archboard

* samples

* update patch naming

* update imports with new gen

* update samples

* update client naming on aio

* update receive op

* update async to close client

* update receive()

* update gen code

* moving around samples

* updating samples

* update samples

* update patch and samples

* patch internalmodels

* spacing

* updating model patch

* update patch models

* add both models back

* update docstring

* update docs

* updating patch for receive

* old EG models

* add reject samples

* patch

* update format

* update patch

* eventgrid_client exceptions

* update test imports

* update total sample

* receive patch fix

* add in more tests

* update test file

* remove locktoken model

* remove LockToken in patch

* remove event delivery delay

* eg client exceptions

* .8.5 generation, and deliveryCount

* rename sample

* update version for beta

* changelog

* updating for gen

* regen

* generate via commit

* publish result

* fix docstring

* publish docstring

* return type

* publish result

* return publish result -- is none

* format

* update Publish result model

* deliverycount patch

* update from main

* add copyright

* added to readme

* remove from readme

* force publish_result response

* update patch tp unindent

* cspell

* update mypy.ini

* import order

* mark livetest

* update operations init

* rename async

* mypy

* ignore mypy

* pylint

* pylint

* ignore pylint for now to avoid gen code errors

* ignore samples until ARM setup

* update patches

* remove publish result

* remove PublishResult

* remove publishresult

* comma

Co-authored-by: swathipil <[email protected]>

* update publishResult

* change to .value

* gen code " to '

* remove comment

* ran black

* update changelog

* update sample readme

* gen code without query name

* gen code

* update tsp commit

* remove publishresult

* readme disclaimer

* update changelog

---------

Co-authored-by: swathipil <[email protected]>

* generate with newer emitter

* update tsp

* regen

* update tests

* update tspconfig

* cspell

* version

* update serialization

* update assets

* update mypy

---------

Co-authored-by: swathipil <[email protected]>

* [EGv2] Binary mode  (#32922)

* [EGv2] Build Release (#30325)

* move old sdk under legacy

* gen typespec code

* naming changes from archboard

* samples

* update patch naming

* update imports with new gen

* update samples

* update client naming on aio

* update receive op

* update async to close client

* update receive()

* update gen code

* moving around samples

* updating samples

* update samples

* update patch and samples

* patch internalmodels

* spacing

* updating model patch

* update patch models

* add both models back

* update docstring

* update docs

* updating patch for receive

* old EG models

* add reject samples

* patch

* update format

* update patch

* eventgrid_client exceptions

* update test imports

* update total sample

* receive patch fix

* add in more tests

* update test file

* remove locktoken model

* remove LockToken in patch

* remove event delivery delay

* eg client exceptions

* .8.5 generation, and deliveryCount

* rename sample

* update version for beta

* changelog

* updating for gen

* regen

* generate via commit

* publish result

* fix docstring

* publish docstring

* return type

* publish result

* return publish result -- is none

* format

* update Publish result model

* deliverycount patch

* update from main

* add copyright

* added to readme

* remove from readme

* force publish_result response

* update patch tp unindent

* cspell

* update mypy.ini

* import order

* mark livetest

* update operations init

* rename async

* mypy

* ignore mypy

* pylint

* pylint

* ignore pylint for now to avoid gen code errors

* ignore samples until ARM setup

* update patches

* remove publish result

* remove PublishResult

* remove publishresult

* comma

Co-authored-by: swathipil <[email protected]>

* update publishResult

* change to .value

* gen code " to '

* remove comment

* ran black

* update changelog

* update sample readme

* gen code without query name

* gen code

* update tsp commit

* remove publishresult

* readme disclaimer

* update changelog

---------

Co-authored-by: swathipil <[email protected]>

* Beta LiveTests (#30728)

* add bicep file for tests

* update output

* update test

* secret sanitization

* refactor failing test

* update conftest

* update assets and sanitizers

* update preparer loc

* update conftest

* conftest

* update conftest

* remove variables for now

* update assets

* update tests

* try to update regex

* update recordings

* update conftest

* update preparer

* update test

* update exception test

* update tests

* update asset

* update conftest

* pr comments

* default needs to be eastus

* import

* [EGv2] Build Release (#30325)

* move old sdk under legacy

* gen typespec code

* naming changes from archboard

* samples

* update patch naming

* update imports with new gen

* update samples

* update client naming on aio

* update receive op

* update async to close client

* update receive()

* update gen code

* moving around samples

* updating samples

* update samples

* update patch and samples

* patch internalmodels

* spacing

* updating model patch

* update patch models

* add both models back

* update docstring

* update docs

* updating patch for receive

* old EG models

* add reject samples

* patch

* update format

* update patch

* eventgrid_client exceptions

* update test imports

* update total sample

* receive patch fix

* add in more tests

* update test file

* remove locktoken model

* remove LockToken in patch

* remove event delivery delay

* eg client exceptions

* .8.5 generation, and deliveryCount

* rename sample

* update version for beta

* changelog

* updating for gen

* regen

* generate via commit

* publish result

* fix docstring

* publish docstring

* return type

* publish result

* return publish result -- is none

* format

* update Publish result model

* deliverycount patch

* update from main

* add copyright

* added to readme

* remove from readme

* force publish_result response

* update patch tp unindent

* cspell

* update mypy.ini

* import order

* mark livetest

* update operations init

* rename async

* mypy

* ignore mypy

* pylint

* pylint

* ignore pylint for now to avoid gen code errors

* ignore samples until ARM setup

* update patches

* remove publish result

* remove PublishResult

* remove publishresult

* comma

Co-authored-by: swathipil <[email protected]>

* update publishResult

* change to .value

* gen code " to '

* remove comment

* ran black

* update changelog

* update sample readme

* gen code without query name

* gen code

* update tsp commit

* remove publishresult

* readme disclaimer

* update changelog

---------

Co-authored-by: swathipil <[email protected]>

* fix merge

* dont go to generated before binary

* update patch

* update patches

* eventgrid client patch

* changes

* add

* update test

* update tyoe checking

* pass through binary_mode for now --

* update patch aio

* add async func

* update

* sys

* update kwargs

* add Todo and start adding more tests

* update

* differentiate between binary and not

* update binary

* no base64 in binary mode

* binary

* try JSONEncoder on everything if not str/bytes

* update test

* update test

* update changes

* whitespace

* space

* remove commented

* str serialize extensions?

* xml test

* encode extensions as object

* update test

* update extension serialization for  deserialize

* move flag to operation level

* extra comma

* dont raise httpresponse

* update patch

* accept dict cloud events

* spacing

* remove content_type check

* add live test

* remove live test mark

* update

* use env vars

* update test

* only run live test

* comment

* typo

* error incorrect

* start comments

* update test

* add sample

* update tests

* update docstrings to add clarity

* update err message

* remove generated cloud event

* update sample

* update

* update samples to include dict

* update patch

* spacing

* add comments

* formatting

* update doc

* update tests

* update tests

* tests

* skip tests for now

* typo

* add dict binary mode

* update docstring

* update patch to allow throw error

* first pass at comments

* update patch eror

* nit

---------

Co-authored-by: swathipil <[email protected]>

* [EventGrid] Ignite Release generate with new typespec (#32652)

* Beta LiveTests (#30728)

* add bicep file for tests

* update output

* update test

* secret sanitization

* refactor failing test

* update conftest

* update assets and sanitizers

* update preparer loc

* update conftest

* conftest

* update conftest

* remove variables for now

* update assets

* update tests

* try to update regex

* update recordings

* update conftest

* update preparer

* update test

* update exception test

* update tests

* update asset

* update conftest

* pr comments

* default needs to be eastus

* import

* [EGv2] Binary mode  (#32922)

* [EGv2] Build Release (#30325)

* move old sdk under legacy

* gen typespec code

* naming changes from archboard

* samples

* update patch naming

* update imports with new gen

* update samples

* update client naming on aio

* update receive op

* update async to close client

* update receive()

* update gen code

* moving around samples

* updating samples

* update samples

* update patch and samples

* patch internalmodels

* spacing

* updating model patch

* update patch models

* add both models back

* update docstring

* update docs

* updating patch for receive

* old EG models

* add reject samples

* patch

* update format

* update patch

* eventgrid_client exceptions

* update test imports

* update total sample

* receive patch fix

* add in more tests

* update test file

* remove locktoken model

* remove LockToken in patch

* remove event delivery delay

* eg client exceptions

* .8.5 generation, and deliveryCount

* rename sample

* update version for beta

* changelog

* updating for gen

* regen

* generate via commit

* publish result

* fix docstring

* publish docstring

* return type

* publish result

* return publish result -- is none

* format

* update Publish result model

* deliverycount patch

* update from main

* add copyright

* added to readme

* remove from readme

* force publish_result response

* update patch tp unindent

* cspell

* update mypy.ini

* import order

* mark livetest

* update operations init

* rename async

* mypy

* ignore mypy

* pylint

* pylint

* ignore pylint for now to avoid gen code errors

* ignore samples until ARM setup

* update patches

* remove publish result

* remove PublishResult

* remove publishresult

* comma

Co-authored-by: swathipil <[email protected]>

* update publishResult

* change to .value

* gen code " to '

* remove comment

* ran black

* update changelog

* update sample readme

* gen code without query name

* gen code

* update tsp commit

* remove publishresult

* readme disclaimer

* update changelog

---------

Co-authored-by: swathipil <[email protected]>

* Beta LiveTests (#30728)

* add bicep file for tests

* update output

* update test

* secret sanitization

* refactor failing test

* update conftest

* update assets and sanitizers

* update preparer loc

* update conftest

* conftest

* update conftest

* remove variables for now

* update assets

* update tests

* try to update regex

* update recordings

* update conftest

* update preparer

* update test

* update exception test

* update tests

* update asset

* update conftest

* pr comments

* default needs to be eastus

* import

* [EGv2] Build Release (#30325)

* move old sdk under legacy

* gen typespec code

* naming changes from archboard

* samples

* update patch naming

* update imports with new gen

* update samples

* update client naming on aio

* update receive op

* update async to close client

* update receive()

* update gen code

* moving around samples

* updating samples

* update samples

* update patch and samples

* patch internalmodels

* spacing

* updating model patch

* update patch models

* add both models back

* update docstring

* update docs

* updating patch for receive

* old EG models

* add reject samples

* patch

* update format

* update patch

* eventgrid_client exceptions

* update test imports

* update total sample

* receive patch fix

* add in more tests

* update test file

* remove locktoken model

* remove LockToken in patch

* remove event delivery delay

* eg client exceptions

* .8.5 generation, and deliveryCount

* rename sample

* update version for beta

* changelog

* updating for gen

* regen

* generate via commit

* publish result

* fix docstring

* publish docstring

* return type

* publish result

* return publish result -- is none

* format

* update Publish result model

* deliverycount patch

* update from main

* add copyright

* added to readme

* remove from readme

* force publish_result response

* update patch tp unindent

* cspell

* update mypy.ini

* import order

* mark livetest

* update operations init

* rename async

* mypy

* ignore mypy

* pylint

* pylint

* ignore pylint for now to avoid gen code errors

* ignore samples until ARM setup

* update patches

* remove publish result

* remove PublishResult

* remove publishresult

* comma

Co-authored-by: swathipil <[email protected]>

* update publishResult

* change to .value

* gen code " to '

* remove comment

* ran black

* update changelog

* update sample readme

* gen code without query name

* gen code

* update tsp commit

* remove publishresult

* readme disclaimer

* update changelog

---------

Co-authored-by: swathipil <[email protected]>

* fix merge

* dont go to generated before binary

* update patch

* update patches

* eventgrid client patch

* changes

* add

* update test

* update tyoe checking

* pass through binary_mode for now --

* update patch aio

* add async func

* update

* sys

* update kwargs

* add Todo and start adding more tests

* update

* differentiate between binary and not

* update binary

* no base64 in binary mode

* binary

* try JSONEncoder on everything if not str/bytes

* update test

* update test

* update changes

* whitespace

* space

* remove commented

* str serialize extensions?

* xml test

* encode extensions as object

* update test

* update extension serialization for  deserialize

* move flag to operation level

* extra comma

* dont raise httpresponse

* update patch

* accept dict cloud events

* spacing

* remove content_type check

* add live test

* remove live test mark

* update

* use env vars

* update test

* only run live test

* comment

* typo

* error incorrect

* start comments

* update test

* add sample

* update tests

* update docstrings to add clarity

* update err message

* remove generated cloud event

* update sample

* update

* update samples to include dict

* update patch

* spacing

* add comments

* formatting

* update doc

* update tests

* update tests

* tests

* skip tests for now

* typo

* add dict binary mode

* update docstring

* update patch to allow throw error

* first pass at comments

* update patch eror

* nit

---------

Co-authored-by: swathipil <[email protected]>

* [EGv2] Build Release (#30325)

* move old sdk under legacy

* gen typespec code

* naming changes from archboard

* samples

* update patch naming

* update imports with new gen

* update samples

* update client naming on aio

* update receive op

* update async to close client

* update receive()

* update gen code

* moving around samples

* updating samples

* update samples

* update patch and samples

* patch internalmodels

* spacing

* updating model patch

* update patch models

* add both models back

* update docstring

* update docs

* updating patch for receive

* old EG models

* add reject samples

* patch

* update format

* update patch

* eventgrid_client exceptions

* update test imports

* update total sample

* receive patch fix

* add in more tests

* update test file

* remove locktoken model

* remove LockToken in patch

* remove event delivery delay

* eg client exceptions

* .8.5 generation, and deliveryCount

* rename sample

* update version for beta

* changelog

* updating for gen

* regen

* generate via commit

* publish result

* fix docstring

* publish docstring

* return type

* publish result

* return publish result -- is none

* format

* update Publish result model

* deliverycount patch

* update from main

* add copyright

* added to readme

* remove from readme

* force publish_result response

* update patch tp unindent

* cspell

* update mypy.ini

* import order

* mark livetest

* update operations init

* rename async

* mypy

* ignore mypy

* pylint

* pylint

* ignore pylint for now to avoid gen code errors

* ignore samples until ARM setup

* update patches

* remove publish result

* remove PublishResult

* remove publishresult

* comma

Co-authored-by: swathipil <[email protected]>

* update publishResult

* change to .value

* gen code " to '

* remove comment

* ran black

* update changelog

* update sample readme

* gen code without query name

* gen code

* update tsp commit

* remove publishresult

* readme disclaimer

* update changelog

---------

Co-authored-by: swathipil <[email protected]>

* Beta LiveTests (#30728)

* add bicep file for tests

* update output

* update test

* secret sanitization

* refactor failing test

* update conftest

* update assets and sanitizers

* update preparer loc

* update conftest

* conftest

* update conftest

* remove variables for now

* update assets

* update tests

* try to update regex

* update recordings

* update conftest

* update preparer

* update test

* update exception test

* update tests

* update asset

* update conftest

* pr comments

* default needs to be eastus

* import

* regen

* new api version

* samples for new features

* update test-resources.json

* update operation samples

* add samples

* more sample

* update tests

* add mros

* gen

* fix changelog

* update tests

* update preparer

* point at canary until release

* update test deployment area

* update

* add

* try this tests

* update samples

* livetest mark

* update tests

* eastus working?

* regen - removed azure refs in gen code

* update comments

* add other sample

* update

* remove stream - no response

* update version and date for release

---------

Co-authored-by: swathipil <[email protected]>

* update for release

* add changelog

* [EG] Regenerate beta (#35014)

* update generation

* version

* skip

* [EG] Beta One Client (#34973)

* [EG] dont hardcode api_version on request (#34965)

* dont hardcode api_version on request

* pylint fixes

* revert

* api version

* Update sdk/eventgrid/azure-eventgrid/azure/eventgrid/aio/_publisher_client_async.py

* Update sdk/eventgrid/azure-eventgrid/azure/eventgrid/aio/_publisher_client_async.py

* add sync side patches

* aio patches

* update readme samples

* all samples use EGClient

* update readme samples

* fix imports

* import issue

* missing pathc

* allow sas cred

* typo

* updates

* sas

* client

* self serialize cloudevent

* add bakc in

* updates

* update ptach

* update

* update exception logic

* async w client

* aio [atch

* typo

* import

* update links

* tests

* raise error

* content type

* use more fake url

* remove content type

* mypy

* update apiversion

* content type

* unitttests

* update auth

* updates

* add level

* update readme

* update

* binary mode

* args, kwargs

* remove auth

* add sample comments

* testing

* move around readme

* content type

* update tests

* docstring

* cncf event

* add more tests

* update doc

* update inits to prevent typing errors

* ran blakc

* fix pylint patch

* changes

* add all kwargs

* indent

* reviews

* nit

* name changes

* options

* options/result rename

* Revert "options"

This reverts commit fe0623a.

* Revert "options/result rename"

This reverts commit 6d37422.

* fix tests

* remove or None

* remove EGPubClient

* remove options naming

* Revert "remove EGPubClient"

This reverts commit bf94364.

* typeerror

* update readme

* readme nit

* readme updates

* add send operation samples

* add datacontenttpye

* typo

* make Options bag models kwargs

* remove models

* import

* exception

* update changelog

* shorten operation names

* nit

* [EG] Docstring/update changelog (#35108)

* nits

* Revert "shorten operation names"

This reverts commit cd37161.

* remove broken link

* edit

* update readme (#35147)

* beta version

* [EG] Readme updates (#35152)

* simplify readme

* update all links to feature branch

* spacing

* try

* type error to value error (#35164)

* [EG] rename release_delay (#35172)

* rename

* valueError

* update version

* version

* [EG] regenerate to fix gen code bug (#35327)

* regenerate to fix gen code bug

* update serialization code

* update

* pylint

* update faulty tests

* use _patch

* use _patch

* add test type

* fix test + add version

* ver (#35345)

* typo (#35348)

* typo (#35351)

* typo

* update

* [EG] Archboard Feedback (#35738)

* regen

* remove all samples/tests before fixing

* move all topic/sub to client level

* update

* updates

* update samples

* add other publisher tests

* missing

* content type

* consumerclient

* upload consumer tests

* updates

* update

* changes

* updates

* rename

* update

* patch

* test update

* update tests

* fix

* updates snippets

* update readme

* try updating api_version

* typo

Co-authored-by: swathipil <[email protected]>

* typo2

Co-authored-by: swathipil <[email protected]>

* renames/docs from comments

* regen

* update patch

* remove import

* caps

---------

Co-authored-by: swathipil <[email protected]>

* [EG] Update tests (#35833)

* [EG] Update tests (#35752)

* test

* typo

* update recordings

* mark live

* kwarg fix

* updates

* revert

* kwargs

* continue skip

* rename

* naming

* remove _async

* nit

* typo

* remove async

* remove print (#35855)

* [EG] update pyproject and samples (#35857)

* update

* pylint changes

* update readme + version

* regen

* Update scripts/devops_tasks/test_run_samples.py

* readme

* typo

* update

* add tests

* updates tests 2

* Revert "updates tests 2"

This reverts commit 1b85d9e.

* try

* typeError

* missing await

* unused import

---------

Co-authored-by: swathipil <[email protected]>
  • Loading branch information
l0lawrence and swathipil authored Jun 10, 2024
1 parent 9b6427c commit 8abbc26
Show file tree
Hide file tree
Showing 118 changed files with 10,260 additions and 1,751 deletions.
5 changes: 5 additions & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@
"centraluseuap",
"creds",
"ctoring",
"ctxt",
"ctypes",
"curr",
"dateutil",
Expand All @@ -209,6 +210,7 @@
"dependened",
"deque",
"deserialization",
"deserializers",
"disablecov",
"distilbert",
"distilroberta",
Expand Down Expand Up @@ -297,6 +299,8 @@
"mibps",
"mgmt",
"mhsm",
"mros",
"Nify",
"mipsle",
"mktime",
"mlindex",
Expand Down Expand Up @@ -449,6 +453,7 @@
"yarl",
"SDDL",
"dacl",
"wday",
"whls",
"aiter",
"solft",
Expand Down
36 changes: 32 additions & 4 deletions sdk/eventgrid/azure-eventgrid/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,40 @@
# Release History

## 4.19.1 (Unreleased)
## 4.20.0 (Unreleased)

### Features Added

### Breaking Changes
### Bugs Fixed
### Other Changes

## 4.20.0b2 (2024-04-25)

This is a Beta of the EventGridClient

### Bugs Fixed

### Other Changes
- Fixed serialization issues with CloudEvent and CNCF Cloud Event

## 4.20.0b1 (2024-04-11)

### Features Added

- This is a Beta of the EventGridClient
- EventGridClient `send` can be used for both Event Grid Namespace Resources and Event Grid Basic Resources.
- Added a kwarg `level` in the EventGridClient constructor. The default value is `Standard` which creates a client for an Event Grid Namespace Resource.

### Breaking Changes

- Removed the `AcknowledgeOptions`,`ReleaseOptions`, `RejectOptions`, and `RenewLockOptions` models. `lock_tokens` can now be specified as a `kwarg` on the operation.
- Renamed `publish_cloud_events` to `send`.

## 4.19.0 (2024-04-10)

### Features Added

- Added new enum values to `SystemEventNames` related to Azure Communication Services.

### Bugs Fixed
### Breaking Changes

- Fixed a bug where the Api Version was being hardcoded to `2018-01-01` on any request sent to the service.

Expand All @@ -32,6 +50,15 @@ This version and all future versions will require Python 3.8+.
### Features Added

- Added new enums values to `SystemEventNames` related to Azure Storage and Azure VMware Solution.
## 4.17.0b1 (2023-11-09)

### Features Added

- Beta EventGridClient features were added on top of the last GA version of EventGrid.
- Added new features to the EventGridClient that supports `publish_cloud_events`, `receive_cloud_events`, `acknowledge_cloud_events` , `release_cloud_events`, and `reject_cloud_events` operations. These features include a `renew_cloud_event_locks` operation, as well as a `release_with_delay` parameter on the `release_cloud_events` operation.
- The `lock_tokens` parameter in `reject_cloud_events`, `release_cloud_events`, and `acknowledge_cloud_events` was renamed to `reject_options`, `release_options`, and `acknowledge_options`.
- The `binary_mode` keyword argument on `publish_cloud_events` was added to allow for binary mode support when publishing single Cloud Events.
- Added new models to support these new operations on EventGridClient.

## 4.16.0 (2023-11-08)

Expand All @@ -55,6 +82,7 @@ This version and all future versions will require Python 3.8+.

### Features Added

- Beta EventGridClient features were removed for this and future GA versions.
- Added new enum values to `SystemEventNames` related to Azure Container Services.

## 4.12.0b1 (2023-05-22)
Expand Down
6 changes: 3 additions & 3 deletions sdk/eventgrid/azure-eventgrid/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
recursive-include tests *.py *.yaml
recursive-include samples *.py
include *.md
include LICENSE
include azure/__init__.py
include azure/eventgrid/py.typed
recursive-include tests *.py
recursive-include samples *.py *.md
include azure/__init__.py
279 changes: 134 additions & 145 deletions sdk/eventgrid/azure-eventgrid/README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sdk/eventgrid/azure-eventgrid/azure/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
25 changes: 17 additions & 8 deletions sdk/eventgrid/azure-eventgrid/azure/eventgrid/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,27 @@
# --------------------------------------------------------------------------
# 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) Python Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._publisher_client import EventGridPublisherClient
from ._event_mappings import SystemEventNames
from ._helpers import generate_sas
from ._models import EventGridEvent
from ._patch import EventGridPublisherClient
from ._patch import EventGridConsumerClient
from ._version import VERSION

__version__ = VERSION

try:
from ._patch import __all__ as _patch_all
from ._patch import * # pylint: disable=unused-wildcard-import
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk

__all__ = [
"EventGridPublisherClient",
"EventGridEvent",
"generate_sas",
"SystemEventNames",
"EventGridConsumerClient",
]
__version__ = VERSION
__all__.extend([p for p in _patch_all if p not in __all__])

_patch_sdk()
183 changes: 183 additions & 0 deletions sdk/eventgrid/azure-eventgrid/azure/eventgrid/_client.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
# 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) Python Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

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

from azure.core import PipelineClient
from azure.core.credentials import AzureKeyCredential
from azure.core.pipeline import policies
from azure.core.rest import HttpRequest, HttpResponse

from ._configuration import EventGridConsumerClientConfiguration, EventGridPublisherClientConfiguration
from ._operations import EventGridConsumerClientOperationsMixin, EventGridPublisherClientOperationsMixin
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
"""EventGridPublisherClient.
:param endpoint: The host name of the namespace, e.g.
namespaceName1.westus-1.eventgrid.azure.net. Required.
:type endpoint: str
:param credential: Credential used to authenticate requests to the service. Is either a
AzureKeyCredential type or a TokenCredential type. Required.
:type credential: ~azure.core.credentials.AzureKeyCredential or
~azure.core.credentials.TokenCredential
:keyword api_version: The API version to use for this operation. Default value is "2024-06-01".
Note that overriding this default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, endpoint: str, credential: Union[AzureKeyCredential, "TokenCredential"], **kwargs: Any) -> None:
_endpoint = "{endpoint}"
self._config = EventGridPublisherClientConfiguration(endpoint=endpoint, credential=credential, **kwargs)
_policies = kwargs.pop("policies", None)
if _policies is None:
_policies = [
policies.RequestIdPolicy(**kwargs),
self._config.headers_policy,
self._config.user_agent_policy,
self._config.proxy_policy,
policies.ContentDecodePolicy(**kwargs),
self._config.redirect_policy,
self._config.retry_policy,
self._config.authentication_policy,
self._config.custom_hook_policy,
self._config.logging_policy,
policies.DistributedTracingPolicy(**kwargs),
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
self._config.http_logging_policy,
]
self._client: PipelineClient = PipelineClient(base_url=_endpoint, policies=_policies, **kwargs)

self._serialize = Serializer()
self._deserialize = Deserializer()
self._serialize.client_side_validation = False

def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.
>>> from azure.core.rest import HttpRequest
>>> request = HttpRequest("GET", "https://www.example.org/")
<HttpRequest [GET], url: 'https://www.example.org/'>
>>> response = client.send_request(request)
<HttpResponse: 200 OK>
For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request
:param request: The network request you want to make. Required.
:type request: ~azure.core.rest.HttpRequest
:keyword bool stream: Whether the response payload will be streamed. Defaults to False.
:return: The response of your network call. Does not do error handling on your response.
:rtype: ~azure.core.rest.HttpResponse
"""

request_copy = deepcopy(request)
path_format_arguments = {
"endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True),
}

request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore

def close(self) -> None:
self._client.close()

def __enter__(self) -> "EventGridPublisherClient":
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
"""EventGridConsumerClient.
:param endpoint: The host name of the namespace, e.g.
namespaceName1.westus-1.eventgrid.azure.net. Required.
:type endpoint: str
:param credential: Credential used to authenticate requests to the service. Is either a
AzureKeyCredential type or a TokenCredential type. Required.
:type credential: ~azure.core.credentials.AzureKeyCredential or
~azure.core.credentials.TokenCredential
:keyword api_version: The API version to use for this operation. Default value is "2024-06-01".
Note that overriding this default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, endpoint: str, credential: Union[AzureKeyCredential, "TokenCredential"], **kwargs: Any) -> None:
_endpoint = "{endpoint}"
self._config = EventGridConsumerClientConfiguration(endpoint=endpoint, credential=credential, **kwargs)
_policies = kwargs.pop("policies", None)
if _policies is None:
_policies = [
policies.RequestIdPolicy(**kwargs),
self._config.headers_policy,
self._config.user_agent_policy,
self._config.proxy_policy,
policies.ContentDecodePolicy(**kwargs),
self._config.redirect_policy,
self._config.retry_policy,
self._config.authentication_policy,
self._config.custom_hook_policy,
self._config.logging_policy,
policies.DistributedTracingPolicy(**kwargs),
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
self._config.http_logging_policy,
]
self._client: PipelineClient = PipelineClient(base_url=_endpoint, policies=_policies, **kwargs)

self._serialize = Serializer()
self._deserialize = Deserializer()
self._serialize.client_side_validation = False

def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.
>>> from azure.core.rest import HttpRequest
>>> request = HttpRequest("GET", "https://www.example.org/")
<HttpRequest [GET], url: 'https://www.example.org/'>
>>> response = client.send_request(request)
<HttpResponse: 200 OK>
For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request
:param request: The network request you want to make. Required.
:type request: ~azure.core.rest.HttpRequest
:keyword bool stream: Whether the response payload will be streamed. Defaults to False.
:return: The response of your network call. Does not do error handling on your response.
:rtype: ~azure.core.rest.HttpResponse
"""

request_copy = deepcopy(request)
path_format_arguments = {
"endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True),
}

request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore

def close(self) -> None:
self._client.close()

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

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

0 comments on commit 8abbc26

Please sign in to comment.