presence

package
v0.20241209.1115630 Latest Latest
Warning

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

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

README

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

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

Client Initialization

client := presence.NewPresenceClientWithBaseURI("https://graph.microsoft.com")
client.Client.Authorizer = authorizer

Example Usage: PresenceClient.ClearPresencePresence

ctx := context.TODO()
id := presence.NewUserID("userId")

payload := presence.ClearPresencePresenceRequest{
	// ...
}


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

Example Usage: PresenceClient.ClearPresenceUserPreferredPresence

ctx := context.TODO()
id := presence.NewUserID("userId")

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

Example Usage: PresenceClient.DeletePresence

ctx := context.TODO()
id := presence.NewUserID("userId")

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

Example Usage: PresenceClient.GetPresence

ctx := context.TODO()
id := presence.NewUserID("userId")

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

Example Usage: PresenceClient.SetPresencePresence

ctx := context.TODO()
id := presence.NewUserID("userId")

payload := presence.SetPresencePresenceRequest{
	// ...
}


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

Example Usage: PresenceClient.SetPresenceStatusMessage

ctx := context.TODO()
id := presence.NewUserID("userId")

payload := presence.SetPresenceStatusMessageRequest{
	// ...
}


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

Example Usage: PresenceClient.SetPresenceUserPreferredPresence

ctx := context.TODO()
id := presence.NewUserID("userId")

payload := presence.SetPresenceUserPreferredPresenceRequest{
	// ...
}


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

Example Usage: PresenceClient.UpdatePresence

ctx := context.TODO()
id := presence.NewUserID("userId")

payload := presence.Presence{
	// ...
}


read, err := client.UpdatePresence(ctx, id, payload, presence.DefaultUpdatePresenceOperationOptions())
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 ClearPresencePresenceOperationOptions

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

func DefaultClearPresencePresenceOperationOptions

func DefaultClearPresencePresenceOperationOptions() ClearPresencePresenceOperationOptions

func (ClearPresencePresenceOperationOptions) ToHeaders

func (ClearPresencePresenceOperationOptions) ToOData

func (ClearPresencePresenceOperationOptions) ToQuery

type ClearPresencePresenceOperationResponse

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

type ClearPresencePresenceRequest

type ClearPresencePresenceRequest struct {
	SessionId nullable.Type[string] `json:"sessionId,omitempty"`
}

type ClearPresenceUserPreferredPresenceOperationOptions

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

func DefaultClearPresenceUserPreferredPresenceOperationOptions

func DefaultClearPresenceUserPreferredPresenceOperationOptions() ClearPresenceUserPreferredPresenceOperationOptions

func (ClearPresenceUserPreferredPresenceOperationOptions) ToHeaders

func (ClearPresenceUserPreferredPresenceOperationOptions) ToOData

func (ClearPresenceUserPreferredPresenceOperationOptions) ToQuery

type ClearPresenceUserPreferredPresenceOperationResponse

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

type DeletePresenceOperationOptions

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

func DefaultDeletePresenceOperationOptions

func DefaultDeletePresenceOperationOptions() DeletePresenceOperationOptions

func (DeletePresenceOperationOptions) ToHeaders

func (DeletePresenceOperationOptions) ToOData

func (DeletePresenceOperationOptions) ToQuery

type DeletePresenceOperationResponse

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

type GetPresenceOperationOptions

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

func DefaultGetPresenceOperationOptions

func DefaultGetPresenceOperationOptions() GetPresenceOperationOptions

func (GetPresenceOperationOptions) ToHeaders

func (GetPresenceOperationOptions) ToOData

func (GetPresenceOperationOptions) ToQuery

type GetPresenceOperationResponse

type GetPresenceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *beta.Presence
}

type PresenceClient

type PresenceClient struct {
	Client *msgraph.Client
}

func NewPresenceClientWithBaseURI

func NewPresenceClientWithBaseURI(sdkApi sdkEnv.Api) (*PresenceClient, error)

func (PresenceClient) ClearPresencePresence

ClearPresencePresence - Invoke action clearPresence. Clear a presence session of an application for a user. If it is the user's only presence session, a successful clearPresence changes the user's presence to Offline/Offline. Read more about presence sessions and their time-out and expiration.

