-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Replace Sql management client using generic rest client #11393
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e9132fd
add breaking changes
dingmeng-xue 5ecfadc
Update files
dingmeng-xue 0d528a3
Update encoding to UTF8
dingmeng-xue bf09638
Merge remote-tracking branch 'upstream/master' into fix-network
dingmeng-xue b405c25
Replace Sql client using generic rest client
dingmeng-xue 8fccf7b
resolve conflicts
dingmeng-xue b9a05cb
Update change log
dingmeng-xue f0166dd
Revise according to review
dingmeng-xue 74f488f
Merge remote-tracking branch 'upstream/master' into fix-network
dingmeng-xue File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1,554 changes: 858 additions & 696 deletions
1,554
...Network.Test.ScenarioTests.PrivateLinkServiceTests/TestPrivateEndpointConnectionCRUD.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| // ---------------------------------------------------------------------------------- | ||
| // | ||
| // Copyright Microsoft Corporation | ||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
| // ---------------------------------------------------------------------------------- | ||
|
|
||
| using Microsoft.Rest.Azure; | ||
| using Newtonsoft.Json; | ||
| using System.Collections; | ||
| using System.Collections.Generic; | ||
|
|
||
| namespace Microsoft.Azure.Commands.Network.PrivateLinkService.Models | ||
| { | ||
| /// <summary> | ||
| /// Defines a page in Azure responses. | ||
| /// </summary> | ||
| /// <typeparam name="T">Type of the page content items</typeparam> | ||
| [JsonObject] | ||
| public class Page<T> : IPage<T> | ||
| { | ||
| /// <summary> | ||
| /// Gets the link to the next page. | ||
| /// </summary> | ||
| [JsonProperty("nextLink")] | ||
| public string NextPageLink { get; private set; } | ||
|
|
||
| [JsonProperty("value")] | ||
| private List<T> Items { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Returns an enumerator that iterates through the collection. | ||
| /// </summary> | ||
| /// <returns>A an enumerator that can be used to iterate through the collection.</returns> | ||
| public IEnumerator<T> GetEnumerator() | ||
| { | ||
| return Items == null ? System.Linq.Enumerable.Empty<T>().GetEnumerator() : Items.GetEnumerator(); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Returns an enumerator that iterates through the collection. | ||
| /// </summary> | ||
| /// <returns>A an enumerator that can be used to iterate through the collection.</returns> | ||
| IEnumerator IEnumerable.GetEnumerator() | ||
| { | ||
| return GetEnumerator(); | ||
| } | ||
| } | ||
| } |
91 changes: 91 additions & 0 deletions
91
src/Network/Network/PrivateLinkService/Models/PrivateEndpointConnection.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| // ---------------------------------------------------------------------------------- | ||
| // | ||
| // Copyright Microsoft Corporation | ||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
| // ---------------------------------------------------------------------------------- | ||
|
|
||
| using Newtonsoft.Json; | ||
|
|
||
| namespace Microsoft.Azure.Commands.Network.PrivateLinkService.Models | ||
| { | ||
| /// <summary> | ||
| /// A private endpoint connection | ||
| /// </summary> | ||
| [Rest.Serialization.JsonTransformation] | ||
| public partial class PrivateEndpointConnection : ProxyResource | ||
| { | ||
| /// <summary> | ||
| /// Initializes a new instance of the PrivateEndpointConnection class. | ||
| /// </summary> | ||
| public PrivateEndpointConnection() | ||
| { | ||
| CustomInit(); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Initializes a new instance of the PrivateEndpointConnection class. | ||
| /// </summary> | ||
| /// <param name="id">Resource ID.</param> | ||
| /// <param name="name">Resource name.</param> | ||
| /// <param name="type">Resource type.</param> | ||
| /// <param name="privateEndpoint">Private endpoint which the connection | ||
| /// belongs to.</param> | ||
| /// <param name="privateLinkServiceConnectionState">Connection state of | ||
| /// the private endpoint connection.</param> | ||
| /// <param name="provisioningState">State of the private endpoint | ||
| /// connection.</param> | ||
| public PrivateEndpointConnection(string id = default(string), string name = default(string), string type = default(string), PrivateEndpointProperty privateEndpoint = default(PrivateEndpointProperty), PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState = default(PrivateLinkServiceConnectionStateProperty), string provisioningState = default(string)) | ||
| : base(id, name, type) | ||
| { | ||
| PrivateEndpoint = privateEndpoint; | ||
| PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; | ||
| ProvisioningState = provisioningState; | ||
| CustomInit(); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// An initialization method that performs custom operations like setting defaults | ||
| /// </summary> | ||
| partial void CustomInit(); | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets private endpoint which the connection belongs to. | ||
| /// </summary> | ||
| [JsonProperty(PropertyName = "properties.privateEndpoint")] | ||
| public PrivateEndpointProperty PrivateEndpoint { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets connection state of the private endpoint connection. | ||
| /// </summary> | ||
| [JsonProperty(PropertyName = "properties.privateLinkServiceConnectionState")] | ||
| public PrivateLinkServiceConnectionStateProperty PrivateLinkServiceConnectionState { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets state of the private endpoint connection. | ||
| /// </summary> | ||
| [JsonProperty(PropertyName = "properties.provisioningState")] | ||
| public string ProvisioningState { get; private set; } | ||
|
|
||
| /// <summary> | ||
| /// Validate the object. | ||
| /// </summary> | ||
| /// <exception cref="ValidationException"> | ||
| /// Thrown if validation fails | ||
| /// </exception> | ||
| public virtual void Validate() | ||
| { | ||
| if (PrivateLinkServiceConnectionState != null) | ||
| { | ||
| PrivateLinkServiceConnectionState.Validate(); | ||
| } | ||
| } | ||
| } | ||
| } | ||
52 changes: 52 additions & 0 deletions
52
src/Network/Network/PrivateLinkService/Models/PrivateEndpointProperty.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| // ---------------------------------------------------------------------------------- | ||
| // | ||
| // Copyright Microsoft Corporation | ||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
| // ---------------------------------------------------------------------------------- | ||
|
|
||
| using Microsoft.Rest.Azure; | ||
| using Newtonsoft.Json; | ||
|
|
||
| namespace Microsoft.Azure.Commands.Network.PrivateLinkService.Models | ||
| { | ||
| public partial class PrivateEndpointProperty : IResource | ||
| { | ||
| /// <summary> | ||
| /// Initializes a new instance of the PrivateEndpointProperty class. | ||
| /// </summary> | ||
| public PrivateEndpointProperty() | ||
| { | ||
| CustomInit(); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Initializes a new instance of the PrivateEndpointProperty class. | ||
| /// </summary> | ||
| /// <param name="id">Resource id of the private endpoint.</param> | ||
| public PrivateEndpointProperty(string id = default(string)) | ||
| { | ||
| Id = id; | ||
| CustomInit(); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// An initialization method that performs custom operations like setting defaults | ||
| /// </summary> | ||
| partial void CustomInit(); | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets resource id of the private endpoint. | ||
| /// </summary> | ||
| [JsonProperty(PropertyName = "id")] | ||
| public string Id { get; set; } | ||
|
|
||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
nit: usually we use null as default value for reference object instead of default(xxx), I guess this is generated code, so should be fine.
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.
copied from generated code.