Skip to content

Commit 31f9fce

Browse files
committed
chore: Regenerated with the latest definitions, added formatting of datetime
1 parent 956e5a5 commit 31f9fce

File tree

4 files changed

+43
-37
lines changed

4 files changed

+43
-37
lines changed

Core

Scripts/Services/Discovery/V1/DiscoveryService.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4640,11 +4640,11 @@ public bool GetMetricsEventRate(Callback<MetricResponse> callback, DateTime? sta
46404640
req.Parameters["version"] = VersionDate;
46414641
if (startTime != null)
46424642
{
4643-
req.Parameters["start_time"] = startTime;
4643+
req.Parameters["start_time"] = Cloud.SDK.Utilities.Utility.NullableDateTimeToString(startTime, "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ");;
46444644
}
46454645
if (endTime != null)
46464646
{
4647-
req.Parameters["end_time"] = endTime;
4647+
req.Parameters["end_time"] = Cloud.SDK.Utilities.Utility.NullableDateTimeToString(endTime, "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ");;
46484648
}
46494649
if (!string.IsNullOrEmpty(resultType))
46504650
{
@@ -4725,11 +4725,11 @@ public bool GetMetricsQuery(Callback<MetricResponse> callback, DateTime? startTi
47254725
req.Parameters["version"] = VersionDate;
47264726
if (startTime != null)
47274727
{
4728-
req.Parameters["start_time"] = startTime;
4728+
req.Parameters["start_time"] = Cloud.SDK.Utilities.Utility.NullableDateTimeToString(startTime, "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ");;
47294729
}
47304730
if (endTime != null)
47314731
{
4732-
req.Parameters["end_time"] = endTime;
4732+
req.Parameters["end_time"] = Cloud.SDK.Utilities.Utility.NullableDateTimeToString(endTime, "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ");;
47334733
}
47344734
if (!string.IsNullOrEmpty(resultType))
47354735
{
@@ -4812,11 +4812,11 @@ public bool GetMetricsQueryEvent(Callback<MetricResponse> callback, DateTime? st
48124812
req.Parameters["version"] = VersionDate;
48134813
if (startTime != null)
48144814
{
4815-
req.Parameters["start_time"] = startTime;
4815+
req.Parameters["start_time"] = Cloud.SDK.Utilities.Utility.NullableDateTimeToString(startTime, "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ");;
48164816
}
48174817
if (endTime != null)
48184818
{
4819-
req.Parameters["end_time"] = endTime;
4819+
req.Parameters["end_time"] = Cloud.SDK.Utilities.Utility.NullableDateTimeToString(endTime, "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ");;
48204820
}
48214821
if (!string.IsNullOrEmpty(resultType))
48224822
{
@@ -4898,11 +4898,11 @@ public bool GetMetricsQueryNoResults(Callback<MetricResponse> callback, DateTime
48984898
req.Parameters["version"] = VersionDate;
48994899
if (startTime != null)
49004900
{
4901-
req.Parameters["start_time"] = startTime;
4901+
req.Parameters["start_time"] = Cloud.SDK.Utilities.Utility.NullableDateTimeToString(startTime, "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ");;
49024902
}
49034903
if (endTime != null)
49044904
{
4905-
req.Parameters["end_time"] = endTime;
4905+
req.Parameters["end_time"] = Cloud.SDK.Utilities.Utility.NullableDateTimeToString(endTime, "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ");;
49064906
}
49074907
if (!string.IsNullOrEmpty(resultType))
49084908
{

Scripts/Services/SpeechToText/V1/SpeechToTextService.cs

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4030,11 +4030,17 @@ private void OnUpgradeAcousticModelResponse(RESTConnector.Request req, RESTConne
40304030
/// * `application/zip` for a **.zip** file
40314031
/// * `application/gzip` for a **.tar.gz** file.
40324032
///
4033-
/// All audio files contained in the archive must have the same audio format. Use the `Contained-Content-Type`
4034-
/// parameter to specify the format of the contained audio files. The parameter accepts all of the audio formats
4035-
/// supported for use with speech recognition and with the `Content-Type` header, including the `rate`,
4036-
/// `channels`, and `endianness` parameters that are used with some formats. The default contained audio format
4037-
/// is `audio/wav`.
4033+
/// When you add an archive-type resource, the `Contained-Content-Type` header is optional depending on the
4034+
/// format of the files that you are adding:
4035+
/// * For audio files of type `audio/alaw`, `audio/basic`, `audio/l16`, or `audio/mulaw`, you must use the
4036+
/// `Contained-Content-Type` header to specify the format of the contained audio files. Include the `rate`,
4037+
/// `channels`, and `endianness` parameters where necessary. In this case, all audio files contained in the
4038+
/// archive file must have the same audio format.
4039+
/// * For audio files of all other types, you can omit the `Contained-Content-Type` header. In this case, the
4040+
/// audio files contained in the archive file can have any of the formats not listed in the previous bullet. The
4041+
/// audio files do not need to have the same format.
4042+
///
4043+
/// Do not use the `Contained-Content-Type` header when adding an audio-type resource.
40384044
///
40394045
/// ### Naming restrictions for embedded audio files
40404046
///
@@ -4056,11 +4062,18 @@ private void OnUpgradeAcousticModelResponse(RESTConnector.Request req, RESTConne
40564062
/// * Do not use the name of an audio resource that has already been added to the custom model.</param>
40574063
/// <param name="audioResource">The audio resource that is to be added to the custom acoustic model, an
40584064
/// individual audio file or an archive file.</param>
4059-
/// <param name="containedContentType">For an archive-type resource, specifies the format of the audio files
4060-
/// that are contained in the archive file. The parameter accepts all of the audio formats that are supported
4061-
/// for use with speech recognition, including the `rate`, `channels`, and `endianness` parameters that are used
4062-
/// with some formats. For more information, see **Content types for audio-type resources** in the method
4063-
/// description. (optional, default to audio/wav)</param>
4065+
/// <param name="containedContentType">**For an archive-type resource,** specify the format of the audio files
4066+
/// that are contained in the archive file if they are of type `audio/alaw`, `audio/basic`, `audio/l16`, or
4067+
/// `audio/mulaw`. Include the `rate`, `channels`, and `endianness` parameters where necessary. In this case,
4068+
/// all audio files that are contained in the archive file must be of the indicated type.
4069+
///
4070+
/// For all other audio formats, you can omit the header. In this case, the audio files can be of multiple types
4071+
/// as long as they are not of the types listed in the previous paragraph.
4072+
///
4073+
/// The parameter accepts all of the audio formats that are supported for use with speech recognition. For more
4074+
/// information, see **Content types for audio-type resources** in the method description.
4075+
///
4076+
/// **For an audio-type resource,** omit the header. (optional)</param>
40644077
/// <param name="allowOverwrite">If `true`, the specified audio resource overwrites an existing audio resource
40654078
/// with the same name. If `false`, the request fails if an audio resource with the same name already exists.
40664079
/// The parameter has no effect if an audio resource with the same name does not already exist. (optional,

Scripts/Services/VisualRecognition/V3/VisualRecognitionService.cs

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -374,14 +374,13 @@ private void OnDetectFacesResponse(RESTConnector.Request req, RESTConnector.Resp
374374
/// The maximum number of images is 10,000 images or 100 MB per .zip file.
375375
///
376376
/// Encode special characters in the file name in UTF-8.</param>
377-
/// <param name="positiveExamplesFilename">The filename for positiveExamples.</param>
378377
/// <param name="negativeExamples">A .zip file of images that do not depict the visual subject of any of the
379378
/// classes of the new classifier. Must contain a minimum of 10 images.
380379
///
381380
/// Encode special characters in the file name in UTF-8. (optional)</param>
382381
/// <param name="negativeExamplesFilename">The filename for negativeExamples. (optional)</param>
383382
/// <returns><see cref="Classifier" />Classifier</returns>
384-
public bool CreateClassifier(Callback<Classifier> callback, string name, Dictionary<string, System.IO.MemoryStream> positiveExamples, string positiveExamplesFilename, System.IO.MemoryStream negativeExamples = null, string negativeExamplesFilename = null)
383+
public bool CreateClassifier(Callback<Classifier> callback, string name, Dictionary<string, System.IO.MemoryStream> positiveExamples, System.IO.MemoryStream negativeExamples = null, string negativeExamplesFilename = null)
385384
{
386385
if (callback == null)
387386
throw new ArgumentNullException("`callback` is required for `CreateClassifier`");
@@ -391,8 +390,6 @@ public bool CreateClassifier(Callback<Classifier> callback, string name, Diction
391390
throw new ArgumentNullException("`positiveExamples` is required for `CreateClassifier`");
392391
if (positiveExamples.Count == 0)
393392
throw new ArgumentException("`positiveExamples` must contain at least one dictionary entry");
394-
if (string.IsNullOrEmpty(positiveExamplesFilename))
395-
throw new ArgumentNullException("`positiveExamplesFilename` is required for `CreateClassifier`");
396393

397394
RequestObject<Classifier> req = new RequestObject<Classifier>
398395
{
@@ -592,19 +589,16 @@ private void OnGetClassifierResponse(RESTConnector.Request req, RESTConnector.Re
592589
}
593590
response.StatusCode = resp.HttpResponseCode;
594591

595-
if (resp.Success)
592+
try
596593
{
597-
try
598-
{
599-
string json = Encoding.UTF8.GetString(resp.Data);
600-
response.Result = JsonConvert.DeserializeObject<Classifier>(json);
601-
response.Response = json;
602-
}
603-
catch (Exception e)
604-
{
605-
Log.Error("VisualRecognitionService.OnGetClassifierResponse()", "Exception: {0}", e.ToString());
606-
resp.Success = false;
607-
}
594+
string json = Encoding.UTF8.GetString(resp.Data);
595+
response.Result = JsonConvert.DeserializeObject<Classifier>(json);
596+
response.Response = json;
597+
}
598+
catch (Exception e)
599+
{
600+
Log.Error("VisualRecognitionService.OnGetClassifierResponse()", "Exception: {0}", e.ToString());
601+
resp.Success = false;
608602
}
609603

610604
if (((RequestObject<Classifier>)req).Callback != null)
@@ -710,14 +704,13 @@ private void OnListClassifiersResponse(RESTConnector.Request req, RESTConnector.
710704
/// The maximum number of images is 10,000 images or 100 MB per .zip file.
711705
///
712706
/// Encode special characters in the file name in UTF-8. (optional)</param>
713-
/// <param name="positiveExamplesFilename">The filename for positiveExamples. (optional)</param>
714707
/// <param name="negativeExamples">A .zip file of images that do not depict the visual subject of any of the
715708
/// classes of the new classifier. Must contain a minimum of 10 images.
716709
///
717710
/// Encode special characters in the file name in UTF-8. (optional)</param>
718711
/// <param name="negativeExamplesFilename">The filename for negativeExamples. (optional)</param>
719712
/// <returns><see cref="Classifier" />Classifier</returns>
720-
public bool UpdateClassifier(Callback<Classifier> callback, string classifierId, Dictionary<string, System.IO.MemoryStream> positiveExamples = null, string positiveExamplesFilename = null, System.IO.MemoryStream negativeExamples = null, string negativeExamplesFilename = null)
713+
public bool UpdateClassifier(Callback<Classifier> callback, string classifierId, Dictionary<string, System.IO.MemoryStream> positiveExamples = null, System.IO.MemoryStream negativeExamples = null, string negativeExamplesFilename = null)
721714
{
722715
if (callback == null)
723716
throw new ArgumentNullException("`callback` is required for `UpdateClassifier`");

0 commit comments

Comments
 (0)