Skip to content
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

[Azure.Communication.Common] Added support for rawId ⟷ CommunicationIdentifier conversion #28574

Merged
merged 14 commits into from
Jun 30, 2022
Merged

[Azure.Communication.Common] Added support for rawId ⟷ CommunicationIdentifier conversion #28574

merged 14 commits into from
Jun 30, 2022

Conversation

petrsvihlik
Copy link
Contributor

@petrsvihlik petrsvihlik commented May 6, 2022

Packages impacted by this PR

  • Azure.Communication.Common

Issues associated with this PR

  • N/A

Describe the problem that is addressed by this PR

The CommunicationIdentifier design provides a good abstraction of Azure Communication Services internal id format with better type safety, auto-complete and hides internal knowledge.

However, it doesn't lend well to storing identifiers in a database or using them as keys because there is no clear canonical way how to encode them. This PR introduces translation functions that lets developers use the underlying rawId for these purposes.

Details Internal wiki

What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?

See the Internal wiki

Are there test cases added in this PR?

  • Yes.

Provide a list of related PRs (if any)

Checklists

  • Added impacted package name to the issue description
  • Does this PR needs any fixes in the SDK Generator? NO
  • Added a changelog

@ghost ghost added the Communication label May 6, 2022
@azure-sdk
Copy link
Collaborator

azure-sdk commented May 6, 2022

API change check for Azure.Communication.Common

API changes have been detected in Azure.Communication.Common. You can review API changes here

@azure-sdk
Copy link
Collaborator

API change check for Azure.Core

API changes are not detected in this pull request for Azure.Core

@petrsvihlik petrsvihlik changed the title [Azure.Communication.Common] Added support for rawId<->CommunicationIdentifier conversion [Azure.Communication.Common] Added support for rawId ⟷ CommunicationIdentifier conversion May 6, 2022
@azure-sdk
Copy link
Collaborator

API change check for Azure.Communication.Chat

API changes are not detected in this pull request for Azure.Communication.Chat

@azure-sdk
Copy link
Collaborator

API change check for Azure.Communication.CallingServer

API changes are not detected in this pull request for Azure.Communication.CallingServer

@petrsvihlik petrsvihlik marked this pull request as ready for review May 9, 2022 13:49
@AikoBB AikoBB self-assigned this May 20, 2022
@petrsvihlik petrsvihlik requested review from iaulakh and AikoBB June 16, 2022 12:18
@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

Azure.Communication.Common

@petrsvihlik petrsvihlik requested a review from AikoBB June 23, 2022 15:48
@petrsvihlik petrsvihlik merged commit 5c0a1b8 into Azure:main Jun 30, 2022
zhihaoxue pushed a commit to zhihaoxue/azure-sdk-for-net that referenced this pull request Jul 27, 2022
…dentifier conversion (Azure#28574)

* Added support for rawId<->CommunicationIdentifier conversion

* fixed tests

* fixed compiler suggestions

* updated generated api surface

* fixed tests + added serialization of rawid for communication user

* fixing recordings Azure#1 - for chat

* update recordings with serialized rawId

* add a changelog record for rawId (de)serialization

* adjusted comments

* gethashcode adjustments

* lazy property init

* updated api

* testing that CommunicationIdentifier subclasses implement RawId
sofiar-msft pushed a commit to sofiar-msft/azure-sdk-for-net that referenced this pull request Dec 7, 2022
…dentifier conversion (Azure#28574)

* Added support for rawId<->CommunicationIdentifier conversion

* fixed tests

* fixed compiler suggestions

* updated generated api surface

* fixed tests + added serialization of rawid for communication user

* fixing recordings Azure#1 - for chat

* update recordings with serialized rawId

* add a changelog record for rawId (de)serialization

* adjusted comments

* gethashcode adjustments

* lazy property init

* updated api

* testing that CommunicationIdentifier subclasses implement RawId
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants