diff --git a/.github/workflows/4-release.yaml b/.github/workflows/4-release.yaml
index 54fcc9deb..177590a6b 100644
--- a/.github/workflows/4-release.yaml
+++ b/.github/workflows/4-release.yaml
@@ -9,8 +9,17 @@ env:
IMAGE_NAME: ${{ github.repository }}
jobs:
+ detect-current-api-version:
+ uses: ./.github/workflows/detect-webapi-version.yaml
+ with:
+ # We cannot use environment variables here due to workflow limitation.
+ # https://docs.github.com/en/enterprise-cloud@latest/actions/using-workflows/reusing-workflows#limitations
+ registry: ghcr.io
+ image-repo: ${{ github.repository }}
+
publish-container-image:
runs-on: ubuntu-latest
+ needs: detect-current-api-version
permissions:
packages: write
steps:
@@ -39,3 +48,27 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
provenance: false
+
+ detect-newer-api-version:
+ needs: publish-container-image
+ uses: ./.github/workflows/detect-webapi-version.yaml
+ with:
+ # We cannot use environment variables here due to workflow limitation.
+ # https://docs.github.com/en/enterprise-cloud@latest/actions/using-workflows/reusing-workflows#limitations
+ registry: ghcr.io
+ image-repo: ${{ github.repository }}
+
+ generate-webapi-clients:
+ needs:
+ - detect-current-api-version
+ - detect-newer-api-version
+ if: ${{ needs.detect-current-api-version.outputs.apiver != needs.detect-newer-api-version.outputs.apiver }}
+ uses: ./.github/workflows/4.a-generate-webapi-clients.yaml
+ permissions:
+ contents: write
+ packages: write
+ with:
+ # We cannot use environment variables here due to workflow limitation.
+ # https://docs.github.com/en/enterprise-cloud@latest/actions/using-workflows/reusing-workflows#limitations
+ registry: ghcr.io
+ image-repo: ${{ github.repository }}
diff --git a/.github/workflows/4.a-generate-webapi-clients.yaml b/.github/workflows/4.a-generate-webapi-clients.yaml
new file mode 100644
index 000000000..d14602218
--- /dev/null
+++ b/.github/workflows/4.a-generate-webapi-clients.yaml
@@ -0,0 +1,48 @@
+name: 4.a-Generate WebAPI client libraries
+
+on:
+ workflow_call:
+ inputs:
+ registry:
+ type: string
+ required: true
+ image-repo:
+ type: string
+ required: true
+ tag:
+ type: string
+ required: false
+ default: latest
+ workflow_dispatch:
+ inputs:
+ registry:
+ type: string
+ required: false
+ default: ghcr.io
+ image-repo:
+ type: string
+ required: false
+ default: "green-software-foundation/carbon-aware-sdk"
+ tag:
+ type: string
+ required: false
+ default: latest
+
+permissions:
+ contents: write
+ packages: write
+
+jobs:
+ detect-api-version:
+ uses: ./.github/workflows/detect-webapi-version.yaml
+ with:
+ registry: ${{ inputs.registry }}
+ image-repo: ${{ inputs.image-repo }}
+ tag: ${{ inputs.tag }}
+
+ generate-java-client:
+ needs: detect-api-version
+ uses: ./.github/workflows/4.a.1-generate-webapi-client-java.yaml
+ with:
+ image: ${{ needs.detect-api-version.outputs.image }}
+ apiver: ${{ needs.detect-api-version.outputs.apiver }}
diff --git a/.github/workflows/4.a.1-generate-webapi-client-java.yaml b/.github/workflows/4.a.1-generate-webapi-client-java.yaml
new file mode 100644
index 000000000..c7b4ceead
--- /dev/null
+++ b/.github/workflows/4.a.1-generate-webapi-client-java.yaml
@@ -0,0 +1,84 @@
+name: 4.a.1-Generate WebAPI client library for Java
+
+on:
+ workflow_call:
+ inputs:
+ image:
+ required: true
+ type: string
+ apiver:
+ required: true
+ type: string
+
+jobs:
+ generate-java-client:
+ runs-on: ubuntu-latest
+ services:
+ webapi:
+ image: ${{ inputs.image }}
+ ports:
+ - 8080:8080
+ options: >-
+ --health-cmd "curl -sS http://localhost:8080/health"
+ --health-interval 3s
+ --health-timeout 5s
+ --health-retries 5
+ permissions:
+ packages: write
+ env:
+ API: http://localhost:8080/api/v1/swagger.yaml
+ steps:
+ - name: Prepare
+ run: |
+ mkdir work pages
+ npm install -g @openapitools/openapi-generator-cli@2.5.2
+ - name: Generate client library
+ run: |
+ echo '{"apiPackage": "foundation.greensoftware.carbonaware.webapi.client", "artifactDescription": "Carbon Aware SDK client library for Java", "artifactId": "casdk-client", "artifactVersion": "${{ inputs.apiver }}", "developerOrganization": "Green Software Foundation", "developerOrganizationUrl": "https://greensoftware.foundation/", "groupId": "foundation.greensoftware", "licenseName": "MIT License", "scmUrl": "${{ env.REPO }}", "artifactUrl": "${{ env.REPO }}/packages/", "scmConnection": "${{ github.repositoryUrl }}", "scmDeveloperConnection": "${{ github.repositoryUrl }}", "licenseUrl": "https://opensource.org/license/mit/", "developerName": "Green Software Foundation", "developerEmail": "carbon-aware-sdk@greensoftware.foundation"}' > config.json
+ openapi-generator-cli generate -i ${{ env.API }} -g java -o work -c config.json
+ sed -i "s||
public static final String
"dataEndAt"
public static final String
"dataStartAt"
public static final String
"forecastData"
public static final String
"generatedAt"
public static final String
"location"
public static final String
"optimalDataPoints"
public static final String
"requestedAt"
public static final String
"windowSize"
You can search for definitions of modules, packages, types, fields, methods, system properties and other terms defined in the API, using some or all of the name, optionally using "camelCase" abbreviations. For example:
-j.l.obj
will match "java.lang.Object"InpStr
will match "java.io.InputStream"HM.cK
will match "java.util.HashMap.containsKey(Object)"Refer to the Javadoc Search Specification for a full description of search features.
-The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
-Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:
-Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.
-Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.
-The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
-Packages and modules may contain pages with additional information related to the declarations nearby.
-Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the USE link in the navigation bar.
-There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object
. Interfaces do not inherit from java.lang.Object
.
The Constant Field Values page lists the static final fields and their values.
-Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to those who implement rather than use the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See Also" section of the class description.
-The All Packages page contains an alphabetic index of all packages contained in the documentation.
-The All Classes and Interfaces page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.
-The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields in the documentation, as well as summary pages such as All Packages, All Classes and Interfaces.
-data
.dateFormat
.headers
.keyManagers
.status code
.Pair
object.Pair
objects.dateFormat
.T
- The return typevoid
onDownloadProgress(long bytesRead,
- long contentLength,
- boolean done)
void
void
void
onUploadProgress(long bytesWritten,
- long contentLength,
- boolean done)
e
- The exception causing the failurestatusCode
- Status code of the response if available, otherwise it would be 0responseHeaders
- Headers of the response if available, otherwise it would be nullresult
- The result deserialized from responsestatusCode
- Status code of the responseresponseHeaders
- Headers of the responsebytesWritten
- bytes WrittencontentLength
- content length of request bodydone
- write endbytesRead
- bytes ReadcontentLength
- content length of the responsedone
- Read endApiClient class.
addDefaultCookie(String key,
- String value)
addDefaultHeader(String key,
- String value)
okhttp3.Call
buildCall(String baseUrl,
- String path,
- String method,
- List<Pair> queryParams,
- List<Pair> collectionQueryParams,
- Object body,
- Map<String,String> headerParams,
- Map<String,String> cookieParams,
- Map<String,Object> formParams,
- String[] authNames,
- ApiCallback callback)
okhttp3.Request
buildRequest(String baseUrl,
- String path,
- String method,
- List<Pair> queryParams,
- List<Pair> collectionQueryParams,
- Object body,
- Map<String,String> headerParams,
- Map<String,String> cookieParams,
- Map<String,Object> formParams,
- String[] authNames,
- ApiCallback callback)
okhttp3.RequestBody
buildRequestBodyFormEncoding(Map<String,Object> formParams)
okhttp3.RequestBody
buildRequestBodyMultipart(Map<String,Object> formParams)
buildUrl(String baseUrl,
- String path,
- List<Pair> queryParams,
- List<Pair> collectionQueryParams)
collectionPathParameterToString(String collectionFormat,
- Collection value)
<T> T
deserialize(okhttp3.Response response,
- Type returnType)
downloadFileFromResponse(okhttp3.Response response)
escapeString(String str)
<T> ApiResponse<T>
execute(okhttp3.Call call)
<T> ApiResponse<T>
<T> void
executeAsync(okhttp3.Call call,
- Type returnType,
- ApiCallback<T> callback)
<T> void
executeAsync(okhttp3.Call call,
- ApiCallback<T> callback)
getAuthentication(String authName)
int
dateFormat
.okhttp3.OkHttpClient
getJSON()
keyManagers
.int
int
guessContentTypeFromFile(File file)
<T> T
handleResponse(okhttp3.Response response,
- Type returnType)
boolean
boolean
isJsonMime(String mime)
boolean
parameterToPair(String name,
- Object value)
Pair
object.parameterToPairs(String collectionFormat,
- String name,
- Collection value)
Pair
objects.parameterToString(Object param)
prepareDownloadFile(okhttp3.Response response)
void
processCookieParams(Map<String,String> cookieParams,
- okhttp3.Request.Builder reqBuilder)
void
processHeaderParams(Map<String,String> headerParams,
- okhttp3.Request.Builder reqBuilder)
sanitizeFilename(String filename)
selectHeaderAccept(String[] accepts)
selectHeaderContentType(String[] contentTypes)
okhttp3.RequestBody
void
setAccessToken(String accessToken)
void
void
setApiKeyPrefix(String apiKeyPrefix)
setBasePath(String basePath)
setConnectTimeout(int connectionTimeout)
setDateFormat(DateFormat dateFormat)
dateFormat
.setDebugging(boolean debugging)
setHttpClient(okhttp3.OkHttpClient newHttpClient)
setKeyManagers(KeyManager[] managers)
setLenientOnJson(boolean lenientOnJson)
setLocalDateFormat(DateTimeFormatter dateFormat)
setOffsetDateTimeFormat(DateTimeFormatter dateFormat)
void
setPassword(String password)
setReadTimeout(int readTimeout)
setSqlDateFormat(DateFormat dateFormat)
setSslCaCert(InputStream sslCaCert)
setTempFolderPath(String tempFolderPath)
setUserAgent(String userAgent)
void
setUsername(String username)
setVerifyingSsl(boolean verifyingSsl)
setWriteTimeout(int writeTimeout)
void
updateParamsForAuth(String[] authNames,
- List<Pair> queryParams,
- Map<String,String> headerParams,
- Map<String,String> cookieParams,
- String payload,
- String method,
- URI uri)
client
- a OkHttpClient
objectbasePath
- Base path of the URL (e.g http://localhostnewHttpClient
- An instance of OkHttpClientNullPointerException
- when newHttpClient is nulljson
- JSON objectverifyingSsl
- True to verify TLS/SSL connectionsslCaCert
- input stream for SSL CA certGetter for the field keyManagers
.
KeyManager
objectsmanagers
- The KeyManagers to useGetter for the field dateFormat
.
DateFormat
objectSetter for the field dateFormat
.
dateFormat
- a DateFormat
objectApiClient
objectSet SqlDateFormat.
dateFormat
- a DateFormat
objectApiClient
objectSet OffsetDateTimeFormat.
dateFormat
- a DateTimeFormatter
objectApiClient
objectSet LocalDateFormat.
dateFormat
- a DateTimeFormatter
objectApiClient
objectSet LenientOnJson.
lenientOnJson
- a booleanApiClient
objectauthName
- The authentication nameusername
- Usernamepassword
- PasswordapiKey
- API keyapiKeyPrefix
- API key prefixaccessToken
- Access tokenuserAgent
- HTTP request's user agentkey
- The header's keyvalue
- The header's valuekey
- The cookie's keyvalue
- The cookie's valuedebugging
- To enable (true) or disable (false) debuggingnull
, i.e. using
- the system's default temporary folder.tempFolderPath
- Temporary folder pathInteger.MAX_VALUE
.connectionTimeout
- connection timeout in millisecondsInteger.MAX_VALUE
.readTimeout
- read timeout in millisecondsInteger.MAX_VALUE
.writeTimeout
- connection timeout in millisecondsparam
- ParameterPair
object.
-
- Note that value
must not be a collection.name
- The name of the parameter.value
- The value of the parameter.Pair
object.Pair
objects.
-
- Note that the values of each of the returned Pair objects are percent-encoded.collectionFormat
- The collection format of the parameter.name
- The name of the parameter.value
- The value of the parameter.Pair
objects.collectionFormat
- The collection format of the parameter.value
- The value of the parameter.filename
- The filename to be sanitizedmime
- MIME (Multipurpose Internet Mail Extensions)accepts
- The accepts array to select fromcontentTypes
- The Content-Type array to select fromstr
- String to be escapedT
- Typeresponse
- HTTP responsereturnType
- The type of the Java objectApiException
- If fail to deserialize response body, i.e. cannot read response body
- or the Content-Type of the response is not supported.obj
- The Java objectcontentType
- The request Content-TypeApiException
- If fail to serialize the given objectresponse
- An instance of the Response objectApiException
- If fail to read file content from response and write to diskresponse
- An instance of the Response objectIOException
- If fail to prepare file for downloadT
- Typecall
- An instance of the Call objectApiException
- If fail to execute the callT
- The return type corresponding to (same with) returnTypereturnType
- The return type used to deserialize HTTP response bodycall
- CallApiException
- If fail to execute the callT
- Typecall
- An instance of the Call objectcallback
- ApiCallback<T>T
- Typecall
- The callback to be executed when the API call finishesreturnType
- Return typecallback
- ApiCallbackT
- Typeresponse
- ResponsereturnType
- Return typeApiException
- If the response has an unsuccessful status code or
- fail to deserialize the response bodybaseUrl
- The base URLpath
- The sub-path of the HTTP URLmethod
- The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE"queryParams
- The query parameterscollectionQueryParams
- The collection query parametersbody
- The request body objectheaderParams
- The header parameterscookieParams
- The cookie parametersformParams
- The form parametersauthNames
- The authentications to applycallback
- Callback for upload/download progressApiException
- If fail to serialize the request body objectbaseUrl
- The base URLpath
- The sub-path of the HTTP URLmethod
- The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE"queryParams
- The query parameterscollectionQueryParams
- The collection query parametersbody
- The request body objectheaderParams
- The header parameterscookieParams
- The cookie parametersformParams
- The form parametersauthNames
- The authentications to applycallback
- Callback for upload/download progressApiException
- If fail to serialize the request body objectbaseUrl
- The base URLpath
- The sub pathqueryParams
- The query parameterscollectionQueryParams
- The collection query parametersheaderParams
- Header parameters in the form of MapreqBuilder
- Request.BuildercookieParams
- Cookie parameters in the form of MapreqBuilder
- Request.BuilderauthNames
- The authentications to applyqueryParams
- List of query parametersheaderParams
- Map of header parameterscookieParams
- Map of cookie parameterspayload
- HTTP request bodymethod
- HTTP methoduri
- URIApiException
- If fails to update the parametersformParams
- Form parameters in the form of MapformParams
- Form parameters in the form of Mapfile
- The given fileSerializable
ApiException class.
ApiException(int code,
- String message)
ApiException(int code,
- String message,
- Map<String,List<String>> responseHeaders,
- String responseBody)
ApiException(String message)
ApiException(String message,
- int code,
- Map<String,List<String>> responseHeaders,
- String responseBody)
ApiException(String message,
- Throwable throwable,
- int code,
- Map<String,List<String>> responseHeaders)
ApiException(String message,
- Throwable throwable,
- int code,
- Map<String,List<String>> responseHeaders,
- String responseBody)
ApiException(Throwable throwable)
int
getCode()
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Constructor for ApiException.
Constructor for ApiException.
throwable
- a Throwable
objectConstructor for ApiException.
message
- the error messageConstructor for ApiException.
Constructor for ApiException.
message
- the error messagecode
- HTTP status coderesponseHeaders
- a Map
of HTTP response headersresponseBody
- the response bodyConstructor for ApiException.
Constructor for ApiException.
code
- HTTP status coderesponseHeaders
- a Map
of HTTP response headersresponseBody
- the response bodyConstructor for ApiException.
code
- HTTP status codemessage
- a String
objectConstructor for ApiException.
code
- HTTP status codemessage
- the error messageresponseHeaders
- a Map
of HTTP response headersresponseBody
- the response bodygetMessage
in class Throwable
getData()
data
.headers
.int
status code
.Constructor for ApiResponse.
statusCode
- The status code of HTTP responseheaders
- The headers of HTTP responseConstructor for ApiResponse.
statusCode
- The status code of HTTP responseheaders
- The headers of HTTP responsedata
- The object deserialized from response bodGet the status code
.
Get the headers
.
Map
of headersGet the data
.
static ApiClient
static void
setDefaultApiClient(ApiClient apiClient)
apiClient
- API clientJSON
fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree
write
in class com.google.gson.TypeAdapter<byte[]>
IOException
read
in class com.google.gson.TypeAdapter<byte[]>
IOException
JSON
fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree
write
in class com.google.gson.TypeAdapter<Date>
IOException
read
in class com.google.gson.TypeAdapter<Date>
IOException
JSON
fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree
write
in class com.google.gson.TypeAdapter<LocalDate>
IOException
read
in class com.google.gson.TypeAdapter<LocalDate>
IOException
JSON
read(com.google.gson.stream.JsonReader in)
void
setFormat(DateTimeFormatter dateFormat)
void
write(com.google.gson.stream.JsonWriter out,
- OffsetDateTime date)
fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree
write
in class com.google.gson.TypeAdapter<OffsetDateTime>
IOException
read
in class com.google.gson.TypeAdapter<OffsetDateTime>
IOException
JSON
fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree
write
in class com.google.gson.TypeAdapter<Date>
IOException
read
in class com.google.gson.TypeAdapter<Date>
IOException
static class
static class
static class
static class
static class
static com.google.gson.GsonBuilder
static <T> T
deserialize(String body,
- Type returnType)
static com.google.gson.Gson
getGson()
static String
static void
setDateFormat(DateFormat dateFormat)
static void
setGson(com.google.gson.Gson gson)
static void
setLenientOnJson(boolean lenientOnJson)
static void
setLocalDateFormat(DateTimeFormatter dateFormat)
static void
setOffsetDateTimeFormat(DateTimeFormatter dateFormat)
static void
setSqlDateFormat(DateFormat dateFormat)
gson
- Gsonobj
- ObjectT
- Typebody
- The JSON stringreturnType
- The type to deserialize intookhttp3.RequestBody.Companion
Companion
ProgressRequestBody(okhttp3.RequestBody requestBody,
- ApiCallback callback)
long
okhttp3.MediaType
void
writeTo(okio.BufferedSink sink)
create, create, create, create, create, create, create, create, create, create, create, create, create, isDuplex, isOneShot
contentType
in class okhttp3.RequestBody
contentLength
in class okhttp3.RequestBody
IOException
writeTo
in class okhttp3.RequestBody
IOException
Closeable
, AutoCloseable
okhttp3.ResponseBody.BomAwareReader, okhttp3.ResponseBody.Companion
Companion
ProgressResponseBody(okhttp3.ResponseBody responseBody,
- ApiCallback callback)
long
okhttp3.MediaType
okio.BufferedSource
source()
bytes, byteStream, byteString, charStream, close, create, create, create, create, create, create, create, create, string
contentType
in class okhttp3.ResponseBody
contentLength
in class okhttp3.ResponseBody
source
in class okhttp3.ResponseBody
ServerConfiguration(String URL,
- String description,
- Map<String,ServerVariable> variables)
URL
- A URL to the target host.description
- A description of the host designated by the URL.variables
- A map between a variable name and its value. The value is used for substitution in the server's URL template.variables
- A map between a variable name and its value.ServerVariable(String description,
- String defaultValue,
- HashSet<String> enumValues)
description
- A description for the server variable.defaultValue
- The default value to use for substitution.enumValues
- An enumeration of string values to be used if the substitution options are from a limited set.static boolean
containsIgnoreCase(String[] array,
- String value)
static String
static String
join(Collection<String> list,
- String separator)
array
- The arrayvalue
- The value to search- Note: This might be replaced by utility method from commons-lang or guava someday - if one of those libraries is added as dependency. -
array
- The array of stringsseparator
- The separatorlist
- The list of stringsseparator
- The separatorbatchForecastDataAsync(List<EmissionsForecastBatchParametersDTO> emissionsForecastBatchParametersDTO)
okhttp3.Call
batchForecastDataAsyncAsync(List<EmissionsForecastBatchParametersDTO> emissionsForecastBatchParametersDTO,
- ApiCallback<List<EmissionsForecastDTO>> _callback)
okhttp3.Call
batchForecastDataAsyncCall(List<EmissionsForecastBatchParametersDTO> emissionsForecastBatchParametersDTO,
- ApiCallback _callback)
batchForecastDataAsyncWithHttpInfo(List<EmissionsForecastBatchParametersDTO> emissionsForecastBatchParametersDTO)
getAverageCarbonIntensity(String location,
- OffsetDateTime startTime,
- OffsetDateTime endTime)
okhttp3.Call
getAverageCarbonIntensityAsync(String location,
- OffsetDateTime startTime,
- OffsetDateTime endTime,
- ApiCallback<CarbonIntensityDTO> _callback)
getAverageCarbonIntensityBatch(List<CarbonIntensityBatchParametersDTO> carbonIntensityBatchParametersDTO)
okhttp3.Call
getAverageCarbonIntensityBatchAsync(List<CarbonIntensityBatchParametersDTO> carbonIntensityBatchParametersDTO,
- ApiCallback<List<CarbonIntensityDTO>> _callback)
okhttp3.Call
getAverageCarbonIntensityBatchCall(List<CarbonIntensityBatchParametersDTO> carbonIntensityBatchParametersDTO,
- ApiCallback _callback)
getAverageCarbonIntensityBatchWithHttpInfo(List<CarbonIntensityBatchParametersDTO> carbonIntensityBatchParametersDTO)
okhttp3.Call
getAverageCarbonIntensityCall(String location,
- OffsetDateTime startTime,
- OffsetDateTime endTime,
- ApiCallback _callback)
getAverageCarbonIntensityWithHttpInfo(String location,
- OffsetDateTime startTime,
- OffsetDateTime endTime)
getBestEmissionsDataForLocationsByTime(List<String> location,
- OffsetDateTime time,
- OffsetDateTime toTime)
okhttp3.Call
getBestEmissionsDataForLocationsByTimeAsync(List<String> location,
- OffsetDateTime time,
- OffsetDateTime toTime,
- ApiCallback<List<EmissionsData>> _callback)
okhttp3.Call
getBestEmissionsDataForLocationsByTimeCall(List<String> location,
- OffsetDateTime time,
- OffsetDateTime toTime,
- ApiCallback _callback)
getBestEmissionsDataForLocationsByTimeWithHttpInfo(List<String> location,
- OffsetDateTime time,
- OffsetDateTime toTime)
getCurrentForecastData(List<String> location,
- OffsetDateTime dataStartAt,
- OffsetDateTime dataEndAt,
- Integer windowSize)
okhttp3.Call
getCurrentForecastDataAsync(List<String> location,
- OffsetDateTime dataStartAt,
- OffsetDateTime dataEndAt,
- Integer windowSize,
- ApiCallback<List<EmissionsForecastDTO>> _callback)
okhttp3.Call
getCurrentForecastDataCall(List<String> location,
- OffsetDateTime dataStartAt,
- OffsetDateTime dataEndAt,
- Integer windowSize,
- ApiCallback _callback)
getCurrentForecastDataWithHttpInfo(List<String> location,
- OffsetDateTime dataStartAt,
- OffsetDateTime dataEndAt,
- Integer windowSize)
getEmissionsDataForLocationByTime(String location,
- OffsetDateTime time,
- OffsetDateTime toTime)
okhttp3.Call
getEmissionsDataForLocationByTimeAsync(String location,
- OffsetDateTime time,
- OffsetDateTime toTime,
- ApiCallback<List<EmissionsData>> _callback)
okhttp3.Call
getEmissionsDataForLocationByTimeCall(String location,
- OffsetDateTime time,
- OffsetDateTime toTime,
- ApiCallback _callback)
getEmissionsDataForLocationByTimeWithHttpInfo(String location,
- OffsetDateTime time,
- OffsetDateTime toTime)
getEmissionsDataForLocationsByTime(List<String> location,
- OffsetDateTime time,
- OffsetDateTime toTime)
okhttp3.Call
getEmissionsDataForLocationsByTimeAsync(List<String> location,
- OffsetDateTime time,
- OffsetDateTime toTime,
- ApiCallback<List<EmissionsData>> _callback)
okhttp3.Call
getEmissionsDataForLocationsByTimeCall(List<String> location,
- OffsetDateTime time,
- OffsetDateTime toTime,
- ApiCallback _callback)
getEmissionsDataForLocationsByTimeWithHttpInfo(List<String> location,
- OffsetDateTime time,
- OffsetDateTime toTime)
int
void
setApiClient(ApiClient apiClient)
void
setCustomBaseUrl(String customBaseUrl)
void
setHostIndex(int hostIndex)
emissionsForecastBatchParametersDTO
- Array of requested forecasts. (optional)_callback
- Callback for upload/download progressApiException
- If fail to serialize the request body objectStatus Code | Description | Response Headers |
200 | Returns the requested forecast objects | - |
400 | Returned if any of the input parameters are invalid | - |
500 | Internal server error | - |
501 | Returned if the underlying data source does not support forecasting | - |
emissionsForecastBatchParametersDTO
- Array of requested forecasts. (optional)ApiException
- If fail to call the API, e.g. server error or cannot deserialize the response bodyStatus Code | Description | Response Headers |
200 | Returns the requested forecast objects | - |
400 | Returned if any of the input parameters are invalid | - |
500 | Internal server error | - |
501 | Returned if the underlying data source does not support forecasting | - |
emissionsForecastBatchParametersDTO
- Array of requested forecasts. (optional)ApiException
- If fail to call the API, e.g. server error or cannot deserialize the response bodyStatus Code | Description | Response Headers |
200 | Returns the requested forecast objects | - |
400 | Returned if any of the input parameters are invalid | - |
500 | Internal server error | - |
501 | Returned if the underlying data source does not support forecasting | - |
emissionsForecastBatchParametersDTO
- Array of requested forecasts. (optional)_callback
- The callback to be executed when the API call finishesApiException
- If fail to process the API call, e.g. serializing the request body objectStatus Code | Description | Response Headers |
200 | Returns the requested forecast objects | - |
400 | Returned if any of the input parameters are invalid | - |
500 | Internal server error | - |
501 | Returned if the underlying data source does not support forecasting | - |
location
- The location name where workflow is run (required)startTime
- The time at which the workflow we are measuring carbon intensity for started (required)endTime
- The time at which the workflow we are measuring carbon intensity for ended (required)_callback
- Callback for upload/download progressApiException
- If fail to serialize the request body objectStatus Code | Description | Response Headers |
200 | Returns a single object that contains the information about the request and the average marginal carbon intensity | - |
400 | Returned if any of the requested items are invalid | - |
500 | Internal server error | - |
location
- The location name where workflow is run (required)startTime
- The time at which the workflow we are measuring carbon intensity for started (required)endTime
- The time at which the workflow we are measuring carbon intensity for ended (required)ApiException
- If fail to call the API, e.g. server error or cannot deserialize the response bodyStatus Code | Description | Response Headers |
200 | Returns a single object that contains the information about the request and the average marginal carbon intensity | - |
400 | Returned if any of the requested items are invalid | - |
500 | Internal server error | - |
location
- The location name where workflow is run (required)startTime
- The time at which the workflow we are measuring carbon intensity for started (required)endTime
- The time at which the workflow we are measuring carbon intensity for ended (required)ApiException
- If fail to call the API, e.g. server error or cannot deserialize the response bodyStatus Code | Description | Response Headers |
200 | Returns a single object that contains the information about the request and the average marginal carbon intensity | - |
400 | Returned if any of the requested items are invalid | - |
500 | Internal server error | - |
location
- The location name where workflow is run (required)startTime
- The time at which the workflow we are measuring carbon intensity for started (required)endTime
- The time at which the workflow we are measuring carbon intensity for ended (required)_callback
- The callback to be executed when the API call finishesApiException
- If fail to process the API call, e.g. serializing the request body objectStatus Code | Description | Response Headers |
200 | Returns a single object that contains the information about the request and the average marginal carbon intensity | - |
400 | Returned if any of the requested items are invalid | - |
500 | Internal server error | - |
carbonIntensityBatchParametersDTO
- Array of inputs where each contains a \"location\", \"startDate\", and \"endDate\" for which to calculate average marginal carbon intensity. (optional)_callback
- Callback for upload/download progressApiException
- If fail to serialize the request body objectStatus Code | Description | Response Headers |
200 | Returns an array of objects where each contains location, time boundaries and the corresponding average marginal carbon intensity | - |
400 | Returned if any of the requested items are invalid | - |
500 | Internal server error | - |
carbonIntensityBatchParametersDTO
- Array of inputs where each contains a \"location\", \"startDate\", and \"endDate\" for which to calculate average marginal carbon intensity. (optional)ApiException
- If fail to call the API, e.g. server error or cannot deserialize the response bodyStatus Code | Description | Response Headers |
200 | Returns an array of objects where each contains location, time boundaries and the corresponding average marginal carbon intensity | - |
400 | Returned if any of the requested items are invalid | - |
500 | Internal server error | - |
carbonIntensityBatchParametersDTO
- Array of inputs where each contains a \"location\", \"startDate\", and \"endDate\" for which to calculate average marginal carbon intensity. (optional)ApiException
- If fail to call the API, e.g. server error or cannot deserialize the response bodyStatus Code | Description | Response Headers |
200 | Returns an array of objects where each contains location, time boundaries and the corresponding average marginal carbon intensity | - |
400 | Returned if any of the requested items are invalid | - |
500 | Internal server error | - |
carbonIntensityBatchParametersDTO
- Array of inputs where each contains a \"location\", \"startDate\", and \"endDate\" for which to calculate average marginal carbon intensity. (optional)_callback
- The callback to be executed when the API call finishesApiException
- If fail to process the API call, e.g. serializing the request body objectStatus Code | Description | Response Headers |
200 | Returns an array of objects where each contains location, time boundaries and the corresponding average marginal carbon intensity | - |
400 | Returned if any of the requested items are invalid | - |
500 | Internal server error | - |
location
- String array of named locations (required)time
- [Optional] Start time for the data query. (optional)toTime
- [Optional] End time for the data query. (optional)_callback
- Callback for upload/download progressApiException
- If fail to serialize the request body objectStatus Code | Description | Response Headers |
200 | Success | - |
204 | No Content | - |
400 | Bad Request | - |
location
- String array of named locations (required)time
- [Optional] Start time for the data query. (optional)toTime
- [Optional] End time for the data query. (optional)ApiException
- If fail to call the API, e.g. server error or cannot deserialize the response bodyStatus Code | Description | Response Headers |
200 | Success | - |
204 | No Content | - |
400 | Bad Request | - |
location
- String array of named locations (required)time
- [Optional] Start time for the data query. (optional)toTime
- [Optional] End time for the data query. (optional)ApiException
- If fail to call the API, e.g. server error or cannot deserialize the response bodyStatus Code | Description | Response Headers |
200 | Success | - |
204 | No Content | - |
400 | Bad Request | - |
location
- String array of named locations (required)time
- [Optional] Start time for the data query. (optional)toTime
- [Optional] End time for the data query. (optional)_callback
- The callback to be executed when the API call finishesApiException
- If fail to process the API call, e.g. serializing the request body objectStatus Code | Description | Response Headers |
200 | Success | - |
204 | No Content | - |
400 | Bad Request | - |
location
- String array of named locations (required)dataStartAt
- Start time boundary of forecasted data points.Ignores current forecast data points before this time. Defaults to the earliest time in the forecast data. (optional)dataEndAt
- End time boundary of forecasted data points. Ignores current forecast data points after this time. Defaults to the latest time in the forecast data. (optional)windowSize
- The estimated duration (in minutes) of the workload. Defaults to the duration of a single forecast data point. (optional)_callback
- Callback for upload/download progressApiException
- If fail to serialize the request body objectStatus Code | Description | Response Headers |
200 | Returns the requested forecast objects | - |
400 | Returned if any of the input parameters are invalid | - |
500 | Internal server error | - |
501 | Returned if the underlying data source does not support forecasting | - |
location
- String array of named locations (required)dataStartAt
- Start time boundary of forecasted data points.Ignores current forecast data points before this time. Defaults to the earliest time in the forecast data. (optional)dataEndAt
- End time boundary of forecasted data points. Ignores current forecast data points after this time. Defaults to the latest time in the forecast data. (optional)windowSize
- The estimated duration (in minutes) of the workload. Defaults to the duration of a single forecast data point. (optional)ApiException
- If fail to call the API, e.g. server error or cannot deserialize the response bodyStatus Code | Description | Response Headers |
200 | Returns the requested forecast objects | - |
400 | Returned if any of the input parameters are invalid | - |
500 | Internal server error | - |
501 | Returned if the underlying data source does not support forecasting | - |
location
- String array of named locations (required)dataStartAt
- Start time boundary of forecasted data points.Ignores current forecast data points before this time. Defaults to the earliest time in the forecast data. (optional)dataEndAt
- End time boundary of forecasted data points. Ignores current forecast data points after this time. Defaults to the latest time in the forecast data. (optional)windowSize
- The estimated duration (in minutes) of the workload. Defaults to the duration of a single forecast data point. (optional)ApiException
- If fail to call the API, e.g. server error or cannot deserialize the response bodyStatus Code | Description | Response Headers |
200 | Returns the requested forecast objects | - |
400 | Returned if any of the input parameters are invalid | - |
500 | Internal server error | - |
501 | Returned if the underlying data source does not support forecasting | - |
location
- String array of named locations (required)dataStartAt
- Start time boundary of forecasted data points.Ignores current forecast data points before this time. Defaults to the earliest time in the forecast data. (optional)dataEndAt
- End time boundary of forecasted data points. Ignores current forecast data points after this time. Defaults to the latest time in the forecast data. (optional)windowSize
- The estimated duration (in minutes) of the workload. Defaults to the duration of a single forecast data point. (optional)_callback
- The callback to be executed when the API call finishesApiException
- If fail to process the API call, e.g. serializing the request body objectStatus Code | Description | Response Headers |
200 | Returns the requested forecast objects | - |
400 | Returned if any of the input parameters are invalid | - |
500 | Internal server error | - |
501 | Returned if the underlying data source does not support forecasting | - |
location
- String named location. (required)time
- [Optional] Start time for the data query. (optional)toTime
- [Optional] End time for the data query. (optional)_callback
- Callback for upload/download progressApiException
- If fail to serialize the request body objectStatus Code | Description | Response Headers |
200 | Success | - |
204 | No Content | - |
400 | Bad Request | - |
location
- String named location. (required)time
- [Optional] Start time for the data query. (optional)toTime
- [Optional] End time for the data query. (optional)ApiException
- If fail to call the API, e.g. server error or cannot deserialize the response bodyStatus Code | Description | Response Headers |
200 | Success | - |
204 | No Content | - |
400 | Bad Request | - |
location
- String named location. (required)time
- [Optional] Start time for the data query. (optional)toTime
- [Optional] End time for the data query. (optional)ApiException
- If fail to call the API, e.g. server error or cannot deserialize the response bodyStatus Code | Description | Response Headers |
200 | Success | - |
204 | No Content | - |
400 | Bad Request | - |
location
- String named location. (required)time
- [Optional] Start time for the data query. (optional)toTime
- [Optional] End time for the data query. (optional)_callback
- The callback to be executed when the API call finishesApiException
- If fail to process the API call, e.g. serializing the request body objectStatus Code | Description | Response Headers |
200 | Success | - |
204 | No Content | - |
400 | Bad Request | - |
location
- String array of named locations (required)time
- [Optional] Start time for the data query. (optional)toTime
- [Optional] End time for the data query. (optional)_callback
- Callback for upload/download progressApiException
- If fail to serialize the request body objectStatus Code | Description | Response Headers |
200 | Success | - |
204 | No Content | - |
400 | Bad Request | - |
location
- String array of named locations (required)time
- [Optional] Start time for the data query. (optional)toTime
- [Optional] End time for the data query. (optional)ApiException
- If fail to call the API, e.g. server error or cannot deserialize the response bodyStatus Code | Description | Response Headers |
200 | Success | - |
204 | No Content | - |
400 | Bad Request | - |
location
- String array of named locations (required)time
- [Optional] Start time for the data query. (optional)toTime
- [Optional] End time for the data query. (optional)ApiException
- If fail to call the API, e.g. server error or cannot deserialize the response bodyStatus Code | Description | Response Headers |
200 | Success | - |
204 | No Content | - |
400 | Bad Request | - |
location
- String array of named locations (required)time
- [Optional] Start time for the data query. (optional)toTime
- [Optional] End time for the data query. (optional)_callback
- The callback to be executed when the API call finishesApiException
- If fail to process the API call, e.g. serializing the request body objectStatus Code | Description | Response Headers |
200 | Success | - |
204 | No Content | - |
400 | Bad Request | - |
Authentication
void
applyToParams(List<Pair> queryParams,
- Map<String,String> headerParams,
- Map<String,String> cookieParams,
- String payload,
- String method,
- URI uri)
void
void
setApiKeyPrefix(String apiKeyPrefix)
Authentication
applyToParams
in interface Authentication
queryParams
- List of query parametersheaderParams
- Map of header parameterscookieParams
- Map of cookie parameterspayload
- HTTP request bodymethod
- HTTP methoduri
- URIApiException
- if failed to update the parametersApiKeyAuth
, HttpBasicAuth
, HttpBearerAuth
queryParams
- List of query parametersheaderParams
- Map of header parameterscookieParams
- Map of cookie parameterspayload
- HTTP request bodymethod
- HTTP methoduri
- URIApiException
- if failed to update the parametersAuthentication
void
applyToParams(List<Pair> queryParams,
- Map<String,String> headerParams,
- Map<String,String> cookieParams,
- String payload,
- String method,
- URI uri)
void
setPassword(String password)
void
setUsername(String username)
Authentication
applyToParams
in interface Authentication
queryParams
- List of query parametersheaderParams
- Map of header parameterscookieParams
- Map of cookie parameterspayload
- HTTP request bodymethod
- HTTP methoduri
- URIApiException
- if failed to update the parametersAuthentication
void
applyToParams(List<Pair> queryParams,
- Map<String,String> headerParams,
- Map<String,String> cookieParams,
- String payload,
- String method,
- URI uri)
void
setBearerToken(String bearerToken)
bearerToken
- The bearer token to send in the Authorization headerAuthentication
applyToParams
in interface Authentication
queryParams
- List of query parametersheaderParams
- Map of header parameterscookieParams
- Map of cookie parameterspayload
- HTTP request bodymethod
- HTTP methoduri
- URIApiException
- if failed to update the parametersgetAuthentication(String authName)
getAuthentications()
class
class
class
okhttp3.Call
buildCall(String baseUrl,
- String path,
- String method,
- List<Pair> queryParams,
- List<Pair> collectionQueryParams,
- Object body,
- Map<String,String> headerParams,
- Map<String,String> cookieParams,
- Map<String,Object> formParams,
- String[] authNames,
- ApiCallback callback)
okhttp3.Request
buildRequest(String baseUrl,
- String path,
- String method,
- List<Pair> queryParams,
- List<Pair> collectionQueryParams,
- Object body,
- Map<String,String> headerParams,
- Map<String,String> cookieParams,
- Map<String,Object> formParams,
- String[] authNames,
- ApiCallback callback)
<T> void
executeAsync(okhttp3.Call call,
- Type returnType,
- ApiCallback<T> callback)
<T> void
executeAsync(okhttp3.Call call,
- ApiCallback<T> callback)
ProgressRequestBody(okhttp3.RequestBody requestBody,
- ApiCallback callback)
ProgressResponseBody(okhttp3.ResponseBody responseBody,
- ApiCallback callback)
okhttp3.Call
batchForecastDataAsyncAsync(List<EmissionsForecastBatchParametersDTO> emissionsForecastBatchParametersDTO,
- ApiCallback<List<EmissionsForecastDTO>> _callback)
okhttp3.Call
batchForecastDataAsyncCall(List<EmissionsForecastBatchParametersDTO> emissionsForecastBatchParametersDTO,
- ApiCallback _callback)
okhttp3.Call
getAverageCarbonIntensityAsync(String location,
- OffsetDateTime startTime,
- OffsetDateTime endTime,
- ApiCallback<CarbonIntensityDTO> _callback)
okhttp3.Call
getAverageCarbonIntensityBatchAsync(List<CarbonIntensityBatchParametersDTO> carbonIntensityBatchParametersDTO,
- ApiCallback<List<CarbonIntensityDTO>> _callback)
okhttp3.Call
getAverageCarbonIntensityBatchCall(List<CarbonIntensityBatchParametersDTO> carbonIntensityBatchParametersDTO,
- ApiCallback _callback)
okhttp3.Call
getAverageCarbonIntensityCall(String location,
- OffsetDateTime startTime,
- OffsetDateTime endTime,
- ApiCallback _callback)
okhttp3.Call
getBestEmissionsDataForLocationsByTimeAsync(List<String> location,
- OffsetDateTime time,
- OffsetDateTime toTime,
- ApiCallback<List<EmissionsData>> _callback)
okhttp3.Call
getBestEmissionsDataForLocationsByTimeCall(List<String> location,
- OffsetDateTime time,
- OffsetDateTime toTime,
- ApiCallback _callback)
okhttp3.Call
getCurrentForecastDataAsync(List<String> location,
- OffsetDateTime dataStartAt,
- OffsetDateTime dataEndAt,
- Integer windowSize,
- ApiCallback<List<EmissionsForecastDTO>> _callback)
okhttp3.Call
getCurrentForecastDataCall(List<String> location,
- OffsetDateTime dataStartAt,
- OffsetDateTime dataEndAt,
- Integer windowSize,
- ApiCallback _callback)
okhttp3.Call
getEmissionsDataForLocationByTimeAsync(String location,
- OffsetDateTime time,
- OffsetDateTime toTime,
- ApiCallback<List<EmissionsData>> _callback)
okhttp3.Call
getEmissionsDataForLocationByTimeCall(String location,
- OffsetDateTime time,
- OffsetDateTime toTime,
- ApiCallback _callback)
okhttp3.Call
getEmissionsDataForLocationsByTimeAsync(List<String> location,
- OffsetDateTime time,
- OffsetDateTime toTime,
- ApiCallback<List<EmissionsData>> _callback)
okhttp3.Call
getEmissionsDataForLocationsByTimeCall(List<String> location,
- OffsetDateTime time,
- OffsetDateTime toTime,
- ApiCallback _callback)
addDefaultCookie(String key,
- String value)
addDefaultHeader(String key,
- String value)
static ApiClient
getDefaultApiClient()
setBasePath(String basePath)
setConnectTimeout(int connectionTimeout)
setDateFormat(DateFormat dateFormat)
dateFormat
.setDebugging(boolean debugging)
setHttpClient(okhttp3.OkHttpClient newHttpClient)
setKeyManagers(KeyManager[] managers)
setLenientOnJson(boolean lenientOnJson)
setLocalDateFormat(DateTimeFormatter dateFormat)
setOffsetDateTimeFormat(DateTimeFormatter dateFormat)
setReadTimeout(int readTimeout)
setSqlDateFormat(DateFormat dateFormat)
setSslCaCert(InputStream sslCaCert)
setTempFolderPath(String tempFolderPath)
setUserAgent(String userAgent)
setVerifyingSsl(boolean verifyingSsl)
setWriteTimeout(int writeTimeout)
static void
setDefaultApiClient(ApiClient apiClient)
void
okhttp3.Call
buildCall(String baseUrl,
- String path,
- String method,
- List<Pair> queryParams,
- List<Pair> collectionQueryParams,
- Object body,
- Map<String,String> headerParams,
- Map<String,String> cookieParams,
- Map<String,Object> formParams,
- String[] authNames,
- ApiCallback callback)
okhttp3.Request
buildRequest(String baseUrl,
- String path,
- String method,
- List<Pair> queryParams,
- List<Pair> collectionQueryParams,
- Object body,
- Map<String,String> headerParams,
- Map<String,String> cookieParams,
- Map<String,Object> formParams,
- String[] authNames,
- ApiCallback callback)
<T> T
deserialize(okhttp3.Response response,
- Type returnType)
downloadFileFromResponse(okhttp3.Response response)
<T> ApiResponse<T>
execute(okhttp3.Call call)
<T> ApiResponse<T>
<T> T
handleResponse(okhttp3.Response response,
- Type returnType)
okhttp3.RequestBody
void
updateParamsForAuth(String[] authNames,
- List<Pair> queryParams,
- Map<String,String> headerParams,
- Map<String,String> cookieParams,
- String payload,
- String method,
- URI uri)
batchForecastDataAsync(List<EmissionsForecastBatchParametersDTO> emissionsForecastBatchParametersDTO)
okhttp3.Call
batchForecastDataAsyncAsync(List<EmissionsForecastBatchParametersDTO> emissionsForecastBatchParametersDTO,
- ApiCallback<List<EmissionsForecastDTO>> _callback)
okhttp3.Call
batchForecastDataAsyncCall(List<EmissionsForecastBatchParametersDTO> emissionsForecastBatchParametersDTO,
- ApiCallback _callback)
batchForecastDataAsyncWithHttpInfo(List<EmissionsForecastBatchParametersDTO> emissionsForecastBatchParametersDTO)
getAverageCarbonIntensity(String location,
- OffsetDateTime startTime,
- OffsetDateTime endTime)
okhttp3.Call
getAverageCarbonIntensityAsync(String location,
- OffsetDateTime startTime,
- OffsetDateTime endTime,
- ApiCallback<CarbonIntensityDTO> _callback)
getAverageCarbonIntensityBatch(List<CarbonIntensityBatchParametersDTO> carbonIntensityBatchParametersDTO)
okhttp3.Call
getAverageCarbonIntensityBatchAsync(List<CarbonIntensityBatchParametersDTO> carbonIntensityBatchParametersDTO,
- ApiCallback<List<CarbonIntensityDTO>> _callback)
okhttp3.Call
getAverageCarbonIntensityBatchCall(List<CarbonIntensityBatchParametersDTO> carbonIntensityBatchParametersDTO,
- ApiCallback _callback)
getAverageCarbonIntensityBatchWithHttpInfo(List<CarbonIntensityBatchParametersDTO> carbonIntensityBatchParametersDTO)
okhttp3.Call
getAverageCarbonIntensityCall(String location,
- OffsetDateTime startTime,
- OffsetDateTime endTime,
- ApiCallback _callback)
getAverageCarbonIntensityWithHttpInfo(String location,
- OffsetDateTime startTime,
- OffsetDateTime endTime)
getBestEmissionsDataForLocationsByTime(List<String> location,
- OffsetDateTime time,
- OffsetDateTime toTime)
okhttp3.Call
getBestEmissionsDataForLocationsByTimeAsync(List<String> location,
- OffsetDateTime time,
- OffsetDateTime toTime,
- ApiCallback<List<EmissionsData>> _callback)
okhttp3.Call
getBestEmissionsDataForLocationsByTimeCall(List<String> location,
- OffsetDateTime time,
- OffsetDateTime toTime,
- ApiCallback _callback)
getBestEmissionsDataForLocationsByTimeWithHttpInfo(List<String> location,
- OffsetDateTime time,
- OffsetDateTime toTime)
getCurrentForecastData(List<String> location,
- OffsetDateTime dataStartAt,
- OffsetDateTime dataEndAt,
- Integer windowSize)
okhttp3.Call
getCurrentForecastDataAsync(List<String> location,
- OffsetDateTime dataStartAt,
- OffsetDateTime dataEndAt,
- Integer windowSize,
- ApiCallback<List<EmissionsForecastDTO>> _callback)
okhttp3.Call
getCurrentForecastDataCall(List<String> location,
- OffsetDateTime dataStartAt,
- OffsetDateTime dataEndAt,
- Integer windowSize,
- ApiCallback _callback)
getCurrentForecastDataWithHttpInfo(List<String> location,
- OffsetDateTime dataStartAt,
- OffsetDateTime dataEndAt,
- Integer windowSize)
getEmissionsDataForLocationByTime(String location,
- OffsetDateTime time,
- OffsetDateTime toTime)
okhttp3.Call
getEmissionsDataForLocationByTimeAsync(String location,
- OffsetDateTime time,
- OffsetDateTime toTime,
- ApiCallback<List<EmissionsData>> _callback)
okhttp3.Call
getEmissionsDataForLocationByTimeCall(String location,
- OffsetDateTime time,
- OffsetDateTime toTime,
- ApiCallback _callback)
getEmissionsDataForLocationByTimeWithHttpInfo(String location,
- OffsetDateTime time,
- OffsetDateTime toTime)
getEmissionsDataForLocationsByTime(List<String> location,
- OffsetDateTime time,
- OffsetDateTime toTime)
okhttp3.Call
getEmissionsDataForLocationsByTimeAsync(List<String> location,
- OffsetDateTime time,
- OffsetDateTime toTime,
- ApiCallback<List<EmissionsData>> _callback)
okhttp3.Call
getEmissionsDataForLocationsByTimeCall(List<String> location,
- OffsetDateTime time,
- OffsetDateTime toTime,
- ApiCallback _callback)
getEmissionsDataForLocationsByTimeWithHttpInfo(List<String> location,
- OffsetDateTime time,
- OffsetDateTime toTime)
void
applyToParams(List<Pair> queryParams,
- Map<String,String> headerParams,
- Map<String,String> cookieParams,
- String payload,
- String method,
- URI uri)
void
applyToParams(List<Pair> queryParams,
- Map<String,String> headerParams,
- Map<String,String> cookieParams,
- String payload,
- String method,
- URI uri)
void
applyToParams(List<Pair> queryParams,
- Map<String,String> headerParams,
- Map<String,String> cookieParams,
- String payload,
- String method,
- URI uri)
void
applyToParams(List<Pair> queryParams,
- Map<String,String> headerParams,
- Map<String,String> cookieParams,
- String payload,
- String method,
- URI uri)
<T> ApiResponse<T>
execute(okhttp3.Call call)
<T> ApiResponse<T>
batchForecastDataAsyncWithHttpInfo(List<EmissionsForecastBatchParametersDTO> emissionsForecastBatchParametersDTO)
getAverageCarbonIntensityBatchWithHttpInfo(List<CarbonIntensityBatchParametersDTO> carbonIntensityBatchParametersDTO)
getAverageCarbonIntensityWithHttpInfo(String location,
- OffsetDateTime startTime,
- OffsetDateTime endTime)
getBestEmissionsDataForLocationsByTimeWithHttpInfo(List<String> location,
- OffsetDateTime time,
- OffsetDateTime toTime)
getCurrentForecastDataWithHttpInfo(List<String> location,
- OffsetDateTime dataStartAt,
- OffsetDateTime dataEndAt,
- Integer windowSize)
getEmissionsDataForLocationByTimeWithHttpInfo(String location,
- OffsetDateTime time,
- OffsetDateTime toTime)
getEmissionsDataForLocationsByTimeWithHttpInfo(List<String> location,
- OffsetDateTime time,
- OffsetDateTime toTime)
parameterToPair(String name,
- Object value)
Pair
object.parameterToPairs(String collectionFormat,
- String name,
- Collection value)
Pair
objects.okhttp3.Call
buildCall(String baseUrl,
- String path,
- String method,
- List<Pair> queryParams,
- List<Pair> collectionQueryParams,
- Object body,
- Map<String,String> headerParams,
- Map<String,String> cookieParams,
- Map<String,Object> formParams,
- String[] authNames,
- ApiCallback callback)
okhttp3.Request
buildRequest(String baseUrl,
- String path,
- String method,
- List<Pair> queryParams,
- List<Pair> collectionQueryParams,
- Object body,
- Map<String,String> headerParams,
- Map<String,String> cookieParams,
- Map<String,Object> formParams,
- String[] authNames,
- ApiCallback callback)
buildUrl(String baseUrl,
- String path,
- List<Pair> queryParams,
- List<Pair> collectionQueryParams)
void
updateParamsForAuth(String[] authNames,
- List<Pair> queryParams,
- Map<String,String> headerParams,
- Map<String,String> cookieParams,
- String payload,
- String method,
- URI uri)
void
applyToParams(List<Pair> queryParams,
- Map<String,String> headerParams,
- Map<String,String> cookieParams,
- String payload,
- String method,
- URI uri)
void
applyToParams(List<Pair> queryParams,
- Map<String,String> headerParams,
- Map<String,String> cookieParams,
- String payload,
- String method,
- URI uri)
void
applyToParams(List<Pair> queryParams,
- Map<String,String> headerParams,
- Map<String,String> cookieParams,
- String payload,
- String method,
- URI uri)
void
applyToParams(List<Pair> queryParams,
- Map<String,String> headerParams,
- Map<String,String> cookieParams,
- String payload,
- String method,
- URI uri)
ServerConfiguration(String URL,
- String description,
- Map<String,ServerVariable> variables)
boolean
int
hashCode()
void
setActualInstance(Object instance)
toString()
instance
- the actual instance of the schema/objectcom.google.gson.TypeAdapterFactory
CarbonIntensityBatchParametersDTO
<T> com.google.gson.TypeAdapter<T>
create(com.google.gson.Gson gson,
- com.google.gson.reflect.TypeToken<T> type)
create
in interface com.google.gson.TypeAdapterFactory
static class
endTime(OffsetDateTime endTime)
boolean
int
hashCode()
void
setEndTime(OffsetDateTime endTime)
void
setLocation(String location)
void
setStartTime(OffsetDateTime startTime)
startTime(OffsetDateTime startTime)
toJson()
toString()
static void
validateJsonObject(com.google.gson.JsonObject jsonObj)
jsonObj
- JSON ObjectIOException
- if the JSON Object is invalid with respect to CarbonIntensityBatchParametersDTOjsonString
- JSON stringIOException
- if the JSON string is invalid with respect to CarbonIntensityBatchParametersDTOcom.google.gson.TypeAdapterFactory
CarbonIntensityDTO
<T> com.google.gson.TypeAdapter<T>
create(com.google.gson.Gson gson,
- com.google.gson.reflect.TypeToken<T> type)
create
in interface com.google.gson.TypeAdapterFactory
static class
carbonIntensity(Double carbonIntensity)
endTime(OffsetDateTime endTime)
boolean
static CarbonIntensityDTO
int
hashCode()
void
setCarbonIntensity(Double carbonIntensity)
void
setEndTime(OffsetDateTime endTime)
void
setLocation(String location)
void
setStartTime(OffsetDateTime startTime)
startTime(OffsetDateTime startTime)
toJson()
toString()
static void
validateJsonObject(com.google.gson.JsonObject jsonObj)
jsonObj
- JSON ObjectIOException
- if the JSON Object is invalid with respect to CarbonIntensityDTOjsonString
- JSON stringIOException
- if the JSON string is invalid with respect to CarbonIntensityDTOcom.google.gson.TypeAdapterFactory
EmissionsData
<T> com.google.gson.TypeAdapter<T>
create(com.google.gson.Gson gson,
- com.google.gson.reflect.TypeToken<T> type)
create
in interface com.google.gson.TypeAdapterFactory
boolean
static EmissionsData
getTime()
int
hashCode()
void
setDuration(String duration)
void
setLocation(String location)
void
void
setTime(OffsetDateTime time)
time(OffsetDateTime time)
toJson()
toString()
static void
validateJsonObject(com.google.gson.JsonObject jsonObj)
jsonObj
- JSON ObjectIOException
- if the JSON Object is invalid with respect to EmissionsDatajsonString
- JSON stringIOException
- if the JSON string is invalid with respect to EmissionsDatacom.google.gson.TypeAdapterFactory
EmissionsDataDTO
<T> com.google.gson.TypeAdapter<T>
create(com.google.gson.Gson gson,
- com.google.gson.reflect.TypeToken<T> type)
create
in interface com.google.gson.TypeAdapterFactory
boolean
static EmissionsDataDTO
getValue()
int
hashCode()
void
setDuration(Integer duration)
void
setLocation(String location)
void
setTimestamp(OffsetDateTime timestamp)
void
timestamp(OffsetDateTime timestamp)
toJson()
toString()
static void
validateJsonObject(com.google.gson.JsonObject jsonObj)
jsonObj
- JSON ObjectIOException
- if the JSON Object is invalid with respect to EmissionsDataDTOjsonString
- JSON stringIOException
- if the JSON string is invalid with respect to EmissionsDataDTOcom.google.gson.TypeAdapterFactory
EmissionsForecastBatchParametersDTO
<T> com.google.gson.TypeAdapter<T>
create(com.google.gson.Gson gson,
- com.google.gson.reflect.TypeToken<T> type)
create
in interface com.google.gson.TypeAdapterFactory
static class
dataEndAt(OffsetDateTime dataEndAt)
dataStartAt(OffsetDateTime dataStartAt)
boolean
int
hashCode()
requestedAt(OffsetDateTime requestedAt)
void
setDataEndAt(OffsetDateTime dataEndAt)
void
setDataStartAt(OffsetDateTime dataStartAt)
void
setLocation(String location)
void
setRequestedAt(OffsetDateTime requestedAt)
void
setWindowSize(Integer windowSize)
toJson()
toString()
static void
validateJsonObject(com.google.gson.JsonObject jsonObj)
windowSize(Integer windowSize)
jsonObj
- JSON ObjectIOException
- if the JSON Object is invalid with respect to EmissionsForecastBatchParametersDTOjsonString
- JSON stringIOException
- if the JSON string is invalid with respect to EmissionsForecastBatchParametersDTOcom.google.gson.TypeAdapterFactory
EmissionsForecastDTO
<T> com.google.gson.TypeAdapter<T>
create(com.google.gson.Gson gson,
- com.google.gson.reflect.TypeToken<T> type)
create
in interface com.google.gson.TypeAdapterFactory
static class
addForecastDataItem(EmissionsDataDTO forecastDataItem)
addOptimalDataPointsItem(EmissionsDataDTO optimalDataPointsItem)
dataEndAt(OffsetDateTime dataEndAt)
dataStartAt(OffsetDateTime dataStartAt)
boolean
forecastData(List<EmissionsDataDTO> forecastData)
static EmissionsForecastDTO
generatedAt(OffsetDateTime generatedAt)
int
hashCode()
optimalDataPoints(List<EmissionsDataDTO> optimalDataPoints)
requestedAt(OffsetDateTime requestedAt)
void
setDataEndAt(OffsetDateTime dataEndAt)
void
setDataStartAt(OffsetDateTime dataStartAt)
void
setForecastData(List<EmissionsDataDTO> forecastData)
void
setGeneratedAt(OffsetDateTime generatedAt)
void
setLocation(String location)
void
setOptimalDataPoints(List<EmissionsDataDTO> optimalDataPoints)
void
setRequestedAt(OffsetDateTime requestedAt)
void
setWindowSize(Integer windowSize)
toJson()
toString()
static void
validateJsonObject(com.google.gson.JsonObject jsonObj)
windowSize(Integer windowSize)
jsonObj
- JSON ObjectIOException
- if the JSON Object is invalid with respect to EmissionsForecastDTOjsonString
- JSON stringIOException
- if the JSON string is invalid with respect to EmissionsForecastDTOcom.google.gson.TypeAdapterFactory
ValidationProblemDetails
<T> com.google.gson.TypeAdapter<T>
create(com.google.gson.Gson gson,
- com.google.gson.reflect.TypeToken<T> type)
create
in interface com.google.gson.TypeAdapterFactory
static class
boolean
static ValidationProblemDetails
getTitle()
getType()
int
hashCode()
void
void
setInstance(String instance)
void
void
void
toJson()
toString()
static void
validateJsonObject(com.google.gson.JsonObject jsonObj)
jsonObj
- JSON ObjectIOException
- if the JSON Object is invalid with respect to ValidationProblemDetailsjsonString
- JSON stringIOException
- if the JSON string is invalid with respect to ValidationProblemDetailsgetAverageCarbonIntensityBatch(List<CarbonIntensityBatchParametersDTO> carbonIntensityBatchParametersDTO)
okhttp3.Call
getAverageCarbonIntensityBatchAsync(List<CarbonIntensityBatchParametersDTO> carbonIntensityBatchParametersDTO,
- ApiCallback<List<CarbonIntensityDTO>> _callback)
okhttp3.Call
getAverageCarbonIntensityBatchCall(List<CarbonIntensityBatchParametersDTO> carbonIntensityBatchParametersDTO,
- ApiCallback _callback)
getAverageCarbonIntensityBatchWithHttpInfo(List<CarbonIntensityBatchParametersDTO> carbonIntensityBatchParametersDTO)
endTime(OffsetDateTime endTime)
startTime(OffsetDateTime startTime)
getAverageCarbonIntensity(String location,
- OffsetDateTime startTime,
- OffsetDateTime endTime)
getAverageCarbonIntensityBatch(List<CarbonIntensityBatchParametersDTO> carbonIntensityBatchParametersDTO)
getAverageCarbonIntensityBatchWithHttpInfo(List<CarbonIntensityBatchParametersDTO> carbonIntensityBatchParametersDTO)
getAverageCarbonIntensityWithHttpInfo(String location,
- OffsetDateTime startTime,
- OffsetDateTime endTime)
okhttp3.Call
getAverageCarbonIntensityAsync(String location,
- OffsetDateTime startTime,
- OffsetDateTime endTime,
- ApiCallback<CarbonIntensityDTO> _callback)
okhttp3.Call
getAverageCarbonIntensityBatchAsync(List<CarbonIntensityBatchParametersDTO> carbonIntensityBatchParametersDTO,
- ApiCallback<List<CarbonIntensityDTO>> _callback)
carbonIntensity(Double carbonIntensity)
endTime(OffsetDateTime endTime)
static CarbonIntensityDTO
startTime(OffsetDateTime startTime)
getBestEmissionsDataForLocationsByTime(List<String> location,
- OffsetDateTime time,
- OffsetDateTime toTime)
getBestEmissionsDataForLocationsByTimeWithHttpInfo(List<String> location,
- OffsetDateTime time,
- OffsetDateTime toTime)
getEmissionsDataForLocationByTime(String location,
- OffsetDateTime time,
- OffsetDateTime toTime)
getEmissionsDataForLocationByTimeWithHttpInfo(String location,
- OffsetDateTime time,
- OffsetDateTime toTime)
getEmissionsDataForLocationsByTime(List<String> location,
- OffsetDateTime time,
- OffsetDateTime toTime)
getEmissionsDataForLocationsByTimeWithHttpInfo(List<String> location,
- OffsetDateTime time,
- OffsetDateTime toTime)
okhttp3.Call
getBestEmissionsDataForLocationsByTimeAsync(List<String> location,
- OffsetDateTime time,
- OffsetDateTime toTime,
- ApiCallback<List<EmissionsData>> _callback)
okhttp3.Call
getEmissionsDataForLocationByTimeAsync(String location,
- OffsetDateTime time,
- OffsetDateTime toTime,
- ApiCallback<List<EmissionsData>> _callback)
okhttp3.Call
getEmissionsDataForLocationsByTimeAsync(List<String> location,
- OffsetDateTime time,
- OffsetDateTime toTime,
- ApiCallback<List<EmissionsData>> _callback)
static EmissionsData
time(OffsetDateTime time)
static EmissionsDataDTO
timestamp(OffsetDateTime timestamp)
getForecastData()
getOptimalDataPoints()
addForecastDataItem(EmissionsDataDTO forecastDataItem)
addOptimalDataPointsItem(EmissionsDataDTO optimalDataPointsItem)
forecastData(List<EmissionsDataDTO> forecastData)
optimalDataPoints(List<EmissionsDataDTO> optimalDataPoints)
void
setForecastData(List<EmissionsDataDTO> forecastData)
void
setOptimalDataPoints(List<EmissionsDataDTO> optimalDataPoints)
batchForecastDataAsync(List<EmissionsForecastBatchParametersDTO> emissionsForecastBatchParametersDTO)
okhttp3.Call
batchForecastDataAsyncAsync(List<EmissionsForecastBatchParametersDTO> emissionsForecastBatchParametersDTO,
- ApiCallback<List<EmissionsForecastDTO>> _callback)
okhttp3.Call
batchForecastDataAsyncCall(List<EmissionsForecastBatchParametersDTO> emissionsForecastBatchParametersDTO,
- ApiCallback _callback)
batchForecastDataAsyncWithHttpInfo(List<EmissionsForecastBatchParametersDTO> emissionsForecastBatchParametersDTO)
dataEndAt(OffsetDateTime dataEndAt)
dataStartAt(OffsetDateTime dataStartAt)
requestedAt(OffsetDateTime requestedAt)
windowSize(Integer windowSize)
batchForecastDataAsync(List<EmissionsForecastBatchParametersDTO> emissionsForecastBatchParametersDTO)
batchForecastDataAsyncWithHttpInfo(List<EmissionsForecastBatchParametersDTO> emissionsForecastBatchParametersDTO)
getCurrentForecastData(List<String> location,
- OffsetDateTime dataStartAt,
- OffsetDateTime dataEndAt,
- Integer windowSize)
getCurrentForecastDataWithHttpInfo(List<String> location,
- OffsetDateTime dataStartAt,
- OffsetDateTime dataEndAt,
- Integer windowSize)
okhttp3.Call
batchForecastDataAsyncAsync(List<EmissionsForecastBatchParametersDTO> emissionsForecastBatchParametersDTO,
- ApiCallback<List<EmissionsForecastDTO>> _callback)
okhttp3.Call
getCurrentForecastDataAsync(List<String> location,
- OffsetDateTime dataStartAt,
- OffsetDateTime dataEndAt,
- Integer windowSize,
- ApiCallback<List<EmissionsForecastDTO>> _callback)
addForecastDataItem(EmissionsDataDTO forecastDataItem)
addOptimalDataPointsItem(EmissionsDataDTO optimalDataPointsItem)
dataEndAt(OffsetDateTime dataEndAt)
dataStartAt(OffsetDateTime dataStartAt)
forecastData(List<EmissionsDataDTO> forecastData)
static EmissionsForecastDTO
generatedAt(OffsetDateTime generatedAt)
optimalDataPoints(List<EmissionsDataDTO> optimalDataPoints)
requestedAt(OffsetDateTime requestedAt)
windowSize(Integer windowSize)
static ValidationProblemDetails