Package org.azd.dashboard.widgets
Class WidgetsRequestBuilder
java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.dashboard.widgets.WidgetsRequestBuilder
Provides functionality to work with Dashboard widgets Api.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.azd.abstractions.BaseRequestBuilder
BaseRequestBuilder.ProjectExcludeParameter -
Field Summary
Fields inherited from class org.azd.abstractions.BaseRequestBuilder
accessTokenCredential, apiVersion, area, locationId, organizationUrl, serializer -
Constructor Summary
ConstructorsConstructorDescriptionWidgetsRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential) Instantiates a new RequestBuilder instance and sets the default values. -
Method Summary
Modifier and TypeMethodDescriptionCreate a widget on the specified dashboard.createAsync(String team, String dashboardId, Widget widget) Create a widget on the specified dashboard.Delete the specified widget.deleteAsync(String team, String dashboardId, String widgetId) Delete the specified widget.Get the current state of the specified widget.Get the current state of the specified widget.Get widgets contained on the specified dashboard.Get widgets contained on the specified dashboard.Override the state of the specified widget.replaceAsync(String team, String dashboardId, String widgetId, Widget widget) Override the state of the specified widget.Perform a partial update of the specified widget.updateAsync(String team, String dashboardId, String widgetId, Widget widget) Perform a partial update of the specified widget.Methods inherited from class org.azd.abstractions.BaseRequestBuilder
builder
-
Constructor Details
-
WidgetsRequestBuilder
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
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
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
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
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
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.
-