From 98ec8b16208ba457709b9852f27c4db4c3ec7816 Mon Sep 17 00:00:00 2001 From: "v-yuzhichen@microsoft.com" Date: Fri, 10 Jun 2022 14:09:25 +0800 Subject: [PATCH 1/2] Fix Az.NetWork XML Comments --- src/Network/Network/Common/NetworkClient.cs | 2 ++ .../Network/Models/PSSecurityGroupNetworkInterface.cs | 8 ++++---- .../Models/PrivateEndpointConnection.cs | 3 ++- .../Models/PrivateLinkResourceProperties.cs | 1 + .../PrivateLinkServiceProvider/ProviderConfiguration.cs | 2 ++ .../NewAzureSecurityPartnerProviderCommand.cs | 2 +- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/Network/Network/Common/NetworkClient.cs b/src/Network/Network/Common/NetworkClient.cs index 88e1346751fd..ce018e8f390c 100644 --- a/src/Network/Network/Common/NetworkClient.cs +++ b/src/Network/Network/Common/NetworkClient.cs @@ -688,6 +688,8 @@ public async Task GenerateP2SVpnGatewayVpnProfileAsync(string resourceGr /// /// Parameters supplied to the Begin the operation through Network resource provider. /// + /// + /// /// /// Headers that will be added to request. /// diff --git a/src/Network/Network/Models/PSSecurityGroupNetworkInterface.cs b/src/Network/Network/Models/PSSecurityGroupNetworkInterface.cs index 12e8c87580a1..b27c0259b46c 100644 --- a/src/Network/Network/Models/PSSecurityGroupNetworkInterface.cs +++ b/src/Network/Network/Models/PSSecurityGroupNetworkInterface.cs @@ -32,9 +32,9 @@ public string SecurityRuleAssociationsText get { return JsonConvert.SerializeObject(this.SecurityRuleAssociations, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } } -/// public bool ShouldSerializeIpConfigurations() -/// { -/// return !string.IsNullOrEmpty(this.Name); -/// } + // public bool ShouldSerializeIpConfigurations() + // { + // return !string.IsNullOrEmpty(this.Name); + // } } } \ No newline at end of file diff --git a/src/Network/Network/PrivateLinkService/Models/PrivateEndpointConnection.cs b/src/Network/Network/PrivateLinkService/Models/PrivateEndpointConnection.cs index 0233073711f1..8fe254b97fc1 100644 --- a/src/Network/Network/PrivateLinkService/Models/PrivateEndpointConnection.cs +++ b/src/Network/Network/PrivateLinkService/Models/PrivateEndpointConnection.cs @@ -42,6 +42,7 @@ public PrivateEndpointConnection() /// the private endpoint connection. /// State of the private endpoint /// connection. + /// 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), string groupId = default(string)) : base(id, name, type) { @@ -84,7 +85,7 @@ public PrivateEndpointConnection() /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() diff --git a/src/Network/Network/PrivateLinkService/Models/PrivateLinkResourceProperties.cs b/src/Network/Network/PrivateLinkService/Models/PrivateLinkResourceProperties.cs index 184a318f277b..a9b9b36fd55c 100644 --- a/src/Network/Network/PrivateLinkService/Models/PrivateLinkResourceProperties.cs +++ b/src/Network/Network/PrivateLinkService/Models/PrivateLinkResourceProperties.cs @@ -38,6 +38,7 @@ public PrivateLinkResourceProperties() /// The private link resource group id. /// The private link resource required /// member names. + /// public PrivateLinkResourceProperties(string groupId = default(string), IList requiredMembers = default(IList), IList requiredZoneNames = default(IList)) { GroupId = groupId; diff --git a/src/Network/Network/PrivateLinkService/PrivateLinkServiceProvider/ProviderConfiguration.cs b/src/Network/Network/PrivateLinkService/PrivateLinkServiceProvider/ProviderConfiguration.cs index ef4b6256c7f4..754cd53d4be7 100644 --- a/src/Network/Network/PrivateLinkService/PrivateLinkServiceProvider/ProviderConfiguration.cs +++ b/src/Network/Network/PrivateLinkService/PrivateLinkServiceProvider/ProviderConfiguration.cs @@ -110,6 +110,7 @@ public static ProviderConfiguration GetProviderConfiguration(string type) /// Generate a runtime parameter with ValidateSet matching the current context /// /// The name of the parameter + /// /// The returned runtime parameter for context, with appropriate validate set /// True if one or more contexts were found, otherwise false public static bool TryGetEndpointConnectionServiceParameter(string name, string parameterSetName, out RuntimeDefinedParameter runtimeParameter) @@ -140,6 +141,7 @@ public static bool TryGetEndpointConnectionServiceParameter(string name, string /// Generate a runtime parameter with ValidateSet matching the current context /// /// The name of the parameter + /// /// The returned runtime parameter for context, with appropriate validate set /// True if one or more contexts were found, otherwise false public static bool TryGetLinkResourceServiceParameter(string name, string parameterSetName, out RuntimeDefinedParameter runtimeParameter) diff --git a/src/Network/Network/SecurityPartnerProvider/NewAzureSecurityPartnerProviderCommand.cs b/src/Network/Network/SecurityPartnerProvider/NewAzureSecurityPartnerProviderCommand.cs index c7f0e2dff44c..e753b2baad0f 100644 --- a/src/Network/Network/SecurityPartnerProvider/NewAzureSecurityPartnerProviderCommand.cs +++ b/src/Network/Network/SecurityPartnerProvider/NewAzureSecurityPartnerProviderCommand.cs @@ -120,7 +120,7 @@ private PSSecurityPartnerProvider CreateSecurityPartnerProvider() string virtualHubResourceGroupName = this.ResourceGroupName; // default to common RG var resolvedVirtualHub = new VirtualHub(); - /// Resolve and Set the Virtual HUb + // Resolve and Set the Virtual HUb if (this.VirtualHubId != null) // When Id is provided { var resourceInfo = new ResourceIdentifier(VirtualHubId); From f83d8741b9f1b2ba51c45b34783f89a7c322b462 Mon Sep 17 00:00:00 2001 From: Ziyue Zheng Date: Fri, 10 Jun 2022 18:05:04 +0800 Subject: [PATCH 2/2] Fix Az.NetWork XML Comments --- src/Network/Network/Common/NetworkClient.cs | 8 ++++++-- .../Network/Models/PSSecurityGroupNetworkInterface.cs | 8 ++++---- .../Models/PrivateEndpointConnection.cs | 5 +++-- .../Models/PrivateLinkResourceProperties.cs | 2 +- .../PrivateLinkServiceProvider/ProviderConfiguration.cs | 4 ++-- .../NewAzureSecurityPartnerProviderCommand.cs | 2 +- 6 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/Network/Network/Common/NetworkClient.cs b/src/Network/Network/Common/NetworkClient.cs index ce018e8f390c..ef37d05eafd9 100644 --- a/src/Network/Network/Common/NetworkClient.cs +++ b/src/Network/Network/Common/NetworkClient.cs @@ -688,8 +688,12 @@ public async Task GenerateP2SVpnGatewayVpnProfileAsync(string resourceGr /// /// Parameters supplied to the Begin the operation through Network resource provider. /// - /// - /// + /// + /// The api URL of the resource. + /// + /// + /// The api version of the resource. + /// /// /// Headers that will be added to request. /// diff --git a/src/Network/Network/Models/PSSecurityGroupNetworkInterface.cs b/src/Network/Network/Models/PSSecurityGroupNetworkInterface.cs index b27c0259b46c..dfd48b449ea9 100644 --- a/src/Network/Network/Models/PSSecurityGroupNetworkInterface.cs +++ b/src/Network/Network/Models/PSSecurityGroupNetworkInterface.cs @@ -32,9 +32,9 @@ public string SecurityRuleAssociationsText get { return JsonConvert.SerializeObject(this.SecurityRuleAssociations, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } } - // public bool ShouldSerializeIpConfigurations() - // { - // return !string.IsNullOrEmpty(this.Name); - // } +// public bool ShouldSerializeIpConfigurations() +// { +// return !string.IsNullOrEmpty(this.Name); +// } } } \ No newline at end of file diff --git a/src/Network/Network/PrivateLinkService/Models/PrivateEndpointConnection.cs b/src/Network/Network/PrivateLinkService/Models/PrivateEndpointConnection.cs index 8fe254b97fc1..58b7b32feb75 100644 --- a/src/Network/Network/PrivateLinkService/Models/PrivateEndpointConnection.cs +++ b/src/Network/Network/PrivateLinkService/Models/PrivateEndpointConnection.cs @@ -12,6 +12,7 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Rest; using Newtonsoft.Json; namespace Microsoft.Azure.Commands.Network.PrivateLinkService.Models @@ -42,7 +43,7 @@ public PrivateEndpointConnection() /// the private endpoint connection. /// State of the private endpoint /// connection. - /// + /// Group ID of the private endpoint. 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), string groupId = default(string)) : base(id, name, type) { @@ -85,7 +86,7 @@ public PrivateEndpointConnection() /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() diff --git a/src/Network/Network/PrivateLinkService/Models/PrivateLinkResourceProperties.cs b/src/Network/Network/PrivateLinkService/Models/PrivateLinkResourceProperties.cs index a9b9b36fd55c..2eee593b8316 100644 --- a/src/Network/Network/PrivateLinkService/Models/PrivateLinkResourceProperties.cs +++ b/src/Network/Network/PrivateLinkService/Models/PrivateLinkResourceProperties.cs @@ -38,7 +38,7 @@ public PrivateLinkResourceProperties() /// The private link resource group id. /// The private link resource required /// member names. - /// + /// The private link resource required zone names. public PrivateLinkResourceProperties(string groupId = default(string), IList requiredMembers = default(IList), IList requiredZoneNames = default(IList)) { GroupId = groupId; diff --git a/src/Network/Network/PrivateLinkService/PrivateLinkServiceProvider/ProviderConfiguration.cs b/src/Network/Network/PrivateLinkService/PrivateLinkServiceProvider/ProviderConfiguration.cs index 754cd53d4be7..d321fa17f8b3 100644 --- a/src/Network/Network/PrivateLinkService/PrivateLinkServiceProvider/ProviderConfiguration.cs +++ b/src/Network/Network/PrivateLinkService/PrivateLinkServiceProvider/ProviderConfiguration.cs @@ -110,7 +110,7 @@ public static ProviderConfiguration GetProviderConfiguration(string type) /// Generate a runtime parameter with ValidateSet matching the current context /// /// The name of the parameter - /// + /// The name of the parameter set /// The returned runtime parameter for context, with appropriate validate set /// True if one or more contexts were found, otherwise false public static bool TryGetEndpointConnectionServiceParameter(string name, string parameterSetName, out RuntimeDefinedParameter runtimeParameter) @@ -141,7 +141,7 @@ public static bool TryGetEndpointConnectionServiceParameter(string name, string /// Generate a runtime parameter with ValidateSet matching the current context /// /// The name of the parameter - /// + /// The name of the parameter set /// The returned runtime parameter for context, with appropriate validate set /// True if one or more contexts were found, otherwise false public static bool TryGetLinkResourceServiceParameter(string name, string parameterSetName, out RuntimeDefinedParameter runtimeParameter) diff --git a/src/Network/Network/SecurityPartnerProvider/NewAzureSecurityPartnerProviderCommand.cs b/src/Network/Network/SecurityPartnerProvider/NewAzureSecurityPartnerProviderCommand.cs index e753b2baad0f..15dd16eb1365 100644 --- a/src/Network/Network/SecurityPartnerProvider/NewAzureSecurityPartnerProviderCommand.cs +++ b/src/Network/Network/SecurityPartnerProvider/NewAzureSecurityPartnerProviderCommand.cs @@ -120,7 +120,7 @@ private PSSecurityPartnerProvider CreateSecurityPartnerProvider() string virtualHubResourceGroupName = this.ResourceGroupName; // default to common RG var resolvedVirtualHub = new VirtualHub(); - // Resolve and Set the Virtual HUb + // Resolve and Set the Virtual Hub if (this.VirtualHubId != null) // When Id is provided { var resourceInfo = new ResourceIdentifier(VirtualHubId);