Class ApiRequest

java.lang.Object
com.myjeeva.digitalocean.impl.ApiRequest

public class ApiRequest extends Object
Represents DigitalOcean API Request details
Since:
v2.0
Author:
Jeevanandam M. (jeeva@myjeeva.com)
  • Constructor Details

    • ApiRequest

      public ApiRequest()
      Default Constructor
    • ApiRequest

      public ApiRequest(ApiAction apiAction)
      Constructor
      Parameters:
      apiAction - a info about api request
    • ApiRequest

      public ApiRequest(ApiAction apiAction, Object[] pathParams)
      Constructor
      Parameters:
      apiAction - a info about api request
      pathParams - a api request path variable value(s)
    • ApiRequest

      public ApiRequest(ApiAction apiAction, Integer pageNo, Integer perPage)
      Constructor
      Parameters:
      apiAction - a info about api request
      pageNo - of the request pagination
      perPage - no. of items per page
    • ApiRequest

      public ApiRequest(ApiAction apiAction, Integer pageNo, Map<String,String> queryParams, Integer perPage)
      Constructor
      Parameters:
      apiAction - a info about api request
      pageNo - of the request pagination
      queryParams - of the api request
      perPage - no. of items per page
    • ApiRequest

      public ApiRequest(ApiAction apiAction, Object data)
      Constructor
      Parameters:
      apiAction - a info about api request
      data - a api request body data object
    • ApiRequest

      public ApiRequest(ApiAction apiAction, Object[] pathParams, Integer pageNo, Integer perPage)
      Constructor
      Parameters:
      apiAction - a info about api request
      pathParams - a api request path variable value(s)
      pageNo - of the request pagination
      perPage - no. of items per page
    • ApiRequest

      public ApiRequest(ApiAction apiAction, Object data, Object[] pathParams)
      Constructor
      Parameters:
      apiAction - a info about api request
      data - a api request body data object
      pathParams - a api request path variable value(s)
    • ApiRequest

      public ApiRequest(ApiAction apiAction, Object data, Object[] pathParams, Integer pageNo, Map<String,String> queryParams, Integer perPage)
      Constructor
      Parameters:
      apiAction - a info about api request
      data - a api request body data object
      pathParams - a api request path variable value(s)
      pageNo - of the request pagination
      queryParams - of the api request
      perPage - no. of items per page
  • Method Details

    • isCollectionElement

      public Boolean isCollectionElement()
    • getPath

      public String getPath()
      Returns:
      the path
    • getElementName

      public String getElementName()
      Returns:
      the elementName
    • getMethod

      public RequestMethod getMethod()
      Returns:
      the method
    • getClazz

      public Class<?> getClazz()
      Returns:
      the clazz
    • getApiAction

      public ApiAction getApiAction()
      Returns:
      the apiAction
    • setApiAction

      public void setApiAction(ApiAction apiAction)
      Parameters:
      apiAction - the apiAction to set
    • getData

      public Object getData()
      Returns:
      the data
    • setData

      public void setData(Object data)
      Parameters:
      data - the data to set
    • getPathParams

      public Object[] getPathParams()
      Returns:
      the pathParams
    • setPathParams

      public void setPathParams(Object[] pathParams)
      Parameters:
      pathParams - the pathParams to set
    • getQueryParams

      public Map<String,String> getQueryParams()
      Returns:
      the queryParams
    • setQueryParams

      public void setQueryParams(Map<String,String> queryParams)
      Parameters:
      queryParams - the queryParams to set
    • getPageNo

      public Integer getPageNo()
      Returns:
      the pageNo
    • setPageNo

      public void setPageNo(Integer pageNo)
      Parameters:
      pageNo - the pageNo to set
    • getPerPage

      public Integer getPerPage()
      Returns:
      the perPage
    • setPerPage

      public void setPerPage(Integer perPage)
      Parameters:
      perPage - the perPage to set