NotificationMessagesAsyncClient Class

  • java.lang.Object
    • com.azure.communication.messages.NotificationMessagesAsyncClient

public final class NotificationMessagesAsyncClient

Initializes a new instance of the asynchronous NotificationMessagesClient type.

Method Summary

Modifier and Type Method and Description
Mono<BinaryData> downloadMedia(String mediaId)

Download the Media payload from a User to Business message.

Mono<Response<BinaryData>> downloadMediaWithResponse(String mediaId, RequestOptions requestOptions)

Download the Media payload from a User to Business message.

Mono<SendMessageResult> send(NotificationContent notificationContent)

Sends a notification message from Business to User.

Mono<Response<BinaryData>> sendWithResponse(BinaryData notificationContent, RequestOptions requestOptions)

Sends a notification message from Business to User.

Methods inherited from java.lang.Object

Method Details

downloadMedia

public Mono downloadMedia(String mediaId)

Download the Media payload from a User to Business message.

Parameters:

mediaId - The stream ID.

Returns:

the response body on successful completion of Mono.

downloadMediaWithResponse

public Mono> downloadMediaWithResponse(String mediaId, RequestOptions requestOptions)

Download the Media payload from a User to Business message.

Response Body Schema

BinaryData

Parameters:

mediaId - The stream ID.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

the response body along with Response<T> on successful completion of Mono.

send

public Mono send(NotificationContent notificationContent)

Sends a notification message from Business to User.

Parameters:

notificationContent - Details of the message to send.

Returns:

result of the send message operation on successful completion of Mono.

sendWithResponse

public Mono> sendWithResponse(BinaryData notificationContent, RequestOptions requestOptions)

Sends a notification message from Business to User.

Header Parameters

| ------------------------ | ------ | -------- | -------------------------------------------- |
| Name                     | Type   | Required | Description                                  |
| repeatability-request-id | String | No       | Repeatability request ID header              |
| repeatability-first-sent | String | No       | Repeatability first sent header as HTTP-date |

You can add these to a request with RequestOptions#addHeader

Request Body Schema

{
     kind: String(text/image/image_v0/document/video/audio/template) (Required)
     channelRegistrationId: String (Required)
     to (Required): [
         String (Required)
     ]
 }

Response Body Schema

{
     receipts (Required): [
          (Required){
             messageId: String (Required)
             to: String (Required)
         }
     ]
 }

Parameters:

notificationContent - Details of the message to send.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

result of the send message operation along with Response<T> on successful completion of Mono.

Applies to