Skip to content

Commit

Permalink
Releasing version 29.4.0
Browse files Browse the repository at this point in the history
Releasing version 29.4.0
  • Loading branch information
joshunter committed Dec 14, 2021
2 parents cdefbb2 + 3b62944 commit 2a31239
Show file tree
Hide file tree
Showing 379 changed files with 18,454 additions and 208 deletions.
195 changes: 195 additions & 0 deletions Ailanguage/AIServiceLanguageClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,201 @@ public AIServiceLanguageClient(IBasicAuthenticationDetailsProvider authenticatio
this.retryConfiguration = clientConfigurationToUse.RetryConfiguration;
}

/// <summary>
/// Make a detect call to language detection pre-deployed model.
/// </summary>
/// <param name="request">The request object containing the details to send. Required.</param>
/// <param name="retryConfiguration">The retry configuration that will be used by to send this request. Optional.</param>
/// <param name="cancellationToken">The cancellation token to cancel this operation. Optional.</param>
/// <returns>A response object containing details about the completed operation</returns>
/// <example>Click <a href="https://docs.cloud.oracle.com/en-us/iaas/tools/dot-net-examples/latest/ailanguage/BatchDetectDominantLanguage.cs.html">here</a> to see an example of how to use BatchDetectDominantLanguage API.</example>
public async Task<BatchDetectDominantLanguageResponse> BatchDetectDominantLanguage(BatchDetectDominantLanguageRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default)
{
logger.Trace("Called batchDetectDominantLanguage");
Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/actions/batchDetectDominantLanguage".Trim('/')));
HttpMethod method = new HttpMethod("POST");
HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request);
requestMessage.Headers.Add("Accept", "application/json");
GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration);
HttpResponseMessage responseMessage;

try
{
if (retryingClient != null)
{
responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, cancellationToken).ConfigureAwait(false);
}
else
{
responseMessage = await this.restClient.HttpSend(requestMessage).ConfigureAwait(false);
}
this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage);

return Converter.FromHttpResponseMessage<BatchDetectDominantLanguageResponse>(responseMessage);
}
catch (Exception e)
{
logger.Error($"BatchDetectDominantLanguage failed with error: {e.Message}");
throw;
}
}

/// <summary>
/// Make a batch detect call to entity pre-deployed model
/// </summary>
/// <param name="request">The request object containing the details to send. Required.</param>
/// <param name="retryConfiguration">The retry configuration that will be used by to send this request. Optional.</param>
/// <param name="cancellationToken">The cancellation token to cancel this operation. Optional.</param>
/// <returns>A response object containing details about the completed operation</returns>
/// <example>Click <a href="https://docs.cloud.oracle.com/en-us/iaas/tools/dot-net-examples/latest/ailanguage/BatchDetectLanguageEntities.cs.html">here</a> to see an example of how to use BatchDetectLanguageEntities API.</example>
public async Task<BatchDetectLanguageEntitiesResponse> BatchDetectLanguageEntities(BatchDetectLanguageEntitiesRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default)
{
logger.Trace("Called batchDetectLanguageEntities");
Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/actions/batchDetectLanguageEntities".Trim('/')));
HttpMethod method = new HttpMethod("POST");
HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request);
requestMessage.Headers.Add("Accept", "application/json");
GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration);
HttpResponseMessage responseMessage;

try
{
if (retryingClient != null)
{
responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, cancellationToken).ConfigureAwait(false);
}
else
{
responseMessage = await this.restClient.HttpSend(requestMessage).ConfigureAwait(false);
}
this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage);

return Converter.FromHttpResponseMessage<BatchDetectLanguageEntitiesResponse>(responseMessage);
}
catch (Exception e)
{
logger.Error($"BatchDetectLanguageEntities failed with error: {e.Message}");
throw;
}
}

/// <summary>
/// Make a detect call to the keyPhrase pre-deployed model.
/// </summary>
/// <param name="request">The request object containing the details to send. Required.</param>
/// <param name="retryConfiguration">The retry configuration that will be used by to send this request. Optional.</param>
/// <param name="cancellationToken">The cancellation token to cancel this operation. Optional.</param>
/// <returns>A response object containing details about the completed operation</returns>
/// <example>Click <a href="https://docs.cloud.oracle.com/en-us/iaas/tools/dot-net-examples/latest/ailanguage/BatchDetectLanguageKeyPhrases.cs.html">here</a> to see an example of how to use BatchDetectLanguageKeyPhrases API.</example>
public async Task<BatchDetectLanguageKeyPhrasesResponse> BatchDetectLanguageKeyPhrases(BatchDetectLanguageKeyPhrasesRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default)
{
logger.Trace("Called batchDetectLanguageKeyPhrases");
Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/actions/batchDetectLanguageKeyPhrases".Trim('/')));
HttpMethod method = new HttpMethod("POST");
HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request);
requestMessage.Headers.Add("Accept", "application/json");
GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration);
HttpResponseMessage responseMessage;

