@@ -963,6 +963,51 @@ open class Client : AlibabacloudOpenApi.Client {
963
963
return try await createEditingProjectWithOptions(request as! CreateEditingProjectRequest, runtime as! TeaUtils.RuntimeOptions)
964
964
}
965
965
966
+ @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
967
+ public func createHotwordLibraryWithOptions(_ tmpReq: CreateHotwordLibraryRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateHotwordLibraryResponse {
968
+ try TeaUtils.Client.validateModel(tmpReq)
969
+ var request: CreateHotwordLibraryShrinkRequest = CreateHotwordLibraryShrinkRequest([:])
970
+ AlibabaCloudOpenApiUtil.Client.convert(tmpReq, request)
971
+ if (!TeaUtils.Client.isUnset(tmpReq.hotwords)) {
972
+ request.hotwordsShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.hotwords, "Hotwords", "json")
973
+ }
974
+ var query: [String: Any] = [:]
975
+ if (!TeaUtils.Client.isUnset(request.description_)) {
976
+ query["Description"] = request.description_ ?? "";
977
+ }
978
+ if (!TeaUtils.Client.isUnset(request.hotwordsShrink)) {
979
+ query["Hotwords"] = request.hotwordsShrink ?? "";
980
+ }
981
+ if (!TeaUtils.Client.isUnset(request.name)) {
982
+ query["Name"] = request.name ?? "";
983
+ }
984
+ if (!TeaUtils.Client.isUnset(request.usageScenario)) {
985
+ query["UsageScenario"] = request.usageScenario ?? "";
986
+ }
987
+ var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
988
+ "query": AlibabaCloudOpenApiUtil.Client.query(query)
989
+ ])
990
+ var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
991
+ "action": "CreateHotwordLibrary",
992
+ "version": "2020-11-09",
993
+ "protocol": "HTTPS",
994
+ "pathname": "/",
995
+ "method": "POST",
996
+ "authType": "AK",
997
+ "style": "RPC",
998
+ "reqBodyType": "formData",
999
+ "bodyType": "json"
1000
+ ])
1001
+ var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
1002
+ return Tea.TeaConverter.fromMap(CreateHotwordLibraryResponse(), tmp)
1003
+ }
1004
+
1005
+ @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
1006
+ public func createHotwordLibrary(_ request: CreateHotwordLibraryRequest) async throws -> CreateHotwordLibraryResponse {
1007
+ var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
1008
+ return try await createHotwordLibraryWithOptions(request as! CreateHotwordLibraryRequest, runtime as! TeaUtils.RuntimeOptions)
1009
+ }
1010
+
966
1011
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
967
1012
public func createLivePackageChannelWithOptions(_ request: CreateLivePackageChannelRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> CreateLivePackageChannelResponse {
968
1013
try TeaUtils.Client.validateModel(request)
@@ -2296,6 +2341,37 @@ open class Client : AlibabacloudOpenApi.Client {
2296
2341
return try await deleteEditingProjectsWithOptions(request as! DeleteEditingProjectsRequest, runtime as! TeaUtils.RuntimeOptions)
2297
2342
}
2298
2343
2344
+ @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
2345
+ public func deleteHotwordLibraryWithOptions(_ request: DeleteHotwordLibraryRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DeleteHotwordLibraryResponse {
2346
+ try TeaUtils.Client.validateModel(request)
2347
+ var query: [String: Any] = [:]
2348
+ if (!TeaUtils.Client.isUnset(request.hotwordLibraryId)) {
2349
+ query["HotwordLibraryId"] = request.hotwordLibraryId ?? "";
2350
+ }
2351
+ var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
2352
+ "query": AlibabaCloudOpenApiUtil.Client.query(query)
2353
+ ])
2354
+ var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
2355
+ "action": "DeleteHotwordLibrary",
2356
+ "version": "2020-11-09",
2357
+ "protocol": "HTTPS",
2358
+ "pathname": "/",
2359
+ "method": "POST",
2360
+ "authType": "AK",
2361
+ "style": "RPC",
2362
+ "reqBodyType": "formData",
2363
+ "bodyType": "json"
2364
+ ])
2365
+ var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
2366
+ return Tea.TeaConverter.fromMap(DeleteHotwordLibraryResponse(), tmp)
2367
+ }
2368
+
2369
+ @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
2370
+ public func deleteHotwordLibrary(_ request: DeleteHotwordLibraryRequest) async throws -> DeleteHotwordLibraryResponse {
2371
+ var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
2372
+ return try await deleteHotwordLibraryWithOptions(request as! DeleteHotwordLibraryRequest, runtime as! TeaUtils.RuntimeOptions)
2373
+ }
2374
+
2299
2375
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
2300
2376
public func deleteLivePackageChannelWithOptions(_ request: DeleteLivePackageChannelRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> DeleteLivePackageChannelResponse {
2301
2377
try TeaUtils.Client.validateModel(request)
@@ -4296,6 +4372,37 @@ open class Client : AlibabacloudOpenApi.Client {
4296
4372
return try await getEventCallbackWithOptions(runtime as! TeaUtils.RuntimeOptions)
4297
4373
}
4298
4374
4375
+ @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
4376
+ public func getHotwordLibraryWithOptions(_ request: GetHotwordLibraryRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> GetHotwordLibraryResponse {
4377
+ try TeaUtils.Client.validateModel(request)
4378
+ var query: [String: Any] = [:]
4379
+ if (!TeaUtils.Client.isUnset(request.hotwordLibraryId)) {
4380
+ query["HotwordLibraryId"] = request.hotwordLibraryId ?? "";
4381
+ }
4382
+ var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
4383
+ "query": AlibabaCloudOpenApiUtil.Client.query(query)
4384
+ ])
4385
+ var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
4386
+ "action": "GetHotwordLibrary",
4387
+ "version": "2020-11-09",
4388
+ "protocol": "HTTPS",
4389
+ "pathname": "/",
4390
+ "method": "POST",
4391
+ "authType": "AK",
4392
+ "style": "RPC",
4393
+ "reqBodyType": "formData",
4394
+ "bodyType": "json"
4395
+ ])
4396
+ var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
4397
+ return Tea.TeaConverter.fromMap(GetHotwordLibraryResponse(), tmp)
4398
+ }
4399
+
4400
+ @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
4401
+ public func getHotwordLibrary(_ request: GetHotwordLibraryRequest) async throws -> GetHotwordLibraryResponse {
4402
+ var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
4403
+ return try await getHotwordLibraryWithOptions(request as! GetHotwordLibraryRequest, runtime as! TeaUtils.RuntimeOptions)
4404
+ }
4405
+
4299
4406
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
4300
4407
public func getLiveEditingIndexFileWithOptions(_ request: GetLiveEditingIndexFileRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> GetLiveEditingIndexFileResponse {
4301
4408
try TeaUtils.Client.validateModel(request)
@@ -6613,6 +6720,61 @@ open class Client : AlibabacloudOpenApi.Client {
6613
6720
return try await listEditingProjectsWithOptions(request as! ListEditingProjectsRequest, runtime as! TeaUtils.RuntimeOptions)
6614
6721
}
6615
6722
6723
+ @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
6724
+ public func listHotwordLibrariesWithOptions(_ request: ListHotwordLibrariesRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ListHotwordLibrariesResponse {
6725
+ try TeaUtils.Client.validateModel(request)
6726
+ var query: [String: Any] = [:]
6727
+ if (!TeaUtils.Client.isUnset(request.endTime)) {
6728
+ query["EndTime"] = request.endTime ?? "";
6729
+ }
6730
+ if (!TeaUtils.Client.isUnset(request.maxResults)) {
6731
+ query["MaxResults"] = request.maxResults!;
6732
+ }
6733
+ if (!TeaUtils.Client.isUnset(request.name)) {
6734
+ query["Name"] = request.name ?? "";
6735
+ }
6736
+ if (!TeaUtils.Client.isUnset(request.nextToken)) {
6737
+ query["NextToken"] = request.nextToken ?? "";
6738
+ }
6739
+ if (!TeaUtils.Client.isUnset(request.pageNo)) {
6740
+ query["PageNo"] = request.pageNo!;
6741
+ }
6742
+ if (!TeaUtils.Client.isUnset(request.pageSize)) {
6743
+ query["PageSize"] = request.pageSize!;
6744
+ }
6745
+ if (!TeaUtils.Client.isUnset(request.sortBy)) {
6746
+ query["SortBy"] = request.sortBy ?? "";
6747
+ }
6748
+ if (!TeaUtils.Client.isUnset(request.startTime)) {
6749
+ query["StartTime"] = request.startTime ?? "";
6750
+ }
6751
+ if (!TeaUtils.Client.isUnset(request.usageScenario)) {
6752
+ query["UsageScenario"] = request.usageScenario ?? "";
6753
+ }
6754
+ var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
6755
+ "query": AlibabaCloudOpenApiUtil.Client.query(query)
6756
+ ])
6757
+ var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
6758
+ "action": "ListHotwordLibraries",
6759
+ "version": "2020-11-09",
6760
+ "protocol": "HTTPS",
6761
+ "pathname": "/",
6762
+ "method": "POST",
6763
+ "authType": "AK",
6764
+ "style": "RPC",
6765
+ "reqBodyType": "formData",
6766
+ "bodyType": "json"
6767
+ ])
6768
+ var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
6769
+ return Tea.TeaConverter.fromMap(ListHotwordLibrariesResponse(), tmp)
6770
+ }
6771
+
6772
+ @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
6773
+ public func listHotwordLibraries(_ request: ListHotwordLibrariesRequest) async throws -> ListHotwordLibrariesResponse {
6774
+ var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
6775
+ return try await listHotwordLibrariesWithOptions(request as! ListHotwordLibrariesRequest, runtime as! TeaUtils.RuntimeOptions)
6776
+ }
6777
+
6616
6778
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
6617
6779
public func listLivePackageChannelGroupsWithOptions(_ request: ListLivePackageChannelGroupsRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ListLivePackageChannelGroupsResponse {
6618
6780
try TeaUtils.Client.validateModel(request)
@@ -12342,6 +12504,51 @@ open class Client : AlibabacloudOpenApi.Client {
12342
12504
return try await updateEditingProjectWithOptions(request as! UpdateEditingProjectRequest, runtime as! TeaUtils.RuntimeOptions)
12343
12505
}
12344
12506
12507
+ @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
12508
+ public func updateHotwordLibraryWithOptions(_ tmpReq: UpdateHotwordLibraryRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> UpdateHotwordLibraryResponse {
12509
+ try TeaUtils.Client.validateModel(tmpReq)
12510
+ var request: UpdateHotwordLibraryShrinkRequest = UpdateHotwordLibraryShrinkRequest([:])
12511
+ AlibabaCloudOpenApiUtil.Client.convert(tmpReq, request)
12512
+ if (!TeaUtils.Client.isUnset(tmpReq.hotwords)) {
12513
+ request.hotwordsShrink = AlibabaCloudOpenApiUtil.Client.arrayToStringWithSpecifiedStyle(tmpReq.hotwords, "Hotwords", "json")
12514
+ }
12515
+ var query: [String: Any] = [:]
12516
+ if (!TeaUtils.Client.isUnset(request.description_)) {
12517
+ query["Description"] = request.description_ ?? "";
12518
+ }
12519
+ if (!TeaUtils.Client.isUnset(request.hotwordLibraryId)) {
12520
+ query["HotwordLibraryId"] = request.hotwordLibraryId ?? "";
12521
+ }
12522
+ if (!TeaUtils.Client.isUnset(request.hotwordsShrink)) {
12523
+ query["Hotwords"] = request.hotwordsShrink ?? "";
12524
+ }
12525
+ if (!TeaUtils.Client.isUnset(request.name)) {
12526
+ query["Name"] = request.name ?? "";
12527
+ }
12528
+ var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
12529
+ "query": AlibabaCloudOpenApiUtil.Client.query(query)
12530
+ ])
12531
+ var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
12532
+ "action": "UpdateHotwordLibrary",
12533
+ "version": "2020-11-09",
12534
+ "protocol": "HTTPS",
12535
+ "pathname": "/",
12536
+ "method": "POST",
12537
+ "authType": "AK",
12538
+ "style": "RPC",
12539
+ "reqBodyType": "formData",
12540
+ "bodyType": "json"
12541
+ ])
12542
+ var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
12543
+ return Tea.TeaConverter.fromMap(UpdateHotwordLibraryResponse(), tmp)
12544
+ }
12545
+
12546
+ @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
12547
+ public func updateHotwordLibrary(_ request: UpdateHotwordLibraryRequest) async throws -> UpdateHotwordLibraryResponse {
12548
+ var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
12549
+ return try await updateHotwordLibraryWithOptions(request as! UpdateHotwordLibraryRequest, runtime as! TeaUtils.RuntimeOptions)
12550
+ }
12551
+
12345
12552
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
12346
12553
public func updateLivePackageChannelWithOptions(_ request: UpdateLivePackageChannelRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> UpdateLivePackageChannelResponse {
12347
12554
try TeaUtils.Client.validateModel(request)
0 commit comments