Skip to content

Commit

Permalink
[AutoPR Microsoft.Azure.Management.ApiManagement] [DO NOT MERGE] Comp…
Browse files Browse the repository at this point in the history
…ute 2019-07-01 version (#197)

* Generated from 25369344fbeb2f169b5bc40b9c4a8a99c42503e7 (#194)

chore: jsonfmt servicebus

* Generated from 76f33475980a137bf14a56a50a8db8da05fa263f

 resolved merge conflcits with branch Compute-2019-07
  • Loading branch information
openapi-sdkautomation[bot] authored and SDK Automation committed Oct 25, 2019
1 parent 71dfe01 commit d58aff1
Show file tree
Hide file tree
Showing 7 changed files with 541 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,10 @@ public AuthenticationSettingsContract()
/// </summary>
/// <param name="oAuth2">OAuth2 Authentication settings</param>
/// <param name="openid">OpenID Connect Authentication Settings</param>
/// <param name="subscriptionKeyRequired">Specifies whether
/// subscription key is required during call to this API, true - API is
/// included into closed products only, false - API is included into
/// open products alone, null - there is a mix of products.</param>
public AuthenticationSettingsContract(OAuth2AuthenticationSettingsContract oAuth2 = default(OAuth2AuthenticationSettingsContract), OpenIdAuthenticationSettingsContract openid = default(OpenIdAuthenticationSettingsContract), bool? subscriptionKeyRequired = default(bool?))
public AuthenticationSettingsContract(OAuth2AuthenticationSettingsContract oAuth2 = default(OAuth2AuthenticationSettingsContract), OpenIdAuthenticationSettingsContract openid = default(OpenIdAuthenticationSettingsContract))
{
OAuth2 = oAuth2;
Openid = openid;
SubscriptionKeyRequired = subscriptionKeyRequired;
CustomInit();
}

Expand All @@ -62,14 +57,5 @@ public AuthenticationSettingsContract()
[JsonProperty(PropertyName = "openid")]
public OpenIdAuthenticationSettingsContract Openid { get; set; }

/// <summary>
/// Gets or sets specifies whether subscription key is required during
/// call to this API, true - API is included into closed products only,
/// false - API is included into open products alone, null - there is a
/// mix of products.
/// </summary>
[JsonProperty(PropertyName = "subscriptionKeyRequired")]
public bool? SubscriptionKeyRequired { get; set; }

}
}
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 d58aff1

Please sign in to comment.