try
{
if (retryingClient != null)
{
responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, cancellationToken).ConfigureAwait(false);
}
else
{
responseMessage = await this.restClient.HttpSend(requestMessage).ConfigureAwait(false);
}
this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage);

return Converter.FromHttpResponseMessage<BatchDetectLanguageKeyPhrasesResponse>(responseMessage);
}
catch (Exception e)
{
logger.Error($"BatchDetectLanguageKeyPhrases failed with error: {e.Message}");
throw;
}
}

/// <summary>
/// Make a detect call to sentiment pre-deployed model.
/// </summary>
/// <param name="request">The request object containing the details to send. Required.</param>
/// <param name="retryConfiguration">The retry configuration that will be used by to send this request. Optional.</param>
/// <param name="cancellationToken">The cancellation token to cancel this operation. Optional.</param>
/// <returns>A response object containing details about the completed operation</returns>
/// <example>Click <a href="https://docs.cloud.oracle.com/en-us/iaas/tools/dot-net-examples/latest/ailanguage/BatchDetectLanguageSentiments.cs.html">here</a> to see an example of how to use BatchDetectLanguageSentiments API.</example>
public async Task<BatchDetectLanguageSentimentsResponse> BatchDetectLanguageSentiments(BatchDetectLanguageSentimentsRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default)
{
logger.Trace("Called batchDetectLanguageSentiments");
Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/actions/batchDetectLanguageSentiments".Trim('/')));
HttpMethod method = new HttpMethod("POST");
HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request);
requestMessage.Headers.Add("Accept", "application/json");
GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration);
HttpResponseMessage responseMessage;

try
{
if (retryingClient != null)
{
responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, cancellationToken).ConfigureAwait(false);
}
else
{
responseMessage = await this.restClient.HttpSend(requestMessage).ConfigureAwait(false);
}
this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage);

return Converter.FromHttpResponseMessage<BatchDetectLanguageSentimentsResponse>(responseMessage);
}
catch (Exception e)
{
logger.Error($"BatchDetectLanguageSentiments failed with error: {e.Message}");
throw;
}
}

/// <summary>
/// Make a detect call to text classification from the pre-deployed model.
/// </summary>
/// <param name="request">The request object containing the details to send. Required.</param>
/// <param name="retryConfiguration">The retry configuration that will be used by to send this request. Optional.</param>
/// <param name="cancellationToken">The cancellation token to cancel this operation. Optional.</param>
/// <returns>A response object containing details about the completed operation</returns>
/// <example>Click <a href="https://docs.cloud.oracle.com/en-us/iaas/tools/dot-net-examples/latest/ailanguage/BatchDetectLanguageTextClassification.cs.html">here</a> to see an example of how to use BatchDetectLanguageTextClassification API.</example>
public async Task<BatchDetectLanguageTextClassificationResponse> BatchDetectLanguageTextClassification(BatchDetectLanguageTextClassificationRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default)
{
logger.Trace("Called batchDetectLanguageTextClassification");
Uri uri = new Uri(this.restClient.GetEndpoint(), System.IO.Path.Combine(basePathWithoutHost, "/actions/batchDetectLanguageTextClassification".Trim('/')));
HttpMethod method = new HttpMethod("POST");
HttpRequestMessage requestMessage = Converter.ToHttpRequestMessage(uri, method, request);
requestMessage.Headers.Add("Accept", "application/json");
GenericRetrier retryingClient = Retrier.GetPreferredRetrier(retryConfiguration, this.retryConfiguration);
HttpResponseMessage responseMessage;

try
{
if (retryingClient != null)
{
responseMessage = await retryingClient.MakeRetryingCall(this.restClient.HttpSend, requestMessage, cancellationToken).ConfigureAwait(false);
}
else
{
responseMessage = await this.restClient.HttpSend(requestMessage).ConfigureAwait(false);
}
this.restClient.CheckHttpResponseMessage(requestMessage, responseMessage);

return Converter.FromHttpResponseMessage<BatchDetectLanguageTextClassificationResponse>(responseMessage);
}
catch (Exception e)
{
logger.Error($"BatchDetectLanguageTextClassification failed with error: {e.Message}");
throw;
}
}

