Class: MicrosoftGraph::Communications::Calls::Item::CallItemRequestBuilder

Inherits:
MicrosoftKiotaAbstractions::BaseRequestBuilder
  • Object
show all
Defined in:
lib/communications/calls/item/call_item_request_builder.rb

Overview

Provides operations to manage the calls property of the microsoft.graph.cloudCommunications entity.

Defined Under Namespace

Classes: CallItemRequestBuilderGetQueryParameters

Instance Method Summary collapse

Constructor Details

#initialize(path_parameters, request_adapter) ⇒ Object

Instantiates a new CallItemRequestBuilder and sets the default values.

Parameters:

  • path_parameters

    Path parameters for the request

  • request_adapter

    The request adapter to use to execute the requests.



131
132
133
# File 'lib/communications/calls/item/call_item_request_builder.rb', line 131

def initialize(path_parameters, request_adapter)
    super(path_parameters, request_adapter, "{+baseurl}/communications/calls/{call%2Did}{?%24select,%24expand}")
end

Instance Method Details

Provides operations to call the addLargeGalleryView method.



37
38
39
# File 'lib/communications/calls/item/call_item_request_builder.rb', line 37

def add_large_gallery_view()
    return MicrosoftGraph::Communications::Calls::Item::AddLargeGalleryView::AddLargeGalleryViewRequestBuilder.new(@path_parameters, @request_adapter)
end

#answerObject

Provides operations to call the answer method.



42
43
44
# File 'lib/communications/calls/item/call_item_request_builder.rb', line 42

def answer()
    return MicrosoftGraph::Communications::Calls::Item::Answer::AnswerRequestBuilder.new(@path_parameters, @request_adapter)
end

#audio_routing_groupsObject

Provides operations to manage the audioRoutingGroups property of the microsoft.graph.call entity.



47
48
49
# File 'lib/communications/calls/item/call_item_request_builder.rb', line 47

def audio_routing_groups()
    return MicrosoftGraph::Communications::Calls::Item::AudioRoutingGroups::AudioRoutingGroupsRequestBuilder.new(@path_parameters, @request_adapter)
end

#cancel_media_processingObject

Provides operations to call the cancelMediaProcessing method.



52
53
54
# File 'lib/communications/calls/item/call_item_request_builder.rb', line 52

def cancel_media_processing()
    return MicrosoftGraph::Communications::Calls::Item::CancelMediaProcessing::CancelMediaProcessingRequestBuilder.new(@path_parameters, @request_adapter)
end

#change_screen_sharing_roleObject

Provides operations to call the changeScreenSharingRole method.



57
58
59
# File 'lib/communications/calls/item/call_item_request_builder.rb', line 57

def change_screen_sharing_role()
    return MicrosoftGraph::Communications::Calls::Item::ChangeScreenSharingRole::ChangeScreenSharingRoleRequestBuilder.new(@path_parameters, @request_adapter)
end

#content_sharing_sessionsObject

Provides operations to manage the contentSharingSessions property of the microsoft.graph.call entity.



62
63
64
# File 'lib/communications/calls/item/call_item_request_builder.rb', line 62

def content_sharing_sessions()
    return MicrosoftGraph::Communications::Calls::Item::ContentSharingSessions::ContentSharingSessionsRequestBuilder.new(@path_parameters, @request_adapter)
end

#delete(request_configuration = nil) ⇒ Object

Delete or hang up an active call. For group calls, this will only delete your call leg and the underlying group call will still continue.

Parameters:

  • request_configuration (defaults to: nil)

    Configuration for the request such as headers, query parameters, and middleware options.

Returns:

  • a Fiber of void



139
140
141
142
143
144
145
146
147
# File 'lib/communications/calls/item/call_item_request_builder.rb', line 139

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 the properties and relationships of a call object.

Parameters:

  • request_configuration (defaults to: nil)

    Configuration for the request such as headers, query parameters, and middleware options.

Returns:

  • a Fiber of call



153
154
155
156
157
158
159
160
161
# File 'lib/communications/calls/item/call_item_request_builder.rb', line 153

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::Call.create_from_discriminator_value(pn) }, error_mapping)
end

#keep_aliveObject

Provides operations to call the keepAlive method.



67
68
69
# File 'lib/communications/calls/item/call_item_request_builder.rb', line 67

def keep_alive()
    return MicrosoftGraph::Communications::Calls::Item::KeepAlive::KeepAliveRequestBuilder.new(@path_parameters, @request_adapter)
end

#muteObject

Provides operations to call the mute method.



72
73
74
# File 'lib/communications/calls/item/call_item_request_builder.rb', line 72

def mute()
    return MicrosoftGraph::Communications::Calls::Item::Mute::MuteRequestBuilder.new(@path_parameters, @request_adapter)
end

#operationsObject

Provides operations to manage the operations property of the microsoft.graph.call entity.



77
78
79
# File 'lib/communications/calls/item/call_item_request_builder.rb', line 77

def operations()
    return MicrosoftGraph::Communications::Calls::Item::Operations::OperationsRequestBuilder.new(@path_parameters, @request_adapter)
