Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,46 @@ public partial interface IImages
/// this header and the X-MSEdge-ClientIP header, but at a minimum, you
/// should include this header.
/// </param>
/// <param name='market'>
/// 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 &lt;language code&gt;-&lt;country
/// code&gt;. For example, en-US. The string is case insensitive. For a list of
/// possible market values, see [Market
/// Codes](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-visual-search/supported-countries-markets).
/// NOTE: 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](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-visual-search/supported-countries-markets),
/// Bing uses a best fit market code based on an internal mapping that is
/// subject to change.
/// </param>
/// <param name='safeSearch'>
/// Filter the image results in actions with type 'VisualSearch' for adult
/// content. The following are the possible filter values. Off: May return
/// images with adult content. Moderate: Do not return images with adult
/// content. Strict: Do not return images with adult content. 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: filter in the knowledge
/// request, 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'
/// </param>
/// <param name='setLang'>
/// 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. 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.
/// </param>
/// <param name='knowledgeRequest'>
/// A JSON object containing information about the image. The image and
/// imageInsightsToken fields are mutually exclusive – the body of the
Expand All @@ -197,6 +237,6 @@ public partial interface IImages
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<HttpOperationResponse<ImageKnowledge>> VisualSearchMethodWithHttpMessagesAsync(string acceptLanguage = default(string), string contentType = default(string), string userAgent = default(string), string clientId = default(string), string clientIp = default(string), string location = default(string), VisualSearchRequest knowledgeRequest = default(VisualSearchRequest), Stream image = default(Stream), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<HttpOperationResponse<ImageKnowledge>> VisualSearchMethodWithHttpMessagesAsync(string acceptLanguage = default(string), string contentType = default(string), string userAgent = default(string), string clientId = default(string), string clientIp = default(string), string location = default(string), string market = default(string), string safeSearch = default(string), string setLang = default(string), VisualSearchRequest knowledgeRequest = default(VisualSearchRequest), Stream image = default(Stream), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,46 @@ public partial class Images
/// should include this header and the X-MSEdge-ClientIP header, but at a
/// minimum, you should include this header.
/// </param>
/// <param name='market'>
/// 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 &lt;language code&gt;-&lt;country
/// code&gt;. For example, en-US. The string is case insensitive. For a list of
/// possible market values, see [Market
/// Codes](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-visual-search/supported-countries-markets).
/// NOTE: 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](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-visual-search/supported-countries-markets),
/// Bing uses a best fit market code based on an internal mapping that is
/// subject to change.
/// </param>
/// <param name='safeSearch'>
/// Filter the image results in actions with type 'VisualSearch' for adult
/// content. The following are the possible filter values. Off: May return
/// images with adult content. Moderate: Do not return images with adult
/// content. Strict: Do not return images with adult content. 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: filter in the knowledge
/// request, 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'
/// </param>
/// <param name='setLang'>
/// 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. 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.
/// </param>
/// <param name='knowledgeRequest'>
/// A JSON object containing information about the image. The image and
/// imageInsightsToken fields are mutually exclusive – the body of the request
Expand All @@ -183,10 +223,9 @@ public partial class Images
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<HttpOperationResponse<ImageKnowledge>> VisualSearchMethodWithHttpMessagesAsync(string acceptLanguage = default(string), string contentType = default(string), string userAgent = default(string), string clientId = default(string), string clientIp = default(string), string location = default(string), VisualSearchRequest knowledgeRequest = default(VisualSearchRequest), Stream image = default(Stream), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
public async Task<HttpOperationResponse<ImageKnowledge>> VisualSearchMethodWithHttpMessagesAsync(string acceptLanguage = default(string), string contentType = default(string), string userAgent = default(string), string clientId = default(string), string clientIp = default(string), string location = default(string), string market = default(string), string safeSearch = default(string), string setLang = default(string), VisualSearchRequest knowledgeRequest = default(VisualSearchRequest), Stream image = default(Stream), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
return await VisualSearchMethodWithHttpMessagesAsync(acceptLanguage, contentType, userAgent, clientId, clientIp, location, JsonConvert.SerializeObject(knowledgeRequest), image, customHeaders, cancellationToken);
return await VisualSearchMethodWithHttpMessagesAsync(acceptLanguage, contentType, userAgent, clientId, clientIp, location, market, safeSearch, setLang, JsonConvert.SerializeObject(knowledgeRequest), image, customHeaders, cancellationToken);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,46 @@ public static partial class ImagesExtensions
/// should include this header and the X-MSEdge-ClientIP header, but at a
/// minimum, you should include this header.
/// </param>
/// <param name='market'>
/// 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 &lt;language code&gt;-&lt;country
/// code&gt;. For example, en-US. The string is case insensitive. For a list of
/// possible market values, see [Market
/// Codes](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-visual-search/supported-countries-markets).
/// NOTE: 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](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-visual-search/supported-countries-markets),
/// Bing uses a best fit market code based on an internal mapping that is
/// subject to change.
/// </param>
/// <param name='safeSearch'>
/// Filter the image results in actions with type 'VisualSearch' for adult
/// content. The following are the possible filter values. Off: May return
/// images with adult content. Moderate: Do not return images with adult
/// content. Strict: Do not return images with adult content. 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: filter in the knowledge
/// request, 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'
/// </param>
/// <param name='setLang'>
/// 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. 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.
/// </param>
/// <param name='knowledgeRequest'>
/// A JSON object containing information about the image. The image and
/// imageInsightsToken fields are mutually exclusive – the body of the request
Expand All @@ -171,9 +211,9 @@ public static partial class ImagesExtensions
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<ImageKnowledge> VisualSearchMethodAsync(this IImages operations, string acceptLanguage = default(string), string contentType = default(string), string userAgent = default(string), string clientId = default(string), string clientIp = default(string), string location = default(string), VisualSearchRequest knowledgeRequest = default(VisualSearchRequest), Stream image = default(Stream), CancellationToken cancellationToken = default(CancellationToken))
public static async Task<ImageKnowledge> VisualSearchMethodAsync(this IImages operations, string acceptLanguage = default(string), string contentType = default(string), string userAgent = default(string), string clientId = default(string), string clientIp = default(string), string location = default(string), string market = default(string), string safeSearch = default(string), string setLang = default(string), VisualSearchRequest knowledgeRequest = default(VisualSearchRequest), Stream image = default(Stream), CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.VisualSearchMethodWithHttpMessagesAsync(acceptLanguage, contentType, userAgent, clientId, clientIp, location, knowledgeRequest, image, null, cancellationToken).ConfigureAwait(false))
using (var _result = await operations.VisualSearchMethodWithHttpMessagesAsync(acceptLanguage, contentType, userAgent, clientId, clientIp, location, market, safeSearch, setLang, knowledgeRequest, image, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
Expand Down
Loading