Class: MicrosoftGraph::DeviceAppManagement::TargetedManagedAppConfigurations::Item::TargetApps::TargetAppsPostRequestBody

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/device_app_management/targeted_managed_app_configurations/item/target_apps/target_apps_post_request_body.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new targetAppsPostRequestBody and sets the default values.



75
76
77
# File 'lib/device_app_management/targeted_managed_app_configurations/item/target_apps/target_apps_post_request_body.rb', line 75

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 target_apps_post_request_body

Raises:

  • (StandardError)


83
84
85
86
# File 'lib/device_app_management/targeted_managed_app_configurations/item/target_apps/target_apps_post_request_body.rb', line 83

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



30
31
32
# File 'lib/device_app_management/targeted_managed_app_configurations/item/target_apps/target_apps_post_request_body.rb', line 30

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



38
39
40
# File 'lib/device_app_management/targeted_managed_app_configurations/item/target_apps/target_apps_post_request_body.rb', line 38

def additional_data=(value)
    @additional_data = value
end

#app_group_typeObject

Gets the appGroupType property value. The appGroupType property

Returns:

  • a targeted_managed_app_group_type



45
46
47
# File 'lib/device_app_management/targeted_managed_app_configurations/item/target_apps/target_apps_post_request_body.rb', line 45

def app_group_type
    return @app_group_type
end

#app_group_type=(value) ⇒ Object

Sets the appGroupType property value. The appGroupType property

Parameters:

  • value

    Value to set for the appGroupType property.

Returns:

  • a void



53
54
55
# File 'lib/device_app_management/targeted_managed_app_configurations/item/target_apps/target_apps_post_request_body.rb', line 53

def app_group_type=(value)
    @app_group_type = value
end

#appsObject

Gets the apps property value. The apps property

Returns:

  • a managed_mobile_app



60
61
62
# File 'lib/device_app_management/targeted_managed_app_configurations/item/target_apps/target_apps_post_request_body.rb', line 60

def apps
    return @apps
end

#apps=(value) ⇒ Object

Sets the apps property value. The apps property

Parameters:

  • value

    Value to set for the apps property.

Returns:

  • a void



68
69
70
# File 'lib/device_app_management/targeted_managed_app_configurations/item/target_apps/target_apps_post_request_body.rb', line 68

def apps=(value)
    @apps = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



91
92
93
94
95
96
# File 'lib/device_app_management/targeted_managed_app_configurations/item/target_apps/target_apps_post_request_body.rb', line 91

def get_field_deserializers()
    return {
        "appGroupType" => lambda {|n| @app_group_type = n.get_enum_value(MicrosoftGraph::Models::TargetedManagedAppGroupType) },
        "apps" => lambda {|n| @apps = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ManagedMobileApp.create_from_discriminator_value(pn) }) },
    }
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


102
103
104
105
106
107
# File 'lib/device_app_management/targeted_managed_app_configurations/item/target_apps/target_apps_post_request_body.rb', line 102

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_enum_value("appGroupType", @app_group_type)
    writer.write_collection_of_object_values("apps", @apps)
    writer.write_additional_data(@additional_data)
end