Class: MicrosoftGraph::Models::NotificationMessageTemplate

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

Overview

Notification messages are messages that are sent to end users who are determined to be not-compliant with the compliance policies defined by the administrator. Administrators choose notifications and configure them in the Intune Admin Console using the compliance policy creation page under the “Actions for non-compliance” section. Use the notificationMessageTemplate object to create your own custom notifications for administrators to choose while configuring actions for non-compliance.

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 notificationMessageTemplate and sets the default values.



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

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 notification_message_template

Raises:

  • (StandardError)


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

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

Instance Method Details

#branding_optionsObject

Gets the brandingOptions property value. Branding Options for the Message Template. Branding is defined in the Intune Admin Console.

Returns:

  • a notification_template_branding_options



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

def branding_options
    return @branding_options
end

#branding_options=(value) ⇒ Object

Sets the brandingOptions property value. Branding Options for the Message Template. Branding is defined in the Intune Admin Console.

Parameters:

  • value

    Value to set for the brandingOptions property.

Returns:

  • a void



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

def branding_options=(value)
    @branding_options = value
end

#default_localeObject

Gets the defaultLocale property value. The default locale to fallback onto when the requested locale is not available.

Returns:

  • a string



65
66
67
# File 'lib/models/notification_message_template.rb', line 65

def default_locale
    return @default_locale
end

#default_locale=(value) ⇒ Object

Sets the defaultLocale property value. The default locale to fallback onto when the requested locale is not available.

Parameters:

  • value

    Value to set for the defaultLocale property.

Returns:

  • a void



73
74
75
# File 'lib/models/notification_message_template.rb', line 73

def default_locale=(value)
    @default_locale = value
end

#display_nameObject

Gets the displayName property value. Display name for the Notification Message Template.

Returns:

  • a string



80
81
82
# File 'lib/models/notification_message_template.rb', line 80

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. Display name for the Notification Message Template.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



88
89
90
# File 'lib/models/notification_message_template.rb', line 88

def display_name=(value)
    @display_name = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



95
96
97
98
99
100
101
102
103
104
# File 'lib/models/notification_message_template.rb', line 95

def get_field_deserializers()
    return super.merge({
        "brandingOptions" => lambda {|n| @branding_options = n.get_enum_value(MicrosoftGraph::Models::NotificationTemplateBrandingOptions) },
        "defaultLocale" => lambda {|n| @default_locale = n.get_string_value() },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "lastModifiedDateTime" => lambda {|n| @last_modified_date_time = n.get_date_time_value() },
        "localizedNotificationMessages" => lambda {|n| @localized_notification_messages = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::LocalizedNotificationMessage.create_from_discriminator_value(pn) }) },
        "roleScopeTagIds" => lambda {|n| @role_scope_tag_ids = n.get_collection_of_primitive_values(String) },
    })
end

#last_modified_date_timeObject

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

Returns:

  • a date_time



109
110
111
# File 'lib/models/notification_message_template.rb', line 109

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



117
118
119
# File 'lib/models/notification_message_template.rb', line 117

def last_modified_date_time=(value)
    @last_modified_date_time = value
end

#localized_notification_messagesObject

Gets the localizedNotificationMessages property value. The list of localized messages for this Notification Message Template.

Returns:

  • a localized_notification_message



124
125
126
# File 'lib/models/notification_message_template.rb', line 124

def localized_notification_messages
    return @localized_notification_messages
end

#localized_notification_messages=(value) ⇒ Object

Sets the localizedNotificationMessages property value. The list of localized messages for this Notification Message Template.

Parameters:

  • value

    Value to set for the localizedNotificationMessages property.

Returns:

  • a void



132
133
134
# File 'lib/models/notification_message_template.rb', line 132

def localized_notification_messages=(value)
    @localized_notification_messages = value
end

#role_scope_tag_idsObject

Gets the roleScopeTagIds property value. List of Scope Tags for this Entity instance.

Returns:

  • a string



139
140
141
# File 'lib/models/notification_message_template.rb', line 139

def role_scope_tag_ids
    return @role_scope_tag_ids
end

#role_scope_tag_ids=(value) ⇒ Object

Sets the roleScopeTagIds property value. List of Scope Tags for this Entity instance.

Parameters:

  • value

    Value to set for the roleScopeTagIds property.

Returns:

  • a void



147
148
149
# File 'lib/models/notification_message_template.rb', line 147

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


155
156
157
158
159
160
161
162
163
164
# File 'lib/models/notification_message_template.rb', line 155

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_enum_value("brandingOptions", @branding_options)
    writer.write_string_value("defaultLocale", @default_locale)
    writer.write_string_value("displayName", @display_name)
    writer.write_date_time_value("lastModifiedDateTime", @last_modified_date_time)
    writer.write_collection_of_object_values("localizedNotificationMessages", @localized_notification_messages)
    writer.write_collection_of_primitive_values("roleScopeTagIds", @role_scope_tag_ids)
end