end

#participantsObject

Provides operations to manage the participants property of the microsoft.graph.call entity.



82
83
84
# File 'lib/communications/calls/item/call_item_request_builder.rb', line 82

def participants()
    return MicrosoftGraph::Communications::Calls::Item::Participants::ParticipantsRequestBuilder.new(@path_parameters, @request_adapter)
end

#patch(body, request_configuration = nil) ⇒ Object

Update the navigation property calls in communications

Parameters:

  • body

    The request body

  • request_configuration (defaults to: nil)

    Configuration for the request such as headers, query parameters, and middleware options.

Returns:

  • a Fiber of call

Raises:

  • (StandardError)


168
169
170
171
172
173
174
175
176
177
# File 'lib/communications/calls/item/call_item_request_builder.rb', line 168

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::Call.create_from_discriminator_value(pn) }, error_mapping)
end

#play_promptObject

Provides operations to call the playPrompt method.



87
88
89
# File 'lib/communications/calls/item/call_item_request_builder.rb', line 87

def play_prompt()
    return MicrosoftGraph::Communications::Calls::Item::PlayPrompt::PlayPromptRequestBuilder.new(@path_parameters, @request_adapter)
end

#record_responseObject

Provides operations to call the recordResponse method.



92
93
94
# File 'lib/communications/calls/item/call_item_request_builder.rb', line 92

def record_response()
    return MicrosoftGraph::Communications::Calls::Item::RecordResponse::RecordResponseRequestBuilder.new(@path_parameters, @request_adapter)
end

#redirectObject

Provides operations to call the redirect method.



97
98
99
# File 'lib/communications/calls/item/call_item_request_builder.rb', line 97

def redirect()
    return MicrosoftGraph::Communications::Calls::Item::Redirect::RedirectRequestBuilder.new(@path_parameters, @request_adapter)
end

#rejectObject

Provides operations to call the reject method.



102
103
104
# File 'lib/communications/calls/item/call_item_request_builder.rb', line 102

def reject()
    return MicrosoftGraph::Communications::Calls::Item::Reject::RejectRequestBuilder.new(@path_parameters, @request_adapter)
end

#subscribe_to_toneObject

Provides operations to call the subscribeToTone method.



107
108
109
# File 'lib/communications/calls/item/call_item_request_builder.rb', line 107

def subscribe_to_tone()
    return MicrosoftGraph::Communications::Calls::Item::SubscribeToTone::SubscribeToToneRequestBuilder.new(@path_parameters, @request_adapter)
end

#to_delete_request_information(request_configuration = nil) ⇒ Object

Delete or hang up an active call. For group calls, this will only delete your call leg and the underlying group call will still continue.

Parameters:

  • request_configuration (defaults to: nil)

    Configuration for the request such as headers, query parameters, and middleware options.

Returns:

  • a request_information



183
184
185
186
187
188
189
190
191
192
193
# File 'lib/communications/calls/item/call_item_request_builder.rb', line 183

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.add_request_options(request_configuration.options)
    end
    return request_info
end

#to_get_request_information(request_configuration = nil) ⇒ Object

Retrieve the properties and relationships of a call object.

Parameters:

  • request_configuration (defaults to: nil)

    Configuration for the request such as headers, query parameters, and middleware options.

Returns:

  • a request_information



199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'lib/communications/calls/item/call_item_request_builder.rb', line 199

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.add_request_options(request_configuration.options)
    end
    return request_info
end

#to_patch_request_information(body, request_configuration = nil) ⇒ Object

Update the navigation property calls in communications

Parameters:

  • body

    The request body

  • request_configuration (defaults to: nil)

    Configuration for the request such as headers, query parameters, and middleware options.

Returns:

  • a request_information

Raises:

  • (StandardError)


218
219
220
221
222
223
224
225
226
227
228
229
230
231
# File 'lib/communications/calls/item/call_item_request_builder.rb', line 218

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.add_request_options(request_configuration.options)
    end
    request_info.set_content_from_parsable(@request_adapter, "application/json", body)
    return request_info
end

#transferObject

Provides operations to call the transfer method.



112
113
114
# File 'lib/communications/calls/item/call_item_request_builder.rb', line 112

def transfer()
    return MicrosoftGraph::Communications::Calls::Item::Transfer::TransferRequestBuilder.new(@path_parameters, @request_adapter)
end

#unmuteObject

Provides operations to call the unmute method.



117
118
119
# File 'lib/communications/calls/item/call_item_request_builder.rb', line 117

def unmute()
    return MicrosoftGraph::Communications::Calls::Item::Unmute::UnmuteRequestBuilder.new(@path_parameters, @request_adapter)
end

#update_recording_statusObject

Provides operations to call the updateRecordingStatus method.



122
123
124
# File 'lib/communications/calls/item/call_item_request_builder.rb', line 122

def update_recording_status()
    return MicrosoftGraph::Communications::Calls::Item::UpdateRecordingStatus::UpdateRecordingStatusRequestBuilder.new(@path_parameters, @request_adapter)
end