1
0
mirror of https://github.com/openshift/installer.git synced 2026-02-05 15:47:14 +01:00
Files
2024-04-04 21:23:02 +02:00

963 lines
39 KiB
Go

package models
import (
i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time"
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// Device
type Device struct {
DirectoryObject
}
// NewDevice instantiates a new device and sets the default values.
func NewDevice()(*Device) {
m := &Device{
DirectoryObject: *NewDirectoryObject(),
}
odataTypeValue := "#microsoft.graph.device"
m.SetOdataType(&odataTypeValue)
return m
}
// CreateDeviceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateDeviceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewDevice(), nil
}
// GetAccountEnabled gets the accountEnabled property value. true if the account is enabled; otherwise, false. Required. Default is true. Supports $filter (eq, ne, not, in). Only callers in Global Administrator and Cloud Device Administrator roles can set this property.
func (m *Device) GetAccountEnabled()(*bool) {
val, err := m.GetBackingStore().Get("accountEnabled")
if err != nil {
panic(err)
}
if val != nil {
return val.(*bool)
}
return nil
}
// GetAlternativeSecurityIds gets the alternativeSecurityIds property value. For internal use only. Not nullable. Supports $filter (eq, not, ge, le).
func (m *Device) GetAlternativeSecurityIds()([]AlternativeSecurityIdable) {
val, err := m.GetBackingStore().Get("alternativeSecurityIds")
if err != nil {
panic(err)
}
if val != nil {
return val.([]AlternativeSecurityIdable)
}
return nil
}
// GetApproximateLastSignInDateTime gets the approximateLastSignInDateTime property value. The timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. Supports $filter (eq, ne, not, ge, le, and eq on null values) and $orderBy.
func (m *Device) GetApproximateLastSignInDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) {
val, err := m.GetBackingStore().Get("approximateLastSignInDateTime")
if err != nil {
panic(err)
}
if val != nil {
return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
}
return nil
}
// GetComplianceExpirationDateTime gets the complianceExpirationDateTime property value. The timestamp when the device is no longer deemed compliant. The timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only.
func (m *Device) GetComplianceExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) {
val, err := m.GetBackingStore().Get("complianceExpirationDateTime")
if err != nil {
panic(err)
}
if val != nil {
return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
}
return nil
}
// GetDeviceId gets the deviceId property value. Unique identifier set by Azure Device Registration Service at the time of registration. This is an alternate key that can be used to reference the device object. Supports $filter (eq, ne, not, startsWith).
func (m *Device) GetDeviceId()(*string) {
val, err := m.GetBackingStore().Get("deviceId")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetDeviceMetadata gets the deviceMetadata property value. For internal use only. Set to null.
func (m *Device) GetDeviceMetadata()(*string) {
val, err := m.GetBackingStore().Get("deviceMetadata")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetDeviceVersion gets the deviceVersion property value. For internal use only.
func (m *Device) GetDeviceVersion()(*int32) {
val, err := m.GetBackingStore().Get("deviceVersion")
if err != nil {
panic(err)
}
if val != nil {
return val.(*int32)
}
return nil
}
// GetDisplayName gets the displayName property value. The display name for the device. Required. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values), $search, and $orderBy.
func (m *Device) GetDisplayName()(*string) {
val, err := m.GetBackingStore().Get("displayName")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetExtensions gets the extensions property value. The collection of open extensions defined for the device. Read-only. Nullable.
func (m *Device) GetExtensions()([]Extensionable) {
val, err := m.GetBackingStore().Get("extensions")
if err != nil {
panic(err)
}
if val != nil {
return val.([]Extensionable)
}
return nil
}
// GetFieldDeserializers the deserialization information for the current model
func (m *Device) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := m.DirectoryObject.GetFieldDeserializers()
res["accountEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetBoolValue()
if err != nil {
return err
}
if val != nil {
m.SetAccountEnabled(val)
}
return nil
}
res["alternativeSecurityIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateAlternativeSecurityIdFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]AlternativeSecurityIdable, len(val))
for i, v := range val {
res[i] = v.(AlternativeSecurityIdable)
}
m.SetAlternativeSecurityIds(res)
}
return nil
}
res["approximateLastSignInDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetTimeValue()
if err != nil {
return err
}
if val != nil {
m.SetApproximateLastSignInDateTime(val)
}
return nil
}
res["complianceExpirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetTimeValue()
if err != nil {
return err
}
if val != nil {
m.SetComplianceExpirationDateTime(val)
}
return nil
}
res["deviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetDeviceId(val)
}
return nil
}
res["deviceMetadata"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetDeviceMetadata(val)
}
return nil
}
res["deviceVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetInt32Value()
if err != nil {
return err
}
if val != nil {
m.SetDeviceVersion(val)
}
return nil
}
res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetDisplayName(val)
}
return nil
}
res["extensions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateExtensionFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]Extensionable, len(val))
for i, v := range val {
res[i] = v.(Extensionable)
}
m.SetExtensions(res)
}
return nil
}
res["isCompliant"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetBoolValue()
if err != nil {
return err
}
if val != nil {
m.SetIsCompliant(val)
}
return nil
}
res["isManaged"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetBoolValue()
if err != nil {
return err
}
if val != nil {
m.SetIsManaged(val)
}
return nil
}
res["mdmAppId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetMdmAppId(val)
}
return nil
}
res["memberOf"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]DirectoryObjectable, len(val))
for i, v := range val {
res[i] = v.(DirectoryObjectable)
}
m.SetMemberOf(res)
}
return nil
}
res["onPremisesLastSyncDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetTimeValue()
if err != nil {
return err
}
if val != nil {
m.SetOnPremisesLastSyncDateTime(val)
}
return nil
}
res["onPremisesSyncEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetBoolValue()
if err != nil {
return err
}
if val != nil {
m.SetOnPremisesSyncEnabled(val)
}
return nil
}
res["operatingSystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetOperatingSystem(val)
}
return nil
}
res["operatingSystemVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetOperatingSystemVersion(val)
}
return nil
}
res["physicalIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfPrimitiveValues("string")
if err != nil {
return err
}
if val != nil {
res := make([]string, len(val))
for i, v := range val {
res[i] = *(v.(*string))
}
m.SetPhysicalIds(res)
}
return nil
}
res["profileType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetProfileType(val)
}
return nil
}
res["registeredOwners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]DirectoryObjectable, len(val))
for i, v := range val {
res[i] = v.(DirectoryObjectable)
}
m.SetRegisteredOwners(res)
}
return nil
}
res["registeredUsers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]DirectoryObjectable, len(val))
for i, v := range val {
res[i] = v.(DirectoryObjectable)
}
m.SetRegisteredUsers(res)
}
return nil
}
res["systemLabels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfPrimitiveValues("string")
if err != nil {
return err
}
if val != nil {
res := make([]string, len(val))
for i, v := range val {
res[i] = *(v.(*string))
}
m.SetSystemLabels(res)
}
return nil
}
res["transitiveMemberOf"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
res := make([]DirectoryObjectable, len(val))
for i, v := range val {
res[i] = v.(DirectoryObjectable)
}
m.SetTransitiveMemberOf(res)
}
return nil
}
res["trustType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetTrustType(val)
}
return nil
}
return res
}
// GetIsCompliant gets the isCompliant property value. true if the device complies with Mobile Device Management (MDM) policies; otherwise, false. Read-only. This can only be updated by Intune for any device OS type or by an approved MDM app for Windows OS devices. Supports $filter (eq, ne, not).
func (m *Device) GetIsCompliant()(*bool) {
val, err := m.GetBackingStore().Get("isCompliant")
if err != nil {
panic(err)
}
if val != nil {
return val.(*bool)
}
return nil
}
// GetIsManaged gets the isManaged property value. true if the device is managed by a Mobile Device Management (MDM) app; otherwise, false. This can only be updated by Intune for any device OS type or by an approved MDM app for Windows OS devices. Supports $filter (eq, ne, not).
func (m *Device) GetIsManaged()(*bool) {
val, err := m.GetBackingStore().Get("isManaged")
if err != nil {
panic(err)
}
if val != nil {
return val.(*bool)
}
return nil
}
// GetMdmAppId gets the mdmAppId property value. Application identifier used to register device into MDM. Read-only. Supports $filter (eq, ne, not, startsWith).
func (m *Device) GetMdmAppId()(*string) {
val, err := m.GetBackingStore().Get("mdmAppId")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetMemberOf gets the memberOf property value. Groups and administrative units that this device is a member of. Read-only. Nullable. Supports $expand.
func (m *Device) GetMemberOf()([]DirectoryObjectable) {
val, err := m.GetBackingStore().Get("memberOf")
if err != nil {
panic(err)
}
if val != nil {
return val.([]DirectoryObjectable)
}
return nil
}
// GetOnPremisesLastSyncDateTime gets the onPremisesLastSyncDateTime property value. The last time at which the object was synced with the on-premises directory. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z Read-only. Supports $filter (eq, ne, not, ge, le, in).
func (m *Device) GetOnPremisesLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) {
val, err := m.GetBackingStore().Get("onPremisesLastSyncDateTime")
if err != nil {
panic(err)
}
if val != nil {
return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
}
return nil
}
// GetOnPremisesSyncEnabled gets the onPremisesSyncEnabled property value. true if this object is synced from an on-premises directory; false if this object was originally synced from an on-premises directory but is no longer synced; null if this object has never been synced from an on-premises directory (default). Read-only. Supports $filter (eq, ne, not, in, and eq on null values).
func (m *Device) GetOnPremisesSyncEnabled()(*bool) {
val, err := m.GetBackingStore().Get("onPremisesSyncEnabled")
if err != nil {
panic(err)
}
if val != nil {
return val.(*bool)
}
return nil
}
// GetOperatingSystem gets the operatingSystem property value. The type of operating system on the device. Required. Supports $filter (eq, ne, not, ge, le, startsWith, and eq on null values).
func (m *Device) GetOperatingSystem()(*string) {
val, err := m.GetBackingStore().Get("operatingSystem")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetOperatingSystemVersion gets the operatingSystemVersion property value. The version of the operating system on the device. Required. Supports $filter (eq, ne, not, ge, le, startsWith, and eq on null values).
func (m *Device) GetOperatingSystemVersion()(*string) {
val, err := m.GetBackingStore().Get("operatingSystemVersion")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetPhysicalIds gets the physicalIds property value. For internal use only. Not nullable. Supports $filter (eq, not, ge, le, startsWith,/$count eq 0, /$count ne 0).
func (m *Device) GetPhysicalIds()([]string) {
val, err := m.GetBackingStore().Get("physicalIds")
if err != nil {
panic(err)
}
if val != nil {
return val.([]string)
}
return nil
}
// GetProfileType gets the profileType property value. The profile type of the device. Possible values: RegisteredDevice (default), SecureVM, Printer, Shared, IoT.
func (m *Device) GetProfileType()(*string) {
val, err := m.GetBackingStore().Get("profileType")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetRegisteredOwners gets the registeredOwners property value. The user that cloud joined the device or registered their personal device. The registered owner is set at the time of registration. Currently, there can be only one owner. Read-only. Nullable. Supports $expand.
func (m *Device) GetRegisteredOwners()([]DirectoryObjectable) {
val, err := m.GetBackingStore().Get("registeredOwners")
if err != nil {
panic(err)
}
if val != nil {
return val.([]DirectoryObjectable)
}
return nil
}
// GetRegisteredUsers gets the registeredUsers property value. Collection of registered users of the device. For cloud joined devices and registered personal devices, registered users are set to the same value as registered owners at the time of registration. Read-only. Nullable. Supports $expand.
func (m *Device) GetRegisteredUsers()([]DirectoryObjectable) {
val, err := m.GetBackingStore().Get("registeredUsers")
if err != nil {
panic(err)
}
if val != nil {
return val.([]DirectoryObjectable)
}
return nil
}
// GetSystemLabels gets the systemLabels property value. List of labels applied to the device by the system. Supports $filter (/$count eq 0, /$count ne 0).
func (m *Device) GetSystemLabels()([]string) {
val, err := m.GetBackingStore().Get("systemLabels")
if err != nil {
panic(err)
}
if val != nil {
return val.([]string)
}
return nil
}
// GetTransitiveMemberOf gets the transitiveMemberOf property value. Groups and administrative units that the device is a member of. This operation is transitive. Supports $expand.
func (m *Device) GetTransitiveMemberOf()([]DirectoryObjectable) {
val, err := m.GetBackingStore().Get("transitiveMemberOf")
if err != nil {
panic(err)
}
if val != nil {
return val.([]DirectoryObjectable)
}
return nil
}
// GetTrustType gets the trustType property value. Type of trust for the joined device. Read-only. Possible values: Workplace (indicates bring your own personal devices), AzureAd (Cloud only joined devices), ServerAd (on-premises domain joined devices joined to Azure AD). For more details, see Introduction to device management in Azure Active Directory
func (m *Device) GetTrustType()(*string) {
val, err := m.GetBackingStore().Get("trustType")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// Serialize serializes information the current object
func (m *Device) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
err := m.DirectoryObject.Serialize(writer)
if err != nil {
return err
}
{
err = writer.WriteBoolValue("accountEnabled", m.GetAccountEnabled())
if err != nil {
return err
}
}
if m.GetAlternativeSecurityIds() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAlternativeSecurityIds()))
for i, v := range m.GetAlternativeSecurityIds() {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
err = writer.WriteCollectionOfObjectValues("alternativeSecurityIds", cast)
if err != nil {
return err
}
}
{
err = writer.WriteTimeValue("approximateLastSignInDateTime", m.GetApproximateLastSignInDateTime())
if err != nil {
return err
}
}
{
err = writer.WriteTimeValue("complianceExpirationDateTime", m.GetComplianceExpirationDateTime())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("deviceId", m.GetDeviceId())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("deviceMetadata", m.GetDeviceMetadata())
if err != nil {
return err
}
}
{
err = writer.WriteInt32Value("deviceVersion", m.GetDeviceVersion())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("displayName", m.GetDisplayName())
if err != nil {
return err
}
}
if m.GetExtensions() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExtensions()))
for i, v := range m.GetExtensions() {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
err = writer.WriteCollectionOfObjectValues("extensions", cast)
if err != nil {
return err
}
}
{
err = writer.WriteBoolValue("isCompliant", m.GetIsCompliant())
if err != nil {
return err
}
}
{
err = writer.WriteBoolValue("isManaged", m.GetIsManaged())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("mdmAppId", m.GetMdmAppId())
if err != nil {
return err
}
}
if m.GetMemberOf() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMemberOf()))
for i, v := range m.GetMemberOf() {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
err = writer.WriteCollectionOfObjectValues("memberOf", cast)
if err != nil {
return err
}
}
{
err = writer.WriteTimeValue("onPremisesLastSyncDateTime", m.GetOnPremisesLastSyncDateTime())
if err != nil {
return err
}
}
{
err = writer.WriteBoolValue("onPremisesSyncEnabled", m.GetOnPremisesSyncEnabled())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("operatingSystem", m.GetOperatingSystem())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("operatingSystemVersion", m.GetOperatingSystemVersion())
if err != nil {
return err
}
}
if m.GetPhysicalIds() != nil {
err = writer.WriteCollectionOfStringValues("physicalIds", m.GetPhysicalIds())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("profileType", m.GetProfileType())
if err != nil {
return err
}
}
if m.GetRegisteredOwners() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRegisteredOwners()))
for i, v := range m.GetRegisteredOwners() {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
err = writer.WriteCollectionOfObjectValues("registeredOwners", cast)
if err != nil {
return err
}
}
if m.GetRegisteredUsers() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRegisteredUsers()))
for i, v := range m.GetRegisteredUsers() {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
err = writer.WriteCollectionOfObjectValues("registeredUsers", cast)
if err != nil {
return err
}
}
if m.GetSystemLabels() != nil {
err = writer.WriteCollectionOfStringValues("systemLabels", m.GetSystemLabels())
if err != nil {
return err
}
}
if m.GetTransitiveMemberOf() != nil {
cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTransitiveMemberOf()))
for i, v := range m.GetTransitiveMemberOf() {
cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable)
}
err = writer.WriteCollectionOfObjectValues("transitiveMemberOf", cast)
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("trustType", m.GetTrustType())
if err != nil {
return err
}
}
return nil
}
// SetAccountEnabled sets the accountEnabled property value. true if the account is enabled; otherwise, false. Required. Default is true. Supports $filter (eq, ne, not, in). Only callers in Global Administrator and Cloud Device Administrator roles can set this property.
func (m *Device) SetAccountEnabled(value *bool)() {
err := m.GetBackingStore().Set("accountEnabled", value)
if err != nil {
panic(err)
}
}
// SetAlternativeSecurityIds sets the alternativeSecurityIds property value. For internal use only. Not nullable. Supports $filter (eq, not, ge, le).
func (m *Device) SetAlternativeSecurityIds(value []AlternativeSecurityIdable)() {
err := m.GetBackingStore().Set("alternativeSecurityIds", value)
if err != nil {
panic(err)
}
}
// SetApproximateLastSignInDateTime sets the approximateLastSignInDateTime property value. The timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. Supports $filter (eq, ne, not, ge, le, and eq on null values) and $orderBy.
func (m *Device) SetApproximateLastSignInDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() {
err := m.GetBackingStore().Set("approximateLastSignInDateTime", value)
if err != nil {
panic(err)
}
}
// SetComplianceExpirationDateTime sets the complianceExpirationDateTime property value. The timestamp when the device is no longer deemed compliant. The timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only.
func (m *Device) SetComplianceExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() {
err := m.GetBackingStore().Set("complianceExpirationDateTime", value)
if err != nil {
panic(err)
}
}
// SetDeviceId sets the deviceId property value. Unique identifier set by Azure Device Registration Service at the time of registration. This is an alternate key that can be used to reference the device object. Supports $filter (eq, ne, not, startsWith).
func (m *Device) SetDeviceId(value *string)() {
err := m.GetBackingStore().Set("deviceId", value)
if err != nil {
panic(err)
}
}
// SetDeviceMetadata sets the deviceMetadata property value. For internal use only. Set to null.
func (m *Device) SetDeviceMetadata(value *string)() {
err := m.GetBackingStore().Set("deviceMetadata", value)
if err != nil {
panic(err)
}
}
// SetDeviceVersion sets the deviceVersion property value. For internal use only.
func (m *Device) SetDeviceVersion(value *int32)() {
err := m.GetBackingStore().Set("deviceVersion", value)
if err != nil {
panic(err)
}
}
// SetDisplayName sets the displayName property value. The display name for the device. Required. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values), $search, and $orderBy.
func (m *Device) SetDisplayName(value *string)() {
err := m.GetBackingStore().Set("displayName", value)
if err != nil {
panic(err)
}
}
// SetExtensions sets the extensions property value. The collection of open extensions defined for the device. Read-only. Nullable.
func (m *Device) SetExtensions(value []Extensionable)() {
err := m.GetBackingStore().Set("extensions", value)
if err != nil {
panic(err)
}
}
// SetIsCompliant sets the isCompliant property value. true if the device complies with Mobile Device Management (MDM) policies; otherwise, false. Read-only. This can only be updated by Intune for any device OS type or by an approved MDM app for Windows OS devices. Supports $filter (eq, ne, not).
func (m *Device) SetIsCompliant(value *bool)() {
err := m.GetBackingStore().Set("isCompliant", value)
if err != nil {
panic(err)
}
}
// SetIsManaged sets the isManaged property value. true if the device is managed by a Mobile Device Management (MDM) app; otherwise, false. This can only be updated by Intune for any device OS type or by an approved MDM app for Windows OS devices. Supports $filter (eq, ne, not).
func (m *Device) SetIsManaged(value *bool)() {
err := m.GetBackingStore().Set("isManaged", value)
if err != nil {
panic(err)
}
}
// SetMdmAppId sets the mdmAppId property value. Application identifier used to register device into MDM. Read-only. Supports $filter (eq, ne, not, startsWith).
func (m *Device) SetMdmAppId(value *string)() {
err := m.GetBackingStore().Set("mdmAppId", value)
if err != nil {
panic(err)
}
}
// SetMemberOf sets the memberOf property value. Groups and administrative units that this device is a member of. Read-only. Nullable. Supports $expand.
func (m *Device) SetMemberOf(value []DirectoryObjectable)() {
err := m.GetBackingStore().Set("memberOf", value)
if err != nil {
panic(err)
}
}
// SetOnPremisesLastSyncDateTime sets the onPremisesLastSyncDateTime property value. The last time at which the object was synced with the on-premises directory. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z Read-only. Supports $filter (eq, ne, not, ge, le, in).
func (m *Device) SetOnPremisesLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() {
err := m.GetBackingStore().Set("onPremisesLastSyncDateTime", value)
if err != nil {
panic(err)
}
}
// SetOnPremisesSyncEnabled sets the onPremisesSyncEnabled property value. true if this object is synced from an on-premises directory; false if this object was originally synced from an on-premises directory but is no longer synced; null if this object has never been synced from an on-premises directory (default). Read-only. Supports $filter (eq, ne, not, in, and eq on null values).
func (m *Device) SetOnPremisesSyncEnabled(value *bool)() {
err := m.GetBackingStore().Set("onPremisesSyncEnabled", value)
if err != nil {
panic(err)
}
}
// SetOperatingSystem sets the operatingSystem property value. The type of operating system on the device. Required. Supports $filter (eq, ne, not, ge, le, startsWith, and eq on null values).
func (m *Device) SetOperatingSystem(value *string)() {
err := m.GetBackingStore().Set("operatingSystem", value)
if err != nil {
panic(err)
}
}
// SetOperatingSystemVersion sets the operatingSystemVersion property value. The version of the operating system on the device. Required. Supports $filter (eq, ne, not, ge, le, startsWith, and eq on null values).
func (m *Device) SetOperatingSystemVersion(value *string)() {
err := m.GetBackingStore().Set("operatingSystemVersion", value)
if err != nil {
panic(err)
}
}
// SetPhysicalIds sets the physicalIds property value. For internal use only. Not nullable. Supports $filter (eq, not, ge, le, startsWith,/$count eq 0, /$count ne 0).
func (m *Device) SetPhysicalIds(value []string)() {
err := m.GetBackingStore().Set("physicalIds", value)
if err != nil {
panic(err)
}
}
// SetProfileType sets the profileType property value. The profile type of the device. Possible values: RegisteredDevice (default), SecureVM, Printer, Shared, IoT.
func (m *Device) SetProfileType(value *string)() {
err := m.GetBackingStore().Set("profileType", value)
if err != nil {
panic(err)
}
}
// SetRegisteredOwners sets the registeredOwners property value. The user that cloud joined the device or registered their personal device. The registered owner is set at the time of registration. Currently, there can be only one owner. Read-only. Nullable. Supports $expand.
func (m *Device) SetRegisteredOwners(value []DirectoryObjectable)() {
err := m.GetBackingStore().Set("registeredOwners", value)
if err != nil {
panic(err)
}
}
// SetRegisteredUsers sets the registeredUsers property value. Collection of registered users of the device. For cloud joined devices and registered personal devices, registered users are set to the same value as registered owners at the time of registration. Read-only. Nullable. Supports $expand.
func (m *Device) SetRegisteredUsers(value []DirectoryObjectable)() {
err := m.GetBackingStore().Set("registeredUsers", value)
if err != nil {
panic(err)
}
}
// SetSystemLabels sets the systemLabels property value. List of labels applied to the device by the system. Supports $filter (/$count eq 0, /$count ne 0).
func (m *Device) SetSystemLabels(value []string)() {
err := m.GetBackingStore().Set("systemLabels", value)
if err != nil {
panic(err)
}
}
// SetTransitiveMemberOf sets the transitiveMemberOf property value. Groups and administrative units that the device is a member of. This operation is transitive. Supports $expand.
func (m *Device) SetTransitiveMemberOf(value []DirectoryObjectable)() {
err := m.GetBackingStore().Set("transitiveMemberOf", value)
if err != nil {
panic(err)
}
}
// SetTrustType sets the trustType property value. Type of trust for the joined device. Read-only. Possible values: Workplace (indicates bring your own personal devices), AzureAd (Cloud only joined devices), ServerAd (on-premises domain joined devices joined to Azure AD). For more details, see Introduction to device management in Azure Active Directory
func (m *Device) SetTrustType(value *string)() {
err := m.GetBackingStore().Set("trustType", value)
if err != nil {
panic(err)
}
}
// Deviceable
type Deviceable interface {
DirectoryObjectable
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetAccountEnabled()(*bool)
GetAlternativeSecurityIds()([]AlternativeSecurityIdable)
GetApproximateLastSignInDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
GetComplianceExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
GetDeviceId()(*string)
GetDeviceMetadata()(*string)
GetDeviceVersion()(*int32)
GetDisplayName()(*string)
GetExtensions()([]Extensionable)
GetIsCompliant()(*bool)
GetIsManaged()(*bool)
GetMdmAppId()(*string)
GetMemberOf()([]DirectoryObjectable)
GetOnPremisesLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
GetOnPremisesSyncEnabled()(*bool)
GetOperatingSystem()(*string)
GetOperatingSystemVersion()(*string)
GetPhysicalIds()([]string)
GetProfileType()(*string)
GetRegisteredOwners()([]DirectoryObjectable)
GetRegisteredUsers()([]DirectoryObjectable)
GetSystemLabels()([]string)
GetTransitiveMemberOf()([]DirectoryObjectable)
GetTrustType()(*string)
SetAccountEnabled(value *bool)()
SetAlternativeSecurityIds(value []AlternativeSecurityIdable)()
SetApproximateLastSignInDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)()
SetComplianceExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)()
SetDeviceId(value *string)()
SetDeviceMetadata(value *string)()
SetDeviceVersion(value *int32)()
SetDisplayName(value *string)()
SetExtensions(value []Extensionable)()
SetIsCompliant(value *bool)()
SetIsManaged(value *bool)()
SetMdmAppId(value *string)()
SetMemberOf(value []DirectoryObjectable)()
SetOnPremisesLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)()
SetOnPremisesSyncEnabled(value *bool)()
SetOperatingSystem(value *string)()
SetOperatingSystemVersion(value *string)()
SetPhysicalIds(value []string)()
SetProfileType(value *string)()
SetRegisteredOwners(value []DirectoryObjectable)()
SetRegisteredUsers(value []DirectoryObjectable)()
SetSystemLabels(value []string)()
SetTransitiveMemberOf(value []DirectoryObjectable)()
SetTrustType(value *string)()
}