RestSource Class

public final class RestSource
extends CopySource

A copy activity Rest service source.

Constructor Summary

Constructor Description
RestSource()

Creates an instance of RestSource class.

Method Summary

Modifier and Type Method and Description
Object additionalColumns()

Get the additionalColumns property: Specifies the additional columns to be added to source data.

Object additionalHeaders()

Get the additionalHeaders property: The additional HTTP headers in the request to the RESTful API.

static RestSource fromJson(JsonReader jsonReader)

Reads an instance of RestSource from the JsonReader.

Object httpRequestTimeout()

Get the httpRequestTimeout property: The timeout (TimeSpan) to get an HTTP response.

Object paginationRules()

Get the paginationRules property: The pagination rules to compose next page requests.

Object requestBody()

Get the requestBody property: The HTTP request body to the RESTful API if requestMethod is POST.

Object requestInterval()

Get the requestInterval property: The time to await before sending next page request.

Object requestMethod()

Get the requestMethod property: The HTTP method used to call the RESTful API.

JsonWriter toJson(JsonWriter jsonWriter)
String type()

Get the type property: Copy source type.

void validate()

Validates the instance.

RestSource withAdditionalColumns(Object additionalColumns)

Set the additionalColumns property: Specifies the additional columns to be added to source data.

RestSource withAdditionalHeaders(Object additionalHeaders)

Set the additionalHeaders property: The additional HTTP headers in the request to the RESTful API.

RestSource withDisableMetricsCollection(Object disableMetricsCollection)

Set the disableMetricsCollection property: If true, disable data store metrics collection.

RestSource withHttpRequestTimeout(Object httpRequestTimeout)

Set the httpRequestTimeout property: The timeout (TimeSpan) to get an HTTP response.

RestSource withMaxConcurrentConnections(Object maxConcurrentConnections)

Set the maxConcurrentConnections property: The maximum concurrent connection count for the source data store.

RestSource withPaginationRules(Object paginationRules)

Set the paginationRules property: The pagination rules to compose next page requests.

RestSource withRequestBody(Object requestBody)

Set the requestBody property: The HTTP request body to the RESTful API if requestMethod is POST.

RestSource withRequestInterval(Object requestInterval)

Set the requestInterval property: The time to await before sending next page request.

RestSource withRequestMethod(Object requestMethod)

Set the requestMethod property: The HTTP method used to call the RESTful API.

RestSource withSourceRetryCount(Object sourceRetryCount)

Set the sourceRetryCount property: Source retry count.

RestSource withSourceRetryWait(Object sourceRetryWait)

Set the sourceRetryWait property: Source retry wait.

Methods inherited from CopySource

Methods inherited from java.lang.Object

Constructor Details

RestSource

public RestSource()

Creates an instance of RestSource class.

Method Details

additionalColumns

public Object additionalColumns()

Get the additionalColumns property: Specifies the additional columns to be added to source data. Type: key value pairs (value should be string type).

Returns:

the additionalColumns value.

additionalHeaders

public Object additionalHeaders()

Get the additionalHeaders property: The additional HTTP headers in the request to the RESTful API. Type: string (or Expression with resultType string).

Returns:

the additionalHeaders value.

fromJson

public static RestSource fromJson(JsonReader jsonReader)

Reads an instance of RestSource from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

Throws:

IOException

- If an error occurs while reading the RestSource.

httpRequestTimeout

public Object httpRequestTimeout()

Get the httpRequestTimeout property: The timeout (TimeSpan) to get an HTTP response. It is the timeout to get a response, not the timeout to read response data. Default value: 00:01:40. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).

Returns:

the httpRequestTimeout value.

paginationRules

public Object paginationRules()

Get the paginationRules property: The pagination rules to compose next page requests. Type: string (or Expression with resultType string).

Returns:

the paginationRules value.

requestBody

public Object requestBody()

Get the requestBody property: The HTTP request body to the RESTful API if requestMethod is POST. Type: string (or Expression with resultType string).

Returns:

