Class: MicrosoftGraph::Education::Classes::Item::EducationClassItemRequestBuilder
- Inherits:
-
MicrosoftKiotaAbstractions::BaseRequestBuilder
- Object
- MicrosoftKiotaAbstractions::BaseRequestBuilder
- MicrosoftGraph::Education::Classes::Item::EducationClassItemRequestBuilder
- Defined in:
- lib/education/classes/item/education_class_item_request_builder.rb
Overview
Provides operations to manage the classes property of the microsoft.graph.educationRoot entity.
Defined Under Namespace
Classes: EducationClassItemRequestBuilderGetQueryParameters
Instance Method Summary collapse
-
#assignment_categories ⇒ Object
Provides operations to manage the assignmentCategories property of the microsoft.graph.educationClass entity.
-
#assignment_defaults ⇒ Object
Provides operations to manage the assignmentDefaults property of the microsoft.graph.educationClass entity.
-
#assignment_settings ⇒ Object
Provides operations to manage the assignmentSettings property of the microsoft.graph.educationClass entity.
-
#assignments ⇒ Object
Provides operations to manage the assignments property of the microsoft.graph.educationClass entity.
-
#delete(request_configuration = nil) ⇒ Object
Delete an educationClass.
-
#get(request_configuration = nil) ⇒ Object
Retrieve a class from the system.
-
#group ⇒ Object
Provides operations to manage the group property of the microsoft.graph.educationClass entity.
-
#initialize(path_parameters, request_adapter) ⇒ Object
constructor
Instantiates a new EducationClassItemRequestBuilder and sets the default values.
-
#members ⇒ Object
Provides operations to manage the members property of the microsoft.graph.educationClass entity.
-
#patch(body, request_configuration = nil) ⇒ Object
Update the properties of an educationClass object.
-
#schools ⇒ Object
Provides operations to manage the schools property of the microsoft.graph.educationClass entity.
-
#teachers ⇒ Object
Provides operations to manage the teachers property of the microsoft.graph.educationClass entity.
-
#to_delete_request_information(request_configuration = nil) ⇒ Object
Delete an educationClass.
-
#to_get_request_information(request_configuration = nil) ⇒ Object
Retrieve a class from the system.
-
#to_patch_request_information(body, request_configuration = nil) ⇒ Object
Update the properties of an educationClass object.
Constructor Details
#initialize(path_parameters, request_adapter) ⇒ Object
Instantiates a new EducationClassItemRequestBuilder and sets the default values.
71 72 73 |
# File 'lib/education/classes/item/education_class_item_request_builder.rb', line 71 def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/education/classes/{educationClass%2Did}{?%24select,%24expand}") end |
Instance Method Details
#assignment_categories ⇒ Object
Provides operations to manage the assignmentCategories property of the microsoft.graph.educationClass entity.
27 28 29 |
# File 'lib/education/classes/item/education_class_item_request_builder.rb', line 27 def assignment_categories() return MicrosoftGraph::Education::Classes::Item::AssignmentCategories::AssignmentCategoriesRequestBuilder.new(@path_parameters, @request_adapter) end |
#assignment_defaults ⇒ Object
Provides operations to manage the assignmentDefaults property of the microsoft.graph.educationClass entity.
32 33 34 |
# File 'lib/education/classes/item/education_class_item_request_builder.rb', line 32 def assignment_defaults() return MicrosoftGraph::Education::Classes::Item::AssignmentDefaults::AssignmentDefaultsRequestBuilder.new(@path_parameters, @request_adapter) end |
#assignment_settings ⇒ Object
Provides operations to manage the assignmentSettings property of the microsoft.graph.educationClass entity.
42 43 44 |
# File 'lib/education/classes/item/education_class_item_request_builder.rb', line 42 def assignment_settings() return MicrosoftGraph::Education::Classes::Item::AssignmentSettings::AssignmentSettingsRequestBuilder.new(@path_parameters, @request_adapter) end |
#assignments ⇒ Object
Provides operations to manage the assignments property of the microsoft.graph.educationClass entity.
37 38 39 |
# File 'lib/education/classes/item/education_class_item_request_builder.rb', line 37 def assignments() return MicrosoftGraph::Education::Classes::Item::Assignments::AssignmentsRequestBuilder.new(@path_parameters, @request_adapter) end |
#delete(request_configuration = nil) ⇒ Object
Delete an educationClass. Because a class is also a universal group, deleting a class deletes the group.
79 80 81 82 83 84 85 86 87 |
# File 'lib/education/classes/item/education_class_item_request_builder.rb', line 79 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 a class from the system. A class is a universal group with a special property that indicates to the system that the group is a class. Group members represent the students; group admins represent the teachers in the class. If you're using the delegated token, the user will only see classes in which they are members.
93 94 95 96 97 98 99 100 101 |
# File 'lib/education/classes/item/education_class_item_request_builder.rb', line 93 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::EducationClass.create_from_discriminator_value(pn) }, error_mapping) end |
#group ⇒ Object
Provides operations to manage the group property of the microsoft.graph.educationClass entity.
47 48 49 |
# File 'lib/education/classes/item/education_class_item_request_builder.rb', line 47 def group() return MicrosoftGraph::Education::Classes::Item::Group::GroupRequestBuilder.new(@path_parameters, @request_adapter) end |
#members ⇒ Object
Provides operations to manage the members property of the microsoft.graph.educationClass entity.
52 53 54 |
# File 'lib/education/classes/item/education_class_item_request_builder.rb', line 52 def members() return MicrosoftGraph::Education::Classes::Item::Members::MembersRequestBuilder.new(@path_parameters, @request_adapter) end |
#patch(body, request_configuration = nil) ⇒ Object
Update the properties of an educationClass object.
108 109 110 111 112 113 114 115 116 117 |
# File 'lib/education/classes/item/education_class_item_request_builder.rb', line 108 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::EducationClass.create_from_discriminator_value(pn) }, error_mapping) end |
#schools ⇒ Object
Provides operations to manage the schools property of the microsoft.graph.educationClass entity.
57 58 59 |
# File 'lib/education/classes/item/education_class_item_request_builder.rb', line 57 def schools() return MicrosoftGraph::Education::Classes::Item::Schools::SchoolsRequestBuilder.new(@path_parameters, @request_adapter) end |
#teachers ⇒ Object
Provides operations to manage the teachers property of the microsoft.graph.educationClass entity.
62 63 64 |
# File 'lib/education/classes/item/education_class_item_request_builder.rb', line 62 def teachers() return MicrosoftGraph::Education::Classes::Item::Teachers::TeachersRequestBuilder.new(@path_parameters, @request_adapter) end |
#to_delete_request_information(request_configuration = nil) ⇒ Object
Delete an educationClass. Because a class is also a universal group, deleting a class deletes the group.
123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/education/classes/item/education_class_item_request_builder.rb', line 123 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 a class from the system. A class is a universal group with a special property that indicates to the system that the group is a class. Group members represent the students; group admins represent the teachers in the class. If you're using the delegated token, the user will only see classes in which they are members.
139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/education/classes/item/education_class_item_request_builder.rb', line 139 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_patch_request_information(body, request_configuration = nil) ⇒ Object
Update the properties of an educationClass object.
158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/education/classes/item/education_class_item_request_builder.rb', line 158 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.(request_configuration.) end request_info.set_content_from_parsable(@request_adapter, "application/json", body) return request_info end |