Class: MicrosoftGraph::Models::ManagedAppPolicy

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/managed_app_policy.rb

Overview

The ManagedAppPolicy resource represents a base type for platform specific policies.

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

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

Constructor Details

#initializeObject

Instantiates a new managedAppPolicy and sets the default values.



31
32
33
# File 'lib/models/managed_app_policy.rb', line 31

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

Parameters:

  • parse_node

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

Returns:

  • a managed_app_policy

Raises:

  • (StandardError)


54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/models/managed_app_policy.rb', line 54

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.defaultManagedAppProtection"
                return DefaultManagedAppProtection.new
            when "#microsoft.graph.iosManagedAppProtection"
                return IosManagedAppProtection.new
            when "#microsoft.graph.managedAppConfiguration"
                return ManagedAppConfiguration.new
            when "#microsoft.graph.managedAppProtection"
                return ManagedAppProtection.new
            when "#microsoft.graph.mdmWindowsInformationProtectionPolicy"
                return MdmWindowsInformationProtectionPolicy.new
            when "#microsoft.graph.targetedManagedAppConfiguration"
                return TargetedManagedAppConfiguration.new
            when "#microsoft.graph.targetedManagedAppProtection"
                return TargetedManagedAppProtection.new
            when "#microsoft.graph.windowsInformationProtection"
                return WindowsInformationProtection.new
            when "#microsoft.graph.windowsInformationProtectionPolicy"
                return WindowsInformationProtectionPolicy.new
        end
    end
    return ManagedAppPolicy.new
end

Instance Method Details

#created_date_timeObject

Gets the createdDateTime property value. The date and time the policy was created.

Returns:

  • a date_time



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

def created_date_time
    return @created_date_time
end

#created_date_time=(value) ⇒ Object

Sets the createdDateTime property value. The date and time the policy was created.

Parameters:

  • value

    Value to set for the createdDateTime property.

Returns:

  • a void



46
47
48
# File 'lib/models/managed_app_policy.rb', line 46

def created_date_time=(value)
    @created_date_time = value
end

#descriptionObject

Gets the description property value. The policy’s description.

Returns:

  • a string



88
89
90
# File 'lib/models/managed_app_policy.rb', line 88

def description
    return @description
end

#description=(value) ⇒ Object

Sets the description property value. The policy’s description.

Parameters:

  • value

    Value to set for the description property.

Returns:

  • a void



96
97
98
# File 'lib/models/managed_app_policy.rb', line 96

def description=(value)
    @description = value
end

#display_nameObject

Gets the displayName property value. Policy display name.

Returns:

  • a string



103
104
105
# File 'lib/models/managed_app_policy.rb', line 103

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. Policy display name.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



111
112
113
# File 'lib/models/managed_app_policy.rb', line 111

def display_name=(value)
    @display_name = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



118
119
120
121
122
123
124
125
126
# File 'lib/models/managed_app_policy.rb', line 118

def get_field_deserializers()
    return super.merge({
        "createdDateTime" => lambda {|n| @created_date_time = n.get_date_time_value() },
        "description" => lambda {|n| @description = n.get_string_value() },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "lastModifiedDateTime" => lambda {|n| @last_modified_date_time = n.get_date_time_value() },
        "version" => lambda {|n| @version = n.get_string_value() },
    })
end

#last_modified_date_timeObject

Gets the lastModifiedDateTime property value. Last time the policy was modified.

Returns:

  • a date_time



131
132
133
# File 'lib/models/managed_app_policy.rb', line 131

def last_modified_date_time
    return @last_modified_date_time
end

#last_modified_date_time=(value) ⇒ Object

Sets the lastModifiedDateTime property value. Last time the policy was modified.

Parameters:

  • value

    Value to set for the lastModifiedDateTime property.

Returns:

  • a void



139
140
141
# File 'lib/models/managed_app_policy.rb', line 139

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


147
148
149
150
151
152
153
154
155
# File 'lib/models/managed_app_policy.rb', line 147

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_date_time_value("createdDateTime", @created_date_time)
    writer.write_string_value("description", @description)
    writer.write_string_value("displayName", @display_name)
    writer.write_date_time_value("lastModifiedDateTime", @last_modified_date_time)
    writer.write_string_value("version", @version)
end

#versionObject

Gets the version property value. Version of the entity.

Returns:

  • a string



160
161
162
# File 'lib/models/managed_app_policy.rb', line 160

def version
    return @version
end

#version=(value) ⇒ Object

Sets the version property value. Version of the entity.

Parameters:

  • value

    Value to set for the version property.

Returns:

  • a void



168
169
170
# File 'lib/models/managed_app_policy.rb', line 168

def version=(value)
    @version = value
end