WebhookActivity Class

public final 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
WebActivityAuthentication authentication()

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

Object body()

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

static WebhookActivity fromJson(JsonReader jsonReader)

Reads an instance of WebhookActivity from the JsonReader.

Map<String,Object> headers()

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

WebhookActivityMethod method()

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

SecureInputOutputPolicy policy()

Get the policy property: Activity policy.

Object reportStatusOnCallBack()

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

String timeout()

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

JsonWriter toJson(JsonWriter jsonWriter)
String type()

Get the type property: Type of activity.

Object url()

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

void validate()

Validates the instance.

WebhookActivity withAuthentication(WebActivityAuthentication authentication)

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

WebhookActivity withBody(Object body)

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

WebhookActivity withDependsOn(List<ActivityDependency> dependsOn)

Set the dependsOn property: Activity depends on condition.

WebhookActivity withDescription(String description)

Set the description property: Activity description.

WebhookActivity withHeaders(Map<String,Object> headers)

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

WebhookActivity withMethod(WebhookActivityMethod method)

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

WebhookActivity withName(String name)

Set the name property: Activity name.

WebhookActivity withOnInactiveMarkAs(ActivityOnInactiveMarkAs onInactiveMarkAs)

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

WebhookActivity withPolicy(SecureInputOutputPolicy policy)

Set the policy property: Activity policy.

WebhookActivity withReportStatusOnCallBack(Object reportStatusOnCallBack)

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

WebhookActivity withState(ActivityState state)

Set the state property: Activity state.

WebhookActivity withTimeout(String timeout)

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

WebhookActivity withUrl(Object url)

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

WebhookActivity withUserProperties(List<UserProperty> userProperties)

Set the userProperties property: Activity user properties.

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

authentication

public WebActivityAuthentication authentication()

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

Returns:

the authentication value.

body

public Object body()

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.

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.

headers

public Map<String,Object> headers()

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.

method

public WebhookActivityMethod method()

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

Returns:

the method value.

policy

public SecureInputOutputPolicy policy()

Get the policy property: Activity policy.

Returns:

the policy value.

reportStatusOnCallBack

public Object reportStatusOnCallBack()

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.

timeout

public String timeout()

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.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

WebhookActivity.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public String type()

Get the type property: Type of activity.

Overrides:

WebhookActivity.type()

Returns:

the type value.

url

public Object url()

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

Returns:

the url value.

validate

public void validate()

Validates the instance.

Overrides:

WebhookActivity.validate()

withAuthentication

public WebhookActivity withAuthentication(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.

withBody

public WebhookActivity withBody(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.

withDependsOn

public WebhookActivity withDependsOn(List<ActivityDependency> dependsOn)

Set the dependsOn property: Activity depends on condition.

Overrides:

WebhookActivity.withDependsOn(List<ActivityDependency> dependsOn)

Parameters:

dependsOn

withDescription

public WebhookActivity withDescription(String description)

Set the description property: Activity description.

Overrides:

WebhookActivity.withDescription(String description)

Parameters:

description

withHeaders

public WebhookActivity withHeaders(Map<String,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.

withMethod

public WebhookActivity withMethod(WebhookActivityMethod method)

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

Parameters:

method - the method value to set.

Returns:

the WebhookActivity object itself.

withName

public WebhookActivity withName(String name)

Set the name property: Activity name.

Overrides:

WebhookActivity.withName(String name)

Parameters:

name

withOnInactiveMarkAs

public WebhookActivity withOnInactiveMarkAs(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.withOnInactiveMarkAs(ActivityOnInactiveMarkAs onInactiveMarkAs)

Parameters:

onInactiveMarkAs

withPolicy

public WebhookActivity withPolicy(SecureInputOutputPolicy policy)

Set the policy property: Activity policy.

Parameters:

policy - the policy value to set.

Returns:

the WebhookActivity object itself.

withReportStatusOnCallBack

public WebhookActivity withReportStatusOnCallBack(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.

withState

public WebhookActivity withState(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.withState(ActivityState state)

Parameters:

state

withTimeout

public WebhookActivity withTimeout(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.

withUrl

public WebhookActivity withUrl(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.

withUserProperties

public WebhookActivity withUserProperties(List<UserProperty> userProperties)

Set the userProperties property: Activity user properties.

Overrides:

WebhookActivity.withUserProperties(List<UserProperty> userProperties)

Parameters:

userProperties

Applies to