Class: MicrosoftGraph::Models::VisualInfo

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/visual_info.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new visualInfo and sets the default values.



79
80
81
# File 'lib/models/visual_info.rb', line 79

def initialize()
    @additional_data = Hash.new
end

Class Method Details

.create_from_discriminator_value(parse_node) ⇒ Object

Creates a new instance of the appropriate class based on discriminator value

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a visual_info

Raises:

  • (StandardError)


102
103
104
105
# File 'lib/models/visual_info.rb', line 102

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return VisualInfo.new
end

Instance Method Details

#additional_dataObject

Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Returns:

  • a i_dictionary



34
35
36
# File 'lib/models/visual_info.rb', line 34

def additional_data
    return @additional_data
end

#additional_data=(value) ⇒ Object

Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Parameters:

  • value

    Value to set for the additionalData property.

Returns:

  • a void



42
43
44
# File 'lib/models/visual_info.rb', line 42

def additional_data=(value)
    @additional_data = value
end

#attributionObject

Gets the attribution property value. Optional. JSON object used to represent an icon which represents the application used to generate the activity

Returns:

  • a image_info



49
50
51
# File 'lib/models/visual_info.rb', line 49

def attribution
    return @attribution
end

#attribution=(value) ⇒ Object

Sets the attribution property value. Optional. JSON object used to represent an icon which represents the application used to generate the activity

Parameters:

  • value

    Value to set for the attribution property.

Returns:

  • a void



57
58
59
# File 'lib/models/visual_info.rb', line 57

def attribution=(value)
    @attribution = value
end

#background_colorObject

Gets the backgroundColor property value. Optional. Background color used to render the activity in the UI - brand color for the application source of the activity. Must be a valid hex color

Returns:

  • a string



64
65
66
# File 'lib/models/visual_info.rb', line 64

def background_color
    return @background_color
end

#background_color=(value) ⇒ Object

Sets the backgroundColor property value. Optional. Background color used to render the activity in the UI - brand color for the application source of the activity. Must be a valid hex color

Parameters:

  • value

    Value to set for the backgroundColor property.

Returns:

  • a void



72
73
74
# File 'lib/models/visual_info.rb', line 72

def background_color=(value)
    @background_color = value
end

#contentObject

Gets the content property value. Optional. Custom piece of data - JSON object used to provide custom content to render the activity in the Windows Shell UI

Returns:

  • a json



86
87
88
# File 'lib/models/visual_info.rb', line 86

def content
    return @content
end

#content=(value) ⇒ Object

Sets the content property value. Optional. Custom piece of data - JSON object used to provide custom content to render the activity in the Windows Shell UI

Parameters:

  • value

    Value to set for the content property.

Returns:

  • a void



94
95
96
# File 'lib/models/visual_info.rb', line 94

def content=(value)
    @content = value
end

#descriptionObject

Gets the description property value. Optional. Longer text description of the user’s unique activity (example: document name, first sentence, and/or metadata)

Returns:

  • a string



110
111
112
# File 'lib/models/visual_info.rb', line 110

def description
    return @description
end

#description=(value) ⇒ Object

Sets the description property value. Optional. Longer text description of the user’s unique activity (example: document name, first sentence, and/or metadata)

Parameters:

  • value

    Value to set for the description property.

Returns:

  • a void



118
119
120
# File 'lib/models/visual_info.rb', line 118

def description=(value)
    @description = value
end

#display_textObject

Gets the displayText property value. Required. Short text description of the user’s unique activity (for example, document name in cases where an activity refers to document creation)

Returns:

  • a string



125
126
127
# File 'lib/models/visual_info.rb', line 125

def display_text
    return @display_text
end

#display_text=(value) ⇒ Object

Sets the displayText property value. Required. Short text description of the user’s unique activity (for example, document name in cases where an activity refers to document creation)

Parameters:

  • value

    Value to set for the displayText property.

Returns:

  • a void



133
134
135
# File 'lib/models/visual_info.rb', line 133

def display_text=(value)
    @display_text = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



140
141
142
143
144
145
146
147
148
149
# File 'lib/models/visual_info.rb', line 140

def get_field_deserializers()
    return {
        "attribution" => lambda {|n| @attribution = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ImageInfo.create_from_discriminator_value(pn) }) },
        "backgroundColor" => lambda {|n| @background_color = n.get_string_value() },
        "content" => lambda {|n| @content = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) },
        "description" => lambda {|n| @description = n.get_string_value() },
        "displayText" => lambda {|n| @display_text = n.get_string_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
    }
end

#odata_typeObject

Gets the @odata.type property value. The OdataType property

Returns:

  • a string



154
155
156
# File 'lib/models/visual_info.rb', line 154

def odata_type
    return @odata_type
end

#odata_type=(value) ⇒ Object

Sets the @odata.type property value. The OdataType property

Parameters:

  • value

    Value to set for the @odata.type property.

Returns:

  • a void



162
163
164
# File 'lib/models/visual_info.rb', line 162

def odata_type=(value)
    @odata_type = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


170
171
172
173
174
175
176
177
178
179
# File 'lib/models/visual_info.rb', line 170

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_object_value("attribution", @attribution)
    writer.write_string_value("backgroundColor", @background_color)
    writer.write_object_value("content", @content)
    writer.write_string_value("description", @description)
    writer.write_string_value("displayText", @display_text)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_additional_data(@additional_data)
end