Class OneDriveForBusinessProtectionPoliciesRequestBuilder
java.lang.Object
com.microsoft.kiota.BaseRequestBuilder
com.microsoft.graph.solutions.backuprestore.onedriveforbusinessprotectionpolicies.OneDriveForBusinessProtectionPoliciesRequestBuilder
@Generated("com.microsoft.kiota")
public class OneDriveForBusinessProtectionPoliciesRequestBuilder
extends com.microsoft.kiota.BaseRequestBuilder
Provides operations to manage the oneDriveForBusinessProtectionPolicies property of the microsoft.graph.backupRestoreRoot entity.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
The list of OneDrive for Business protection policies in the tenant.class
Configuration for the request such as headers, query parameters, and middleware options.class
Configuration for the request such as headers, query parameters, and middleware options. -
Field Summary
Fields inherited from class com.microsoft.kiota.BaseRequestBuilder
pathParameters, requestAdapter, urlTemplate
-
Constructor Summary
ConstructorsConstructorDescriptionOneDriveForBusinessProtectionPoliciesRequestBuilder
(String rawUrl, com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a newOneDriveForBusinessProtectionPoliciesRequestBuilder
and sets the default values.OneDriveForBusinessProtectionPoliciesRequestBuilder
(HashMap<String, Object> pathParameters, com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a newOneDriveForBusinessProtectionPoliciesRequestBuilder
and sets the default values. -
Method Summary
Modifier and TypeMethodDescriptionbyOneDriveForBusinessProtectionPolicyId
(String oneDriveForBusinessProtectionPolicyId) Provides operations to manage the oneDriveForBusinessProtectionPolicies property of the microsoft.graph.backupRestoreRoot entity.count()
Provides operations to count the resources in the collection.get()
The list of OneDrive for Business protection policies in the tenant.get
(Consumer<OneDriveForBusinessProtectionPoliciesRequestBuilder.GetRequestConfiguration> requestConfiguration) The list of OneDrive for Business protection policies in the tenant.Create a protection policy for the OneDrive service in Microsoft 365.post
(OneDriveForBusinessProtectionPolicy body, Consumer<OneDriveForBusinessProtectionPoliciesRequestBuilder.PostRequestConfiguration> requestConfiguration) Create a protection policy for the OneDrive service in Microsoft 365.com.microsoft.kiota.RequestInformation
The list of OneDrive for Business protection policies in the tenant.com.microsoft.kiota.RequestInformation
toGetRequestInformation
(Consumer<OneDriveForBusinessProtectionPoliciesRequestBuilder.GetRequestConfiguration> requestConfiguration) The list of OneDrive for Business protection policies in the tenant.com.microsoft.kiota.RequestInformation
Create a protection policy for the OneDrive service in Microsoft 365.com.microsoft.kiota.RequestInformation
toPostRequestInformation
(OneDriveForBusinessProtectionPolicy body, Consumer<OneDriveForBusinessProtectionPoliciesRequestBuilder.PostRequestConfiguration> requestConfiguration) Create a protection policy for the OneDrive service in Microsoft 365.Returns a request builder with the provided arbitrary URL.
-
Constructor Details
-
OneDriveForBusinessProtectionPoliciesRequestBuilder
public OneDriveForBusinessProtectionPoliciesRequestBuilder(@Nonnull HashMap<String, Object> pathParameters, @Nonnull com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a newOneDriveForBusinessProtectionPoliciesRequestBuilder
and sets the default values.- Parameters:
pathParameters
- Path parameters for the requestrequestAdapter
- The request adapter to use to execute the requests.
-
OneDriveForBusinessProtectionPoliciesRequestBuilder
public OneDriveForBusinessProtectionPoliciesRequestBuilder(@Nonnull String rawUrl, @Nonnull com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a newOneDriveForBusinessProtectionPoliciesRequestBuilder
and sets the default values.- Parameters:
rawUrl
- The raw URL to use for the request builder.requestAdapter
- The request adapter to use to execute the requests.
-
-
Method Details
-
count
Provides operations to count the resources in the collection.- Returns:
- a
CountRequestBuilder
-
byOneDriveForBusinessProtectionPolicyId
@Nonnull public OneDriveForBusinessProtectionPolicyItemRequestBuilder byOneDriveForBusinessProtectionPolicyId(@Nonnull String oneDriveForBusinessProtectionPolicyId) Provides operations to manage the oneDriveForBusinessProtectionPolicies property of the microsoft.graph.backupRestoreRoot entity.- Parameters:
oneDriveForBusinessProtectionPolicyId
- The unique identifier of oneDriveForBusinessProtectionPolicy- Returns:
- a
OneDriveForBusinessProtectionPolicyItemRequestBuilder
-
get
The list of OneDrive for Business protection policies in the tenant.- Returns:
- a
OneDriveForBusinessProtectionPolicyCollectionResponse
- Throws:
ODataError
- When receiving a 4XX or 5XX status code
-
get
@Nullable public OneDriveForBusinessProtectionPolicyCollectionResponse get(@Nullable Consumer<OneDriveForBusinessProtectionPoliciesRequestBuilder.GetRequestConfiguration> requestConfiguration) The list of OneDrive for Business protection policies in the tenant.- Parameters:
requestConfiguration
- Configuration for the request such as headers, query parameters, and middleware options.- Returns:
- a
OneDriveForBusinessProtectionPolicyCollectionResponse
- Throws:
ODataError
- When receiving a 4XX or 5XX status code
-
post
@Nullable public OneDriveForBusinessProtectionPolicy post(@Nonnull OneDriveForBusinessProtectionPolicy body) Create a protection policy for the OneDrive service in Microsoft 365. When the policy is created, its state is set to inactive. Users can also provide a list of protection units under the policy.- Parameters:
body
- The request body- Returns:
- a
OneDriveForBusinessProtectionPolicy
- Throws:
ODataError
- When receiving a 4XX or 5XX status code- See Also:
-
post
@Nullable public OneDriveForBusinessProtectionPolicy post(@Nonnull OneDriveForBusinessProtectionPolicy body, @Nullable Consumer<OneDriveForBusinessProtectionPoliciesRequestBuilder.PostRequestConfiguration> requestConfiguration) Create a protection policy for the OneDrive service in Microsoft 365. When the policy is created, its state is set to inactive. Users can also provide a list of protection units under the policy.- Parameters:
body
- The request bodyrequestConfiguration
- Configuration for the request such as headers, query parameters, and middleware options.- Returns:
- a
OneDriveForBusinessProtectionPolicy
- Throws:
ODataError
- When receiving a 4XX or 5XX status code- See Also:
-
toGetRequestInformation
@Nonnull public com.microsoft.kiota.RequestInformation toGetRequestInformation()The list of OneDrive for Business protection policies in the tenant.- Returns:
- a
RequestInformation
-
toGetRequestInformation
@Nonnull public com.microsoft.kiota.RequestInformation toGetRequestInformation(@Nullable Consumer<OneDriveForBusinessProtectionPoliciesRequestBuilder.GetRequestConfiguration> requestConfiguration) The list of OneDrive for Business protection policies in the tenant.- Parameters:
requestConfiguration
- Configuration for the request such as headers, query parameters, and middleware options.- Returns:
- a
RequestInformation
-
toPostRequestInformation
@Nonnull public com.microsoft.kiota.RequestInformation toPostRequestInformation(@Nonnull OneDriveForBusinessProtectionPolicy body) Create a protection policy for the OneDrive service in Microsoft 365. When the policy is created, its state is set to inactive. Users can also provide a list of protection units under the policy.- Parameters:
body
- The request body- Returns:
- a
RequestInformation
-
toPostRequestInformation
@Nonnull public com.microsoft.kiota.RequestInformation toPostRequestInformation(@Nonnull OneDriveForBusinessProtectionPolicy body, @Nullable Consumer<OneDriveForBusinessProtectionPoliciesRequestBuilder.PostRequestConfiguration> requestConfiguration) Create a protection policy for the OneDrive service in Microsoft 365. When the policy is created, its state is set to inactive. Users can also provide a list of protection units under the policy.- Parameters:
body
- The request bodyrequestConfiguration
- Configuration for the request such as headers, query parameters, and middleware options.- Returns:
- a
RequestInformation
-
withUrl
Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.- Parameters:
rawUrl
- The raw URL to use for the request builder.- Returns:
- a
OneDriveForBusinessProtectionPoliciesRequestBuilder
-