Skip to content

Commit

Permalink
Update to newly built Kotlin Client from GH Run 13
Browse files Browse the repository at this point in the history
  • Loading branch information
openapi-bot committed Nov 22, 2024
1 parent 5b70813 commit 1f888e5
Show file tree
Hide file tree
Showing 17 changed files with 147 additions and 18 deletions.
4 changes: 2 additions & 2 deletions build-jar.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {

jar {
archiveBaseName = 'cumulocity-clients-kotlin'
archiveVersion = '-12'
archiveVersion = '-13'
}

repositories {
Expand All @@ -18,7 +18,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.cumulocity'
artifactId = 'cumulocity-clients-kotlin'
version = '-12'
version = '-13'
from components.java
}
}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ android {
defaultConfig {
minSdkVersion 19
targetSdkVersion 33
versionCode 12
versionCode 13
versionName ""

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/cumulocity/client/api/ChildOperationsApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ interface ChildOperationsApi {
*/
@Headers(*["Content-Type:application/vnd.com.nsn.cumulocity.managedobject+json", "Accept:application/json"])
@POST("/inventory/managedObjects/{id}/childAdditions")
@ReadOnlyProperties("owner", "additionParents", "lastUpdated", "childDevices", "childAssets", "creationTime", "childAdditions", "c8y_LatestMeasurements", "self", "assetParents", "deviceParents", "id")
@ReadOnlyProperties("additionParents", "lastUpdated", "childDevices", "childAssets", "creationTime", "childAdditions", "c8y_LatestMeasurements", "self", "assetParents", "deviceParents", "id")
fun assignAsChildAddition(
@Body body: ManagedObject,
@Path("id") id: String,
Expand Down Expand Up @@ -465,7 +465,7 @@ interface ChildOperationsApi {
*/
@Headers(*["Content-Type:application/vnd.com.nsn.cumulocity.managedobject+json", "Accept:application/json"])
@POST("/inventory/managedObjects/{id}/childAssets")
@ReadOnlyProperties("owner", "additionParents", "lastUpdated", "childDevices", "childAssets", "creationTime", "childAdditions", "c8y_LatestMeasurements", "self", "assetParents", "deviceParents", "id")
@ReadOnlyProperties("additionParents", "lastUpdated", "childDevices", "childAssets", "creationTime", "childAdditions", "c8y_LatestMeasurements", "self", "assetParents", "deviceParents", "id")
fun assignAsChildAsset(
@Body body: ManagedObject,
@Path("id") id: String,
Expand Down Expand Up @@ -725,7 +725,7 @@ interface ChildOperationsApi {
*/
@Headers(*["Content-Type:application/vnd.com.nsn.cumulocity.managedobject+json", "Accept:application/json"])
@POST("/inventory/managedObjects/{id}/childDevices")
@ReadOnlyProperties("owner", "additionParents", "lastUpdated", "childDevices", "childAssets", "creationTime", "childAdditions", "c8y_LatestMeasurements", "self", "assetParents", "deviceParents", "id")
@ReadOnlyProperties("additionParents", "lastUpdated", "childDevices", "childAssets", "creationTime", "childAdditions", "c8y_LatestMeasurements", "self", "assetParents", "deviceParents", "id")
fun assignAsChildDevice(
@Body body: ManagedObject,
@Path("id") id: String,
Expand Down
9 changes: 5 additions & 4 deletions src/main/java/com/cumulocity/client/api/ManagedObjectsApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import com.cumulocity.client.supplementary.SeparatedQueryParameter
import com.cumulocity.client.model.ManagedObject
import com.cumulocity.client.model.ManagedObjectUser
import com.cumulocity.client.model.ManagedObjectCollection
import com.cumulocity.client.model.ManagedObjectAvailability
import com.cumulocity.client.model.SupportedMeasurements
import com.cumulocity.client.model.SupportedSeries

Expand Down Expand Up @@ -259,7 +260,7 @@ interface ManagedObjectsApi {
*/
@Headers(*["Content-Type:application/vnd.com.nsn.cumulocity.managedobject+json", "Accept:application/vnd.com.nsn.cumulocity.error+json, application/vnd.com.nsn.cumulocity.managedobject+json"])
@PUT("/inventory/managedObjects/{id}")
@ReadOnlyProperties("owner", "additionParents", "lastUpdated", "childDevices", "childAssets", "creationTime", "childAdditions", "c8y_LatestMeasurements", "self", "assetParents", "deviceParents", "id")
@ReadOnlyProperties("additionParents", "lastUpdated", "childDevices", "childAssets", "creationTime", "childAdditions", "c8y_LatestMeasurements", "self", "assetParents", "deviceParents", "id")
fun updateManagedObject(
@Body body: ManagedObject,
@Path("id") id: String,
Expand Down Expand Up @@ -324,16 +325,16 @@ interface ManagedObjectsApi {
*
* * HTTP 200 The request has succeeded and the date is sent in the response.
* * HTTP 401 Authentication information is missing or invalid.
* * HTTP 404 Managed object not found.
* * HTTP 404 A device with provided ID is not monitored.
*
* @param id
* Unique identifier of the managed object.
*/
@Headers("Accept:application/vnd.com.nsn.cumulocity.error+json, text/plain, application/json")
@Headers("Accept:application/vnd.com.nsn.cumulocity.error+json, application/json")
@GET("/inventory/managedObjects/{id}/availability")
fun getLatestAvailability(
@Path("id") id: String
): Call<String>
): Call<ManagedObjectAvailability>

/**
* Retrieve all supported measurement fragments of a specific managed object
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/main/java/com/cumulocity/client/model/AuditRecord.kt
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ data class AuditRecord(var activity: String?, var source: Source?, var text: Str


/**
* The managed object to which the audit is associated.
* The platform component ID to which the audit is associated.
*/
data class Source(var id: String?) {
constructor() : this(id = null)
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/cumulocity/client/model/C8yAvailability.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ package com.cumulocity.client.model
import com.google.gson.Gson

/**
* The availability information computed by Cumulocity IoT is stored in fragments `c8y_Availability` and `c8y_Connection` of the device.
* The availability information computed by Cumulocity IoT is stored in fragments `c8y_Availability` of the device.
*/
class C8yAvailability {

/**
* The current status, one of `AVAILABLE`, `CONNECTED`, `MAINTENANCE`, `DISCONNECTED`.
* The current status of availability, one of `AVAILABLE`, `UNAVAILABLE`, `MAINTENANCE`.
*/
var status: C8yAvailabilityStatus? = null
var status: C8yAvailabilityDataStatus? = null

/**
* The time when the device sent the last message to Cumulocity IoT.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (c) 2014-2023 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.

package com.cumulocity.client.model
import com.google.gson.annotations.SerializedName

/**
* The current status of connection, one of `CONNECTED`, `DISCONNECTED`, `MAINTENANCE`.
*/
enum class C8yAvailabilityConnectionStatus(val value: String) {
@SerializedName(value = "CONNECTED")
CONNECTED("CONNECTED"),
@SerializedName(value = "DISCONNECTED")
DISCONNECTED("DISCONNECTED"),
@SerializedName(value = "MAINTENANCE")
MAINTENANCE("MAINTENANCE")
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (c) 2014-2023 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.

package com.cumulocity.client.model
import com.google.gson.annotations.SerializedName

/**
* The current status of availability, one of `AVAILABLE`, `UNAVAILABLE`, `MAINTENANCE`.
*/
enum class C8yAvailabilityDataStatus(val value: String) {
@SerializedName(value = "AVAILABLE")
AVAILABLE("AVAILABLE"),
@SerializedName(value = "MAINTENANCE")
MAINTENANCE("MAINTENANCE"),
@SerializedName(value = "UNAVAILABLE")
UNAVAILABLE("UNAVAILABLE")
}
6 changes: 3 additions & 3 deletions src/main/java/com/cumulocity/client/model/C8yConnection.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ package com.cumulocity.client.model
import com.google.gson.Gson

/**
* The availability information computed by Cumulocity IoT is stored in fragments `c8y_Availability` and `c8y_Connection` of the device.
* The connection information computed by Cumulocity IoT is stored in fragments `c8y_Connection` of the device.
*/
class C8yConnection {

/**
* The current status, one of `AVAILABLE`, `CONNECTED`, `MAINTENANCE`, `DISCONNECTED`.
* The current status of connection, one of `CONNECTED`, `DISCONNECTED`, `MAINTENANCE`.
*/
var status: C8yAvailabilityStatus? = null
var status: C8yAvailabilityConnectionStatus? = null

override fun toString(): String {
return Gson().toJson(this).toString()
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/com/cumulocity/client/model/DailyUsageStatistics.kt
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ class DailyUsageStatistics {
*/
var measurementsCreatedCount: Int? = null

/**
* Number of created operations.
*/
var operationsCreatedCount: Int? = null

/**
* Number of updates made to the operations.
*/
var operationsUpdatedCount: Int? = null

/**
* Number of requests that were made against the tenant. Updated every 5 minutes. The following requests are not included:
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Copyright (c) 2014-2023 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.

package com.cumulocity.client.model
import com.google.gson.Gson

class ManagedObjectAvailability {

/**
* Identifier of the target device.
*/
var deviceId: String? = null

/**
* The identifier used in the external system that Cumulocity IoT interfaces with.
*/
var externalId: String? = null

/**
* The time when the device sent the last message to Cumulocity IoT.
*/
var lastMessage: String? = null

/**
* Required interval of monitored device
*/
var interval: Int? = null

/**
* The current status of availability, one of `AVAILABLE`, `UNAVAILABLE`, `MAINTENANCE`.
*/
var dataStatus: C8yAvailabilityDataStatus? = null

/**
* The current status of connection, one of `CONNECTED`, `DISCONNECTED`, `MAINTENANCE`.
*/
var connectionStatus: C8yAvailabilityConnectionStatus? = null

override fun toString(): String {
return Gson().toJson(this).toString()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ class MeasurementSeries {
*/
class Values {

var additionalProperties: MutableMap<String, Array<MeasurementSeriesValue>> = hashMapOf()

operator fun get(key: String): Array<MeasurementSeriesValue>? = additionalProperties[key]
operator fun set(key: String, value: Array<MeasurementSeriesValue>): Array<MeasurementSeriesValue>? = additionalProperties.put(key, value)

override fun toString(): String {
return Gson().toJson(this).toString()
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright (c) 2014-2023 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.

package com.cumulocity.client.model
import com.google.gson.Gson

class MeasurementSeriesValue {

var min: Number? = null

var max: Number? = null

override fun toString(): String {
return Gson().toJson(this).toString()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ class SummaryAllTenantsUsageStatistics {
*/
var measurementsCreatedCount: Int? = null

/**
* Number of created operations.
*/
var operationsCreatedCount: Int? = null

/**
* Number of updates made to the operations.
*/
var operationsUpdatedCount: Int? = null

/**
* ID of the parent tenant.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ class SummaryTenantUsageStatistics {
*/
var measurementsCreatedCount: Int? = null

/**
* Number of created operations.
*/
var operationsCreatedCount: Int? = null

/**
* Number of updates made to the operations.
*/
var operationsUpdatedCount: Int? = null

/**
* Number of requests that were made against the tenant. Updated every 5 minutes. The following requests are not included:
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import com.cumulocity.client.supplementary.SeparatedQueryParameter
import com.cumulocity.client.model.ManagedObject
import com.cumulocity.client.model.ManagedObjectUser
import com.cumulocity.client.model.ManagedObjectCollection
import com.cumulocity.client.model.ManagedObjectAvailability
import com.cumulocity.client.model.SupportedMeasurements
import com.cumulocity.client.model.SupportedSeries

Expand Down

0 comments on commit 1f888e5

Please sign in to comment.