ConversationReferenceBuilder Class

Definition

Provides a fluent builder for constructing a ConversationReference with configurable channel, conversation, user, agent, and related properties.

public class ConversationReferenceBuilder
type ConversationReferenceBuilder = class
Public Class ConversationReferenceBuilder
Inheritance
ConversationReferenceBuilder

Remarks

Use ReferenceBuilder to incrementally specify details of a conversation reference, such as the user, agent, service URL, activity ID, and locale. This class is intended to simplify the creation of ConversationReference instances for use Proactive scenarios. The builder ensures required fields are set and applies sensible defaults for optional properties if not specified.

Constructors

Name Description
ConversationReferenceBuilder()

Methods

Name Description
Build()

Builds and returns a complete conversation reference, ensuring all required fields are populated.

Create(ChannelId, String)

Creates a new instance of the ReferenceBuilder class initialized with the specified channel and conversation identifiers.

Create(String, ChannelId, String)

Creates a new instance of the ReferenceBuilder class initialized with the specified agent ID, channel ID, and optional service URL.

ServiceUrlForChannel(ChannelId)
WithActivityId(String)

Sets the activity identifier for the reference being built.

WithAgent(ChannelAccount)

Sets the agent information for the reference and returns the current builder instance.

WithAgent(String, String)

Sets the agent information for the reference using the specified agent ID, name, and role.

WithLocale(String)

Sets the locale for the reference being built.

WithServiceUrl(String)

Sets the service URL for the reference and returns the current builder instance.

WithUser(ChannelAccount)

Sets the user associated with the conversation reference being built.

WithUser(String, String)

Sets the user information for the reference using the specified user ID, optional user name, and role.

Applies to