Skip to content
This repository was archived by the owner on Aug 26, 2025. It is now read-only.
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 @@ -454,6 +454,31 @@ public partial interface INamespacesOperations
/// </exception>
Task<AzureOperationResponse<NetworkRuleSet>> GetNetworkRuleSetWithHttpMessagesAsync(string resourceGroupName, string namespaceName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Gets list of NetworkRuleSet for a Namespace.
/// </summary>
/// <param name='resourceGroupName'>
/// Name of the Resource group within the Azure subscription.
/// </param>
/// <param name='namespaceName'>
/// The namespace name
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="ErrorResponseException">
/// 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>
Task<AzureOperationResponse<IPage<NetworkRuleSet>>> ListNetworkRuleSetsWithHttpMessagesAsync(string resourceGroupName, string namespaceName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Creates or updates a service namespace. Once created, this
/// namespace's resource manifest is immutable. This operation is
/// idempotent.
Expand Down Expand Up @@ -578,5 +603,27 @@ public partial interface INamespacesOperations
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<IPage<SBAuthorizationRule>>> ListAuthorizationRulesNextWithHttpMessagesAsync(string nextPageLink, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Gets list of NetworkRuleSet for a Namespace.
/// </summary>
/// <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="ErrorResponseException">
/// 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>
Task<AzureOperationResponse<IPage<NetworkRuleSet>>> ListNetworkRuleSetsNextWithHttpMessagesAsync(string nextPageLink, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,18 @@ public Rule()
[JsonProperty(PropertyName = "properties.correlationFilter")]
public CorrelationFilter CorrelationFilter { get; set; }

/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (SqlFilter != null)
{
SqlFilter.Validate();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

namespace Microsoft.Azure.Management.ServiceBus.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;

Expand Down Expand Up @@ -57,11 +58,11 @@ public SqlFilter()
public string SqlExpression { get; set; }

/// <summary>
/// Gets this property is reserved for future use. An integer value
/// showing the compatibility level, currently hard-coded to 20.
/// Gets or sets this property is reserved for future use. An integer
/// value showing the compatibility level, currently hard-coded to 20.
/// </summary>
[JsonProperty(PropertyName = "compatibilityLevel")]
public int? CompatibilityLevel { get; private set; }
public int? CompatibilityLevel { get; set; }

/// <summary>
/// Gets or sets value that indicates whether the rule action requires
Expand All @@ -70,5 +71,22 @@ public SqlFilter()
[JsonProperty(PropertyName = "requiresPreprocessing")]
public bool? RequiresPreprocessing { get; set; }

/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (CompatibilityLevel > 20)
{
throw new ValidationException(ValidationRules.InclusiveMaximum, "CompatibilityLevel", 20);
}
if (CompatibilityLevel < 20)
{
throw new ValidationException(ValidationRules.InclusiveMinimum, "CompatibilityLevel", 20);
}
}
}
}
Loading