event

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/me/stable/event Documentation

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

Client Initialization

client := event.NewEventClientWithBaseURI("https://graph.microsoft.com")
client.Client.Authorizer = authorizer

Example Usage: EventClient.AcceptEvent

ctx := context.TODO()
id := event.NewMeEventID("eventId")

payload := event.AcceptEventRequest{
	// ...
}


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

Example Usage: EventClient.CancelEvent

ctx := context.TODO()
id := event.NewMeEventID("eventId")

payload := event.CancelEventRequest{
	// ...
}


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

Example Usage: EventClient.CreateEvent

ctx := context.TODO()

payload := event.Event{
	// ...
}


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

Example Usage: EventClient.DeclineEvent

ctx := context.TODO()
id := event.NewMeEventID("eventId")

payload := event.DeclineEventRequest{
	// ...
}


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

Example Usage: EventClient.DeleteEvent

ctx := context.TODO()
id := event.NewMeEventID("eventId")

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

Example Usage: EventClient.DismissEventReminder

ctx := context.TODO()
id := event.NewMeEventID("eventId")

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

Example Usage: EventClient.ForwardEvent

ctx := context.TODO()
id := event.NewMeEventID("eventId")

payload := event.ForwardEventRequest{
	// ...
}


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

Example Usage: EventClient.GetEvent

ctx := context.TODO()
id := event.NewMeEventID("eventId")

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

Example Usage: EventClient.GetEventsCount

ctx := context.TODO()


read, err := client.GetEventsCount(ctx, event.DefaultGetEventsCountOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: EventClient.ListEvents

ctx := context.TODO()


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

Example Usage: EventClient.SnoozeEventReminder

ctx := context.TODO()
id := event.NewMeEventID("eventId")

payload := event.SnoozeEventReminderRequest{
	// ...
}


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

Example Usage: EventClient.TentativelyAcceptEvent

ctx := context.TODO()
id := event.NewMeEventID("eventId")

payload := event.TentativelyAcceptEventRequest{
	// ...
}


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

Example Usage: EventClient.UpdateEvent

ctx := context.TODO()
id := event.NewMeEventID("eventId")

payload := event.Event{
	// ...
}


read, err := client.UpdateEvent(ctx, id, payload, event.DefaultUpdateEventOperationOptions())
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 AcceptEventOperationOptions

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

func DefaultAcceptEventOperationOptions

func DefaultAcceptEventOperationOptions() AcceptEventOperationOptions

func (AcceptEventOperationOptions) ToHeaders

func (AcceptEventOperationOptions) ToOData

func (AcceptEventOperationOptions) ToQuery

type AcceptEventOperationResponse

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

type AcceptEventRequest

type AcceptEventRequest struct {
	Comment      nullable.Type[string] `json:"Comment,omitempty"`
	SendResponse nullable.Type[bool]   `json:"SendResponse,omitempty"`
}

type CancelEventOperationOptions

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

func DefaultCancelEventOperationOptions

func DefaultCancelEventOperationOptions() CancelEventOperationOptions

func (CancelEventOperationOptions) ToHeaders

func (CancelEventOperationOptions) ToOData

func (CancelEventOperationOptions) ToQuery

type CancelEventOperationResponse

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

type CancelEventRequest

type CancelEventRequest struct {
	Comment nullable.Type[string] `json:"Comment,omitempty"`
}

type CreateEventOperationOptions

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

func DefaultCreateEventOperationOptions

func DefaultCreateEventOperationOptions() CreateEventOperationOptions

func (CreateEventOperationOptions) ToHeaders

func (CreateEventOperationOptions) ToOData

func (CreateEventOperationOptions) ToQuery

type CreateEventOperationResponse

type CreateEventOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *stable.Event
}

type DeclineEventOperationOptions

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

func DefaultDeclineEventOperationOptions

func DefaultDeclineEventOperationOptions() DeclineEventOperationOptions

func (DeclineEventOperationOptions) ToHeaders

func (DeclineEventOperationOptions) ToOData

func (DeclineEventOperationOptions) ToQuery

type DeclineEventOperationResponse

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

type DeclineEventRequest

type DeclineEventRequest struct {
	Comment         nullable.Type[string] `json:"Comment,omitempty"`
	ProposedNewTime *stable.TimeSlot      `json:"ProposedNewTime,omitempty"`
	SendResponse    nullable.Type[bool]   `json:"SendResponse,omitempty"`
}

type DeleteEventOperationOptions

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

func DefaultDeleteEventOperationOptions

func DefaultDeleteEventOperationOptions() DeleteEventOperationOptions

func (DeleteEventOperationOptions) ToHeaders

func (DeleteEventOperationOptions) ToOData

func (DeleteEventOperationOptions) ToQuery

