Class: MicrosoftGraph::Models::LocalizedNotificationMessage

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/localized_notification_message.rb

Overview

The text content of a Notification Message Template for the specified locale.

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=

Constructor Details

#initializeObject

Instantiates a new localizedNotificationMessage and sets the default values.



31
32
33
# File 'lib/models/localized_notification_message.rb', line 31

def initialize()
    super
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 localized_notification_message

Raises:

  • (StandardError)


39
40
41
42
# File 'lib/models/localized_notification_message.rb', line 39

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

Instance Method Details

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



47
48
49
50
51
52
53
54
55
# File 'lib/models/localized_notification_message.rb', line 47

def get_field_deserializers()
    return super.merge({
        "isDefault" => lambda {|n| @is_default = n.get_boolean_value() },
        "lastModifiedDateTime" => lambda {|n| @last_modified_date_time = n.get_date_time_value() },
        "locale" => lambda {|n| @locale = n.get_string_value() },
        "messageTemplate" => lambda {|n| @message_template = n.get_string_value() },
        "subject" => lambda {|n| @subject = n.get_string_value() },
    })
end

#is_defaultObject

Gets the isDefault property value. Flag to indicate whether or not this is the default locale for language fallback. This flag can only be set. To unset, set this property to true on another Localized Notification Message.

Returns:

  • a boolean



60
61
62
# File 'lib/models/localized_notification_message.rb', line 60

def is_default
    return @is_default
end

#is_default=(value) ⇒ Object

Sets the isDefault property value. Flag to indicate whether or not this is the default locale for language fallback. This flag can only be set. To unset, set this property to true on another Localized Notification Message.

Parameters:

  • value

    Value to set for the isDefault property.

Returns:

  • a void



68
69
70
# File 'lib/models/localized_notification_message.rb', line 68

def is_default=(value)
    @is_default = value
end

#last_modified_date_timeObject

Gets the lastModifiedDateTime property value. DateTime the object was last modified.

Returns:

  • a date_time



75
76
77
# File 'lib/models/localized_notification_message.rb', line 75

def last_modified_date_time
    return @last_modified_date_time
end

#last_modified_date_time=(value) ⇒ Object

Sets the lastModifiedDateTime property value. DateTime the object was last modified.

Parameters:

  • value

    Value to set for the lastModifiedDateTime property.

Returns:

  • a void



83
84
85
# File 'lib/models/localized_notification_message.rb', line 83

def last_modified_date_time=(value)
    @last_modified_date_time = value
end

#localeObject

Gets the locale property value. The Locale for which this message is destined.

Returns:

  • a string



90
91
92
# File 'lib/models/localized_notification_message.rb', line 90

def locale
    return @locale
end

#locale=(value) ⇒ Object

Sets the locale property value. The Locale for which this message is destined.

Parameters:

  • value

    Value to set for the locale property.

Returns:

  • a void



98
99
100
# File 'lib/models/localized_notification_message.rb', line 98

def locale=(value)
    @locale = value
end

#message_templateObject

Gets the messageTemplate property value. The Message Template content.

Returns:

  • a string



105
106
107
# File 'lib/models/localized_notification_message.rb', line 105

def message_template
    return @message_template
end

#message_template=(value) ⇒ Object

Sets the messageTemplate property value. The Message Template content.

Parameters:

  • value

    Value to set for the messageTemplate property.

Returns:

  • a void



113
114
115
# File 'lib/models/localized_notification_message.rb', line 113

def message_template=(value)
    @message_template = 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)


121
122
123
124
125
126
127
128
129
# File 'lib/models/localized_notification_message.rb', line 121

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_boolean_value("isDefault", @is_default)
    writer.write_date_time_value("lastModifiedDateTime", @last_modified_date_time)
    writer.write_string_value("locale", @locale)
    writer.write_string_value("messageTemplate", @message_template)
    writer.write_string_value("subject", @subject)
end

#subjectObject

Gets the subject property value. The Message Template Subject.

Returns:

  • a string



134
135
136
# File 'lib/models/localized_notification_message.rb', line 134

def subject
    return @subject
end

#subject=(value) ⇒ Object

Sets the subject property value. The Message Template Subject.

Parameters:

  • value

    Value to set for the subject property.

Returns:

  • a void



142
143
144
# File 'lib/models/localized_notification_message.rb', line 142

def subject=(value)
    @subject = value
end