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

Update [Resource]Data to inherit the exact matching base class #1095

Merged
merged 16 commits into from
Mar 29, 2021

Conversation

YalinLi0312
Copy link
Member

@YalinLi0312 YalinLi0312 self-assigned this Mar 25, 2021
@YalinLi0312 YalinLi0312 marked this pull request as draft March 25, 2021 18:18
@@ -111,6 +114,12 @@ public ObjectType(ObjectSchema objectSchema, BuildContext context, bool isResour
public ObjectTypeConstructor InitializationConstructor => _initializationConstructor ??= BuildInitializationConstructor();
public ObjectTypeConstructor SerializationConstructor => _serializationConstructor ??= BuildSerializationConstructor();

public void OverrideInherits(CSharpType cSharpType)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't make models returned from the OutputLibrary mutable. They interact in many ways and values can already be observed before we override them.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added ADO item to track this after the merge into feature/v3
https://dev.azure.com/azure-mgmt-ex/DotNET%20Management%20SDK/_workitems/edit/5724

@m-nash m-nash marked this pull request as ready for review March 29, 2021 16:33
Copy link
Member

@m-nash m-nash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chamons @pakrym this is ready to go in if you guys have a chance to take a look

@m-nash m-nash merged commit f63b68d into Azure:feature/mgmt-track2 Mar 29, 2021
@YalinLi0312 YalinLi0312 deleted the yall-5384-ExactMatch branch March 29, 2021 18:09
m-nash added a commit that referenced this pull request Apr 1, 2021
* Mnash 5154 skeleton operations (#1011)

* create shell resource operations objects

* added trailing newline

* Revert "added trailing newline"

This reverts commit a24d17d.

* update launch settings to add a compute option vs modifying

* updates after adding dummy constructor

* updates after merge

* updates to generated code

* address pr comments

* update after redoing npm install

* update launchsettings

* update samples list

* revert unintended change

* update ordering for launch settings

* add resource container shell to mgmt generation (#1025)

* add resource container shell to mgmt generation

* Address review comments

* Renaming Azure.ResourceManager.Compute to Azure.ResourceManager.Sample (#1034)

* Update code to support adding and parsing provider name (#1032)

* WIP: Update code for provider name

* Add operationsGroupMappings example

* Only Write out if has field

* WIP: update operations config


* Update readme

* Wip: update compute


* WIP: off by one

* Remove Synapse

* Remove more tests

* Remove all mgmt test

* Update OutputLibrary.cs

* remove imds for now

* Update Operations

* Tenant id (#1037)

* WIP: tenant id

* WIP: rebase

* Rebase

* WIP

* WIP: tenant deco

* NIT

* NIT

* WIP: Update

* NIT newline

* Updates

* WIP: updates

* Updates

* NIT

* Enable OperationGroup get associated resource name from one property (#1049)

* WIP: update (#1052)

* WIP: update

* Updates

* Fix bad merge

* White space

* Update config

* Mergev3tomgmt (#1062)

* Generate public client constructors and options (#1046)

Generate public client constructors and options

* Make client options class partial (#1055)

* Disable buffering for stream responses (#1060)

* updates after merge

* duplicate end file

* regen after merge

Co-authored-by: ShivangiReja <45216704+ShivangiReja@users.noreply.github.com>
Co-authored-by: Pavel Krymets <pavel@krymets.com>

* merge feature/v3 into feature/mgmt-track2 (#1072)

* Generate public client constructors and options (#1046)

Generate public client constructors and options

* Make client options class partial (#1055)

* Disable buffering for stream responses (#1060)

* Add Url Encoded Body support (#1042)

- Fixes: #986

* Fix LRO create request from relative path on Unix (#1059)

* Remove automated buffering logic (#1064)

* Add System.Text.Json converter to models (#1063)

Fixes: #947

* Fix feature/v3 integration with azure-sdk-for-net (#1065)

- Autorest core 3.0.6372 and above crash due to directive ordering bug Tim is digging into now
- New shared code does not compile cleanly with azure-sdk-for-net rules

* Hide paging classes (#1066)

* Add help content (#1067)

* Add help content

* update after merge

Co-authored-by: ShivangiReja <45216704+ShivangiReja@users.noreply.github.com>
Co-authored-by: Pavel Krymets <pavel@krymets.com>
Co-authored-by: Chris Hamons <chris.hamons@microsoft.com>
Co-authored-by: pavelprystinka <30868871+pavelprystinka@users.noreply.github.com>
Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>

* Support generating empty data and data serialization file (#1074)

* Add compute to test projects

* Support generating empty [Resource]Data.cs and [Resource]Data.Serialization.cs

* Upload compute codegen result

* Remove codegen result

* Resolve merge conflicts

* Resolve reference errors

* Refactor code

* Regenerate Azure.ResourceManager.Sample

* Regenerate Azure.Management.Storage

* Update all other codegen files when running Generate.ps1

* Re-run Generate.ps1

* Remove the stale compute project

* Decorate schema

* Change ResourceData to inherit from ObjectType

* Regenerate Azure.Management.Storage

* Regenerate Azure.ResourceManager.Sample

* Correct the Resource name in [Resource]Container.cs and [Resource]Operation.cs

* Regenerate Azure.Management.Storage

* Regenerate Azure.ResourceManager.Sample

* Cleanup comments

* Re-run Generate.ps1

* Address review comments

* Run Generate.ps1

* regen

* add files

Co-authored-by: YalinLi0312 <yall@microsoft.com>

* [Mgmt Track 2] 5156 generate empty resource autorest change (#1076)

* Empty Resource Code Change

* CI fix

* Empty Resource Sample Update

* Rename arm to mgmt as ARM is ingored

* Updating storage sample

* Updated resource to be in the Generated folder

* Updates after merge

* regenerate with feature/v3 changes

* Update [Resource]Data to inherit the exact matching base class (#1095)

* Add Azure.ResourceManager.Core to package reference group

* Override inheritance in [Resource]Data

* Regenerate Azure.Resourcemanager.Sample

* Regenerate Azure.Management.Storage

* Update Azure.Core and Azure.ResourceManager.Core version

* Rebuild model inheritance

* Correct the properties to generate

* Update ResourceDataWriter and its serialization writer

* Regenerate Azure.ResourceManager.Sample

* Update Azure.resourceManager.Core version

* Regenerate Azure.Management.Storage

* Run Generate.ps1

* Address review comments

* Run Generate.ps1

* initial changes to compile

* finish merge

* initial mgmt fork

* more changes to mgmt fork

* updates after merge

* remove unnecessary Arm configuration checks

* missed a merge conflict to enable the inheritance code

* auto-generate after merge and changes

* address review comments

* change to ireadonlydictionary

* Remove mgmt response headers

* LROs

* remove M-LROs

* remove files until next pr

* address pr comments

* update csproj writer

* update protected property

Co-authored-by: Allen Zhang <allenzhang@live.com>
Co-authored-by: bquantump <53361486+bquantump@users.noreply.github.com>
Co-authored-by: Yalin Li <yall@microsoft.com>
Co-authored-by: ShivangiReja <45216704+ShivangiReja@users.noreply.github.com>
Co-authored-by: Pavel Krymets <pavel@krymets.com>
Co-authored-by: Chris Hamons <chris.hamons@microsoft.com>
Co-authored-by: pavelprystinka <30868871+pavelprystinka@users.noreply.github.com>
Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>
Co-authored-by: m-nash <prognash@microsoft.com>
m-nash added a commit that referenced this pull request Apr 6, 2021
* Mnash 5154 skeleton operations (#1011)

* create shell resource operations objects

* added trailing newline

* Revert "added trailing newline"

This reverts commit a24d17d.

* update launch settings to add a compute option vs modifying

* updates after adding dummy constructor

* updates after merge

* updates to generated code

* address pr comments

* update after redoing npm install

* update launchsettings

* update samples list

* revert unintended change

* update ordering for launch settings

* add resource container shell to mgmt generation (#1025)

* add resource container shell to mgmt generation

* Address review comments

* Renaming Azure.ResourceManager.Compute to Azure.ResourceManager.Sample (#1034)

* Update code to support adding and parsing provider name (#1032)

* WIP: Update code for provider name

* Add operationsGroupMappings example

* Only Write out if has field

* WIP: update operations config


* Update readme

* Wip: update compute


* WIP: off by one

* Remove Synapse

* Remove more tests

* Remove all mgmt test

* Update OutputLibrary.cs

* remove imds for now

* Update Operations

* Tenant id (#1037)

* WIP: tenant id

* WIP: rebase

* Rebase

* WIP

* WIP: tenant deco

* NIT

* NIT

* WIP: Update

* NIT newline

* Updates

* WIP: updates

* Updates

* NIT

* Enable OperationGroup get associated resource name from one property (#1049)

* WIP: update (#1052)

* WIP: update

* Updates

* Fix bad merge

* White space

* Update config

* Mergev3tomgmt (#1062)

* Generate public client constructors and options (#1046)

Generate public client constructors and options

* Make client options class partial (#1055)

* Disable buffering for stream responses (#1060)

* updates after merge

* duplicate end file

* regen after merge

Co-authored-by: ShivangiReja <45216704+ShivangiReja@users.noreply.github.com>
Co-authored-by: Pavel Krymets <pavel@krymets.com>

* merge feature/v3 into feature/mgmt-track2 (#1072)

* Generate public client constructors and options (#1046)

Generate public client constructors and options

* Make client options class partial (#1055)

* Disable buffering for stream responses (#1060)

* Add Url Encoded Body support (#1042)

- Fixes: #986

* Fix LRO create request from relative path on Unix (#1059)

* Remove automated buffering logic (#1064)

* Add System.Text.Json converter to models (#1063)

Fixes: #947

* Fix feature/v3 integration with azure-sdk-for-net (#1065)

- Autorest core 3.0.6372 and above crash due to directive ordering bug Tim is digging into now
- New shared code does not compile cleanly with azure-sdk-for-net rules

* Hide paging classes (#1066)

* Add help content (#1067)

* Add help content

* update after merge

Co-authored-by: ShivangiReja <45216704+ShivangiReja@users.noreply.github.com>
Co-authored-by: Pavel Krymets <pavel@krymets.com>
Co-authored-by: Chris Hamons <chris.hamons@microsoft.com>
Co-authored-by: pavelprystinka <30868871+pavelprystinka@users.noreply.github.com>
Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>

* Support generating empty data and data serialization file (#1074)

* Add compute to test projects

* Support generating empty [Resource]Data.cs and [Resource]Data.Serialization.cs

* Upload compute codegen result

* Remove codegen result

* Resolve merge conflicts

* Resolve reference errors

* Refactor code

* Regenerate Azure.ResourceManager.Sample

* Regenerate Azure.Management.Storage

* Update all other codegen files when running Generate.ps1

* Re-run Generate.ps1

* Remove the stale compute project

* Decorate schema

* Change ResourceData to inherit from ObjectType

* Regenerate Azure.Management.Storage

* Regenerate Azure.ResourceManager.Sample

* Correct the Resource name in [Resource]Container.cs and [Resource]Operation.cs

* Regenerate Azure.Management.Storage

* Regenerate Azure.ResourceManager.Sample

* Cleanup comments

* Re-run Generate.ps1

* Address review comments

* Run Generate.ps1

* regen

* add files

Co-authored-by: YalinLi0312 <yall@microsoft.com>

* [Mgmt Track 2] 5156 generate empty resource autorest change (#1076)

* Empty Resource Code Change

* CI fix

* Empty Resource Sample Update

* Rename arm to mgmt as ARM is ingored

* Updating storage sample

* Updated resource to be in the Generated folder

* Updates after merge

* regenerate with feature/v3 changes

* WIP: First cust parent algo

* Update OutputLibrary.cs

* WIP

* WIP:

* WIP

* WIP

* WIP

* WIP: Updates

* WIP

* WIP:

* WIP

* WIP

* WIP

* WIP

* WIP: update configs

* WIP: update test

* WIP

* Update [Resource]Data to inherit the exact matching base class (#1095)

* Add Azure.ResourceManager.Core to package reference group

* Override inheritance in [Resource]Data

* Regenerate Azure.Resourcemanager.Sample

* Regenerate Azure.Management.Storage

* Update Azure.Core and Azure.ResourceManager.Core version

* Rebuild model inheritance

* Correct the properties to generate

* Update ResourceDataWriter and its serialization writer

* Regenerate Azure.ResourceManager.Sample

* Update Azure.resourceManager.Core version

* Regenerate Azure.Management.Storage

* Run Generate.ps1

* Address review comments

* Run Generate.ps1

* initial changes to compile

* finish merge

* initial mgmt fork

* Updates test

* more changes to mgmt fork

* updates after merge

* remove unnecessary Arm configuration checks

* missed a merge conflict to enable the inheritance code

* auto-generate after merge and changes

* address review comments

* Updates

* Update

* WIP

* Merge

* Update

* Updates

* Updates

* Update DataPlaneResponseHeaderGroupWriter.cs

* Update DataPlaneLongRunningOperationWriter.cs

* Update DataPlaneLongRunningOperationMethod.cs

* address review comments

* add resource rename test

Co-authored-by: m-nash <64171366+m-nash@users.noreply.github.com>
Co-authored-by: Allen Zhang <allenzhang@live.com>
Co-authored-by: Yalin Li <yall@microsoft.com>
Co-authored-by: ShivangiReja <45216704+ShivangiReja@users.noreply.github.com>
Co-authored-by: Pavel Krymets <pavel@krymets.com>
Co-authored-by: Chris Hamons <chris.hamons@microsoft.com>
Co-authored-by: pavelprystinka <30868871+pavelprystinka@users.noreply.github.com>
Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>
Co-authored-by: m-nash <prognash@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants