Class: MicrosoftGraph::Teams::Item::TeamItemRequestBuilder

Inherits:
MicrosoftKiotaAbstractions::BaseRequestBuilder
  • Object
show all
Defined in:
lib/teams/item/team_item_request_builder.rb

Overview

Provides operations to manage the collection of team entities.

Defined Under Namespace

Classes: TeamItemRequestBuilderGetQueryParameters

Instance Method Summary collapse

Constructor Details

#initialize(path_parameters, request_adapter) ⇒ Object

Instantiates a new TeamItemRequestBuilder and sets the default values.

Parameters:

  • path_parameters

    Path parameters for the request

  • request_adapter

    The request adapter to use to execute the requests.



129
130
131
# File 'lib/teams/item/team_item_request_builder.rb', line 129

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

Instance Method Details

#all_channelsObject

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



35
36
37
# File 'lib/teams/item/team_item_request_builder.rb', line 35

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

#archiveObject

Provides operations to call the archive method.



40
41
42
# File 'lib/teams/item/team_item_request_builder.rb', line 40

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

#channelsObject

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



45
46
47
# File 'lib/teams/item/team_item_request_builder.rb', line 45

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

#cloneObject

Provides operations to call the clone method.



50
51
52
# File 'lib/teams/item/team_item_request_builder.rb', line 50

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

#complete_migrationObject

Provides operations to call the completeMigration method.



55
56
57
# File 'lib/teams/item/team_item_request_builder.rb', line 55

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

#delete(request_configuration = nil) ⇒ Object

Delete entity from teams

Parameters:

  • request_configuration (defaults to: nil)

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

Returns:

  • a Fiber of void



137
138
139
140
141
142
143
144
145
# File 'lib/teams/item/team_item_request_builder.rb', line 137

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 the specified team.

Parameters:

  • request_configuration (defaults to: nil)

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

Returns:

  • a Fiber of team



151
152
153
154
155
156
157
158
159
# File 'lib/teams/item/team_item_request_builder.rb', line 151

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.



60
61
62
# File 'lib/teams/item/team_item_request_builder.rb', line 60

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

#incoming_channelsObject

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



65
66
67
# File 'lib/teams/item/team_item_request_builder.rb', line 65

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

#installed_appsObject

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



70
71
72
# File 'lib/teams/item/team_item_request_builder.rb', line 70

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

#membersObject

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



75
76
77
# File 'lib/teams/item/team_item_request_builder.rb', line 75

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

#operationsObject

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



80
81
82
# File 'lib/teams/item/team_item_request_builder.rb', line 80

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

#patch(body, request_configuration = nil) ⇒ Object

Update the properties of the specified team.

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)


166
167
168
169
170
171
172
173
174
175
# File 'lib/teams/item/team_item_request_builder.rb', line 166

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

#permission_grantsObject

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



85
86
87
# File 'lib/teams/item/team_item_request_builder.rb', line 85

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

#photoObject

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



90
91
92
# File 'lib/teams/item/team_item_request_builder.rb', line 90

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

#primary_channelObject

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



95
96
97
# File 'lib/teams/item/team_item_request_builder.rb', line 95

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

#scheduleObject

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



100
101
102
# File 'lib/teams/item/team_item_request_builder.rb', line 100

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

#send_activity_notificationObject

Provides operations to call the sendActivityNotification method.



105
106
107
# File 'lib/teams/item/team_item_request_builder.rb', line 105

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

#tagsObject

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



110
111
112
# File 'lib/teams/item/team_item_request_builder.rb', line 110

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

#templateObject

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



115
116
117
# File 'lib/teams/item/team_item_request_builder.rb', line 115

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

#to_delete_request_information(request_configuration = nil) ⇒ Object

Delete entity from teams

Parameters:

  • request_configuration (defaults to: nil)

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

Returns:

  • a request_information



181
182
183
184
185
186
187
188
189
190
191
# File 'lib/teams/item/team_item_request_builder.rb', line 181

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 the specified team.

Parameters:

  • request_configuration (defaults to: nil)

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

Returns:

  • a request_information



197
198
199
200
201
202
203
204
205
206
207
208
209
# File 'lib/teams/item/team_item_request_builder.rb', line 197

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 the specified team.

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)


216
217
218
219
220
221
222
223
224
225
226
227
228
229
# File 'lib/teams/item/team_item_request_builder.rb', line 216

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

#unarchiveObject

Provides operations to call the unarchive method.



120
121
122
# File 'lib/teams/item/team_item_request_builder.rb', line 120

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