diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Customizations/IImages.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Customizations/IImages.cs
index d83e4582e2ff..791386c1fae9 100644
--- a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Customizations/IImages.cs
+++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Customizations/IImages.cs
@@ -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.
///
+ ///
+ /// 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. 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.
+ ///
+ ///
+ /// 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'
+ ///
+ ///
+ /// 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.
+ ///
///
/// A JSON object containing information about the image. The image and
/// imageInsightsToken fields are mutually exclusive – the body of the
@@ -197,6 +237,6 @@ public partial interface IImages
///
/// Thrown when a required parameter is null
///
- Task> 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> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> 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> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Customizations/Images.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Customizations/Images.cs
index 605965c8201c..245db9ff820b 100644
--- a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Customizations/Images.cs
+++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Customizations/Images.cs
@@ -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.
///
+ ///
+ /// 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. 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.
+ ///
+ ///
+ /// 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'
+ ///
+ ///
+ /// 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.
+ ///
///
/// A JSON object containing information about the image. The image and
/// imageInsightsToken fields are mutually exclusive – the body of the request
@@ -183,10 +223,9 @@ public partial class Images
///
/// A response object containing the response body and response headers.
///
- public async Task> 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> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> 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> 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);
}
-
}
}
diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Customizations/ImagesExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Customizations/ImagesExtensions.cs
index 22c90110272f..e1caffc8696e 100644
--- a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Customizations/ImagesExtensions.cs
+++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Customizations/ImagesExtensions.cs
@@ -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.
///
+ ///
+ /// 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. 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.
+ ///
+ ///
+ /// 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'
+ ///
+ ///
+ /// 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.
+ ///
///
/// A JSON object containing information about the image. The image and
/// imageInsightsToken fields are mutually exclusive – the body of the request
@@ -171,9 +211,9 @@ public static partial class ImagesExtensions
///
/// The cancellation token.
///
- public static async Task 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 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;
}
diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/IImages.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/IImages.cs
index 3c06edee4e2e..def499af2934 100644
--- a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/IImages.cs
+++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/IImages.cs
@@ -168,6 +168,50 @@ public partial interface IImages
/// this header and the X-MSEdge-ClientIP header, but at a minimum, you
/// should include this header.
///
+ ///
+ /// 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. 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.
+ ///
+ ///
+ /// 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'
+ ///
+ ///
+ /// 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.
+ ///
///
/// The form data is a JSON object that identifies the image using an
/// insights token or URL to the image. The object may also include an
@@ -180,13 +224,12 @@ public partial interface IImages
///
///
/// The form data is an image binary. The Content-Disposition header's
- /// filename parameter must be set to "image". You must specify an
- /// image binary if you do not use knowledgeRequest form data to
- /// specify the image; you may not use both forms to specify an image.
- /// You may specify knowledgeRequest form data and image form data in
- /// the same request only if knowledgeRequest form data specifies the
- /// cropArea field only (it must not include an insights token or
- /// URL).
+ /// name parameter must be set to "image". You must specify an image
+ /// binary if you do not use knowledgeRequest form data to specify the
+ /// image; you may not use both forms to specify an image. You may
+ /// specify knowledgeRequest form data and image form data in the same
+ /// request only if knowledgeRequest form data specifies the cropArea
+ /// field only (it must not include an insights token or URL).
///
///
/// The headers that will be added to request.
@@ -203,6 +246,6 @@ public partial interface IImages
///
/// Thrown when a required parameter is null
///
- Task> 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 knowledgeRequest = default(string), Stream image = default(Stream), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> 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), string knowledgeRequest = default(string), Stream image = default(Stream), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Images.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Images.cs
index 711027650c39..d6dd0690fe95 100644
--- a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Images.cs
+++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Images.cs
@@ -185,6 +185,46 @@ public Images(VisualSearchAPI client)
/// should include this header and the X-MSEdge-ClientIP header, but at a
/// minimum, you should include this header.
///
+ ///
+ /// 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. 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.
+ ///
+ ///
+ /// 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'
+ ///
+ ///
+ /// 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.
+ ///
///
/// The form data is a JSON object that identifies the image using an insights
/// token or URL to the image. The object may also include an optional crop
@@ -195,7 +235,7 @@ public Images(VisualSearchAPI client)
/// include an insights token or URL).
///
///
- /// The form data is an image binary. The Content-Disposition header's filename
+ /// The form data is an image binary. The Content-Disposition header's name
/// parameter must be set to "image". You must specify an image binary if you
/// do not use knowledgeRequest form data to specify the image; you may not use
/// both forms to specify an image. You may specify knowledgeRequest form data
@@ -218,7 +258,7 @@ public Images(VisualSearchAPI client)
///
/// A response object containing the response body and response headers.
///
- public async Task> 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 knowledgeRequest = default(string), Stream image = default(Stream), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> 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), string knowledgeRequest = default(string), Stream image = default(Stream), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
string xBingApisSDK = "true";
// Tracing
@@ -235,6 +275,9 @@ public Images(VisualSearchAPI client)
tracingParameters.Add("clientId", clientId);
tracingParameters.Add("clientIp", clientIp);
tracingParameters.Add("location", location);
+ tracingParameters.Add("market", market);
+ tracingParameters.Add("safeSearch", safeSearch);
+ tracingParameters.Add("setLang", setLang);
tracingParameters.Add("knowledgeRequest", knowledgeRequest);
tracingParameters.Add("image", image);
tracingParameters.Add("cancellationToken", cancellationToken);
@@ -243,6 +286,23 @@ public Images(VisualSearchAPI client)
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "images/visualsearch").ToString();
+ List _queryParameters = new List();
+ if (market != null)
+ {
+ _queryParameters.Add(string.Format("mkt={0}", System.Uri.EscapeDataString(market)));
+ }
+ if (safeSearch != null)
+ {
+ _queryParameters.Add(string.Format("safeSearch={0}", System.Uri.EscapeDataString(safeSearch)));
+ }
+ if (setLang != null)
+ {
+ _queryParameters.Add(string.Format("setLang={0}", System.Uri.EscapeDataString(setLang)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += "?" + string.Join("&", _queryParameters);
+ }
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
@@ -323,14 +383,22 @@ public Images(VisualSearchAPI client)
{
StreamContent _image = new StreamContent(image);
_image.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");
- FileStream _imageAsFileStream = image as FileStream;
- if (_imageAsFileStream != null)
+ ContentDispositionHeaderValue _contentDispositionHeaderValue = new ContentDispositionHeaderValue("form-data");
+ _contentDispositionHeaderValue.Name = "image";
+ // get filename from stream if it's a file otherwise, just use 'unknown'
+ var _fileStream = image as FileStream;
+ var _fileName = (_fileStream != null ? _fileStream.Name : null) ?? "unknown";
+ if(System.Linq.Enumerable.Any(_fileName, c => c > 127) )
+ {
+ // non ASCII chars detected, need UTF encoding:
+ _contentDispositionHeaderValue.FileNameStar = _fileName;
+ }
+ else
{
- ContentDispositionHeaderValue _contentDispositionHeaderValue = new ContentDispositionHeaderValue("form-data");
- _contentDispositionHeaderValue.Name = "image";
- _contentDispositionHeaderValue.FileName = "image";
- _image.Headers.ContentDisposition = _contentDispositionHeaderValue;
+ // ASCII only
+ _contentDispositionHeaderValue.FileName = _fileName;
}
+ _image.Headers.ContentDisposition = _contentDispositionHeaderValue;
_multiPartContent.Add(_image, "image");
}
_httpRequest.Content = _multiPartContent;
diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/ImagesExtensions.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/ImagesExtensions.cs
index 1264aea4fc04..4ad95f22e8d9 100644
--- a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/ImagesExtensions.cs
+++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/ImagesExtensions.cs
@@ -157,6 +157,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.
///
+ ///
+ /// 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. 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.
+ ///
+ ///
+ /// 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'
+ ///
+ ///
+ /// 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.
+ ///
///
/// The form data is a JSON object that identifies the image using an insights
/// token or URL to the image. The object may also include an optional crop
@@ -167,7 +207,7 @@ public static partial class ImagesExtensions
/// include an insights token or URL).
///
///
- /// The form data is an image binary. The Content-Disposition header's filename
+ /// The form data is an image binary. The Content-Disposition header's name
/// parameter must be set to "image". You must specify an image binary if you
/// do not use knowledgeRequest form data to specify the image; you may not use
/// both forms to specify an image. You may specify knowledgeRequest form data
@@ -178,9 +218,9 @@ public static partial class ImagesExtensions
///
/// The cancellation token.
///
- public static async Task 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 knowledgeRequest = default(string), Stream image = default(Stream), CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task 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), string knowledgeRequest = default(string), 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;
}
diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/Action.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/Action.cs
index b6cfc7b63771..86422f4f54ad 100644
--- a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/Action.cs
+++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/Action.cs
@@ -11,6 +11,9 @@ namespace Microsoft.Azure.CognitiveServices.Search.VisualSearch.Models
using System.Collections.Generic;
using System.Linq;
+ ///
+ /// Defines an action.
+ ///
public partial class Action : CreativeWork
{
///
diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/Filters.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/Filters.cs
index edc2524c30b4..e97e8cb25314 100644
--- a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/Filters.cs
+++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/Filters.cs
@@ -40,11 +40,11 @@ public Filters()
partial void CustomInit();
///
- /// Gets the URL of the site to return similar images and similar
- /// products from. (e.g., "www.bing.com", "bing.com").
+ /// Gets or sets the URL of the site to return similar images and
+ /// similar products from. (e.g., "www.bing.com", "bing.com").
///
[JsonProperty(PropertyName = "site")]
- public string Site { get; private set; }
+ public string Site { get; set; }
}
}
diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageAction.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageAction.cs
index f9c9162d9f9d..eca2702737cf 100644
--- a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageAction.cs
+++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageAction.cs
@@ -11,6 +11,9 @@ namespace Microsoft.Azure.CognitiveServices.Search.VisualSearch.Models
using System.Collections.Generic;
using System.Linq;
+ ///
+ /// Defines an image action.
+ ///
public partial class ImageAction : Action
{
///
diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageEntityAction.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageEntityAction.cs
index 67bbf5a058c8..50c98af9f80e 100644
--- a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageEntityAction.cs
+++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageEntityAction.cs
@@ -6,11 +6,13 @@
namespace Microsoft.Azure.CognitiveServices.Search.VisualSearch.Models
{
- using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
+ ///
+ /// Defines an entity action.
+ ///
public partial class ImageEntityAction : ImageAction
{
///
@@ -54,11 +56,9 @@ public ImageEntityAction()
/// serviceUrl might return JSON along with an image URL.
/// A string representing the type of
/// action.
- /// Information about the entity.
- public ImageEntityAction(string id = default(string), string readLink = default(string), string webSearchUrl = default(string), string name = default(string), string url = default(string), ImageObject image = default(ImageObject), string description = default(string), string alternateName = default(string), string bingId = default(string), string thumbnailUrl = default(string), IList provider = default(IList), string datePublished = default(string), string text = default(string), IList result = default(IList), string displayName = default(string), bool? isTopAction = default(bool?), string serviceUrl = default(string), string actionType = default(string), Thing data = default(Thing))
+ public ImageEntityAction(string id = default(string), string readLink = default(string), string webSearchUrl = default(string), string name = default(string), string url = default(string), ImageObject image = default(ImageObject), string description = default(string), string alternateName = default(string), string bingId = default(string), string thumbnailUrl = default(string), IList provider = default(IList), string datePublished = default(string), string text = default(string), IList result = default(IList), string displayName = default(string), bool? isTopAction = default(bool?), string serviceUrl = default(string), string actionType = default(string))
: base(id, readLink, webSearchUrl, name, url, image, description, alternateName, bingId, thumbnailUrl, provider, datePublished, text, result, displayName, isTopAction, serviceUrl, actionType)
{
- Data = data;
CustomInit();
}
@@ -67,11 +67,5 @@ public ImageEntityAction()
///
partial void CustomInit();
- ///
- /// Gets information about the entity.
- ///
- [JsonProperty(PropertyName = "data")]
- public Thing Data { get; private set; }
-
}
}
diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageInfo.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageInfo.cs
index 74a3ad385575..2960daefd6eb 100644
--- a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageInfo.cs
+++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageInfo.cs
@@ -60,9 +60,9 @@ public ImageInfo()
partial void CustomInit();
///
- /// Gets an image insights token. To get the insights token, call one
- /// of the Image Search APIs (for example, /images/search). In the
- /// search results, the
+ /// Gets or sets an image insights token. To get the insights token,
+ /// call one of the Image Search APIs (for example, /images/search). In
+ /// the search results, the
/// [Image](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#image)
/// object's
/// [imageInsightsToken](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#image-imageinsightstoken)
@@ -71,25 +71,26 @@ public ImageInfo()
/// token if the request includes the image form data.
///
[JsonProperty(PropertyName = "imageInsightsToken")]
- public string ImageInsightsToken { get; private set; }
+ public string ImageInsightsToken { get; set; }
///
- /// Gets the URL of the input image. The imageInsightsToken and url
- /// fields are mutually exclusive; do not specify both. Do not specify
- /// the URL if the request includes the image form data.
+ /// Gets or sets the URL of the input image. The imageInsightsToken and
+ /// url fields are mutually exclusive; do not specify both. Do not
+ /// specify the URL if the request includes the image form data.
///
[JsonProperty(PropertyName = "url")]
- public string Url { get; private set; }
+ public string Url { get; set; }
///
- /// Gets a JSON object consisting of coordinates specifying the four
- /// corners of a cropped rectangle within the input image. Use the crop
- /// area to identify the region of interest in the image. You can apply
- /// the crop area to the images specified using the imageInsightsToken
- /// or url fields, or an image binary specified in an image form data.
+ /// Gets or sets a JSON object consisting of coordinates specifying the
+ /// four corners of a cropped rectangle within the input image. Use the
+ /// crop area to identify the region of interest in the image. You can
+ /// apply the crop area to the images specified using the
+ /// imageInsightsToken or url fields, or an image binary specified in
+ /// an image form data.
///
[JsonProperty(PropertyName = "cropArea")]
- public CropArea CropArea { get; private set; }
+ public CropArea CropArea { get; set; }
///
/// Validate the object.
diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageKnowledge.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageKnowledge.cs
index fa636b43604d..b94c70913f71 100644
--- a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageKnowledge.cs
+++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageKnowledge.cs
@@ -11,6 +11,9 @@ namespace Microsoft.Azure.CognitiveServices.Search.VisualSearch.Models
using System.Collections.Generic;
using System.Linq;
+ ///
+ /// Defines a visual search API response.
+ ///
public partial class ImageKnowledge : Response
{
///
diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageModuleAction.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageModuleAction.cs
index e8a6db781f93..b4d580d61c4f 100644
--- a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageModuleAction.cs
+++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageModuleAction.cs
@@ -11,6 +11,9 @@ namespace Microsoft.Azure.CognitiveServices.Search.VisualSearch.Models
using System.Collections.Generic;
using System.Linq;
+ ///
+ /// Defines an image list action.
+ ///
public partial class ImageModuleAction : ImageAction
{
///
diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageRecipesAction.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageRecipesAction.cs
index 05969a816563..26afd4487294 100644
--- a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageRecipesAction.cs
+++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageRecipesAction.cs
@@ -11,6 +11,9 @@ namespace Microsoft.Azure.CognitiveServices.Search.VisualSearch.Models
using System.Collections.Generic;
using System.Linq;
+ ///
+ /// Defines an recipe action.
+ ///
public partial class ImageRecipesAction : ImageAction
{
///
diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageRelatedSearchesAction.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageRelatedSearchesAction.cs
index 5f1fbd1a9c7d..50d63f2e405f 100644
--- a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageRelatedSearchesAction.cs
+++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageRelatedSearchesAction.cs
@@ -11,6 +11,9 @@ namespace Microsoft.Azure.CognitiveServices.Search.VisualSearch.Models
using System.Collections.Generic;
using System.Linq;
+ ///
+ /// Defines an related search action.
+ ///
public partial class ImageRelatedSearchesAction : ImageAction
{
///
diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageShoppingSourcesAction.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageShoppingSourcesAction.cs
index f511ee423b07..5d293cf70b26 100644
--- a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageShoppingSourcesAction.cs
+++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageShoppingSourcesAction.cs
@@ -11,6 +11,9 @@ namespace Microsoft.Azure.CognitiveServices.Search.VisualSearch.Models
using System.Collections.Generic;
using System.Linq;
+ ///
+ /// Defines a shopping sources action.
+ ///
public partial class ImageShoppingSourcesAction : ImageAction
{
///
diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageTag.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageTag.cs
index 6225ff57ff87..034b35a91690 100644
--- a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageTag.cs
+++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageTag.cs
@@ -11,6 +11,9 @@ namespace Microsoft.Azure.CognitiveServices.Search.VisualSearch.Models
using System.Collections.Generic;
using System.Linq;
+ ///
+ /// A visual search tag.
+ ///
public partial class ImageTag : Thing
{
///
diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageTagRegion.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageTagRegion.cs
index a5e5c5de6d69..5dfe4a282d32 100644
--- a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageTagRegion.cs
+++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/ImageTagRegion.cs
@@ -10,6 +10,9 @@ namespace Microsoft.Azure.CognitiveServices.Search.VisualSearch.Models
using Newtonsoft.Json;
using System.Linq;
+ ///
+ /// Defines an image region relevant to the ImageTag.
+ ///
public partial class ImageTagRegion
{
///
diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/KnowledgeRequest.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/KnowledgeRequest.cs
index 89b511130d7c..4983a42892d9 100644
--- a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/KnowledgeRequest.cs
+++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/KnowledgeRequest.cs
@@ -40,11 +40,11 @@ public KnowledgeRequest()
partial void CustomInit();
///
- /// Gets a key-value object consisting of filters that may be specified
- /// to limit the results returned by the API.
+ /// Gets or sets a key-value object consisting of filters that may be
+ /// specified to limit the results returned by the API.
///
[JsonProperty(PropertyName = "filters")]
- public Filters Filters { get; private set; }
+ public Filters Filters { get; set; }
}
}
diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/Point2D.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/Point2D.cs
index 430d4442281c..28cb93890909 100644
--- a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/Point2D.cs
+++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/Point2D.cs
@@ -9,6 +9,9 @@ namespace Microsoft.Azure.CognitiveServices.Search.VisualSearch.Models
using Newtonsoft.Json;
using System.Linq;
+ ///
+ /// Defines a 2D point with X and Y coordinates.
+ ///
public partial class Point2D : StructuredValue
{
///
diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/SafeSearch.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/SafeSearch.cs
new file mode 100644
index 000000000000..aab59b551ec2
--- /dev/null
+++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/SafeSearch.cs
@@ -0,0 +1,19 @@
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.CognitiveServices.Search.VisualSearch.Models
+{
+
+ ///
+ /// Defines values for SafeSearch.
+ ///
+ public static class SafeSearch
+ {
+ public const string Off = "Off";
+ public const string Moderate = "Moderate";
+ public const string Strict = "Strict";
+ }
+}
diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/VisualSearchRequest.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/VisualSearchRequest.cs
index 385766adf934..90b6ae0c96aa 100644
--- a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/VisualSearchRequest.cs
+++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/Models/VisualSearchRequest.cs
@@ -43,17 +43,18 @@ public VisualSearchRequest()
partial void CustomInit();
///
- /// Gets a JSON object that identities the image to get insights of.
+ /// Gets or sets a JSON object that identities the image to get
+ /// insights of.
///
[JsonProperty(PropertyName = "imageInfo")]
- public ImageInfo ImageInfo { get; private set; }
+ public ImageInfo ImageInfo { get; set; }
///
- /// Gets a JSON object containing information about the request, such
- /// as filters, or a description.
+ /// Gets or sets a JSON object containing information about the
+ /// request, such as filters, or a description.
///
[JsonProperty(PropertyName = "knowledgeRequest")]
- public KnowledgeRequest KnowledgeRequest { get; private set; }
+ public KnowledgeRequest KnowledgeRequest { get; set; }
///
/// Validate the object.
diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/SdkInfo_VisualSearchAPI.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/SdkInfo_VisualSearchAPI.cs
index c9ca68516e8b..1ff9565de794 100644
--- a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/SdkInfo_VisualSearchAPI.cs
+++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/SdkInfo_VisualSearchAPI.cs
@@ -1,18 +1,38 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
-internal static partial class SdkInfo
+namespace Microsoft.Azure.CognitiveServices.Search.VisualSearch
{
- public static IEnumerable> ApiInfo_VisualSearchAPI
- {
- get
- {
- return new Tuple[]
- {
+ using System;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ internal static partial class SdkInfo
+ {
+ public static IEnumerable> ApiInfo_VisualSearchAPI
+ {
+ get
+ {
+ return new Tuple[]
+ {
new Tuple("VisualSearchAPI", "Images", "1.0"),
- }.AsEnumerable();
- }
- }
+ }.AsEnumerable();
+ }
+ }
+ // BEGIN: Code Generation Metadata Section
+ public static readonly String AutoRestVersion = "latest";
+ public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4283";
+ public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/cognitiveservices/data-plane/VisualSearch/readme.md --csharp --version=latest --reflect-api-versions --csharp.output-folder=D:\\tmp\\azure-sdk-for-net\\src\\SDKs\\CognitiveServices\\dataPlane\\Search\\BingVisualSearch\\BingVisualSearch\\Generated";
+ public static readonly String GithubForkName = "Azure";
+ public static readonly String GithubBranchName = "master";
+ public static readonly String GithubCommidId = "53fe93921c9719ae90db8f6aaee7b6ea82f02355";
+ public static readonly String GithubRepoName = "azure-rest-api-specs";
+ // END: Code Generation Metadata Section
+ }
}
+
+
diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/VisualSearchAPI.cs b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/VisualSearchAPI.cs
index 64b9be93d9ef..b9f31fc66e25 100644
--- a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/VisualSearchAPI.cs
+++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Generated/VisualSearchAPI.cs
@@ -50,6 +50,19 @@ public partial class VisualSearchAPI : ServiceClient, IVisualSe
///
public virtual IImages Images { get; private set; }
+ ///
+ /// Initializes a new instance of the VisualSearchAPI class.
+ ///
+ ///
+ /// HttpClient to be used
+ ///
+ ///
+ /// True: will dispose the provided httpClient on calling VisualSearchAPI.Dispose(). False: will not dispose provided httpClient
+ protected VisualSearchAPI(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient)
+ {
+ Initialize();
+ }
+
///
/// Initializes a new instance of the VisualSearchAPI class.
///
@@ -145,6 +158,33 @@ public VisualSearchAPI(ServiceClientCredentials credentials, params DelegatingHa
}
}
+ ///
+ /// Initializes a new instance of the VisualSearchAPI class.
+ ///
+ ///
+ /// Required. Subscription credentials which uniquely identify client subscription.
+ ///
+ ///
+ /// HttpClient to be used
+ ///
+ ///
+ /// True: will dispose the provided httpClient on calling VisualSearchAPI.Dispose(). False: will not dispose provided httpClient
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public VisualSearchAPI(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient)
+ {
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ Credentials = credentials;
+ if (Credentials != null)
+ {
+ Credentials.InitializeServiceClient(this);
+ }
+ }
+
///
/// Initializes a new instance of the VisualSearchAPI class.
///
diff --git a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Microsoft.Azure.CognitiveServices.Search.VisualSearch.csproj b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Microsoft.Azure.CognitiveServices.Search.VisualSearch.csproj
index 4987c9e1c05a..0195eadfe623 100644
--- a/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Microsoft.Azure.CognitiveServices.Search.VisualSearch.csproj
+++ b/src/SDKs/CognitiveServices/dataPlane/Search/BingVisualSearch/BingVisualSearch/Microsoft.Azure.CognitiveServices.Search.VisualSearch.csproj
@@ -6,10 +6,10 @@
Microsoft.Azure.CognitiveServices.Search.VisualSearch
This client library provides access to the Microsoft Cognitive Services Image Visual Search API.
- 0.18.0-preview
+ 1.0.0
Microsoft.Azure.CognitiveServices.Search.VisualSearch
Microsoft Cognitive Services;Cognitive Services;Cognitive Services SDK;VisualSearch API;BingVisualSearch API;REST HTTPclient;VisualSearchSDK;BingVisualSearchSDK;netcore451511
- This is a preview release of the Cognitive Services Search SDK. Included with this release is support for Image Visual Search API.
+ This is a public release of the Cognitive Services Search SDK. Included with this release is support for Image Visual Search API.
net452;netstandard1.4
diff --git a/src/SDKs/_metadata/cognitiveservices_data-plane_VisualSearch.txt b/src/SDKs/_metadata/cognitiveservices_data-plane_VisualSearch.txt
index cf1902d26b61..bf028975223d 100644
--- a/src/SDKs/_metadata/cognitiveservices_data-plane_VisualSearch.txt
+++ b/src/SDKs/_metadata/cognitiveservices_data-plane_VisualSearch.txt
@@ -1,17 +1,14 @@
-Executing AutoRest command
-cmd.exe /c autorest.cmd D:/azure-rest-api-specs/specification/cognitiveservices/data-plane/VisualSearch/readme.md --csharp --csharp-sdks-folder=D:\tmp\azure-sdk-for-net\tools\..\src\SDKs\ --version=latest --reflect-api-versions
-2018-04-24 22:06:12 UTC
-1) azure-rest-api-specs repository information
+Installing AutoRest version: latest
+AutoRest installed successfully.
+Commencing code generation
+Generating CSharp code
+Executing AutoRest command
+cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/cognitiveservices/data-plane/VisualSearch/readme.md --csharp --version=latest --reflect-api-versions --csharp.output-folder=D:\tmp\azure-sdk-for-net\src\SDKs\CognitiveServices\dataPlane\Search\BingVisualSearch\BingVisualSearch\Generated
+2018-09-11 18:13:40 UTC
+Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
-Commit: e6d46513662f00ab4d0d560ab710be4a849609c3
-
-2) AutoRest information
+Commit: 53fe93921c9719ae90db8f6aaee7b6ea82f02355
+AutoRest information
Requested version: latest
-Bootstrapper version: C:\Users\shakao\AppData\Roaming\npm `-- autorest@2.0.4262
-
-
-Latest installed version:
-.\tools\generate.ps1 was invoked by generate.ps1
-
-
+Bootstrapper version: autorest@2.0.4283