qssj-20220112/Sources/AlibabacloudQssj20220112/Client.swift (466 lines of code) (raw):

import Foundation import Tea import TeaUtils import AlibabacloudOpenApi import AlibabaCloudOpenApiUtil import AlibabacloudEndpointUtil open class Client : AlibabacloudOpenApi.Client { public override init(_ config: AlibabacloudOpenApi.Config) throws { try super.init(config) self._endpointRule = "" try checkConfig(config as! AlibabacloudOpenApi.Config) self._endpoint = try getEndpoint("qssj", self._regionId ?? "", self._endpointRule ?? "", self._network ?? "", self._suffix ?? "", self._endpointMap ?? [:], self._endpoint ?? "") } public func getEndpoint(_ productId: String, _ regionId: String, _ endpointRule: String, _ network: String, _ suffix: String, _ endpointMap: [String: String], _ endpoint: String) throws -> String { if (!TeaUtils.Client.empty(endpoint)) { return endpoint as! String } if (!TeaUtils.Client.isUnset(endpointMap) && !TeaUtils.Client.empty(endpointMap[regionId as! String])) { return endpointMap[regionId as! String] ?? "" } return try AlibabacloudEndpointUtil.Client.getEndpointRules(productId, regionId, endpointRule, network, suffix) } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func getAgeDistributionWithOptions(_ request: GetAgeDistributionRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> GetAgeDistributionResponse { try TeaUtils.Client.validateModel(request) var query: [String: Any] = [:] if (!TeaUtils.Client.isUnset(request.cateIds)) { query["CateIds"] = request.cateIds ?? ""; } var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([ "query": AlibabaCloudOpenApiUtil.Client.query(query) ]) var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([ "action": "GetAgeDistribution", "version": "2022-01-12", "protocol": "HTTPS", "pathname": "/", "method": "POST", "authType": "AK", "style": "RPC", "reqBodyType": "formData", "bodyType": "json" ]) var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions) return Tea.TeaConverter.fromMap(GetAgeDistributionResponse(), tmp) } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func getAgeDistribution(_ request: GetAgeDistributionRequest) async throws -> GetAgeDistributionResponse { var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:]) return try await getAgeDistributionWithOptions(request as! GetAgeDistributionRequest, runtime as! TeaUtils.RuntimeOptions) } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func getAllTrendCategoryWithOptions(_ runtime: TeaUtils.RuntimeOptions) async throws -> GetAllTrendCategoryResponse { var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([:]) var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([ "action": "GetAllTrendCategory", "version": "2022-01-12", "protocol": "HTTPS", "pathname": "/", "method": "POST", "authType": "AK", "style": "RPC", "reqBodyType": "formData", "bodyType": "json" ]) var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions) return Tea.TeaConverter.fromMap(GetAllTrendCategoryResponse(), tmp) } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func getAllTrendCategory() async throws -> GetAllTrendCategoryResponse { var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:]) return try await getAllTrendCategoryWithOptions(runtime as! TeaUtils.RuntimeOptions) } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func getCrowdLabelWithOptions(_ request: GetCrowdLabelRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> GetCrowdLabelResponse { try TeaUtils.Client.validateModel(request) var body: [String: Any] = [:] if (!TeaUtils.Client.isUnset(request.cateIds)) { body["CateIds"] = request.cateIds ?? ""; } var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([ "body": AlibabaCloudOpenApiUtil.Client.parseToMap(body) ]) var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([ "action": "GetCrowdLabel", "version": "2022-01-12", "protocol": "HTTPS", "pathname": "/", "method": "POST", "authType": "AK", "style": "RPC", "reqBodyType": "formData", "bodyType": "json" ]) var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions) return Tea.TeaConverter.fromMap(GetCrowdLabelResponse(), tmp) } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func getCrowdLabel(_ request: GetCrowdLabelRequest) async throws -> GetCrowdLabelResponse { var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:]) return try await getCrowdLabelWithOptions(request as! GetCrowdLabelRequest, runtime as! TeaUtils.RuntimeOptions) } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func getCrowdReginWithOptions(_ request: GetCrowdReginRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> GetCrowdReginResponse { try TeaUtils.Client.validateModel(request) var query: [String: Any] = [:] if (!TeaUtils.Client.isUnset(request.cateIds)) { query["CateIds"] = request.cateIds ?? ""; } var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([ "query": AlibabaCloudOpenApiUtil.Client.query(query) ]) var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([ "action": "GetCrowdRegin", "version": "2022-01-12", "protocol": "HTTPS", "pathname": "/", "method": "POST", "authType": "AK", "style": "RPC", "reqBodyType": "formData", "bodyType": "json" ]) var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions) return Tea.TeaConverter.fromMap(GetCrowdReginResponse(), tmp) } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func getCrowdRegin(_ request: GetCrowdReginRequest) async throws -> GetCrowdReginResponse { var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:]) return try await getCrowdReginWithOptions(request as! GetCrowdReginRequest, runtime as! TeaUtils.RuntimeOptions) } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func getOpportunityMarketWithOptions(_ request: GetOpportunityMarketRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> GetOpportunityMarketResponse { try TeaUtils.Client.validateModel(request) var body: [String: Any] = [:] if (!TeaUtils.Client.isUnset(request.cateIds)) { body["CateIds"] = request.cateIds ?? ""; } if (!TeaUtils.Client.isUnset(request.timeDisplay)) { body["TimeDisplay"] = request.timeDisplay!; } var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([ "body": AlibabaCloudOpenApiUtil.Client.parseToMap(body) ]) var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([ "action": "GetOpportunityMarket", "version": "2022-01-12", "protocol": "HTTPS", "pathname": "/", "method": "POST", "authType": "AK", "style": "RPC", "reqBodyType": "formData", "bodyType": "json" ]) var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions) return Tea.TeaConverter.fromMap(GetOpportunityMarketResponse(), tmp) } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func getOpportunityMarket(_ request: GetOpportunityMarketRequest) async throws -> GetOpportunityMarketResponse { var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:]) return try await getOpportunityMarketWithOptions(request as! GetOpportunityMarketRequest, runtime as! TeaUtils.RuntimeOptions) } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func getPriceRangeWithOptions(_ request: GetPriceRangeRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> GetPriceRangeResponse { try TeaUtils.Client.validateModel(request) var body: [String: Any] = [:] if (!TeaUtils.Client.isUnset(request.cateIds)) { body["CateIds"] = request.cateIds ?? ""; } var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([ "body": AlibabaCloudOpenApiUtil.Client.parseToMap(body) ]) var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([ "action": "GetPriceRange", "version": "2022-01-12", "protocol": "HTTPS", "pathname": "/", "method": "POST", "authType": "AK", "style": "RPC", "reqBodyType": "formData", "bodyType": "json" ]) var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions) return Tea.TeaConverter.fromMap(GetPriceRangeResponse(), tmp) } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func getPriceRange(_ request: GetPriceRangeRequest) async throws -> GetPriceRangeResponse { var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:]) return try await getPriceRangeWithOptions(request as! GetPriceRangeRequest, runtime as! TeaUtils.RuntimeOptions) } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func getSexRatioWithOptions(_ request: GetSexRatioRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> GetSexRatioResponse { try TeaUtils.Client.validateModel(request) var query: [String: Any] = [:] if (!TeaUtils.Client.isUnset(request.cateIds)) { query["CateIds"] = request.cateIds ?? ""; } var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([ "query": AlibabaCloudOpenApiUtil.Client.query(query) ]) var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([ "action": "GetSexRatio", "version": "2022-01-12", "protocol": "HTTPS", "pathname": "/", "method": "POST", "authType": "AK", "style": "RPC", "reqBodyType": "formData", "bodyType": "json" ]) var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions) return Tea.TeaConverter.fromMap(GetSexRatioResponse(), tmp) } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func getSexRatio(_ request: GetSexRatioRequest) async throws -> GetSexRatioResponse { var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:]) return try await getSexRatioWithOptions(request as! GetSexRatioRequest, runtime as! TeaUtils.RuntimeOptions) } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func getStoreSalesVolumeTopWithOptions(_ request: GetStoreSalesVolumeTopRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> GetStoreSalesVolumeTopResponse { try TeaUtils.Client.validateModel(request) var body: [String: Any] = [:] if (!TeaUtils.Client.isUnset(request.cateIds)) { body["CateIds"] = request.cateIds ?? ""; } var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([ "body": AlibabaCloudOpenApiUtil.Client.parseToMap(body) ]) var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([ "action": "GetStoreSalesVolumeTop", "version": "2022-01-12", "protocol": "HTTPS", "pathname": "/", "method": "POST", "authType": "AK", "style": "RPC", "reqBodyType": "formData", "bodyType": "json" ]) var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions) return Tea.TeaConverter.fromMap(GetStoreSalesVolumeTopResponse(), tmp) } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func getStoreSalesVolumeTop(_ request: GetStoreSalesVolumeTopRequest) async throws -> GetStoreSalesVolumeTopResponse { var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:]) return try await getStoreSalesVolumeTopWithOptions(request as! GetStoreSalesVolumeTopRequest, runtime as! TeaUtils.RuntimeOptions) } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func getStoreSearchTopWithOptions(_ request: GetStoreSearchTopRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> GetStoreSearchTopResponse { try TeaUtils.Client.validateModel(request) var body: [String: Any] = [:] if (!TeaUtils.Client.isUnset(request.cateIds)) { body["CateIds"] = request.cateIds ?? ""; } var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([ "body": AlibabaCloudOpenApiUtil.Client.parseToMap(body) ]) var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([ "action": "GetStoreSearchTop", "version": "2022-01-12", "protocol": "HTTPS", "pathname": "/", "method": "POST", "authType": "AK", "style": "RPC", "reqBodyType": "formData", "bodyType": "json" ]) var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions) return Tea.TeaConverter.fromMap(GetStoreSearchTopResponse(), tmp) } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func getStoreSearchTop(_ request: GetStoreSearchTopRequest) async throws -> GetStoreSearchTopResponse { var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:]) return try await getStoreSearchTopWithOptions(request as! GetStoreSearchTopRequest, runtime as! TeaUtils.RuntimeOptions) } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func getStyleTopWithOptions(_ request: GetStyleTopRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> GetStyleTopResponse { try TeaUtils.Client.validateModel(request) var body: [String: Any] = [:] if (!TeaUtils.Client.isUnset(request.cateIds)) { body["CateIds"] = request.cateIds ?? ""; } if (!TeaUtils.Client.isUnset(request.sortOrder)) { body["SortOrder"] = request.sortOrder!; } if (!TeaUtils.Client.isUnset(request.timeDisplay)) { body["TimeDisplay"] = request.timeDisplay!; } var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([ "body": AlibabaCloudOpenApiUtil.Client.parseToMap(body) ]) var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([ "action": "GetStyleTop", "version": "2022-01-12", "protocol": "HTTPS", "pathname": "/", "method": "POST", "authType": "AK", "style": "RPC", "reqBodyType": "formData", "bodyType": "json" ]) var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions) return Tea.TeaConverter.fromMap(GetStyleTopResponse(), tmp) } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func getStyleTop(_ request: GetStyleTopRequest) async throws -> GetStyleTopResponse { var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:]) return try await getStyleTopWithOptions(request as! GetStyleTopRequest, runtime as! TeaUtils.RuntimeOptions) } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func getTrendImageDetailWithOptions(_ request: GetTrendImageDetailRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> GetTrendImageDetailResponse { try TeaUtils.Client.validateModel(request) var query: [String: Any] = [:] if (!TeaUtils.Client.isUnset(request.aiImgId)) { query["AiImgId"] = request.aiImgId ?? ""; } var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([ "query": AlibabaCloudOpenApiUtil.Client.query(query) ]) var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([ "action": "GetTrendImageDetail", "version": "2022-01-12", "protocol": "HTTPS", "pathname": "/", "method": "POST", "authType": "AK", "style": "RPC", "reqBodyType": "formData", "bodyType": "json" ]) var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions) return Tea.TeaConverter.fromMap(GetTrendImageDetailResponse(), tmp) } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func getTrendImageDetail(_ request: GetTrendImageDetailRequest) async throws -> GetTrendImageDetailResponse { var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:]) return try await getTrendImageDetailWithOptions(request as! GetTrendImageDetailRequest, runtime as! TeaUtils.RuntimeOptions) } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func getTrendImageListWithOptions(_ request: GetTrendImageListRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> GetTrendImageListResponse { try TeaUtils.Client.validateModel(request) var body: [String: Any] = [:] if (!TeaUtils.Client.isUnset(request.cateIds)) { body["CateIds"] = request.cateIds ?? ""; } if (!TeaUtils.Client.isUnset(request.query)) { body["Query"] = request.query ?? ""; } var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([ "body": AlibabaCloudOpenApiUtil.Client.parseToMap(body) ]) var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([ "action": "GetTrendImageList", "version": "2022-01-12", "protocol": "HTTPS", "pathname": "/", "method": "POST", "authType": "AK", "style": "RPC", "reqBodyType": "formData", "bodyType": "json" ]) var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions) return Tea.TeaConverter.fromMap(GetTrendImageListResponse(), tmp) } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func getTrendImageList(_ request: GetTrendImageListRequest) async throws -> GetTrendImageListResponse { var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:]) return try await getTrendImageListWithOptions(request as! GetTrendImageListRequest, runtime as! TeaUtils.RuntimeOptions) } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func getTrendIndexWithOptions(_ request: GetTrendIndexRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> GetTrendIndexResponse { try TeaUtils.Client.validateModel(request) var body: [String: Any] = [:] if (!TeaUtils.Client.isUnset(request.cateIds)) { body["CateIds"] = request.cateIds ?? ""; } if (!TeaUtils.Client.isUnset(request.monthNum)) { body["MonthNum"] = request.monthNum!; } var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([ "body": AlibabaCloudOpenApiUtil.Client.parseToMap(body) ]) var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([ "action": "GetTrendIndex", "version": "2022-01-12", "protocol": "HTTPS", "pathname": "/", "method": "POST", "authType": "AK", "style": "RPC", "reqBodyType": "formData", "bodyType": "json" ]) var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions) return Tea.TeaConverter.fromMap(GetTrendIndexResponse(), tmp) } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func getTrendIndex(_ request: GetTrendIndexRequest) async throws -> GetTrendIndexResponse { var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:]) return try await getTrendIndexWithOptions(request as! GetTrendIndexRequest, runtime as! TeaUtils.RuntimeOptions) } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func getTrendSearchRecordWithOptions(_ request: GetTrendSearchRecordRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> GetTrendSearchRecordResponse { try TeaUtils.Client.validateModel(request) var body: [String: Any] = [:] if (!TeaUtils.Client.isUnset(request.key)) { body["Key"] = request.key ?? ""; } var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([ "body": AlibabaCloudOpenApiUtil.Client.parseToMap(body) ]) var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([ "action": "GetTrendSearchRecord", "version": "2022-01-12", "protocol": "HTTPS", "pathname": "/", "method": "POST", "authType": "AK", "style": "RPC", "reqBodyType": "formData", "bodyType": "json" ]) var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions) return Tea.TeaConverter.fromMap(GetTrendSearchRecordResponse(), tmp) } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func getTrendSearchRecord(_ request: GetTrendSearchRecordRequest) async throws -> GetTrendSearchRecordResponse { var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:]) return try await getTrendSearchRecordWithOptions(request as! GetTrendSearchRecordRequest, runtime as! TeaUtils.RuntimeOptions) } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func getTrendStatisticWithOptions(_ request: GetTrendStatisticRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> GetTrendStatisticResponse { try TeaUtils.Client.validateModel(request) var body: [String: Any] = [:] if (!TeaUtils.Client.isUnset(request.cateIds)) { body["CateIds"] = request.cateIds ?? ""; } var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([ "body": AlibabaCloudOpenApiUtil.Client.parseToMap(body) ]) var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([ "action": "GetTrendStatistic", "version": "2022-01-12", "protocol": "HTTPS", "pathname": "/", "method": "POST", "authType": "AK", "style": "RPC", "reqBodyType": "formData", "bodyType": "json" ]) var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions) return Tea.TeaConverter.fromMap(GetTrendStatisticResponse(), tmp) } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) public func getTrendStatistic(_ request: GetTrendStatisticRequest) async throws -> GetTrendStatisticResponse { var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:]) return try await getTrendStatisticWithOptions(request as! GetTrendStatisticRequest, runtime as! TeaUtils.RuntimeOptions) } }