Skip to content

Commit

Permalink
Merge pull request Azure#2509 from Azure/revert-2507-AutoRest1
Browse files Browse the repository at this point in the history
Revert unmerged changes in swagger API
  • Loading branch information
markcowl authored Oct 27, 2016
2 parents a9b4159 + 02f179e commit 665d487
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 127 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,17 +143,17 @@ public partial interface IVirtualNetworkGatewaysOperations
/// <param name='virtualNetworkGatewayName'>
/// The name of the virtual network gateway.
/// </param>
/// <param name='gatewayVip'>
/// Vip parameter supplied to the Begin Active-Active Reset Virtual
/// Network Gateway operation through Network resource provider.
/// <param name='parameters'>
/// Parameters supplied to the Begin Reset Virtual Network Gateway
/// operation through Network resource provider.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
Task<AzureOperationResponse<VirtualNetworkGateway>> ResetWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, string gatewayVip = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse<VirtualNetworkGateway>> ResetWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, VirtualNetworkGateway parameters, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// The Reset VirtualNetworkGateway operation resets the primary of
/// the virtual network gateway in the specified resource group
Expand All @@ -165,17 +165,17 @@ public partial interface IVirtualNetworkGatewaysOperations
/// <param name='virtualNetworkGatewayName'>
/// The name of the virtual network gateway.
/// </param>
/// <param name='gatewayVip'>
/// Vip parameter supplied to the Begin Active-Active Reset Virtual
/// Network Gateway operation through Network resource provider.
/// <param name='parameters'>
/// Parameters supplied to the Begin Reset Virtual Network Gateway
/// operation through Network resource provider.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
Task<AzureOperationResponse<VirtualNetworkGateway>> BeginResetWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, string gatewayVip = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse<VirtualNetworkGateway>> BeginResetWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, VirtualNetworkGateway parameters, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// The Generatevpnclientpackage operation generates Vpn client
/// package for P2S client of the virtual network gateway in the
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public VirtualNetworkGatewayConnection() { }
/// Initializes a new instance of the VirtualNetworkGatewayConnection
/// class.
/// </summary>
public VirtualNetworkGatewayConnection(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary<string, string> tags = default(IDictionary<string, string>), string authorizationKey = default(string), VirtualNetworkGateway virtualNetworkGateway1 = default(VirtualNetworkGateway), VirtualNetworkGateway virtualNetworkGateway2 = default(VirtualNetworkGateway), LocalNetworkGateway localNetworkGateway2 = default(LocalNetworkGateway), string connectionType = default(string), int? routingWeight = default(int?), string sharedKey = default(string), string connectionStatus = default(string), IList<TunnelConnectionHealth> tunnelConnectionStatus = default(IList<TunnelConnectionHealth>), long? egressBytesTransferred = default(long?), long? ingressBytesTransferred = default(long?), SubResource peer = default(SubResource), bool? enableBgp = default(bool?), string resourceGuid = default(string), string provisioningState = default(string), string etag = default(string))
public VirtualNetworkGatewayConnection(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary<string, string> tags = default(IDictionary<string, string>), string authorizationKey = default(string), VirtualNetworkGateway virtualNetworkGateway1 = default(VirtualNetworkGateway), VirtualNetworkGateway virtualNetworkGateway2 = default(VirtualNetworkGateway), LocalNetworkGateway localNetworkGateway2 = default(LocalNetworkGateway), string connectionType = default(string), int? routingWeight = default(int?), string sharedKey = default(string), string connectionStatus = default(string), long? egressBytesTransferred = default(long?), long? ingressBytesTransferred = default(long?), SubResource peer = default(SubResource), bool? enableBgp = default(bool?), string resourceGuid = default(string), string provisioningState = default(string), string etag = default(string))
: base(id, name, type, location, tags)
{
AuthorizationKey = authorizationKey;
Expand All @@ -43,7 +43,6 @@ public VirtualNetworkGatewayConnection() { }
RoutingWeight = routingWeight;
SharedKey = sharedKey;
ConnectionStatus = connectionStatus;
TunnelConnectionStatus = tunnelConnectionStatus;
EgressBytesTransferred = egressBytesTransferred;
IngressBytesTransferred = ingressBytesTransferred;
Peer = peer;
Expand Down Expand Up @@ -101,12 +100,6 @@ public VirtualNetworkGatewayConnection() { }
[JsonProperty(PropertyName = "properties.connectionStatus")]
public string ConnectionStatus { get; set; }

/// <summary>
/// Collection of all tunnels' connection health status.
/// </summary>
[JsonProperty(PropertyName = "properties.tunnelConnectionStatus")]
public IList<TunnelConnectionHealth> TunnelConnectionStatus { get; set; }

/// <summary>
/// The Egress Bytes Transferred in this connection
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -839,21 +839,21 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client)
/// <param name='virtualNetworkGatewayName'>
/// The name of the virtual network gateway.
/// </param>
/// <param name='gatewayVip'>
/// Vip parameter supplied to the Begin Active-Active Reset Virtual Network
/// Gateway operation through Network resource provider.
/// <param name='parameters'>
/// Parameters supplied to the Begin Reset Virtual Network Gateway operation
/// through Network resource provider.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public async Task<AzureOperationResponse<VirtualNetworkGateway>> ResetWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, string gatewayVip = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
public async Task<AzureOperationResponse<VirtualNetworkGateway>> ResetWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, VirtualNetworkGateway parameters, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
// Send request
AzureOperationResponse<VirtualNetworkGateway> _response = await BeginResetWithHttpMessagesAsync(
resourceGroupName, virtualNetworkGatewayName, gatewayVip, customHeaders, cancellationToken);
resourceGroupName, virtualNetworkGatewayName, parameters, customHeaders, cancellationToken);
return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken);
}

