/
githubmirror
/
origin
Обзор
Документация
Войти
/
githubmirror
/
origin
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
vendor/github.com/microsoftgraph/msgraph-sdk-go/models/item_reference.go
412 строк
15 KB
Justin Pierce
Add compat_otp package with openshift-tests-private (OTP) util implementations
11 авг 2025, 18:00
11 авг 2025, 18:00
80ac5c1
Код
Авторство
О чём код?
// Code generated by Microsoft Kiota - DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. package models import ( i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store" ) type ItemReference struct { // Stores model information. backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore } // NewItemReference instantiates a new ItemReference and sets the default values. func NewItemReference()(*ItemReference) { m := &ItemReference{ } m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance(); m.SetAdditionalData(make(map[string]any)) return m } // CreateItemReferenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful func CreateItemReferenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewItemReference(), nil } // GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. // returns a map[string]any when successful func (m *ItemReference) GetAdditionalData()(map[string]any) { val , err := m.backingStore.Get("additionalData") if err != nil { panic(err) } if val == nil { var value = make(map[string]any); m.SetAdditionalData(value); } return val.(map[string]any) } // GetBackingStore gets the BackingStore property value. Stores model information. // returns a BackingStore when successful func (m *ItemReference) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) { return m.backingStore } // GetDriveId gets the driveId property value. Unique identifier of the drive instance that contains the driveItem. Only returned if the item is located in a drive. Read-only. // returns a *string when successful func (m *ItemReference) GetDriveId()(*string) { val, err := m.GetBackingStore().Get("driveId") if err != nil { panic(err) } if val != nil { return val.(*string) } return nil } // GetDriveType gets the driveType property value. Identifies the type of drive. Only returned if the item is located in a drive. See drive resource for values. // returns a *string when successful func (m *ItemReference) GetDriveType()(*string) { val, err := m.GetBackingStore().Get("driveType") if err != nil { panic(err) } if val != nil { return val.(*string) } return nil } // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *ItemReference) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) res["driveId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { return err } if val != nil { m.SetDriveId(val) } return nil } res["driveType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { return err } if val != nil { m.SetDriveType(val) } return nil } res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { return err } if val != nil { m.SetId(val) } return nil } res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { return err } if val != nil { m.SetName(val) } return nil } res["@odata.type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { return err } if val != nil { m.SetOdataType(val) } return nil } res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { return err } if val != nil { m.SetPath(val) } return nil } res["shareId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { return err } if val != nil { m.SetShareId(val) } return nil } res["sharepointIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetObjectValue(CreateSharepointIdsFromDiscriminatorValue) if err != nil { return err } if val != nil { m.SetSharepointIds(val.(SharepointIdsable)) } return nil } res["siteId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { return err } if val != nil { m.SetSiteId(val) } return nil } return res } // GetId gets the id property value. Unique identifier of the driveItem in the drive or a listItem in a list. Read-only. // returns a *string when successful func (m *ItemReference) GetId()(*string) { val, err := m.GetBackingStore().Get("id") if err != nil { panic(err) } if val != nil { return val.(*string) } return nil } // GetName gets the name property value. The name of the item being referenced. Read-only. // returns a *string when successful func (m *ItemReference) GetName()(*string) { val, err := m.GetBackingStore().Get("name") if err != nil { panic(err) } if val != nil { return val.(*string) } return nil } // GetOdataType gets the @odata.type property value. The OdataType property // returns a *string when successful func (m *ItemReference) GetOdataType()(*string) { val, err := m.GetBackingStore().Get("odataType") if err != nil { panic(err) } if val != nil { return val.(*string) } return nil } // GetPath gets the path property value. Percent-encoded path that can be used to navigate to the item. Read-only. // returns a *string when successful func (m *ItemReference) GetPath()(*string) { val, err := m.GetBackingStore().Get("path") if err != nil { panic(err) } if val != nil { return val.(*string) } return nil } // GetShareId gets the shareId property value. A unique identifier for a shared resource that can be accessed via the Shares API. // returns a *string when successful func (m *ItemReference) GetShareId()(*string) { val, err := m.GetBackingStore().Get("shareId") if err != nil { panic(err) } if val != nil { return val.(*string) } return nil } // GetSharepointIds gets the sharepointIds property value. Returns identifiers useful for SharePoint REST compatibility. Read-only. // returns a SharepointIdsable when successful func (m *ItemReference) GetSharepointIds()(SharepointIdsable) { val, err := m.GetBackingStore().Get("sharepointIds") if err != nil { panic(err) } if val != nil { return val.(SharepointIdsable) } return nil } // GetSiteId gets the siteId property value. For OneDrive for Business and SharePoint, this property represents the ID of the site that contains the parent document library of the driveItem resource or the parent list of the listItem resource. The value is the same as the id property of that site resource. It is an opaque string that consists of three identifiers of the site. For OneDrive, this property is not populated. // returns a *string when successful func (m *ItemReference) GetSiteId()(*string) { val, err := m.GetBackingStore().Get("siteId") if err != nil { panic(err) } if val != nil { return val.(*string) } return nil } // Serialize serializes information the current object func (m *ItemReference) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { { err := writer.WriteStringValue("driveId", m.GetDriveId()) if err != nil { return err } } { err := writer.WriteStringValue("driveType", m.GetDriveType()) if err != nil { return err } } { err := writer.WriteStringValue("id", m.GetId()) if err != nil { return err } } { err := writer.WriteStringValue("name", m.GetName()) if err != nil { return err } } { err := writer.WriteStringValue("@odata.type", m.GetOdataType()) if err != nil { return err } } { err := writer.WriteStringValue("path", m.GetPath()) if err != nil { return err } } { err := writer.WriteStringValue("shareId", m.GetShareId()) if err != nil { return err } } { err := writer.WriteObjectValue("sharepointIds", m.GetSharepointIds()) if err != nil { return err } } { err := writer.WriteStringValue("siteId", m.GetSiteId()) if err != nil { return err } } { err := writer.WriteAdditionalData(m.GetAdditionalData()) if err != nil { return err } } return nil } // SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. func (m *ItemReference) SetAdditionalData(value map[string]any)() { err := m.GetBackingStore().Set("additionalData", value) if err != nil { panic(err) } } // SetBackingStore sets the BackingStore property value. Stores model information. func (m *ItemReference) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() { m.backingStore = value } // SetDriveId sets the driveId property value. Unique identifier of the drive instance that contains the driveItem. Only returned if the item is located in a drive. Read-only. func (m *ItemReference) SetDriveId(value *string)() { err := m.GetBackingStore().Set("driveId", value) if err != nil { panic(err) } } // SetDriveType sets the driveType property value. Identifies the type of drive. Only returned if the item is located in a drive. See drive resource for values. func (m *ItemReference) SetDriveType(value *string)() { err := m.GetBackingStore().Set("driveType", value) if err != nil { panic(err) } } // SetId sets the id property value. Unique identifier of the driveItem in the drive or a listItem in a list. Read-only. func (m *ItemReference) SetId(value *string)() { err := m.GetBackingStore().Set("id", value) if err != nil { panic(err) } } // SetName sets the name property value. The name of the item being referenced. Read-only. func (m *ItemReference) SetName(value *string)() { err := m.GetBackingStore().Set("name", value) if err != nil { panic(err) } } // SetOdataType sets the @odata.type property value. The OdataType property func (m *ItemReference) SetOdataType(value *string)() { err := m.GetBackingStore().Set("odataType", value) if err != nil { panic(err) } } // SetPath sets the path property value. Percent-encoded path that can be used to navigate to the item. Read-only. func (m *ItemReference) SetPath(value *string)() { err := m.GetBackingStore().Set("path", value) if err != nil { panic(err) } } // SetShareId sets the shareId property value. A unique identifier for a shared resource that can be accessed via the Shares API. func (m *ItemReference) SetShareId(value *string)() { err := m.GetBackingStore().Set("shareId", value) if err != nil { panic(err) } } // SetSharepointIds sets the sharepointIds property value. Returns identifiers useful for SharePoint REST compatibility. Read-only. func (m *ItemReference) SetSharepointIds(value SharepointIdsable)() { err := m.GetBackingStore().Set("sharepointIds", value) if err != nil { panic(err) } } // SetSiteId sets the siteId property value. For OneDrive for Business and SharePoint, this property represents the ID of the site that contains the parent document library of the driveItem resource or the parent list of the listItem resource. The value is the same as the id property of that site resource. It is an opaque string that consists of three identifiers of the site. For OneDrive, this property is not populated. func (m *ItemReference) SetSiteId(value *string)() { err := m.GetBackingStore().Set("siteId", value) if err != nil { panic(err) } } type ItemReferenceable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) GetDriveId()(*string) GetDriveType()(*string) GetId()(*string) GetName()(*string) GetOdataType()(*string) GetPath()(*string) GetShareId()(*string) GetSharepointIds()(SharepointIdsable) GetSiteId()(*string) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() SetDriveId(value *string)() SetDriveType(value *string)() SetId(value *string)() SetName(value *string)() SetOdataType(value *string)() SetPath(value *string)() SetShareId(value *string)() SetSharepointIds(value SharepointIdsable)() SetSiteId(value *string)() }