-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[PrivateLink] Update StorageSync SDK with 2020-03-01 #12249
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
Changes from 6 commits
a48f090
9022a2d
8cb02ec
8c73862
65d6e08
37aa542
7cdecaf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| // ---------------------------------------------------------------------------------- | ||
| // | ||
| // 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.Azure.Commands.StorageSync.Models; | ||
| using StorageSyncModels = Microsoft.Azure.Management.StorageSync.Models; | ||
|
|
||
| namespace Microsoft.Azure.Commands.StorageSync.Common.Converters | ||
| { | ||
|
|
||
| /// <summary> | ||
| /// Class PrivateEndpointConnectionsConverter. | ||
| /// Implements the <see cref="Microsoft.Azure.Commands.StorageSync.Common.Converters.ConverterBase{Microsoft.Azure.Commands.StorageSync.Models.PSPrivateEndpointConnection, Microsoft.Azure.Management.StorageSync.Models.PrivateEndpointConnection}" /> | ||
| /// </summary> | ||
| /// <seealso cref="Microsoft.Azure.Commands.StorageSync.Common.Converters.ConverterBase{Microsoft.Azure.Commands.StorageSync.Models.PSPrivateEndpointConnection, Microsoft.Azure.Management.StorageSync.Models.PrivateEndpointConnection}" /> | ||
| public class PrivateEndpointConnectionConverter : ConverterBase<PSPrivateEndpointConnection, StorageSyncModels.PrivateEndpointConnection> | ||
| { | ||
|
|
||
| /// <summary> | ||
| /// Initializes a new instance of the <see cref="PrivateEndpointConnectionConverter" /> class. | ||
| /// </summary> | ||
| public PrivateEndpointConnectionConverter() | ||
| { | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Transforms the specified source. | ||
| /// </summary> | ||
| /// <param name="source">The source.</param> | ||
| /// <returns>StorageSyncModels.PrivateEndpointConnection.</returns> | ||
| protected override StorageSyncModels.PrivateEndpointConnection Transform(PSPrivateEndpointConnection source) => new StorageSyncModels.PrivateEndpointConnection( | ||
| new PrivateLinkServiceConnectionStateConverter().Convert(source.PrivateLinkServiceConnectionState), | ||
| source.ResourceId, | ||
| source.PrivateEndpointConnectionName, | ||
| source.Type, | ||
| new PrivateEndpointConverter().Convert(source.PrivateEndpoint), | ||
| source.ProvisioningState); | ||
|
|
||
| /// <summary> | ||
| /// Transforms the specified source. | ||
| /// </summary> | ||
| /// <param name="source">The source.</param> | ||
| /// <returns>PSPrivateEndpointConnection.</returns> | ||
| protected override PSPrivateEndpointConnection Transform(StorageSyncModels.PrivateEndpointConnection source) | ||
| { | ||
| return new PSPrivateEndpointConnection() | ||
| { | ||
| ResourceId = source.Id, | ||
| PrivateEndpointConnectionName = source.Name, | ||
| PrivateEndpoint = new PrivateEndpointConverter().Convert(source.PrivateEndpoint), | ||
| PrivateLinkServiceConnectionState = new PrivateLinkServiceConnectionStateConverter().Convert(source.PrivateLinkServiceConnectionState), | ||
| ProvisioningState = source.ProvisioningState, | ||
| Type = source.Type, | ||
| }; | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| // ---------------------------------------------------------------------------------- | ||
| // | ||
| // 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.Azure.Commands.StorageSync.Models; | ||
| using StorageSyncModels = Microsoft.Azure.Management.StorageSync.Models; | ||
|
|
||
| namespace Microsoft.Azure.Commands.StorageSync.Common.Converters | ||
| { | ||
| /// <summary> | ||
| /// Class PrivateEndpointConverter. | ||
| /// Implements the <see cref="Microsoft.Azure.Commands.StorageSync.Common.Converters.ConverterBase{Microsoft.Azure.Commands.StorageSync.Models.PSPrivateEndpoint, Microsoft.Azure.Management.StorageSync.Models.PrivateEndpoint}" /> | ||
| /// </summary> | ||
| /// <seealso cref="Microsoft.Azure.Commands.StorageSync.Common.Converters.ConverterBase{Microsoft.Azure.Commands.StorageSync.Models.PSPrivateEndpoint, Microsoft.Azure.Management.StorageSync.Models.PrivateEndpoint}" /> | ||
| public class PrivateEndpointConverter : ConverterBase<PSPrivateEndpoint, StorageSyncModels.PrivateEndpoint> | ||
| { | ||
|
|
||
| /// <summary> | ||
| /// Initializes a new instance of the <see cref="PrivateEndpointConverter" /> class. | ||
| /// </summary> | ||
| public PrivateEndpointConverter() | ||
| { | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Transforms the specified source. | ||
| /// </summary> | ||
| /// <param name="source">The source.</param> | ||
| /// <returns>StorageSyncModels.PrivateEndpoint.</returns> | ||
| protected override StorageSyncModels.PrivateEndpoint Transform(PSPrivateEndpoint source) => new StorageSyncModels.PrivateEndpoint(source.ResourceId); | ||
|
|
||
| /// <summary> | ||
| /// Transforms the specified source. | ||
| /// </summary> | ||
| /// <param name="source">The source.</param> | ||
| /// <returns>PSPrivateEndpoint.</returns> | ||
| protected override PSPrivateEndpoint Transform(StorageSyncModels.PrivateEndpoint source) | ||
| { | ||
| return new PSPrivateEndpoint() | ||
| { | ||
| ResourceId = source.Id | ||
| }; | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| // ---------------------------------------------------------------------------------- | ||
| // | ||
| // 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.Azure.Commands.StorageSync.Models; | ||
| using StorageSyncModels = Microsoft.Azure.Management.StorageSync.Models; | ||
|
|
||
| namespace Microsoft.Azure.Commands.StorageSync.Common.Converters | ||
| { | ||
| /// <summary> | ||
| /// Class PrivateLinkServiceConnectionStateConverter. | ||
| /// Implements the <see cref="Microsoft.Azure.Commands.StorageSync.Common.Converters.ConverterBase{Microsoft.Azure.Commands.StorageSync.Models.PSPrivateLinkServiceConnectionState, Microsoft.Azure.Management.StorageSync.Models.PrivateLinkServiceConnectionState}" /> | ||
| /// </summary> | ||
| /// <seealso cref="Microsoft.Azure.Commands.StorageSync.Common.Converters.ConverterBase{Microsoft.Azure.Commands.StorageSync.Models.PSPrivateLinkServiceConnectionState, Microsoft.Azure.Management.StorageSync.Models.PrivateLinkServiceConnectionState}" /> | ||
| public class PrivateLinkServiceConnectionStateConverter : ConverterBase<PSPrivateLinkServiceConnectionState, StorageSyncModels.PrivateLinkServiceConnectionState> | ||
| { | ||
|
|
||
| /// <summary> | ||
| /// Initializes a new instance of the <see cref="PrivateLinkServiceConnectionStateConverter" /> class. | ||
| /// </summary> | ||
| public PrivateLinkServiceConnectionStateConverter() | ||
| { | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Transforms the specified source. | ||
| /// </summary> | ||
| /// <param name="source">The source.</param> | ||
| /// <returns>StorageSyncModels.PrivateLinkServiceConnectionState.</returns> | ||
| protected override StorageSyncModels.PrivateLinkServiceConnectionState Transform(PSPrivateLinkServiceConnectionState source) => new StorageSyncModels.PrivateLinkServiceConnectionState( | ||
| source.Status, | ||
| source.Description, | ||
| source.ActionRequired); | ||
|
|
||
| /// <summary> | ||
| /// Transforms the specified source. | ||
| /// </summary> | ||
| /// <param name="source">The source.</param> | ||
| /// <returns>PSPrivateLinkServiceConnectionState.</returns> | ||
| protected override PSPrivateLinkServiceConnectionState Transform(StorageSyncModels.PrivateLinkServiceConnectionState source) | ||
| { | ||
| return new PSPrivateLinkServiceConnectionState() | ||
| { | ||
| Status = source.Status, | ||
| Description = source.Description, | ||
| ActionRequired = source.ActionRequired, | ||
| }; | ||
| } | ||
| } | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.