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

401 lines
14 KiB
Go

package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e "github.com/microsoft/kiota-abstractions-go/store"
)
// ResourceVisualization
type ResourceVisualization struct {
// Stores model information.
backingStore ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore
// The item's media type. Can be used for filtering for a specific file based on a specific type. See below for supported types.
TypeEscaped *string
}
// NewResourceVisualization instantiates a new resourceVisualization and sets the default values.
func NewResourceVisualization()(*ResourceVisualization) {
m := &ResourceVisualization{
}
m.backingStore = ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStoreFactoryInstance();
m.SetAdditionalData(make(map[string]any))
return m
}
// CreateResourceVisualizationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreateResourceVisualizationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewResourceVisualization(), 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 *ResourceVisualization) 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 *ResourceVisualization) GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore) {
return m.backingStore
}
// GetContainerDisplayName gets the containerDisplayName property value. A string describing where the item is stored. For example, the name of a SharePoint site or the user name identifying the owner of the OneDrive storing the item.
func (m *ResourceVisualization) GetContainerDisplayName()(*string) {
val, err := m.GetBackingStore().Get("containerDisplayName")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetContainerType gets the containerType property value. Can be used for filtering by the type of container in which the file is stored. Such as Site or OneDriveBusiness.
func (m *ResourceVisualization) GetContainerType()(*string) {
val, err := m.GetBackingStore().Get("containerType")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetContainerWebUrl gets the containerWebUrl property value. A path leading to the folder in which the item is stored.
func (m *ResourceVisualization) GetContainerWebUrl()(*string) {
val, err := m.GetBackingStore().Get("containerWebUrl")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetFieldDeserializers the deserialization information for the current model
func (m *ResourceVisualization) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
res["containerDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetContainerDisplayName(val)
}
return nil
}
res["containerType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetContainerType(val)
}
return nil
}
res["containerWebUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetContainerWebUrl(val)
}
return nil
}
res["mediaType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetMediaType(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["previewImageUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetPreviewImageUrl(val)
}
return nil
}
res["previewText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetPreviewText(val)
}
return nil
}
res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetTitle(val)
}
return nil
}
res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetType(val)
}
return nil
}
return res
}
// GetMediaType gets the mediaType property value. The item's media type. Can be used for filtering for a specific type of file based on supported IANA Media Mime Types. Note that not all Media Mime Types are supported.
func (m *ResourceVisualization) GetMediaType()(*string) {
val, err := m.GetBackingStore().Get("mediaType")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetOdataType gets the @odata.type property value. The OdataType property
func (m *ResourceVisualization) GetOdataType()(*string) {
val, err := m.GetBackingStore().Get("odataType")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetPreviewImageUrl gets the previewImageUrl property value. A URL leading to the preview image for the item.
func (m *ResourceVisualization) GetPreviewImageUrl()(*string) {
val, err := m.GetBackingStore().Get("previewImageUrl")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetPreviewText gets the previewText property value. A preview text for the item.
func (m *ResourceVisualization) GetPreviewText()(*string) {
val, err := m.GetBackingStore().Get("previewText")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetTitle gets the title property value. The item's title text.
func (m *ResourceVisualization) GetTitle()(*string) {
val, err := m.GetBackingStore().Get("title")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetType gets the type property value. The item's media type. Can be used for filtering for a specific file based on a specific type. See below for supported types.
func (m *ResourceVisualization) GetType()(*string) {
val, err := m.GetBackingStore().Get("typeEscaped")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// Serialize serializes information the current object
func (m *ResourceVisualization) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
{
err := writer.WriteStringValue("containerDisplayName", m.GetContainerDisplayName())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("containerType", m.GetContainerType())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("containerWebUrl", m.GetContainerWebUrl())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("mediaType", m.GetMediaType())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("@odata.type", m.GetOdataType())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("previewImageUrl", m.GetPreviewImageUrl())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("previewText", m.GetPreviewText())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("title", m.GetTitle())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("type", m.GetType())
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 *ResourceVisualization) 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 *ResourceVisualization) SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)() {
m.backingStore = value
}
// SetContainerDisplayName sets the containerDisplayName property value. A string describing where the item is stored. For example, the name of a SharePoint site or the user name identifying the owner of the OneDrive storing the item.
func (m *ResourceVisualization) SetContainerDisplayName(value *string)() {
err := m.GetBackingStore().Set("containerDisplayName", value)
if err != nil {
panic(err)
}
}
// SetContainerType sets the containerType property value. Can be used for filtering by the type of container in which the file is stored. Such as Site or OneDriveBusiness.
func (m *ResourceVisualization) SetContainerType(value *string)() {
err := m.GetBackingStore().Set("containerType", value)
if err != nil {
panic(err)
}
}
// SetContainerWebUrl sets the containerWebUrl property value. A path leading to the folder in which the item is stored.
func (m *ResourceVisualization) SetContainerWebUrl(value *string)() {
err := m.GetBackingStore().Set("containerWebUrl", value)
if err != nil {
panic(err)
}
}
// SetMediaType sets the mediaType property value. The item's media type. Can be used for filtering for a specific type of file based on supported IANA Media Mime Types. Note that not all Media Mime Types are supported.
func (m *ResourceVisualization) SetMediaType(value *string)() {
err := m.GetBackingStore().Set("mediaType", value)
if err != nil {
panic(err)
}
}
// SetOdataType sets the @odata.type property value. The OdataType property
func (m *ResourceVisualization) SetOdataType(value *string)() {
err := m.GetBackingStore().Set("odataType", value)
if err != nil {
panic(err)
}
}
// SetPreviewImageUrl sets the previewImageUrl property value. A URL leading to the preview image for the item.
func (m *ResourceVisualization) SetPreviewImageUrl(value *string)() {
err := m.GetBackingStore().Set("previewImageUrl", value)
if err != nil {
panic(err)
}
}
// SetPreviewText sets the previewText property value. A preview text for the item.
func (m *ResourceVisualization) SetPreviewText(value *string)() {
err := m.GetBackingStore().Set("previewText", value)
if err != nil {
panic(err)
}
}
// SetTitle sets the title property value. The item's title text.
func (m *ResourceVisualization) SetTitle(value *string)() {
err := m.GetBackingStore().Set("title", value)
if err != nil {
panic(err)
}
}
// SetType sets the type property value. The item's media type. Can be used for filtering for a specific file based on a specific type. See below for supported types.
func (m *ResourceVisualization) SetType(value *string)() {
err := m.GetBackingStore().Set("typeEscaped", value)
if err != nil {
panic(err)
}
}
// ResourceVisualizationable
type ResourceVisualizationable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackedModel
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetBackingStore()(ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)
GetContainerDisplayName()(*string)
GetContainerType()(*string)
GetContainerWebUrl()(*string)
GetMediaType()(*string)
GetOdataType()(*string)
GetPreviewImageUrl()(*string)
GetPreviewText()(*string)
GetTitle()(*string)
GetType()(*string)
SetBackingStore(value ie8677ce2c7e1b4c22e9c3827ecd078d41185424dd9eeb92b7d971ed2d49a392e.BackingStore)()
SetContainerDisplayName(value *string)()
SetContainerType(value *string)()
SetContainerWebUrl(value *string)()
SetMediaType(value *string)()
SetOdataType(value *string)()
SetPreviewImageUrl(value *string)()
SetPreviewText(value *string)()
SetTitle(value *string)()
SetType(value *string)()
}