Class: MicrosoftGraph::Models::DefaultUserRolePermissions

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new defaultUserRolePermissions and sets the default values.



127
128
129
# File 'lib/models/default_user_role_permissions.rb', line 127

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 default_user_role_permissions

Raises:

  • (StandardError)


135
136
137
138
# File 'lib/models/default_user_role_permissions.rb', line 135

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



37
38
39
# File 'lib/models/default_user_role_permissions.rb', line 37

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



45
46
47
# File 'lib/models/default_user_role_permissions.rb', line 45

def additional_data=(value)
    @additional_data = value
end

#allowed_to_create_appsObject

Gets the allowedToCreateApps property value. Indicates whether the default user role can create applications. This setting corresponds to the Users can register applications setting in the User settings menu in the Azure portal.

Returns:

  • a boolean



52
53
54
# File 'lib/models/default_user_role_permissions.rb', line 52

def allowed_to_create_apps
    return @allowed_to_create_apps
end

#allowed_to_create_apps=(value) ⇒ Object

Sets the allowedToCreateApps property value. Indicates whether the default user role can create applications. This setting corresponds to the Users can register applications setting in the User settings menu in the Azure portal.

Parameters:

  • value

    Value to set for the allowedToCreateApps property.

Returns:

  • a void



60
61
62
# File 'lib/models/default_user_role_permissions.rb', line 60

def allowed_to_create_apps=(value)
    @allowed_to_create_apps = value
end

#allowed_to_create_security_groupsObject

Gets the allowedToCreateSecurityGroups property value. Indicates whether the default user role can create security groups. This setting corresponds to the following menus in the Azure portal: The Users can create security groups in Azure portals, API or PowerShell setting in the Group settings menu. Users can create security groups setting in the User settings menu.

Returns:

  • a boolean



67
68
69
# File 'lib/models/default_user_role_permissions.rb', line 67

def allowed_to_create_security_groups
    return @allowed_to_create_security_groups
end

#allowed_to_create_security_groups=(value) ⇒ Object

Sets the allowedToCreateSecurityGroups property value. Indicates whether the default user role can create security groups. This setting corresponds to the following menus in the Azure portal: The Users can create security groups in Azure portals, API or PowerShell setting in the Group settings menu. Users can create security groups setting in the User settings menu.

Parameters:

  • value

    Value to set for the allowedToCreateSecurityGroups property.

Returns:

  • a void



75
76
77
# File 'lib/models/default_user_role_permissions.rb', line 75

def allowed_to_create_security_groups=(value)
    @allowed_to_create_security_groups = value
end

#allowed_to_create_tenantsObject

Gets the allowedToCreateTenants property value. Indicates whether the default user role can create tenants. This setting corresponds to the Restrict non-admin users from creating tenants setting in the User settings menu in the Azure portal. When this setting is false, users assigned the Tenant Creator role can still create tenants.

Returns:

  • a boolean



82
83
84
# File 'lib/models/default_user_role_permissions.rb', line 82

def allowed_to_create_tenants
    return @allowed_to_create_tenants
end

#allowed_to_create_tenants=(value) ⇒ Object

Sets the allowedToCreateTenants property value. Indicates whether the default user role can create tenants. This setting corresponds to the Restrict non-admin users from creating tenants setting in the User settings menu in the Azure portal. When this setting is false, users assigned the Tenant Creator role can still create tenants.

Parameters:

  • value

    Value to set for the allowedToCreateTenants property.

Returns:

  • a void



90
91
92
# File 'lib/models/default_user_role_permissions.rb', line 90

def allowed_to_create_tenants=(value)
    @allowed_to_create_tenants = value
end

#allowed_to_read_bitlocker_keys_for_owned_deviceObject

Gets the allowedToReadBitlockerKeysForOwnedDevice property value. Indicates whether the registered owners of a device can read their own BitLocker recovery keys with default user role.

Returns:

  • a boolean



97
98
99
# File 'lib/models/default_user_role_permissions.rb', line 97

def allowed_to_read_bitlocker_keys_for_owned_device
    return @allowed_to_read_bitlocker_keys_for_owned_device
end

#allowed_to_read_bitlocker_keys_for_owned_device=(value) ⇒ Object

Sets the allowedToReadBitlockerKeysForOwnedDevice property value. Indicates whether the registered owners of a device can read their own BitLocker recovery keys with default user role.

