Class: MicrosoftGraph::Groups::Item::GroupItemRequestBuilder

Inherits:
MicrosoftKiotaAbstractions::BaseRequestBuilder
  • Object
show all
Defined in:
lib/groups/item/group_item_request_builder.rb

Overview

Provides operations to manage the collection of group entities.

Defined Under Namespace

Classes: GroupItemRequestBuilderGetQueryParameters

Instance Method Summary collapse

Constructor Details

#initialize(path_parameters, request_adapter) ⇒ Object

Instantiates a new GroupItemRequestBuilder and sets the default values.

Parameters:

  • path_parameters

    Path parameters for the request

  • request_adapter

    The request adapter to use to execute the requests.



267
268
269
# File 'lib/groups/item/group_item_request_builder.rb', line 267

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

Instance Method Details

#accepted_sendersObject

Provides operations to manage the acceptedSenders property of the microsoft.graph.group entity.



58
59
60
# File 'lib/groups/item/group_item_request_builder.rb', line 58

def accepted_senders()
    return MicrosoftGraph::Groups::Item::AcceptedSenders::AcceptedSendersRequestBuilder.new(@path_parameters, @request_adapter)
end

#add_favoriteObject

Provides operations to call the addFavorite method.



63
64
65
# File 'lib/groups/item/group_item_request_builder.rb', line 63

def add_favorite()
    return MicrosoftGraph::Groups::Item::AddFavorite::AddFavoriteRequestBuilder.new(@path_parameters, @request_adapter)
end

#app_role_assignmentsObject

Provides operations to manage the appRoleAssignments property of the microsoft.graph.group entity.



68
69
70
# File 'lib/groups/item/group_item_request_builder.rb', line 68

def app_role_assignments()
    return MicrosoftGraph::Groups::Item::AppRoleAssignments::AppRoleAssignmentsRequestBuilder.new(@path_parameters, @request_adapter)
end

#assign_licenseObject

Provides operations to call the assignLicense method.



73
74
75
# File 'lib/groups/item/group_item_request_builder.rb', line 73

def assign_license()
    return MicrosoftGraph::Groups::Item::AssignLicense::AssignLicenseRequestBuilder.new(@path_parameters, @request_adapter)
end

#calendarObject

Provides operations to manage the calendar property of the microsoft.graph.group entity.



78
79
80
# File 'lib/groups/item/group_item_request_builder.rb', line 78

def calendar()
    return MicrosoftGraph::Groups::Item::Calendar::CalendarRequestBuilder.new(@path_parameters, @request_adapter)
end

#calendar_viewObject

Provides operations to manage the calendarView property of the microsoft.graph.group entity.



83
84
85
# File 'lib/groups/item/group_item_request_builder.rb', line 83

def calendar_view()
    return MicrosoftGraph::Groups::Item::CalendarView::CalendarViewRequestBuilder.new(@path_parameters, @request_adapter)
end

#check_granted_permissions_for_appObject

Provides operations to call the checkGrantedPermissionsForApp method.



88
89
90
# File 'lib/groups/item/group_item_request_builder.rb', line 88

def check_granted_permissions_for_app()
    return MicrosoftGraph::Groups::Item::CheckGrantedPermissionsForApp::CheckGrantedPermissionsForAppRequestBuilder.new(@path_parameters, @request_adapter)
end

#check_member_groupsObject

Provides operations to call the checkMemberGroups method.



93
94
95
# File 'lib/groups/item/group_item_request_builder.rb', line 93

def check_member_groups()
    return MicrosoftGraph::Groups::Item::CheckMemberGroups::CheckMemberGroupsRequestBuilder.new(@path_parameters, @request_adapter)
end

#check_member_objectsObject

Provides operations to call the checkMemberObjects method.



98
99
100
# File 'lib/groups/item/group_item_request_builder.rb', line 98

def check_member_objects()
    return MicrosoftGraph::Groups::Item::CheckMemberObjects::CheckMemberObjectsRequestBuilder.new(@path_parameters, @request_adapter)
end

#conversationsObject

Provides operations to manage the conversations property of the microsoft.graph.group entity.



103
104
105
# File 'lib/groups/item/group_item_request_builder.rb', line 103

def conversations()
    return MicrosoftGraph::Groups::Item::Conversations::ConversationsRequestBuilder.new(@path_parameters, @request_adapter)
end

