chatmessage

package
v0.20241104.1140654 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/microsoft-graph/me/beta/chatmessage Documentation

The chatmessage SDK allows for interaction with Microsoft Graph me (API Version beta).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-sdk/microsoft-graph/me/beta/chatmessage"

Client Initialization

client := chatmessage.NewChatMessageClientWithBaseURI("https://graph.microsoft.com")
client.Client.Authorizer = authorizer

Example Usage: ChatMessageClient.CreateChatMessage

ctx := context.TODO()
id := chatmessage.NewMeChatID("chatId")

payload := chatmessage.ChatMessage{
	// ...
}


read, err := client.CreateChatMessage(ctx, id, payload, chatmessage.DefaultCreateChatMessageOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ChatMessageClient.CreateChatMessageSoftDelete

ctx := context.TODO()
id := chatmessage.NewMeChatIdMessageID("chatId", "chatMessageId")

read, err := client.CreateChatMessageSoftDelete(ctx, id, chatmessage.DefaultCreateChatMessageSoftDeleteOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ChatMessageClient.CreateChatMessageUndoSoftDelete

ctx := context.TODO()
id := chatmessage.NewMeChatIdMessageID("chatId", "chatMessageId")

read, err := client.CreateChatMessageUndoSoftDelete(ctx, id, chatmessage.DefaultCreateChatMessageUndoSoftDeleteOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ChatMessageClient.DeleteChatMessage

ctx := context.TODO()
id := chatmessage.NewMeChatIdMessageID("chatId", "chatMessageId")

read, err := client.DeleteChatMessage(ctx, id, chatmessage.DefaultDeleteChatMessageOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ChatMessageClient.GetChatMessage

ctx := context.TODO()
id := chatmessage.NewMeChatIdMessageID("chatId", "chatMessageId")

read, err := client.GetChatMessage(ctx, id, chatmessage.DefaultGetChatMessageOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ChatMessageClient.GetChatMessagesCount

ctx := context.TODO()
id := chatmessage.NewMeChatID("chatId")

read, err := client.GetChatMessagesCount(ctx, id, chatmessage.DefaultGetChatMessagesCountOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ChatMessageClient.ListChatMessages

ctx := context.TODO()
id := chatmessage.NewMeChatID("chatId")

// alternatively `client.ListChatMessages(ctx, id, chatmessage.DefaultListChatMessagesOperationOptions())` can be used to do batched pagination
items, err := client.ListChatMessagesComplete(ctx, id, chatmessage.DefaultListChatMessagesOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: ChatMessageClient.SetChatMessageReaction

ctx := context.TODO()
id := chatmessage.NewMeChatIdMessageID("chatId", "chatMessageId")

payload := chatmessage.SetChatMessageReactionRequest{
	// ...
}


read, err := client.SetChatMessageReaction(ctx, id, payload, chatmessage.DefaultSetChatMessageReactionOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ChatMessageClient.UnsetChatMessageReaction

ctx := context.TODO()
id := chatmessage.NewMeChatIdMessageID("chatId", "chatMessageId")

payload := chatmessage.UnsetChatMessageReactionRequest{
	// ...
}


read, err := client.UnsetChatMessageReaction(ctx, id, payload, chatmessage.DefaultUnsetChatMessageReactionOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ChatMessageClient.UpdateChatMessage

ctx := context.TODO()
id := chatmessage.NewMeChatIdMessageID("chatId", "chatMessageId")

payload := chatmessage.ChatMessage{
	// ...
}


read, err := client.UpdateChatMessage(ctx, id, payload, chatmessage.DefaultUpdateChatMessageOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatMessageClient

type ChatMessageClient struct {
	Client *msgraph.Client
}

func NewChatMessageClientWithBaseURI

func NewChatMessageClientWithBaseURI(sdkApi sdkEnv.Api) (*ChatMessageClient, error)

func (ChatMessageClient) CreateChatMessage

CreateChatMessage - Create new navigation property to messages for me

func (ChatMessageClient) CreateChatMessageSoftDelete

CreateChatMessageSoftDelete - Invoke action softDelete. Delete a single chatMessage or a chat message reply in a channel or a chat.

func (ChatMessageClient) CreateChatMessageUndoSoftDelete

CreateChatMessageUndoSoftDelete - Invoke action undoSoftDelete. Undo soft deletion of a single chatMessage or a chat message reply in a channel or a chat.

func (ChatMessageClient) DeleteChatMessage

DeleteChatMessage - Delete navigation property messages for me

func (ChatMessageClient) GetChatMessage

GetChatMessage - Get messages from me. A collection of all the messages in the chat. Nullable.

func (ChatMessageClient) GetChatMessagesCount

GetChatMessagesCount - Get the number of the resource

func (ChatMessageClient) ListChatMessages

ListChatMessages - Get messages from me. A collection of all the messages in the chat. Nullable.

func (ChatMessageClient) ListChatMessagesComplete

ListChatMessagesComplete retrieves all the results into a single object

func (ChatMessageClient) ListChatMessagesCompleteMatchingPredicate

func (c ChatMessageClient) ListChatMessagesCompleteMatchingPredicate(ctx context.Context, id beta.MeChatId, options ListChatMessagesOperationOptions, predicate ChatMessageOperationPredicate) (result ListChatMessagesCompleteResult, err error)

ListChatMessagesCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ChatMessageClient) SetChatMessageReaction

SetChatMessageReaction - Invoke action setReaction

func (ChatMessageClient) UnsetChatMessageReaction

UnsetChatMessageReaction - Invoke action unsetReaction

func (ChatMessageClient) UpdateChatMessage

UpdateChatMessage - Update the navigation property messages in me

type ChatMessageOperationPredicate

type ChatMessageOperationPredicate struct {
}

func (ChatMessageOperationPredicate) Matches

type CreateChatMessageOperationOptions

type CreateChatMessageOperationOptions struct {
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
}

func DefaultCreateChatMessageOperationOptions

func DefaultCreateChatMessageOperationOptions() CreateChatMessageOperationOptions

func (CreateChatMessageOperationOptions) ToHeaders

func (CreateChatMessageOperationOptions) ToOData

func (CreateChatMessageOperationOptions) ToQuery

type CreateChatMessageOperationResponse

type CreateChatMessageOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *beta.ChatMessage
}

type CreateChatMessageSoftDeleteOperationOptions

type CreateChatMessageSoftDeleteOperationOptions struct {
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
}

func DefaultCreateChatMessageSoftDeleteOperationOptions

func DefaultCreateChatMessageSoftDeleteOperationOptions() CreateChatMessageSoftDeleteOperationOptions

func (CreateChatMessageSoftDeleteOperationOptions) ToHeaders

func (CreateChatMessageSoftDeleteOperationOptions) ToOData

func (CreateChatMessageSoftDeleteOperationOptions) ToQuery

type CreateChatMessageSoftDeleteOperationResponse

type CreateChatMessageSoftDeleteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type CreateChatMessageUndoSoftDeleteOperationOptions

type CreateChatMessageUndoSoftDeleteOperationOptions struct {
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
}

func DefaultCreateChatMessageUndoSoftDeleteOperationOptions

func DefaultCreateChatMessageUndoSoftDeleteOperationOptions() CreateChatMessageUndoSoftDeleteOperationOptions

func (CreateChatMessageUndoSoftDeleteOperationOptions) ToHeaders

func (CreateChatMessageUndoSoftDeleteOperationOptions) ToOData

func (CreateChatMessageUndoSoftDeleteOperationOptions) ToQuery

type CreateChatMessageUndoSoftDeleteOperationResponse

type CreateChatMessageUndoSoftDeleteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type DeleteChatMessageOperationOptions

type DeleteChatMessageOperationOptions struct {
	IfMatch   *string
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
}

func DefaultDeleteChatMessageOperationOptions

func DefaultDeleteChatMessageOperationOptions() DeleteChatMessageOperationOptions

func (DeleteChatMessageOperationOptions) ToHeaders

func (DeleteChatMessageOperationOptions) ToOData

func (DeleteChatMessageOperationOptions) ToQuery

type DeleteChatMessageOperationResponse

type DeleteChatMessageOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetChatMessageOperationOptions

type GetChatMessageOperationOptions struct {
	Expand    *odata.Expand
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
	Select    *[]string
}

func DefaultGetChatMessageOperationOptions

func DefaultGetChatMessageOperationOptions() GetChatMessageOperationOptions

func (GetChatMessageOperationOptions) ToHeaders

func (GetChatMessageOperationOptions) ToOData

func (GetChatMessageOperationOptions) ToQuery

type GetChatMessageOperationResponse

type GetChatMessageOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *beta.ChatMessage
}

type GetChatMessagesCountOperationOptions

type GetChatMessagesCountOperationOptions struct {
	Filter    *string
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
	Search    *string
}

func DefaultGetChatMessagesCountOperationOptions

func DefaultGetChatMessagesCountOperationOptions() GetChatMessagesCountOperationOptions

func (GetChatMessagesCountOperationOptions) ToHeaders

func (GetChatMessagesCountOperationOptions) ToOData

func (GetChatMessagesCountOperationOptions) ToQuery

type GetChatMessagesCountOperationResponse

type GetChatMessagesCountOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]byte
}

type ListChatMessagesCompleteResult

type ListChatMessagesCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []beta.ChatMessage
}

type ListChatMessagesCustomPager

type ListChatMessagesCustomPager struct {
	NextLink *odata.Link `json:"@odata.nextLink"`
}
func (p *ListChatMessagesCustomPager) NextPageLink() *odata.Link

type ListChatMessagesOperationOptions

type ListChatMessagesOperationOptions struct {
	Count     *bool
	Expand    *odata.Expand
	Filter    *string
	Metadata  *odata.Metadata
	OrderBy   *odata.OrderBy
	RetryFunc client.RequestRetryFunc
	Search    *string
	Select    *[]string
	Skip      *int64
	Top       *int64
}

func DefaultListChatMessagesOperationOptions

func DefaultListChatMessagesOperationOptions() ListChatMessagesOperationOptions

func (ListChatMessagesOperationOptions) ToHeaders

func (ListChatMessagesOperationOptions) ToOData

func (ListChatMessagesOperationOptions) ToQuery

type ListChatMessagesOperationResponse

type ListChatMessagesOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]beta.ChatMessage
}

type SetChatMessageReactionOperationOptions

type SetChatMessageReactionOperationOptions struct {
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
}

func DefaultSetChatMessageReactionOperationOptions

func DefaultSetChatMessageReactionOperationOptions() SetChatMessageReactionOperationOptions

func (SetChatMessageReactionOperationOptions) ToHeaders

func (SetChatMessageReactionOperationOptions) ToOData

func (SetChatMessageReactionOperationOptions) ToQuery

type SetChatMessageReactionOperationResponse

type SetChatMessageReactionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type SetChatMessageReactionRequest

type SetChatMessageReactionRequest struct {
	ReactionType nullable.Type[string] `json:"reactionType,omitempty"`
}

type UnsetChatMessageReactionOperationOptions

type UnsetChatMessageReactionOperationOptions struct {
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
}

func DefaultUnsetChatMessageReactionOperationOptions

func DefaultUnsetChatMessageReactionOperationOptions() UnsetChatMessageReactionOperationOptions

func (UnsetChatMessageReactionOperationOptions) ToHeaders

func (UnsetChatMessageReactionOperationOptions) ToOData

func (UnsetChatMessageReactionOperationOptions) ToQuery

type UnsetChatMessageReactionOperationResponse

type UnsetChatMessageReactionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type UnsetChatMessageReactionRequest

type UnsetChatMessageReactionRequest struct {
	ReactionType nullable.Type[string] `json:"reactionType,omitempty"`
}

type UpdateChatMessageOperationOptions

type UpdateChatMessageOperationOptions struct {
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
}

func DefaultUpdateChatMessageOperationOptions

func DefaultUpdateChatMessageOperationOptions() UpdateChatMessageOperationOptions

func (UpdateChatMessageOperationOptions) ToHeaders

func (UpdateChatMessageOperationOptions) ToOData

func (UpdateChatMessageOperationOptions) ToQuery

type UpdateChatMessageOperationResponse

type UpdateChatMessageOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL