thread

package
v0.20241126.2320 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/microsoft-graph/groups/beta/thread Documentation

The thread SDK allows for interaction with Microsoft Graph groups (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/groups/beta/thread"

Client Initialization

client := thread.NewThreadClientWithBaseURI("https://graph.microsoft.com")
client.Client.Authorizer = authorizer

Example Usage: ThreadClient.CreateThread

ctx := context.TODO()
id := thread.NewGroupID("groupId")

payload := thread.ConversationThread{
	// ...
}


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

Example Usage: ThreadClient.DeleteThread

ctx := context.TODO()
id := thread.NewGroupIdThreadID("groupId", "conversationThreadId")

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

Example Usage: ThreadClient.GetThread

ctx := context.TODO()
id := thread.NewGroupIdThreadID("groupId", "conversationThreadId")

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

Example Usage: ThreadClient.GetThreadsCount

ctx := context.TODO()
id := thread.NewGroupID("groupId")

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

Example Usage: ThreadClient.ListThreads

ctx := context.TODO()
id := thread.NewGroupID("groupId")

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

Example Usage: ThreadClient.ReplyThread

ctx := context.TODO()
id := thread.NewGroupIdThreadID("groupId", "conversationThreadId")

payload := thread.ReplyThreadRequest{
	// ...
}


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

Example Usage: ThreadClient.UpdateThread

ctx := context.TODO()
id := thread.NewGroupIdThreadID("groupId", "conversationThreadId")

payload := thread.ConversationThread{
	// ...
}


read, err := client.UpdateThread(ctx, id, payload, thread.DefaultUpdateThreadOperationOptions())
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 ConversationThreadOperationPredicate

type ConversationThreadOperationPredicate struct {
}

func (ConversationThreadOperationPredicate) Matches

type CreateThreadOperationOptions

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

func DefaultCreateThreadOperationOptions

func DefaultCreateThreadOperationOptions() CreateThreadOperationOptions

func (CreateThreadOperationOptions) ToHeaders

func (CreateThreadOperationOptions) ToOData

func (CreateThreadOperationOptions) ToQuery

type CreateThreadOperationResponse

type CreateThreadOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *beta.ConversationThread
}

type DeleteThreadOperationOptions

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

func DefaultDeleteThreadOperationOptions

func DefaultDeleteThreadOperationOptions() DeleteThreadOperationOptions

func (DeleteThreadOperationOptions) ToHeaders

func (DeleteThreadOperationOptions) ToOData

func (DeleteThreadOperationOptions) ToQuery

type DeleteThreadOperationResponse

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

type GetThreadOperationOptions

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

func DefaultGetThreadOperationOptions

func DefaultGetThreadOperationOptions() GetThreadOperationOptions

func (GetThreadOperationOptions) ToHeaders

func (o GetThreadOperationOptions) ToHeaders() *client.Headers

func (GetThreadOperationOptions) ToOData

func (o GetThreadOperationOptions) ToOData() *odata.Query

func (GetThreadOperationOptions) ToQuery

type GetThreadOperationResponse

type GetThreadOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *beta.ConversationThread
}

type GetThreadsCountOperationOptions

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

func DefaultGetThreadsCountOperationOptions

func DefaultGetThreadsCountOperationOptions() GetThreadsCountOperationOptions

func (GetThreadsCountOperationOptions) ToHeaders

func (GetThreadsCountOperationOptions) ToOData

func (GetThreadsCountOperationOptions) ToQuery

type GetThreadsCountOperationResponse

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

type ListThreadsCompleteResult

type ListThreadsCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []beta.ConversationThread
}

type ListThreadsCustomPager

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

type ListThreadsOperationOptions

type ListThreadsOperationOptions 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 DefaultListThreadsOperationOptions

func DefaultListThreadsOperationOptions() ListThreadsOperationOptions

func (ListThreadsOperationOptions) ToHeaders

func (ListThreadsOperationOptions) ToOData

func (ListThreadsOperationOptions) ToQuery

type ListThreadsOperationResponse

type ListThreadsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]beta.ConversationThread
}

type ReplyThreadOperationOptions

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

func DefaultReplyThreadOperationOptions

func DefaultReplyThreadOperationOptions() ReplyThreadOperationOptions

func (ReplyThreadOperationOptions) ToHeaders

func (ReplyThreadOperationOptions) ToOData

func (ReplyThreadOperationOptions) ToQuery

type ReplyThreadOperationResponse

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

type ReplyThreadRequest

type ReplyThreadRequest struct {
	Post *beta.Post `json:"Post,omitempty"`
}

type ThreadClient

type ThreadClient struct {
	Client *msgraph.Client
}

func NewThreadClientWithBaseURI

func NewThreadClientWithBaseURI(sdkApi sdkEnv.Api) (*ThreadClient, error)

func (ThreadClient) CreateThread

CreateThread - Create conversation thread. Start a new group conversation by first creating a thread. A new conversation, conversation thread, and post are created in the group. Use reply thread or reply post to further post to that thread. Note: You can also start a new thread in an existing conversation.

func (ThreadClient) DeleteThread

DeleteThread - Delete conversationThread. Delete conversationThread.

func (ThreadClient) GetThread

GetThread - Get conversation thread. Get a thread object.

func (ThreadClient) GetThreadsCount

GetThreadsCount - Get the number of the resource

func (ThreadClient) ListThreads

ListThreads - List threads. Get all the threads of a group. Note: You can also get all the threads of a conversation.

func (ThreadClient) ListThreadsComplete

ListThreadsComplete retrieves all the results into a single object

func (ThreadClient) ListThreadsCompleteMatchingPredicate

func (c ThreadClient) ListThreadsCompleteMatchingPredicate(ctx context.Context, id beta.GroupId, options ListThreadsOperationOptions, predicate ConversationThreadOperationPredicate) (result ListThreadsCompleteResult, err error)

ListThreadsCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ThreadClient) ReplyThread

ReplyThread - Invoke action reply. Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions.

func (ThreadClient) UpdateThread

UpdateThread - Update conversation thread. Update a thread object.

type UpdateThreadOperationOptions

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

func DefaultUpdateThreadOperationOptions

func DefaultUpdateThreadOperationOptions() UpdateThreadOperationOptions

func (UpdateThreadOperationOptions) ToHeaders

func (UpdateThreadOperationOptions) ToOData

func (UpdateThreadOperationOptions) ToQuery

type UpdateThreadOperationResponse

type UpdateThreadOperationResponse 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