eventattachment

package
v0.20241203.1090052 Latest Latest
Warning

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

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

README

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

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

Client Initialization

client := eventattachment.NewEventAttachmentClientWithBaseURI("https://graph.microsoft.com")
client.Client.Authorizer = authorizer

Example Usage: EventAttachmentClient.CreateEventAttachment

ctx := context.TODO()
id := eventattachment.NewUserIdEventID("userId", "eventId")

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


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

Example Usage: EventAttachmentClient.CreateEventAttachmentsUploadSession

ctx := context.TODO()
id := eventattachment.NewUserIdEventID("userId", "eventId")

payload := eventattachment.CreateEventAttachmentsUploadSessionRequest{
	// ...
}


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

Example Usage: EventAttachmentClient.DeleteEventAttachment

ctx := context.TODO()
id := eventattachment.NewUserIdEventIdAttachmentID("userId", "eventId", "attachmentId")

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

Example Usage: EventAttachmentClient.GetEventAttachment

ctx := context.TODO()
id := eventattachment.NewUserIdEventIdAttachmentID("userId", "eventId", "attachmentId")

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

Example Usage: EventAttachmentClient.GetEventAttachmentsCount

ctx := context.TODO()
id := eventattachment.NewUserIdEventID("userId", "eventId")

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

Example Usage: EventAttachmentClient.ListEventAttachments

ctx := context.TODO()
id := eventattachment.NewUserIdEventID("userId", "eventId")

// alternatively `client.ListEventAttachments(ctx, id, eventattachment.DefaultListEventAttachmentsOperationOptions())` can be used to do batched pagination
items, err := client.ListEventAttachmentsComplete(ctx, id, eventattachment.DefaultListEventAttachmentsOperationOptions())
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 CreateEventAttachmentOperationOptions

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

func DefaultCreateEventAttachmentOperationOptions

func DefaultCreateEventAttachmentOperationOptions() CreateEventAttachmentOperationOptions

func (CreateEventAttachmentOperationOptions) ToHeaders

func (CreateEventAttachmentOperationOptions) ToOData

func (CreateEventAttachmentOperationOptions) ToQuery

type CreateEventAttachmentOperationResponse

type CreateEventAttachmentOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        beta.Attachment
}

type CreateEventAttachmentsUploadSessionOperationOptions

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

func DefaultCreateEventAttachmentsUploadSessionOperationOptions

func DefaultCreateEventAttachmentsUploadSessionOperationOptions() CreateEventAttachmentsUploadSessionOperationOptions

func (CreateEventAttachmentsUploadSessionOperationOptions) ToHeaders

func (CreateEventAttachmentsUploadSessionOperationOptions) ToOData

func (CreateEventAttachmentsUploadSessionOperationOptions) ToQuery

type CreateEventAttachmentsUploadSessionOperationResponse

type CreateEventAttachmentsUploadSessionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *beta.UploadSession
}

type CreateEventAttachmentsUploadSessionRequest

type CreateEventAttachmentsUploadSessionRequest struct {
	AttachmentItem *beta.AttachmentItem `json:"AttachmentItem,omitempty"`
}

type DeleteEventAttachmentOperationOptions

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

func DefaultDeleteEventAttachmentOperationOptions

func DefaultDeleteEventAttachmentOperationOptions() DeleteEventAttachmentOperationOptions

func (DeleteEventAttachmentOperationOptions) ToHeaders

func (DeleteEventAttachmentOperationOptions) ToOData

func (DeleteEventAttachmentOperationOptions) ToQuery

type DeleteEventAttachmentOperationResponse

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

type EventAttachmentClient

type EventAttachmentClient struct {
	Client *msgraph.Client
}

func NewEventAttachmentClientWithBaseURI

func NewEventAttachmentClientWithBaseURI(sdkApi sdkEnv.Api) (*EventAttachmentClient, error)

func (EventAttachmentClient) CreateEventAttachment

CreateEventAttachment - Create new navigation property to attachments for users

func (EventAttachmentClient) CreateEventAttachmentsUploadSession

CreateEventAttachmentsUploadSession - 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 an 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 (EventAttachmentClient) DeleteEventAttachment

DeleteEventAttachment - Delete navigation property attachments for users

func (EventAttachmentClient) GetEventAttachment

GetEventAttachment - Get attachments from users. The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable.

func (EventAttachmentClient) GetEventAttachmentsCount

GetEventAttachmentsCount - Get the number of the resource

func (EventAttachmentClient) ListEventAttachments

ListEventAttachments - Get attachments from users. The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable.

func (EventAttachmentClient) ListEventAttachmentsComplete

ListEventAttachmentsComplete retrieves all the results into a single object

func (EventAttachmentClient) ListEventAttachmentsCompleteMatchingPredicate

func (c EventAttachmentClient) ListEventAttachmentsCompleteMatchingPredicate(ctx context.Context, id beta.UserIdEventId, options ListEventAttachmentsOperationOptions, predicate AttachmentOperationPredicate) (result ListEventAttachmentsCompleteResult, err error)

ListEventAttachmentsCompleteMatchingPredicate retrieves all the results and then applies the predicate

type GetEventAttachmentOperationOptions

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

func DefaultGetEventAttachmentOperationOptions

func DefaultGetEventAttachmentOperationOptions() GetEventAttachmentOperationOptions

func (GetEventAttachmentOperationOptions) ToHeaders

func (GetEventAttachmentOperationOptions) ToOData

func (GetEventAttachmentOperationOptions) ToQuery

type GetEventAttachmentOperationResponse

type GetEventAttachmentOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        beta.Attachment
}

type GetEventAttachmentsCountOperationOptions

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

func DefaultGetEventAttachmentsCountOperationOptions

func DefaultGetEventAttachmentsCountOperationOptions() GetEventAttachmentsCountOperationOptions

func (GetEventAttachmentsCountOperationOptions) ToHeaders

func (GetEventAttachmentsCountOperationOptions) ToOData

func (GetEventAttachmentsCountOperationOptions) ToQuery

type GetEventAttachmentsCountOperationResponse

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

type ListEventAttachmentsCompleteResult

type ListEventAttachmentsCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []beta.Attachment
}

type ListEventAttachmentsCustomPager

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

type ListEventAttachmentsOperationOptions

type ListEventAttachmentsOperationOptions 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 DefaultListEventAttachmentsOperationOptions

func DefaultListEventAttachmentsOperationOptions() ListEventAttachmentsOperationOptions

func (ListEventAttachmentsOperationOptions) ToHeaders

func (ListEventAttachmentsOperationOptions) ToOData

func (ListEventAttachmentsOperationOptions) ToQuery

type ListEventAttachmentsOperationResponse

type ListEventAttachmentsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]beta.Attachment
}

Jump to

Keyboard shortcuts

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