Class: MicrosoftGraph::Models::TargetedManagedAppProtection

Inherits:
ManagedAppProtection show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/targeted_managed_app_protection.rb

Overview

Policy used to configure detailed management settings targeted to specific security groups

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ManagedAppProtection

#allowed_data_storage_locations, #allowed_data_storage_locations=, #allowed_inbound_data_transfer_sources, #allowed_inbound_data_transfer_sources=, #allowed_outbound_clipboard_sharing_level, #allowed_outbound_clipboard_sharing_level=, #allowed_outbound_data_transfer_destinations, #allowed_outbound_data_transfer_destinations=, #contact_sync_blocked, #contact_sync_blocked=, #data_backup_blocked, #data_backup_blocked=, #device_compliance_required, #device_compliance_required=, #disable_app_pin_if_device_pin_is_set, #disable_app_pin_if_device_pin_is_set=, #fingerprint_blocked, #fingerprint_blocked=, #managed_browser, #managed_browser=, #managed_browser_to_open_links_required, #managed_browser_to_open_links_required=, #maximum_pin_retries, #maximum_pin_retries=, #minimum_pin_length, #minimum_pin_length=, #minimum_required_app_version, #minimum_required_app_version=, #minimum_required_os_version, #minimum_required_os_version=, #minimum_warning_app_version, #minimum_warning_app_version=, #minimum_warning_os_version, #minimum_warning_os_version=, #organizational_credentials_required, #organizational_credentials_required=, #period_before_pin_reset, #period_before_pin_reset=, #period_offline_before_access_check, #period_offline_before_access_check=, #period_offline_before_wipe_is_enforced, #period_offline_before_wipe_is_enforced=, #period_online_before_access_check, #period_online_before_access_check=, #pin_character_set, #pin_character_set=, #pin_required, #pin_required=, #print_blocked, #print_blocked=, #save_as_blocked, #save_as_blocked=, #simple_pin_blocked, #simple_pin_blocked=

Methods inherited from ManagedAppPolicy

#created_date_time, #created_date_time=, #description, #description=, #display_name, #display_name=, #last_modified_date_time, #last_modified_date_time=, #version, #version=

Methods inherited from Entity

#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=

Constructor Details

#initializeObject

Instantiates a new targetedManagedAppProtection and sets the default values.



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

def initialize()
    super
    @odata_type = "#microsoft.graph.targetedManagedAppProtection"
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 targeted_managed_app_protection

Raises:

  • (StandardError)


45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/models/targeted_managed_app_protection.rb', line 45

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.androidManagedAppProtection"
                return AndroidManagedAppProtection.new
            when "#microsoft.graph.iosManagedAppProtection"
                return IosManagedAppProtection.new
        end
    end
    return TargetedManagedAppProtection.new
end

Instance Method Details

#assignmentsObject

Gets the assignments property value. Navigation property to list of inclusion and exclusion groups to which the policy is deployed.

Returns:

  • a targeted_managed_app_policy_assignment



21
22
23
# File 'lib/models/targeted_managed_app_protection.rb', line 21

def assignments
    return @assignments
end

#assignments=(value) ⇒ Object

Sets the assignments property value. Navigation property to list of inclusion and exclusion groups to which the policy is deployed.

Parameters:

  • value

    Value to set for the assignments property.

Returns:

  • a void



29
30
31
# File 'lib/models/targeted_managed_app_protection.rb', line 29

def assignments=(value)
    @assignments = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



63
64
65
66
67
68
# File 'lib/models/targeted_managed_app_protection.rb', line 63

def get_field_deserializers()
    return super.merge({
        "assignments" => lambda {|n| @assignments = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::TargetedManagedAppPolicyAssignment.create_from_discriminator_value(pn) }) },
        "isAssigned" => lambda {|n| @is_assigned = n.get_boolean_value() },
    })
end

#is_assignedObject

Gets the isAssigned property value. Indicates if the policy is deployed to any inclusion groups or not.

Returns:

  • a boolean



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

def is_assigned
    return @is_assigned
end

#is_assigned=(value) ⇒ Object

Sets the isAssigned property value. Indicates if the policy is deployed to any inclusion groups or not.

Parameters:

  • value

    Value to set for the isAssigned property.

Returns:

  • a void



81
82
83
# File 'lib/models/targeted_managed_app_protection.rb', line 81

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


89
90
91
92
93
94
# File 'lib/models/targeted_managed_app_protection.rb', line 89

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_collection_of_object_values("assignments", @assignments)
    writer.write_boolean_value("isAssigned", @is_assigned)
end