| Class info |
| public final class Channel extends GenericJson |
| Notification channel class used to monitor resource changes. |
| Constructor name |
Channel() Constructor for the Channel class. |
| Return type | Method name |
| String | getUrl() Obtains the server URL for receiving notifications sent through the notification channel. |
| Channel | setUrl (String url) Sets the server URL for receiving notifications sent through the notification channel. |
| String | getId() Obtains the unique ID of the notification channel. |
| Channel | setId (String id) Sets the unique ID of the notification channel. |
| String | getCategory() Obtains the resource type, which is always api#channel. |
| Channel | setCategory(String category) Sets the resource type, which is always api#channel. |
| String | getResourceId() Obtains the ID of a resource being monitored on the channel. |
| Channel | setResourceId (String resourceId) Sets the ID of a resource being monitored on the channel. |
| String | getResourceUri() Obtains the version-specific identifier of a resource. |
| Channel | setResourceUri(String resourceUri) Sets the version-specific identifier of a resource. |
| String | getUserToken() Obtains an arbitrary string to be sent to the server URL. |
| Channel | setUserToken (String userToken) Sets an arbitrary string to be sent to the server URL. |
| String | getType() Obtains the type of the delivery mechanism used for the channel, which is always web_hook. |
| Channel | setType (String type) Sets the type of the delivery mechanism used for the channel, which is always web_hook. |
| Long | getExpirationTime() Obtains the date and time when the notification channel expires. |
| Channel | setExpirationTime(Long expirationTime) Sets the date and time when the notification channel expires. |
| Map<String,String> | getParams() Obtains additional parameters for controlling delivery channel behavior. |
| Channel | setParams(Map<String,String> params) Sets additional parameters for controlling delivery channel behavior. |
| Boolean | getPayload() Checks whether the payload of the delivery channel is required. |
| Channel | setPayload(Boolean payload) Sets whether the payload of the delivery channel is required. |
| Channel | set(String fieldName, Object value) Sets the given field value for the given field name. |
| Channel | clone() Clones a Channel object. |
| constructor |
| Channel() |
| Constructs a Channel object. |
| Method |
| public String getUrl() |
| Obtains the server URL for receiving notifications sent through the notification channel. |
Return
| type | desc |
| String | Server URL for receiving notifications sent through the notification channel. |
| Method |
public Channel setUrl(String url) |
| Sets the server URL for receiving notifications sent through the notification channel. |
Parameters
| Parameter name | Parameter desc |
| url | Server URL for receiving notifications sent through the notification channel. The URL must be an HTTPS URL starting with https://. |
Return
| type | desc |
| Channel | A Channel object. |
| Method |
public String getId() |
| Obtains the unique ID of the notification channel. |
Return
| type | desc |
| String | Unique ID of the notification channel. |
| Method |
public Channel setId(String id) |
| Sets the unique ID of the notification channel. |
Parameters
| Parameter name | Parameter desc |
| id | Unique ID of the notification channel. |
Return
| type | desc |
| Channel | A Channel object. |
| Method |
public String getCategory() |
| Obtains the resource type, which is always api#channel. |
Return
| type | desc |
| String | Resource type, which is always api#channel. |
| Method |
public Channel setCategory(String category) |
| Sets the resource type, which is always api#channel. |
Parameters
| Parameter name | Parameter desc |
| category | Resource type, which is always api#channel. |
Return
| type | desc |
| Channel | A Channel object. |
| Method |
public String getResourceId() |
| Obtains the ID of a resource being monitored on the channel. |
Return
| type | desc |
| String | ID of a resource being monitored on the channel. |
| Method |
public Channel setResourceId(String resourceId) |
| Sets the ID of a resource being monitored on the channel. |
Parameters
| Parameter name | Parameter desc |
| resourceId | ID of a resource being monitored on the channel, which is mandatory in the response. |
Return
| type | desc |
| Channel | A Channel object. |
| Method |
public String getResourceUri() |
| Obtains the version-specific identifier of a resource. |
Return
| type | desc |
| String | Version-specific identifier of a resource. |
| Method |
public Channel setResourceUri(String resourceUri) |
| Sets the version-specific identifier of a resource. |
Parameters
| Parameter name | Parameter desc |
| resourceUri | Version-specific identifier of a resource, which is mandatory in the response. |
Return
| type | desc |
| Channel | A Channel object. |
| Method |
public String getUserToken() |
| Obtains an arbitrary string to be sent to the server URL. |
Return
| type | desc |
| String | Arbitrary string to be sent to the server URL. |
| Method |
public Channel setUserToken(String userToken) |
| Sets an arbitrary string to be sent to the server URL. |
Parameters
| Parameter name | Parameter desc |
| userToken | Arbitrary string. This parameter is optional and is contained in a message callback notification sent to an API caller. You can set this parameter if the callback notification received by an API caller needs to contain userToken information. The value can contain a maximum of 64 characters, including digits and case-insensitive letters. |
Return
| type | desc |
| Channel | A Channel object. |
| Method |
public String getType() |
| Obtains the type of the delivery mechanism used for the channel, which is always web_hook, indicating that callback notifications are sent through webhooks. |
Return
| type | desc |
| String | Type of the delivery mechanism used for the channel, which is always web_hook, indicating that callback notifications are sent through webhooks. |
| Method |
public Channel setType(String type) |
| Sets the type of the delivery mechanism used for the channel, which is always web_hook, indicating that callback notifications are sent through webhooks. |
Parameters
| Parameter name | Parameter desc |
| type | Type of the delivery mechanism used for the channel, which is always web_hook, indicating that callback notifications are sent through webhooks. |
Return
| type | desc |
| Channel | A Channel object. |
| Method |
public Long getExpirationTime() |
| Obtains the date and time when the notification channel expires, expressed as a Unix timestamp in milliseconds. The maximum validity period of a file resource is one day, and that of a change resource is one week. |
Return
| type | desc |
| Long | Date and time when the notification channel expires. |
| Method |
public Channel setExpirationTime (Long expirationTime) |
| Sets the date and time when the notification channel expires. |
Parameters
| Parameter name | Parameter desc |
| expirationTime | Date and time when the notification channel expires, expressed as a Unix timestamp in milliseconds. The maximum validity period of a file resource is one day, and that of a change resource is one week. If this parameter is not specified, the validity period of a change resource is one week by default. |
Return
| type | desc |
| Channel | A Channel object. |
| Method |
public Map<String,String> getParams() |
| Obtains additional parameters for controlling delivery channel behavior. |
Return
| type | desc |
| Map<String,String> | Additional parameters for controlling delivery channel behavior. |
| Method |
public Channel setParams(Map<String,String> params) |
| Sets additional parameters for controlling delivery channel behavior. |
Parameters
| Parameter name | Parameter desc |
| params | Additional parameters for controlling delivery channel behavior. |
Return
| type | desc |
| Channel | A Channel object. |
| Method |
public Boolean getPayload() |
| Checks whether the payload of the delivery channel is required. |
Return
| type | desc |
| Boolean | Whether the payload of the delivery channel is required. |
| Method |
public Channel setPayload(Boolean payload) |
| Sets whether the payload of the delivery channel is required. |
Parameters
| Parameter name | Parameter desc |
| payload | Indicates whether the payload of the delivery channel is required. The value true indicates that the payload of the delivery channel is required and the value false indicates not. |
Return
| type | desc |
| Channel | A Channel object. |
| Method |
public Channel clone() |
| Clones a Channel object. |
Return
| type | desc |
| Channel | A Channel object. |
| Method |
public Channel set(String fieldName,Object value) |
| Sets the given field value for the given field name. |
Parameters
| Parameter name | Parameter desc |
| fieldName | Field name. |
| value | Field value. |
Return
| type | desc |
| Channel | A Channel object. |