Class: MicrosoftGraph::Me::MailFolders::Item::MailFolderItemRequestBuilder
- Inherits:
-
MicrosoftKiotaAbstractions::BaseRequestBuilder
- Object
- MicrosoftKiotaAbstractions::BaseRequestBuilder
- MicrosoftGraph::Me::MailFolders::Item::MailFolderItemRequestBuilder
- Defined in:
- lib/me/mail_folders/item/mail_folder_item_request_builder.rb
Overview
Provides operations to manage the mailFolders property of the microsoft.graph.user entity.
Defined Under Namespace
Classes: MailFolderItemRequestBuilderGetQueryParameters
Instance Method Summary collapse
-
#child_folders ⇒ Object
Provides operations to manage the childFolders property of the microsoft.graph.mailFolder entity.
-
#copy ⇒ Object
Provides operations to call the copy method.
-
#delete(request_configuration = nil) ⇒ Object
Delete the specified mailFolder.
-
#get(request_configuration = nil) ⇒ Object
The user's mail folders.
-
#initialize(path_parameters, request_adapter) ⇒ Object
constructor
Instantiates a new MailFolderItemRequestBuilder and sets the default values.
-
#message_rules ⇒ Object
Provides operations to manage the messageRules property of the microsoft.graph.mailFolder entity.
-
#messages ⇒ Object
Provides operations to manage the messages property of the microsoft.graph.mailFolder entity.
-
#move ⇒ Object
Provides operations to call the move method.
-
#patch(body, request_configuration = nil) ⇒ Object
Update the writable properties of a mailSearchFolder object.
-
#to_delete_request_information(request_configuration = nil) ⇒ Object
Delete the specified mailFolder.
-
#to_get_request_information(request_configuration = nil) ⇒ Object
The user's mail folders.
-
#to_patch_request_information(body, request_configuration = nil) ⇒ Object
Update the writable properties of a mailSearchFolder object.
Constructor Details
#initialize(path_parameters, request_adapter) ⇒ Object
Instantiates a new MailFolderItemRequestBuilder and sets the default values.
53 54 55 |
# File 'lib/me/mail_folders/item/mail_folder_item_request_builder.rb', line 53 def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/me/mailFolders/{mailFolder%2Did}{?includeHiddenFolders*,%24select,%24expand}") end |
Instance Method Details
#child_folders ⇒ Object
Provides operations to manage the childFolders property of the microsoft.graph.mailFolder entity.
24 25 26 |
# File 'lib/me/mail_folders/item/mail_folder_item_request_builder.rb', line 24 def child_folders() return MicrosoftGraph::Me::MailFolders::Item::ChildFolders::ChildFoldersRequestBuilder.new(@path_parameters, @request_adapter) end |
#copy ⇒ Object
Provides operations to call the copy method.
29 30 31 |
# File 'lib/me/mail_folders/item/mail_folder_item_request_builder.rb', line 29 def copy() return MicrosoftGraph::Me::MailFolders::Item::Copy::CopyRequestBuilder.new(@path_parameters, @request_adapter) end |
#delete(request_configuration = nil) ⇒ Object
Delete the specified mailFolder. The folder can be a mailSearchFolder. You can specify a mail folder by its folder ID, or by its well-known folder name, if one exists.
61 62 63 64 65 66 67 68 69 |
# File 'lib/me/mail_folders/item/mail_folder_item_request_builder.rb', line 61 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 |
#get(request_configuration = nil) ⇒ Object
The user's mail folders. Read-only. Nullable.
75 76 77 78 79 80 81 82 83 |
# File 'lib/me/mail_folders/item/mail_folder_item_request_builder.rb', line 75 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::MailFolder.create_from_discriminator_value(pn) }, error_mapping) end |
#message_rules ⇒ Object
Provides operations to manage the messageRules property of the microsoft.graph.mailFolder entity.
34 35 36 |
# File 'lib/me/mail_folders/item/mail_folder_item_request_builder.rb', line 34 def () return MicrosoftGraph::Me::MailFolders::Item::MessageRules::MessageRulesRequestBuilder.new(@path_parameters, @request_adapter) end |
#messages ⇒ Object
Provides operations to manage the messages property of the microsoft.graph.mailFolder entity.
39 40 41 |
# File 'lib/me/mail_folders/item/mail_folder_item_request_builder.rb', line 39 def () return MicrosoftGraph::Me::MailFolders::Item::Messages::MessagesRequestBuilder.new(@path_parameters, @request_adapter) end |
#move ⇒ Object
Provides operations to call the move method.
44 45 46 |
# File 'lib/me/mail_folders/item/mail_folder_item_request_builder.rb', line 44 def move() return MicrosoftGraph::Me::MailFolders::Item::Move::MoveRequestBuilder.new(@path_parameters, @request_adapter) end |
#patch(body, request_configuration = nil) ⇒ Object
Update the writable properties of a mailSearchFolder object.
90 91 92 93 94 95 96 97 98 99 |
# File 'lib/me/mail_folders/item/mail_folder_item_request_builder.rb', line 90 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::MailFolder.create_from_discriminator_value(pn) }, error_mapping) end |
#to_delete_request_information(request_configuration = nil) ⇒ Object
Delete the specified mailFolder. The folder can be a mailSearchFolder. You can specify a mail folder by its folder ID, or by its well-known folder name, if one exists.
105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/me/mail_folders/item/mail_folder_item_request_builder.rb', line 105 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 user's mail folders. Read-only. Nullable.
121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/me/mail_folders/item/mail_folder_item_request_builder.rb', line 121 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 writable properties of a mailSearchFolder object.
140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/me/mail_folders/item/mail_folder_item_request_builder.rb', line 140 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 |