Class: MicrosoftGraph::Groups::Item::Team::TeamRequestBuilder

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

Overview

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

Defined Under Namespace

Classes: TeamRequestBuilderGetQueryParameters

Instance Method Summary collapse

Constructor Details

#initialize(path_parameters, request_adapter) ⇒ Object

Instantiates a new TeamRequestBuilder 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/groups/item/team/team_request_builder.rb', line 131

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

Instance Method Details

#all_channelsObject

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



37
38
39
# File 'lib/groups/item/team/team_request_builder.rb', line 37

def all_channels()
    return MicrosoftGraph::Groups::Item::Team::AllChannels::AllChannelsRequestBuilder.new(@path_parameters, @request_adapter)
end

#archiveObject

Provides operations to call the archive method.



42
43
44
# File 'lib/groups/item/team/team_request_builder.rb', line 42

def archive()
    return MicrosoftGraph::Groups::Item::Team::Archive::ArchiveRequestBuilder.new(@path_parameters, @request_adapter)
end

#channelsObject

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



47
48
49
# File 'lib/groups/item/team/team_request_builder.rb', line 47

def channels()
    return MicrosoftGraph::Groups::Item::Team::Channels::ChannelsRequestBuilder.new(@path_parameters, @request_adapter)
end

#cloneObject

Provides operations to call the clone method.



52
53
54
# File 'lib/groups/item/team/team_request_builder.rb', line 52

def clone()
    return MicrosoftGraph::Groups::Item::Team::Clone::CloneRequestBuilder.new(@path_parameters, @request_adapter)
end

#complete_migrationObject

Provides operations to call the completeMigration method.



57
58
59
# File 'lib/groups/item/team/team_request_builder.rb', line 57

def complete_migration()
    return MicrosoftGraph::Groups::Item::Team::CompleteMigration::CompleteMigrationRequestBuilder.new(@path_parameters, @request_adapter)
end

#delete(request_configuration = nil) ⇒ Object

Delete navigation property team for groups

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/groups/item/team/team_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

The team associated with this group.

Parameters:

  • request_configuration (defaults to: nil)

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

Returns:

  • a Fiber of team



153
154
155
156
157
158
159
160
161
# File 'lib/groups/item/team/team_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::Team.create_from_discriminator_value(pn) }, error_mapping)
end

#groupObject

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



62
63
64
# File 'lib/groups/item/team/team_request_builder.rb', line 62

def group()
    return MicrosoftGraph::Groups::Item::Team::Group::GroupRequestBuilder.new(@path_parameters, @request_adapter)
end

#incoming_channelsObject

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



67
68
69
# File 'lib/groups/item/team/team_request_builder.rb', line 67

def incoming_channels()
    return MicrosoftGraph::Groups::Item::Team::IncomingChannels::IncomingChannelsRequestBuilder.new(@path_parameters, @request_adapter)
end

#installed_appsObject

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



72
73
74
# File 'lib/groups/item/team/team_request_builder.rb', line 72

def installed_apps()
    return MicrosoftGraph::Groups::Item::Team::InstalledApps::InstalledAppsRequestBuilder.new(@path_parameters, @request_adapter)
end

#membersObject

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



77
78
79
# File 'lib/groups/item/team/team_request_builder.rb', line 77

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

#operationsObject

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



82
83
84
# File 'lib/groups/item/team/team_request_builder.rb', line 82

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

#permission_grantsObject

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



87
88
89
# File 'lib/groups/item/team/team_request_builder.rb', line 87

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

#photoObject

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



92
93
94
# File 'lib/groups/item/team/team_request_builder.rb', line 92

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

#primary_channelObject

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



97
98
99
# File 'lib/groups/item/team/team_request_builder.rb', line 97

def primary_channel()
    return MicrosoftGraph::Groups::Item::Team::PrimaryChannel::PrimaryChannelRequestBuilder.new(@path_parameters, @request_adapter)
end

#put(body, request_configuration = nil) ⇒ Object

Update the navigation property team in groups

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 team

Raises:

  • (StandardError)


168
169
170
171
172
173
174
175
176
177
# File 'lib/groups/item/team/team_request_builder.rb', line 168

def put(body, request_configuration=nil)
    raise StandardError, 'body cannot be null' if body.nil?
    request_info = self.to_put_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::Team.create_from_discriminator_value(pn) }, error_mapping)
end

#scheduleObject

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



102
103
104
# File 'lib/groups/item/team/team_request_builder.rb', line 102

def schedule()
    return MicrosoftGraph::Groups::Item::Team::Schedule::ScheduleRequestBuilder.new(@path_parameters, @request_adapter)
end

#send_activity_notificationObject

Provides operations to call the sendActivityNotification method.



107
108
109
# File 'lib/groups/item/team/team_request_builder.rb', line 107

def send_activity_notification()
    return MicrosoftGraph::Groups::Item::Team::SendActivityNotification::SendActivityNotificationRequestBuilder.new(@path_parameters, @request_adapter)
end

#tagsObject

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



112
113
114
# File 'lib/groups/item/team/team_request_builder.rb', line 112

def tags()
    return MicrosoftGraph::Groups::Item::Team::Tags::TagsRequestBuilder.new(@path_parameters, @request_adapter)
end

#templateObject

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



117
118
119
# File 'lib/groups/item/team/team_request_builder.rb', line 117

def template()
    return MicrosoftGraph::Groups::Item::Team::Template::TemplateRequestBuilder.new(@path_parameters, @request_adapter)
end

#to_delete_request_information(request_configuration = nil) ⇒ Object

Delete navigation property team for groups

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/groups/item/team/team_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

The team associated with this group.

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/groups/item/team/team_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_put_request_information(body, request_configuration = nil) ⇒ Object

Update the navigation property team in groups

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/groups/item/team/team_request_builder.rb', line 218

def to_put_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 = :PUT
    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

#unarchiveObject

Provides operations to call the unarchive method.



122
123
124
# File 'lib/groups/item/team/team_request_builder.rb', line 122

def unarchive()
    return MicrosoftGraph::Groups::Item::Team::Unarchive::UnarchiveRequestBuilder.new(@path_parameters, @request_adapter)
end