Class: MicrosoftGraph::Models::RoleDefinition
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/role_definition.rb
Overview
The Role Definition resource. The role definition is the foundation of role based access in Intune. The role combines an Intune resource such as a Mobile App and associated role permissions such as Create or Read for the resource. There are two types of roles, built-in and custom. Built-in roles cannot be modified. Both built-in roles and custom roles must have assignments to be enforced. Create custom roles if you want to define a role that allows any of the available resources and role permissions to be combined into a single role.
Direct Known Subclasses
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
-
#description ⇒ Object
Gets the description property value.
-
#description=(value) ⇒ Object
Sets the description property value.
-
#display_name ⇒ Object
Gets the displayName property value.
-
#display_name=(value) ⇒ Object
Sets the displayName property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#initialize ⇒ Object
constructor
Instantiates a new roleDefinition and sets the default values.
-
#is_built_in ⇒ Object
Gets the isBuiltIn property value.
-
#is_built_in=(value) ⇒ Object
Sets the isBuiltIn property value.
-
#role_assignments ⇒ Object
Gets the roleAssignments property value.
-
#role_assignments=(value) ⇒ Object
Sets the roleAssignments property value.
-
#role_permissions ⇒ Object
Gets the rolePermissions property value.
-
#role_permissions=(value) ⇒ Object
Sets the rolePermissions property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
Methods inherited from Entity
#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=
Constructor Details
#initialize ⇒ Object
Instantiates a new roleDefinition and sets the default values.
30 31 32 |
# File 'lib/models/role_definition.rb', line 30 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
38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/models/role_definition.rb', line 38 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? mapping_value_node = parse_node.get_child_node("@odata.type") unless mapping_value_node.nil? then mapping_value = mapping_value_node.get_string_value case mapping_value when "#microsoft.graph.deviceAndAppManagementRoleDefinition" return DeviceAndAppManagementRoleDefinition.new end end return RoleDefinition.new end |
Instance Method Details
#description ⇒ Object
Gets the description property value. Description of the Role definition.
54 55 56 |
# File 'lib/models/role_definition.rb', line 54 def description return @description end |
#description=(value) ⇒ Object
Sets the description property value. Description of the Role definition.
62 63 64 |
# File 'lib/models/role_definition.rb', line 62 def description=(value) @description = value end |
#display_name ⇒ Object
Gets the displayName property value. Display Name of the Role definition.
69 70 71 |
# File 'lib/models/role_definition.rb', line 69 def display_name return @display_name end |
#display_name=(value) ⇒ Object
Sets the displayName property value. Display Name of the Role definition.
77 78 79 |
# File 'lib/models/role_definition.rb', line 77 def display_name=(value) @display_name = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
84 85 86 87 88 89 90 91 92 |
# File 'lib/models/role_definition.rb', line 84 def get_field_deserializers() return super.merge({ "description" => lambda {|n| @description = n.get_string_value() }, "displayName" => lambda {|n| @display_name = n.get_string_value() }, "isBuiltIn" => lambda {|n| @is_built_in = n.get_boolean_value() }, "roleAssignments" => lambda {|n| @role_assignments = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::RoleAssignment.create_from_discriminator_value(pn) }) }, "rolePermissions" => lambda {|n| @role_permissions = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::RolePermission.create_from_discriminator_value(pn) }) }, }) end |
#is_built_in ⇒ Object
Gets the isBuiltIn property value. Type of Role. Set to True if it is built-in, or set to False if it is a custom role definition.
97 98 99 |
# File 'lib/models/role_definition.rb', line 97 def is_built_in return @is_built_in end |
#is_built_in=(value) ⇒ Object
Sets the isBuiltIn property value. Type of Role. Set to True if it is built-in, or set to False if it is a custom role definition.
105 106 107 |
# File 'lib/models/role_definition.rb', line 105 def is_built_in=(value) @is_built_in = value end |
#role_assignments ⇒ Object
Gets the roleAssignments property value. List of Role assignments for this role definition.
112 113 114 |
# File 'lib/models/role_definition.rb', line 112 def role_assignments return @role_assignments end |
#role_assignments=(value) ⇒ Object
Sets the roleAssignments property value. List of Role assignments for this role definition.
120 121 122 |
# File 'lib/models/role_definition.rb', line 120 def role_assignments=(value) @role_assignments = value end |
#role_permissions ⇒ Object
Gets the rolePermissions property value. List of Role Permissions this role is allowed to perform. These must match the actionName that is defined as part of the rolePermission.
127 128 129 |
# File 'lib/models/role_definition.rb', line 127 def return @role_permissions end |
#role_permissions=(value) ⇒ Object
Sets the rolePermissions property value. List of Role Permissions this role is allowed to perform. These must match the actionName that is defined as part of the rolePermission.
135 136 137 |
# File 'lib/models/role_definition.rb', line 135 def (value) @role_permissions = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
143 144 145 146 147 148 149 150 151 |
# File 'lib/models/role_definition.rb', line 143 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? super writer.write_string_value("description", @description) writer.write_string_value("displayName", @display_name) writer.write_boolean_value("isBuiltIn", @is_built_in) writer.write_collection_of_object_values("roleAssignments", @role_assignments) writer.write_collection_of_object_values("rolePermissions", @role_permissions) end |