event

package
v0.20241126.1723 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/microsoft-graph/groups/stable/event Documentation

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

Client Initialization

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

Example Usage: EventClient.AcceptEvent

ctx := context.TODO()
id := event.NewGroupIdEventID("groupId", "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.NewGroupIdEventID("groupId", "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()
id := event.NewGroupID("groupId")

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


read, err := client.CreateEvent(ctx, id, 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.NewGroupIdEventID("groupId", "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.NewGroupIdEventID("groupId", "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.NewGroupIdEventID("groupId", "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.NewGroupIdEventID("groupId", "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.NewGroupIdEventID("groupId", "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()
id := event.NewGroupID("groupId")

read, err := client.GetEventsCount(ctx, id, 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()
id := event.NewGroupID("groupId")

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

Example Usage: EventClient.SnoozeEventReminder

ctx := context.TODO()
id := event.NewGroupIdEventID("groupId", "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.NewGroupIdEventID("groupId", "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.NewGroupIdEventID("groupId", "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

CreateEvent - Create event. Use this API to create a new event.

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. Delete an event object.

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 an event object.

func (EventClient) GetEventsCount

GetEventsCount - Get the number of the resource

func (EventClient) ListEvents

ListEvents - List events. Retrieve a list of event objects.

func (EventClient) ListEventsComplete

ListEventsComplete retrieves all the results into a single object

func (EventClient) ListEventsCompleteMatchingPredicate

func (c EventClient) ListEventsCompleteMatchingPredicate(ctx context.Context, id stable.GroupId, 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 the navigation property events in groups

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