Danny b5a5378113
GC: Restore: Retrieve CalendarID Feature (#687)
Feature added to be able to retrieve containerID for `exchange.Event` types.
2022-08-31 17:28:57 +00:00

29 lines
768 B
Go

package exchange
import (
"github.com/microsoftgraph/msgraph-sdk-go/models"
)
// calendarDisplayable is a transformative struct that aligns
// models.Calendarable interface with the displayable interface.
type calendarDisplayable struct {
models.Calendarable
}
// GetDisplayName returns the *string of the calendar name
func (c calendarDisplayable) GetDisplayName() *string {
return c.GetName()
}
// CreateCalendarDisplayable helper function to create the
// calendarDisplayable during msgraph-sdk-go iterative process
// @param entry is the input supplied by pageIterator.Iterate()
func CreateCalendarDisplayable(entry any) *calendarDisplayable {
calendar, ok := entry.(models.Calendarable)
if !ok {
return nil
}
return &calendarDisplayable{calendar}
}