target.apidocs.com.google.api.services.content.model.Action.html Maven / Gradle / Ivy
Action (Content API for Shopping v2.1-rev20240609-2.0.0)
com.google.api.services.content.model
Class Action
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.content.model.Action
-
public final class Action
extends com.google.api.client.json.GenericJson
An actionable step that can be executed to solve the issue.
This is the Java data model class that specifies how to parse/serialize into the JSON that is
transmitted over HTTP when working with the Content API for Shopping. For a detailed explanation
see:
https://developers.google.com/api-client-library/java/google-http-java-client/json
- Author:
- Google, Inc.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
Action()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
Action
clone()
BuiltInSimpleAction
getBuiltinSimpleAction()
Action implemented and performed in (your) third-party application.
BuiltInUserInputAction
getBuiltinUserInputAction()
Action implemented and performed in (your) third-party application.
String
getButtonLabel()
Label of the action button.
ExternalAction
getExternalAction()
Action that is implemented and performed outside of (your) third-party application.
Boolean
getIsAvailable()
Controlling whether the button is active or disabled.
List<ActionReason>
getReasons()
List of reasons why the action is not available.
Action
set(String fieldName,
Object value)
Action
setBuiltinSimpleAction(BuiltInSimpleAction builtinSimpleAction)
Action implemented and performed in (your) third-party application.
Action
setBuiltinUserInputAction(BuiltInUserInputAction builtinUserInputAction)
Action implemented and performed in (your) third-party application.
Action
setButtonLabel(String buttonLabel)
Label of the action button.
Action
setExternalAction(ExternalAction externalAction)
Action that is implemented and performed outside of (your) third-party application.
Action
setIsAvailable(Boolean isAvailable)
Controlling whether the button is active or disabled.
Action
setReasons(List<ActionReason> reasons)
List of reasons why the action is not available.
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Method Detail
-
getBuiltinSimpleAction
public BuiltInSimpleAction getBuiltinSimpleAction()
Action implemented and performed in (your) third-party application. The application should
point the merchant to the place, where they can access the corresponding functionality or
provide instructions, if the specific functionality is not available.
- Returns:
- value or
null
for none
-
setBuiltinSimpleAction
public Action setBuiltinSimpleAction(BuiltInSimpleAction builtinSimpleAction)
Action implemented and performed in (your) third-party application. The application should
point the merchant to the place, where they can access the corresponding functionality or
provide instructions, if the specific functionality is not available.
- Parameters:
builtinSimpleAction
- builtinSimpleAction or null
for none
-
getBuiltinUserInputAction
public BuiltInUserInputAction getBuiltinUserInputAction()
Action implemented and performed in (your) third-party application. The application needs to
show an additional content and input form to the merchant as specified for given action. They
can trigger the action only when they provided all required inputs.
- Returns:
- value or
null
for none
-
setBuiltinUserInputAction
public Action setBuiltinUserInputAction(BuiltInUserInputAction builtinUserInputAction)
Action implemented and performed in (your) third-party application. The application needs to
show an additional content and input form to the merchant as specified for given action. They
can trigger the action only when they provided all required inputs.
- Parameters:
builtinUserInputAction
- builtinUserInputAction or null
for none
-
getButtonLabel
public String getButtonLabel()
Label of the action button.
- Returns:
- value or
null
for none
-
setButtonLabel
public Action setButtonLabel(String buttonLabel)
Label of the action button.
- Parameters:
buttonLabel
- buttonLabel or null
for none
-
getExternalAction
public ExternalAction getExternalAction()
Action that is implemented and performed outside of (your) third-party application. The
application needs to redirect the merchant to the external location where they can perform the
action.
- Returns:
- value or
null
for none
-
setExternalAction
public Action setExternalAction(ExternalAction externalAction)
Action that is implemented and performed outside of (your) third-party application. The
application needs to redirect the merchant to the external location where they can perform the
action.
- Parameters:
externalAction
- externalAction or null
for none
-
getIsAvailable
public Boolean getIsAvailable()
Controlling whether the button is active or disabled. The value is 'false' when the action was
already requested or is not available. If the action is not available then a reason will be
present. If (your) third-party application shows a disabled button for action that is not
available, then it should also show reasons.
- Returns:
- value or
null
for none
-
setIsAvailable
public Action setIsAvailable(Boolean isAvailable)
Controlling whether the button is active or disabled. The value is 'false' when the action was
already requested or is not available. If the action is not available then a reason will be
present. If (your) third-party application shows a disabled button for action that is not
available, then it should also show reasons.
- Parameters:
isAvailable
- isAvailable or null
for none
-
getReasons
public List<ActionReason> getReasons()
List of reasons why the action is not available. The list of reasons is empty if the action is
available. If there is only one reason, it can be displayed next to the disabled button. If
there are more reasons, all of them should be displayed, for example in a pop-up dialog.
- Returns:
- value or
null
for none
-
setReasons
public Action setReasons(List<ActionReason> reasons)
List of reasons why the action is not available. The list of reasons is empty if the action is
available. If there is only one reason, it can be displayed next to the disabled button. If
there are more reasons, all of them should be displayed, for example in a pop-up dialog.
- Parameters:
reasons
- reasons or null
for none
-
set
public Action set(String fieldName,
Object value)
- Overrides:
set
in class com.google.api.client.json.GenericJson
-
clone
public Action clone()
- Overrides:
clone
in class com.google.api.client.json.GenericJson
Copyright © 2011–2024 Google. All rights reserved.