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 ¶
- type CopyMailFolderOperationOptions
- type CopyMailFolderOperationResponse
- type CopyMailFolderRequest
- type CreateMailFolderOperationOptions
- type CreateMailFolderOperationResponse
- type DeleteMailFolderOperationOptions
- type DeleteMailFolderOperationResponse
- type GetMailFolderOperationOptions
- type GetMailFolderOperationResponse
- type GetMailFoldersCountOperationOptions
- type GetMailFoldersCountOperationResponse
- type ListMailFoldersCompleteResult
- type ListMailFoldersCustomPager
- type ListMailFoldersOperationOptions
- type ListMailFoldersOperationResponse
- type MailFolderClient
- func (c MailFolderClient) CopyMailFolder(ctx context.Context, id beta.UserIdMailFolderId, input CopyMailFolderRequest, ...) (result CopyMailFolderOperationResponse, err error)
- func (c MailFolderClient) CreateMailFolder(ctx context.Context, id beta.UserId, input beta.MailFolder, ...) (result CreateMailFolderOperationResponse, err error)
- func (c MailFolderClient) DeleteMailFolder(ctx context.Context, id beta.UserIdMailFolderId, ...) (result DeleteMailFolderOperationResponse, err error)
- func (c MailFolderClient) GetMailFolder(ctx context.Context, id beta.UserIdMailFolderId, ...) (result GetMailFolderOperationResponse, err error)
- func (c MailFolderClient) GetMailFoldersCount(ctx context.Context, id beta.UserId, ...) (result GetMailFoldersCountOperationResponse, err error)
- func (c MailFolderClient) ListMailFolders(ctx context.Context, id beta.UserId, options ListMailFoldersOperationOptions) (result ListMailFoldersOperationResponse, err error)
- func (c MailFolderClient) ListMailFoldersComplete(ctx context.Context, id beta.UserId, options ListMailFoldersOperationOptions) (ListMailFoldersCompleteResult, error)
- func (c MailFolderClient) ListMailFoldersCompleteMatchingPredicate(ctx context.Context, id beta.UserId, options ListMailFoldersOperationOptions, ...) (result ListMailFoldersCompleteResult, err error)
- func (c MailFolderClient) MoveMailFolder(ctx context.Context, id beta.UserIdMailFolderId, input MoveMailFolderRequest, ...) (result MoveMailFolderOperationResponse, err error)
- func (c MailFolderClient) UpdateMailFolder(ctx context.Context, id beta.UserIdMailFolderId, input beta.MailFolder, ...) (result UpdateMailFolderOperationResponse, err error)
- type MailFolderOperationPredicate
- type MoveMailFolderOperationOptions
- type MoveMailFolderOperationResponse
- type MoveMailFolderRequest
- type UpdateMailFolderOperationOptions
- type UpdateMailFolderOperationResponse
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 (o CopyMailFolderOperationOptions) ToHeaders() *client.Headers
func (CopyMailFolderOperationOptions) ToOData ¶
func (o CopyMailFolderOperationOptions) ToOData() *odata.Query
func (CopyMailFolderOperationOptions) ToQuery ¶
func (o CopyMailFolderOperationOptions) ToQuery() *client.QueryParams
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 (o CreateMailFolderOperationOptions) ToHeaders() *client.Headers
func (CreateMailFolderOperationOptions) ToOData ¶
func (o CreateMailFolderOperationOptions) ToOData() *odata.Query
func (CreateMailFolderOperationOptions) ToQuery ¶
func (o CreateMailFolderOperationOptions) ToQuery() *client.QueryParams
type DeleteMailFolderOperationOptions ¶
type DeleteMailFolderOperationOptions struct { IfMatch *string Metadata *odata.Metadata RetryFunc client.RequestRetryFunc }
func DefaultDeleteMailFolderOperationOptions ¶
func DefaultDeleteMailFolderOperationOptions() DeleteMailFolderOperationOptions
func (DeleteMailFolderOperationOptions) ToHeaders ¶
func (o DeleteMailFolderOperationOptions) ToHeaders() *client.Headers
func (DeleteMailFolderOperationOptions) ToOData ¶
func (o DeleteMailFolderOperationOptions) ToOData() *odata.Query
func (DeleteMailFolderOperationOptions) ToQuery ¶
func (o DeleteMailFolderOperationOptions) ToQuery() *client.QueryParams
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 (o GetMailFolderOperationOptions) ToHeaders() *client.Headers
func (GetMailFolderOperationOptions) ToOData ¶
func (o GetMailFolderOperationOptions) ToOData() *odata.Query
func (GetMailFolderOperationOptions) ToQuery ¶
func (o GetMailFolderOperationOptions) ToQuery() *client.QueryParams
type GetMailFoldersCountOperationOptions ¶
type GetMailFoldersCountOperationOptions struct { Filter *string Metadata *odata.Metadata RetryFunc client.RequestRetryFunc Search *string }
func DefaultGetMailFoldersCountOperationOptions ¶
func DefaultGetMailFoldersCountOperationOptions() GetMailFoldersCountOperationOptions
func (GetMailFoldersCountOperationOptions) ToHeaders ¶
func (o GetMailFoldersCountOperationOptions) ToHeaders() *client.Headers
func (GetMailFoldersCountOperationOptions) ToOData ¶
func (o GetMailFoldersCountOperationOptions) ToOData() *odata.Query
func (GetMailFoldersCountOperationOptions) ToQuery ¶
func (o GetMailFoldersCountOperationOptions) ToQuery() *client.QueryParams
type ListMailFoldersCompleteResult ¶
type ListMailFoldersCompleteResult struct { LatestHttpResponse *http.Response Items []beta.MailFolder }
type ListMailFoldersCustomPager ¶
func (*ListMailFoldersCustomPager) NextPageLink ¶
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 (o ListMailFoldersOperationOptions) ToHeaders() *client.Headers
func (ListMailFoldersOperationOptions) ToOData ¶
func (o ListMailFoldersOperationOptions) ToOData() *odata.Query
func (ListMailFoldersOperationOptions) ToQuery ¶
func (o ListMailFoldersOperationOptions) ToQuery() *client.QueryParams
type MailFolderClient ¶
func NewMailFolderClientWithBaseURI ¶
func NewMailFolderClientWithBaseURI(sdkApi sdkEnv.Api) (*MailFolderClient, error)
func (MailFolderClient) CopyMailFolder ¶
func (c MailFolderClient) CopyMailFolder(ctx context.Context, id beta.UserIdMailFolderId, input CopyMailFolderRequest, options CopyMailFolderOperationOptions) (result CopyMailFolderOperationResponse, err error)
CopyMailFolder - Invoke action copy. Copy a mail folder and its contents to another mail folder.
func (MailFolderClient) CreateMailFolder ¶
func (c MailFolderClient) CreateMailFolder(ctx context.Context, id beta.UserId, input beta.MailFolder, options CreateMailFolderOperationOptions) (result CreateMailFolderOperationResponse, err error)
CreateMailFolder - Create new navigation property to mailFolders for users
func (MailFolderClient) DeleteMailFolder ¶
func (c MailFolderClient) DeleteMailFolder(ctx context.Context, id beta.UserIdMailFolderId, options DeleteMailFolderOperationOptions) (result DeleteMailFolderOperationResponse, err error)
DeleteMailFolder - Delete navigation property mailFolders for users
func (MailFolderClient) GetMailFolder ¶
func (c MailFolderClient) GetMailFolder(ctx context.Context, id beta.UserIdMailFolderId, options GetMailFolderOperationOptions) (result GetMailFolderOperationResponse, err error)
GetMailFolder - Get mailFolders from users. The user's mail folders. Read-only. Nullable.
func (MailFolderClient) GetMailFoldersCount ¶
func (c MailFolderClient) GetMailFoldersCount(ctx context.Context, id beta.UserId, options GetMailFoldersCountOperationOptions) (result GetMailFoldersCountOperationResponse, err error)
GetMailFoldersCount - Get the number of the resource
func (MailFolderClient) ListMailFolders ¶
func (c MailFolderClient) ListMailFolders(ctx context.Context, id beta.UserId, options ListMailFoldersOperationOptions) (result ListMailFoldersOperationResponse, err error)
ListMailFolders - Get mailFolders from users. The user's mail folders. Read-only. Nullable.
func (MailFolderClient) ListMailFoldersComplete ¶
func (c MailFolderClient) ListMailFoldersComplete(ctx context.Context, id beta.UserId, options ListMailFoldersOperationOptions) (ListMailFoldersCompleteResult, error)
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 ¶
func (c MailFolderClient) MoveMailFolder(ctx context.Context, id beta.UserIdMailFolderId, input MoveMailFolderRequest, options MoveMailFolderOperationOptions) (result MoveMailFolderOperationResponse, err error)
MoveMailFolder - Invoke action move. Move a mail folder and its contents to another mail folder.
func (MailFolderClient) UpdateMailFolder ¶
func (c MailFolderClient) UpdateMailFolder(ctx context.Context, id beta.UserIdMailFolderId, input beta.MailFolder, options UpdateMailFolderOperationOptions) (result UpdateMailFolderOperationResponse, err error)
UpdateMailFolder - Update the navigation property mailFolders in users
type MailFolderOperationPredicate ¶
type MailFolderOperationPredicate struct { }
func (MailFolderOperationPredicate) Matches ¶
func (p MailFolderOperationPredicate) Matches(input beta.MailFolder) bool
type MoveMailFolderOperationOptions ¶
type MoveMailFolderOperationOptions struct { Metadata *odata.Metadata RetryFunc client.RequestRetryFunc }
func DefaultMoveMailFolderOperationOptions ¶
func DefaultMoveMailFolderOperationOptions() MoveMailFolderOperationOptions
func (MoveMailFolderOperationOptions) ToHeaders ¶
func (o MoveMailFolderOperationOptions) ToHeaders() *client.Headers
func (MoveMailFolderOperationOptions) ToOData ¶
func (o MoveMailFolderOperationOptions) ToOData() *odata.Query
func (MoveMailFolderOperationOptions) ToQuery ¶
func (o MoveMailFolderOperationOptions) ToQuery() *client.QueryParams
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 (o UpdateMailFolderOperationOptions) ToHeaders() *client.Headers
func (UpdateMailFolderOperationOptions) ToOData ¶
func (o UpdateMailFolderOperationOptions) ToOData() *odata.Query
func (UpdateMailFolderOperationOptions) ToQuery ¶
func (o UpdateMailFolderOperationOptions) ToQuery() *client.QueryParams
Source Files ¶
- client.go
- method_copymailfolder.go
- method_createmailfolder.go
- method_deletemailfolder.go
- method_getmailfolder.go
- method_getmailfolderscount.go
- method_listmailfolders.go
- method_movemailfolder.go
- method_updatemailfolder.go
- model_copymailfolderrequest.go
- model_movemailfolderrequest.go
- predicates.go
- version.go