Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ internal ContainerHostMappingsOperations(DevSpacesManagementClient client)
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="ErrorResponseException">
/// <exception cref="DevSpacesErrorResponseException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="SerializationException">
Expand Down Expand Up @@ -208,11 +208,11 @@ internal ContainerHostMappingsOperations(DevSpacesManagementClient client)
string _responseContent = null;
if ((int)_statusCode != 200 && (int)_statusCode != 204)
{
var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
var ex = new DevSpacesErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject<ErrorResponse>(_responseContent, Client.DeserializationSettings);
DevSpacesErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject<DevSpacesErrorResponse>(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
ex.Body = _errorBody;
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,12 @@ public static void Delete(this IControllersOperations operations, string resourc
/// <param name='tags'>
/// Tags for the Azure Dev Spaces Controller.
/// </param>
public static Controller Update(this IControllersOperations operations, string resourceGroupName, string name, IDictionary<string, string> tags = default(IDictionary<string, string>))
/// <param name='targetContainerHostCredentialsBase64'>
/// Credentials of the target container host (base64).
/// </param>
public static Controller Update(this IControllersOperations operations, string resourceGroupName, string name, IDictionary<string, string> tags = default(IDictionary<string, string>), string targetContainerHostCredentialsBase64 = default(string))
{
return operations.UpdateAsync(resourceGroupName, name, tags).GetAwaiter().GetResult();
return operations.UpdateAsync(resourceGroupName, name, tags, targetContainerHostCredentialsBase64).GetAwaiter().GetResult();
}

/// <summary>
Expand All @@ -209,12 +212,15 @@ public static void Delete(this IControllersOperations operations, string resourc
/// <param name='tags'>
/// Tags for the Azure Dev Spaces Controller.
/// </param>
/// <param name='targetContainerHostCredentialsBase64'>
/// Credentials of the target container host (base64).
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<Controller> UpdateAsync(this IControllersOperations operations, string resourceGroupName, string name, IDictionary<string, string> tags = default(IDictionary<string, string>), CancellationToken cancellationToken = default(CancellationToken))
public static async Task<Controller> UpdateAsync(this IControllersOperations operations, string resourceGroupName, string name, IDictionary<string, string> tags = default(IDictionary<string, string>), string targetContainerHostCredentialsBase64 = default(string), CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, name, tags, null, cancellationToken).ConfigureAwait(false))
using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, name, tags, targetContainerHostCredentialsBase64, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public partial interface IContainerHostMappingsOperations
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="ErrorResponseException">
/// <exception cref="DevSpacesErrorResponseException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public partial interface IControllersOperations
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="ErrorResponseException">
/// <exception cref="DevSpacesErrorResponseException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
Expand Down Expand Up @@ -73,7 +73,7 @@ public partial interface IControllersOperations
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="ErrorResponseException">
/// <exception cref="DevSpacesErrorResponseException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
Expand Down Expand Up @@ -101,7 +101,7 @@ public partial interface IControllersOperations
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="ErrorResponseException">
/// <exception cref="DevSpacesErrorResponseException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
Expand All @@ -124,13 +124,16 @@ public partial interface IControllersOperations
/// <param name='tags'>
/// Tags for the Azure Dev Spaces Controller.
/// </param>
/// <param name='targetContainerHostCredentialsBase64'>
/// Credentials of the target container host (base64).
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="ErrorResponseException">
/// <exception cref="DevSpacesErrorResponseException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
Expand All @@ -139,7 +142,7 @@ public partial interface IControllersOperations
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<Controller>> UpdateWithHttpMessagesAsync(string resourceGroupName, string name, IDictionary<string, string> tags = default(IDictionary<string, string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse<Controller>> UpdateWithHttpMessagesAsync(string resourceGroupName, string name, IDictionary<string, string> tags = default(IDictionary<string, string>), string targetContainerHostCredentialsBase64 = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Lists the Azure Dev Spaces Controllers in a resource group.
/// </summary>
Expand All @@ -156,7 +159,7 @@ public partial interface IControllersOperations
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="ErrorResponseException">
/// <exception cref="DevSpacesErrorResponseException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
Expand All @@ -179,7 +182,7 @@ public partial interface IControllersOperations
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="ErrorResponseException">
/// <exception cref="DevSpacesErrorResponseException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
Expand Down Expand Up @@ -212,7 +215,7 @@ public partial interface IControllersOperations
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="ErrorResponseException">
/// <exception cref="DevSpacesErrorResponseException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
Expand Down Expand Up @@ -244,7 +247,7 @@ public partial interface IControllersOperations
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="ErrorResponseException">
/// <exception cref="DevSpacesErrorResponseException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
Expand Down Expand Up @@ -272,7 +275,7 @@ public partial interface IControllersOperations
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="ErrorResponseException">
/// <exception cref="DevSpacesErrorResponseException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
Expand All @@ -295,7 +298,7 @@ public partial interface IControllersOperations
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="ErrorResponseException">
/// <exception cref="DevSpacesErrorResponseException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
Expand All @@ -321,7 +324,7 @@ public partial interface IControllersOperations
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="ErrorResponseException">
/// <exception cref="DevSpacesErrorResponseException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

namespace Microsoft.Azure.Management.DevSpaces.Models
{
using Microsoft.Rest;
using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
Expand All @@ -18,6 +20,7 @@ namespace Microsoft.Azure.Management.DevSpaces.Models
/// <summary>
/// Parameters for updating an Azure Dev Spaces Controller.
/// </summary>
[Rest.Serialization.JsonTransformation]
public partial class ControllerUpdateParameters
{
/// <summary>
Expand All @@ -33,9 +36,12 @@ public ControllerUpdateParameters()
/// </summary>
/// <param name="tags">Tags for the Azure Dev Spaces
/// Controller.</param>
public ControllerUpdateParameters(IDictionary<string, string> tags = default(IDictionary<string, string>))
/// <param name="targetContainerHostCredentialsBase64">Credentials of
/// the target container host (base64).</param>
public ControllerUpdateParameters(IDictionary<string, string> tags = default(IDictionary<string, string>), string targetContainerHostCredentialsBase64 = default(string))
{
Tags = tags;
TargetContainerHostCredentialsBase64 = targetContainerHostCredentialsBase64;
CustomInit();
}

Expand All @@ -50,5 +56,11 @@ public ControllerUpdateParameters()
[JsonProperty(PropertyName = "tags")]
public IDictionary<string, string> Tags { get; set; }

/// <summary>
/// Gets or sets credentials of the target container host (base64).
/// </summary>
[JsonProperty(PropertyName = "properties.targetContainerHostCredentialsBase64")]
public string TargetContainerHostCredentialsBase64 { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@ namespace Microsoft.Azure.Management.DevSpaces.Models
/// Error response indicates that the service is not able to process the
/// incoming request. The reason is provided in the error message.
/// </summary>
public partial class ErrorResponse
public partial class DevSpacesErrorResponse
{
/// <summary>
/// Initializes a new instance of the ErrorResponse class.
/// Initializes a new instance of the DevSpacesErrorResponse class.
/// </summary>
public ErrorResponse()
public DevSpacesErrorResponse()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the ErrorResponse class.
/// Initializes a new instance of the DevSpacesErrorResponse class.
/// </summary>
/// <param name="error">The details of the error.</param>
public ErrorResponse(ErrorDetails error = default(ErrorDetails))
public DevSpacesErrorResponse(ErrorDetails error = default(ErrorDetails))
{
Error = error;
CustomInit();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ namespace Microsoft.Azure.Management.DevSpaces.Models
using Microsoft.Rest;

/// <summary>
/// Exception thrown for an invalid response with ErrorResponse
/// Exception thrown for an invalid response with DevSpacesErrorResponse
/// information.
/// </summary>
public partial class ErrorResponseException : RestException
public partial class DevSpacesErrorResponseException : RestException
{
/// <summary>
/// Gets information about the associated HTTP request.
Expand All @@ -31,30 +31,30 @@ public partial class ErrorResponseException : RestException
/// <summary>
/// Gets or sets the body object.
/// </summary>
public ErrorResponse Body { get; set; }
public DevSpacesErrorResponse Body { get; set; }

/// <summary>
/// Initializes a new instance of the ErrorResponseException class.
/// Initializes a new instance of the DevSpacesErrorResponseException class.
/// </summary>
public ErrorResponseException()
public DevSpacesErrorResponseException()
{
}

/// <summary>
/// Initializes a new instance of the ErrorResponseException class.
/// Initializes a new instance of the DevSpacesErrorResponseException class.
/// </summary>
/// <param name="message">The exception message.</param>
public ErrorResponseException(string message)
public DevSpacesErrorResponseException(string message)
: this(message, null)
{
}

/// <summary>
/// Initializes a new instance of the ErrorResponseException class.
/// Initializes a new instance of the DevSpacesErrorResponseException class.
/// </summary>
/// <param name="message">The exception message.</param>
/// <param name="innerException">Inner exception.</param>
public ErrorResponseException(string message, System.Exception innerException)
public DevSpacesErrorResponseException(string message, System.Exception innerException)
: base(message, innerException)
{
}
Expand Down