Class: MicrosoftGraph::Models::SharingDetail

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new sharingDetail and sets the default values.



50
51
52
# File 'lib/models/sharing_detail.rb', line 50

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 sharing_detail

Raises:

  • (StandardError)


58
59
60
61
# File 'lib/models/sharing_detail.rb', line 58

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



35
36
37
# File 'lib/models/sharing_detail.rb', line 35

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



43
44
45
# File 'lib/models/sharing_detail.rb', line 43

def additional_data=(value)
    @additional_data = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



66
67
68
69
70
71
72
73
74
75
# File 'lib/models/sharing_detail.rb', line 66

def get_field_deserializers()
    return {
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "sharedBy" => lambda {|n| @shared_by = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::InsightIdentity.create_from_discriminator_value(pn) }) },
        "sharedDateTime" => lambda {|n| @shared_date_time = n.get_date_time_value() },
        "sharingReference" => lambda {|n| @sharing_reference = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ResourceReference.create_from_discriminator_value(pn) }) },
        "sharingSubject" => lambda {|n| @sharing_subject = n.get_string_value() },
        "sharingType" => lambda {|n| @sharing_type = n.get_string_value() },
    }
end

#odata_typeObject

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

Returns:

  • a string



80
81
82
# File 'lib/models/sharing_detail.rb', line 80

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



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

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


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

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_object_value("sharedBy", @shared_by)
    writer.write_date_time_value("sharedDateTime", @shared_date_time)
    writer.write_string_value("sharingSubject", @sharing_subject)
    writer.write_string_value("sharingType", @sharing_type)
    writer.write_additional_data(@additional_data)
end

#shared_byObject

Gets the sharedBy property value. The user who shared the document.

Returns:

  • a insight_identity



109
110
111
# File 'lib/models/sharing_detail.rb', line 109

def shared_by
    return @shared_by
end

#shared_by=(value) ⇒ Object

Sets the sharedBy property value. The user who shared the document.

Parameters:

  • value

    Value to set for the sharedBy property.

Returns:

  • a void



117
118
119
# File 'lib/models/sharing_detail.rb', line 117

def shared_by=(value)
    @shared_by = value
end

#shared_date_timeObject

Gets the sharedDateTime property value. The date and time the file was last shared. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only.

Returns:

  • a date_time



124
125
126
# File 'lib/models/sharing_detail.rb', line 124

def shared_date_time
    return @shared_date_time
end

#shared_date_time=(value) ⇒ Object

Sets the sharedDateTime property value. The date and time the file was last shared. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only.

Parameters:

  • value

    Value to set for the sharedDateTime property.

Returns:

  • a void



132
133
134
# File 'lib/models/sharing_detail.rb', line 132

def shared_date_time=(value)
    @shared_date_time = value
end

#sharing_referenceObject

Gets the sharingReference property value. The sharingReference property

Returns:

  • a resource_reference



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

def sharing_reference
    return @sharing_reference
end

#sharing_reference=(value) ⇒ Object

Sets the sharingReference property value. The sharingReference property

Parameters:

  • value

    Value to set for the sharingReference property.

Returns:

  • a void



147
148
149
# File 'lib/models/sharing_detail.rb', line 147

def sharing_reference=(value)
    @sharing_reference = value
end

#sharing_subjectObject

Gets the sharingSubject property value. The subject with which the document was shared.

Returns:

  • a string



154
155
156
# File 'lib/models/sharing_detail.rb', line 154

def sharing_subject
    return @sharing_subject
end

#sharing_subject=(value) ⇒ Object

Sets the sharingSubject property value. The subject with which the document was shared.

Parameters:

  • value

    Value to set for the sharingSubject property.

Returns:

  • a void



162
163
164
# File 'lib/models/sharing_detail.rb', line 162

def sharing_subject=(value)
    @sharing_subject = value
end

#sharing_typeObject

Gets the sharingType property value. Determines the way the document was shared, can be by a ‘Link’, ‘Attachment’, ‘Group’, ‘Site’.

Returns:

  • a string



169
170
171
# File 'lib/models/sharing_detail.rb', line 169

def sharing_type
    return @sharing_type
end

#sharing_type=(value) ⇒ Object

Sets the sharingType property value. Determines the way the document was shared, can be by a ‘Link’, ‘Attachment’, ‘Group’, ‘Site’.

Parameters:

  • value

    Value to set for the sharingType property.

Returns:

  • a void



177
178
179
# File 'lib/models/sharing_detail.rb', line 177

def sharing_type=(value)
    @sharing_type = value
end