@@ -35,63 +35,49 @@ data class ShareeOcsResponse(
35
35
@Json(name = " exact" )
36
36
val exact : ExactSharees ? ,
37
37
@Json(name = " groups" )
38
- val groups : List <ShareeItem >? ,
38
+ val groups : List <ShareeItem >,
39
39
@Json(name = " remotes" )
40
- val remotes : List <ShareeItem >? ,
40
+ val remotes : List <ShareeItem >,
41
41
@Json(name = " users" )
42
- val users : List <ShareeItem >?
42
+ val users : List <ShareeItem >
43
43
) {
44
- fun getFlatRepresentationWithoutExact ()
45
- = ArrayList <ShareeItem >().apply {
46
- if (users != null ) {
47
- addAll(users)
48
- }
49
- if (remotes != null ) {
50
- addAll(remotes)
51
- }
52
- if (groups != null ) {
53
- addAll(groups)
54
- }
44
+ fun getFlatRepresentationWithoutExact () = ArrayList <ShareeItem >().apply {
45
+ addAll(users)
46
+ addAll(remotes)
47
+ addAll(groups)
55
48
}
56
49
}
57
50
58
51
@JsonClass(generateAdapter = true )
59
52
data class ExactSharees (
60
53
@Json(name = " groups" )
61
- val groups : List <ShareeItem >? ,
54
+ val groups : List <ShareeItem >,
62
55
@Json(name = " remotes" )
63
- val remotes : List <ShareeItem >? ,
56
+ val remotes : List <ShareeItem >,
64
57
@Json(name = " users" )
65
- val users : List <ShareeItem >?
58
+ val users : List <ShareeItem >
66
59
) {
67
- fun getFlatRepresentation ()
68
- = ArrayList <ShareeItem >().apply {
69
- if (users != null ) {
70
- addAll(users)
71
- }
72
- if (remotes != null ) {
73
- addAll(remotes)
74
- }
75
- if (groups != null ) {
76
- addAll(groups)
77
- }
60
+ fun getFlatRepresentation () = ArrayList <ShareeItem >().apply {
61
+ addAll(users)
62
+ addAll(remotes)
63
+ addAll(groups)
78
64
}
79
65
}
80
66
81
67
@JsonClass(generateAdapter = true )
82
68
data class ShareeItem (
83
69
@Json(name = " label" )
84
- val label : String? ,
70
+ val label : String ,
85
71
@Json(name = " value" )
86
- val value : ShareeValue ?
72
+ val value : ShareeValue
87
73
)
88
74
89
75
@JsonClass(generateAdapter = true )
90
76
data class ShareeValue (
91
77
@Json(name = " shareType" )
92
- val shareType : Int? ,
78
+ val shareType : Int ,
93
79
@Json(name = " shareWith" )
94
- val shareWith : String? ,
95
- @Json(name = " shareWithAdditionalInfo" )
80
+ val shareWith : String ,
81
+ @Json(name = " shareWithAdditionalInfo" )
96
82
val additionalInfo : String?
97
83
)
0 commit comments