Class: MicrosoftGraph::Models::AuditResource

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/audit_resource.rb

Overview

A class containing the properties for Audit Resource.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new auditResource and sets the default values.



63
64
65
# File 'lib/models/audit_resource.rb', line 63

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 audit_resource

Raises:

  • (StandardError)


71
72
73
74
# File 'lib/models/audit_resource.rb', line 71

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



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

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



41
42
43
# File 'lib/models/audit_resource.rb', line 41

def additional_data=(value)
    @additional_data = value
end

#audit_resource_typeObject

Gets the auditResourceType property value. Audit resource’s type.

Returns:

  • a string



48
49
50
# File 'lib/models/audit_resource.rb', line 48

def audit_resource_type
    return @audit_resource_type
end

#audit_resource_type=(value) ⇒ Object

Sets the auditResourceType property value. Audit resource’s type.

Parameters:

  • value

    Value to set for the auditResourceType property.

Returns:

  • a void



56
57
58
# File 'lib/models/audit_resource.rb', line 56

def audit_resource_type=(value)
    @audit_resource_type = value
end

#display_nameObject

Gets the displayName property value. Display name.

Returns:

  • a string



79
80
81
# File 'lib/models/audit_resource.rb', line 79

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. Display name.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



87
88
89
# File 'lib/models/audit_resource.rb', line 87

def display_name=(value)
    @display_name = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



94
95
96
97
98
99
100
101
102
# File 'lib/models/audit_resource.rb', line 94

def get_field_deserializers()
    return {
        "auditResourceType" => lambda {|n| @audit_resource_type = n.get_string_value() },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "modifiedProperties" => lambda {|n| @modified_properties = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::AuditProperty.create_from_discriminator_value(pn) }) },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "resourceId" => lambda {|n| @resource_id = n.get_string_value() },
    }
end

#modified_propertiesObject

Gets the modifiedProperties property value. List of modified properties.

Returns:

  • a audit_property



107
108
109
# File 'lib/models/audit_resource.rb', line 107

def modified_properties
    return @modified_properties
end

#modified_properties=(value) ⇒ Object

Sets the modifiedProperties property value. List of modified properties.

Parameters:

  • value

    Value to set for the modifiedProperties property.

Returns:

  • a void



115
116
117
# File 'lib/models/audit_resource.rb', line 115

def modified_properties=(value)
    @modified_properties = value
end

#odata_typeObject

Gets the @odata.type property value. The OdataType property

Returns:

  • a string



122
123
124
# File 'lib/models/audit_resource.rb', line 122

def odata_type
    return @odata_type
end

#odata_type=(value) ⇒ Object

Sets the @odata.type property value. The OdataType property

Parameters:

  • value

    Value to set for the @odata.type property.

Returns:

  • a void



130
131
132
# File 'lib/models/audit_resource.rb', line 130

def odata_type=(value)
    @odata_type = value
end

#resource_idObject

Gets the resourceId property value. Audit resource’s Id.

Returns:

  • a string



137
138
139
# File 'lib/models/audit_resource.rb', line 137

def resource_id
    return @resource_id
end

#resource_id=(value) ⇒ Object

Sets the resourceId property value. Audit resource’s Id.

Parameters:

  • value

    Value to set for the resourceId property.

Returns:

  • a void



145
146
147
# File 'lib/models/audit_resource.rb', line 145

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


153
154
155
156
157
158
159
160
161
# File 'lib/models/audit_resource.rb', line 153

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_string_value("auditResourceType", @audit_resource_type)
    writer.write_string_value("displayName", @display_name)
    writer.write_collection_of_object_values("modifiedProperties", @modified_properties)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_string_value("resourceId", @resource_id)
    writer.write_additional_data(@additional_data)
end