#created_on_behalf_ofObject

Provides operations to manage the createdOnBehalfOf property of the microsoft.graph.group entity.



108
109
110
# File 'lib/groups/item/group_item_request_builder.rb', line 108

def created_on_behalf_of()
    return MicrosoftGraph::Groups::Item::CreatedOnBehalfOf::CreatedOnBehalfOfRequestBuilder.new(@path_parameters, @request_adapter)
end

#delete(request_configuration = nil) ⇒ Object

Delete group. When deleted, Microsoft 365 groups are moved to a temporary container and can be restored within 30 days. After that time, they’re permanently deleted. This isn’t applicable to Security groups and Distribution groups which are permanently deleted immediately. To learn more, see deletedItems.

Parameters:

  • request_configuration (defaults to: nil)

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

Returns:

  • a Fiber of void



275
276
277
278
279
280
281
282
283
# File 'lib/groups/item/group_item_request_builder.rb', line 275

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

#driveObject

Provides operations to manage the drive property of the microsoft.graph.group entity.



113
114
115
# File 'lib/groups/item/group_item_request_builder.rb', line 113

def drive()
    return MicrosoftGraph::Groups::Item::Drive::DriveRequestBuilder.new(@path_parameters, @request_adapter)
end

#drivesObject

Provides operations to manage the drives property of the microsoft.graph.group entity.



118
119
120
# File 'lib/groups/item/group_item_request_builder.rb', line 118

def drives()
    return MicrosoftGraph::Groups::Item::Drives::DrivesRequestBuilder.new(@path_parameters, @request_adapter)
end

#eventsObject

Provides operations to manage the events property of the microsoft.graph.group entity.



123
124
125
# File 'lib/groups/item/group_item_request_builder.rb', line 123

def events()
    return MicrosoftGraph::Groups::Item::Events::EventsRequestBuilder.new(@path_parameters, @request_adapter)
end

#extensionsObject

Provides operations to manage the extensions property of the microsoft.graph.group entity.



128
129
130
# File 'lib/groups/item/group_item_request_builder.rb', line 128

def extensions()
    return MicrosoftGraph::Groups::Item::Extensions::ExtensionsRequestBuilder.new(@path_parameters, @request_adapter)
end

#get(request_configuration = nil) ⇒ Object

Get the properties and relationships of a group object. This operation returns by default only a subset of all the available properties, as noted in the Properties section. To get properties that are not returned by default, specify them in a $select OData query option. The hasMembersWithLicenseErrors and isArchived properties are an exception and are not returned in the $select query.

Parameters:

  • request_configuration (defaults to: nil)

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

Returns:

  • a Fiber of group



289
290
291
292
293
294
295
296
297
# File 'lib/groups/item/group_item_request_builder.rb', line 289

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

#get_member_groupsObject

Provides operations to call the getMemberGroups method.



133
134
135
# File 'lib/groups/item/group_item_request_builder.rb', line 133

def get_member_groups()
    return MicrosoftGraph::Groups::Item::GetMemberGroups::GetMemberGroupsRequestBuilder.new(@path_parameters, @request_adapter)
end

#get_member_objectsObject

Provides operations to call the getMemberObjects method.



138
139
140
# File 'lib/groups/item/group_item_request_builder.rb', line 138

def get_member_objects()
    return MicrosoftGraph::Groups::Item::GetMemberObjects::GetMemberObjectsRequestBuilder.new(@path_parameters, @request_adapter)
end

#group_lifecycle_policiesObject

Provides operations to manage the groupLifecyclePolicies property of the microsoft.graph.group entity.



143
144
145
# File 'lib/groups/item/group_item_request_builder.rb', line 143

def group_lifecycle_policies()
    return MicrosoftGraph::Groups::Item::GroupLifecyclePolicies::GroupLifecyclePoliciesRequestBuilder.new(@path_parameters, @request_adapter)
end

#member_ofObject

Provides operations to manage the memberOf property of the microsoft.graph.group entity.



148
149
150
# File 'lib/groups/item/group_item_request_builder.rb', line 148

def member_of()
    return MicrosoftGraph::Groups::Item::MemberOf::MemberOfRequestBuilder.new(@path_parameters, @request_adapter)
end

#membersObject

Provides operations to manage the members property of the microsoft.graph.group entity.



153
154
155
# File 'lib/groups/item/group_item_request_builder.rb', line 153

