Class: MicrosoftGraph::Shares::Item::SharedDriveItemItemRequestBuilder
- Inherits:
-
MicrosoftKiotaAbstractions::BaseRequestBuilder
- Object
- MicrosoftKiotaAbstractions::BaseRequestBuilder
- MicrosoftGraph::Shares::Item::SharedDriveItemItemRequestBuilder
- Defined in:
- lib/shares/item/shared_drive_item_item_request_builder.rb
Overview
Provides operations to manage the collection of sharedDriveItem entities.
Defined Under Namespace
Classes: SharedDriveItemItemRequestBuilderGetQueryParameters
Instance Method Summary collapse
-
#created_by_user ⇒ Object
Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity.
-
#delete(request_configuration = nil) ⇒ Object
Delete entity from shares.
-
#drive_item ⇒ Object
Provides operations to manage the driveItem property of the microsoft.graph.sharedDriveItem entity.
-
#get(request_configuration = nil) ⇒ Object
Access a shared DriveItem or a collection of shared items by using a shareId or sharing URL.
-
#initialize(path_parameters, request_adapter) ⇒ Object
constructor
Instantiates a new SharedDriveItemItemRequestBuilder and sets the default values.
-
#items ⇒ Object
Provides operations to manage the items property of the microsoft.graph.sharedDriveItem entity.
-
#last_modified_by_user ⇒ Object
Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity.
-
#list ⇒ Object
Provides operations to manage the list property of the microsoft.graph.sharedDriveItem entity.
-
#list_item ⇒ Object
Provides operations to manage the listItem property of the microsoft.graph.sharedDriveItem entity.
-
#patch(body, request_configuration = nil) ⇒ Object
Update entity in shares.
-
#permission ⇒ Object
Provides operations to manage the permission property of the microsoft.graph.sharedDriveItem entity.
-
#root ⇒ Object
Provides operations to manage the root property of the microsoft.graph.sharedDriveItem entity.
-
#site ⇒ Object
Provides operations to manage the site property of the microsoft.graph.sharedDriveItem entity.
-
#to_delete_request_information(request_configuration = nil) ⇒ Object
Delete entity from shares.
-
#to_get_request_information(request_configuration = nil) ⇒ Object
Access a shared DriveItem or a collection of shared items by using a shareId or sharing URL.
-
#to_patch_request_information(body, request_configuration = nil) ⇒ Object
Update entity in shares.
Constructor Details
#initialize(path_parameters, request_adapter) ⇒ Object
Instantiates a new SharedDriveItemItemRequestBuilder and sets the default values.
75 76 77 |
# File 'lib/shares/item/shared_drive_item_item_request_builder.rb', line 75 def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/shares/{sharedDriveItem%2Did}{?%24select,%24expand}") end |
Instance Method Details
#created_by_user ⇒ Object
Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity.
26 27 28 |
# File 'lib/shares/item/shared_drive_item_item_request_builder.rb', line 26 def created_by_user() return MicrosoftGraph::Shares::Item::CreatedByUser::CreatedByUserRequestBuilder.new(@path_parameters, @request_adapter) end |
#delete(request_configuration = nil) ⇒ Object
Delete entity from shares
83 84 85 86 87 88 89 90 91 |
# File 'lib/shares/item/shared_drive_item_item_request_builder.rb', line 83 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 |
#drive_item ⇒ Object
Provides operations to manage the driveItem property of the microsoft.graph.sharedDriveItem entity.
31 32 33 |
# File 'lib/shares/item/shared_drive_item_item_request_builder.rb', line 31 def drive_item() return MicrosoftGraph::Shares::Item::DriveItem::DriveItemRequestBuilder.new(@path_parameters, @request_adapter) end |
#get(request_configuration = nil) ⇒ Object
Access a shared DriveItem or a collection of shared items by using a shareId or sharing URL. To use a sharing URL with this API, your app needs to transform the URL into a sharing token.
97 98 99 100 101 102 103 104 105 |
# File 'lib/shares/item/shared_drive_item_item_request_builder.rb', line 97 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::SharedDriveItem.create_from_discriminator_value(pn) }, error_mapping) end |
#items ⇒ Object
Provides operations to manage the items property of the microsoft.graph.sharedDriveItem entity.
36 37 38 |
# File 'lib/shares/item/shared_drive_item_item_request_builder.rb', line 36 def items() return MicrosoftGraph::Shares::Item::Items::ItemsRequestBuilder.new(@path_parameters, @request_adapter) end |
#last_modified_by_user ⇒ Object
Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity.
41 42 43 |
# File 'lib/shares/item/shared_drive_item_item_request_builder.rb', line 41 def last_modified_by_user() return MicrosoftGraph::Shares::Item::LastModifiedByUser::LastModifiedByUserRequestBuilder.new(@path_parameters, @request_adapter) end |
#list ⇒ Object
Provides operations to manage the list property of the microsoft.graph.sharedDriveItem entity.
46 47 48 |
# File 'lib/shares/item/shared_drive_item_item_request_builder.rb', line 46 def list() return MicrosoftGraph::Shares::Item::List::ListRequestBuilder.new(@path_parameters, @request_adapter) end |
#list_item ⇒ Object
Provides operations to manage the listItem property of the microsoft.graph.sharedDriveItem entity.
51 52 53 |
# File 'lib/shares/item/shared_drive_item_item_request_builder.rb', line 51 def list_item() return MicrosoftGraph::Shares::Item::ListItem::ListItemRequestBuilder.new(@path_parameters, @request_adapter) end |
#patch(body, request_configuration = nil) ⇒ Object
Update entity in shares
112 113 114 115 116 117 118 119 120 121 |
# File 'lib/shares/item/shared_drive_item_item_request_builder.rb', line 112 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::SharedDriveItem.create_from_discriminator_value(pn) }, error_mapping) end |
#permission ⇒ Object
Provides operations to manage the permission property of the microsoft.graph.sharedDriveItem entity.
56 57 58 |
# File 'lib/shares/item/shared_drive_item_item_request_builder.rb', line 56 def () return MicrosoftGraph::Shares::Item::Permission::PermissionRequestBuilder.new(@path_parameters, @request_adapter) end |
#root ⇒ Object
Provides operations to manage the root property of the microsoft.graph.sharedDriveItem entity.
61 62 63 |
# File 'lib/shares/item/shared_drive_item_item_request_builder.rb', line 61 def root() return MicrosoftGraph::Shares::Item::Root::RootRequestBuilder.new(@path_parameters, @request_adapter) end |
#site ⇒ Object
Provides operations to manage the site property of the microsoft.graph.sharedDriveItem entity.
66 67 68 |
# File 'lib/shares/item/shared_drive_item_item_request_builder.rb', line 66 def site() return MicrosoftGraph::Shares::Item::Site::SiteRequestBuilder.new(@path_parameters, @request_adapter) end |
#to_delete_request_information(request_configuration = nil) ⇒ Object
Delete entity from shares
127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/shares/item/shared_drive_item_item_request_builder.rb', line 127 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
Access a shared DriveItem or a collection of shared items by using a shareId or sharing URL. To use a sharing URL with this API, your app needs to transform the URL into a sharing token.
143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/shares/item/shared_drive_item_item_request_builder.rb', line 143 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 entity in shares
162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/shares/item/shared_drive_item_item_request_builder.rb', line 162 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 |