Skip to content

Commit 8dcb8ed

Browse files
committed
Support API UpdateGroup.
1 parent f46f776 commit 8dcb8ed

File tree

5 files changed

+147
-5
lines changed

5 files changed

+147
-5
lines changed

AlibabacloudEas20210701.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 = "AlibabacloudEas20210701"
4-
spec.version = "7.0.4"
4+
spec.version = "7.1.0"
55
spec.license = "Apache 2.0"
66
spec.summary = "Alibaba Cloud eas (20210701) SDK Library for Swift"
77
spec.homepage = "https://github.com/alibabacloud-sdk-swift/eas-20210701"

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

1919
```ogdl
20-
github "alibabacloud-sdk-swift/eas-20210701" "7.0.4"
20+
github "alibabacloud-sdk-swift/eas-20210701" "7.1.0"
2121
```
2222

2323
### Swift 包管理工具
@@ -26,7 +26,7 @@ github "alibabacloud-sdk-swift/eas-20210701" "7.0.4"
2626

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

1919
```ogdl
20-
github "alibabacloud-sdk-swift/eas-20210701" "7.0.4"
20+
github "alibabacloud-sdk-swift/eas-20210701" "7.1.0"
2121
```
2222

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

2727
```swift
2828
dependencies: [
29-
.package(url: "https://github.com/alibabacloud-sdk-swift/eas-20210701.git", from: "7.0.4")
29+
.package(url: "https://github.com/alibabacloud-sdk-swift/eas-20210701.git", from: "7.1.0")
3030
]
3131
```
3232