type DeleteEventOperationResponse

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

type DismissEventReminderOperationOptions

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

func DefaultDismissEventReminderOperationOptions

func DefaultDismissEventReminderOperationOptions() DismissEventReminderOperationOptions

func (DismissEventReminderOperationOptions) ToHeaders

func (DismissEventReminderOperationOptions) ToOData

func (DismissEventReminderOperationOptions) ToQuery

type DismissEventReminderOperationResponse

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

type EventClient

type EventClient struct {
	Client *msgraph.Client
}

func NewEventClientWithBaseURI

func NewEventClientWithBaseURI(sdkApi sdkEnv.Api) (*EventClient, error)

func (EventClient) AcceptEvent

AcceptEvent - Invoke action accept. Accept the specified event in a user calendar.

func (EventClient) CancelEvent

CancelEvent - Invoke action cancel. This action allows the organizer of a meeting to send a cancellation message and cancel the event. The action moves the event to the Deleted Items folder. The organizer can also cancel an occurrence of a recurring meeting by providing the occurrence event ID. An attendee calling this action gets an error (HTTP 400 Bad Request), with the following error message: 'Your request can't be completed. You need to be an organizer to cancel a meeting.' This action differs from Delete in that Cancel is available to only the organizer, and lets the organizer send a custom message to the attendees about the cancellation.

func (EventClient) CreateEvent

func (c EventClient) CreateEvent(ctx context.Context, input stable.Event, options CreateEventOperationOptions) (result CreateEventOperationResponse, err error)

CreateEvent - Create event. Create an event in the user's default calendar or specified calendar. By default, the allowNewTimeProposals property is set to true when an event is created, which means invitees can propose a different date/time for the event. See Propose new meeting times for more information on how to propose a time, and how to receive and accept a new time proposal. You can specify the time zone for each of the start and end times of the event as part of their values, because the start and end properties are of dateTimeTimeZone type. First find the supported time zones to make sure you set only time zones that have been configured for the user's mailbox server. When an event is sent, the server sends invitations to all the attendees. Setting the location in an event An Exchange administrator can set up a mailbox and an email address for a resource such as a meeting room, or equipment like a projector. Users can then invite the resource as an attendee to a meeting. On behalf of the resource, the server accepts or rejects the meeting request based on the free/busy schedule of the resource. If the server accepts a meeting for the resource, it creates an event for the meeting in the resource's calendar. If the meeting is rescheduled, the server automatically updates the event in the resource's calendar. Another advantage of setting up a mailbox for a resource is to control scheduling of the resource, for example, only executives or their delegates can book a private meeting room. If you're organizing an event that involves a meeting location: Additionally, if the meeting location has been set up as a resource, or if the event involves some equipment that has been set up as a resource

func (EventClient) DeclineEvent

DeclineEvent - Invoke action decline. Decline invitation to the specified event in a user calendar. If the event allows proposals for new times, on declining the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times.

func (EventClient) DeleteEvent

DeleteEvent - Delete event. Removes the specified event from the containing calendar. If the event is a meeting, deleting the event on the organizer's calendar sends a cancellation message to the meeting attendees.

func (EventClient) DismissEventReminder

DismissEventReminder - Invoke action dismissReminder. Dismiss a reminder that has been triggered for an event in a user calendar.

func (EventClient) ForwardEvent

ForwardEvent - Invoke action forward. This action allows the organizer or attendee of a meeting event to forward the meeting request to a new recipient. If the meeting event is forwarded from an attendee's Microsoft 365 mailbox to another recipient, this action also sends a message to notify the organizer of the forwarding, and adds the recipient to the organizer's copy of the meeting event. This convenience is not available when forwarding from an Outlook.com account.

func (EventClient) GetEvent

GetEvent - Get event. Get the properties and relationships of the specified event object. Currently, this operation returns event bodies in only HTML format. There are two scenarios where an app can get an event in another user's calendar: Since the event resource supports extensions, you can also use the GET operation to get custom properties and extension data in an event instance.

func (EventClient) GetEventsCount

GetEventsCount - Get the number of the resource

func (EventClient) ListEvents

ListEvents - List events. Get a list of event objects in the user's mailbox. The list contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. Currently, this operation returns event bodies in only HTML format. There are two scenarios where an app can get events in another user's calendar

func (EventClient) ListEventsComplete

ListEventsComplete retrieves all the results into a single object

func (EventClient) ListEventsCompleteMatchingPredicate

func (c EventClient) ListEventsCompleteMatchingPredicate(ctx context.Context, options ListEventsOperationOptions, predicate EventOperationPredicate) (result ListEventsCompleteResult, err error)

ListEventsCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (EventClient) SnoozeEventReminder

