MessageContextMetadata

public struct MessageContextMetadata : Codable, Equatable

Metadata related to the message.

  • A label identifying the deployment environment, used for filtering log data. This string cannot contain carriage return, newline, or tab characters.

    Declaration

    Swift

    public var deployment: String?
  • A string value that identifies the user who is interacting with the workspace. The client must provide a unique identifier for each individual end user who accesses the application. For user-based plans, this user ID is used to identify unique users for billing purposes. This string cannot contain carriage return, newline, or tab characters. If no value is specified in the input, user_id is automatically set to the value of context.conversation_id. Note: This property is the same as the user_id property at the root of the message body. If user_id is specified in both locations in a message request, the value specified at the root is used.

    Declaration

    Swift

    public var userID: String?
  • Initialize a MessageContextMetadata with member variables.

    Declaration

    Swift

    public init(
        deployment: String? = nil,
        userID: String? = nil
    )

    Parameters

    deployment

    A label identifying the deployment environment, used for filtering log data. This string cannot contain carriage return, newline, or tab characters.

    userID

    A string value that identifies the user who is interacting with the workspace. The client must provide a unique identifier for each individual end user who accesses the application. For user-based plans, this user ID is used to identify unique users for billing purposes. This string cannot contain carriage return, newline, or tab characters. If no value is specified in the input, user_id is automatically set to the value of context.conversation_id. Note: This property is the same as the user_id property at the root of the message body. If user_id is specified in both locations in a message request, the value specified at the root is used.

    Return Value

    An initialized MessageContextMetadata.