Class: MicrosoftGraph::Models::IosNotificationSettings

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

Overview

An item describing notification setting.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new iosNotificationSettings and sets the default values.



123
124
125
# File 'lib/models/ios_notification_settings.rb', line 123

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 ios_notification_settings

Raises:

  • (StandardError)


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

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return IosNotificationSettings.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



48
49
50
# File 'lib/models/ios_notification_settings.rb', line 48

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



56
57
58
# File 'lib/models/ios_notification_settings.rb', line 56

def additional_data=(value)
    @additional_data = value
end

#alert_typeObject

Gets the alertType property value. Notification Settings Alert Type.

Returns:

  • a ios_notification_alert_type



63
64
65
# File 'lib/models/ios_notification_settings.rb', line 63

def alert_type
    return @alert_type
end

#alert_type=(value) ⇒ Object

Sets the alertType property value. Notification Settings Alert Type.

Parameters:

  • value

    Value to set for the alertType property.

Returns:

  • a void



71
72
73
# File 'lib/models/ios_notification_settings.rb', line 71

def alert_type=(value)
    @alert_type = value
end

#app_nameObject

Gets the appName property value. Application name to be associated with the bundleID.

Returns:

  • a string



78
79
80
# File 'lib/models/ios_notification_settings.rb', line 78

def app_name
    return @app_name
end

#app_name=(value) ⇒ Object

Sets the appName property value. Application name to be associated with the bundleID.

Parameters:

  • value

    Value to set for the appName property.

Returns:

  • a void



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

def app_name=(value)
    @app_name = value
end

#badges_enabledObject

Gets the badgesEnabled property value. Indicates whether badges are allowed for this app.

Returns:

  • a boolean



93
94
95
# File 'lib/models/ios_notification_settings.rb', line 93

def badges_enabled
    return @badges_enabled
end

#badges_enabled=(value) ⇒ Object

Sets the badgesEnabled property value. Indicates whether badges are allowed for this app.

Parameters:

  • value

    Value to set for the badgesEnabled property.

Returns:

  • a void



101
102
103
# File 'lib/models/ios_notification_settings.rb', line 101

def badges_enabled=(value)
    @badges_enabled = value
end

#bundle_i_dObject

Gets the bundleID property value. Bundle id of app to which to apply these notification settings.

Returns:

  • a string



108
109
110
# File 'lib/models/ios_notification_settings.rb', line 108

def bundle_i_d
    return @bundle_i_d
end

#bundle_i_d=(value) ⇒ Object

Sets the bundleID property value. Bundle id of app to which to apply these notification settings.

Parameters:

  • value

    Value to set for the bundleID property.

Returns:

  • a void



116
117
118
# File 'lib/models/ios_notification_settings.rb', line 116

def bundle_i_d=(value)
    @bundle_i_d = value
end

#enabledObject

Gets the enabled property value. Indicates whether notifications are allowed for this app.

Returns:

  • a boolean



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

def enabled
    return @enabled
end

#enabled=(value) ⇒ Object

Sets the enabled property value. Indicates whether notifications are allowed for this app.

Parameters:

  • value

    Value to set for the enabled property.

Returns:

  • a void



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

def enabled=(value)
    @enabled = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



154
155
156
157
158
159
160
161
162
163
164
165
166
167
# File 'lib/models/ios_notification_settings.rb', line 154

