Package com.adobe.aio.cloudmanager
Class ApiBuilder<A>
- java.lang.Object
-
- com.adobe.aio.cloudmanager.ApiBuilder<A>
-
- Type Parameters:
A
- the type of API to create
public class ApiBuilder<A> extends Object
Builder for creating instances of the Cloud Manager APIs
-
-
Constructor Summary
Constructors Constructor Description ApiBuilder(Class<A> clazz)
Create new instance of an API Builder, scoped to the desired interface.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description A
build()
Build a new instance of the requested API.ApiBuilder<A>
url(@NotNull URL url)
(Optional) Base url for this API.ApiBuilder<A>
workspace(@NotNull com.adobe.aio.workspace.Workspace workspace)
(Required) Workspace context for the API.
-
-
-
Method Detail
-
workspace
public ApiBuilder<A> workspace(@NotNull @NotNull com.adobe.aio.workspace.Workspace workspace)
(Required) Workspace context for the API.- Parameters:
workspace
- the workspace- Returns:
- this builder
-
url
public ApiBuilder<A> url(@NotNull @NotNull URL url)
(Optional) Base url for this API. Can be used to change destination for requests, to the Stage environment for example. If not provided, then the default production value will be used.wqa9]- Parameters:
url
- the url context for requests- Returns:
- this builder
-
build
public A build() throws CloudManagerApiException
Build a new instance of the requested API.- Returns:
- an instance of the API
- Throws:
CloudManagerApiException
- when any error occurs
-
-