Action.Builder

public static classAction.BuilderextendsObject

The builder forAction.

Constant Summary

String ACTIVATE_ACTION The act of starting, or activating something.
String ADD_ACTION The act of editing by adding something to a collection (For example, an item to a shopping cart, or movie to a queue).
String BOOKMARK_ACTION The act of bookmarking something (For example, an article, or song).
String COMMENT_ACTION The act of commenting on something (For example, an article, or social media post).
String LIKE_ACTION The act of liking something (For example, a book, song, or article).
String LISTEN_ACTION The act of listening to something (For example, music, or a podcast).
String SEND_ACTION The act of sending a message.
String SHARE_ACTION The act of sharing something (For example, a document, or social media post)
String STATUS_TYPE_ACTIVE The status of an active action (For example, an action that has started but not yet completed).
String STATUS_TYPE_COMPLETED The status of a completed action.
String STATUS_TYPE_FAILED The status of a failed action.
String VIEW_ACTION The act of viewing something (For example, an article, or profile).
String WATCH_ACTION The act of watching something (For example, a video, movie, or TV show).

Public Constructor Summary

Builder(Stringtype)
The constructor.

Public Method Summary

Action
build()
Builds the action.
Action.Builder
put(Stringkey, double... values)
Sets one or multiple double values for a property, replacing its previous values.
Action.Builder
put(Stringkey, Indexable... values)
Sets one or multipleIndexable values for a property, replacing its previous values.
Action.Builder
put(Stringkey, boolean... values)
Sets one or multiple boolean values for a property, replacing its previous values.
Action.Builder
put(Stringkey, String... values)
Sets one or multiple string values for a property, replacing its previous values.
Action.Builder
put(Stringkey, long... values)
Sets one or multiple long values for a property, replacing its previous values.
Action.Builder
setActionStatus(String actionStatus)
Sets the status of the action.
finalAction.Builder
setName(Stringname)
Sets the name of the action (For example, Ride using Waymo LLC).
Action.Builder
setObject(Stringname, Stringurl)
Sets the object that the action is taken on (For example, the article being viewed, or the song being listened to).
Action.Builder
setObject(Stringname, Stringurl, String webUrl)
Sets the object that the action is taken on (For example, the article being viewed, or the song being listened to).
Action.Builder
setResult(Indexable... values)
Sets the result of the action.
finalAction.Builder
setUrl(Stringurl)
Sets the URL of the action.

Inherited Method Summary

Constants

public static finalString ACTIVATE_ACTION

The act of starting, or activating something.

Constant Value: "ActivateAction"

public static finalString ADD_ACTION

The act of editing by adding something to a collection (For example, an item to a shopping cart, or movie to a queue).

Constant Value:"AddAction"

public static finalString BOOKMARK_ACTION

The act of bookmarking something (For example, an article, or song).

Constant Value: "BookmarkAction"

public static finalString COMMENT_ACTION

The act of commenting on something (For example, an article, or social media post).

Constant Value: "CommentAction"

public static finalString LIKE_ACTION

The act of liking something (For example, a book, song, or article).

Constant Value:"LikeAction"

public static finalString LISTEN_ACTION

The act of listening to something (For example, music, or a podcast).

Constant Value: "ListenAction"

public static finalString SEND_ACTION

The act of sending a message.

Constant Value:"SendAction"

public static finalString SHARE_ACTION

The act of sharing something (For example, a document, or social media post)

Constant Value:"ShareAction"

public static finalString STATUS_TYPE_ACTIVE

The status of an active action (For example, an action that has started but not yet completed).

Constant Value: "//schema.org/ActiveActionStatus"

public static finalString STATUS_TYPE_COMPLETED

The status of a completed action.

Constant Value: "//schema.org/CompletedActionStatus"

public static finalString STATUS_TYPE_FAILED

The status of a failed action.

Constant Value: "//schema.org/FailedActionStatus"

public static finalString VIEW_ACTION

The act of viewing something (For example, an article, or profile).

Constant Value:"ViewAction"

public static finalString WATCH_ACTION

The act of watching something (For example, a video, movie, or TV show).

Constant Value:"WatchAction"

Public Constructors

publicBuilder(Stringtype)

The constructor.

Parameters
type The Schema.org type best describing this action (use one of the constants on this class, or refer to//schema.org/Actionfor a list of standard action types).

Public Methods

publicAction build()

Builds the action.

publicAction.Builder put(Stringkey, double... values)

Sets one or multiple double values for a property, replacing its previous values.

Parameters
key The property. Must not be null.
values The double values of the property.

publicAction.Builder put(Stringkey,Indexable... values)

Sets one or multipleIndexable values for a property, replacing its previous values.

Parameters
key The schema.org property. Must not be null.
values The values represented as anIndexable. Null values are ignored.Indexable values must be constructed usingIndexable.Builder or convenience methods.

publicAction.Builder put(Stringkey, boolean... values)

Sets one or multiple boolean values for a property, replacing its previous values.

Parameters
key The property. Must not be null.
values The boolean values of the property.

publicAction.Builder put(Stringkey,String...values)

Sets one or multiple string values for a property, replacing its previous values.

Parameters
key The property. Must not be null.
values The string values of the property. Null values are ignored.

publicAction.Builder put(Stringkey, long... values)

Sets one or multiple long values for a property, replacing its previous values.

Parameters
key The property. Must not be null.
values The long values of the property.

publicAction.Builder setActionStatus(String actionStatus)

Sets the status of the action. Optional.

public finalAction.Builder setName(Stringname)

Sets the name of the action (For example, Ride using Waymo LLC).

publicAction.Builder setObject(Stringname,Stringurl)

Sets the object that the action is taken on (For example, the article being viewed, or the song being listened to).

Parameters
name The name of the object (For example, the title of an article, or name of a song). Must not be null.
url The URL of the object (this URL needs to be handled by the app to take the user to the right place). Must be a valid URL.

publicAction.Builder setObject(Stringname,Stringurl,StringwebUrl)

Sets the object that the action is taken on (For example, the article being viewed, or the song being listened to).

Parameters
name The name of the object (For example, the title of an article, or name of a song). Must not be null.
url The URL of the object (this URL needs to be handled by the app to take the user to the right place). Must be a valid URL.
webUrl The web URL of the object, if different fromurl.Must be a valid URL.

publicAction.Builder setResult(Indexable... values)

Sets the result of the action. Optional.

Parameters
values Results of performing the action.

public finalAction.Builder setUrl(Stringurl)

Sets the URL of the action.

Must match Object URL when both are set.

Parameters
url The URL to start an activity to (re)perform the action. Must be a valid URL.