def members()
    return MicrosoftGraph::Groups::Item::Members::MembersRequestBuilder.new(@path_parameters, @request_adapter)
end

#members_with_license_errorsObject

Provides operations to manage the membersWithLicenseErrors property of the microsoft.graph.group entity.



158
159
160
# File 'lib/groups/item/group_item_request_builder.rb', line 158

def members_with_license_errors()
    return MicrosoftGraph::Groups::Item::MembersWithLicenseErrors::MembersWithLicenseErrorsRequestBuilder.new(@path_parameters, @request_adapter)
end

#onenoteObject

Provides operations to manage the onenote property of the microsoft.graph.group entity.



163
164
165
# File 'lib/groups/item/group_item_request_builder.rb', line 163

def onenote()
    return MicrosoftGraph::Groups::Item::Onenote::OnenoteRequestBuilder.new(@path_parameters, @request_adapter)
end

#ownersObject

Provides operations to manage the owners property of the microsoft.graph.group entity.



168
169
170
# File 'lib/groups/item/group_item_request_builder.rb', line 168

def owners()
    return MicrosoftGraph::Groups::Item::Owners::OwnersRequestBuilder.new(@path_parameters, @request_adapter)
end

#patch(body, request_configuration = nil) ⇒ Object

Update the properties of a group object.

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 group

Raises:

  • (StandardError)


304
305
306
307
308
309
310
311
312
313
# File 'lib/groups/item/group_item_request_builder.rb', line 304

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

#permission_grantsObject

Provides operations to manage the permissionGrants property of the microsoft.graph.group entity.



173
174
175
# File 'lib/groups/item/group_item_request_builder.rb', line 173

def permission_grants()
    return MicrosoftGraph::Groups::Item::PermissionGrants::PermissionGrantsRequestBuilder.new(@path_parameters, @request_adapter)
end

#photoObject

Provides operations to manage the photo property of the microsoft.graph.group entity.



178
179
180
# File 'lib/groups/item/group_item_request_builder.rb', line 178

def photo()
    return MicrosoftGraph::Groups::Item::Photo::PhotoRequestBuilder.new(@path_parameters, @request_adapter)
end

#photosObject

Provides operations to manage the photos property of the microsoft.graph.group entity.



183
184
185
# File 'lib/groups/item/group_item_request_builder.rb', line 183

def photos()
    return MicrosoftGraph::Groups::Item::Photos::PhotosRequestBuilder.new(@path_parameters, @request_adapter)
end

#plannerObject

Provides operations to manage the planner property of the microsoft.graph.group entity.



188
189
190
# File 'lib/groups/item/group_item_request_builder.rb', line 188

def planner()
    return MicrosoftGraph::Groups::Item::Planner::PlannerRequestBuilder.new(@path_parameters, @request_adapter)
end

#rejected_sendersObject

Provides operations to manage the rejectedSenders property of the microsoft.graph.group entity.



193
194
195
# File 'lib/groups/item/group_item_request_builder.rb', line 193

def rejected_senders()
    return MicrosoftGraph::Groups::Item::RejectedSenders::RejectedSendersRequestBuilder.new(@path_parameters, @request_adapter)
end

#remove_favoriteObject

Provides operations to call the removeFavorite method.



198
199
200
# File 'lib/groups/item/group_item_request_builder.rb', line 198

def remove_favorite()
    return MicrosoftGraph::Groups::Item::RemoveFavorite::RemoveFavoriteRequestBuilder.new(@path_parameters, @request_adapter)
end

#renewObject

Provides operations to call the renew method.



203
204
205
# File 'lib/groups/item/group_item_request_builder.rb', line 203

def renew()
    return MicrosoftGraph::Groups::Item::Renew::RenewRequestBuilder.new(@path_parameters, @request_adapter)
end

#reset_unseen_countObject

Provides operations to call the resetUnseenCount method.



208
209
210
# File 'lib/groups/item/group_item_request_builder.rb', line 208

def reset_unseen_count()
    return MicrosoftGraph::Groups::Item::ResetUnseenCount::ResetUnseenCountRequestBuilder.new(@path_parameters, @request_adapter)
end

#restoreObject

Provides operations to call the restore method.



213
214
215
# File 'lib/groups/item/group_item_request_builder.rb', line 213

def restore()
    return MicrosoftGraph::Groups::Item::Restore::RestoreRequestBuilder.new(@path_parameters, @request_adapter)