Sources/AlibabacloudEas20210701/Client.swift

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3162,6 +3162,39 @@ open class Client : AlibabacloudOpenApi.Client {
31623162
return try await updateGatewayWithOptions(GatewayId as! String, ClusterId as! String, request as! UpdateGatewayRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
31633163
}
31643164

3165+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
3166+
public func updateGroupWithOptions(_ ClusterId: String, _ GroupName: String, _ request: UpdateGroupRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> UpdateGroupResponse {
3167+
try TeaUtils.Client.validateModel(request)
3168+
var body: [String: Any] = [:]
3169+
if (!TeaUtils.Client.isUnset(request.trafficMode)) {
3170+
body["TrafficMode"] = request.trafficMode ?? "";
3171+
}
3172+
var req: AlibabacloudOpenApi.OpenApiRequest = AlibabacloudOpenApi.OpenApiRequest([
3173+
"headers": headers as! [String: String],
3174+
"body": AlibabaCloudOpenApiUtil.Client.parseToMap(body)
3175+
])
3176+
var params: AlibabacloudOpenApi.Params = AlibabacloudOpenApi.Params([
3177+
"action": "UpdateGroup",
3178+
"version": "2021-07-01",
3179+
"protocol": "HTTPS",
3180+
"pathname": "/api/v2/groups/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(ClusterId)) + "/" + (AlibabaCloudOpenApiUtil.Client.getEncodeParam(GroupName)),
3181+
"method": "PUT",
3182+
"authType": "AK",
3183+
"style": "ROA",
3184+
"reqBodyType": "json",
3185+
"bodyType": "json"
3186+
])
3187+
var tmp: [String: Any] = try await callApi(params as! AlibabacloudOpenApi.Params, req as! AlibabacloudOpenApi.OpenApiRequest, runtime as! TeaUtils.RuntimeOptions)
3188+
return Tea.TeaConverter.fromMap(UpdateGroupResponse(), tmp)
3189+
}
3190+
3191+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
3192+
public func updateGroup(_ ClusterId: String, _ GroupName: String, _ request: UpdateGroupRequest) async throws -> UpdateGroupResponse {
3193+
var runtime: TeaUtils.RuntimeOptions = TeaUtils.RuntimeOptions([:])
3194+
var headers: [String: String] = [:]
3195+
return try await updateGroupWithOptions(ClusterId as! String, GroupName as! String, request as! UpdateGroupRequest, headers as! [String: String], runtime as! TeaUtils.RuntimeOptions)
3196+
}
3197+
31653198
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
31663199
public func updateResourceWithOptions(_ ClusterId: String, _ ResourceId: String, _ request: UpdateResourceRequest, _ headers: [String: String], _ runtime: TeaUtils.RuntimeOptions) async throws -> UpdateResourceResponse {
31673200
try TeaUtils.Client.validateModel(request)

Sources/AlibabacloudEas20210701/Models.swift

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15974,6 +15974,115 @@ public class UpdateGatewayResponse : Tea.TeaModel {
1597415974
}
1597515975
}
1597615976

15977+
public class UpdateGroupRequest : Tea.TeaModel {
15978+
public var trafficMode: String?
15979+
15980+
public override init() {
15981+
super.init()
15982+
}
15983+
15984+
public init(_ dict: [String: Any]) {
15985+
super.init()
15986+
self.fromMap(dict)
15987+
}
15988+
15989+
public override func validate() throws -> Void {
15990+
}
15991+
15992+
public override func toMap() -> [String : Any] {
15993+
var map = super.toMap()
15994+
if self.trafficMode != nil {
15995+
map["TrafficMode"] = self.trafficMode!
15996+
}
15997+
return map
15998+
}
15999+
16000+
public override func fromMap(_ dict: [String: Any]) -> Void {
16001+
if dict.keys.contains("TrafficMode") {
16002+
self.trafficMode = dict["TrafficMode"] as! String
16003+
}
16004+
}
16005+
}
16006+
16007+
public class UpdateGroupResponseBody : Tea.TeaModel {
16008+
public var requestId: String?
16009+
16010+
public override init() {
16011+
super.init()
16012+
}
16013+
16014+
public init(_ dict: [String: Any]) {
16015+
super.init()
16016+
self.fromMap(dict)
16017+
}
16018+
16019+
public override func validate() throws -> Void {
16020+
}
16021+
16022+
public override func toMap() -> [String : Any] {
16023+
var map = super.toMap()
16024+
if self.requestId != nil {
16025+
map["RequestId"] = self.requestId!
16026+
}
16027+
return map
16028+
}
16029+
16030+
public override func fromMap(_ dict: [String: Any]) -> Void {
16031+
if dict.keys.contains("RequestId") {
16032+
self.requestId = dict["RequestId"] as! String
16033+
}
16034+
}
16035+
}
16036+
16037+
public class UpdateGroupResponse : Tea.TeaModel {
16038+
public var headers: [String: String]?
16039+
16040+
public var statusCode: Int32?
16041+
16042+
public var body: UpdateGroupResponseBody?
16043+
16044+
public override init() {
16045+
super.init()
16046+
}
16047+
16048+
public init(_ dict: [String: Any]) {
16049+
super.init()
16050+
self.fromMap(dict)
16051+
}
16052+
16053+
public override func validate() throws -> Void {
16054+
try self.body?.validate()
16055+
}
16056+
16057+
public override func toMap() -> [String : Any] {
16058+
var map = super.toMap()
16059+
if self.headers != nil {
16060+
map["headers"] = self.headers!
16061+
}
16062+
if self.statusCode != nil {
16063+
map["statusCode"] = self.statusCode!
16064+
}
16065+
if self.body != nil {
16066+
map["body"] = self.body?.toMap()
16067+
}
16068+
return map
16069+
}
16070+
16071+
public override func fromMap(_ dict: [String: Any]) -> Void {
16072+
if dict.keys.contains("headers") {
16073+
self.headers = dict["headers"] as! [String: String]
16074+
}
16075+
if dict.keys.contains("statusCode") {
16076+
self.statusCode = dict["statusCode"] as! Int32
16077+
}
16078+
if dict.keys.contains("body") {
16079+
var model = UpdateGroupResponseBody()
16080+
model.fromMap(dict["body"] as! [String: Any])
16081+
self.body = model
16082+
}
16083+
}
16084+
}
16085+
1597716086
public class UpdateResourceRequest : Tea.TeaModel {
1597816087
public class SelfManagedResourceOptions : Tea.TeaModel {
1597916088
public class NodeTolerations : Tea.TeaModel {

0 commit comments

Comments
 (0)