Expand All @@ -868,9 +868,9 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client)
/// <param name='virtualNetworkGatewayName'>
/// The name of the virtual network gateway.
/// </param>
/// <param name='gatewayVip'>
/// Vip parameter supplied to the Begin Active-Active Reset Virtual Network
/// Gateway operation through Network resource provider.
/// <param name='parameters'>
/// Parameters supplied to the Begin Reset Virtual Network Gateway operation
/// through Network resource provider.
/// </param>
/// <param name='customHeaders'>
/// Headers that will be added to request.
Expand All @@ -881,7 +881,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client)
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<AzureOperationResponse<VirtualNetworkGateway>> BeginResetWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, string gatewayVip = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
public async Task<AzureOperationResponse<VirtualNetworkGateway>> BeginResetWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, VirtualNetworkGateway parameters, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
Expand All @@ -891,6 +891,10 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "virtualNetworkGatewayName");
}
if (parameters == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
}
if (this.Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
Expand All @@ -908,7 +912,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client)
Dictionary<string, object> tracingParameters = new Dictionary<string, object>();
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("virtualNetworkGatewayName", virtualNetworkGatewayName);
tracingParameters.Add("gatewayVip", gatewayVip);
tracingParameters.Add("parameters", parameters);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "BeginReset", tracingParameters);
}
Expand All @@ -919,10 +923,6 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client)
_url = _url.Replace("{virtualNetworkGatewayName}", Uri.EscapeDataString(virtualNetworkGatewayName));
_url = _url.Replace("{subscriptionId}", Uri.EscapeDataString(this.Client.SubscriptionId));
List<string> _queryParameters = new List<string>();
if (gatewayVip != null)
{
_queryParameters.Add(string.Format("gatewayVip={0}", Uri.EscapeDataString(gatewayVip)));
}
if (this.Client.ApiVersion != null)
{
_queryParameters.Add(string.Format("api-version={0}", Uri.EscapeDataString(this.Client.ApiVersion)));
Expand Down Expand Up @@ -963,6 +963,12 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client)

// Serialize Request
string _requestContent = null;
if(parameters != null)
{
_requestContent = SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings);
_httpRequest.Content = new StringContent(_requestContent, Encoding.UTF8);
_httpRequest.Content.Headers.ContentType = MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
}
// Set Credentials
if (this.Client.Credentials != null)
{
Expand Down
Loading

0 comments on commit 665d487

Please sign in to comment.