-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds support for Multipart API requests (#31)
- Loading branch information
Showing
5 changed files
with
101 additions
and
12 deletions.
There are no files selected for viewing
74 changes: 74 additions & 0 deletions
74
Sources/Teco/Cii/V20210408/actions/DescribeQualityScore.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// This source file is part of the Teco open source project | ||
// | ||
// Copyright (c) 2022-2023 the Teco project authors | ||
// Licensed under Apache License v2.0 | ||
// | ||
// See LICENSE.txt for license information | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
// THIS FILE IS AUTOMATICALLY GENERATED by TecoServiceGenerator. | ||
// DO NOT EDIT. | ||
|
||
import struct Foundation.Data | ||
import Logging | ||
import NIOCore | ||
import TecoCore | ||
|
||
extension Cii { | ||
/// DescribeQualityScore请求参数结构体 | ||
public struct DescribeQualityScoreRequest: TCMultipartRequest { | ||
/// 文件二进制数据 | ||
public let file: Data | ||
|
||
public init(file: Data) { | ||
self.file = file | ||
} | ||
|
||
enum CodingKeys: String, CodingKey { | ||
case file = "File" | ||
} | ||
} | ||
|
||
/// DescribeQualityScore返回参数结构体 | ||
public struct DescribeQualityScoreResponse: TCResponse { | ||
/// 质量分 | ||
public let qualityScore: Float | ||
|
||
/// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 | ||
public let requestId: String | ||
|
||
enum CodingKeys: String, CodingKey { | ||
case qualityScore = "QualityScore" | ||
case requestId = "RequestId" | ||
} | ||
} | ||
|
||
/// 获取图片质量分 | ||
@inlinable | ||
public func describeQualityScore(_ input: DescribeQualityScoreRequest, region: TCRegion? = nil, logger: Logger = TCClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<DescribeQualityScoreResponse> { | ||
self.client.execute(action: "DescribeQualityScore", region: region, serviceConfig: self.config, input: input, logger: logger, on: eventLoop) | ||
} | ||
|
||
/// 获取图片质量分 | ||
@inlinable | ||
public func describeQualityScore(_ input: DescribeQualityScoreRequest, region: TCRegion? = nil, logger: Logger = TCClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> DescribeQualityScoreResponse { | ||
try await self.client.execute(action: "DescribeQualityScore", region: region, serviceConfig: self.config, input: input, logger: logger, on: eventLoop).get() | ||
} | ||
|
||
/// 获取图片质量分 | ||
@inlinable | ||
public func describeQualityScore(file: Data, region: TCRegion? = nil, logger: Logger = TCClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<DescribeQualityScoreResponse> { | ||
self.describeQualityScore(.init(file: file), region: region, logger: logger, on: eventLoop) | ||
} | ||
|
||
/// 获取图片质量分 | ||
@inlinable | ||
public func describeQualityScore(file: Data, region: TCRegion? = nil, logger: Logger = TCClient.loggingDisabled, on eventLoop: EventLoop? = nil) async throws -> DescribeQualityScoreResponse { | ||
try await self.describeQualityScore(.init(file: file), region: region, logger: logger, on: eventLoop) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,6 @@ | |
|
||
#if !BUILDING_DOCC | ||
@_exported import TecoCore | ||
|
||
@_exported import struct Foundation.Data | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters