From 85eb29daa9692ea3f578f631eb7a5a5240440819 Mon Sep 17 00:00:00 2001 From: "ed.hicks@vimeo.com" Date: Tue, 7 Jun 2022 23:36:45 -0400 Subject: [PATCH 1/3] Update PermissionPolicy with missing fields. --- CHANGELOG.md | 5 +++++ .../com/vimeo/networking2/ApiConstants.kt | 2 +- gradle.properties | 2 +- .../com/vimeo/networking2/PermissionPolicy.kt | 22 ++++++++++++++----- 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9eecd54e..b41bedde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ Change Log ========== +Version 3.7.0 *(2022-06-08)* +---------------------------- +- Added `displayName`, `displayDescription` to `PermissionPolicy` +- Made `PermissionPolicy` implement `Entity` + Version 3.6.0 *(2022-06-07)* ---------------------------- - Added `unit` to `StorageQuota`. diff --git a/api-core/src/main/java/com/vimeo/networking2/ApiConstants.kt b/api-core/src/main/java/com/vimeo/networking2/ApiConstants.kt index e319a3c8..14cda301 100644 --- a/api-core/src/main/java/com/vimeo/networking2/ApiConstants.kt +++ b/api-core/src/main/java/com/vimeo/networking2/ApiConstants.kt @@ -33,7 +33,7 @@ object ApiConstants { const val SSL_URL_PATTERN = "*.vimeo.com" - const val SDK_VERSION = "3.6.0" + const val SDK_VERSION = "3.7.0" const val NONE = -1 diff --git a/gradle.properties b/gradle.properties index b5da4b2a..4b814962 100644 --- a/gradle.properties +++ b/gradle.properties @@ -19,7 +19,7 @@ org.gradle.parallel=true org.gradle.daemon=true org.gradle.jvmargs=-Xmx4096M -version=3.6.0 +version=3.7.0 android.useAndroidX=true android.enableJetifier=true diff --git a/models/src/main/java/com/vimeo/networking2/PermissionPolicy.kt b/models/src/main/java/com/vimeo/networking2/PermissionPolicy.kt index 17012514..c002f3f5 100644 --- a/models/src/main/java/com/vimeo/networking2/PermissionPolicy.kt +++ b/models/src/main/java/com/vimeo/networking2/PermissionPolicy.kt @@ -2,15 +2,18 @@ package com.vimeo.networking2 import com.squareup.moshi.Json import com.squareup.moshi.JsonClass +import com.vimeo.networking2.common.Entity import java.util.Date /** * A permission policy which represents a collection or permutation of certain [PermissionActions]. * - * @property uri The uri for the permission policy - * @property name The displayable name for the permission policy - * @property createdOn The date the policy was created - * @property modifiedOn The date the policy was last modified on + * @property uri The uri for the permission policy. + * @property name The displayable name for the permission policy. + * @param displayName The name of the permission level, translated and ready for client display. + * @param displayDescription The description of the permission level, for client display. + * @property createdOn The date the policy was created. + * @property modifiedOn The date the policy was last modified on. * @property permissionActions The actions the user can take. */ @JsonClass(generateAdapter = true) @@ -22,6 +25,12 @@ data class PermissionPolicy( @Json(name = "name") val name: String? = null, + @Json(name = "display_name") + val displayName: String? = null, + + @Json(name = "display_description") + val displayDescription: String? = null, + @Json(name = "created_on") val createdOn: Date? = null, @@ -30,4 +39,7 @@ data class PermissionPolicy( @Json(name = "permission_actions") val permissionActions: PermissionActions? = null -) +) :Entity { + override val identifier: String? + get() = uri +} From e5b2a8f4442a233eb98f725ae86c49ee49aaebfc Mon Sep 17 00:00:00 2001 From: "ed.hicks@vimeo.com" Date: Wed, 8 Jun 2022 15:12:00 -0400 Subject: [PATCH 2/3] change identifier per feedback --- models/src/main/java/com/vimeo/networking2/PermissionPolicy.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/models/src/main/java/com/vimeo/networking2/PermissionPolicy.kt b/models/src/main/java/com/vimeo/networking2/PermissionPolicy.kt index c002f3f5..52f9c1ff 100644 --- a/models/src/main/java/com/vimeo/networking2/PermissionPolicy.kt +++ b/models/src/main/java/com/vimeo/networking2/PermissionPolicy.kt @@ -40,6 +40,5 @@ data class PermissionPolicy( @Json(name = "permission_actions") val permissionActions: PermissionActions? = null ) :Entity { - override val identifier: String? - get() = uri + override val identifier: String? = uri } From 918ede25d48607ef09e5fd5afff82e067ecfde30 Mon Sep 17 00:00:00 2001 From: "ed.hicks@vimeo.com" Date: Wed, 8 Jun 2022 15:23:10 -0400 Subject: [PATCH 3/3] detektFormat --- models/src/main/java/com/vimeo/networking2/PermissionPolicy.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/src/main/java/com/vimeo/networking2/PermissionPolicy.kt b/models/src/main/java/com/vimeo/networking2/PermissionPolicy.kt index 52f9c1ff..9bfa86c4 100644 --- a/models/src/main/java/com/vimeo/networking2/PermissionPolicy.kt +++ b/models/src/main/java/com/vimeo/networking2/PermissionPolicy.kt @@ -39,6 +39,6 @@ data class PermissionPolicy( @Json(name = "permission_actions") val permissionActions: PermissionActions? = null -) :Entity { +) : Entity { override val identifier: String? = uri }