Class ProtectionPolicyBaseItemRequestBuilder

java.lang.Object
com.microsoft.kiota.BaseRequestBuilder
com.microsoft.graph.solutions.backuprestore.protectionpolicies.item.ProtectionPolicyBaseItemRequestBuilder

@Generated("com.microsoft.kiota") public class ProtectionPolicyBaseItemRequestBuilder extends com.microsoft.kiota.BaseRequestBuilder
Provides operations to manage the protectionPolicies property of the microsoft.graph.backupRestoreRoot entity.
  • Constructor Details

    • ProtectionPolicyBaseItemRequestBuilder

      public ProtectionPolicyBaseItemRequestBuilder(@Nonnull HashMap<String,Object> pathParameters, @Nonnull com.microsoft.kiota.RequestAdapter requestAdapter)
      Instantiates a new ProtectionPolicyBaseItemRequestBuilder and sets the default values.
      Parameters:
      pathParameters - Path parameters for the request
      requestAdapter - The request adapter to use to execute the requests.
    • ProtectionPolicyBaseItemRequestBuilder

      public ProtectionPolicyBaseItemRequestBuilder(@Nonnull String rawUrl, @Nonnull com.microsoft.kiota.RequestAdapter requestAdapter)
      Instantiates a new ProtectionPolicyBaseItemRequestBuilder 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

    • activate

      @Nonnull public ActivateRequestBuilder activate()
      Provides operations to call the activate method.
      Returns:
      a ActivateRequestBuilder
    • deactivate

      @Nonnull public DeactivateRequestBuilder deactivate()
      Provides operations to call the deactivate method.
      Returns:
      a DeactivateRequestBuilder
    • delete

      public void delete()
      Delete a protection policy. Read the properties and relationships of a protectionPolicyBase object.
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
      See Also:
    • delete

      public void delete(@Nullable Consumer<ProtectionPolicyBaseItemRequestBuilder.DeleteRequestConfiguration> requestConfiguration)
      Delete a protection policy. Read the properties and relationships of a protectionPolicyBase object.
      Parameters:
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
      See Also:
    • get

      @Nullable public ProtectionPolicyBase get()
      List of protection policies in the tenant.
      Returns:
      a ProtectionPolicyBase
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
    • get

      List of protection policies in the tenant.
      Parameters:
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a ProtectionPolicyBase
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
    • patch

      @Nullable public ProtectionPolicyBase patch(@Nonnull ProtectionPolicyBase body)
      Update the navigation property protectionPolicies in solutions
      Parameters:
      body - The request body
      Returns:
      a ProtectionPolicyBase
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
    • patch

      @Nullable public ProtectionPolicyBase patch(@Nonnull ProtectionPolicyBase body, @Nullable Consumer<ProtectionPolicyBaseItemRequestBuilder.PatchRequestConfiguration> requestConfiguration)
      Update the navigation property protectionPolicies in solutions
      Parameters:
      body - The request body
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a ProtectionPolicyBase
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
    • toDeleteRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toDeleteRequestInformation()
      Delete a protection policy. Read the properties and relationships of a protectionPolicyBase object.
      Returns:
      a RequestInformation
    • toDeleteRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toDeleteRequestInformation(@Nullable Consumer<ProtectionPolicyBaseItemRequestBuilder.DeleteRequestConfiguration> requestConfiguration)
      Delete a protection policy. Read the properties and relationships of a protectionPolicyBase object.
      Parameters:
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a RequestInformation
    • toGetRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toGetRequestInformation()
      List of protection policies in the tenant.
      Returns:
      a RequestInformation
    • toGetRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toGetRequestInformation(@Nullable Consumer<ProtectionPolicyBaseItemRequestBuilder.GetRequestConfiguration> requestConfiguration)
      List of protection policies in the tenant.
      Parameters:
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a RequestInformation
    • toPatchRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toPatchRequestInformation(@Nonnull ProtectionPolicyBase body)
      Update the navigation property protectionPolicies in solutions
      Parameters:
      body - The request body
      Returns:
      a RequestInformation
    • toPatchRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toPatchRequestInformation(@Nonnull ProtectionPolicyBase body, @Nullable Consumer<ProtectionPolicyBaseItemRequestBuilder.PatchRequestConfiguration> requestConfiguration)
      Update the navigation property protectionPolicies in solutions
      Parameters:
      body - The request body
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a RequestInformation
    • withUrl

      @Nonnull public ProtectionPolicyBaseItemRequestBuilder withUrl(@Nonnull String rawUrl)
      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 ProtectionPolicyBaseItemRequestBuilder