Skip to content

Commit 8410fea

Browse files
committed
chore(storage): Added request swiftdoc tags
1 parent 96d4bc0 commit 8410fea

8 files changed

+152
-1
lines changed

Amplify/Categories/Storage/Operation/Request/StorageDownloadDataRequest.swift

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,58 @@
77

88
import Foundation
99

10+
/// Represents a request to download an individual object as `Data`, initiated by an implementation of the
11+
/// [StorageCategoryPlugin](x-source-tag://StorageCategoryPlugin) protocol.
12+
///
13+
/// - Tag: StorageDownloadDataRequest
1014
public struct StorageDownloadDataRequest: AmplifyOperationRequest {
15+
1116
/// The unique identifier for the object in storage
17+
///
18+
/// - Tag: StorageDownloadDataRequest.key
1219
public let key: String
1320

1421
/// Options to adjust the behavior of this request, including plugin-options
22+
///
23+
/// - Tag: StorageDownloadDataRequest.options
1524
public let options: Options
1625

26+
/// - Tag: StorageDownloadDataRequest.key
1727
public init(key: String, options: Options) {
1828
self.key = key
1929
self.options = options
2030
}
2131
}
2232

2333
public extension StorageDownloadDataRequest {
34+
2435
/// Options to adjust the behavior of this request, including plugin-options
36+
///
37+
/// - Tag: StorageDownloadDataRequestOptions
2538
struct Options {
39+
2640
/// Access level of the storage system. Defaults to `public`
41+
///
42+
/// - Tag: StorageDownloadDataRequestOptions.accessLevel
2743
public let accessLevel: StorageAccessLevel
2844

2945
/// Target user to apply the action on.
46+
///
47+
/// - Tag: StorageDownloadDataRequestOptions.targetIdentityId
3048
public let targetIdentityId: String?
3149

3250
/// Extra plugin specific options, only used in special circumstances when the existing options do not provide
3351
/// a way to utilize the underlying storage system's functionality. See plugin documentation for expected
3452
/// key/values
53+
///
54+
/// - Tag: StorageDownloadDataRequestOptions.pluginOptions
3555
public let pluginOptions: Any?
3656

3757
// TODO: transferAcceleration should be in pluginOptions
3858
// https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html
3959

60+
///
61+
/// - Tag: StorageDownloadDataRequestOptions.init
4062
public init(accessLevel: StorageAccessLevel = .guest,
4163
targetIdentityId: String? = nil,
4264
pluginOptions: Any? = nil) {

Amplify/Categories/Storage/Operation/Request/StorageDownloadFileRequest.swift

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,28 @@
77

88
import Foundation
99

10+
/// Represents a request to download an individual object as a file, initiated by an implementation of the
11+
/// [StorageCategoryPlugin](x-source-tag://StorageCategoryPlugin) protocol.
12+
///
13+
/// - Tag: StorageDownloadFileRequest
1014
public struct StorageDownloadFileRequest: AmplifyOperationRequest {
15+
1116
/// The unique identifier for the object in storage
17+
///
18+
/// - Tag: StorageDownloadFileRequest.key
1219
public let key: String
1320

1421
/// The local file to download the object to
22+
///
23+
/// - Tag: StorageDownloadFileRequest.local
1524
public let local: URL
1625

1726
/// Options to adjust the behavior of this request, including plugin options
27+
///
28+
/// - Tag: StorageDownloadFileRequest.options
1829
public let options: Options
1930

31+
/// - Tag: StorageDownloadFileRequest.init
2032
public init(key: String, local: URL, options: Options) {
2133
self.key = key
2234
self.local = local
@@ -25,19 +37,30 @@ public struct StorageDownloadFileRequest: AmplifyOperationRequest {
2537
}
2638

2739
public extension StorageDownloadFileRequest {
40+
2841
/// Options to adjust the behavior of this request, including plugin-options
42+
///
43+
/// - Tag: StorageDownloadFileRequestOptions
2944
struct Options {
45+
3046
/// Access level of the storage system. Defaults to `public`
47+
///
48+
/// - Tag: StorageDownloadFileRequestOptions.accessLevel
3149
public let accessLevel: StorageAccessLevel
3250

3351
/// Target user to apply the action on.
52+
///
53+
/// - Tag: StorageDownloadFileRequestOptions.targetIdentityId
3454
public let targetIdentityId: String?
3555

3656
/// Extra plugin specific options, only used in special circumstances when the existing options do not provide
3757
/// a way to utilize the underlying storage system's functionality. See plugin documentation for expected
3858
/// key/values
59+
///
60+
/// - Tag: StorageDownloadFileRequestOptions.pluginOptions
3961
public let pluginOptions: Any?
4062

63+
/// - Tag: StorageDownloadFileRequestOptions.init
4164
public init(accessLevel: StorageAccessLevel = .guest,
4265
targetIdentityId: String? = nil,
4366
pluginOptions: Any? = nil) {

Amplify/Categories/Storage/Operation/Request/StorageGetURLRequest.swift

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,39 +5,65 @@
55
// SPDX-License-Identifier: Apache-2.0
66
//
77

8+
/// Represents a request initiated by an implementation of the
9+
/// [StorageCategoryPlugin](x-source-tag://StorageCategoryPlugin) protocol used to generate
10+
/// a pre-signed download URL for a given object key.
11+
///
12+
/// - Tag: StorageListRequest
813
public struct StorageGetURLRequest: AmplifyOperationRequest {
14+
915
/// The unique identifier for the object in storage
16+
///
17+
/// - Tag: StorageListRequest.key
1018
public let key: String
1119

1220
/// Options to adjust the behavior of this request, including plugin-options
21+
///
22+
/// - Tag: StorageListRequest.options
1323
public let options: Options
1424

25+
/// - Tag: StorageListRequest.init
1526
public init(key: String, options: Options) {
1627
self.key = key
1728
self.options = options
1829
}
1930
}
2031

2132
public extension StorageGetURLRequest {
33+
2234
/// Options to adjust the behavior of this request, including plugin-options
35+
///
36+
/// - Tag: StorageListRequestOptions
2337
struct Options {
2438
/// The default amount of time before the URL expires is 18000 seconds, or 5 hours.
39+
///
40+
/// - Tag: StorageListRequestOptions.defaultExpireInSeconds
2541
public static let defaultExpireInSeconds = 18_000
2642

2743
/// Access level of the storage system. Defaults to `public`
44+
///
45+
/// - Tag: StorageListRequestOptions.accessLevel
2846
public let accessLevel: StorageAccessLevel
2947

3048
/// Target user to apply the action on.
49+
///
50+
/// - Tag: StorageListRequestOptions.targetIdentityId
3151
public let targetIdentityId: String?
3252

33-
/// Number of seconds before the URL expires. Defaults to `defaultExpireInSeconds`
53+
/// Number of seconds before the URL expires. Defaults to
54+
/// [defaultExpireInSeconds](x-source-tag://StorageListRequestOptions.defaultExpireInSeconds)
55+
///
56+
/// - Tag: StorageListRequestOptions.expires
3457
public let expires: Int
3558

3659
/// Extra plugin specific options, only used in special circumstances when the existing options do not provide
3760
/// a way to utilize the underlying storage system's functionality. See plugin documentation for expected
3861
/// key/values
62+
///
63+
/// - Tag: StorageListRequestOptions.pluginOptions
3964
public let pluginOptions: Any?
4065

66+
/// - Tag: StorageListRequestOptions.init
4167
public init(accessLevel: StorageAccessLevel = .guest,
4268
targetIdentityId: String? = nil,
4369
expires: Int = Options.defaultExpireInSeconds,

Amplify/Categories/Storage/Operation/Request/StorageListRequest.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
// SPDX-License-Identifier: Apache-2.0
66
//
77

8+
/// Represents a object listing request initiated by an implementation of the
9+
/// [StorageCategoryPlugin](x-source-tag://StorageCategoryPlugin) protocol.
10+
///
811
/// - Tag: StorageListRequest
912
public struct StorageListRequest: AmplifyOperationRequest {
1013

Amplify/Categories/Storage/Operation/Request/StorageRemoveRequest.swift

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,49 @@
55
// SPDX-License-Identifier: Apache-2.0
66
//
77

8+
/// Represents a object removal request initiated by an implementation of the
9+
/// [StorageCategoryPlugin](x-source-tag://StorageCategoryPlugin) protocol.
10+
///
11+
/// - Tag: StorageRemoveRequest
812
public struct StorageRemoveRequest: AmplifyOperationRequest {
13+
914
/// The unique identifier for the object in storage
15+
///
16+
/// - Tag: StorageRemoveRequest.key
1017
public let key: String
1118

1219
/// Options to adjust the behavior of this request, including plugin-options
20+
///
21+
/// - Tag: StorageRemoveRequest.options
1322
public let options: Options
1423

24+
/// - Tag: StorageRemoveRequest.init
1525
public init(key: String, options: Options) {
1626
self.key = key
1727
self.options = options
1828
}
1929
}
2030

2131
public extension StorageRemoveRequest {
32+
2233
/// Options to adjust the behavior of this request, including plugin-options
34+
///
35+
/// - Tag: StorageRemoveRequestOptions
2336
struct Options {
37+
2438
/// Access level of the storage system. Defaults to `public`
39+
///
40+
/// - Tag: StorageRemoveRequestOptions.accessLevel
2541
public let accessLevel: StorageAccessLevel
2642

2743
/// Extra plugin specific options, only used in special circumstances when the existing options do not provide
2844
/// a way to utilize the underlying storage system's functionality. See plugin documentation for expected
2945
/// key/values
46+
///
47+
/// - Tag: StorageRemoveRequestOptions.pluginOptions
3048
public let pluginOptions: Any?
3149

50+
/// - Tag: StorageRemoveRequestOptions.init
3251
public init(accessLevel: StorageAccessLevel = .guest,
3352
pluginOptions: Any? = nil) {
3453
self.accessLevel = accessLevel

Amplify/Categories/Storage/Operation/Request/StorageUploadDataRequest.swift

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,28 @@
77

88
import Foundation
99

10+
/// Represents an **data** upload request initiated by an implementation of the
11+
/// [StorageCategoryPlugin](x-source-tag://StorageCategoryPlugin) protocol.
12+
///
13+
/// - Tag: StorageUploadDataRequest
1014
public struct StorageUploadDataRequest: AmplifyOperationRequest {
1115

1216
/// The unique identifier for the object in storage
17+
///
18+
/// - Tag: StorageUploadDataRequest.key
1319
public let key: String
1420

1521
/// The data in memory to be uploaded
22+
///
23+
/// - Tag: StorageUploadDataRequest.data
1624
public let data: Data
1725

1826
/// Options to adjust the behavior of this request, including plugin-options
27+
///
28+
/// - Tag: StorageUploadDataRequest.options
1929
public let options: Options
2030

31+
/// - Tag: StorageUploadDataRequest.init
2132
public init(key: String, data: Data, options: Options) {
2233
self.key = key
2334
self.data = data
@@ -26,25 +37,40 @@ public struct StorageUploadDataRequest: AmplifyOperationRequest {
2637
}
2738

2839
public extension StorageUploadDataRequest {
40+
2941
/// Options to adjust the behavior of this request, including plugin-options
42+
///
43+
/// - Tag: StorageUploadDataRequestOptions
3044
struct Options {
45+
3146
/// Access level of the storage system. Defaults to `public`
47+
///
48+
/// - Tag: StorageUploadDataRequestOptions.accessLevel
3249
public let accessLevel: StorageAccessLevel
3350

3451
/// Target user to apply the action on.
52+
///
53+
/// - Tag: StorageUploadDataRequestOptions.targetIdentityId
3554
public let targetIdentityId: String?
3655

3756
/// Metadata for the object to store
57+
///
58+
/// - Tag: StorageUploadDataRequestOptions.metadata
3859
public let metadata: [String: String]?
3960

4061
/// The standard MIME type describing the format of the object to store
62+
///
63+
/// - Tag: StorageUploadDataRequestOptions.contentType
4164
public let contentType: String?
4265

4366
/// Extra plugin specific options, only used in special circumstances when the existing options do not provide
4467
/// a way to utilize the underlying storage system's functionality. See plugin documentation for expected
4568
/// key/values
69+
///
70+
/// - Tag: StorageUploadDataRequestOptions.pluginOptions
4671
public let pluginOptions: Any?
4772

73+
/// - Tag: StorageUploadDataRequestOptions.init
4874
public init(accessLevel: StorageAccessLevel = .guest,
4975
targetIdentityId: String? = nil,
5076
metadata: [String: String]? = nil,

Amplify/Categories/Storage/Operation/Request/StorageUploadFileRequest.swift

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,25 @@
77

88
import Foundation
99

10+
/// Represents an **file** upload request initiated by an implementation of the
11+
/// [StorageCategoryPlugin](x-source-tag://StorageCategoryPlugin) protocol.
12+
///
13+
/// - Tag: StorageUploadFileRequest
1014
public struct StorageUploadFileRequest: AmplifyOperationRequest {
15+
1116
/// The unique identifier for the object in storage
17+
/// - Tag: StorageUploadFileRequest.key
1218
public let key: String
1319

1420
/// The file to be uploaded
21+
/// - Tag: StorageUploadFileRequest.local
1522
public let local: URL
1623

1724
/// Options to adjust the behavior of this request, including plugin-options
25+
/// - Tag: StorageUploadFileRequest.options
1826
public let options: Options
1927

28+
/// - Tag: StorageUploadFileRequest.init
2029
public init(key: String, local: URL, options: Options) {
2130
self.key = key
2231
self.local = local
@@ -25,25 +34,40 @@ public struct StorageUploadFileRequest: AmplifyOperationRequest {
2534
}
2635

2736
public extension StorageUploadFileRequest {
37+
2838
/// Options to adjust the behavior of this request, including plugin-options
39+
///
40+
/// - Tag: StorageUploadFileRequestOptions
2941
struct Options {
42+
3043
/// Access level of the storage system. Defaults to `public`
44+
///
45+
/// - Tag: StorageUploadFileRequestOptions.accessLevel
3146
public let accessLevel: StorageAccessLevel
3247

3348
/// Target user to apply the action on.
49+
///
50+
/// - Tag: StorageUploadFileRequestOptions.targetIdentityId
3451
public let targetIdentityId: String?
3552

3653
/// Metadata for the object to store
54+
///
55+
/// - Tag: StorageUploadFileRequestOptions.metadata
3756
public let metadata: [String: String]?
3857

3958
/// The standard MIME type describing the format of the object to store
59+
///
60+
/// - Tag: StorageUploadFileRequestOptions.contentType
4061
public let contentType: String?
4162

4263
/// Extra plugin specific options, only used in special circumstances when the existing options do not provide
4364
/// a way to utilize the underlying storage system's functionality. See plugin documentation for expected
4465
/// key/values
66+
///
67+
/// - Tag: StorageUploadFileRequestOptions.pluginOptions
4568
public let pluginOptions: Any?
4669

70+
/// - Tag: StorageUploadFileRequestOptions.init
4771
public init(accessLevel: StorageAccessLevel = .guest,
4872
targetIdentityId: String? = nil,
4973
metadata: [String: String]? = nil,

0 commit comments

Comments
 (0)