WebHookActivity Class

public class WebHookActivity
extends ControlActivity

WebHook activity.

Constructor Summary

Constructor Description
WebHookActivity()

Creates an instance of WebHookActivity class.

Method Summary

Modifier and Type Method and Description
static WebHookActivity fromJson(JsonReader jsonReader)

Reads an instance of WebHookActivity from the JsonReader.

WebActivityAuthentication getAuthentication()

Get the authentication property: Authentication method used for calling the endpoint.

Object getBody()

Get the body property: Represents the payload that will be sent to the endpoint.

Object getHeaders()

Get the headers property: Represents the headers that will be sent to the request.

WebHookActivityMethod getMethod()

Get the method property: Rest API method for target endpoint.

Object getReportStatusOnCallBack()

Get the reportStatusOnCallBack property: When set to true, statusCode, output and error in callback request body will be consumed by activity.

String getTimeout()

Get the timeout property: The timeout within which the webhook should be called back.

String getType()

Get the type property: Type of activity.

Object getUrl()

Get the url property: WebHook activity target endpoint and path.

WebHookActivity setAuthentication(WebActivityAuthentication authentication)

Set the authentication property: Authentication method used for calling the endpoint.

WebHookActivity setBody(Object body)

Set the body property: Represents the payload that will be sent to the endpoint.

WebHookActivity setDependsOn(List<ActivityDependency> dependsOn)

Set the dependsOn property: Activity depends on condition.

WebHookActivity setDescription(String description)

Set the description property: Activity description.

WebHookActivity setHeaders(Object headers)

Set the headers property: Represents the headers that will be sent to the request.

WebHookActivity setMethod(WebHookActivityMethod method)

Set the method property: Rest API method for target endpoint.

WebHookActivity setName(String name)

Set the name property: Activity name.

WebHookActivity setOnInactiveMarkAs(ActivityOnInactiveMarkAs onInactiveMarkAs)

Set the onInactiveMarkAs property: Status result of the activity when the state is set to Inactive.

WebHookActivity setReportStatusOnCallBack(Object reportStatusOnCallBack)

Set the reportStatusOnCallBack property: When set to true, statusCode, output and error in callback request body will be consumed by activity.

WebHookActivity setState(ActivityState state)

Set the state property: Activity state.

WebHookActivity setTimeout(String timeout)

Set the timeout property: The timeout within which the webhook should be called back.

WebHookActivity setUrl(Object url)

Set the url property: WebHook activity target endpoint and path.

WebHookActivity setUserProperties(List<UserProperty> userProperties)

Set the userProperties property: Activity user properties.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from Activity

Methods inherited from ControlActivity

Methods inherited from java.lang.Object

Constructor Details

WebHookActivity

public WebHookActivity()

Creates an instance of WebHookActivity class.

Method Details

fromJson

public static WebHookActivity fromJson(JsonReader jsonReader)

Reads an instance of WebHookActivity from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of WebHookActivity if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getAuthentication

public WebActivityAuthentication getAuthentication()

Get the authentication property: Authentication method used for calling the endpoint.

Returns:

the authentication value.

getBody

public Object getBody()

Get the body property: Represents the payload that will be sent to the endpoint. Required for POST/PUT method, not allowed for GET method Type: string (or Expression with resultType string).

Returns:

the body value.

getHeaders

public Object getHeaders()

Get the headers property: Represents the headers that will be sent to the request. For example, to set the language and type on a request: "headers" : { "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: string (or Expression with resultType string).

Returns:

the headers value.

getMethod

public WebHookActivityMethod getMethod()

Get the method property: Rest API method for target endpoint.

Returns:

the method value.

getReportStatusOnCallBack

public Object getReportStatusOnCallBack()

Get the reportStatusOnCallBack property: When set to true, statusCode, output and error in callback request body will be consumed by activity. The activity can be marked as failed by setting statusCode >= 400 in callback request. Default is false. Type: boolean (or Expression with resultType boolean).

Returns:

the reportStatusOnCallBack value.

getTimeout

public String getTimeout()

Get the timeout property: The timeout within which the webhook should be called back. If there is no value specified, it defaults to 10 minutes. Type: string. Pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).

