Class: MicrosoftGraph::Me::Messages::Item::MessageItemRequestBuilder
- Inherits:
-
MicrosoftKiotaAbstractions::BaseRequestBuilder
- Object
- MicrosoftKiotaAbstractions::BaseRequestBuilder
- MicrosoftGraph::Me::Messages::Item::MessageItemRequestBuilder
- Defined in:
- lib/me/messages/item/message_item_request_builder.rb
Overview
Provides operations to manage the messages property of the microsoft.graph.user entity.
Defined Under Namespace
Classes: MessageItemRequestBuilderGetQueryParameters
Instance Method Summary collapse
-
#attachments ⇒ Object
Provides operations to manage the attachments property of the microsoft.graph.message entity.
-
#content ⇒ Object
Provides operations to manage the media for the user entity.
-
#copy ⇒ Object
Provides operations to call the copy method.
-
#create_forward ⇒ Object
Provides operations to call the createForward method.
-
#create_reply ⇒ Object
Provides operations to call the createReply method.
-
#create_reply_all ⇒ Object
Provides operations to call the createReplyAll method.
-
#delete(request_configuration = nil) ⇒ Object
Delete a message in the specified user’s mailbox, or delete a relationship of the message.
-
#extensions ⇒ Object
Provides operations to manage the extensions property of the microsoft.graph.message entity.
-
#forward ⇒ Object
Provides operations to call the forward method.
-
#get(request_configuration = nil) ⇒ Object
The messages in a mailbox or folder.
-
#initialize(path_parameters, request_adapter) ⇒ Object
constructor
Instantiates a new MessageItemRequestBuilder and sets the default values.
-
#move ⇒ Object
Provides operations to call the move method.
-
#patch(body, request_configuration = nil) ⇒ Object
Update the properties of an eventMessage object.
-
#reply ⇒ Object
Provides operations to call the reply method.
-
#reply_all ⇒ Object
Provides operations to call the replyAll method.
-
#send ⇒ Object
Provides operations to call the send method.
-
#to_delete_request_information(request_configuration = nil) ⇒ Object
Delete a message in the specified user’s mailbox, or delete a relationship of the message.
-
#to_get_request_information(request_configuration = nil) ⇒ Object
The messages in a mailbox or folder.
-
#to_patch_request_information(body, request_configuration = nil) ⇒ Object
Update the properties of an eventMessage object.
Constructor Details
#initialize(path_parameters, request_adapter) ⇒ Object
Instantiates a new MessageItemRequestBuilder and sets the default values.
95 96 97 |
# File 'lib/me/messages/item/message_item_request_builder.rb', line 95 def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/me/messages/{message%2Did}{?includeHiddenMessages*,%24select,%24expand}") end |
Instance Method Details
#attachments ⇒ Object
Provides operations to manage the attachments property of the microsoft.graph.message entity.
31 32 33 |
# File 'lib/me/messages/item/message_item_request_builder.rb', line 31 def () return MicrosoftGraph::Me::Messages::Item::Attachments::AttachmentsRequestBuilder.new(@path_parameters, @request_adapter) end |
#content ⇒ Object
Provides operations to manage the media for the user entity.
36 37 38 |
# File 'lib/me/messages/item/message_item_request_builder.rb', line 36 def content() return MicrosoftGraph::Me::Messages::Item::Value::ContentRequestBuilder.new(@path_parameters, @request_adapter) end |
#copy ⇒ Object
Provides operations to call the copy method.
41 42 43 |
# File 'lib/me/messages/item/message_item_request_builder.rb', line 41 def copy() return MicrosoftGraph::Me::Messages::Item::Copy::CopyRequestBuilder.new(@path_parameters, @request_adapter) end |
#create_forward ⇒ Object
Provides operations to call the createForward method.
46 47 48 |
# File 'lib/me/messages/item/message_item_request_builder.rb', line 46 def create_forward() return MicrosoftGraph::Me::Messages::Item::CreateForward::CreateForwardRequestBuilder.new(@path_parameters, @request_adapter) end |
#create_reply ⇒ Object
Provides operations to call the createReply method.
51 52 53 |
# File 'lib/me/messages/item/message_item_request_builder.rb', line 51 def create_reply() return MicrosoftGraph::Me::Messages::Item::CreateReply::CreateReplyRequestBuilder.new(@path_parameters, @request_adapter) end |
#create_reply_all ⇒ Object
Provides operations to call the createReplyAll method.
56 57 58 |
# File 'lib/me/messages/item/message_item_request_builder.rb', line 56 def create_reply_all() return MicrosoftGraph::Me::Messages::Item::CreateReplyAll::CreateReplyAllRequestBuilder.new(@path_parameters, @request_adapter) end |
#delete(request_configuration = nil) ⇒ Object
Delete a message in the specified user’s mailbox, or delete a relationship of the message.
103 104 105 106 107 108 109 110 111 |
# File 'lib/me/messages/item/message_item_request_builder.rb', line 103 def delete(request_configuration=nil) request_info = self.to_delete_request_information( request_configuration ) error_mapping = Hash.new error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, nil, error_mapping) end |
#extensions ⇒ Object
Provides operations to manage the extensions property of the microsoft.graph.message entity.
61 62 63 |
# File 'lib/me/messages/item/message_item_request_builder.rb', line 61 def extensions() return MicrosoftGraph::Me::Messages::Item::Extensions::ExtensionsRequestBuilder.new(@path_parameters, @request_adapter) end |
#forward ⇒ Object
Provides operations to call the forward method.
66 67 68 |
# File 'lib/me/messages/item/message_item_request_builder.rb', line 66 def forward() return MicrosoftGraph::Me::Messages::Item::Forward::ForwardRequestBuilder.new(@path_parameters, @request_adapter) end |
#get(request_configuration = nil) ⇒ Object
The messages in a mailbox or folder. Read-only. Nullable.
117 118 119 120 121 122 123 124 125 |
# File 'lib/me/messages/item/message_item_request_builder.rb', line 117 def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Message.create_from_discriminator_value(pn) }, error_mapping) end |
#move ⇒ Object
Provides operations to call the move method.
71 72 73 |
# File 'lib/me/messages/item/message_item_request_builder.rb', line 71 def move() return MicrosoftGraph::Me::Messages::Item::Move::MoveRequestBuilder.new(@path_parameters, @request_adapter) end |
#patch(body, request_configuration = nil) ⇒ Object
Update the properties of an eventMessage object.
132 133 134 135 136 137 138 139 140 141 |
# File 'lib/me/messages/item/message_item_request_builder.rb', line 132 def patch(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = self.to_patch_request_information( body, request_configuration ) error_mapping = Hash.new error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::Message.create_from_discriminator_value(pn) }, error_mapping) end |
#reply ⇒ Object
Provides operations to call the reply method.
76 77 78 |
# File 'lib/me/messages/item/message_item_request_builder.rb', line 76 def reply() return MicrosoftGraph::Me::Messages::Item::Reply::ReplyRequestBuilder.new(@path_parameters, @request_adapter) end |
#reply_all ⇒ Object
Provides operations to call the replyAll method.
81 82 83 |
# File 'lib/me/messages/item/message_item_request_builder.rb', line 81 def reply_all() return MicrosoftGraph::Me::Messages::Item::ReplyAll::ReplyAllRequestBuilder.new(@path_parameters, @request_adapter) end |
#send ⇒ Object
Provides operations to call the send method.
86 87 88 |
# File 'lib/me/messages/item/message_item_request_builder.rb', line 86 def send() return MicrosoftGraph::Me::Messages::Item::Send::SendRequestBuilder.new(@path_parameters, @request_adapter) end |
#to_delete_request_information(request_configuration = nil) ⇒ Object
Delete a message in the specified user’s mailbox, or delete a relationship of the message.
147 148 149 150 151 152 153 154 155 156 157 |
# File 'lib/me/messages/item/message_item_request_builder.rb', line 147 def to_delete_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() request_info.url_template = @url_template request_info.path_parameters = @path_parameters request_info.http_method = :DELETE unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.(request_configuration.) end return request_info end |
#to_get_request_information(request_configuration = nil) ⇒ Object
The messages in a mailbox or folder. Read-only. Nullable.
163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/me/messages/item/message_item_request_builder.rb', line 163 def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() request_info.url_template = @url_template request_info.path_parameters = @path_parameters request_info.http_method = :GET request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.(request_configuration.) end return request_info end |
#to_patch_request_information(body, request_configuration = nil) ⇒ Object
Update the properties of an eventMessage object.
182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'lib/me/messages/item/message_item_request_builder.rb', line 182 def to_patch_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() request_info.url_template = @url_template request_info.path_parameters = @path_parameters request_info.http_method = :PATCH request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.(request_configuration.) end request_info.set_content_from_parsable(@request_adapter, "application/json", body) return request_info end |