SnoozeEventReminder - Invoke action snoozeReminder. Postpone a reminder for an event in a user calendar until a new time.

func (EventClient) TentativelyAcceptEvent

TentativelyAcceptEvent - Invoke action tentativelyAccept. Tentatively accept the specified event in a user calendar. If the event allows proposals for new times, on responding tentative to the event, an invitee can choose to suggest an alternative time by including the proposedNewTime parameter. For more information on how to propose a time, and how to receive and accept a new time proposal, see Propose new meeting times.

func (EventClient) UpdateEvent

UpdateEvent - Update event. Update the properties of the event object.

type EventOperationPredicate

type EventOperationPredicate struct {
}

func (EventOperationPredicate) Matches

func (p EventOperationPredicate) Matches(input stable.Event) bool

type ForwardEventOperationOptions

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

func DefaultForwardEventOperationOptions

func DefaultForwardEventOperationOptions() ForwardEventOperationOptions

func (ForwardEventOperationOptions) ToHeaders

func (ForwardEventOperationOptions) ToOData

func (ForwardEventOperationOptions) ToQuery

type ForwardEventOperationResponse

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

type ForwardEventRequest

type ForwardEventRequest struct {
	Comment      nullable.Type[string] `json:"Comment,omitempty"`
	ToRecipients *[]stable.Recipient   `json:"ToRecipients,omitempty"`
}

type GetEventOperationOptions

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

func DefaultGetEventOperationOptions

func DefaultGetEventOperationOptions() GetEventOperationOptions

func (GetEventOperationOptions) ToHeaders

func (o GetEventOperationOptions) ToHeaders() *client.Headers

func (GetEventOperationOptions) ToOData

func (o GetEventOperationOptions) ToOData() *odata.Query

func (GetEventOperationOptions) ToQuery

type GetEventOperationResponse

type GetEventOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *stable.Event
}

type GetEventsCountOperationOptions

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

func DefaultGetEventsCountOperationOptions

func DefaultGetEventsCountOperationOptions() GetEventsCountOperationOptions

func (GetEventsCountOperationOptions) ToHeaders

func (GetEventsCountOperationOptions) ToOData

func (GetEventsCountOperationOptions) ToQuery

type GetEventsCountOperationResponse

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

type ListEventsCompleteResult

type ListEventsCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []stable.Event
}

type ListEventsCustomPager

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

type ListEventsOperationOptions

type ListEventsOperationOptions 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 DefaultListEventsOperationOptions

func DefaultListEventsOperationOptions() ListEventsOperationOptions

func (ListEventsOperationOptions) ToHeaders

func (o ListEventsOperationOptions) ToHeaders() *client.Headers

func (ListEventsOperationOptions) ToOData

func (o ListEventsOperationOptions) ToOData() *odata.Query

func (ListEventsOperationOptions) ToQuery

type ListEventsOperationResponse

type ListEventsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]stable.Event
}

type SnoozeEventReminderOperationOptions

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

func DefaultSnoozeEventReminderOperationOptions

func DefaultSnoozeEventReminderOperationOptions() SnoozeEventReminderOperationOptions

func (SnoozeEventReminderOperationOptions) ToHeaders

func (SnoozeEventReminderOperationOptions) ToOData

func (SnoozeEventReminderOperationOptions) ToQuery

type SnoozeEventReminderOperationResponse

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

type SnoozeEventReminderRequest

type SnoozeEventReminderRequest struct {
	NewReminderTime *stable.DateTimeTimeZone `json:"NewReminderTime,omitempty"`
}

type TentativelyAcceptEventOperationOptions

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

func DefaultTentativelyAcceptEventOperationOptions

func DefaultTentativelyAcceptEventOperationOptions() TentativelyAcceptEventOperationOptions

func (TentativelyAcceptEventOperationOptions) ToHeaders

func (TentativelyAcceptEventOperationOptions) ToOData

func (TentativelyAcceptEventOperationOptions) ToQuery

type TentativelyAcceptEventOperationResponse

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

type TentativelyAcceptEventRequest

type TentativelyAcceptEventRequest struct {
	Comment         nullable.Type[string] `json:"Comment,omitempty"`
	ProposedNewTime *stable.TimeSlot      `json:"ProposedNewTime,omitempty"`
	SendResponse    nullable.Type[bool]   `json:"SendResponse,omitempty"`
}

type UpdateEventOperationOptions

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

func DefaultUpdateEventOperationOptions

func DefaultUpdateEventOperationOptions() UpdateEventOperationOptions

func (UpdateEventOperationOptions) ToHeaders

func (UpdateEventOperationOptions) ToOData

func (UpdateEventOperationOptions) ToQuery

type UpdateEventOperationResponse

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