public class

ButtonInfo

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

Class Overview

In-app button display info.

Summary

Nested Classes
@interface ButtonInfo.Behavior  
class ButtonInfo.Builder Button info builder class. 
Constants
String BEHAVIOR_CANCEL Cancels the in-app message's schedule when clicked.
String BEHAVIOR_DISMISS Dismisses the in-app message when clicked.
int MAX_ID_LENGTH Max button ID length.
Public Methods
boolean equals(Object o)
Map<StringJsonValue> getActions()
Returns the action names and values to be run when the button is clicked.
Integer getBackgroundColor()
Returns the button's background color.
String getBehavior()
Returns the button's click behavior.
Integer getBorderColor()
Returns the button's border color.
Float getBorderRadius()
Returns the border radius in dps.
String getId()
The button's ID.
TextInfo getLabel()
Returns the button's label.
int hashCode()
static ButtonInfo.Builder newBuilder(ButtonInfo buttonInfo)
Creates a builder from existing button info.
static ButtonInfo.Builder newBuilder()
Builder factory method.
static List<ButtonInfo> parseJson(JsonList jsonList)
Parses a list of ButtonInfo from a JsonList.
static ButtonInfo parseJson(JsonValue jsonValue)
Parses an ButtonInfo 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 BEHAVIOR_CANCEL

Cancels the in-app message's schedule when clicked.

Constant Value: "cancel"

public static final String BEHAVIOR_DISMISS

Dismisses the in-app message when clicked.

Constant Value: "dismiss"

public static final int MAX_ID_LENGTH

Max button ID length.

Constant Value: 100 (0x00000064)

Public Methods

public boolean equals (Object o)

public Map<StringJsonValue> getActions ()

Returns the action names and values to be run when the button is clicked.

Returns
  • The action map.

public Integer getBackgroundColor ()

Returns the button's background color.

Returns
  • The button's background color.

public String getBehavior ()

Returns the button's click behavior.

Returns
  • The button's click behavior.

public Integer getBorderColor ()

Returns the button's border color.

Returns
  • The button's border color.

public Float getBorderRadius ()

Returns the border radius in dps.

Returns
  • Border radius in dps.

public String getId ()

The button's ID.

Returns
  • The button's ID.

public TextInfo getLabel ()

Returns the button's label.

Returns
  • The button's label.

public int hashCode ()

public static ButtonInfo.Builder newBuilder (ButtonInfo buttonInfo)

Creates a builder from existing button info.

Parameters
buttonInfo The button info.
Returns
  • A builder instance.

public static ButtonInfo.Builder newBuilder ()

Builder factory method.

Returns
  • A new builder instance.

public static List<ButtonInfo> parseJson (JsonList jsonList)

Parses a list of ButtonInfo from a JsonList.

Parameters
jsonList The json list..
Returns
  • The list of parsed button info.
Throws
JsonException If the list was unable to be parsed.

public static ButtonInfo parseJson (JsonValue jsonValue)

Parses an ButtonInfo from a JsonValue.

Parameters
jsonValue The json value.
Returns
  • The parsed button info.
Throws
JsonException If the button 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 ()