mailfolder

package
v0.20241212.1154051 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/microsoft-graph/users/beta/mailfolder Documentation

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

Client Initialization

client := mailfolder.NewMailFolderClientWithBaseURI("https://graph.microsoft.com")
client.Client.Authorizer = authorizer

Example Usage: MailFolderClient.CopyMailFolder

ctx := context.TODO()
id := mailfolder.NewUserIdMailFolderID("userId", "mailFolderId")

payload := mailfolder.CopyMailFolderRequest{
	// ...
}


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

Example Usage: MailFolderClient.CreateMailFolder

ctx := context.TODO()
id := mailfolder.NewUserID("userId")

payload := mailfolder.MailFolder{
	// ...
}


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

Example Usage: MailFolderClient.DeleteMailFolder

ctx := context.TODO()
id := mailfolder.NewUserIdMailFolderID("userId", "mailFolderId")

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

Example Usage: MailFolderClient.GetMailFolder

ctx := context.TODO()
id := mailfolder.NewUserIdMailFolderID("userId", "mailFolderId")

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

Example Usage: MailFolderClient.GetMailFoldersCount

ctx := context.TODO()
id := mailfolder.NewUserID("userId")

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

Example Usage: MailFolderClient.ListMailFolders

ctx := context.TODO()
id := mailfolder.NewUserID("userId")

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

Example Usage: MailFolderClient.MoveMailFolder

ctx := context.TODO()
id := mailfolder.NewUserIdMailFolderID("userId", "mailFolderId")

payload := mailfolder.MoveMailFolderRequest{
	// ...
}


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

Example Usage: MailFolderClient.UpdateMailFolder

ctx := context.TODO()
id := mailfolder.NewUserIdMailFolderID("userId", "mailFolderId")

payload := mailfolder.MailFolder{
	// ...
}


read, err := client.UpdateMailFolder(ctx, id, payload, mailfolder.DefaultUpdateMailFolderOperationOptions())
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 CopyMailFolderOperationOptions

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

func DefaultCopyMailFolderOperationOptions

func DefaultCopyMailFolderOperationOptions() CopyMailFolderOperationOptions

func (CopyMailFolderOperationOptions) ToHeaders

func (CopyMailFolderOperationOptions) ToOData

func (CopyMailFolderOperationOptions) ToQuery

type CopyMailFolderOperationResponse

type CopyMailFolderOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        beta.MailFolder
}

type CopyMailFolderRequest

type CopyMailFolderRequest struct {
	DestinationId *string `json:"DestinationId,omitempty"`
}

type CreateMailFolderOperationOptions

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

func DefaultCreateMailFolderOperationOptions

func DefaultCreateMailFolderOperationOptions() CreateMailFolderOperationOptions

func (CreateMailFolderOperationOptions) ToHeaders

func (CreateMailFolderOperationOptions) ToOData

func (CreateMailFolderOperationOptions) ToQuery

type CreateMailFolderOperationResponse

type CreateMailFolderOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        beta.MailFolder
}

type DeleteMailFolderOperationOptions

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

func DefaultDeleteMailFolderOperationOptions

func DefaultDeleteMailFolderOperationOptions() DeleteMailFolderOperationOptions

func (DeleteMailFolderOperationOptions) ToHeaders

func (DeleteMailFolderOperationOptions) ToOData

func (DeleteMailFolderOperationOptions) ToQuery

type DeleteMailFolderOperationResponse

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

type GetMailFolderOperationOptions

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

func DefaultGetMailFolderOperationOptions

func DefaultGetMailFolderOperationOptions() GetMailFolderOperationOptions

func (GetMailFolderOperationOptions) ToHeaders

func (GetMailFolderOperationOptions) ToOData

func (GetMailFolderOperationOptions) ToQuery

type GetMailFolderOperationResponse

type GetMailFolderOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        beta.MailFolder
}

