/
githubmirror
/
origin
Обзор
Документация
Войти
/
githubmirror
/
origin
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
vendor/github.com/microsoftgraph/msgraph-sdk-go/models/vpp_token.go
454 строки
17 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 ( i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) // VppToken you purchase multiple licenses for iOS apps through the Apple Volume Purchase Program for Business or Education. This involves setting up an Apple VPP account from the Apple website and uploading the Apple VPP Business or Education token to Intune. You can then synchronize your volume purchase information with Intune and track your volume-purchased app use. You can upload multiple Apple VPP Business or Education tokens. type VppToken struct { Entity } // NewVppToken instantiates a new VppToken and sets the default values. func NewVppToken()(*VppToken) { m := &VppToken{ Entity: *NewEntity(), } return m } // CreateVppTokenFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful func CreateVppTokenFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewVppToken(), nil } // GetAppleId gets the appleId property value. The Apple ID associated with the given Apple Volume Purchase Program Token. // returns a *string when successful func (m *VppToken) GetAppleId()(*string) { val, err := m.GetBackingStore().Get("appleId") if err != nil { panic(err) } if val != nil { return val.(*string) } return nil } // GetAutomaticallyUpdateApps gets the automaticallyUpdateApps property value. Whether or not apps for the VPP token will be automatically updated. // returns a *bool when successful func (m *VppToken) GetAutomaticallyUpdateApps()(*bool) { val, err := m.GetBackingStore().Get("automaticallyUpdateApps") if err != nil { panic(err) } if val != nil { return val.(*bool) } return nil } // GetCountryOrRegion gets the countryOrRegion property value. The country or region associated with the Apple Volume Purchase Program Token. // returns a *string when successful func (m *VppToken) GetCountryOrRegion()(*string) { val, err := m.GetBackingStore().Get("countryOrRegion") if err != nil { panic(err) } if val != nil { return val.(*string) } return nil } // GetExpirationDateTime gets the expirationDateTime property value. The expiration date time of the Apple Volume Purchase Program Token. // returns a *Time when successful func (m *VppToken) GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { val, err := m.GetBackingStore().Get("expirationDateTime") if err != nil { panic(err) } if val != nil { return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) } return nil } // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *VppToken) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := m.Entity.GetFieldDeserializers() res["appleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { return err } if val != nil { m.SetAppleId(val) } return nil } res["automaticallyUpdateApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetBoolValue() if err != nil { return err } if val != nil { m.SetAutomaticallyUpdateApps(val) } return nil } res["countryOrRegion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { return err } if val != nil { m.SetCountryOrRegion(val) } return nil } res["expirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetTimeValue() if err != nil { return err } if val != nil { m.SetExpirationDateTime(val) } return nil } res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetTimeValue() if err != nil { return err } if val != nil { m.SetLastModifiedDateTime(val) } return nil } res["lastSyncDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetTimeValue() if err != nil { return err } if val != nil { m.SetLastSyncDateTime(val) } return nil } res["lastSyncStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetEnumValue(ParseVppTokenSyncStatus) if err != nil { return err } if val != nil { m.SetLastSyncStatus(val.(*VppTokenSyncStatus)) } return nil } res["organizationName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { return err } if val != nil { m.SetOrganizationName(val) } return nil } res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetEnumValue(ParseVppTokenState) if err != nil { return err } if val != nil { m.SetState(val.(*VppTokenState)) } return nil } res["token"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { return err } if val != nil { m.SetToken(val) } return nil } res["vppTokenAccountType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetEnumValue(ParseVppTokenAccountType) if err != nil { return err } if val != nil { m.SetVppTokenAccountType(val.(*VppTokenAccountType)) } return nil } return res } // GetLastModifiedDateTime gets the lastModifiedDateTime property value. Last modification date time associated with the Apple Volume Purchase Program Token. // returns a *Time when successful func (m *VppToken) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { val, err := m.GetBackingStore().Get("lastModifiedDateTime") if err != nil { panic(err) } if val != nil { return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) } return nil } // GetLastSyncDateTime gets the lastSyncDateTime property value. The last time when an application sync was done with the Apple volume purchase program service using the the Apple Volume Purchase Program Token. // returns a *Time when successful func (m *VppToken) GetLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { val, err := m.GetBackingStore().Get("lastSyncDateTime") if err != nil { panic(err) } if val != nil { return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) } return nil } // GetLastSyncStatus gets the lastSyncStatus property value. Possible sync statuses associated with an Apple Volume Purchase Program token. // returns a *VppTokenSyncStatus when successful func (m *VppToken) GetLastSyncStatus()(*VppTokenSyncStatus) { val, err := m.GetBackingStore().Get("lastSyncStatus") if err != nil { panic(err) } if val != nil { return val.(*VppTokenSyncStatus) } return nil } // GetOrganizationName gets the organizationName property value. The organization associated with the Apple Volume Purchase Program Token // returns a *string when successful func (m *VppToken) GetOrganizationName()(*string) { val, err := m.GetBackingStore().Get("organizationName") if err != nil { panic(err) } if val != nil { return val.(*string) } return nil } // GetState gets the state property value. Possible states associated with an Apple Volume Purchase Program token. // returns a *VppTokenState when successful func (m *VppToken) GetState()(*VppTokenState) { val, err := m.GetBackingStore().Get("state") if err != nil { panic(err) } if val != nil { return val.(*VppTokenState) } return nil } // GetToken gets the token property value. The Apple Volume Purchase Program Token string downloaded from the Apple Volume Purchase Program. // returns a *string when successful func (m *VppToken) GetToken()(*string) { val, err := m.GetBackingStore().Get("token") if err != nil { panic(err) } if val != nil { return val.(*string) } return nil } // GetVppTokenAccountType gets the vppTokenAccountType property value. Possible types of an Apple Volume Purchase Program token. // returns a *VppTokenAccountType when successful func (m *VppToken) GetVppTokenAccountType()(*VppTokenAccountType) { val, err := m.GetBackingStore().Get("vppTokenAccountType") if err != nil { panic(err) } if val != nil { return val.(*VppTokenAccountType) } return nil } // Serialize serializes information the current object func (m *VppToken) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { err := m.Entity.Serialize(writer) if err != nil { return err } { err = writer.WriteStringValue("appleId", m.GetAppleId()) if err != nil { return err } } { err = writer.WriteBoolValue("automaticallyUpdateApps", m.GetAutomaticallyUpdateApps()) if err != nil { return err } } { err = writer.WriteStringValue("countryOrRegion", m.GetCountryOrRegion()) if err != nil { return err } } { err = writer.WriteTimeValue("expirationDateTime", m.GetExpirationDateTime()) if err != nil { return err } } { err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) if err != nil { return err } } { err = writer.WriteTimeValue("lastSyncDateTime", m.GetLastSyncDateTime()) if err != nil { return err } } if m.GetLastSyncStatus() != nil { cast := (*m.GetLastSyncStatus()).String() err = writer.WriteStringValue("lastSyncStatus", &cast) if err != nil { return err } } { err = writer.WriteStringValue("organizationName", m.GetOrganizationName()) if err != nil { return err } } if m.GetState() != nil { cast := (*m.GetState()).String() err = writer.WriteStringValue("state", &cast) if err != nil { return err } } { err = writer.WriteStringValue("token", m.GetToken()) if err != nil { return err } } if m.GetVppTokenAccountType() != nil { cast := (*m.GetVppTokenAccountType()).String() err = writer.WriteStringValue("vppTokenAccountType", &cast) if err != nil { return err } } return nil } // SetAppleId sets the appleId property value. The Apple ID associated with the given Apple Volume Purchase Program Token. func (m *VppToken) SetAppleId(value *string)() { err := m.GetBackingStore().Set("appleId", value) if err != nil { panic(err) } } // SetAutomaticallyUpdateApps sets the automaticallyUpdateApps property value. Whether or not apps for the VPP token will be automatically updated. func (m *VppToken) SetAutomaticallyUpdateApps(value *bool)() { err := m.GetBackingStore().Set("automaticallyUpdateApps", value) if err != nil { panic(err) } } // SetCountryOrRegion sets the countryOrRegion property value. The country or region associated with the Apple Volume Purchase Program Token. func (m *VppToken) SetCountryOrRegion(value *string)() { err := m.GetBackingStore().Set("countryOrRegion", value) if err != nil { panic(err) } } // SetExpirationDateTime sets the expirationDateTime property value. The expiration date time of the Apple Volume Purchase Program Token. func (m *VppToken) SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { err := m.GetBackingStore().Set("expirationDateTime", value) if err != nil { panic(err) } } // SetLastModifiedDateTime sets the lastModifiedDateTime property value. Last modification date time associated with the Apple Volume Purchase Program Token. func (m *VppToken) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { err := m.GetBackingStore().Set("lastModifiedDateTime", value) if err != nil { panic(err) } } // SetLastSyncDateTime sets the lastSyncDateTime property value. The last time when an application sync was done with the Apple volume purchase program service using the the Apple Volume Purchase Program Token. func (m *VppToken) SetLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { err := m.GetBackingStore().Set("lastSyncDateTime", value) if err != nil { panic(err) } } // SetLastSyncStatus sets the lastSyncStatus property value. Possible sync statuses associated with an Apple Volume Purchase Program token. func (m *VppToken) SetLastSyncStatus(value *VppTokenSyncStatus)() { err := m.GetBackingStore().Set("lastSyncStatus", value) if err != nil { panic(err) } } // SetOrganizationName sets the organizationName property value. The organization associated with the Apple Volume Purchase Program Token func (m *VppToken) SetOrganizationName(value *string)() { err := m.GetBackingStore().Set("organizationName", value) if err != nil { panic(err) } } // SetState sets the state property value. Possible states associated with an Apple Volume Purchase Program token. func (m *VppToken) SetState(value *VppTokenState)() { err := m.GetBackingStore().Set("state", value) if err != nil { panic(err) } } // SetToken sets the token property value. The Apple Volume Purchase Program Token string downloaded from the Apple Volume Purchase Program. func (m *VppToken) SetToken(value *string)() { err := m.GetBackingStore().Set("token", value) if err != nil { panic(err) } } // SetVppTokenAccountType sets the vppTokenAccountType property value. Possible types of an Apple Volume Purchase Program token. func (m *VppToken) SetVppTokenAccountType(value *VppTokenAccountType)() { err := m.GetBackingStore().Set("vppTokenAccountType", value) if err != nil { panic(err) } } type VppTokenable interface { Entityable i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetAppleId()(*string) GetAutomaticallyUpdateApps()(*bool) GetCountryOrRegion()(*string) GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) GetLastSyncStatus()(*VppTokenSyncStatus) GetOrganizationName()(*string) GetState()(*VppTokenState) GetToken()(*string) GetVppTokenAccountType()(*VppTokenAccountType) SetAppleId(value *string)() SetAutomaticallyUpdateApps(value *bool)() SetCountryOrRegion(value *string)() SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() SetLastSyncStatus(value *VppTokenSyncStatus)() SetOrganizationName(value *string)() SetState(value *VppTokenState)() SetToken(value *string)() SetVppTokenAccountType(value *VppTokenAccountType)() }