Class: MicrosoftGraph::Models::AppManagementPolicy
- Inherits:
-
PolicyBase
- Object
- Entity
- DirectoryObject
- PolicyBase
- MicrosoftGraph::Models::AppManagementPolicy
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/app_management_policy.rb
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
-
#applies_to ⇒ Object
Gets the appliesTo property value.
-
#applies_to=(value) ⇒ Object
Sets the appliesTo property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#initialize ⇒ Object
constructor
Instantiates a new appManagementPolicy and sets the default values.
-
#is_enabled ⇒ Object
Gets the isEnabled property value.
-
#is_enabled=(value) ⇒ Object
Sets the isEnabled property value.
-
#restrictions ⇒ Object
Gets the restrictions property value.
-
#restrictions=(value) ⇒ Object
Sets the restrictions property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
Methods inherited from PolicyBase
#description, #description=, #display_name, #display_name=
Methods inherited from DirectoryObject
#deleted_date_time, #deleted_date_time=
Methods inherited from Entity
#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=
Constructor Details
#initialize ⇒ Object
Instantiates a new appManagementPolicy and sets the default values.
37 38 39 40 |
# File 'lib/models/app_management_policy.rb', line 37 def initialize() super @odata_type = "#microsoft.graph.appManagementPolicy" end |
Class Method Details
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value
46 47 48 49 |
# File 'lib/models/app_management_policy.rb', line 46 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? return AppManagementPolicy.new end |
Instance Method Details
#applies_to ⇒ Object
Gets the appliesTo property value. Collection of applications and service principals to which the policy is applied.
22 23 24 |
# File 'lib/models/app_management_policy.rb', line 22 def applies_to return @applies_to end |
#applies_to=(value) ⇒ Object
Sets the appliesTo property value. Collection of applications and service principals to which the policy is applied.
30 31 32 |
# File 'lib/models/app_management_policy.rb', line 30 def applies_to=(value) @applies_to = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
54 55 56 57 58 59 60 |
# File 'lib/models/app_management_policy.rb', line 54 def get_field_deserializers() return super.merge({ "appliesTo" => lambda {|n| @applies_to = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) }, "isEnabled" => lambda {|n| @is_enabled = n.get_boolean_value() }, "restrictions" => lambda {|n| @restrictions = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::AppManagementConfiguration.create_from_discriminator_value(pn) }) }, }) end |
#is_enabled ⇒ Object
Gets the isEnabled property value. Denotes whether the policy is enabled.
65 66 67 |
# File 'lib/models/app_management_policy.rb', line 65 def is_enabled return @is_enabled end |
#is_enabled=(value) ⇒ Object
Sets the isEnabled property value. Denotes whether the policy is enabled.
73 74 75 |
# File 'lib/models/app_management_policy.rb', line 73 def is_enabled=(value) @is_enabled = value end |
#restrictions ⇒ Object
Gets the restrictions property value. Restrictions that apply to an application or service principal object.
80 81 82 |
# File 'lib/models/app_management_policy.rb', line 80 def restrictions return @restrictions end |
#restrictions=(value) ⇒ Object
Sets the restrictions property value. Restrictions that apply to an application or service principal object.
88 89 90 |
# File 'lib/models/app_management_policy.rb', line 88 def restrictions=(value) @restrictions = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
96 97 98 99 100 101 102 |
# File 'lib/models/app_management_policy.rb', line 96 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? super writer.write_collection_of_object_values("appliesTo", @applies_to) writer.write_boolean_value("isEnabled", @is_enabled) writer.write_object_value("restrictions", @restrictions) end |