type GetMailFoldersCountOperationOptions

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

func DefaultGetMailFoldersCountOperationOptions

func DefaultGetMailFoldersCountOperationOptions() GetMailFoldersCountOperationOptions

func (GetMailFoldersCountOperationOptions) ToHeaders

func (GetMailFoldersCountOperationOptions) ToOData

func (GetMailFoldersCountOperationOptions) ToQuery

type GetMailFoldersCountOperationResponse

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

type ListMailFoldersCompleteResult

type ListMailFoldersCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []beta.MailFolder
}

type ListMailFoldersCustomPager

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

type ListMailFoldersOperationOptions

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

func DefaultListMailFoldersOperationOptions

func DefaultListMailFoldersOperationOptions() ListMailFoldersOperationOptions

func (ListMailFoldersOperationOptions) ToHeaders

func (ListMailFoldersOperationOptions) ToOData

func (ListMailFoldersOperationOptions) ToQuery

type ListMailFoldersOperationResponse

type ListMailFoldersOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]beta.MailFolder
}

type MailFolderClient

type MailFolderClient struct {
	Client *msgraph.Client
}

func NewMailFolderClientWithBaseURI

func NewMailFolderClientWithBaseURI(sdkApi sdkEnv.Api) (*MailFolderClient, error)

func (MailFolderClient) CopyMailFolder

CopyMailFolder - Invoke action copy. Copy a mail folder and its contents to another mail folder.

func (MailFolderClient) CreateMailFolder

CreateMailFolder - Create new navigation property to mailFolders for users

func (MailFolderClient) DeleteMailFolder

DeleteMailFolder - Delete navigation property mailFolders for users

func (MailFolderClient) GetMailFolder

GetMailFolder - Get mailFolders from users. The user's mail folders. Read-only. Nullable.

func (MailFolderClient) GetMailFoldersCount

GetMailFoldersCount - Get the number of the resource

func (MailFolderClient) ListMailFolders

ListMailFolders - Get mailFolders from users. The user's mail folders. Read-only. Nullable.

func (MailFolderClient) ListMailFoldersComplete

ListMailFoldersComplete retrieves all the results into a single object

func (MailFolderClient) ListMailFoldersCompleteMatchingPredicate

func (c MailFolderClient) ListMailFoldersCompleteMatchingPredicate(ctx context.Context, id beta.UserId, options ListMailFoldersOperationOptions, predicate MailFolderOperationPredicate) (result ListMailFoldersCompleteResult, err error)

ListMailFoldersCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (MailFolderClient) MoveMailFolder

MoveMailFolder - Invoke action move. Move a mail folder and its contents to another mail folder.

func (MailFolderClient) UpdateMailFolder

UpdateMailFolder - Update the navigation property mailFolders in users

type MailFolderOperationPredicate

type MailFolderOperationPredicate struct {
}

func (MailFolderOperationPredicate) Matches

type MoveMailFolderOperationOptions

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

func DefaultMoveMailFolderOperationOptions

func DefaultMoveMailFolderOperationOptions() MoveMailFolderOperationOptions

func (MoveMailFolderOperationOptions) ToHeaders

func (MoveMailFolderOperationOptions) ToOData

func (MoveMailFolderOperationOptions) ToQuery

type MoveMailFolderOperationResponse

type MoveMailFolderOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        beta.MailFolder
}

type MoveMailFolderRequest

type MoveMailFolderRequest struct {
	DestinationId *string `json:"DestinationId,omitempty"`
}

type UpdateMailFolderOperationOptions

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

func DefaultUpdateMailFolderOperationOptions

func DefaultUpdateMailFolderOperationOptions() UpdateMailFolderOperationOptions

func (UpdateMailFolderOperationOptions) ToHeaders

func (UpdateMailFolderOperationOptions) ToOData

func (UpdateMailFolderOperationOptions) ToQuery

type UpdateMailFolderOperationResponse

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