Modern Apps git

xtool.git

Public
git clone https://git.maproj.org/xtool.git
main ▾

xtool.git / Sources / XKit / DeveloperServices / App Groups / DeveloperServicesAssignAppGroupRequest.swift

DeveloperServicesAssignAppGroupRequest.swift43 lines · 1.2 KiBRaw
1//
2// DeveloperServicesAssignAppGroupRequest.swift
3// Supercharge
4//
5// Created by Kabir Oberai on 24/07/19.
6// Copyright © 2019 Kabir Oberai. All rights reserved.
7//
8
9import Foundation
10
11/// Replaces all of the app's groups with the given ones
12public final class DeveloperServicesAssignAppGroupRequest: DeveloperServicesPlatformRequest {
13
14 public struct Response: Decodable, Sendable {}
15 public typealias Value = Response
16
17 public let platform: DeveloperServicesPlatform
18 public let teamID: DeveloperServicesTeam.ID
19 public let appIDID: String
20 public let groupIDs: [DeveloperServicesAppGroup.ID]
21
22 var subAction: String { return "assignApplicationGroupToAppId" }
23 var subParameters: [String: Any] {
24 return [
25 "teamId": teamID.rawValue,
26 "appIdId": appIDID,
27 "applicationGroups": groupIDs.map(\.rawValue)
28 ]
29 }
30
31 public init(
32 platform: DeveloperServicesPlatform,
33 teamID: DeveloperServicesTeam.ID,
34 appIDID: String,
35 groupIDs: [DeveloperServicesAppGroup.ID]
36 ) {
37 self.platform = platform
38 self.teamID = teamID
39 self.appIDID = appIDID
40 self.groupIDs = groupIDs
41 }
42
43}