Skip to content

Commit ef0676a

Browse files
committed
Support API ApplyWsToken.
1 parent 92ecd75 commit ef0676a

File tree

5 files changed

+234
-5
lines changed

5 files changed

+234
-5
lines changed

AlibabacloudQualitycheck20190115.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |spec|
22

33
spec.name = "AlibabacloudQualitycheck20190115"
4-
spec.version = "8.0.2"
4+
spec.version = "8.1.0"
55
spec.license = "Apache 2.0"
66
spec.summary = "Alibaba Cloud Qualitycheck (20190115) SDK Library for Swift"
77
spec.homepage = "https://github.com/alibabacloud-sdk-swift/qualitycheck-20190115"

README-CN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
要使用 [Carthage](https://github.com/Carthage/Carthage)`AlibabacloudQualitycheck20190115` 集成到你的 Xcode 项目中,需要在 `Cartfile` 中定义以下内容:
1818

1919
```ogdl
20-
github "alibabacloud-sdk-swift/qualitycheck-20190115" "8.0.2"
20+
github "alibabacloud-sdk-swift/qualitycheck-20190115" "8.1.0"
2121
```
2222

2323
### Swift 包管理工具
@@ -26,7 +26,7 @@ github "alibabacloud-sdk-swift/qualitycheck-20190115" "8.0.2"
2626

2727
```swift
2828
dependencies: [
29-
.package(url: "https://github.com/alibabacloud-sdk-swift/qualitycheck-20190115.git", from: "8.0.2")
29+
.package(url: "https://github.com/alibabacloud-sdk-swift/qualitycheck-20190115.git", from: "8.1.0")
3030
]
3131
```
3232

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ English | [简体中文](README-CN.md)
1717
To integrate `AlibabacloudQualitycheck20190115` into your Xcode project using [Carthage](https://github.com/Carthage/Carthage), specify it in your `Cartfile`:
1818

1919
```ogdl
20-
github "alibabacloud-sdk-swift/qualitycheck-20190115" "8.0.2"
20+
github "alibabacloud-sdk-swift/qualitycheck-20190115" "8.1.0"
2121
```
2222

2323
### Swift Package Manager
@@ -26,7 +26,7 @@ To integrate `AlibabacloudQualitycheck20190115` into your Xcode project using [S
2626

2727
```swift
2828
dependencies: [
29-
.package(url: "https://github.com/alibabacloud-sdk-swift/qualitycheck-20190115.git", from: "8.0.2")
29+
.package(url: "https://github.com/alibabacloud-sdk-swift/qualitycheck-20190115.git", from: "8.1.0")
3030
]
3131
```
3232

Sources/AlibabacloudQualitycheck20190115/Client.swift

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,46 @@ open class Client : AlibabacloudOpenApi.Client {
148148
return try await addRuleV4WithOptions(request as! AddRuleV4Request, runtime as! TeaUtils.RuntimeOptions)
149149
}
150150

151+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
152+
public func applyWsTokenWithOptions(_ request: ApplyWsTokenRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> ApplyWsTokenResponse {
153+
try TeaUtils.Client.validateModel(request)
154+
var query: [String: Any] = [:]
155+
if (!TeaUtils.Client.isUnset(request.baseMeAgentId)) {
156+
query["BaseMeAgentId"] = request.baseMeAgentId!;
157+
}
158+
if (!TeaUtils.Client.isUnset(request.jsonStr)) {
159+
query["JsonStr"] = request.jsonStr ?? "";
160+
}
161+
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
162+
"query": AlibabaCloudOpenApiUtil.Client.query(query)
163+
])
164+
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
165+
"action": "ApplyWsToken",
166+
"version": "2019-01-15",
167+
"protocol": "HTTPS",
168+
"pathname": "/",
169+
"method": "POST",
170+
"authType": "AK",
171+
"style": "RPC",
172+
"reqBodyType": "formData",
173+
"bodyType": "json"
174+
])
175+
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
176+
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
177+
return Tea.TeaConverter.fromMap(ApplyWsTokenResponse(), tmp)
178+
}
179+
else {
180+
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
181+
return Tea.TeaConverter.fromMap(ApplyWsTokenResponse(), tmp)
182+
}
183+
}
184+
185+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
186+
public func applyWsToken(_ request: ApplyWsTokenRequest) async throws -> ApplyWsTokenResponse {
187+
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
188+
return try await applyWsTokenWithOptions(request as! ApplyWsTokenRequest, runtime as! TeaUtils.RuntimeOptions)
189+
}
190+
151191
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
152192
public func assignReviewerWithOptions(_ request: AssignReviewerRequest, _ runtime: TeaUtils.RuntimeOptions) async throws -> AssignReviewerResponse {
153193
try TeaUtils.Client.validateModel(request)

Sources/AlibabacloudQualitycheck20190115/Models.swift

Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3492,6 +3492,195 @@ public class AddRuleV4Response : Tea.TeaModel {
34923492
}
34933493
}
34943494

