Class: MicrosoftGraph::Models::SharingLink

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new sharingLink and sets the default values.



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

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_link

Raises:

  • (StandardError)


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

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



37
38
39
# File 'lib/models/sharing_link.rb', line 37

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



45
46
47
# File 'lib/models/sharing_link.rb', line 45

def additional_data=(value)
    @additional_data = value
end

#applicationObject

Gets the application property value. The app the link is associated with.

Returns:

  • a identity



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

def application
    return @application
end

#application=(value) ⇒ Object

Sets the application property value. The app the link is associated with.

Parameters:

  • value

    Value to set for the application property.

Returns:

  • a void



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

def application=(value)
    @application = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



83
84
85
86
87
88
89
90
91
92
93
# File 'lib/models/sharing_link.rb', line 83

def get_field_deserializers()
    return {
        "application" => lambda {|n| @application = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Identity.create_from_discriminator_value(pn) }) },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "preventsDownload" => lambda {|n| @prevents_download = n.get_boolean_value() },
        "scope" => lambda {|n| @scope = n.get_string_value() },
        "type" => lambda {|n| @type = n.get_string_value() },
        "webHtml" => lambda {|n| @web_html = n.get_string_value() },
        "webUrl" => lambda {|n| @web_url = n.get_string_value() },
    }
end

#odata_typeObject

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

Returns:

  • a string



98
99
100
# File 'lib/models/sharing_link.rb', line 98

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



106
107
108
# File 'lib/models/sharing_link.rb', line 106

def odata_type=(value)
    @odata_type = value
end

#prevents_downloadObject

Gets the preventsDownload property value. If true then the user can only use this link to view the item on the web, and cannot use it to download the contents of the item. Only for OneDrive for Business and SharePoint.

Returns:

  • a boolean



113
114
115
# File 'lib/models/sharing_link.rb', line 113

def prevents_download
    return @prevents_download
end

#prevents_download=(value) ⇒ Object

Sets the preventsDownload property value. If true then the user can only use this link to view the item on the web, and cannot use it to download the contents of the item. Only for OneDrive for Business and SharePoint.

Parameters:

  • value

    Value to set for the preventsDownload property.

Returns:

  • a void



121
122
123
# File 'lib/models/sharing_link.rb', line 121

def prevents_download=(value)
    @prevents_download = value
end

#scopeObject

Gets the scope property value. The scope of the link represented by this permission. Value anonymous indicates the link is usable by anyone, organization indicates the link is only usable for users signed into the same tenant.

Returns:

  • a string



128
129
130
# File 'lib/models/sharing_link.rb', line 128

def scope
    return @scope
end

#scope=(value) ⇒ Object

Sets the scope property value. The scope of the link represented by this permission. Value anonymous indicates the link is usable by anyone, organization indicates the link is only usable for users signed into the same tenant.

Parameters:

  • value

    Value to set for the scope property.

Returns:

  • a void



136
137
138
# File 'lib/models/sharing_link.rb', line 136

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


144
145
146
147
148
149
150
151
152
153
154
# File 'lib/models/sharing_link.rb', line 144

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_object_value("application", @application)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_boolean_value("preventsDownload", @prevents_download)
    writer.write_string_value("scope", @scope)
    writer.write_string_value("type", @type)
    writer.write_string_value("webHtml", @web_html)
    writer.write_string_value("webUrl", @web_url)
    writer.write_additional_data(@additional_data)
end

#typeObject

Gets the type property value. The type of the link created.

Returns:

  • a string



159
160
161
# File 'lib/models/sharing_link.rb', line 159

def type
    return @type
end

#type=(value) ⇒ Object

Sets the type property value. The type of the link created.

Parameters:

  • value

    Value to set for the type property.

Returns:

  • a void



167
168
169
# File 'lib/models/sharing_link.rb', line 167

def type=(value)
    @type = value
end

#web_htmlObject

Gets the webHtml property value. For embed links, this property contains the HTML code for an <iframe> element that will embed the item in a webpage.

Returns:

  • a string



174
175
176
# File 'lib/models/sharing_link.rb', line 174

def web_html
    return @web_html
end

#web_html=(value) ⇒ Object

Sets the webHtml property value. For embed links, this property contains the HTML code for an <iframe> element that will embed the item in a webpage.

Parameters:

  • value

    Value to set for the webHtml property.

Returns:

  • a void



182
183
184
# File 'lib/models/sharing_link.rb', line 182

def web_html=(value)
    @web_html = value
end

#web_urlObject

Gets the webUrl property value. A URL that opens the item in the browser on the OneDrive website.

Returns:

  • a string



189
190
191
# File 'lib/models/sharing_link.rb', line 189

def web_url
    return @web_url
end

#web_url=(value) ⇒ Object

Sets the webUrl property value. A URL that opens the item in the browser on the OneDrive website.

Parameters:

  • value

    Value to set for the webUrl property.

Returns:

  • a void



197
198
199
# File 'lib/models/sharing_link.rb', line 197

def web_url=(value)
    @web_url = value
end