Class: MicrosoftGraph::Models::IosNetworkUsageRule
- Inherits:
-
Object
- Object
- MicrosoftGraph::Models::IosNetworkUsageRule
- Includes:
- MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/ios_network_usage_rule.rb
Overview
Network Usage Rules allow enterprises to specify how managed apps use networks, such as cellular data networks.
Class Method Summary collapse
-
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value.
Instance Method Summary collapse
-
#additional_data ⇒ Object
Gets the additionalData property value.
-
#additional_data=(value) ⇒ Object
Sets the additionalData property value.
-
#cellular_data_block_when_roaming ⇒ Object
Gets the cellularDataBlockWhenRoaming property value.
-
#cellular_data_block_when_roaming=(value) ⇒ Object
Sets the cellularDataBlockWhenRoaming property value.
-
#cellular_data_blocked ⇒ Object
Gets the cellularDataBlocked property value.
-
#cellular_data_blocked=(value) ⇒ Object
Sets the cellularDataBlocked property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#initialize ⇒ Object
constructor
Instantiates a new iosNetworkUsageRule and sets the default values.
-
#managed_apps ⇒ Object
Gets the managedApps property value.
-
#managed_apps=(value) ⇒ Object
Sets the managedApps property value.
-
#odata_type ⇒ Object
Gets the @odata.type property value.
-
#odata_type=(value) ⇒ Object
Sets the @odata.type property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
Constructor Details
#initialize ⇒ Object
Instantiates a new iosNetworkUsageRule and sets the default values.
75 76 77 |
# File 'lib/models/ios_network_usage_rule.rb', line 75 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
83 84 85 86 |
# File 'lib/models/ios_network_usage_rule.rb', line 83 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? return IosNetworkUsageRule.new end |
Instance Method Details
#additional_data ⇒ Object
Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
30 31 32 |
# File 'lib/models/ios_network_usage_rule.rb', line 30 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.
38 39 40 |
# File 'lib/models/ios_network_usage_rule.rb', line 38 def additional_data=(value) @additional_data = value end |
#cellular_data_block_when_roaming ⇒ Object
Gets the cellularDataBlockWhenRoaming property value. If set to true, corresponding managed apps will not be allowed to use cellular data when roaming.
45 46 47 |
# File 'lib/models/ios_network_usage_rule.rb', line 45 def cellular_data_block_when_roaming return @cellular_data_block_when_roaming end |
#cellular_data_block_when_roaming=(value) ⇒ Object
Sets the cellularDataBlockWhenRoaming property value. If set to true, corresponding managed apps will not be allowed to use cellular data when roaming.
53 54 55 |
# File 'lib/models/ios_network_usage_rule.rb', line 53 def cellular_data_block_when_roaming=(value) @cellular_data_block_when_roaming = value end |
#cellular_data_blocked ⇒ Object
Gets the cellularDataBlocked property value. If set to true, corresponding managed apps will not be allowed to use cellular data at any time.
60 61 62 |
# File 'lib/models/ios_network_usage_rule.rb', line 60 def cellular_data_blocked return @cellular_data_blocked end |
#cellular_data_blocked=(value) ⇒ Object
Sets the cellularDataBlocked property value. If set to true, corresponding managed apps will not be allowed to use cellular data at any time.
68 69 70 |
# File 'lib/models/ios_network_usage_rule.rb', line 68 def cellular_data_blocked=(value) @cellular_data_blocked = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
91 92 93 94 95 96 97 98 |
# File 'lib/models/ios_network_usage_rule.rb', line 91 def get_field_deserializers() return { "cellularDataBlockWhenRoaming" => lambda {|n| @cellular_data_block_when_roaming = n.get_boolean_value() }, "cellularDataBlocked" => lambda {|n| @cellular_data_blocked = n.get_boolean_value() }, "managedApps" => lambda {|n| @managed_apps = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::AppListItem.create_from_discriminator_value(pn) }) }, "@odata.type" => lambda {|n| @odata_type = n.get_string_value() }, } end |
#managed_apps ⇒ Object
Gets the managedApps property value. Information about the managed apps that this rule is going to apply to. This collection can contain a maximum of 500 elements.
103 104 105 |
# File 'lib/models/ios_network_usage_rule.rb', line 103 def managed_apps return @managed_apps end |
#managed_apps=(value) ⇒ Object
Sets the managedApps property value. Information about the managed apps that this rule is going to apply to. This collection can contain a maximum of 500 elements.
111 112 113 |
# File 'lib/models/ios_network_usage_rule.rb', line 111 def managed_apps=(value) @managed_apps = value end |
#odata_type ⇒ Object
Gets the @odata.type property value. The OdataType property
118 119 120 |
# File 'lib/models/ios_network_usage_rule.rb', line 118 def odata_type return @odata_type end |
#odata_type=(value) ⇒ Object
Sets the @odata.type property value. The OdataType property
126 127 128 |
# File 'lib/models/ios_network_usage_rule.rb', line 126 def odata_type=(value) @odata_type = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
134 135 136 137 138 139 140 141 |
# File 'lib/models/ios_network_usage_rule.rb', line 134 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? writer.write_boolean_value("cellularDataBlockWhenRoaming", @cellular_data_block_when_roaming) writer.write_boolean_value("cellularDataBlocked", @cellular_data_blocked) writer.write_collection_of_object_values("managedApps", @managed_apps) writer.write_string_value("@odata.type", @odata_type) writer.write_additional_data(@additional_data) end |