threadpost

package
v0.20241111.1164443 Latest Latest
Warning

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

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

README

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

The threadpost 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/threadpost"

Client Initialization

client := threadpost.NewThreadPostClientWithBaseURI("https://graph.microsoft.com")
client.Client.Authorizer = authorizer

Example Usage: ThreadPostClient.ForwardThreadPost

ctx := context.TODO()
id := threadpost.NewGroupIdThreadIdPostID("groupId", "conversationThreadId", "postId")

payload := threadpost.ForwardThreadPostRequest{
	// ...
}


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

Example Usage: ThreadPostClient.GetThreadPost

ctx := context.TODO()
id := threadpost.NewGroupIdThreadIdPostID("groupId", "conversationThreadId", "postId")

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

Example Usage: ThreadPostClient.GetThreadPostsCount

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

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

Example Usage: ThreadPostClient.ListThreadPosts

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

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

Example Usage: ThreadPostClient.ReplyThreadPost

ctx := context.TODO()
id := threadpost.NewGroupIdThreadIdPostID("groupId", "conversationThreadId", "postId")

payload := threadpost.ReplyThreadPostRequest{
	// ...
}


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

Example Usage: ThreadPostClient.UpdateThreadPost

ctx := context.TODO()
id := threadpost.NewGroupIdThreadIdPostID("groupId", "conversationThreadId", "postId")

payload := threadpost.Post{
	// ...
}


read, err := client.UpdateThreadPost(ctx, id, payload, threadpost.DefaultUpdateThreadPostOperationOptions())
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 ForwardThreadPostOperationOptions

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

func DefaultForwardThreadPostOperationOptions

func DefaultForwardThreadPostOperationOptions() ForwardThreadPostOperationOptions

func (ForwardThreadPostOperationOptions) ToHeaders

func (ForwardThreadPostOperationOptions) ToOData

func (ForwardThreadPostOperationOptions) ToQuery

type ForwardThreadPostOperationResponse

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

type ForwardThreadPostRequest

type ForwardThreadPostRequest struct {
	Comment      nullable.Type[string] `json:"Comment,omitempty"`
	ToRecipients *[]beta.Recipient     `json:"ToRecipients,omitempty"`
}

type GetThreadPostOperationOptions

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

func DefaultGetThreadPostOperationOptions

func DefaultGetThreadPostOperationOptions() GetThreadPostOperationOptions

func (GetThreadPostOperationOptions) ToHeaders

func (GetThreadPostOperationOptions) ToOData

func (GetThreadPostOperationOptions) ToQuery

type GetThreadPostOperationResponse

type GetThreadPostOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *beta.Post
}

type GetThreadPostsCountOperationOptions

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

func DefaultGetThreadPostsCountOperationOptions

func DefaultGetThreadPostsCountOperationOptions() GetThreadPostsCountOperationOptions

func (GetThreadPostsCountOperationOptions) ToHeaders

func (GetThreadPostsCountOperationOptions) ToOData

func (GetThreadPostsCountOperationOptions) ToQuery

type GetThreadPostsCountOperationResponse

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

type ListThreadPostsCompleteResult

type ListThreadPostsCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []beta.Post
}

type ListThreadPostsCustomPager

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

type ListThreadPostsOperationOptions

type ListThreadPostsOperationOptions 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 DefaultListThreadPostsOperationOptions

func DefaultListThreadPostsOperationOptions() ListThreadPostsOperationOptions

func (ListThreadPostsOperationOptions) ToHeaders

func (ListThreadPostsOperationOptions) ToOData

func (ListThreadPostsOperationOptions) ToQuery

type ListThreadPostsOperationResponse

type ListThreadPostsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]beta.Post
}

type PostOperationPredicate

type PostOperationPredicate struct {
}

func (PostOperationPredicate) Matches

func (p PostOperationPredicate) Matches(input beta.Post) bool

type ReplyThreadPostOperationOptions

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

func DefaultReplyThreadPostOperationOptions

func DefaultReplyThreadPostOperationOptions() ReplyThreadPostOperationOptions

func (ReplyThreadPostOperationOptions) ToHeaders

func (ReplyThreadPostOperationOptions) ToOData

func (ReplyThreadPostOperationOptions) ToQuery

type ReplyThreadPostOperationResponse

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

type ReplyThreadPostRequest

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

type ThreadPostClient

type ThreadPostClient struct {
	Client *msgraph.Client
}

func NewThreadPostClientWithBaseURI

func NewThreadPostClientWithBaseURI(sdkApi sdkEnv.Api) (*ThreadPostClient, error)

func (ThreadPostClient) ForwardThreadPost

ForwardThreadPost - Invoke action forward. Forward a post to a recipient. 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 (ThreadPostClient) GetThreadPost

GetThreadPost - Get post. Get the properties and relationships of a post in a specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. Since the post resource supports extensions, you can also use the GET operation to get custom properties and extension data in a post instance.

func (ThreadPostClient) GetThreadPostsCount

GetThreadPostsCount - Get the number of the resource

func (ThreadPostClient) ListThreadPosts

ListThreadPosts - List posts. Get the posts of the specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation.

func (ThreadPostClient) ListThreadPostsComplete

ListThreadPostsComplete retrieves all the results into a single object

func (ThreadPostClient) ListThreadPostsCompleteMatchingPredicate

func (c ThreadPostClient) ListThreadPostsCompleteMatchingPredicate(ctx context.Context, id beta.GroupIdThreadId, options ListThreadPostsOperationOptions, predicate PostOperationPredicate) (result ListThreadPostsCompleteResult, err error)

ListThreadPostsCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ThreadPostClient) ReplyThreadPost

ReplyThreadPost - Invoke action reply

func (ThreadPostClient) UpdateThreadPost

UpdateThreadPost - Update the navigation property posts in groups

type UpdateThreadPostOperationOptions

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

func DefaultUpdateThreadPostOperationOptions

func DefaultUpdateThreadPostOperationOptions() UpdateThreadPostOperationOptions

func (UpdateThreadPostOperationOptions) ToHeaders

func (UpdateThreadPostOperationOptions) ToOData

func (UpdateThreadPostOperationOptions) ToQuery

type UpdateThreadPostOperationResponse

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