WebHookActivity.java
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.analytics.synapse.artifacts.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.annotation.JsonFlatten;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
/** WebHook activity. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
@JsonTypeName("WebHook")
@JsonFlatten
@Fluent
public class WebHookActivity extends ControlActivity {
/*
* Rest API method for target endpoint.
*/
@JsonProperty(value = "typeProperties.method", required = true)
private WebHookActivityMethod method;
/*
* WebHook activity target endpoint and path. Type: string (or Expression
* with resultType string).
*/
@JsonProperty(value = "typeProperties.url", required = true)
private Object url;
/*
* 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])).
*/
@JsonProperty(value = "typeProperties.timeout")
private String timeout;
/*
* 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).
*/
@JsonProperty(value = "typeProperties.headers")
private Object headers;
/*
* 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).
*/
@JsonProperty(value = "typeProperties.body")
private Object body;
/*
* Authentication method used for calling the endpoint.
*/
@JsonProperty(value = "typeProperties.authentication")
private WebActivityAuthentication authentication;
/*
* 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).
*/
@JsonProperty(value = "typeProperties.reportStatusOnCallBack")
private Object reportStatusOnCallBack;
/**
* Get the method property: Rest API method for target endpoint.
*
* @return the method value.
*/
public WebHookActivityMethod getMethod() {
return this.method;
}
/**
* Set the method property: Rest API method for target endpoint.
*
* @param method the method value to set.
* @return the WebHookActivity object itself.
*/
public WebHookActivity setMethod(WebHookActivityMethod method) {
this.method = method;
return this;
}
/**
* Get the url property: WebHook activity target endpoint and path. Type: string (or Expression with resultType
* string).
*
* @return the url value.
*/
public Object getUrl() {
return this.url;
}
/**
* Set the url property: WebHook activity target endpoint and path. Type: string (or Expression with resultType
* string).
*
* @param url the url value to set.
* @return the WebHookActivity object itself.
*/
public WebHookActivity setUrl(Object url) {
this.url = url;
return this;
}
/**
* 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])).
*
* @return the timeout value.
*/
public String getTimeout() {
return this.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])).
*
* @param timeout the timeout value to set.
* @return the WebHookActivity object itself.
*/
public WebHookActivity setTimeout(String timeout) {
this.timeout = timeout;
return this;
}
/**
* 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).
*
* @return the headers value.
*/
public Object getHeaders() {
return this.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).
*
* @param headers the headers value to set.
* @return the WebHookActivity object itself.
*/
public WebHookActivity setHeaders(Object headers) {
this.headers = headers;
return this;
}
/**
* 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).
*
* @return the body value.
*/
public Object getBody() {
return this.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).
*
* @param body the body value to set.
* @return the WebHookActivity object itself.
*/
public WebHookActivity setBody(Object body) {
this.body = body;
return this;
}
/**
* Get the authentication property: Authentication method used for calling the endpoint.
*
* @return the authentication value.
*/
public WebActivityAuthentication getAuthentication() {
return this.authentication;
}
/**
* Set the authentication property: Authentication method used for calling the endpoint.
*
* @param authentication the authentication value to set.
* @return the WebHookActivity object itself.
*/
public WebHookActivity setAuthentication(WebActivityAuthentication authentication) {
this.authentication = authentication;
return this;
}
/**
* 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).
*
* @return the reportStatusOnCallBack value.
*/
public Object getReportStatusOnCallBack() {
return this.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).
*
* @param reportStatusOnCallBack the reportStatusOnCallBack value to set.
* @return the WebHookActivity object itself.
*/
public WebHookActivity setReportStatusOnCallBack(Object reportStatusOnCallBack) {
this.reportStatusOnCallBack = reportStatusOnCallBack;
return this;
}
}