Class: MicrosoftGraph::Chats::Item::ChatItemRequestBuilder
- Inherits:
-
MicrosoftKiotaAbstractions::BaseRequestBuilder
- Object
- MicrosoftKiotaAbstractions::BaseRequestBuilder
- MicrosoftGraph::Chats::Item::ChatItemRequestBuilder
- Defined in:
- lib/chats/item/chat_item_request_builder.rb
Overview
Provides operations to manage the collection of chat entities.
Defined Under Namespace
Classes: ChatItemRequestBuilderGetQueryParameters
Instance Method Summary collapse
-
#delete(request_configuration = nil) ⇒ Object
Delete entity from chats.
-
#get(request_configuration = nil) ⇒ Object
Retrieve a single chat (without its messages).
-
#hide_for_user ⇒ Object
Provides operations to call the hideForUser method.
-
#initialize(path_parameters, request_adapter) ⇒ Object
constructor
Instantiates a new ChatItemRequestBuilder and sets the default values.
-
#installed_apps ⇒ Object
Provides operations to manage the installedApps property of the microsoft.graph.chat entity.
-
#last_message_preview ⇒ Object
Provides operations to manage the lastMessagePreview property of the microsoft.graph.chat entity.
-
#mark_chat_read_for_user ⇒ Object
Provides operations to call the markChatReadForUser method.
-
#mark_chat_unread_for_user ⇒ Object
Provides operations to call the markChatUnreadForUser method.
-
#members ⇒ Object
Provides operations to manage the members property of the microsoft.graph.chat entity.
-
#messages ⇒ Object
Provides operations to manage the messages property of the microsoft.graph.chat entity.
-
#patch(body, request_configuration = nil) ⇒ Object
Update the properties of a chat object.
-
#permission_grants ⇒ Object
Provides operations to manage the permissionGrants property of the microsoft.graph.chat entity.
-
#pinned_messages ⇒ Object
Provides operations to manage the pinnedMessages property of the microsoft.graph.chat entity.
-
#send_activity_notification ⇒ Object
Provides operations to call the sendActivityNotification method.
-
#tabs ⇒ Object
Provides operations to manage the tabs property of the microsoft.graph.chat entity.
-
#to_delete_request_information(request_configuration = nil) ⇒ Object
Delete entity from chats.
-
#to_get_request_information(request_configuration = nil) ⇒ Object
Retrieve a single chat (without its messages).
-
#to_patch_request_information(body, request_configuration = nil) ⇒ Object
Update the properties of a chat object.
-
#unhide_for_user ⇒ Object
Provides operations to call the unhideForUser method.
Constructor Details
#initialize(path_parameters, request_adapter) ⇒ Object
Instantiates a new ChatItemRequestBuilder and sets the default values.
93 94 95 |
# File 'lib/chats/item/chat_item_request_builder.rb', line 93 def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/chats/{chat%2Did}{?%24select,%24expand}") end |
Instance Method Details
#delete(request_configuration = nil) ⇒ Object
Delete entity from chats
101 102 103 104 105 106 107 108 109 |
# File 'lib/chats/item/chat_item_request_builder.rb', line 101 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
Retrieve a single chat (without its messages). This method supports federation. To access a chat, at least one chat member must belong to the tenant the request initiated from.
115 116 117 118 119 120 121 122 123 |
# File 'lib/chats/item/chat_item_request_builder.rb', line 115 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::Chat.create_from_discriminator_value(pn) }, error_mapping) end |
#hide_for_user ⇒ Object
Provides operations to call the hideForUser method.
29 30 31 |
# File 'lib/chats/item/chat_item_request_builder.rb', line 29 def hide_for_user() return MicrosoftGraph::Chats::Item::HideForUser::HideForUserRequestBuilder.new(@path_parameters, @request_adapter) end |
#installed_apps ⇒ Object
Provides operations to manage the installedApps property of the microsoft.graph.chat entity.
34 35 36 |
# File 'lib/chats/item/chat_item_request_builder.rb', line 34 def installed_apps() return MicrosoftGraph::Chats::Item::InstalledApps::InstalledAppsRequestBuilder.new(@path_parameters, @request_adapter) end |
#last_message_preview ⇒ Object
Provides operations to manage the lastMessagePreview property of the microsoft.graph.chat entity.
39 40 41 |
# File 'lib/chats/item/chat_item_request_builder.rb', line 39 def () return MicrosoftGraph::Chats::Item::LastMessagePreview::LastMessagePreviewRequestBuilder.new(@path_parameters, @request_adapter) end |
#mark_chat_read_for_user ⇒ Object
Provides operations to call the markChatReadForUser method.
44 45 46 |
# File 'lib/chats/item/chat_item_request_builder.rb', line 44 def mark_chat_read_for_user() return MicrosoftGraph::Chats::Item::MarkChatReadForUser::MarkChatReadForUserRequestBuilder.new(@path_parameters, @request_adapter) end |
#mark_chat_unread_for_user ⇒ Object
Provides operations to call the markChatUnreadForUser method.
49 50 51 |
# File 'lib/chats/item/chat_item_request_builder.rb', line 49 def mark_chat_unread_for_user() return MicrosoftGraph::Chats::Item::MarkChatUnreadForUser::MarkChatUnreadForUserRequestBuilder.new(@path_parameters, @request_adapter) end |
#members ⇒ Object
Provides operations to manage the members property of the microsoft.graph.chat entity.
54 55 56 |
# File 'lib/chats/item/chat_item_request_builder.rb', line 54 def members() return MicrosoftGraph::Chats::Item::Members::MembersRequestBuilder.new(@path_parameters, @request_adapter) end |
#messages ⇒ Object
Provides operations to manage the messages property of the microsoft.graph.chat entity.
59 60 61 |
# File 'lib/chats/item/chat_item_request_builder.rb', line 59 def () return MicrosoftGraph::Chats::Item::Messages::MessagesRequestBuilder.new(@path_parameters, @request_adapter) end |
#patch(body, request_configuration = nil) ⇒ Object
Update the properties of a chat object.
130 131 132 133 134 135 136 137 138 139 |
# File 'lib/chats/item/chat_item_request_builder.rb', line 130 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::Chat.create_from_discriminator_value(pn) }, error_mapping) end |
#permission_grants ⇒ Object
Provides operations to manage the permissionGrants property of the microsoft.graph.chat entity.
64 65 66 |
# File 'lib/chats/item/chat_item_request_builder.rb', line 64 def () return MicrosoftGraph::Chats::Item::PermissionGrants::PermissionGrantsRequestBuilder.new(@path_parameters, @request_adapter) end |
#pinned_messages ⇒ Object
Provides operations to manage the pinnedMessages property of the microsoft.graph.chat entity.
69 70 71 |
# File 'lib/chats/item/chat_item_request_builder.rb', line 69 def () return MicrosoftGraph::Chats::Item::PinnedMessages::PinnedMessagesRequestBuilder.new(@path_parameters, @request_adapter) end |
#send_activity_notification ⇒ Object
Provides operations to call the sendActivityNotification method.
74 75 76 |
# File 'lib/chats/item/chat_item_request_builder.rb', line 74 def send_activity_notification() return MicrosoftGraph::Chats::Item::SendActivityNotification::SendActivityNotificationRequestBuilder.new(@path_parameters, @request_adapter) end |
#tabs ⇒ Object
Provides operations to manage the tabs property of the microsoft.graph.chat entity.
79 80 81 |
# File 'lib/chats/item/chat_item_request_builder.rb', line 79 def tabs() return MicrosoftGraph::Chats::Item::Tabs::TabsRequestBuilder.new(@path_parameters, @request_adapter) end |
#to_delete_request_information(request_configuration = nil) ⇒ Object
Delete entity from chats
145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/chats/item/chat_item_request_builder.rb', line 145 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
Retrieve a single chat (without its messages). This method supports federation. To access a chat, at least one chat member must belong to the tenant the request initiated from.
161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/chats/item/chat_item_request_builder.rb', line 161 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 a chat object.
180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/chats/item/chat_item_request_builder.rb', line 180 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 |
#unhide_for_user ⇒ Object
Provides operations to call the unhideForUser method.
84 85 86 |
# File 'lib/chats/item/chat_item_request_builder.rb', line 84 def unhide_for_user() return MicrosoftGraph::Chats::Item::UnhideForUser::UnhideForUserRequestBuilder.new(@path_parameters, @request_adapter) end |