mirror of
https://github.com/openshift/installer.git
synced 2026-02-05 15:47:14 +01:00
249 lines
8.9 KiB
Go
249 lines
8.9 KiB
Go
package models
|
|
|
|
import (
|
|
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
|
|
ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store"
|
|
)
|
|
|
|
// OmaSetting oMA Settings definition.
|
|
type OmaSetting struct {
|
|
// Stores model information.
|
|
backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore
|
|
}
|
|
// NewOmaSetting instantiates a new omaSetting and sets the default values.
|
|
func NewOmaSetting()(*OmaSetting) {
|
|
m := &OmaSetting{
|
|
}
|
|
m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance();
|
|
m.SetAdditionalData(make(map[string]any))
|
|
return m
|
|
}
|
|
// CreateOmaSettingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
|
|
func CreateOmaSettingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
|
|
if parseNode != nil {
|
|
mappingValueNode, err := parseNode.GetChildNode("@odata.type")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if mappingValueNode != nil {
|
|
mappingValue, err := mappingValueNode.GetStringValue()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if mappingValue != nil {
|
|
switch *mappingValue {
|
|
case "#microsoft.graph.omaSettingBase64":
|
|
return NewOmaSettingBase64(), nil
|
|
case "#microsoft.graph.omaSettingBoolean":
|
|
return NewOmaSettingBoolean(), nil
|
|
case "#microsoft.graph.omaSettingDateTime":
|
|
return NewOmaSettingDateTime(), nil
|
|
case "#microsoft.graph.omaSettingFloatingPoint":
|
|
return NewOmaSettingFloatingPoint(), nil
|
|
case "#microsoft.graph.omaSettingInteger":
|
|
return NewOmaSettingInteger(), nil
|
|
case "#microsoft.graph.omaSettingString":
|
|
return NewOmaSettingString(), nil
|
|
case "#microsoft.graph.omaSettingStringXml":
|
|
return NewOmaSettingStringXml(), nil
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return NewOmaSetting(), 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.
|
|
func (m *OmaSetting) 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.
|
|
func (m *OmaSetting) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) {
|
|
return m.backingStore
|
|
}
|
|
// GetDescription gets the description property value. Description.
|
|
func (m *OmaSetting) GetDescription()(*string) {
|
|
val, err := m.GetBackingStore().Get("description")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
if val != nil {
|
|
return val.(*string)
|
|
}
|
|
return nil
|
|
}
|
|
// GetDisplayName gets the displayName property value. Display Name.
|
|
func (m *OmaSetting) GetDisplayName()(*string) {
|
|
val, err := m.GetBackingStore().Get("displayName")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
if val != nil {
|
|
return val.(*string)
|
|
}
|
|
return nil
|
|
}
|
|
// GetFieldDeserializers the deserialization information for the current model
|
|
func (m *OmaSetting) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
|
|
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
|
|
res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
|
val, err := n.GetStringValue()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if val != nil {
|
|
m.SetDescription(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["@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["omaUri"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
|
|
val, err := n.GetStringValue()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if val != nil {
|
|
m.SetOmaUri(val)
|
|
}
|
|
return nil
|
|
}
|
|
return res
|
|
}
|
|
// GetOdataType gets the @odata.type property value. The OdataType property
|
|
func (m *OmaSetting) GetOdataType()(*string) {
|
|
val, err := m.GetBackingStore().Get("odataType")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
if val != nil {
|
|
return val.(*string)
|
|
}
|
|
return nil
|
|
}
|
|
// GetOmaUri gets the omaUri property value. OMA.
|
|
func (m *OmaSetting) GetOmaUri()(*string) {
|
|
val, err := m.GetBackingStore().Get("omaUri")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
if val != nil {
|
|
return val.(*string)
|
|
}
|
|
return nil
|
|
}
|
|
// Serialize serializes information the current object
|
|
func (m *OmaSetting) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
|
|
{
|
|
err := writer.WriteStringValue("description", m.GetDescription())
|
|
if err != nil {
|
|
return err
|
|
}
|
|
}
|
|
{
|
|
err := writer.WriteStringValue("displayName", m.GetDisplayName())
|
|
if err != nil {
|
|
return err
|
|
}
|
|
}
|
|
{
|
|
err := writer.WriteStringValue("@odata.type", m.GetOdataType())
|
|
if err != nil {
|
|
return err
|
|
}
|
|
}
|
|
{
|
|
err := writer.WriteStringValue("omaUri", m.GetOmaUri())
|
|
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 *OmaSetting) 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 *OmaSetting) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() {
|
|
m.backingStore = value
|
|
}
|
|
// SetDescription sets the description property value. Description.
|
|
func (m *OmaSetting) SetDescription(value *string)() {
|
|
err := m.GetBackingStore().Set("description", value)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
}
|
|
// SetDisplayName sets the displayName property value. Display Name.
|
|
func (m *OmaSetting) SetDisplayName(value *string)() {
|
|
err := m.GetBackingStore().Set("displayName", value)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
}
|
|
// SetOdataType sets the @odata.type property value. The OdataType property
|
|
func (m *OmaSetting) SetOdataType(value *string)() {
|
|
err := m.GetBackingStore().Set("odataType", value)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
}
|
|
// SetOmaUri sets the omaUri property value. OMA.
|
|
func (m *OmaSetting) SetOmaUri(value *string)() {
|
|
err := m.GetBackingStore().Set("omaUri", value)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
}
|
|
// OmaSettingable
|
|
type OmaSettingable interface {
|
|
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
|
|
ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel
|
|
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
|
|
GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)
|
|
GetDescription()(*string)
|
|
GetDisplayName()(*string)
|
|
GetOdataType()(*string)
|
|
GetOmaUri()(*string)
|
|
SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)()
|
|
SetDescription(value *string)()
|
|
SetDisplayName(value *string)()
|
|
SetOdataType(value *string)()
|
|
SetOmaUri(value *string)()
|
|
}
|