Class ExchangeProtectionPoliciesRequestBuilder
java.lang.Object
com.microsoft.kiota.BaseRequestBuilder
com.microsoft.graph.solutions.backuprestore.exchangeprotectionpolicies.ExchangeProtectionPoliciesRequestBuilder
@Generated("com.microsoft.kiota")
public class ExchangeProtectionPoliciesRequestBuilder
extends com.microsoft.kiota.BaseRequestBuilder
Provides operations to manage the exchangeProtectionPolicies property of the microsoft.graph.backupRestoreRoot entity.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassThe list of Exchange protection policies in the tenant.classConfiguration for the request such as headers, query parameters, and middleware options.classConfiguration 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
ConstructorsConstructorDescriptionExchangeProtectionPoliciesRequestBuilder(String rawUrl, com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a newExchangeProtectionPoliciesRequestBuilderand sets the default values.ExchangeProtectionPoliciesRequestBuilder(HashMap<String, Object> pathParameters, com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a newExchangeProtectionPoliciesRequestBuilderand sets the default values. -
Method Summary
Modifier and TypeMethodDescriptionbyExchangeProtectionPolicyId(String exchangeProtectionPolicyId) Provides operations to manage the exchangeProtectionPolicies property of the microsoft.graph.backupRestoreRoot entity.count()Provides operations to count the resources in the collection.get()The list of Exchange protection policies in the tenant.get(Consumer<ExchangeProtectionPoliciesRequestBuilder.GetRequestConfiguration> requestConfiguration) The list of Exchange protection policies in the tenant.post(ExchangeProtectionPolicy body) Create a protection policy for the Exchange service in a Microsoft 365 tenant.post(ExchangeProtectionPolicy body, Consumer<ExchangeProtectionPoliciesRequestBuilder.PostRequestConfiguration> requestConfiguration) Create a protection policy for the Exchange service in a Microsoft 365 tenant.com.microsoft.kiota.RequestInformationThe list of Exchange protection policies in the tenant.com.microsoft.kiota.RequestInformationtoGetRequestInformation(Consumer<ExchangeProtectionPoliciesRequestBuilder.GetRequestConfiguration> requestConfiguration) The list of Exchange protection policies in the tenant.com.microsoft.kiota.RequestInformationCreate a protection policy for the Exchange service in a Microsoft 365 tenant.com.microsoft.kiota.RequestInformationtoPostRequestInformation(ExchangeProtectionPolicy body, Consumer<ExchangeProtectionPoliciesRequestBuilder.PostRequestConfiguration> requestConfiguration) Create a protection policy for the Exchange service in a Microsoft 365 tenant.Returns a request builder with the provided arbitrary URL.
-
Constructor Details
-
ExchangeProtectionPoliciesRequestBuilder
public ExchangeProtectionPoliciesRequestBuilder(@Nonnull HashMap<String, Object> pathParameters, @Nonnull com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a newExchangeProtectionPoliciesRequestBuilderand sets the default values.- Parameters:
pathParameters- Path parameters for the requestrequestAdapter- The request adapter to use to execute the requests.
-
ExchangeProtectionPoliciesRequestBuilder
public ExchangeProtectionPoliciesRequestBuilder(@Nonnull String rawUrl, @Nonnull com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a newExchangeProtectionPoliciesRequestBuilderand 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
-
byExchangeProtectionPolicyId
@Nonnull public ExchangeProtectionPolicyItemRequestBuilder byExchangeProtectionPolicyId(@Nonnull String exchangeProtectionPolicyId) Provides operations to manage the exchangeProtectionPolicies property of the microsoft.graph.backupRestoreRoot entity.- Parameters:
exchangeProtectionPolicyId- The unique identifier of exchangeProtectionPolicy- Returns:
- a
ExchangeProtectionPolicyItemRequestBuilder
-
get
The list of Exchange protection policies in the tenant.- Returns:
- a
ExchangeProtectionPolicyCollectionResponse - Throws:
ODataError- When receiving a 4XX or 5XX status code
-
get
@Nullable public ExchangeProtectionPolicyCollectionResponse get(@Nullable Consumer<ExchangeProtectionPoliciesRequestBuilder.GetRequestConfiguration> requestConfiguration) The list of Exchange protection policies in the tenant.- Parameters:
requestConfiguration- Configuration for the request such as headers, query parameters, and middleware options.- Returns:
- a
ExchangeProtectionPolicyCollectionResponse - Throws:
ODataError- When receiving a 4XX or 5XX status code
-
post
Create a protection policy for the Exchange service in a Microsoft 365 tenant. The policy is set to inactive when it is created. Users can also provide a list of protection units under the policy.- Parameters:
body- The request body- Returns:
- a
ExchangeProtectionPolicy - Throws:
ODataError- When receiving a 4XX or 5XX status code- See Also:
-
post
@Nullable public ExchangeProtectionPolicy post(@Nonnull ExchangeProtectionPolicy body, @Nullable Consumer<ExchangeProtectionPoliciesRequestBuilder.PostRequestConfiguration> requestConfiguration) Create a protection policy for the Exchange service in a Microsoft 365 tenant. The policy is set to inactive when it is created. 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
ExchangeProtectionPolicy - Throws:
ODataError- When receiving a 4XX or 5XX status code- See Also:
-
toGetRequestInformation
@Nonnull public com.microsoft.kiota.RequestInformation toGetRequestInformation()The list of Exchange protection policies in the tenant.- Returns:
- a
RequestInformation
-
toGetRequestInformation
@Nonnull public com.microsoft.kiota.RequestInformation toGetRequestInformation(@Nullable Consumer<ExchangeProtectionPoliciesRequestBuilder.GetRequestConfiguration> requestConfiguration) The list of Exchange 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 ExchangeProtectionPolicy body) Create a protection policy for the Exchange service in a Microsoft 365 tenant. The policy is set to inactive when it is created. 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 ExchangeProtectionPolicy body, @Nullable Consumer<ExchangeProtectionPoliciesRequestBuilder.PostRequestConfiguration> requestConfiguration) Create a protection policy for the Exchange service in a Microsoft 365 tenant. The policy is set to inactive when it is created. 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
ExchangeProtectionPoliciesRequestBuilder
-