diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch.Tests/CustomSearchTests.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch.Tests/CustomSearchTests.cs index 6c80f53d3cf9..53209d6ebd88 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch.Tests/CustomSearchTests.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch.Tests/CustomSearchTests.cs @@ -20,7 +20,7 @@ public void CustomSearch() HttpMockServer.Initialize(this.GetType().FullName, "CustomSearch"); ICustomSearchAPI client = new CustomSearchAPI(new ApiKeyServiceClientCredentials(SubscriptionKey), HttpMockServer.CreateInstance()); - var resp = client.CustomInstance.SearchAsync(query: "tom cruise").Result; + var resp = client.CustomInstance.SearchAsync(query: "tom cruise", customConfig: 0).Result; Assert.NotNull(resp); Assert.NotNull(resp.WebPages); diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch.Tests/SessionRecords/SearchSDK.Tests.CustomSearchTests/CustomSearch.json b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch.Tests/SessionRecords/SearchSDK.Tests.CustomSearchTests/CustomSearch.json index e6006cbe1381..2da49ad78a9b 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch.Tests/SessionRecords/SearchSDK.Tests.CustomSearchTests/CustomSearch.json +++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch.Tests/SessionRecords/SearchSDK.Tests.CustomSearchTests/CustomSearch.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "/bingcustomsearch/v7.0/search?mkt=en-us&q=tom%20cruise", + "RequestUri": "/bingcustomsearch/v7.0/search?customConfig=0&mkt=en-us&q=tom%20cruise", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/CustomInstance.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/CustomInstance.cs index b4238b44c75a..4ad88b63ec10 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/CustomInstance.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/CustomInstance.cs @@ -1,8 +1,4 @@ // -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -54,6 +50,9 @@ public CustomInstance(CustomSearchAPI client) /// The Custom Search API lets you send a search query to Bing and get back web /// pages found in your custom view of the web. /// + /// + /// The identifier for the custom search configuration + /// /// /// The user's search query term. The term may not be empty. The term may /// contain Bing Advanced Operators. For example, to limit results to a @@ -164,9 +163,6 @@ public CustomInstance(CustomSearchAPI client) /// should include this header and the X-MSEdge-ClientIP header, but at a /// minimum, you should include this header. /// - /// - /// The identifier for the custom search configuration - /// /// /// A 2-character country code of the country where the results come from. This /// API supports only the United States market. If you specify this query @@ -280,8 +276,12 @@ public CustomInstance(CustomSearchAPI client) /// /// A response object containing the response body and response headers. /// - public async Task> SearchWithHttpMessagesAsync(string query, string acceptLanguage = default(string), string userAgent = default(string), string clientId = default(string), string clientIp = default(string), string location = default(string), int? customConfig = default(int?), string countryCode = default(string), int? count = default(int?), string market = "en-us", int? offset = default(int?), string safeSearch = default(string), string setLang = default(string), bool? textDecorations = default(bool?), string textFormat = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> SearchWithHttpMessagesAsync(long customConfig, string query, string acceptLanguage = default(string), string userAgent = default(string), string clientId = default(string), string clientIp = default(string), string location = default(string), string countryCode = default(string), int? count = default(int?), string market = "en-us", int? offset = default(int?), string safeSearch = default(string), string setLang = default(string), bool? textDecorations = default(bool?), string textFormat = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { + if (customConfig < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "customConfig", 0); + } if (query == null) { throw new ValidationException(ValidationRules.CannotBeNull, "query"); @@ -317,10 +317,7 @@ public CustomInstance(CustomSearchAPI client) var _baseUrl = Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "search").ToString(); List _queryParameters = new List(); - if (customConfig != null) - { - _queryParameters.Add(string.Format("customConfig={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(customConfig, Client.SerializationSettings).Trim('"')))); - } + _queryParameters.Add(string.Format("customConfig={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(customConfig, Client.SerializationSettings).Trim('"')))); if (countryCode != null) { _queryParameters.Add(string.Format("cc={0}", System.Uri.EscapeDataString(countryCode))); @@ -431,14 +428,12 @@ public CustomInstance(CustomSearchAPI client) // Serialize Request string _requestContent = null; - // Set Credentials if (Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } - // Send Request if (_shouldTrace) { diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/CustomInstanceExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/CustomInstanceExtensions.cs index 624a44ff22ce..7933fdd41665 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/CustomInstanceExtensions.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/CustomInstanceExtensions.cs @@ -1,8 +1,4 @@ // -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -26,223 +22,9 @@ public static partial class CustomInstanceExtensions /// /// The operations group for this extension method. /// - /// - /// The user's search query term. The term may not be empty. The term may - /// contain Bing Advanced Operators. For example, to limit results to a - /// specific domain, use the site: operator. - /// - /// - /// A comma-delimited list of one or more languages to use for user interface - /// strings. The list is in decreasing order of preference. For additional - /// information, including expected format, see - /// [RFC2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). This - /// header and the setLang query parameter are mutually exclusive; do not - /// specify both. If you set this header, you must also specify the cc query - /// parameter. Bing will use the first supported language it finds from the - /// list, and combine that language with the cc parameter value to determine - /// the market to return results for. If the list does not include a supported - /// language, Bing will find the closest language and market that supports the - /// request, and may use an aggregated or default market for the results - /// instead of a specified one. You should use this header and the cc query - /// parameter only if you specify multiple languages; otherwise, you should use - /// the mkt and setLang query parameters. A user interface string is a string - /// that's used as a label in a user interface. There are very few user - /// interface strings in the JSON response objects. Any links in the response - /// objects to Bing.com properties will apply the specified language. - /// - /// - /// The user agent originating the request. Bing uses the user agent to provide - /// mobile users with an optimized experience. Although optional, you are - /// strongly encouraged to always specify this header. The user-agent should be - /// the same string that any commonly used browser would send. For information - /// about user agents, see [RFC - /// 2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). - /// - /// - /// Bing uses this header to provide users with consistent behavior across Bing - /// API calls. Bing often flights new features and improvements, and it uses - /// the client ID as a key for assigning traffic on different flights. If you - /// do not use the same client ID for a user across multiple requests, then - /// Bing may assign the user to multiple conflicting flights. Being assigned to - /// multiple conflicting flights can lead to an inconsistent user experience. - /// For example, if the second request has a different flight assignment than - /// the first, the experience may be unexpected. Also, Bing can use the client - /// ID to tailor web results to that client ID’s search history, providing a - /// richer experience for the user. Bing also uses this header to help improve - /// result rankings by analyzing the activity generated by a client ID. The - /// relevance improvements help with better quality of results delivered by - /// Bing APIs and in turn enables higher click-through rates for the API - /// consumer. IMPORTANT: Although optional, you should consider this header - /// required. Persisting the client ID across multiple requests for the same - /// end user and device combination enables 1) the API consumer to receive a - /// consistent user experience, and 2) higher click-through rates via better - /// quality of results from the Bing APIs. Each user that uses your application - /// on the device must have a unique, Bing generated client ID. If you do not - /// include this header in the request, Bing generates an ID and returns it in - /// the X-MSEdge-ClientID response header. The only time that you should NOT - /// include this header in a request is the first time the user uses your app - /// on that device. Use the client ID for each Bing API request that your app - /// makes for this user on the device. Persist the client ID. To persist the ID - /// in a browser app, use a persistent HTTP cookie to ensure the ID is used - /// across all sessions. Do not use a session cookie. For other apps such as - /// mobile apps, use the device's persistent storage to persist the ID. The - /// next time the user uses your app on that device, get the client ID that you - /// persisted. Bing responses may or may not include this header. If the - /// response includes this header, capture the client ID and use it for all - /// subsequent Bing requests for the user on that device. If you include the - /// X-MSEdge-ClientID, you must not include cookies in the request. - /// - /// - /// The IPv4 or IPv6 address of the client device. The IP address is used to - /// discover the user's location. Bing uses the location information to - /// determine safe search behavior. Although optional, you are encouraged to - /// always specify this header and the X-Search-Location header. Do not - /// obfuscate the address (for example, by changing the last octet to 0). - /// Obfuscating the address results in the location not being anywhere near the - /// device's actual location, which may result in Bing serving erroneous - /// results. - /// - /// - /// A semicolon-delimited list of key/value pairs that describe the client's - /// geographical location. Bing uses the location information to determine safe - /// search behavior and to return relevant local content. Specify the key/value - /// pair as <key>:<value>. The following are the keys that you use - /// to specify the user's location. lat (required): The latitude of the - /// client's location, in degrees. The latitude must be greater than or equal - /// to -90.0 and less than or equal to +90.0. Negative values indicate southern - /// latitudes and positive values indicate northern latitudes. long (required): - /// The longitude of the client's location, in degrees. The longitude must be - /// greater than or equal to -180.0 and less than or equal to +180.0. Negative - /// values indicate western longitudes and positive values indicate eastern - /// longitudes. re (required): The radius, in meters, which specifies the - /// horizontal accuracy of the coordinates. Pass the value returned by the - /// device's location service. Typical values might be 22m for GPS/Wi-Fi, 380m - /// for cell tower triangulation, and 18,000m for reverse IP lookup. ts - /// (optional): The UTC UNIX timestamp of when the client was at the location. - /// (The UNIX timestamp is the number of seconds since January 1, 1970.) head - /// (optional): The client's relative heading or direction of travel. Specify - /// the direction of travel as degrees from 0 through 360, counting clockwise - /// relative to true north. Specify this key only if the sp key is nonzero. sp - /// (optional): The horizontal velocity (speed), in meters per second, that the - /// client device is traveling. alt (optional): The altitude of the client - /// device, in meters. are (optional): The radius, in meters, that specifies - /// the vertical accuracy of the coordinates. Specify this key only if you - /// specify the alt key. Although many of the keys are optional, the more - /// information that you provide, the more accurate the location results are. - /// Although optional, you are encouraged to always specify the user's - /// geographical location. Providing the location is especially important if - /// the client's IP address does not accurately reflect the user's physical - /// location (for example, if the client uses VPN). For optimal results, you - /// should include this header and the X-MSEdge-ClientIP header, but at a - /// minimum, you should include this header. - /// /// /// The identifier for the custom search configuration /// - /// - /// A 2-character country code of the country where the results come from. This - /// API supports only the United States market. If you specify this query - /// parameter, it must be set to us. If you set this parameter, you must also - /// specify the Accept-Language header. Bing uses the first supported language - /// it finds from the languages list, and combine that language with the - /// country code that you specify to determine the market to return results - /// for. If the languages list does not include a supported language, Bing - /// finds the closest language and market that supports the request, or it may - /// use an aggregated or default market for the results instead of a specified - /// one. You should use this query parameter and the Accept-Language query - /// parameter only if you specify multiple languages; otherwise, you should use - /// the mkt and setLang query parameters. This parameter and the mkt query - /// parameter are mutually exclusive—do not specify both. - /// - /// - /// The number of search results to return in the response. The default is 10 - /// and the maximum value is 50. The actual number delivered may be less than - /// requested.Use this parameter along with the offset parameter to page - /// results.For example, if your user interface displays 10 search results per - /// page, set count to 10 and offset to 0 to get the first page of results. For - /// each subsequent page, increment offset by 10 (for example, 0, 10, 20). It - /// is possible for multiple pages to include some overlap in results. - /// - /// - /// The market where the results come from. Typically, mkt is the country where - /// the user is making the request from. However, it could be a different - /// country if the user is not located in a country where Bing delivers - /// results. The market must be in the form <language code>-<country - /// code>. For example, en-US. The string is case insensitive. If known, you - /// are encouraged to always specify the market. Specifying the market helps - /// Bing route the request and return an appropriate and optimal response. If - /// you specify a market that is not listed in Market Codes, Bing uses a best - /// fit market code based on an internal mapping that is subject to change. - /// This parameter and the cc query parameter are mutually exclusive—do not - /// specify both. - /// - /// - /// The zero-based offset that indicates the number of search results to skip - /// before returning results. The default is 0. The offset should be less than - /// (totalEstimatedMatches - count). Use this parameter along with the count - /// parameter to page results. For example, if your user interface displays 10 - /// search results per page, set count to 10 and offset to 0 to get the first - /// page of results. For each subsequent page, increment offset by 10 (for - /// example, 0, 10, 20). it is possible for multiple pages to include some - /// overlap in results. - /// - /// - /// A filter used to filter adult content. Off: Return webpages with adult - /// text, images, or videos. Moderate: Return webpages with adult text, but not - /// adult images or videos. Strict: Do not return webpages with adult text, - /// images, or videos. The default is Moderate. If the request comes from a - /// market that Bing's adult policy requires that safeSearch is set to Strict, - /// Bing ignores the safeSearch value and uses Strict. If you use the site: - /// query operator, there is the chance that the response may contain adult - /// content regardless of what the safeSearch query parameter is set to. Use - /// site: only if you are aware of the content on the site and your scenario - /// supports the possibility of adult content. Possible values include: 'Off', - /// 'Moderate', 'Strict' - /// - /// - /// The language to use for user interface strings. Specify the language using - /// the ISO 639-1 2-letter language code. For example, the language code for - /// English is EN. The default is EN (English). Although optional, you should - /// always specify the language. Typically, you set setLang to the same - /// language specified by mkt unless the user wants the user interface strings - /// displayed in a different language. This parameter and the Accept-Language - /// header are mutually exclusive; do not specify both. A user interface string - /// is a string that's used as a label in a user interface. There are few user - /// interface strings in the JSON response objects. Also, any links to Bing.com - /// properties in the response objects apply the specified language. - /// - /// - /// A Boolean value that determines whether display strings should contain - /// decoration markers such as hit highlighting characters. If true, the - /// strings may include markers. The default is false. To specify whether to - /// use Unicode characters or HTML tags as the markers, see the textFormat - /// query parameter. - /// - /// - /// The type of markers to use for text decorations (see the textDecorations - /// query parameter). Possible values are Raw—Use Unicode characters to mark - /// content that needs special formatting. The Unicode characters are in the - /// range E000 through E019. For example, Bing uses E000 and E001 to mark the - /// beginning and end of query terms for hit highlighting. HTML—Use HTML tags - /// to mark content that needs special formatting. For example, use <b> - /// tags to highlight query terms in display strings. The default is Raw. For - /// display strings that contain escapable HTML characters such as <, >, - /// and &, if textFormat is set to HTML, Bing escapes the characters as - /// appropriate (for example, < is escaped to &lt;). Possible values - /// include: 'Raw', 'Html' - /// - public static SearchResponse Search(this ICustomInstance operations, string query, string acceptLanguage = default(string), string userAgent = default(string), string clientId = default(string), string clientIp = default(string), string location = default(string), int? customConfig = default(int?), string countryCode = default(string), int? count = default(int?), string market = "en-us", int? offset = default(int?), string safeSearch = default(string), string setLang = default(string), bool? textDecorations = default(bool?), string textFormat = default(string)) - { - return operations.SearchAsync(query, acceptLanguage, userAgent, clientId, clientIp, location, customConfig, countryCode, count, market, offset, safeSearch, setLang, textDecorations, textFormat).GetAwaiter().GetResult(); - } - - /// - /// The Custom Search API lets you send a search query to Bing and get back web - /// pages found in your custom view of the web. - /// - /// - /// The operations group for this extension method. - /// /// /// The user's search query term. The term may not be empty. The term may /// contain Bing Advanced Operators. For example, to limit results to a @@ -353,9 +135,6 @@ public static partial class CustomInstanceExtensions /// should include this header and the X-MSEdge-ClientIP header, but at a /// minimum, you should include this header. /// - /// - /// The identifier for the custom search configuration - /// /// /// A 2-character country code of the country where the results come from. This /// API supports only the United States market. If you specify this query @@ -451,9 +230,9 @@ public static partial class CustomInstanceExtensions /// /// The cancellation token. /// - public static async Task SearchAsync(this ICustomInstance operations, string query, string acceptLanguage = default(string), string userAgent = default(string), string clientId = default(string), string clientIp = default(string), string location = default(string), int? customConfig = default(int?), string countryCode = default(string), int? count = default(int?), string market = "en-us", int? offset = default(int?), string safeSearch = default(string), string setLang = default(string), bool? textDecorations = default(bool?), string textFormat = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task SearchAsync(this ICustomInstance operations, long customConfig, string query, string acceptLanguage = default(string), string userAgent = default(string), string clientId = default(string), string clientIp = default(string), string location = default(string), string countryCode = default(string), int? count = default(int?), string market = "en-us", int? offset = default(int?), string safeSearch = default(string), string setLang = default(string), bool? textDecorations = default(bool?), string textFormat = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.SearchWithHttpMessagesAsync(query, acceptLanguage, userAgent, clientId, clientIp, location, customConfig, countryCode, count, market, offset, safeSearch, setLang, textDecorations, textFormat, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.SearchWithHttpMessagesAsync(customConfig, query, acceptLanguage, userAgent, clientId, clientIp, location, countryCode, count, market, offset, safeSearch, setLang, textDecorations, textFormat, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/CustomSearchAPI.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/CustomSearchAPI.cs index d0680eb12c1f..563825887b73 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/CustomSearchAPI.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/CustomSearchAPI.cs @@ -1,8 +1,4 @@ // -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -56,7 +52,7 @@ public partial class CustomSearchAPI : ServiceClient, ICustomSe /// /// Optional. The delegating handlers to add to the http client pipeline. /// - public CustomSearchAPI(params DelegatingHandler[] handlers) : base(handlers) + protected CustomSearchAPI(params DelegatingHandler[] handlers) : base(handlers) { Initialize(); } @@ -70,7 +66,7 @@ public CustomSearchAPI(params DelegatingHandler[] handlers) : base(handlers) /// /// Optional. The delegating handlers to add to the http client pipeline. /// - public CustomSearchAPI(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) + protected CustomSearchAPI(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) { Initialize(); } @@ -87,7 +83,7 @@ public CustomSearchAPI(HttpClientHandler rootHandler, params DelegatingHandler[] /// /// Thrown when a required parameter is null /// - public CustomSearchAPI(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) + protected CustomSearchAPI(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { @@ -97,7 +93,31 @@ public CustomSearchAPI(System.Uri baseUri, params DelegatingHandler[] handlers) } /// - /// Initializes a new instance of the WebSearchAPI class. + /// Initializes a new instance of the CustomSearchAPI class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + protected CustomSearchAPI(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + BaseUri = baseUri; + } + + /// + /// Initializes a new instance of the CustomSearchAPI class. /// /// /// Required. Subscription credentials which uniquely identify client subscription. @@ -121,12 +141,76 @@ public CustomSearchAPI(ServiceClientCredentials credentials, params DelegatingHa } } + /// + /// Initializes a new instance of the CustomSearchAPI class. + /// + /// + /// Required. Subscription credentials which uniquely identify client subscription. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public CustomSearchAPI(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + /// /// Initializes a new instance of the CustomSearchAPI class. /// /// /// Optional. The base URI of the service. /// + /// + /// Required. Subscription credentials which uniquely identify client subscription. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public CustomSearchAPI(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + BaseUri = baseUri; + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the CustomSearchAPI class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Required. Subscription credentials which uniquely identify client subscription. + /// /// /// Optional. The http client handler used to handle http transport. /// @@ -136,13 +220,22 @@ public CustomSearchAPI(ServiceClientCredentials credentials, params DelegatingHa /// /// Thrown when a required parameter is null /// - public CustomSearchAPI(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + public CustomSearchAPI(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { throw new System.ArgumentNullException("baseUri"); } + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } BaseUri = baseUri; + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } } /// diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/ICustomInstance.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/ICustomInstance.cs index 207a293c64ae..5be3ad79e05d 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/ICustomInstance.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/ICustomInstance.cs @@ -1,8 +1,4 @@ // -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -26,6 +22,9 @@ public partial interface ICustomInstance /// The Custom Search API lets you send a search query to Bing and get /// back web pages found in your custom view of the web. /// + /// + /// The identifier for the custom search configuration + /// /// /// The user's search query term. The term may not be empty. The term /// may contain Bing Advanced Operators. For example, to limit results @@ -147,9 +146,6 @@ public partial interface ICustomInstance /// this header and the X-MSEdge-ClientIP header, but at a minimum, you /// should include this header. /// - /// - /// The identifier for the custom search configuration - /// /// /// A 2-character country code of the country where the results come /// from. This API supports only the United States market. If you @@ -266,6 +262,6 @@ public partial interface ICustomInstance /// /// Thrown when a required parameter is null /// - Task> SearchWithHttpMessagesAsync(string query, string acceptLanguage = default(string), string userAgent = default(string), string clientId = default(string), string clientIp = default(string), string location = default(string), int? customConfig = default(int?), string countryCode = default(string), int? count = default(int?), string market = "en-us", int? offset = default(int?), string safeSearch = default(string), string setLang = default(string), bool? textDecorations = default(bool?), string textFormat = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> SearchWithHttpMessagesAsync(long customConfig, string query, string acceptLanguage = default(string), string userAgent = default(string), string clientId = default(string), string clientIp = default(string), string location = default(string), string countryCode = default(string), int? count = default(int?), string market = "en-us", int? offset = default(int?), string safeSearch = default(string), string setLang = default(string), bool? textDecorations = default(bool?), string textFormat = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/ICustomSearchAPI.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/ICustomSearchAPI.cs index 7b6750a0be12..4d1114fd09a2 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/ICustomSearchAPI.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/ICustomSearchAPI.cs @@ -1,8 +1,4 @@ // -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -10,6 +6,7 @@ namespace Microsoft.Azure.CognitiveServices.Search.CustomSearch { + using Microsoft.Rest; using Models; using Newtonsoft.Json; @@ -34,6 +31,12 @@ public partial interface ICustomSearchAPI : System.IDisposable /// JsonSerializerSettings DeserializationSettings { get; } + /// + /// Subscription credentials which uniquely identify client + /// subscription. + /// + ServiceClientCredentials Credentials { get; } + /// /// Gets the ICustomInstance. diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/Answer.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/Answer.cs index 17142c7c1d8b..09dfbbc871f8 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/Answer.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/Answer.cs @@ -1,8 +1,4 @@ // -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/CreativeWork.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/CreativeWork.cs index eaaff6373ed2..ec5089a4cdf7 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/CreativeWork.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/CreativeWork.cs @@ -1,8 +1,4 @@ // -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/Error.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/Error.cs index a0866d7488d7..3be86ed966fe 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/Error.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/Error.cs @@ -1,8 +1,4 @@ // -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/ErrorCode.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/ErrorCode.cs index 71c1e8d4f2d5..4eae29917ad8 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/ErrorCode.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/ErrorCode.cs @@ -1,8 +1,4 @@ // -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/ErrorResponse.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/ErrorResponse.cs index 5a6e024b0fd7..8116575f6357 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/ErrorResponse.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/ErrorResponse.cs @@ -1,8 +1,4 @@ // -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/ErrorResponseException.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/ErrorResponseException.cs index de98413588a5..6dcb82b6efc5 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/ErrorResponseException.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/ErrorResponseException.cs @@ -1,8 +1,4 @@ // -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/ErrorSubCode.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/ErrorSubCode.cs index 312ee2166874..0e0a6d9450c9 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/ErrorSubCode.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/ErrorSubCode.cs @@ -1,8 +1,4 @@ // -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/Identifiable.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/Identifiable.cs index 15e0ce9c18ae..d060ba384ba7 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/Identifiable.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/Identifiable.cs @@ -1,8 +1,4 @@ // -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/Query.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/Query.cs index 8d6e821fcded..5be2f743d9cb 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/Query.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/Query.cs @@ -1,8 +1,4 @@ // -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/QueryContext.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/QueryContext.cs index 1050cc552dcc..9d2852db32c8 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/QueryContext.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/QueryContext.cs @@ -1,8 +1,4 @@ // -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/Response.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/Response.cs index beea7818bbad..67aa15d104d1 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/Response.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/Response.cs @@ -1,8 +1,4 @@ // -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/ResponseBase.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/ResponseBase.cs index bd651fd3b7ba..b4b2109368f8 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/ResponseBase.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/ResponseBase.cs @@ -1,8 +1,4 @@ // -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/SafeSearch.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/SafeSearch.cs index ebbcb44a7fc9..994ad033adbc 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/SafeSearch.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/SafeSearch.cs @@ -1,8 +1,4 @@ // -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/SearchResponse.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/SearchResponse.cs index 605e05a55cbd..bb2376dd86ac 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/SearchResponse.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/SearchResponse.cs @@ -1,8 +1,4 @@ // -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/SearchResultsAnswer.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/SearchResultsAnswer.cs index 94c90c441413..5f7e620c2cd4 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/SearchResultsAnswer.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/SearchResultsAnswer.cs @@ -1,8 +1,4 @@ // -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/TextFormat.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/TextFormat.cs index 696033fdee65..1fc343097f36 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/TextFormat.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/TextFormat.cs @@ -1,8 +1,4 @@ // -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/Thing.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/Thing.cs index 347e26c4a153..349611e9b83a 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/Thing.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/Thing.cs @@ -1,8 +1,4 @@ // -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/WebMetaTag.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/WebMetaTag.cs index a91aaa3cd17d..db1c42846dae 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/WebMetaTag.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/WebMetaTag.cs @@ -1,8 +1,4 @@ // -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/WebPage.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/WebPage.cs index dc1b18817bd6..cf6b45053ec8 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/WebPage.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/WebPage.cs @@ -1,8 +1,4 @@ // -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/WebWebAnswer.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/WebWebAnswer.cs index fa2a95a15ad9..7567706df918 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/WebWebAnswer.cs +++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/Models/WebWebAnswer.cs @@ -1,8 +1,4 @@ // -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/SdkInfo_CustomSearchAPI.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/SdkInfo_CustomSearchAPI.cs new file mode 100644 index 000000000000..1b3da189f378 --- /dev/null +++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Generated/CustomSearch/SdkInfo_CustomSearchAPI.cs @@ -0,0 +1,18 @@ + +using System; +using System.Collections.Generic; +using System.Linq; + +internal static partial class SdkInfo +{ + public static IEnumerable> ApiInfo_CustomSearchAPI + { + get + { + return new Tuple[] + { + new Tuple("CustomSearchAPI", "CustomInstance", "1.0"), + }.AsEnumerable(); + } + } +} diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Microsoft.Azure.CognitiveServices.Search.CustomSearch.csproj b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Microsoft.Azure.CognitiveServices.Search.CustomSearch.csproj index 275c299fe4d0..480e51e45344 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Microsoft.Azure.CognitiveServices.Search.CustomSearch.csproj +++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Microsoft.Azure.CognitiveServices.Search.CustomSearch.csproj @@ -6,7 +6,7 @@ Microsoft.Azure.CognitiveServices.Search.CustomSearch This client library provides access to the Microsoft Cognitive Services Custom Search API. - 1.1.0-preview + 1.2.0-preview Microsoft.Azure.CognitiveServices.Search.CustomSearch Microsoft Cognitive Services;Cognitive Services;Cognitive Services SDK;CustomSearch API;BingCustomSearch API;REST HTTPclient;CustomSearchSDK;BingCustomSearchSDK;netcore451511 This is a preview release of the Cognitive Services Search SDK. Included with this release is support for Custom Search API. @@ -18,4 +18,4 @@ - \ No newline at end of file + diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/generate.cmd b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/generate.cmd index 3dcb95c2e644..6f9fd5928e8e 100644 --- a/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/generate.cmd +++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/generate.cmd @@ -4,4 +4,4 @@ :: @echo off -call %~dp0..\..\..\..\..\..\tools\generate.cmd cognitiveservices/data-plane/CustomSearch %* \ No newline at end of file +call %~dp0..\..\..\..\..\..\..\tools\generate.cmd cognitiveservices/data-plane/CustomSearch %* \ No newline at end of file diff --git a/src/SDKs/_metadata/cognitiveservices_data-plane_CustomSearch.txt b/src/SDKs/_metadata/cognitiveservices_data-plane_CustomSearch.txt new file mode 100644 index 000000000000..61fccbdbae90 --- /dev/null +++ b/src/SDKs/_metadata/cognitiveservices_data-plane_CustomSearch.txt @@ -0,0 +1,11 @@ +2018-02-08 09:29:49 UTC + +1) azure-rest-api-specs repository information +GitHub user: Azure +Branch: master +Commit: d39e79a6610a5be360b729fcb267aa9d56dafb61 + +2) AutoRest information +Requested version: latest +Bootstrapper version: C:\Users\a-ahosma\AppData\Roaming\npm `-- autorest@2.0.4245 +Latest installed version: