Class: MicrosoftGraph::Models::Win32LobAppProductCodeRule

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

Overview

A complex type to store the product code and version rule data for a Win32 LOB app. This rule is not supported as a requirement rule.

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Win32LobAppRule

#additional_data, #additional_data=, #odata_type, #odata_type=, #rule_type, #rule_type=

Constructor Details

#initializeObject

Instantiates a new win32LobAppProductCodeRule and sets the default values.



24
25
26
27
# File 'lib/models/win32_lob_app_product_code_rule.rb', line 24

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

Raises:

  • (StandardError)


33
34
35
36
# File 'lib/models/win32_lob_app_product_code_rule.rb', line 33

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return Win32LobAppProductCodeRule.new
end

Instance Method Details

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



41
42
43
44
45
46
47
# File 'lib/models/win32_lob_app_product_code_rule.rb', line 41

def get_field_deserializers()
    return super.merge({
        "productCode" => lambda {|n| @product_code = n.get_string_value() },
        "productVersion" => lambda {|n| @product_version = n.get_string_value() },
        "productVersionOperator" => lambda {|n| @product_version_operator = n.get_enum_value(MicrosoftGraph::Models::Win32LobAppRuleOperator) },
    })
end

#product_codeObject

Gets the productCode property value. The product code of the app.

Returns:

  • a string



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

def product_code
    return @product_code
end

#product_code=(value) ⇒ Object

Sets the productCode property value. The product code of the app.

Parameters:

  • value

    Value to set for the productCode property.

Returns:

  • a void



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

def product_code=(value)
    @product_code = value
end

#product_versionObject

Gets the productVersion property value. The product version comparison value.

Returns:

  • a string



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

def product_version
    return @product_version
end

#product_version=(value) ⇒ Object

Sets the productVersion property value. The product version comparison value.

Parameters:

  • value

    Value to set for the productVersion property.

Returns:

  • a void



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

def product_version=(value)
    @product_version = value
end

#product_version_operatorObject

Gets the productVersionOperator property value. Contains properties for detection operator.

Returns:

  • a win32_lob_app_rule_operator



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

def product_version_operator
    return @product_version_operator
end

#product_version_operator=(value) ⇒ Object

Sets the productVersionOperator property value. Contains properties for detection operator.

Parameters:

  • value

    Value to set for the productVersionOperator property.

Returns:

  • a void



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

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


98
99
100
101
102
103
104
# File 'lib/models/win32_lob_app_product_code_rule.rb', line 98

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("productCode", @product_code)
    writer.write_string_value("productVersion", @product_version)
    writer.write_enum_value("productVersionOperator", @product_version_operator)
end