|
| 1 | +package models |
| 2 | + |
| 3 | +import ( |
| 4 | + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" |
| 5 | +) |
| 6 | + |
| 7 | +// UserInterfaceConfigAuth |
| 8 | +type UserInterfaceConfigAuth struct { |
| 9 | + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. |
| 10 | + additionalData map[string]any |
| 11 | + // The obacEnabled property |
| 12 | + obacEnabled *bool |
| 13 | + // User-defined name-value pairs. Name and value must be strings. |
| 14 | + options Propertiesable |
| 15 | + // The rbacEnabled property |
| 16 | + rbacEnabled *bool |
| 17 | + // The type property |
| 18 | + typeEscaped *UserInterfaceConfigAuth_type |
| 19 | +} |
| 20 | + |
| 21 | +// NewUserInterfaceConfigAuth instantiates a new UserInterfaceConfigAuth and sets the default values. |
| 22 | +func NewUserInterfaceConfigAuth() *UserInterfaceConfigAuth { |
| 23 | + m := &UserInterfaceConfigAuth{} |
| 24 | + m.SetAdditionalData(make(map[string]any)) |
| 25 | + return m |
| 26 | +} |
| 27 | + |
| 28 | +// CreateUserInterfaceConfigAuthFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value |
| 29 | +func CreateUserInterfaceConfigAuthFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { |
| 30 | + return NewUserInterfaceConfigAuth(), nil |
| 31 | +} |
| 32 | + |
| 33 | +// 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. |
| 34 | +func (m *UserInterfaceConfigAuth) GetAdditionalData() map[string]any { |
| 35 | + return m.additionalData |
| 36 | +} |
| 37 | + |
| 38 | +// GetFieldDeserializers the deserialization information for the current model |
| 39 | +func (m *UserInterfaceConfigAuth) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { |
| 40 | + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error) |
| 41 | + res["obacEnabled"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { |
| 42 | + val, err := n.GetBoolValue() |
| 43 | + if err != nil { |
| 44 | + return err |
| 45 | + } |
| 46 | + if val != nil { |
| 47 | + m.SetObacEnabled(val) |
| 48 | + } |
| 49 | + return nil |
| 50 | + } |
| 51 | + res["options"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { |
| 52 | + val, err := n.GetObjectValue(CreatePropertiesFromDiscriminatorValue) |
| 53 | + if err != nil { |
| 54 | + return err |
| 55 | + } |
| 56 | + if val != nil { |
| 57 | + m.SetOptions(val.(Propertiesable)) |
| 58 | + } |
| 59 | + return nil |
| 60 | + } |
| 61 | + res["rbacEnabled"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { |
| 62 | + val, err := n.GetBoolValue() |
| 63 | + if err != nil { |
| 64 | + return err |
| 65 | + } |
| 66 | + if val != nil { |
| 67 | + m.SetRbacEnabled(val) |
| 68 | + } |
| 69 | + return nil |
| 70 | + } |
| 71 | + res["type"] = func(n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { |
| 72 | + val, err := n.GetEnumValue(ParseUserInterfaceConfigAuth_type) |
| 73 | + if err != nil { |
| 74 | + return err |
| 75 | + } |
| 76 | + if val != nil { |
| 77 | + m.SetTypeEscaped(val.(*UserInterfaceConfigAuth_type)) |
| 78 | + } |
| 79 | + return nil |
| 80 | + } |
| 81 | + return res |
| 82 | +} |
| 83 | + |
| 84 | +// GetObacEnabled gets the obacEnabled property value. The obacEnabled property |
| 85 | +func (m *UserInterfaceConfigAuth) GetObacEnabled() *bool { |
| 86 | + return m.obacEnabled |
| 87 | +} |
| 88 | + |
| 89 | +// GetOptions gets the options property value. User-defined name-value pairs. Name and value must be strings. |
| 90 | +func (m *UserInterfaceConfigAuth) GetOptions() Propertiesable { |
| 91 | + return m.options |
| 92 | +} |
| 93 | + |
| 94 | +// GetRbacEnabled gets the rbacEnabled property value. The rbacEnabled property |
| 95 | +func (m *UserInterfaceConfigAuth) GetRbacEnabled() *bool { |
| 96 | + return m.rbacEnabled |
| 97 | +} |
| 98 | + |
| 99 | +// GetTypeEscaped gets the type property value. The type property |
| 100 | +func (m *UserInterfaceConfigAuth) GetTypeEscaped() *UserInterfaceConfigAuth_type { |
| 101 | + return m.typeEscaped |
| 102 | +} |
| 103 | + |
| 104 | +// Serialize serializes information the current object |
| 105 | +func (m *UserInterfaceConfigAuth) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error { |
| 106 | + { |
| 107 | + err := writer.WriteBoolValue("obacEnabled", m.GetObacEnabled()) |
| 108 | + if err != nil { |
| 109 | + return err |
| 110 | + } |
| 111 | + } |
| 112 | + { |
| 113 | + err := writer.WriteObjectValue("options", m.GetOptions()) |
| 114 | + if err != nil { |
| 115 | + return err |
| 116 | + } |
| 117 | + } |
| 118 | + { |
| 119 | + err := writer.WriteBoolValue("rbacEnabled", m.GetRbacEnabled()) |
| 120 | + if err != nil { |
| 121 | + return err |
| 122 | + } |
| 123 | + } |
| 124 | + if m.GetTypeEscaped() != nil { |
| 125 | + cast := (*m.GetTypeEscaped()).String() |
| 126 | + err := writer.WriteStringValue("type", &cast) |
| 127 | + if err != nil { |
| 128 | + return err |
| 129 | + } |
| 130 | + } |
| 131 | + { |
| 132 | + err := writer.WriteAdditionalData(m.GetAdditionalData()) |
| 133 | + if err != nil { |
| 134 | + return err |
| 135 | + } |
| 136 | + } |
| 137 | + return nil |
| 138 | +} |
| 139 | + |
| 140 | +// 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. |
| 141 | +func (m *UserInterfaceConfigAuth) SetAdditionalData(value map[string]any) { |
| 142 | + m.additionalData = value |
| 143 | +} |
| 144 | + |
| 145 | +// SetObacEnabled sets the obacEnabled property value. The obacEnabled property |
| 146 | +func (m *UserInterfaceConfigAuth) SetObacEnabled(value *bool) { |
| 147 | + m.obacEnabled = value |
| 148 | +} |
| 149 | + |
| 150 | +// SetOptions sets the options property value. User-defined name-value pairs. Name and value must be strings. |
| 151 | +func (m *UserInterfaceConfigAuth) SetOptions(value Propertiesable) { |
| 152 | + m.options = value |
| 153 | +} |
| 154 | + |
| 155 | +// SetRbacEnabled sets the rbacEnabled property value. The rbacEnabled property |
| 156 | +func (m *UserInterfaceConfigAuth) SetRbacEnabled(value *bool) { |
| 157 | + m.rbacEnabled = value |
| 158 | +} |
| 159 | + |
| 160 | +// SetTypeEscaped sets the type property value. The type property |
| 161 | +func (m *UserInterfaceConfigAuth) SetTypeEscaped(value *UserInterfaceConfigAuth_type) { |
| 162 | + m.typeEscaped = value |
| 163 | +} |
| 164 | + |
| 165 | +// UserInterfaceConfigAuthable |
| 166 | +type UserInterfaceConfigAuthable interface { |
| 167 | + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder |
| 168 | + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable |
| 169 | + GetObacEnabled() *bool |
| 170 | + GetOptions() Propertiesable |
| 171 | + GetRbacEnabled() *bool |
| 172 | + GetTypeEscaped() *UserInterfaceConfigAuth_type |
| 173 | + SetObacEnabled(value *bool) |
| 174 | + SetOptions(value Propertiesable) |
| 175 | + SetRbacEnabled(value *bool) |
| 176 | + SetTypeEscaped(value *UserInterfaceConfigAuth_type) |
| 177 | +} |
0 commit comments