Browse Source

New: independent credential data class from file and upload mission

liweihao 5 years ago
parent
commit
7389204637

+ 11 - 0
src/main/java/com/example/kdan_data_center/datacenter/file/data/Credentials.kt

@@ -0,0 +1,11 @@
+package com.example.kdan_data_center.datacenter.file.data
+
+import com.google.gson.annotations.SerializedName
+
+
+data class Credentials(
+        @SerializedName("access_key_id") val accessKeyId: String,
+        @SerializedName("secret_access_key") val secretAccessKey: String,
+        @SerializedName("session_token") val sessionToken: String,
+        @SerializedName("expiration") val expiration: String
+)

+ 0 - 8
src/main/java/com/example/kdan_data_center/datacenter/file/data/FileCredentialData.kt

@@ -14,14 +14,6 @@ data class FileCredentialData(
             @SerializedName("packed_policy_size") val packedPolicySize: Int
     ) {
 
-        data class Credentials(
-                @SerializedName("access_key_id") val accessKeyId: String,
-                @SerializedName("secret_access_key") val secretAccessKey: String,
-                @SerializedName("session_token") val sessionToken: String,
-                @SerializedName("expiration") val expiration: String
-        )
-
-
         data class FederatedUser(
                 @SerializedName("federated_user_id") val federatedUserId: String,
                 @SerializedName("arn") val arn: String

+ 0 - 8
src/main/java/com/example/kdan_data_center/datacenter/file/data/UploadMissionData.kt

@@ -20,14 +20,6 @@ data class UploadMissionData(
                 @SerializedName("packed_policy_size") val packedPolicySize: Int
         ) {
 
-            data class Credentials(
-                    @SerializedName("access_key_id") val accessKeyId: String,
-                    @SerializedName("secret_access_key") val secretAccessKey: String,
-                    @SerializedName("session_token") val sessionToken: String,
-                    @SerializedName("expiration") val expiration: String
-            )
-
-
             data class FederatedUser(
                     @SerializedName("federated_user_id") val federatedUserId: String,
                     @SerializedName("arn") val arn: String