Returns:

the timeout value.

getType

public String getType()

Get the type property: Type of activity.

Overrides:

WebHookActivity.getType()

Returns:

the type value.

getUrl

public Object getUrl()

Get the url property: WebHook activity target endpoint and path. Type: string (or Expression with resultType string).

Returns:

the url value.

setAuthentication

public WebHookActivity setAuthentication(WebActivityAuthentication authentication)

Set the authentication property: Authentication method used for calling the endpoint.

Parameters:

authentication - the authentication value to set.

Returns:

the WebHookActivity object itself.

setBody

public WebHookActivity setBody(Object body)

Set the body property: Represents the payload that will be sent to the endpoint. Required for POST/PUT method, not allowed for GET method Type: string (or Expression with resultType string).

Parameters:

body - the body value to set.

Returns:

the WebHookActivity object itself.

setDependsOn

public WebHookActivity setDependsOn(List<ActivityDependency> dependsOn)

Set the dependsOn property: Activity depends on condition.

Overrides:

WebHookActivity.setDependsOn(List<ActivityDependency> dependsOn)

Parameters:

dependsOn

setDescription

public WebHookActivity setDescription(String description)

Set the description property: Activity description.

Overrides:

WebHookActivity.setDescription(String description)

Parameters:

description

setHeaders

public WebHookActivity setHeaders(Object headers)

Set the headers property: Represents the headers that will be sent to the request. For example, to set the language and type on a request: "headers" : { "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: string (or Expression with resultType string).

Parameters:

headers - the headers value to set.

Returns:

the WebHookActivity object itself.

setMethod

public WebHookActivity setMethod(WebHookActivityMethod method)

Set the method property: Rest API method for target endpoint.

Parameters:

method - the method value to set.

Returns:

the WebHookActivity object itself.

setName

public WebHookActivity setName(String name)

Set the name property: Activity name.

Overrides:

WebHookActivity.setName(String name)

Parameters:

name

setOnInactiveMarkAs

public WebHookActivity setOnInactiveMarkAs(ActivityOnInactiveMarkAs onInactiveMarkAs)

Set the onInactiveMarkAs property: Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default.

Overrides:

WebHookActivity.setOnInactiveMarkAs(ActivityOnInactiveMarkAs onInactiveMarkAs)

Parameters:

onInactiveMarkAs

setReportStatusOnCallBack

public WebHookActivity setReportStatusOnCallBack(Object reportStatusOnCallBack)

Set the reportStatusOnCallBack property: When set to true, statusCode, output and error in callback request body will be consumed by activity. The activity can be marked as failed by setting statusCode >= 400 in callback request. Default is false. Type: boolean (or Expression with resultType boolean).

Parameters:

reportStatusOnCallBack - the reportStatusOnCallBack value to set.

Returns:

the WebHookActivity object itself.

setState

public WebHookActivity setState(ActivityState state)

Set the state property: Activity state. This is an optional property and if not provided, the state will be Active by default.

Overrides:

WebHookActivity.setState(ActivityState state)

Parameters:

state

setTimeout

public WebHookActivity setTimeout(String timeout)

Set the timeout property: The timeout within which the webhook should be called back. If there is no value specified, it defaults to 10 minutes. Type: string. Pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).

Parameters:

timeout - the timeout value to set.

Returns:

the WebHookActivity object itself.

setUrl

public WebHookActivity setUrl(Object url)

Set the url property: WebHook activity target endpoint and path. Type: string (or Expression with resultType string).

Parameters:

url - the url value to set.

Returns:

the WebHookActivity object itself.

setUserProperties

public WebHookActivity setUserProperties(List<UserProperty> userProperties)

Set the userProperties property: Activity user properties.

Overrides:

WebHookActivity.setUserProperties(List<UserProperty> userProperties)

Parameters:

userProperties

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

WebHookActivity.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to