the requestBody value.

requestInterval

public Object requestInterval()

Get the requestInterval property: The time to await before sending next page request.

Returns:

the requestInterval value.

requestMethod

public Object requestMethod()

Get the requestMethod property: The HTTP method used to call the RESTful API. The default is GET. Type: string (or Expression with resultType string).

Returns:

the requestMethod value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

RestSource.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public String type()

Get the type property: Copy source type.

Overrides:

RestSource.type()

Returns:

the type value.

validate

public void validate()

Validates the instance.

Overrides:

RestSource.validate()

withAdditionalColumns

public RestSource withAdditionalColumns(Object additionalColumns)

Set the additionalColumns property: Specifies the additional columns to be added to source data. Type: key value pairs (value should be string type).

Parameters:

additionalColumns - the additionalColumns value to set.

Returns:

the RestSource object itself.

withAdditionalHeaders

public RestSource withAdditionalHeaders(Object additionalHeaders)

Set the additionalHeaders property: The additional HTTP headers in the request to the RESTful API. Type: string (or Expression with resultType string).

Parameters:

additionalHeaders - the additionalHeaders value to set.

Returns:

the RestSource object itself.

withDisableMetricsCollection

public RestSource withDisableMetricsCollection(Object disableMetricsCollection)

Set the disableMetricsCollection property: If true, disable data store metrics collection. Default is false. Type: boolean (or Expression with resultType boolean).

Overrides:

RestSource.withDisableMetricsCollection(Object disableMetricsCollection)

Parameters:

disableMetricsCollection

withHttpRequestTimeout

public RestSource withHttpRequestTimeout(Object httpRequestTimeout)

Set the httpRequestTimeout property: The timeout (TimeSpan) to get an HTTP response. It is the timeout to get a response, not the timeout to read response data. Default value: 00:01:40. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).

Parameters:

httpRequestTimeout - the httpRequestTimeout value to set.

Returns:

the RestSource object itself.

withMaxConcurrentConnections

public RestSource withMaxConcurrentConnections(Object maxConcurrentConnections)

Set the maxConcurrentConnections property: The maximum concurrent connection count for the source data store. Type: integer (or Expression with resultType integer).

Overrides:

RestSource.withMaxConcurrentConnections(Object maxConcurrentConnections)

Parameters:

maxConcurrentConnections

withPaginationRules

public RestSource withPaginationRules(Object paginationRules)

Set the paginationRules property: The pagination rules to compose next page requests. Type: string (or Expression with resultType string).

Parameters:

paginationRules - the paginationRules value to set.

Returns:

the RestSource object itself.

withRequestBody

public RestSource withRequestBody(Object requestBody)

Set the requestBody property: The HTTP request body to the RESTful API if requestMethod is POST. Type: string (or Expression with resultType string).

Parameters:

requestBody - the requestBody value to set.

Returns:

the RestSource object itself.

withRequestInterval

public RestSource withRequestInterval(Object requestInterval)

Set the requestInterval property: The time to await before sending next page request.

Parameters:

requestInterval - the requestInterval value to set.

Returns:

the RestSource object itself.

withRequestMethod

public RestSource withRequestMethod(Object requestMethod)

Set the requestMethod property: The HTTP method used to call the RESTful API. The default is GET. Type: string (or Expression with resultType string).

Parameters:

requestMethod - the requestMethod value to set.

Returns:

the RestSource object itself.

withSourceRetryCount

public RestSource withSourceRetryCount(Object sourceRetryCount)

Set the sourceRetryCount property: Source retry count. Type: integer (or Expression with resultType integer).

Overrides:

RestSource.withSourceRetryCount(Object sourceRetryCount)

Parameters:

sourceRetryCount

withSourceRetryWait

public RestSource withSourceRetryWait(Object sourceRetryWait)

Set the sourceRetryWait property: Source retry wait. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).

Overrides:

RestSource.withSourceRetryWait(Object sourceRetryWait)

Parameters:

sourceRetryWait

Applies to