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 @@ -34,7 +34,7 @@ public partial interface INetAppResourceQuotaLimitsOperations
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<System.Collections.Generic.IEnumerable<SubscriptionQuotaItem>>> ListWithHttpMessagesAsync(string location, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Rest.Azure.IPage<SubscriptionQuotaItem>>> ListWithHttpMessagesAsync(string location, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));

/// <summary>
/// Get the default and current subscription quota limit
Expand Down Expand Up @@ -62,5 +62,28 @@ public partial interface INetAppResourceQuotaLimitsOperations
/// </exception>
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<SubscriptionQuotaItem>> GetWithHttpMessagesAsync(string location, string quotaLimitName, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));

/// <summary>
/// Get the default and current limits for quotas
/// </summary>
/// <remarks>
/// Get the default and current limits for quotas
/// </remarks>
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Rest.Azure.IPage<SubscriptionQuotaItem>>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ public ReplicationObject()
public string ReplicationId {get; private set; }

/// <summary>
/// Gets or sets indicates whether the local volume is the source or
/// destination for the Volume Replication Possible values include: &#39;src&#39;, &#39;dst&#39;
/// Gets indicates whether the local volume is the source or destination for
/// the Volume Replication Possible values include: &#39;src&#39;, &#39;dst&#39;
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "endpointType")]
public string EndpointType {get; set; }
public string EndpointType {get; private set; }

/// <summary>
/// Gets or sets schedule Possible values include: &#39;_10minutely&#39;, &#39;hourly&#39;, &#39;daily&#39;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ private void Initialize()
this.BackupsUnderVolume = new BackupsUnderVolumeOperations(this);
this.BackupsUnderAccount = new BackupsUnderAccountOperations(this);
this.BaseUri = new System.Uri("https://management.azure.com");
this.ApiVersion = "2025-01-01";
this.ApiVersion = "2025-03-01";
this.AcceptLanguage = "en-US";
this.LongRunningOperationRetryTimeout = 30;
this.GenerateClientRequestId = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ internal NetAppResourceQuotaLimitsOperations (NetAppManagementClient client)
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<System.Collections.Generic.IEnumerable<SubscriptionQuotaItem>>> ListWithHttpMessagesAsync(string location, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Rest.Azure.IPage<SubscriptionQuotaItem>>> ListWithHttpMessagesAsync(string location, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{


Expand Down Expand Up @@ -205,7 +205,7 @@ internal NetAppResourceQuotaLimitsOperations (NetAppManagementClient client)
throw ex;
}
// Create Result
var _result = new Microsoft.Rest.Azure.AzureOperationResponse<System.Collections.Generic.IEnumerable<SubscriptionQuotaItem>>();
var _result = new Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Rest.Azure.IPage<SubscriptionQuotaItem>>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;

Expand All @@ -219,7 +219,7 @@ internal NetAppResourceQuotaLimitsOperations (NetAppManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
_result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<Page1<SubscriptionQuotaItem>>(_responseContent, this.Client.DeserializationSettings);
_result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<Page<SubscriptionQuotaItem>>(_responseContent, this.Client.DeserializationSettings);
}
catch (Newtonsoft.Json.JsonException ex)
{
Expand Down Expand Up @@ -298,7 +298,13 @@ internal NetAppResourceQuotaLimitsOperations (NetAppManagementClient client)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "quotaLimitName");
}

if (quotaLimitName != null)
{
if (!System.Text.RegularExpressions.Regex.IsMatch(quotaLimitName, "^[a-zA-Z][a-zA-Z0-9\\-]{0,62}$"))
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "quotaLimitName", "^[a-zA-Z][a-zA-Z0-9\\-]{0,62}$");
}
}
if (this.Client.ApiVersion == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion");
Expand Down Expand Up @@ -455,6 +461,183 @@ internal NetAppResourceQuotaLimitsOperations (NetAppManagementClient client)



}
/// <summary>
/// Get the default and current limits for quotas
/// </summary>
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
/// </param>
/// <param name='customHeaders'>
/// Headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
/// <exception cref="System.ArgumentNullException">
/// Thrown when a required parameter is null
/// </exception>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Rest.Azure.IPage<SubscriptionQuotaItem>>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{

if (nextPageLink == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink");
}
// Tracing
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
string _invocationId = null;
if (_shouldTrace)
{
_invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
System.Collections.Generic.Dictionary<string, object> tracingParameters = new System.Collections.Generic.Dictionary<string, object>();
tracingParameters.Add("nextPageLink", nextPageLink);


tracingParameters.Add("cancellationToken", cancellationToken);
Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters);
}
// Construct URL
string _url = "{nextLink}";
_url = _url.Replace("{nextLink}", nextPageLink);

