Skip to content

Commit

Permalink
Generated from 25369344fbeb2f169b5bc40b9c4a8a99c42503e7 (#194)
Browse files Browse the repository at this point in the history
chore: jsonfmt servicebus
  • Loading branch information
openapi-sdkautomation[bot] authored and azuresdkci committed Sep 13, 2019
1 parent 58748cc commit 0f697f3
Show file tree
Hide file tree
Showing 6 changed files with 540 additions and 3 deletions.
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

0 comments on commit 0f697f3

Please sign in to comment.