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: 0

README

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

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

Client Initialization

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

Example Usage: MailFolderClient.CopyMailFolder

ctx := context.TODO()
id := mailfolder.NewMeMailFolderID("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()

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


read, err := client.CreateMailFolder(ctx, 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.NewMeMailFolderID("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.NewMeMailFolderID("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()


read, err := client.GetMailFoldersCount(ctx, 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()


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

Example Usage: MailFolderClient.MoveMailFolder

ctx := context.TODO()
id := mailfolder.NewMeMailFolderID("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.NewMeMailFolderID("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
	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
	IncludeHiddenFolders *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 MailFolder. Use this API to create a new mail folder in the root folder of the user's mailbox. If you intend a new folder to be hidden, you must set the isHidden property to true on creation.

func (MailFolderClient) DeleteMailFolder

DeleteMailFolder - Delete mailFolder. Delete the specified mailFolder. The folder can be a mailSearchFolder. You can specify a mail folder by its folder ID, or by its well-known folder name, if one exists.

func (MailFolderClient) GetMailFolder

GetMailFolder - Get mailFolder. Retrieve the properties and relationships of a message folder object. The following list shows the two existing scenarios where an app can get another user's mail folder

func (MailFolderClient) GetMailFoldersCount

GetMailFoldersCount - Get the number of the resource

func (MailFolderClient) ListMailFolders

ListMailFolders - List mailFolders. Get the mail folder collection directly under the root folder of the signed-in user. The returned collection includes any mail search folders directly under the root. By default, this operation does not return hidden folders. Use a query parameter includeHiddenFolders to include them in the response. This operation does not return all mail folders in a mailbox, only the child folders of the root folder. To return all mail folders in a mailbox, each child folder must be traversed separately.

func (MailFolderClient) ListMailFoldersComplete

ListMailFoldersComplete retrieves all the results into a single object

func (MailFolderClient) ListMailFoldersCompleteMatchingPredicate

func (c MailFolderClient) ListMailFoldersCompleteMatchingPredicate(ctx context.Context, 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 mailSearchFolder. Update the writable properties of a mailSearchFolder object.

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