System.Collections.Generic.List<string> _queryParameters = new System.Collections.Generic.List<string>();
if (_queryParameters.Count > 0)
{
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
var _httpRequest = new System.Net.Http.HttpRequestMessage();
System.Net.Http.HttpResponseMessage _httpResponse = null;
_httpRequest.Method = new System.Net.Http.HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
{
_httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
}
if (this.Client.AcceptLanguage != null)
{
if (_httpRequest.Headers.Contains("accept-language"))
{
_httpRequest.Headers.Remove("accept-language");
}
_httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage);
}

if (customHeaders != null)
{
foreach(var _header in customHeaders)
{
if (_httpRequest.Headers.Contains(_header.Key))
{
_httpRequest.Headers.Remove(_header.Key);
}
_httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
}
}
// Serialize Request
string _requestContent = null;
// Set Credentials
if (this.Client.Credentials != null)
{
cancellationToken.ThrowIfCancellationRequested();
await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
}
// Send Request
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
}
cancellationToken.ThrowIfCancellationRequested();
_httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
}

System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;

if ((int)_statusCode != 200)
{
var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<ErrorResponse>(_responseContent, this.Client.DeserializationSettings);
if (_errorBody != null)
{
ex.Body = _errorBody;
}
}
catch (Newtonsoft.Json.JsonException)
{
// Ignore the exception
}
ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
}
_httpRequest.Dispose();
if (_httpResponse != null)
{
_httpResponse.Dispose();
}
throw ex;
}
// Create Result
var _result = new Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Rest.Azure.IPage<SubscriptionQuotaItem>>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;

if (_httpResponse.Headers.Contains("x-ms-request-id"))
{
_result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
}
// Deserialize Response
if ((int)_statusCode == 200)
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
_result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject<Page<SubscriptionQuotaItem>>(_responseContent, this.Client.DeserializationSettings);
}
catch (Newtonsoft.Json.JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
{
_httpResponse.Dispose();
}
throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
}
}
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
}
return _result;





}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static partial class NetAppResourceQuotaLimitsOperationsExtensions
/// <param name='location'>
/// The name of the Azure region.
/// </param>
public static System.Collections.Generic.IEnumerable<SubscriptionQuotaItem> List(this INetAppResourceQuotaLimitsOperations operations, string location)
public static Microsoft.Rest.Azure.IPage<SubscriptionQuotaItem> List(this INetAppResourceQuotaLimitsOperations operations, string location)
{
return ((INetAppResourceQuotaLimitsOperations)operations).ListAsync(location).GetAwaiter().GetResult();
}
Expand All @@ -38,7 +38,7 @@ public static System.Collections.Generic.IEnumerable<SubscriptionQuotaItem> List
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<SubscriptionQuotaItem>> ListAsync(this INetAppResourceQuotaLimitsOperations operations, string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public static async System.Threading.Tasks.Task<Microsoft.Rest.Azure.IPage<SubscriptionQuotaItem>> ListAsync(this INetAppResourceQuotaLimitsOperations operations, string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.ListWithHttpMessagesAsync(location, null, cancellationToken).ConfigureAwait(false))
{
Expand Down Expand Up @@ -84,5 +84,38 @@ public static SubscriptionQuotaItem Get(this INetAppResourceQuotaLimitsOperation
return _result.Body;
}
}
/// <summary>
/// Get the default and current limits for quotas
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
/// </param>
public static Microsoft.Rest.Azure.IPage<SubscriptionQuotaItem> ListNext(this INetAppResourceQuotaLimitsOperations operations, string nextPageLink)
{
return ((INetAppResourceQuotaLimitsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult();
}

/// <summary>
/// Get the default and current limits for quotas
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<Microsoft.Rest.Azure.IPage<SubscriptionQuotaItem>> ListNextAsync(this INetAppResourceQuotaLimitsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
}
}
6 changes: 3 additions & 3 deletions src/NetAppFiles/NetAppFiles.Management.Sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ description: Microsoft NetApp Files Azure Resource Provider specification

###
``` yaml
commit: 70b2baed508566213ad07b69b08ca307de5275fb
input-file:
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-01-01/netapp.json
commit: 08531e40622d483b956933b3adb5a85c6fbbf6dc
input-file:
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/netapp/resource-manager/Microsoft.NetApp/stable/2025-03-01/netapp.json
output-folder: Generated
namespace: Microsoft.Azure.Management.NetApp

Expand Down
Loading