end

#settingsObject

Provides operations to manage the settings property of the microsoft.graph.group entity.



218
219
220
# File 'lib/groups/item/group_item_request_builder.rb', line 218

def settings()
    return MicrosoftGraph::Groups::Item::Settings::SettingsRequestBuilder.new(@path_parameters, @request_adapter)
end

#sitesObject

Provides operations to manage the sites property of the microsoft.graph.group entity.



223
224
225
# File 'lib/groups/item/group_item_request_builder.rb', line 223

def sites()
    return MicrosoftGraph::Groups::Item::Sites::SitesRequestBuilder.new(@path_parameters, @request_adapter)
end

#subscribe_by_mailObject

Provides operations to call the subscribeByMail method.



228
229
230
# File 'lib/groups/item/group_item_request_builder.rb', line 228

def subscribe_by_mail()
    return MicrosoftGraph::Groups::Item::SubscribeByMail::SubscribeByMailRequestBuilder.new(@path_parameters, @request_adapter)
end

#teamObject

Provides operations to manage the team property of the microsoft.graph.group entity.



233
234
235
# File 'lib/groups/item/group_item_request_builder.rb', line 233

def team()
    return MicrosoftGraph::Groups::Item::Team::TeamRequestBuilder.new(@path_parameters, @request_adapter)
end

#threadsObject

Provides operations to manage the threads property of the microsoft.graph.group entity.



238
239
240
# File 'lib/groups/item/group_item_request_builder.rb', line 238

def threads()
    return MicrosoftGraph::Groups::Item::Threads::ThreadsRequestBuilder.new(@path_parameters, @request_adapter)
end

#to_delete_request_information(request_configuration = nil) ⇒ Object

Delete group. When deleted, Microsoft 365 groups are moved to a temporary container and can be restored within 30 days. After that time, they’re permanently deleted. This isn’t applicable to Security groups and Distribution groups which are permanently deleted immediately. To learn more, see deletedItems.

Parameters:

  • request_configuration (defaults to: nil)

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

Returns:

  • a request_information



319
320
321
322
323
324
325
326
327
328
329
# File 'lib/groups/item/group_item_request_builder.rb', line 319

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

Get the properties and relationships of a group object. This operation returns by default only a subset of all the available properties, as noted in the Properties section. To get properties that are not returned by default, specify them in a $select OData query option. The hasMembersWithLicenseErrors and isArchived properties are an exception and are not returned in the $select query.

Parameters:

  • request_configuration (defaults to: nil)

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

Returns:

  • a request_information



335
336
337
338
339
340
341
342
343
344
345
346
347
# File 'lib/groups/item/group_item_request_builder.rb', line 335

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 properties of a group object.

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)


354
355
356
357
358
359
360
361
362
363
364
365
366
367
# File 'lib/groups/item/group_item_request_builder.rb', line 354

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

#transitive_member_ofObject

Provides operations to manage the transitiveMemberOf property of the microsoft.graph.group entity.



243
244
245
# File 'lib/groups/item/group_item_request_builder.rb', line 243

def transitive_member_of()
    return MicrosoftGraph::Groups::Item::TransitiveMemberOf::TransitiveMemberOfRequestBuilder.new(@path_parameters, @request_adapter)
end

#transitive_membersObject

Provides operations to manage the transitiveMembers property of the microsoft.graph.group entity.



248
249
250
# File 'lib/groups/item/group_item_request_builder.rb', line 248

def transitive_members()
    return MicrosoftGraph::Groups::Item::TransitiveMembers::TransitiveMembersRequestBuilder.new(@path_parameters, @request_adapter)
end

#unsubscribe_by_mailObject

Provides operations to call the unsubscribeByMail method.



253
254
255
# File 'lib/groups/item/group_item_request_builder.rb', line 253

def unsubscribe_by_mail()
    return MicrosoftGraph::Groups::Item::UnsubscribeByMail::UnsubscribeByMailRequestBuilder.new(@path_parameters, @request_adapter)
end

#validate_propertiesObject

Provides operations to call the validateProperties method.



258
259
260
# File 'lib/groups/item/group_item_request_builder.rb', line 258

def validate_properties()
    return MicrosoftGraph::Groups::Item::ValidateProperties::ValidatePropertiesRequestBuilder.new(@path_parameters, @request_adapter)
end