Class WidgetsRequestBuilder

java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.dashboard.widgets.WidgetsRequestBuilder

public class WidgetsRequestBuilder extends BaseRequestBuilder
Provides functionality to work with Dashboard widgets Api.
  • Constructor Details

    • WidgetsRequestBuilder

      public WidgetsRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential)
      Instantiates a new RequestBuilder instance and sets the default values.
      Parameters:
      organizationUrl - Represents organization location request url.
      accessTokenCredential - Access token credential object.
  • Method Details

    • createAsync

      public CompletableFuture<Widget> createAsync(String team, String dashboardId, Widget widget) throws AzDException
      Create a widget on the specified dashboard.
      Parameters:
      team - Team name or ID.
      dashboardId - ID of dashboard the widget will be added to.
      widget - State of the widget to add.
      Returns:
      Widget object Widget
      Throws:
      AzDException - Default Api Exception handler.
    • deleteAsync

      public CompletableFuture<Void> deleteAsync(String team, String dashboardId, String widgetId) throws AzDException
      Delete the specified widget.
      Parameters:
      team - Team name or ID.
      dashboardId - ID of the dashboard containing the widget.
      widgetId - ID of the widget to delete.
      Throws:
      AzDException - Default Api Exception handler.
    • getAsync

      public CompletableFuture<Widget> getAsync(String team, String dashboardId, String widgetId) throws AzDException
      Get the current state of the specified widget.
      Parameters:
      team - Team name or ID.
      dashboardId - ID of the dashboard containing the widget.
      widgetId - ID of the widget to read.
      Returns:
      Widget object Widget
      Throws:
      AzDException - Default Api Exception handler.
    • listAsync

      public CompletableFuture<WidgetList> listAsync(String team, String dashboardId) throws AzDException
      Get widgets contained on the specified dashboard.
      Parameters:
      team - Team name or ID.
      dashboardId - ID of the dashboard to read.
      Returns:
      WidgetList WidgetList
      Throws:
      AzDException - Default Api Exception handler.
    • replaceAsync

      public CompletableFuture<Widget> replaceAsync(String team, String dashboardId, String widgetId, Widget widget) throws AzDException
      Override the state of the specified widget.
      Parameters:
      team - Team name or ID.
      dashboardId - ID of the dashboard containing the widget.
      widgetId - ID of the widget to update.
      widget - State to be written for the widget.
      Returns:
      Widget object Widget
      Throws:
      AzDException - Default Api Exception handler.
    • updateAsync

      public CompletableFuture<Widget> updateAsync(String team, String dashboardId, String widgetId, Widget widget) throws AzDException
      Perform a partial update of the specified widget.
      Parameters:
      team - Team name or ID.
      dashboardId - ID of the dashboard containing the widget.
      widgetId - ID of the widget to update.
      widget - Description of the widget changes to apply.
      Returns:
      Widget object Widget
      Throws:
      AzDException - Default Api Exception handler.
    • create

      public Widget create(String team, String dashboardId, Widget widget) throws AzDException
      Create a widget on the specified dashboard.
      Parameters:
      team - Team name or ID.
      dashboardId - ID of dashboard the widget will be added to.
      widget - State of the widget to add.
      Returns:
      Widget object Widget
      Throws:
      AzDException - Default Api Exception handler.
    • delete

      public Void delete(String team, String dashboardId, String widgetId) throws AzDException
      Delete the specified widget.
      Parameters:
      team - Team name or ID.
      dashboardId - ID of the dashboard containing the widget.
      widgetId - ID of the widget to delete.
      Throws:
      AzDException - Default Api Exception handler.
    • get

      public Widget get(String team, String dashboardId, String widgetId) throws AzDException
      Get the current state of the specified widget.
      Parameters:
      team - Team name or ID.
      dashboardId - ID of the dashboard containing the widget.
      widgetId - ID of the widget to read.
      Returns:
      Widget object Widget
      Throws:
      AzDException - Default Api Exception handler.
    • list

      public WidgetList list(String team, String dashboardId) throws AzDException
      Get widgets contained on the specified dashboard.
      Parameters:
      team - Team name or ID.
      dashboardId - ID of the dashboard to read.
      Returns:
      WidgetList WidgetList
      Throws:
      AzDException - Default Api Exception handler.
    • replace

      public Widget replace(String team, String dashboardId, String widgetId, Widget widget) throws AzDException
      Override the state of the specified widget.
      Parameters:
      team - Team name or ID.
      dashboardId - ID of the dashboard containing the widget.
      widgetId - ID of the widget to update.
      widget - State to be written for the widget.
      Returns:
      Widget object Widget
      Throws:
      AzDException - Default Api Exception handler.
    • update

      public Widget update(String team, String dashboardId, String widgetId, Widget widget) throws AzDException
      Perform a partial update of the specified widget.
      Parameters:
      team - Team name or ID.
      dashboardId - ID of the dashboard containing the widget.
      widgetId - ID of the widget to update.
      widget - Description of the widget changes to apply.
      Returns:
      Widget object Widget
      Throws:
      AzDException - Default Api Exception handler.