messageattachment

package
v0.20241021.1074254 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/microsoft-graph/users/stable/messageattachment Documentation

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

Client Initialization

client := messageattachment.NewMessageAttachmentClientWithBaseURI("https://graph.microsoft.com")
client.Client.Authorizer = authorizer

Example Usage: MessageAttachmentClient.CreateMessageAttachment

ctx := context.TODO()
id := messageattachment.NewUserIdMessageID("userId", "messageId")

payload := messageattachment.Attachment{
	// ...
}


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

Example Usage: MessageAttachmentClient.CreateMessageAttachmentsUploadSession

ctx := context.TODO()
id := messageattachment.NewUserIdMessageID("userId", "messageId")

payload := messageattachment.CreateMessageAttachmentsUploadSessionRequest{
	// ...
}


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

Example Usage: MessageAttachmentClient.DeleteMessageAttachment

ctx := context.TODO()
id := messageattachment.NewUserIdMessageIdAttachmentID("userId", "messageId", "attachmentId")

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

Example Usage: MessageAttachmentClient.GetMessageAttachment

ctx := context.TODO()
id := messageattachment.NewUserIdMessageIdAttachmentID("userId", "messageId", "attachmentId")

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

Example Usage: MessageAttachmentClient.GetMessageAttachmentsCount

ctx := context.TODO()
id := messageattachment.NewUserIdMessageID("userId", "messageId")

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

Example Usage: MessageAttachmentClient.ListMessageAttachments

ctx := context.TODO()
id := messageattachment.NewUserIdMessageID("userId", "messageId")

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttachmentOperationPredicate

type AttachmentOperationPredicate struct {
}

func (AttachmentOperationPredicate) Matches

type CreateMessageAttachmentOperationOptions

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

func DefaultCreateMessageAttachmentOperationOptions

func DefaultCreateMessageAttachmentOperationOptions() CreateMessageAttachmentOperationOptions

func (CreateMessageAttachmentOperationOptions) ToHeaders

func (CreateMessageAttachmentOperationOptions) ToOData

func (CreateMessageAttachmentOperationOptions) ToQuery

type CreateMessageAttachmentOperationResponse

type CreateMessageAttachmentOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        stable.Attachment
}

type CreateMessageAttachmentsUploadSessionOperationOptions

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

func DefaultCreateMessageAttachmentsUploadSessionOperationOptions

func DefaultCreateMessageAttachmentsUploadSessionOperationOptions() CreateMessageAttachmentsUploadSessionOperationOptions

func (CreateMessageAttachmentsUploadSessionOperationOptions) ToHeaders

func (CreateMessageAttachmentsUploadSessionOperationOptions) ToOData

func (CreateMessageAttachmentsUploadSessionOperationOptions) ToQuery

type CreateMessageAttachmentsUploadSessionOperationResponse

type CreateMessageAttachmentsUploadSessionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *stable.UploadSession
}

type CreateMessageAttachmentsUploadSessionRequest

type CreateMessageAttachmentsUploadSessionRequest struct {
	AttachmentItem *stable.AttachmentItem `json:"AttachmentItem,omitempty"`
}

type DeleteMessageAttachmentOperationOptions

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

func DefaultDeleteMessageAttachmentOperationOptions

func DefaultDeleteMessageAttachmentOperationOptions() DeleteMessageAttachmentOperationOptions

func (DeleteMessageAttachmentOperationOptions) ToHeaders

func (DeleteMessageAttachmentOperationOptions) ToOData

func (DeleteMessageAttachmentOperationOptions) ToQuery

type DeleteMessageAttachmentOperationResponse

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

type GetMessageAttachmentOperationOptions

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

func DefaultGetMessageAttachmentOperationOptions

func DefaultGetMessageAttachmentOperationOptions() GetMessageAttachmentOperationOptions

func (GetMessageAttachmentOperationOptions) ToHeaders

