presence

package
v0.20241009.1142232 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/microsoft-graph/me/stable/presence Documentation

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

Client Initialization

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

Example Usage: PresenceClient.ClearPresencePresence

ctx := context.TODO()

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


read, err := client.ClearPresencePresence(ctx, 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()


read, err := client.ClearPresenceUserPreferredPresence(ctx, 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()


read, err := client.DeletePresence(ctx, 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()


read, err := client.GetPresence(ctx, 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()

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


read, err := client.SetPresencePresence(ctx, 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()

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


read, err := client.SetPresenceStatusMessage(ctx, 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()

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


read, err := client.SetPresenceUserPreferredPresence(ctx, 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()

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


read, err := client.UpdatePresence(ctx, 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        *stable.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 the application's presence session for a user. If it is the user's only presence session, the user's presence will change to Offline/Offline. For details about presences sessions, see presence: setPresence.

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 me

func (PresenceClient) GetPresence

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

func (PresenceClient) SetPresencePresence

SetPresencePresence - Invoke action setPresence. Set the state of a user's presence session as an application.

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 shows as the preferred status. Preferred presence takes effect only when at least one presence session exists for the user. Otherwise, the user's presence shows as Offline. A presence session is created as a result of a successful setPresence operation, or if the user is signed in on a Microsoft Teams client. For more details, see presence sessions and time-out and expiration.

func (PresenceClient) UpdatePresence

UpdatePresence - Update the navigation property presence in me

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 *stable.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