def get_field_deserializers()
    return {
        "alertType" => lambda {|n| @alert_type = n.get_enum_value(MicrosoftGraph::Models::IosNotificationAlertType) },
        "appName" => lambda {|n| @app_name = n.get_string_value() },
        "badgesEnabled" => lambda {|n| @badges_enabled = n.get_boolean_value() },
        "bundleID" => lambda {|n| @bundle_i_d = n.get_string_value() },
        "enabled" => lambda {|n| @enabled = n.get_boolean_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "publisher" => lambda {|n| @publisher = n.get_string_value() },
        "showInNotificationCenter" => lambda {|n| @show_in_notification_center = n.get_boolean_value() },
        "showOnLockScreen" => lambda {|n| @show_on_lock_screen = n.get_boolean_value() },
        "soundsEnabled" => lambda {|n| @sounds_enabled = n.get_boolean_value() },
    }
end

#odata_typeObject

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

Returns:

  • a string



172
173
174
# File 'lib/models/ios_notification_settings.rb', line 172

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



180
181
182
# File 'lib/models/ios_notification_settings.rb', line 180

def odata_type=(value)
    @odata_type = value
end

#publisherObject

Gets the publisher property value. Publisher to be associated with the bundleID.

Returns:

  • a string



187
188
189
# File 'lib/models/ios_notification_settings.rb', line 187

def publisher
    return @publisher
end

#publisher=(value) ⇒ Object

Sets the publisher property value. Publisher to be associated with the bundleID.

Parameters:

  • value

    Value to set for the publisher property.

Returns:

  • a void



195
196
197
# File 'lib/models/ios_notification_settings.rb', line 195

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


203
204
205
206
207
208
209
210
211
212
213
214
215
216
# File 'lib/models/ios_notification_settings.rb', line 203

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_enum_value("alertType", @alert_type)
    writer.write_string_value("appName", @app_name)
    writer.write_boolean_value("badgesEnabled", @badges_enabled)
    writer.write_string_value("bundleID", @bundle_i_d)
    writer.write_boolean_value("enabled", @enabled)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_string_value("publisher", @publisher)
    writer.write_boolean_value("showInNotificationCenter", @show_in_notification_center)
    writer.write_boolean_value("showOnLockScreen", @show_on_lock_screen)
    writer.write_boolean_value("soundsEnabled", @sounds_enabled)
    writer.write_additional_data(@additional_data)
end

#show_in_notification_centerObject

Gets the showInNotificationCenter property value. Indicates whether notifications can be shown in notification center.

Returns:

  • a boolean



221
222
223
# File 'lib/models/ios_notification_settings.rb', line 221

def show_in_notification_center
    return @show_in_notification_center
end

#show_in_notification_center=(value) ⇒ Object

Sets the showInNotificationCenter property value. Indicates whether notifications can be shown in notification center.

Parameters:

  • value

    Value to set for the showInNotificationCenter property.

Returns:

  • a void



229
230
231
# File 'lib/models/ios_notification_settings.rb', line 229

def show_in_notification_center=(value)
    @show_in_notification_center = value
end

#show_on_lock_screenObject

Gets the showOnLockScreen property value. Indicates whether notifications can be shown on the lock screen.

Returns:

  • a boolean



236
237
238
# File 'lib/models/ios_notification_settings.rb', line 236

def show_on_lock_screen
    return @show_on_lock_screen
end

#show_on_lock_screen=(value) ⇒ Object

Sets the showOnLockScreen property value. Indicates whether notifications can be shown on the lock screen.

Parameters:

  • value

    Value to set for the showOnLockScreen property.

Returns:

  • a void



244
245
246
# File 'lib/models/ios_notification_settings.rb', line 244

def show_on_lock_screen=(value)
    @show_on_lock_screen = value
end

#sounds_enabledObject

Gets the soundsEnabled property value. Indicates whether sounds are allowed for this app.

Returns:

  • a boolean



251
252
253
# File 'lib/models/ios_notification_settings.rb', line 251

def sounds_enabled
    return @sounds_enabled
end

#sounds_enabled=(value) ⇒ Object

Sets the soundsEnabled property value. Indicates whether sounds are allowed for this app.

Parameters:

  • value

    Value to set for the soundsEnabled property.

Returns:

  • a void



259
260
261
# File 'lib/models/ios_notification_settings.rb', line 259

def sounds_enabled=(value)
    @sounds_enabled = value
end