README ¶
github.com/hashicorp/go-azure-sdk/microsoft-graph/groups/stable/thread
Documentation
The thread
SDK allows for interaction with Microsoft Graph groups
(API Version stable
).
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/stable/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 ¶
- type ConversationThreadOperationPredicate
- type CreateThreadOperationOptions
- type CreateThreadOperationResponse
- type DeleteThreadOperationOptions
- type DeleteThreadOperationResponse
- type GetThreadOperationOptions
- type GetThreadOperationResponse
- type GetThreadsCountOperationOptions
- type GetThreadsCountOperationResponse
- type ListThreadsCompleteResult
- type ListThreadsCustomPager
- type ListThreadsOperationOptions
- type ListThreadsOperationResponse
- type ReplyThreadOperationOptions
- type ReplyThreadOperationResponse
- type ReplyThreadRequest
- type ThreadClient
- func (c ThreadClient) CreateThread(ctx context.Context, id stable.GroupId, input stable.ConversationThread, ...) (result CreateThreadOperationResponse, err error)
- func (c ThreadClient) DeleteThread(ctx context.Context, id stable.GroupIdThreadId, ...) (result DeleteThreadOperationResponse, err error)
- func (c ThreadClient) GetThread(ctx context.Context, id stable.GroupIdThreadId, ...) (result GetThreadOperationResponse, err error)
- func (c ThreadClient) GetThreadsCount(ctx context.Context, id stable.GroupId, ...) (result GetThreadsCountOperationResponse, err error)
- func (c ThreadClient) ListThreads(ctx context.Context, id stable.GroupId, options ListThreadsOperationOptions) (result ListThreadsOperationResponse, err error)
- func (c ThreadClient) ListThreadsComplete(ctx context.Context, id stable.GroupId, options ListThreadsOperationOptions) (ListThreadsCompleteResult, error)
- func (c ThreadClient) ListThreadsCompleteMatchingPredicate(ctx context.Context, id stable.GroupId, options ListThreadsOperationOptions, ...) (result ListThreadsCompleteResult, err error)
- func (c ThreadClient) ReplyThread(ctx context.Context, id stable.GroupIdThreadId, input ReplyThreadRequest, ...) (result ReplyThreadOperationResponse, err error)
- func (c ThreadClient) UpdateThread(ctx context.Context, id stable.GroupIdThreadId, ...) (result UpdateThreadOperationResponse, err error)
- type UpdateThreadOperationOptions
- type UpdateThreadOperationResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConversationThreadOperationPredicate ¶
type ConversationThreadOperationPredicate struct { }
func (ConversationThreadOperationPredicate) Matches ¶
func (p ConversationThreadOperationPredicate) Matches(input stable.ConversationThread) bool
type CreateThreadOperationOptions ¶
type CreateThreadOperationOptions struct { Metadata *odata.Metadata RetryFunc client.RequestRetryFunc }
func DefaultCreateThreadOperationOptions ¶
func DefaultCreateThreadOperationOptions() CreateThreadOperationOptions
func (CreateThreadOperationOptions) ToHeaders ¶
func (o CreateThreadOperationOptions) ToHeaders() *client.Headers
func (CreateThreadOperationOptions) ToOData ¶
func (o CreateThreadOperationOptions) ToOData() *odata.Query
func (CreateThreadOperationOptions) ToQuery ¶
func (o CreateThreadOperationOptions) ToQuery() *client.QueryParams
type DeleteThreadOperationOptions ¶
type DeleteThreadOperationOptions struct { IfMatch *string Metadata *odata.Metadata RetryFunc client.RequestRetryFunc }
func DefaultDeleteThreadOperationOptions ¶
func DefaultDeleteThreadOperationOptions() DeleteThreadOperationOptions
func (DeleteThreadOperationOptions) ToHeaders ¶
func (o DeleteThreadOperationOptions) ToHeaders() *client.Headers
func (DeleteThreadOperationOptions) ToOData ¶
func (o DeleteThreadOperationOptions) ToOData() *odata.Query
func (DeleteThreadOperationOptions) ToQuery ¶
func (o DeleteThreadOperationOptions) ToQuery() *client.QueryParams
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 ¶
func (o GetThreadOperationOptions) ToQuery() *client.QueryParams
type GetThreadsCountOperationOptions ¶
type GetThreadsCountOperationOptions struct { Filter *string Metadata *odata.Metadata RetryFunc client.RequestRetryFunc Search *string }
func DefaultGetThreadsCountOperationOptions ¶
func DefaultGetThreadsCountOperationOptions() GetThreadsCountOperationOptions
func (GetThreadsCountOperationOptions) ToHeaders ¶
func (o GetThreadsCountOperationOptions) ToHeaders() *client.Headers
func (GetThreadsCountOperationOptions) ToOData ¶
func (o GetThreadsCountOperationOptions) ToOData() *odata.Query
func (GetThreadsCountOperationOptions) ToQuery ¶
func (o GetThreadsCountOperationOptions) ToQuery() *client.QueryParams
type ListThreadsCompleteResult ¶
type ListThreadsCompleteResult struct { LatestHttpResponse *http.Response Items []stable.ConversationThread }
type ListThreadsCustomPager ¶
func (*ListThreadsCustomPager) NextPageLink ¶
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 (o ListThreadsOperationOptions) ToHeaders() *client.Headers
func (ListThreadsOperationOptions) ToOData ¶
func (o ListThreadsOperationOptions) ToOData() *odata.Query
func (ListThreadsOperationOptions) ToQuery ¶
func (o ListThreadsOperationOptions) ToQuery() *client.QueryParams
type ReplyThreadOperationOptions ¶
type ReplyThreadOperationOptions struct { Metadata *odata.Metadata RetryFunc client.RequestRetryFunc }
func DefaultReplyThreadOperationOptions ¶
func DefaultReplyThreadOperationOptions() ReplyThreadOperationOptions
func (ReplyThreadOperationOptions) ToHeaders ¶
func (o ReplyThreadOperationOptions) ToHeaders() *client.Headers
func (ReplyThreadOperationOptions) ToOData ¶
func (o ReplyThreadOperationOptions) ToOData() *odata.Query
func (ReplyThreadOperationOptions) ToQuery ¶
func (o ReplyThreadOperationOptions) ToQuery() *client.QueryParams
type ReplyThreadRequest ¶
type ThreadClient ¶
func NewThreadClientWithBaseURI ¶
func NewThreadClientWithBaseURI(sdkApi sdkEnv.Api) (*ThreadClient, error)
func (ThreadClient) CreateThread ¶
func (c ThreadClient) CreateThread(ctx context.Context, id stable.GroupId, input stable.ConversationThread, options CreateThreadOperationOptions) (result CreateThreadOperationResponse, err error)
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 ¶
func (c ThreadClient) DeleteThread(ctx context.Context, id stable.GroupIdThreadId, options DeleteThreadOperationOptions) (result DeleteThreadOperationResponse, err error)
DeleteThread - Delete conversationThread. Delete conversationThread.
func (ThreadClient) GetThread ¶
func (c ThreadClient) GetThread(ctx context.Context, id stable.GroupIdThreadId, options GetThreadOperationOptions) (result GetThreadOperationResponse, err error)
GetThread - Get conversation thread. Get a thread object.
func (ThreadClient) GetThreadsCount ¶
func (c ThreadClient) GetThreadsCount(ctx context.Context, id stable.GroupId, options GetThreadsCountOperationOptions) (result GetThreadsCountOperationResponse, err error)
GetThreadsCount - Get the number of the resource
func (ThreadClient) ListThreads ¶
func (c ThreadClient) ListThreads(ctx context.Context, id stable.GroupId, options ListThreadsOperationOptions) (result ListThreadsOperationResponse, err error)
ListThreads - List threads. Get all the threads of a group.
func (ThreadClient) ListThreadsComplete ¶
func (c ThreadClient) ListThreadsComplete(ctx context.Context, id stable.GroupId, options ListThreadsOperationOptions) (ListThreadsCompleteResult, error)
ListThreadsComplete retrieves all the results into a single object
func (ThreadClient) ListThreadsCompleteMatchingPredicate ¶
func (c ThreadClient) ListThreadsCompleteMatchingPredicate(ctx context.Context, id stable.GroupId, options ListThreadsOperationOptions, predicate ConversationThreadOperationPredicate) (result ListThreadsCompleteResult, err error)
ListThreadsCompleteMatchingPredicate retrieves all the results and then applies the predicate
func (ThreadClient) ReplyThread ¶
func (c ThreadClient) ReplyThread(ctx context.Context, id stable.GroupIdThreadId, input ReplyThreadRequest, options ReplyThreadOperationOptions) (result ReplyThreadOperationResponse, err error)
ReplyThread - Invoke action reply. Reply to a post and add a new post to the specified thread in a group conversation. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation.
func (ThreadClient) UpdateThread ¶
func (c ThreadClient) UpdateThread(ctx context.Context, id stable.GroupIdThreadId, input stable.ConversationThread, options UpdateThreadOperationOptions) (result UpdateThreadOperationResponse, err error)
UpdateThread - Update conversation thread
type UpdateThreadOperationOptions ¶
type UpdateThreadOperationOptions struct { Metadata *odata.Metadata RetryFunc client.RequestRetryFunc }
func DefaultUpdateThreadOperationOptions ¶
func DefaultUpdateThreadOperationOptions() UpdateThreadOperationOptions
func (UpdateThreadOperationOptions) ToHeaders ¶
func (o UpdateThreadOperationOptions) ToHeaders() *client.Headers
func (UpdateThreadOperationOptions) ToOData ¶
func (o UpdateThreadOperationOptions) ToOData() *odata.Query
func (UpdateThreadOperationOptions) ToQuery ¶
func (o UpdateThreadOperationOptions) ToQuery() *client.QueryParams