Class: MicrosoftGraph::Me::JoinedTeams::Item::Schedule::ScheduleRequestBuilder
- Inherits:
-
MicrosoftKiotaAbstractions::BaseRequestBuilder
- Object
- MicrosoftKiotaAbstractions::BaseRequestBuilder
- MicrosoftGraph::Me::JoinedTeams::Item::Schedule::ScheduleRequestBuilder
- Defined in:
- lib/me/joined_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 me.
-
#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 me.
-
#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 me.
-
#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 me.
Constructor Details
#initialize(path_parameters, request_adapter) ⇒ Object
Instantiates a new ScheduleRequestBuilder and sets the default values.
85 86 87 |
# File 'lib/me/joined_teams/item/schedule/schedule_request_builder.rb', line 85 def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/me/joinedTeams/{team%2Did}/schedule{?%24select,%24expand}") end |
Instance Method Details
#delete(request_configuration = nil) ⇒ Object
Delete navigation property schedule for me
93 94 95 96 97 98 99 100 101 |
# File 'lib/me/joined_teams/item/schedule/schedule_request_builder.rb', line 93 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.
107 108 109 110 111 112 113 114 115 |
# File 'lib/me/joined_teams/item/schedule/schedule_request_builder.rb', line 107 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.
31 32 33 |
# File 'lib/me/joined_teams/item/schedule/schedule_request_builder.rb', line 31 def offer_shift_requests() return MicrosoftGraph::Me::JoinedTeams::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.
36 37 38 |
# File 'lib/me/joined_teams/item/schedule/schedule_request_builder.rb', line 36 def open_shift_change_requests() return MicrosoftGraph::Me::JoinedTeams::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.
41 42 43 |
# File 'lib/me/joined_teams/item/schedule/schedule_request_builder.rb', line 41 def open_shifts() return MicrosoftGraph::Me::JoinedTeams::Item::Schedule::OpenShifts::OpenShiftsRequestBuilder.new(@path_parameters, @request_adapter) end |
#put(body, request_configuration = nil) ⇒ Object
Update the navigation property schedule in me
122 123 124 125 126 127 128 129 130 131 |
# File 'lib/me/joined_teams/item/schedule/schedule_request_builder.rb', line 122 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.
46 47 48 |
# File 'lib/me/joined_teams/item/schedule/schedule_request_builder.rb', line 46 def scheduling_groups() return MicrosoftGraph::Me::JoinedTeams::Item::Schedule::SchedulingGroups::SchedulingGroupsRequestBuilder.new(@path_parameters, @request_adapter) end |
#share ⇒ Object
Provides operations to call the share method.
51 52 53 |
# File 'lib/me/joined_teams/item/schedule/schedule_request_builder.rb', line 51 def share() return MicrosoftGraph::Me::JoinedTeams::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.
56 57 58 |
# File 'lib/me/joined_teams/item/schedule/schedule_request_builder.rb', line 56 def shifts() return MicrosoftGraph::Me::JoinedTeams::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.
61 62 63 |
# File 'lib/me/joined_teams/item/schedule/schedule_request_builder.rb', line 61 def swap_shifts_change_requests() return MicrosoftGraph::Me::JoinedTeams::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.
66 67 68 |
# File 'lib/me/joined_teams/item/schedule/schedule_request_builder.rb', line 66 def time_off_reasons() return MicrosoftGraph::Me::JoinedTeams::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.
71 72 73 |
# File 'lib/me/joined_teams/item/schedule/schedule_request_builder.rb', line 71 def time_off_requests() return MicrosoftGraph::Me::JoinedTeams::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.
76 77 78 |
# File 'lib/me/joined_teams/item/schedule/schedule_request_builder.rb', line 76 def times_off() return MicrosoftGraph::Me::JoinedTeams::Item::Schedule::TimesOff::TimesOffRequestBuilder.new(@path_parameters, @request_adapter) end |
#to_delete_request_information(request_configuration = nil) ⇒ Object
Delete navigation property schedule for me
137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/me/joined_teams/item/schedule/schedule_request_builder.rb', line 137 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.
153 154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/me/joined_teams/item/schedule/schedule_request_builder.rb', line 153 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 me
172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
# File 'lib/me/joined_teams/item/schedule/schedule_request_builder.rb', line 172 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 |