Skip to content

Commit

Permalink
.NET SDK Resource Provider:'Authoring' (#5572)
Browse files Browse the repository at this point in the history
REST Spec PR 'Azure/azure-rest-api-specs#5447'
REST Spec PR Author 'nebadr'
REST Spec PR Last commit
  • Loading branch information
adxsdknet authored and dsgouda committed Mar 29, 2019
1 parent a00b2d6 commit 3231061
Show file tree
Hide file tree
Showing 34 changed files with 1,678 additions and 6,700 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,6 @@ public AzureAccounts(LUISAuthoringClient client)
/// <remarks>
/// Assigns an Azure account to the application.
/// </remarks>
/// <param name='azureRegion'>
/// Supported Azure regions for Cognitive Services endpoints. Possible values
/// include: 'westus', 'westeurope', 'southeastasia', 'eastus2',
/// 'westcentralus', 'westus2', 'eastus', 'southcentralus', 'northeurope',
/// 'eastasia', 'australiaeast', 'brazilsouth', 'virginia'
/// </param>
/// <param name='azureCloud'>
/// Supported Azure Clouds for Cognitive Services endpoints. Possible values
/// include: 'com', 'us'
/// </param>
/// <param name='appId'>
/// The application ID.
/// </param>
Expand All @@ -84,11 +74,21 @@ public AzureAccounts(LUISAuthoringClient client)
/// <exception cref="SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="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 Task<HttpOperationResponse<OperationStatus>> AssignToAppWithHttpMessagesAsync(AzureRegions azureRegion, AzureClouds azureCloud, System.Guid appId, AzureAccountInfoObject azureAccountInfoObject = default(AzureAccountInfoObject), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
public async Task<HttpOperationResponse<OperationStatus>> AssignToAppWithHttpMessagesAsync(System.Guid appId, AzureAccountInfoObject azureAccountInfoObject = default(AzureAccountInfoObject), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.Endpoint == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.Endpoint");
}
if (azureAccountInfoObject != null)
{
azureAccountInfoObject.Validate();
Expand All @@ -100,8 +100,6 @@ public AzureAccounts(LUISAuthoringClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary<string, object> tracingParameters = new Dictionary<string, object>();
tracingParameters.Add("azureRegion", azureRegion);
tracingParameters.Add("azureCloud", azureCloud);
tracingParameters.Add("appId", appId);
tracingParameters.Add("azureAccountInfoObject", azureAccountInfoObject);
tracingParameters.Add("cancellationToken", cancellationToken);
Expand All @@ -110,8 +108,7 @@ public AzureAccounts(LUISAuthoringClient client)
// Construct URL
var _baseUrl = Client.BaseUri;
var _url = _baseUrl + (_baseUrl.EndsWith("/") ? "" : "/") + "apps/{appId}/azureaccounts";
_url = _url.Replace("{AzureRegion}", Rest.Serialization.SafeJsonConvert.SerializeObject(azureRegion, Client.SerializationSettings).Trim('"'));
_url = _url.Replace("{AzureCloud}", Rest.Serialization.SafeJsonConvert.SerializeObject(azureCloud, Client.SerializationSettings).Trim('"'));
_url = _url.Replace("{Endpoint}", Client.Endpoint);
_url = _url.Replace("{appId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(appId, Client.SerializationSettings).Trim('"')));
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
Expand Down Expand Up @@ -226,16 +223,6 @@ public AzureAccounts(LUISAuthoringClient client)
/// Gets the LUIS Azure accounts assigned to the application for the user using
/// his ARM token.
/// </remarks>
/// <param name='azureRegion'>
/// Supported Azure regions for Cognitive Services endpoints. Possible values
/// include: 'westus', 'westeurope', 'southeastasia', 'eastus2',
/// 'westcentralus', 'westus2', 'eastus', 'southcentralus', 'northeurope',
/// 'eastasia', 'australiaeast', 'brazilsouth', 'virginia'
/// </param>
/// <param name='azureCloud'>
/// Supported Azure Clouds for Cognitive Services endpoints. Possible values
/// include: 'com', 'us'
/// </param>
/// <param name='appId'>
/// The application ID.
/// </param>
Expand All @@ -251,29 +238,36 @@ public AzureAccounts(LUISAuthoringClient client)
/// <exception cref="SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="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 Task<HttpOperationResponse<IList<AzureAccountInfoObject>>> GetAssignedWithHttpMessagesAsync(AzureRegions azureRegion, AzureClouds azureCloud, System.Guid appId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
public async Task<HttpOperationResponse<IList<AzureAccountInfoObject>>> GetAssignedWithHttpMessagesAsync(System.Guid appId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.Endpoint == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.Endpoint");
}
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
if (_shouldTrace)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary<string, object> tracingParameters = new Dictionary<string, object>();
tracingParameters.Add("azureRegion", azureRegion);
tracingParameters.Add("azureCloud", azureCloud);
tracingParameters.Add("appId", appId);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "GetAssigned", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri;
var _url = _baseUrl + (_baseUrl.EndsWith("/") ? "" : "/") + "apps/{appId}/azureaccounts";
_url = _url.Replace("{AzureRegion}", Rest.Serialization.SafeJsonConvert.SerializeObject(azureRegion, Client.SerializationSettings).Trim('"'));
_url = _url.Replace("{AzureCloud}", Rest.Serialization.SafeJsonConvert.SerializeObject(azureCloud, Client.SerializationSettings).Trim('"'));
_url = _url.Replace("{Endpoint}", Client.Endpoint);
_url = _url.Replace("{appId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(appId, Client.SerializationSettings).Trim('"')));
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
Expand Down Expand Up @@ -381,16 +375,6 @@ public AzureAccounts(LUISAuthoringClient client)
/// <remarks>
/// Removes assigned Azure account from the application.
/// </remarks>
/// <param name='azureRegion'>
/// Supported Azure regions for Cognitive Services endpoints. Possible values
/// include: 'westus', 'westeurope', 'southeastasia', 'eastus2',
/// 'westcentralus', 'westus2', 'eastus', 'southcentralus', 'northeurope',
/// 'eastasia', 'australiaeast', 'brazilsouth', 'virginia'
/// </param>
/// <param name='azureCloud'>
/// Supported Azure Clouds for Cognitive Services endpoints. Possible values
/// include: 'com', 'us'
/// </param>
/// <param name='appId'>
/// The application ID.
/// </param>
Expand All @@ -409,11 +393,21 @@ public AzureAccounts(LUISAuthoringClient client)
/// <exception cref="SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="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 Task<HttpOperationResponse<OperationStatus>> RemoveFromAppWithHttpMessagesAsync(AzureRegions azureRegion, AzureClouds azureCloud, System.Guid appId, AzureAccountInfoObject azureAccountInfoObject = default(AzureAccountInfoObject), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
public async Task<HttpOperationResponse<OperationStatus>> RemoveFromAppWithHttpMessagesAsync(System.Guid appId, AzureAccountInfoObject azureAccountInfoObject = default(AzureAccountInfoObject), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.Endpoint == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.Endpoint");
}
if (azureAccountInfoObject != null)
{
azureAccountInfoObject.Validate();
Expand All @@ -425,8 +419,6 @@ public AzureAccounts(LUISAuthoringClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary<string, object> tracingParameters = new Dictionary<string, object>();
tracingParameters.Add("azureRegion", azureRegion);
tracingParameters.Add("azureCloud", azureCloud);
tracingParameters.Add("appId", appId);
tracingParameters.Add("azureAccountInfoObject", azureAccountInfoObject);
tracingParameters.Add("cancellationToken", cancellationToken);
Expand All @@ -435,8 +427,7 @@ public AzureAccounts(LUISAuthoringClient client)
// Construct URL
var _baseUrl = Client.BaseUri;
var _url = _baseUrl + (_baseUrl.EndsWith("/") ? "" : "/") + "apps/{appId}/azureaccounts";
_url = _url.Replace("{AzureRegion}", Rest.Serialization.SafeJsonConvert.SerializeObject(azureRegion, Client.SerializationSettings).Trim('"'));
_url = _url.Replace("{AzureCloud}", Rest.Serialization.SafeJsonConvert.SerializeObject(azureCloud, Client.SerializationSettings).Trim('"'));
_url = _url.Replace("{Endpoint}", Client.Endpoint);
_url = _url.Replace("{appId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(appId, Client.SerializationSettings).Trim('"')));
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
Expand Down Expand Up @@ -550,16 +541,6 @@ public AzureAccounts(LUISAuthoringClient client)
/// <remarks>
/// Gets the LUIS Azure accounts for the user using his ARM token.
/// </remarks>
/// <param name='azureRegion'>
/// Supported Azure regions for Cognitive Services endpoints. Possible values
/// include: 'westus', 'westeurope', 'southeastasia', 'eastus2',
/// 'westcentralus', 'westus2', 'eastus', 'southcentralus', 'northeurope',
/// 'eastasia', 'australiaeast', 'brazilsouth', 'virginia'
/// </param>
/// <param name='azureCloud'>
/// Supported Azure Clouds for Cognitive Services endpoints. Possible values
/// include: 'com', 'us'
/// </param>
/// <param name='customHeaders'>
/// Headers that will be added to request.
/// </param>
Expand All @@ -572,28 +553,35 @@ public AzureAccounts(LUISAuthoringClient client)
/// <exception cref="SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="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 Task<HttpOperationResponse<IList<AzureAccountInfoObject>>> ListUserLUISAccountsWithHttpMessagesAsync(AzureRegions azureRegion, AzureClouds azureCloud, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
public async Task<HttpOperationResponse<IList<AzureAccountInfoObject>>> ListUserLUISAccountsWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.Endpoint == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.Endpoint");
}
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
if (_shouldTrace)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary<string, object> tracingParameters = new Dictionary<string, object>();
tracingParameters.Add("azureRegion", azureRegion);
tracingParameters.Add("azureCloud", azureCloud);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "ListUserLUISAccounts", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri;
var _url = _baseUrl + (_baseUrl.EndsWith("/") ? "" : "/") + "azureaccounts";
_url = _url.Replace("{AzureRegion}", Rest.Serialization.SafeJsonConvert.SerializeObject(azureRegion, Client.SerializationSettings).Trim('"'));
_url = _url.Replace("{AzureCloud}", Rest.Serialization.SafeJsonConvert.SerializeObject(azureCloud, Client.SerializationSettings).Trim('"'));
_url = _url.Replace("{Endpoint}", Client.Endpoint);
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
Expand Down
Loading

0 comments on commit 3231061

Please sign in to comment.