Class: MicrosoftGraph::Teams::Item::Schedule::ScheduleRequestBuilder
- Inherits:
-
MicrosoftKiotaAbstractions::BaseRequestBuilder
- Object
- MicrosoftKiotaAbstractions::BaseRequestBuilder
- MicrosoftGraph::Teams::Item::Schedule::ScheduleRequestBuilder
- Defined in:
- lib/teams/item/schedule/schedule_request_builder.rb
Overview
Provides operations to manage the schedule property of the microsoft.graph.team entity.
Defined Under Namespace
Classes: ScheduleRequestBuilderGetQueryParameters
Instance Method Summary collapse
-
#delete(request_configuration = nil) ⇒ Object
Delete navigation property schedule for teams.
-
#get(request_configuration = nil) ⇒ Object
Retrieve the properties and relationships of a schedule object.
-
#initialize(path_parameters, request_adapter) ⇒ Object
constructor
Instantiates a new ScheduleRequestBuilder and sets the default values.
-
#offer_shift_requests ⇒ Object
Provides operations to manage the offerShiftRequests property of the microsoft.graph.schedule entity.
-
#open_shift_change_requests ⇒ Object
Provides operations to manage the openShiftChangeRequests property of the microsoft.graph.schedule entity.
-
#open_shifts ⇒ Object
Provides operations to manage the openShifts property of the microsoft.graph.schedule entity.
-
#put(body, request_configuration = nil) ⇒ Object
Update the navigation property schedule in teams.
-
#scheduling_groups ⇒ Object
Provides operations to manage the schedulingGroups property of the microsoft.graph.schedule entity.
-
#share ⇒ Object
Provides operations to call the share method.
-
#shifts ⇒ Object
Provides operations to manage the shifts property of the microsoft.graph.schedule entity.
-
#swap_shifts_change_requests ⇒ Object
Provides operations to manage the swapShiftsChangeRequests property of the microsoft.graph.schedule entity.
-
#time_off_reasons ⇒ Object
Provides operations to manage the timeOffReasons property of the microsoft.graph.schedule entity.
-
#time_off_requests ⇒ Object
Provides operations to manage the timeOffRequests property of the microsoft.graph.schedule entity.
-
#times_off ⇒ Object
Provides operations to manage the timesOff property of the microsoft.graph.schedule entity.
-
#to_delete_request_information(request_configuration = nil) ⇒ Object
Delete navigation property schedule for teams.
-
#to_get_request_information(request_configuration = nil) ⇒ Object
Retrieve the properties and relationships of a schedule object.
-
#to_put_request_information(body, request_configuration = nil) ⇒ Object
Update the navigation property schedule in teams.
Constructor Details
#initialize(path_parameters, request_adapter) ⇒ Object
Instantiates a new ScheduleRequestBuilder and sets the default values.
83 84 85 |
# File 'lib/teams/item/schedule/schedule_request_builder.rb', line 83 def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/teams/{team%2Did}/schedule{?%24select,%24expand}") end |
Instance Method Details
#delete(request_configuration = nil) ⇒ Object
Delete navigation property schedule for teams
91 92 93 94 95 96 97 98 99 |
# File 'lib/teams/item/schedule/schedule_request_builder.rb', line 91 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 schedule object. The schedule creation process conforms to the One API guideline for resource based long running operations (RELO).When clients use the PUT method, if the schedule is provisioned, the operation updates the schedule; otherwise, the operation starts the schedule provisioning process in the background. During schedule provisioning, clients can use the GET method to get the schedule and look at the provisionStatus property for the current state of the provisioning. If the provisioning failed, clients can get additional information from the provisionStatusCode property. Clients can also inspect the configuration of the schedule.
105 106 107 108 109 110 111 112 113 |
# File 'lib/teams/item/schedule/schedule_request_builder.rb', line 105 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::Schedule.create_from_discriminator_value(pn) }, error_mapping) end |
#offer_shift_requests ⇒ Object
Provides operations to manage the offerShiftRequests property of the microsoft.graph.schedule entity.
29 30 31 |
# File 'lib/teams/item/schedule/schedule_request_builder.rb', line 29 def offer_shift_requests() return MicrosoftGraph::Teams::Item::Schedule::OfferShiftRequests::OfferShiftRequestsRequestBuilder.new(@path_parameters, @request_adapter) end |
#open_shift_change_requests ⇒ Object
Provides operations to manage the openShiftChangeRequests property of the microsoft.graph.schedule entity.
34 35 36 |
# File 'lib/teams/item/schedule/schedule_request_builder.rb', line 34 def open_shift_change_requests() return MicrosoftGraph::Teams::Item::Schedule::OpenShiftChangeRequests::OpenShiftChangeRequestsRequestBuilder.new(@path_parameters, @request_adapter) end |
#open_shifts ⇒ Object
Provides operations to manage the openShifts property of the microsoft.graph.schedule entity.
39 40 41 |
# File 'lib/teams/item/schedule/schedule_request_builder.rb', line 39 def open_shifts() return MicrosoftGraph::Teams::Item::Schedule::OpenShifts::OpenShiftsRequestBuilder.new(@path_parameters, @request_adapter) end |
#put(body, request_configuration = nil) ⇒ Object
Update the navigation property schedule in teams
120 121 122 123 124 125 126 127 128 129 |
# File 'lib/teams/item/schedule/schedule_request_builder.rb', line 120 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::Schedule.create_from_discriminator_value(pn) }, error_mapping) end |
#scheduling_groups ⇒ Object
Provides operations to manage the schedulingGroups property of the microsoft.graph.schedule entity.
44 45 46 |
# File 'lib/teams/item/schedule/schedule_request_builder.rb', line 44 def scheduling_groups() return MicrosoftGraph::Teams::Item::Schedule::SchedulingGroups::SchedulingGroupsRequestBuilder.new(@path_parameters, @request_adapter) end |
#share ⇒ Object
Provides operations to call the share method.
49 50 51 |
# File 'lib/teams/item/schedule/schedule_request_builder.rb', line 49 def share() return MicrosoftGraph::Teams::Item::Schedule::Share::ShareRequestBuilder.new(@path_parameters, @request_adapter) end |
#shifts ⇒ Object
Provides operations to manage the shifts property of the microsoft.graph.schedule entity.
54 55 56 |
# File 'lib/teams/item/schedule/schedule_request_builder.rb', line 54 def shifts() return MicrosoftGraph::Teams::Item::Schedule::Shifts::ShiftsRequestBuilder.new(@path_parameters, @request_adapter) end |
#swap_shifts_change_requests ⇒ Object
Provides operations to manage the swapShiftsChangeRequests property of the microsoft.graph.schedule entity.
59 60 61 |
# File 'lib/teams/item/schedule/schedule_request_builder.rb', line 59 def swap_shifts_change_requests() return MicrosoftGraph::Teams::Item::Schedule::SwapShiftsChangeRequests::SwapShiftsChangeRequestsRequestBuilder.new(@path_parameters, @request_adapter) end |
#time_off_reasons ⇒ Object
Provides operations to manage the timeOffReasons property of the microsoft.graph.schedule entity.
64 65 66 |
# File 'lib/teams/item/schedule/schedule_request_builder.rb', line 64 def time_off_reasons() return MicrosoftGraph::Teams::Item::Schedule::TimeOffReasons::TimeOffReasonsRequestBuilder.new(@path_parameters, @request_adapter) end |
#time_off_requests ⇒ Object
Provides operations to manage the timeOffRequests property of the microsoft.graph.schedule entity.
69 70 71 |
# File 'lib/teams/item/schedule/schedule_request_builder.rb', line 69 def time_off_requests() return MicrosoftGraph::Teams::Item::Schedule::TimeOffRequests::TimeOffRequestsRequestBuilder.new(@path_parameters, @request_adapter) end |
#times_off ⇒ Object
Provides operations to manage the timesOff property of the microsoft.graph.schedule entity.
74 75 76 |
# File 'lib/teams/item/schedule/schedule_request_builder.rb', line 74 def times_off() return MicrosoftGraph::Teams::Item::Schedule::TimesOff::TimesOffRequestBuilder.new(@path_parameters, @request_adapter) end |
#to_delete_request_information(request_configuration = nil) ⇒ Object
Delete navigation property schedule for teams
135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/teams/item/schedule/schedule_request_builder.rb', line 135 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 the properties and relationships of a schedule object. The schedule creation process conforms to the One API guideline for resource based long running operations (RELO).When clients use the PUT method, if the schedule is provisioned, the operation updates the schedule; otherwise, the operation starts the schedule provisioning process in the background. During schedule provisioning, clients can use the GET method to get the schedule and look at the provisionStatus property for the current state of the provisioning. If the provisioning failed, clients can get additional information from the provisionStatusCode property. Clients can also inspect the configuration of the schedule.
151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/teams/item/schedule/schedule_request_builder.rb', line 151 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_put_request_information(body, request_configuration = nil) ⇒ Object
Update the navigation property schedule in teams
170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/teams/item/schedule/schedule_request_builder.rb', line 170 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.(request_configuration.) end request_info.set_content_from_parsable(@request_adapter, "application/json", body) return request_info end |