/// <summary>
/// Make a detect call to language detection pre-deployed model.
/// </summary>
Expand Down
35 changes: 35 additions & 0 deletions Ailanguage/models/BatchDetectDominantLanguageDetails.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
*/

// NOTE: Code generated by OracleSDKGenerator.
// DO NOT EDIT this file manually.


using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;


namespace Oci.AilanguageService.Models
{
/// <summary>
/// The documents details for language detect call.
/// </summary>
public class BatchDetectDominantLanguageDetails
{

/// <value>
/// List of Documents for detect language.
/// </value>
/// <remarks>
/// Required
/// </remarks>
[Required(ErrorMessage = "Documents is required.")]
[JsonProperty(PropertyName = "documents")]
public System.Collections.Generic.List<DominantLanguageDocument> Documents { get; set; }

}
}
41 changes: 41 additions & 0 deletions Ailanguage/models/BatchDetectDominantLanguageResult.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
*/

// NOTE: Code generated by OracleSDKGenerator.
// DO NOT EDIT this file manually.


using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;


namespace Oci.AilanguageService.Models
{
/// <summary>
/// Result of language detect call.
/// </summary>
public class BatchDetectDominantLanguageResult
{

/// <value>
/// List of succeeded document response.
/// </value>
/// <remarks>
/// Required
/// </remarks>
[Required(ErrorMessage = "Documents is required.")]
[JsonProperty(PropertyName = "documents")]
public System.Collections.Generic.List<DominantLanguageDocumentResult> Documents { get; set; }

/// <value>
/// List of failed document response.
/// </value>
[JsonProperty(PropertyName = "errors")]
public System.Collections.Generic.List<DocumentError> Errors { get; set; }

}
}
35 changes: 35 additions & 0 deletions Ailanguage/models/BatchDetectLanguageEntitiesDetails.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
*/

// NOTE: Code generated by OracleSDKGenerator.
// DO NOT EDIT this file manually.


using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;


namespace Oci.AilanguageService.Models
{
/// <summary>
/// The documents details for entities detect call.
/// </summary>
public class BatchDetectLanguageEntitiesDetails
{

/// <value>
/// List of Documents for detect entities.
/// </value>
/// <remarks>
/// Required
/// </remarks>
[Required(ErrorMessage = "Documents is required.")]
[JsonProperty(PropertyName = "documents")]
public System.Collections.Generic.List<EntityDocument> Documents { get; set; }

}
}
41 changes: 41 additions & 0 deletions Ailanguage/models/BatchDetectLanguageEntitiesResult.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
*/

// NOTE: Code generated by OracleSDKGenerator.
// DO NOT EDIT this file manually.


using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;


namespace Oci.AilanguageService.Models
{
/// <summary>
/// Result of entities detect call.
/// </summary>
public class BatchDetectLanguageEntitiesResult
{

/// <value>
/// List of succeeded document response.
/// </value>
/// <remarks>
/// Required
/// </remarks>
[Required(ErrorMessage = "Documents is required.")]
[JsonProperty(PropertyName = "documents")]
public System.Collections.Generic.List<EntityDocumentResult> Documents { get; set; }

/// <value>
/// List of failed document response.
/// </value>
[JsonProperty(PropertyName = "errors")]
public System.Collections.Generic.List<DocumentError> Errors { get; set; }

}
}
35 changes: 35 additions & 0 deletions Ailanguage/models/BatchDetectLanguageKeyPhrasesDetails.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
*/

// NOTE: Code generated by OracleSDKGenerator.
// DO NOT EDIT this file manually.


using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;


namespace Oci.AilanguageService.Models
{
/// <summary>
/// The documents details for keyPhrases call.
/// </summary>
public class BatchDetectLanguageKeyPhrasesDetails
{

/// <value>
/// List of Documents for detect keyPhrases.
/// </value>
/// <remarks>
/// Required
/// </remarks>
[Required(ErrorMessage = "Documents is required.")]
[JsonProperty(PropertyName = "documents")]
public System.Collections.Generic.List<KeyPhraseDocument> Documents { get; set; }

}
}

0 comments on commit 2a31239

Please sign in to comment.