Class: MicrosoftGraph::Models::OnenoteOperation

Inherits:
Operation show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/onenote_operation.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Operation

#created_date_time, #created_date_time=, #last_action_date_time, #last_action_date_time=, #status, #status=

Methods inherited from Entity

#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=

Constructor Details

#initializeObject

Instantiates a new onenoteOperation and sets the default values.



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

def initialize()
    super
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 onenote_operation

Raises:

  • (StandardError)


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

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

Instance Method Details

#errorObject

Gets the error property value. The error returned by the operation.

Returns:

  • a onenote_operation_error



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

def error
    return @error
end

#error=(value) ⇒ Object

Sets the error property value. The error returned by the operation.

Parameters:

  • value

    Value to set for the error property.

Returns:

  • a void



49
50
51
# File 'lib/models/onenote_operation.rb', line 49

def error=(value)
    @error = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



56
57
58
59
60
61
62
63
# File 'lib/models/onenote_operation.rb', line 56

def get_field_deserializers()
    return super.merge({
        "error" => lambda {|n| @error = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::OnenoteOperationError.create_from_discriminator_value(pn) }) },
        "percentComplete" => lambda {|n| @percent_complete = n.get_string_value() },
        "resourceId" => lambda {|n| @resource_id = n.get_string_value() },
        "resourceLocation" => lambda {|n| @resource_location = n.get_string_value() },
    })
end

#percent_completeObject

Gets the percentComplete property value. The operation percent complete if the operation is still in running status.

Returns:

  • a string



68
69
70
# File 'lib/models/onenote_operation.rb', line 68

def percent_complete
    return @percent_complete
end

#percent_complete=(value) ⇒ Object

Sets the percentComplete property value. The operation percent complete if the operation is still in running status.

Parameters:

  • value

    Value to set for the percentComplete property.

Returns:

  • a void



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

def percent_complete=(value)
    @percent_complete = value
end

#resource_idObject

Gets the resourceId property value. The resource id.

Returns:

  • a string



83
84
85
# File 'lib/models/onenote_operation.rb', line 83

def resource_id
    return @resource_id
end

#resource_id=(value) ⇒ Object

Sets the resourceId property value. The resource id.

Parameters:

  • value

    Value to set for the resourceId property.

Returns:

  • a void



91
92
93
# File 'lib/models/onenote_operation.rb', line 91

def resource_id=(value)
    @resource_id = value
end

#resource_locationObject

Gets the resourceLocation property value. The resource URI for the object. For example, the resource URI for a copied page or section.

Returns:

  • a string



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

def resource_location
    return @resource_location
end

#resource_location=(value) ⇒ Object

Sets the resourceLocation property value. The resource URI for the object. For example, the resource URI for a copied page or section.

Parameters:

  • value

    Value to set for the resourceLocation property.

Returns:

  • a void



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

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


114
115
116
117
118
119
120
121
# File 'lib/models/onenote_operation.rb', line 114

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("error", @error)
    writer.write_string_value("percentComplete", @percent_complete)
    writer.write_string_value("resourceId", @resource_id)
    writer.write_string_value("resourceLocation", @resource_location)
end