Class: MicrosoftGraph::Models::TenantAppManagementPolicy

Inherits:
PolicyBase show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/tenant_app_management_policy.rb

Class Method Summary collapse

Instance Method Summary collapse

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

#initializeObject

Instantiates a new tenantAppManagementPolicy and sets the default values.



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

def initialize()
    super
    @odata_type = "#microsoft.graph.tenantAppManagementPolicy"
end

Class Method Details

.create_from_discriminator_value(parse_node) ⇒ Object

Creates a new instance of the appropriate class based on discriminator value

Parameters:

  • The parse node to use to read the discriminator value and create the object

Returns:

  • a tenant_app_management_policy

Raises:



46
47
48
49
# File 'lib/models/tenant_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 TenantAppManagementPolicy.new
end

Instance Method Details

#application_restrictionsObject

Gets the applicationRestrictions property value. Restrictions that apply as default to all application objects in the tenant.

Returns:

  • a app_management_configuration



22
23
24
# File 'lib/models/tenant_app_management_policy.rb', line 22

def application_restrictions
    return @application_restrictions
end

#application_restrictions=(value) ⇒ Object

Sets the applicationRestrictions property value. Restrictions that apply as default to all application objects in the tenant.

Parameters:

  • Value to set for the applicationRestrictions property.

Returns:

  • a void



30
31
32
# File 'lib/models/tenant_app_management_policy.rb', line 30

def application_restrictions=(value)
    @application_restrictions = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



54
55
56
57
58
59
60
# File 'lib/models/tenant_app_management_policy.rb', line 54

def get_field_deserializers()
    return super.merge({
        "applicationRestrictions" => lambda {|n| @application_restrictions = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::AppManagementConfiguration.create_from_discriminator_value(pn) }) },
        "isEnabled" => lambda {|n| @is_enabled = n.get_boolean_value() },
        "servicePrincipalRestrictions" => lambda {|n| @service_principal_restrictions = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::AppManagementConfiguration.create_from_discriminator_value(pn) }) },
    })
end

#is_enabledObject

Gets the isEnabled property value. Denotes whether the policy is enabled. Default value is false.

Returns:

  • a boolean



65
66
67
# File 'lib/models/tenant_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. Default value is false.

Parameters:

  • Value to set for the isEnabled property.

Returns:

  • a void



73
74
75
# File 'lib/models/tenant_app_management_policy.rb', line 73

def is_enabled=(value)
    @is_enabled = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • Serialization writer to use to serialize this model

Returns:

  • a void

Raises:



81
82
83
84
85
86
87
# File 'lib/models/tenant_app_management_policy.rb', line 81

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("applicationRestrictions", @application_restrictions)
    writer.write_boolean_value("isEnabled", @is_enabled)
    writer.write_object_value("servicePrincipalRestrictions", @service_principal_restrictions)
end

#service_principal_restrictionsObject

Gets the servicePrincipalRestrictions property value. Restrictions that apply as default to all service principal objects in the tenant.

Returns:

  • a app_management_configuration



92
93
94
# File 'lib/models/tenant_app_management_policy.rb', line 92

def service_principal_restrictions
    return @service_principal_restrictions
end

#service_principal_restrictions=(value) ⇒ Object

Sets the servicePrincipalRestrictions property value. Restrictions that apply as default to all service principal objects in the tenant.

Parameters:

  • Value to set for the servicePrincipalRestrictions property.

Returns:

  • a void



100
101
102
# File 'lib/models/tenant_app_management_policy.rb', line 100

def service_principal_restrictions=(value)
    @service_principal_restrictions = value
end