public class

MediaInfo

extends Object
implements JsonSerializable
java.lang.Object
   ↳ com.urbanairship.iam.MediaInfo

Class Overview

Media display info.

Summary

Nested Classes
class MediaInfo.Builder Media info builder. 
Constants
String TYPE_IMAGE Image media type.
String TYPE_VIDEO Video media type.
String TYPE_YOUTUBE Youtube media type.
Public Methods
boolean equals(Object o)
String getDescription()
Returns the media description.
String getType()
Returns the media type.
String getUrl()
Returns the media URL.
int hashCode()
static MediaInfo.Builder newBuilder()
Builder factory method.
static MediaInfo.Builder newBuilder(MediaInfo mediaInfo)
Creates a builder from existing media info.
static MediaInfo parseJson(JsonValue jsonValue)
Parses a MediaInfo from a JsonValue.
JsonValue toJsonValue()
Returns the objects represented as a JsonValue.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.urbanairship.json.JsonSerializable

Constants

public static final String TYPE_IMAGE

Image media type.

Constant Value: "image"

public static final String TYPE_VIDEO

Video media type.

Constant Value: "video"

public static final String TYPE_YOUTUBE

Youtube media type.

Constant Value: "youtube"

Public Methods

public boolean equals (Object o)

public String getDescription ()

Returns the media description.

Returns
  • The media description.

public String getType ()

Returns the media type.

Returns
  • The media type.

public String getUrl ()

Returns the media URL.

Returns
  • The media URL.

public int hashCode ()

public static MediaInfo.Builder newBuilder ()

Builder factory method.

Returns
  • A builder instance.

public static MediaInfo.Builder newBuilder (MediaInfo mediaInfo)

Creates a builder from existing media info.

Parameters
mediaInfo The media info.
Returns
  • A builder instance.

public static MediaInfo parseJson (JsonValue jsonValue)

Parses a MediaInfo from a JsonValue.

Parameters
jsonValue The json value.
Returns
  • The parsed media info.
Throws
JsonException If the media info was unable to be parsed.

public JsonValue toJsonValue ()

Returns the objects represented as a JsonValue.

Returns
  • The object as a JsonValue.

public String toString ()