3495+
public class ApplyWsTokenRequest : Tea.TeaModel {
3496+
public var baseMeAgentId: Int64?
3497+
3498+
public var jsonStr: String?
3499+
3500+
public override init() {
3501+
super.init()
3502+
}
3503+
3504+
public init(_ dict: [String: Any]) {
3505+
super.init()
3506+
self.fromMap(dict)
3507+
}
3508+
3509+
public override func validate() throws -> Void {
3510+
}
3511+
3512+
public override func toMap() -> [String : Any] {
3513+
var map = super.toMap()
3514+
if self.baseMeAgentId != nil {
3515+
map["BaseMeAgentId"] = self.baseMeAgentId!
3516+
}
3517+
if self.jsonStr != nil {
3518+
map["JsonStr"] = self.jsonStr!
3519+
}
3520+
return map
3521+
}
3522+
3523+
public override func fromMap(_ dict: [String: Any]) -> Void {
3524+
if dict.keys.contains("BaseMeAgentId") {
3525+
self.baseMeAgentId = dict["BaseMeAgentId"] as! Int64
3526+
}
3527+
if dict.keys.contains("JsonStr") {
3528+
self.jsonStr = dict["JsonStr"] as! String
3529+
}
3530+
}
3531+
}
3532+
3533+
public class ApplyWsTokenResponseBody : Tea.TeaModel {
3534+
public class Data : Tea.TeaModel {
3535+
public var sessionId: String?
3536+
3537+
public var token: String?
3538+
3539+
public var wsEndpoint: String?
3540+
3541+
public override init() {
3542+
super.init()
3543+
}
3544+
3545+
public init(_ dict: [String: Any]) {
3546+
super.init()
3547+
self.fromMap(dict)
3548+
}
3549+
3550+
public override func validate() throws -> Void {
3551+
}
3552+
3553+
public override func toMap() -> [String : Any] {
3554+
var map = super.toMap()
3555+
if self.sessionId != nil {
3556+
map["SessionId"] = self.sessionId!
3557+
}
3558+
if self.token != nil {
3559+
map["Token"] = self.token!
3560+
}
3561+
if self.wsEndpoint != nil {
3562+
map["WsEndpoint"] = self.wsEndpoint!
3563+
}
3564+
return map
3565+
}
3566+
3567+
public override func fromMap(_ dict: [String: Any]) -> Void {
3568+
if dict.keys.contains("SessionId") {
3569+
self.sessionId = dict["SessionId"] as! String
3570+
}
3571+
if dict.keys.contains("Token") {
3572+
self.token = dict["Token"] as! String
3573+
}
3574+
if dict.keys.contains("WsEndpoint") {
3575+
self.wsEndpoint = dict["WsEndpoint"] as! String
3576+
}
3577+
}
3578+
}
3579+
public var code: String?
3580+
3581+
public var data: ApplyWsTokenResponseBody.Data?
3582+
3583+
public var httpStatusCode: Int32?
3584+
3585+
public var requestId: String?
3586+
3587+
public override init() {
3588+
super.init()
3589+
}
3590+
3591+
public init(_ dict: [String: Any]) {
3592+
super.init()
3593+
self.fromMap(dict)
3594+
}
3595+
3596+
public override func validate() throws -> Void {
3597+
try self.data?.validate()
3598+
}
3599+
3600+
public override func toMap() -> [String : Any] {
3601+
var map = super.toMap()
3602+
if self.code != nil {
3603+
map["Code"] = self.code!
3604+
}
3605+
if self.data != nil {
3606+
map["Data"] = self.data?.toMap()
3607+
}
3608+
if self.httpStatusCode != nil {
3609+
map["HttpStatusCode"] = self.httpStatusCode!
3610+
}
3611+
if self.requestId != nil {
3612+
map["RequestId"] = self.requestId!
3613+
}
3614+
return map
3615+
}
3616+
3617+
public override func fromMap(_ dict: [String: Any]) -> Void {
3618+
if dict.keys.contains("Code") {
3619+
self.code = dict["Code"] as! String
3620+
}
3621+
if dict.keys.contains("Data") {
3622+
var model = ApplyWsTokenResponseBody.Data()
3623+
model.fromMap(dict["Data"] as! [String: Any])
3624+
self.data = model
3625+
}
3626+
if dict.keys.contains("HttpStatusCode") {
3627+
self.httpStatusCode = dict["HttpStatusCode"] as! Int32
3628+
}
3629+
if dict.keys.contains("RequestId") {
3630+
self.requestId = dict["RequestId"] as! String
3631+
}
3632+
}
3633+
}
3634+
3635+
public class ApplyWsTokenResponse : Tea.TeaModel {
3636+
public var headers: [String: String]?
3637+
3638+
public var statusCode: Int32?
3639+
3640+
public var body: ApplyWsTokenResponseBody?
3641+
3642+
public override init() {
3643+
super.init()
3644+
}
3645+
3646+
public init(_ dict: [String: Any]) {
3647+
super.init()
3648+
self.fromMap(dict)
3649+
}
3650+
3651+
public override func validate() throws -> Void {
3652+
try self.body?.validate()
3653+
}
3654+
3655+
public override func toMap() -> [String : Any] {
3656+
var map = super.toMap()
3657+
if self.headers != nil {
3658+
map["headers"] = self.headers!
3659+
}
3660+
if self.statusCode != nil {
3661+
map["statusCode"] = self.statusCode!
3662+
}
3663+
if self.body != nil {
3664+
map["body"] = self.body?.toMap()
3665+
}
3666+
return map
3667+
}
3668+
3669+
public override func fromMap(_ dict: [String: Any]) -> Void {
3670+
if dict.keys.contains("headers") {
3671+
self.headers = dict["headers"] as! [String: String]
3672+
}
3673+
if dict.keys.contains("statusCode") {
3674+
self.statusCode = dict["statusCode"] as! Int32
3675+
}
3676+
if dict.keys.contains("body") {
3677+
var model = ApplyWsTokenResponseBody()
3678+
model.fromMap(dict["body"] as! [String: Any])
3679+
self.body = model
3680+
}
3681+
}
3682+
}
3683+
34953684
public class AssignReviewerRequest : Tea.TeaModel {
34963685
public var baseMeAgentId: Int64?
34973686

0 commit comments

Comments
 (0)