File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change 1717package com.google.firebase.vertexai.type
1818
1919import android.util.Base64
20- import kotlinx.serialization.SerialName
2120import kotlinx.serialization.Serializable
2221
23- /* Represent the media data that needs to be sent to the server. */
24- public class MediaData (public val mimeType : String , public val data : ByteArray ) {
22+ /* *
23+ * Represents the media data to be sent to the server
24+ *
25+ * @param data Byte array representing the data to be sent.
26+ * @param mimeType an IANA standard MIME type. For supported MIME type values see the
27+ * [Firebase documentation](https://firebase.google.com/docs/vertex-ai/input-file-requirements).
28+ */
29+ public class MediaData (public val data : ByteArray , public val mimeType : String ) {
2530 @Serializable
26- internal class Internal (@SerialName(" mimeType" ) val mimeType : String , val data : String )
31+ internal class Internal (
32+ val data : String ,
33+ val mimeType : String ,
34+ )
2735
2836 internal fun toInternal (): Internal {
29- return Internal (mimeType, Base64 .encodeToString(data, BASE_64_FLAGS ))
37+ return Internal (Base64 .encodeToString(data, BASE_64_FLAGS ), mimeType )
3038 }
3139}
You can’t perform that action at this time.
0 commit comments