File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
google-cloud-storage/src/main/java/com/google/cloud/storage Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 3131import com .fasterxml .jackson .datatype .jsr310 .JavaTimeModule ;
3232import com .google .api .client .util .ObjectParser ;
3333import com .google .cloud .StringEnumValue ;
34+ import com .google .cloud .storage .multipartupload .model .ObjectLockMode ;
3435import com .google .common .annotations .VisibleForTesting ;
3536import com .google .common .collect .ImmutableList ;
3637import com .google .common .collect .ImmutableMap ;
@@ -67,13 +68,18 @@ public Version version() {
6768 public void setupModule (SetupContext context ) {
6869 context .addSerializers (
6970 new SimpleSerializers (
70- ImmutableList .of (new StringEnumValueSerializer <>(StorageClass .class ))));
71+ ImmutableList .of (
72+ new StringEnumValueSerializer <>(StorageClass .class ),
73+ new StringEnumValueSerializer <>(ObjectLockMode .class ))));
7174 context .addDeserializers (
7275 new SimpleDeserializers (
7376 ImmutableMap .of (
7477 StorageClass .class ,
7578 new StringEnumValueDeserializer <>(
76- StorageClass .class , StorageClass ::valueOf ))));
79+ StorageClass .class , StorageClass ::valueOf ),
80+ ObjectLockMode .class ,
81+ new StringEnumValueDeserializer <>(
82+ ObjectLockMode .class , ObjectLockMode ::valueOf ))));
7783 }
7884 });
7985 }
You can’t perform that action at this time.
0 commit comments