CreateChatThreadOptions Class

  • java.lang.Object
    • com.azure.communication.chat.models.CreateChatThreadOptions

public final class CreateChatThreadOptions

The CreateChatThreadOptions model.

Constructor Summary

Constructor Description
CreateChatThreadOptions(String topic)

Creates a new instance of CreateChatThreadOptions.

Method Summary

Modifier and Type Method and Description
CreateChatThreadOptions addParticipant(ChatParticipant participant)

Adds another participant to the list of participants to create the chat thread with

String getIdempotencyToken()

Gets the idempotencyToken property

Map<String,String> getMetadata()

Gets the metadata key-value pairs associated with the chat thread.

List<ChatParticipant> getParticipants()

Gets participants to be added to the chat thread.

ChatRetentionPolicy getRetentionPolicy()

Gets the thread retention policy.

String getTopic()

Gets the chat thread topic.

CreateChatThreadOptions setIdempotencyToken(String idempotencyToken)

Sets the idempotencyToken property: If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same idempotencyToken and get back an appropriate response without the server executing the request multiple times.

CreateChatThreadOptions setMetadata(Map<String,String> metadata)

Sets the metadata key-value pairs associated with the chat thread.

CreateChatThreadOptions setParticipants(List<ChatParticipant> participants)

Gets participants to be added to the chat thread.

CreateChatThreadOptions setRetentionPolicy(ChatRetentionPolicy retentionPolicy)

Sets the thread retention policy.

Methods inherited from java.lang.Object

Constructor Details

CreateChatThreadOptions

public CreateChatThreadOptions(String topic)

Creates a new instance of CreateChatThreadOptions.

Parameters:

topic - the topic value to set.

Method Details

addParticipant

public CreateChatThreadOptions addParticipant(ChatParticipant participant)

Adds another participant to the list of participants to create the chat thread with

Parameters:

participant - The participant to add

Returns:

the CreateChatThreadOptions object itself

getIdempotencyToken

public String getIdempotencyToken()

Gets the idempotencyToken property

Returns:

the idempotencyToken.

getMetadata

public Map<String,String> getMetadata()

Gets the metadata key-value pairs associated with the chat thread.

Returns:

the metadata map.

getParticipants

public List<ChatParticipant> getParticipants()

Gets participants to be added to the chat thread.

Returns:

the participants.

getRetentionPolicy

public ChatRetentionPolicy getRetentionPolicy()

Gets the thread retention policy.

Returns:

the retentionPolicy value.

getTopic

public String getTopic()

Gets the chat thread topic.

Returns:

the topic.

setIdempotencyToken

public CreateChatThreadOptions setIdempotencyToken(String idempotencyToken)

Sets the idempotencyToken property: If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same idempotencyToken and get back an appropriate response without the server executing the request multiple times. The value of the idempotencyToken is an opaque string representing a client-generated, globally unique for all time, identifier for the request. It is recommended to use version 4 (random) UUIDs.

Parameters:

idempotencyToken - the idempotencyToken.

Returns:

the CreateChatThreadOptions object itself.

setMetadata

public CreateChatThreadOptions setMetadata(Map<String,String> metadata)

Sets the metadata key-value pairs associated with the chat thread.

Parameters:

metadata - the metadata map to set.

Returns:

the CreateChatThreadOptions object itself.

setParticipants

public CreateChatThreadOptions setParticipants(List<ChatParticipant> participants)

Gets participants to be added to the chat thread.

Parameters:

participants - the participants value to set.

Returns:

the CreateChatThreadOptions object itself.

setRetentionPolicy

public CreateChatThreadOptions setRetentionPolicy(ChatRetentionPolicy retentionPolicy)

Sets the thread retention policy.

Parameters:

retentionPolicy - the retention policy to set.

Returns:

the CreateChatThreadOptions object itself.

Applies to