func (PresenceClient) ClearPresenceUserPreferredPresence

ClearPresenceUserPreferredPresence - Invoke action clearUserPreferredPresence. Clear the preferred availability and activity status for a user.

func (PresenceClient) DeletePresence

DeletePresence - Delete navigation property presence for users

func (PresenceClient) GetPresence

GetPresence - Get presence. Get a user's presence information.

func (PresenceClient) SetPresencePresence

SetPresencePresence - Invoke action setPresence. Set the availability and activity status in a presence session of an application for a user.

func (PresenceClient) SetPresenceStatusMessage

SetPresenceStatusMessage - Invoke action setStatusMessage. Set a presence status message for a user. An optional expiration date and time can be supplied.

func (PresenceClient) SetPresenceUserPreferredPresence

SetPresenceUserPreferredPresence - Invoke action setUserPreferredPresence. Set the preferred availability and activity status for a user. If the preferred presence of a user is set, the user's presence is the preferred presence. Preferred presence takes effect only when there is at least one presence session of the user. Otherwise, the user's presence stays as Offline. A presence session can be created as a result of a successful setPresence operation, or if the user is signed in on a Teams client. Read more about presence sessions and their time-out and expiration.

func (PresenceClient) UpdatePresence

UpdatePresence - Update the navigation property presence in users

type SetPresencePresenceOperationOptions

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

func DefaultSetPresencePresenceOperationOptions

func DefaultSetPresencePresenceOperationOptions() SetPresencePresenceOperationOptions

func (SetPresencePresenceOperationOptions) ToHeaders

func (SetPresencePresenceOperationOptions) ToOData

func (SetPresencePresenceOperationOptions) ToQuery

type SetPresencePresenceOperationResponse

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

type SetPresencePresenceRequest

type SetPresencePresenceRequest struct {
	Activity           *string               `json:"activity,omitempty"`
	Availability       *string               `json:"availability,omitempty"`
	ExpirationDuration nullable.Type[string] `json:"expirationDuration,omitempty"`
	SessionId          nullable.Type[string] `json:"sessionId,omitempty"`
}

type SetPresenceStatusMessageOperationOptions

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

func DefaultSetPresenceStatusMessageOperationOptions

func DefaultSetPresenceStatusMessageOperationOptions() SetPresenceStatusMessageOperationOptions

func (SetPresenceStatusMessageOperationOptions) ToHeaders

func (SetPresenceStatusMessageOperationOptions) ToOData

func (SetPresenceStatusMessageOperationOptions) ToQuery

type SetPresenceStatusMessageOperationResponse

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

type SetPresenceStatusMessageRequest

type SetPresenceStatusMessageRequest struct {
	StatusMessage *beta.PresenceStatusMessage `json:"statusMessage,omitempty"`
}

type SetPresenceUserPreferredPresenceOperationOptions

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

func DefaultSetPresenceUserPreferredPresenceOperationOptions

func DefaultSetPresenceUserPreferredPresenceOperationOptions() SetPresenceUserPreferredPresenceOperationOptions

func (SetPresenceUserPreferredPresenceOperationOptions) ToHeaders

func (SetPresenceUserPreferredPresenceOperationOptions) ToOData

func (SetPresenceUserPreferredPresenceOperationOptions) ToQuery

type SetPresenceUserPreferredPresenceOperationResponse

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

type SetPresenceUserPreferredPresenceRequest

type SetPresenceUserPreferredPresenceRequest struct {
	Activity           *string               `json:"activity,omitempty"`
	Availability       *string               `json:"availability,omitempty"`
	ExpirationDuration nullable.Type[string] `json:"expirationDuration,omitempty"`
}

type UpdatePresenceOperationOptions

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

func DefaultUpdatePresenceOperationOptions

func DefaultUpdatePresenceOperationOptions() UpdatePresenceOperationOptions

func (UpdatePresenceOperationOptions) ToHeaders

func (UpdatePresenceOperationOptions) ToOData

func (UpdatePresenceOperationOptions) ToQuery

type UpdatePresenceOperationResponse

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