Skip to content

Commit 479dded

Browse files
committed
Support API DeployEnvironment.
1 parent eb28f0f commit 479dded

File tree

5 files changed

+204
-5
lines changed

5 files changed

+204
-5
lines changed

AlibabacloudDevs20230714.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 = "AlibabacloudDevs20230714"
4-
spec.version = "2.0.0"
4+
spec.version = "2.1.0"
55
spec.license = "Apache 2.0"
66
spec.summary = "Alibaba Cloud Devs (20230714) SDK Library for Swift"
77
spec.homepage = "https://github.com/alibabacloud-sdk-swift/devs-20230714"

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)`AlibabacloudDevs20230714` 集成到你的 Xcode 项目中,需要在 `Cartfile` 中定义以下内容:
1818

1919
```ogdl
20-
github "alibabacloud-sdk-swift/devs-20230714" "2.0.0"
20+
github "alibabacloud-sdk-swift/devs-20230714" "2.1.0"
2121
```
2222

2323
### Swift 包管理工具
@@ -26,7 +26,7 @@ github "alibabacloud-sdk-swift/devs-20230714" "2.0.0"
2626

2727
```swift
2828
dependencies: [
29-
.package(url: "https://github.com/alibabacloud-sdk-swift/devs-20230714.git", from: "2.0.0")
29+
.package(url: "https://github.com/alibabacloud-sdk-swift/devs-20230714.git", from: "2.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 `AlibabacloudDevs20230714` into your Xcode project using [Carthage](https://github.com/Carthage/Carthage), specify it in your `Cartfile`:
1818

1919
```ogdl
20-
github "alibabacloud-sdk-swift/devs-20230714" "2.0.0"
20+
github "alibabacloud-sdk-swift/devs-20230714" "2.1.0"
2121
```
2222

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

2727
```swift
2828
dependencies: [
29-
.package(url: "https://github.com/alibabacloud-sdk-swift/devs-20230714.git", from: "2.0.0")
29+
.package(url: "https://github.com/alibabacloud-sdk-swift/devs-20230714.git", from: "2.1.0")
3030
]
3131
```
3232

Sources/AlibabacloudDevs20230714/Client.swift

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,41 @@ open class Client : AlibabacloudOpenApi.Client {
301301
return try await deleteProjectWithOptions(name as! String, request as! DeleteProjectRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
302302
}
303303

304+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
305+
public func deployEnvironmentWithOptions(_ projectName: String, _ name: String, _ request: DeployEnvironmentRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> DeployEnvironmentResponse {
306+
try TeaUtils.Client.validateModel(request)
307+
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
308+
"headers": headers as! [String: String],
309+
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(request.body)
310+
])
311+
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
312+
"action": "DeployEnvironment",
313+
"version": "2023-07-14",
314+
"protocol": "HTTPS",
315+
"pathname": "/2023-07-14/projects/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(projectName)) + "/environments/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(name)) + "/deploy",
316+
"method": "PATCH",
317+
"authType": "AK",
318+
"style": "ROA",
319+
"reqBodyType": "json",
320+
"bodyType": "json"
321+
])
322+
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
323+
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
324+
return Tea.TeaConverter.fromMap(DeployEnvironmentResponse(), tmp)
325+
}
326+
else {
327+
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
328+
return Tea.TeaConverter.fromMap(DeployEnvironmentResponse(), tmp)
329+
}
330+
}
331+
332+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
333+
public func deployEnvironment(_ projectName: String, _ name: String, _ request: DeployEnvironmentRequest) async throws -> DeployEnvironmentResponse {
334+
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
335+
var headers: [String: String] = [:]
336+
return try await deployEnvironmentWithOptions(projectName as! String, name as! String, request as! DeployEnvironmentRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
337+
}
338+
304339
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
305340
public func getEnvironmentWithOptions(_ projectName: String, _ name: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> GetEnvironmentResponse {
306341
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
@@ -334,6 +369,39 @@ open class Client : AlibabacloudOpenApi.Client {
334369
return try await getEnvironmentWithOptions(projectName as! String, name as! String, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
335370
}
336371

372+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
373+
public func getEnvironmentDeploymentWithOptions(_ name: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> GetEnvironmentDeploymentResponse {
374+
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
375+
"headers": headers as! [String: String]
376+
])
377+
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
378+
"action": "GetEnvironmentDeployment",
379+
"version": "2023-07-14",
380+
"protocol": "HTTPS",
381+
"pathname": "/2023-07-14/environmentdeployments/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(name)),
382+
"method": "GET",
383+
"authType": "AK",
384+
"style": "ROA",
385+
"reqBodyType": "json",
386+
"bodyType": "json"
387+
])
388+
if (TeaUtils.Client.isUnset(self._signatureVersion) || !TeaUtils.Client.equalString(self._signatureVersion, "v4")) {
389+
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
390+
return Tea.TeaConverter.fromMap(GetEnvironmentDeploymentResponse(), tmp)
391+
}
392+
else {
393+
var tmp: [String: Any] = try await execute(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
394+
return Tea.TeaConverter.fromMap(GetEnvironmentDeploymentResponse(), tmp)
395+
}
396+
}
397+
398+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
399+
public func getEnvironmentDeployment(_ name: String) async throws -> GetEnvironmentDeploymentResponse {
400+
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
401+
var headers: [String: String] = [:]
402+
return try await getEnvironmentDeploymentWithOptions(name as! String, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
403+
}
404+
337405
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
338406
public func getPipelineWithOptions(_ name: String, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> GetPipelineResponse {
339407
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([

Sources/AlibabacloudDevs20230714/Models.swift

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13755,6 +13755,88 @@ public class DeleteProjectResponse : Tea.TeaModel {
1375513755
}
1375613756
}
1375713757

13758+
public class DeployEnvironmentRequest : Tea.TeaModel {
13759+
public var body: DeployEnvironmentOptions?
13760+
13761+
public override init() {
13762+
super.init()
13763+
}
13764+
13765+
public init(_ dict: [String: Any]) {
13766+
super.init()
13767+
self.fromMap(dict)
13768+
}
13769+
13770+
public override func validate() throws -> Void {
13771+
try self.body?.validate()
13772+
}
13773+
13774+
public override func toMap() -> [String : Any] {
13775+
var map = super.toMap()
13776+
if self.body != nil {
13777+
map["body"] = self.body?.toMap()
13778+
}
13779+
return map
13780+
}
13781+
13782+
public override func fromMap(_ dict: [String: Any]) -> Void {
13783+
if dict.keys.contains("body") {
13784+
var model = DeployEnvironmentOptions()
13785+
model.fromMap(dict["body"] as! [String: Any])
13786+
self.body = model
13787+
}
13788+
}
13789+
}
13790+
13791+
public class DeployEnvironmentResponse : Tea.TeaModel {
13792+
public var headers: [String: String]?
13793+
13794+
public var statusCode: Int32?
13795+
13796+
public var body: EnvironmentDeployment?
13797+
13798+
public override init() {
13799+
super.init()
13800+
}
13801+
13802+
public init(_ dict: [String: Any]) {
13803+
super.init()
13804+
self.fromMap(dict)
13805+
}
13806+
13807+
public override func validate() throws -> Void {
13808+
try self.body?.validate()
13809+
}
13810+
13811+
public override func toMap() -> [String : Any] {
13812+
var map = super.toMap()
13813+
if self.headers != nil {
13814+
map["headers"] = self.headers!
13815+
}
13816+
if self.statusCode != nil {
13817+
map["statusCode"] = self.statusCode!
13818+
}
13819+
if self.body != nil {
13820+
map["body"] = self.body?.toMap()
13821+
}
13822+
return map
13823+
}
13824+
13825+
public override func fromMap(_ dict: [String: Any]) -> Void {
13826+
if dict.keys.contains("headers") {
13827+
self.headers = dict["headers"] as! [String: String]
13828+
}
13829+
if dict.keys.contains("statusCode") {
13830+
self.statusCode = dict["statusCode"] as! Int32
13831+
}
13832+
if dict.keys.contains("body") {
13833+
var model = EnvironmentDeployment()
13834+
model.fromMap(dict["body"] as! [String: Any])
13835+
self.body = model
13836+
}
13837+
}
13838+
}
13839+
1375813840
public class GetEnvironmentResponse : Tea.TeaModel {
1375913841
public var headers: [String: String]?
1376013842

@@ -13804,6 +13886,55 @@ public class GetEnvironmentResponse : Tea.TeaModel {
1380413886
}
1380513887
}
1380613888

13889+
public class GetEnvironmentDeploymentResponse : Tea.TeaModel {
13890+
public var headers: [String: String]?
13891+
13892+
public var statusCode: Int32?
13893+
13894+
public var body: EnvironmentDeployment?
13895+
13896+
public override init() {
13897+
super.init()
13898+
}
13899+
13900+
public init(_ dict: [String: Any]) {
13901+
super.init()
13902+
self.fromMap(dict)
13903+
}
13904+
13905+
public override func validate() throws -> Void {
13906+
try self.body?.validate()
13907+
}
13908+
13909+
public override func toMap() -> [String : Any] {
13910+
var map = super.toMap()
13911+
if self.headers != nil {
13912+
map["headers"] = self.headers!
13913+
}
13914+
if self.statusCode != nil {
13915+
map["statusCode"] = self.statusCode!
13916+
}
13917+
if self.body != nil {
13918+
map["body"] = self.body?.toMap()
13919+
}
13920+
return map
13921+
}
13922+
13923+
public override func fromMap(_ dict: [String: Any]) -> Void {
13924+
if dict.keys.contains("headers") {
13925+
self.headers = dict["headers"] as! [String: String]
13926+
}
13927+
if dict.keys.contains("statusCode") {
13928+
self.statusCode = dict["statusCode"] as! Int32
13929+
}
13930+
if dict.keys.contains("body") {
13931+
var model = EnvironmentDeployment()
13932+
model.fromMap(dict["body"] as! [String: Any])
13933+
self.body = model
13934+
}
13935+
}
13936+
}
13937+
1380713938
public class GetPipelineResponse : Tea.TeaModel {
1380813939
public var headers: [String: String]?
1380913940

0 commit comments

Comments
 (0)