Parameters:

  • value

    Value to set for the allowedToReadBitlockerKeysForOwnedDevice property.

Returns:

  • a void



105
106
107
# File 'lib/models/default_user_role_permissions.rb', line 105

def allowed_to_read_bitlocker_keys_for_owned_device=(value)
    @allowed_to_read_bitlocker_keys_for_owned_device = value
end

#allowed_to_read_other_usersObject

Gets the allowedToReadOtherUsers property value. Indicates whether the default user role can read other users. DO NOT SET THIS VALUE TO false.

Returns:

  • a boolean



112
113
114
# File 'lib/models/default_user_role_permissions.rb', line 112

def allowed_to_read_other_users
    return @allowed_to_read_other_users
end

#allowed_to_read_other_users=(value) ⇒ Object

Sets the allowedToReadOtherUsers property value. Indicates whether the default user role can read other users. DO NOT SET THIS VALUE TO false.

Parameters:

  • value

    Value to set for the allowedToReadOtherUsers property.

Returns:

  • a void



120
121
122
# File 'lib/models/default_user_role_permissions.rb', line 120

def allowed_to_read_other_users=(value)
    @allowed_to_read_other_users = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



143
144
145
146
147
148
149
150
151
152
153
# File 'lib/models/default_user_role_permissions.rb', line 143

def get_field_deserializers()
    return {
        "allowedToCreateApps" => lambda {|n| @allowed_to_create_apps = n.get_boolean_value() },
        "allowedToCreateSecurityGroups" => lambda {|n| @allowed_to_create_security_groups = n.get_boolean_value() },
        "allowedToCreateTenants" => lambda {|n| @allowed_to_create_tenants = n.get_boolean_value() },
        "allowedToReadBitlockerKeysForOwnedDevice" => lambda {|n| @allowed_to_read_bitlocker_keys_for_owned_device = n.get_boolean_value() },
        "allowedToReadOtherUsers" => lambda {|n| @allowed_to_read_other_users = n.get_boolean_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "permissionGrantPoliciesAssigned" => lambda {|n| @permission_grant_policies_assigned = n.get_collection_of_primitive_values(String) },
    }
end

#odata_typeObject

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

Returns:

  • a string



158
159
160
# File 'lib/models/default_user_role_permissions.rb', line 158

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



166
167
168
# File 'lib/models/default_user_role_permissions.rb', line 166

def odata_type=(value)
    @odata_type = value
end

#permission_grant_policies_assignedObject

Gets the permissionGrantPoliciesAssigned property value. Indicates if user consent to apps is allowed, and if it is, which permission to grant consent and which app consent policy (permissionGrantPolicy) govern the permission for users to grant consent. Value should be in the format managePermissionGrantsForSelf.id, where id is the id of a built-in or custom app consent policy. An empty list indicates user consent to apps is disabled.

Returns:

  • a string



173
174
175
# File 'lib/models/default_user_role_permissions.rb', line 173

def permission_grant_policies_assigned
    return @permission_grant_policies_assigned
end

#permission_grant_policies_assigned=(value) ⇒ Object

Sets the permissionGrantPoliciesAssigned property value. Indicates if user consent to apps is allowed, and if it is, which permission to grant consent and which app consent policy (permissionGrantPolicy) govern the permission for users to grant consent. Value should be in the format managePermissionGrantsForSelf.id, where id is the id of a built-in or custom app consent policy. An empty list indicates user consent to apps is disabled.

Parameters:

  • value

    Value to set for the permissionGrantPoliciesAssigned property.

Returns:

  • a void



181
182
183
# File 'lib/models/default_user_role_permissions.rb', line 181

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


189
190
191
192
193
194
195
196
197
198
199
# File 'lib/models/default_user_role_permissions.rb', line 189

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_boolean_value("allowedToCreateApps", @allowed_to_create_apps)
    writer.write_boolean_value("allowedToCreateSecurityGroups", @allowed_to_create_security_groups)
    writer.write_boolean_value("allowedToCreateTenants", @allowed_to_create_tenants)
    writer.write_boolean_value("allowedToReadBitlockerKeysForOwnedDevice", @allowed_to_read_bitlocker_keys_for_owned_device)
    writer.write_boolean_value("allowedToReadOtherUsers", @allowed_to_read_other_users)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_collection_of_primitive_values("permissionGrantPoliciesAssigned", @permission_grant_policies_assigned)
    writer.write_additional_data(@additional_data)
end