Example #1
0
 /// <summary>
 /// Creates a new cognitive skillset in an Azure Search service or updates the
 /// skillset if it already exists.
 /// <see href="https://docs.microsoft.com/rest/api/searchservice/update-skillset" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='skillsetName'>
 /// The name of the skillset to create or update.
 /// </param>
 /// <param name='skillset'>
 /// The skillset containing one or more cognitive skills to create or update in
 /// an Azure Search service.
 /// </param>
 /// <param name='searchRequestOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Skillset> CreateOrUpdateAsync(this ISkillsetsOperations operations, string skillsetName, Skillset skillset, SearchRequestOptions searchRequestOptions = default(SearchRequestOptions), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(skillsetName, skillset, searchRequestOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #2
0
 /// <summary>
 /// List all cognitive skillsets in an Azure Search service.
 /// <see href="https://docs.microsoft.com/rest/api/searchservice/list-skillset" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='searchRequestOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <SkillsetListResult> ListAsync(this ISkillsetsOperations operations, SearchRequestOptions searchRequestOptions = default(SearchRequestOptions), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(searchRequestOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Determines whether or not the given skillset exists in the search service.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name="skillsetName">
 /// The name of the skillset.
 /// </param>
 /// <param name='searchRequestOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <returns>
 /// <c>true</c> if the skillset exists; <c>false</c> otherwise.
 /// </returns>
 public static bool Exists(
     this ISkillsetsOperations operations,
     string skillsetName,
     SearchRequestOptions searchRequestOptions = default(SearchRequestOptions))
 {
     return(operations.ExistsAsync(skillsetName, searchRequestOptions).GetAwaiter().GetResult());
 }
        /// <summary>
        /// Determines whether or not the given skillset exists in the search service.
        /// </summary>
        /// <param name='operations'>
        /// The operations group for this extension method.
        /// </param>
        /// <param name="skillsetName">
        /// The name of the skillset.
        /// </param>
        /// <param name='searchRequestOptions'>
        /// Additional parameters for the operation
        /// </param>
        /// <param name='cancellationToken'>
        /// The cancellation token.
        /// </param>
        /// <returns>
        /// <c>true</c> if the skillset exists; <c>false</c> otherwise.
        /// </returns>
        public static async Task <bool> ExistsAsync(
            this ISkillsetsOperations operations,
            string skillsetName,
            SearchRequestOptions searchRequestOptions = default(SearchRequestOptions),
            CancellationToken cancellationToken       = default(CancellationToken))
        {
            AzureOperationResponse <bool> result = await operations.ExistsWithHttpMessagesAsync(skillsetName, searchRequestOptions, null, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
Example #5
0
 /// <summary>
 /// Deletes a cognitive skillset in an Azure Search service.
 /// <see href="https://docs.microsoft.com/rest/api/searchservice/delete-skillset" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='skillsetName'>
 /// The name of the skillset to delete.
 /// </param>
 /// <param name='searchRequestOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static void Delete(this ISkillsetsOperations operations, string skillsetName, SearchRequestOptions searchRequestOptions = default(SearchRequestOptions))
 {
     operations.DeleteAsync(skillsetName, searchRequestOptions).GetAwaiter().GetResult();
 }
Example #6
0
 /// <summary>
 /// Creates a new cognitive skillset in an Azure Search service or updates the
 /// skillset if it already exists.
 /// <see href="https://docs.microsoft.com/rest/api/searchservice/update-skillset" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='skillsetName'>
 /// The name of the skillset to create or update.
 /// </param>
 /// <param name='skillset'>
 /// The skillset containing one or more cognitive skills to create or update in
 /// an Azure Search service.
 /// </param>
 /// <param name='searchRequestOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static Skillset CreateOrUpdate(this ISkillsetsOperations operations, string skillsetName, Skillset skillset, SearchRequestOptions searchRequestOptions = default(SearchRequestOptions))
 {
     return(operations.CreateOrUpdateAsync(skillsetName, skillset, searchRequestOptions).GetAwaiter().GetResult());
 }
Example #7
0
 /// <summary>
 /// List all cognitive skillsets in an Azure Search service.
 /// <see href="https://docs.microsoft.com/rest/api/searchservice/list-skillset" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='searchRequestOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static SkillsetListResult List(this ISkillsetsOperations operations, SearchRequestOptions searchRequestOptions = default(SearchRequestOptions))
 {
     return(operations.ListAsync(searchRequestOptions).GetAwaiter().GetResult());
 }
Example #8
0
 /// <summary>
 /// Deletes a cognitive skillset in an Azure Search service.
 /// <see href="https://docs.microsoft.com/rest/api/searchservice/delete-skillset" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='skillsetName'>
 /// The name of the skillset to delete.
 /// </param>
 /// <param name='searchRequestOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this ISkillsetsOperations operations, string skillsetName, SearchRequestOptions searchRequestOptions = default(SearchRequestOptions), CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(skillsetName, searchRequestOptions, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Creates a new skillset or updates a skillset if it
 /// already exists.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='skillset'>
 /// The definition of the skillset to create or update.
 /// </param>
 /// <param name='searchRequestOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='accessCondition'>
 /// Additional parameters for the operation
 /// </param>
 public static Skillset CreateOrUpdate(this ISkillsetsOperations operations, Skillset skillset, SearchRequestOptions searchRequestOptions = default(SearchRequestOptions), AccessCondition accessCondition = default(AccessCondition))
 {
     return(operations.CreateOrUpdateAsync(skillset, searchRequestOptions, accessCondition).GetAwaiter().GetResult());
 }