func (GetMessageAttachmentOperationOptions) ToOData

func (GetMessageAttachmentOperationOptions) ToQuery

type GetMessageAttachmentOperationResponse

type GetMessageAttachmentOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        stable.Attachment
}

type GetMessageAttachmentsCountOperationOptions

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

func DefaultGetMessageAttachmentsCountOperationOptions

func DefaultGetMessageAttachmentsCountOperationOptions() GetMessageAttachmentsCountOperationOptions

func (GetMessageAttachmentsCountOperationOptions) ToHeaders

func (GetMessageAttachmentsCountOperationOptions) ToOData

func (GetMessageAttachmentsCountOperationOptions) ToQuery

type GetMessageAttachmentsCountOperationResponse

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

type ListMessageAttachmentsCompleteResult

type ListMessageAttachmentsCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []stable.Attachment
}

type ListMessageAttachmentsCustomPager

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

type ListMessageAttachmentsOperationOptions

type ListMessageAttachmentsOperationOptions 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 DefaultListMessageAttachmentsOperationOptions

func DefaultListMessageAttachmentsOperationOptions() ListMessageAttachmentsOperationOptions

func (ListMessageAttachmentsOperationOptions) ToHeaders

func (ListMessageAttachmentsOperationOptions) ToOData

func (ListMessageAttachmentsOperationOptions) ToQuery

type ListMessageAttachmentsOperationResponse

type ListMessageAttachmentsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]stable.Attachment
}

type MessageAttachmentClient

type MessageAttachmentClient struct {
	Client *msgraph.Client
}

func NewMessageAttachmentClientWithBaseURI

func NewMessageAttachmentClientWithBaseURI(sdkApi sdkEnv.Api) (*MessageAttachmentClient, error)

func (MessageAttachmentClient) CreateMessageAttachment

CreateMessageAttachment - Create new navigation property to attachments for users

func (MessageAttachmentClient) CreateMessageAttachmentsUploadSession

CreateMessageAttachmentsUploadSession - Invoke action createUploadSession. Create an upload session that allows an app to iteratively upload ranges of a file, so as to attach the file to the specified Outlook item. The item can be a message or event. Use this approach to attach a file if the file size is between 3 MB and 150 MB. To attach a file that's smaller than 3 MB, do a POST operation on the attachments navigation property of the Outlook item; see how to do this for a message or for an event. As part of the response, this action returns an upload URL that you can use in subsequent sequential PUT queries. Request headers for each PUT operation let you specify the exact range of bytes to be uploaded. This allows transfer to be resumed, in case the network connection is dropped during upload. The following are the steps to attach a file to an Outlook item using an upload session: See attach large files to Outlook messages or events for an example.

func (MessageAttachmentClient) DeleteMessageAttachment

DeleteMessageAttachment - Delete navigation property attachments for users

func (MessageAttachmentClient) GetMessageAttachment

GetMessageAttachment - Get attachments from users. The fileAttachment and itemAttachment attachments for the message.

func (MessageAttachmentClient) GetMessageAttachmentsCount

GetMessageAttachmentsCount - Get the number of the resource

func (MessageAttachmentClient) ListMessageAttachments

ListMessageAttachments - Get attachments from users. The fileAttachment and itemAttachment attachments for the message.

func (MessageAttachmentClient) ListMessageAttachmentsComplete

ListMessageAttachmentsComplete retrieves all the results into a single object

func (MessageAttachmentClient) ListMessageAttachmentsCompleteMatchingPredicate

func (c MessageAttachmentClient) ListMessageAttachmentsCompleteMatchingPredicate(ctx context.Context, id stable.UserIdMessageId, options ListMessageAttachmentsOperationOptions, predicate AttachmentOperationPredicate) (result ListMessageAttachmentsCompleteResult, err error)

ListMessageAttachmentsCompleteMatchingPredicate retrieves all the results and then applies the predicate

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL