/// <summary> /// Gets updated search results for a given search query. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.OperationalInsights.ISearchOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The resource group name of the workspace. /// </param> /// <param name='workspaceName'> /// Required. A unique workspace instance name. /// </param> /// <param name='id'> /// Required. The id of the search that will have results updated. /// </param> /// <returns> /// The get search result operation response. /// </returns> public static SearchGetSearchResultsResponse UpdateSearchResults(this ISearchOperations operations, string resourceGroupName, string workspaceName, string id) { return(Task.Factory.StartNew((object s) => { return ((ISearchOperations)s).UpdateSearchResultsAsync(resourceGroupName, workspaceName, id); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Creates or updates a saved search for a given workspace. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.OperationalInsights.ISearchOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The resource group name of the workspace. /// </param> /// <param name='workspaceName'> /// Required. A unique workspace instance name. /// </param> /// <param name='savedSearchId'> /// Required. The id of the saved search. /// </param> /// <param name='parameters'> /// Required. The parameters required to save a search. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static AzureOperationResponse CreateOrUpdateSavedSearch(this ISearchOperations operations, string resourceGroupName, string workspaceName, string savedSearchId, SearchCreateOrUpdateSavedSearchParameters parameters) { return(Task.Factory.StartNew((object s) => { return ((ISearchOperations)s).CreateOrUpdateSavedSearchAsync(resourceGroupName, workspaceName, savedSearchId, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
private void InitSubApis() { this.blockOperations = new BlockTemplate(this.RestTemplate); this.directMessageOperations = new DirectMessageTemplate(this.RestTemplate); this.friendOperations = new FriendTemplate(this.RestTemplate); this.geoOperations = new GeoTemplate(this.RestTemplate); this.listOperations = new ListTemplate(this.RestTemplate); this.searchOperations = new SearchTemplate(this.RestTemplate); this.timelineOperations = new TimelineTemplate(this.RestTemplate); this.userOperations = new UserTemplate(this.RestTemplate); }
/// <summary> /// Initializes a new instance of the /// OperationalInsightsManagementClient class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> public OperationalInsightsManagementClient(HttpClient httpClient) : base(httpClient) { this._search = new SearchOperations(this); this._storageInsights = new StorageInsightOperations(this); this._workspaces = new WorkspaceOperations(this); this._apiVersion = "2015-03-20"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(120); }
/// <summary> /// Creates a new WeatherAPI.NET API client with an optional custom base URI. /// </summary> /// <param name="apiKey">Your WeatherAPI.NET API key.</param> /// <param name="baseApiUri">The base URI to use for the API, or null for default.</param> public WeatherAPIClient(string apiKey, Uri baseApiUri = null) : base(apiKey, baseApiUri) { _astronomyOperations = ConstructAstronomyOperations(); _forecastOperations = ConstructForecastOperations(); _historyOperations = ConstructHistoryOperations(); _ipLookupOperations = ConstructIPLookupOperations(); _realtimeOperations = ConstructRealtimeOperations(); _searchOperations = ConstructSearchOperations(); _sportsOperations = ConstructSportsOperations(); _timeZoneOperations = ConstructTimeZoneOperations(); }
private void InitSubApis() { this.blockOperations = new BlockTemplate(this.RestTemplate, this.IsAuthorized); this.directMessageOperations = new DirectMessageTemplate(this.RestTemplate, this.IsAuthorized); this.friendOperations = new FriendTemplate(this.RestTemplate, this.IsAuthorized); this.geoOperations = new GeoTemplate(this.RestTemplate, this.IsAuthorized); this.listOperations = new ListTemplate(this.RestTemplate, this.IsAuthorized); this.searchOperations = new SearchTemplate(this.RestTemplate, this.IsAuthorized); this.timelineOperations = new TimelineTemplate(this.RestTemplate, this.IsAuthorized); this.userOperations = new UserTemplate(this.RestTemplate, this.IsAuthorized); }
/// <summary> /// Operational details for stopword management. /// </summary> /// <param name="searchOperations"></param> public OperationsSystemStopwordsController(ISearchOperations searchOperations) { _searchOperations = searchOperations; }
/// <summary> /// Creates or updates a saved search for a given workspace. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.OperationalInsights.ISearchOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The resource group name of the workspace. /// </param> /// <param name='workspaceName'> /// Required. A unique workspace instance name. /// </param> /// <param name='savedSearchId'> /// Required. The id of the saved search. /// </param> /// <param name='parameters'> /// Required. The parameters required to save a search. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <AzureOperationResponse> CreateOrUpdateSavedSearchAsync(this ISearchOperations operations, string resourceGroupName, string workspaceName, string savedSearchId, SearchCreateOrUpdateSavedSearchParameters parameters) { return(operations.CreateOrUpdateSavedSearchAsync(resourceGroupName, workspaceName, savedSearchId, parameters, CancellationToken.None)); }
/// <summary> /// Gets updated search results for a given search query. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.OperationalInsights.ISearchOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The resource group name of the workspace. /// </param> /// <param name='workspaceName'> /// Required. A unique workspace instance name. /// </param> /// <param name='id'> /// Required. The id of the search that will have results updated. /// </param> /// <returns> /// The get search result operation response. /// </returns> public static Task <SearchGetSearchResultsResponse> UpdateSearchResultsAsync(this ISearchOperations operations, string resourceGroupName, string workspaceName, string id) { return(operations.UpdateSearchResultsAsync(resourceGroupName, workspaceName, id, CancellationToken.None)); }
/// <summary> /// Gets the saved searches for a given workspace. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.OperationalInsights.ISearchOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The resource group name of the workspace. /// </param> /// <param name='workspaceName'> /// Required. A unique workspace instance name. /// </param> /// <returns> /// The saved search operation response. /// </returns> public static Task <SearchListSavedSearchResponse> ListSavedSearchesAsync(this ISearchOperations operations, string resourceGroupName, string workspaceName) { return(operations.ListSavedSearchesAsync(resourceGroupName, workspaceName, CancellationToken.None)); }
/// <summary> /// Gets the search results for a given workspace. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.OperationalInsights.ISearchOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The resource group name of the workspace. /// </param> /// <param name='workspaceName'> /// Required. A unique workspace instance name. /// </param> /// <param name='parameters'> /// Required. The parameters required to execute a search query. /// </param> /// <returns> /// The get search result operation response. /// </returns> public static Task <SearchGetSearchResultsResponse> GetSearchResultsAsync(this ISearchOperations operations, string resourceGroupName, string workspaceName, SearchGetSearchResultsParameters parameters) { return(operations.GetSearchResultsAsync(resourceGroupName, workspaceName, parameters, CancellationToken.None)); }
/// <summary> /// Gets the schema for a given workspace. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.OperationalInsights.ISearchOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The resource group name of the workspace. /// </param> /// <param name='workspaceName'> /// Required. A unique workspace instance name. /// </param> /// <returns> /// The get schema operation response. /// </returns> public static Task <SearchGetSchemaResponse> GetSchemaAsync(this ISearchOperations operations, string resourceGroupName, string workspaceName) { return(operations.GetSchemaAsync(resourceGroupName, workspaceName, CancellationToken.None)); }
/// <summary> /// Deletes the specified saved search in a given workspace. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.OperationalInsights.ISearchOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The resource group name of the workspace. /// </param> /// <param name='workspaceName'> /// Required. A unique workspace instance name. /// </param> /// <param name='savedSearchId'> /// Required. The id of the saved search. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <AzureOperationResponse> DeleteSavedSearchAsync(this ISearchOperations operations, string resourceGroupName, string workspaceName, string savedSearchId) { return(operations.DeleteSavedSearchAsync(resourceGroupName, workspaceName, savedSearchId, CancellationToken.None)); }
public SearchConfiguration(IElasticClient elasticClient, ICoreOperations esCoreOperation, ISearchOperations esSearchOperation, IOptions <EsConfigOptions> options, SearchBuilder searchBuilder) : base(elasticClient, esCoreOperation, esSearchOperation, options, searchBuilder) { var mappingRequrest = new PutMappingRequest("customer"); mappingRequrest.Properties = SearchBuilder.Entity <CustomerModel>().Descriptor; elasticClient.Map(mappingRequrest); }