Convert Caption to kotlin

This commit is contained in:
Paul Hawke 2025-07-06 22:16:05 -05:00
parent 66395b9871
commit afd12549ce
2 changed files with 19 additions and 43 deletions

View file

@ -1,43 +0,0 @@
package fr.free.nrw.commons.media;
import com.google.gson.annotations.SerializedName;
/**
* Model class for parsing Captions when fetching captions using filename in MediaClient
*/
public class Caption {
/**
* users language in which caption is written
*/
@SerializedName("language")
private String language;
@SerializedName("value")
private String value;
/**
* No args constructor for use in serialization
*/
public Caption() {
}
/**
* @param value
* @param language
*/
public Caption(String language, String value) {
super();
this.language = language;
this.value = value;
}
@SerializedName("language")
public String getLanguage() {
return language;
}
@SerializedName("value")
public String getValue() {
return value;
}
}

View file

@ -0,0 +1,19 @@
package fr.free.nrw.commons.media
import com.google.gson.annotations.SerializedName
/**
* Model class for parsing Captions when fetching captions using filename in MediaClient
*/
class Caption() {
@SerializedName("language")
var language: String? = null
@SerializedName("value")
var value: String? = null
constructor(language: String?, value: String?) : this() {
this.language = language
this.value = value
}
}