diff --git a/README.md b/README.md index 8e20c45..34a9563 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ Those classes allow to add an arbitrary number of additional properties as a lis Alarm.Serialization.registerAdditionalProperty(typeName: String, type: Class<*>) ``` -Each of the extensible objects contains a dictionary object holding instances of custom fragments. Use the custom fragment's key to access it's value. +Each of the extensible objects contains a dictionary object holding instances of custom fragments. Use the custom fragment's key to access its value. ### Working with errors @@ -84,7 +84,7 @@ clientBuilder.addInterceptor(headerAuthorizationInterceptor) The customised `clientBuilder` can than be passed to any service instance using it's `companion` `Factory` object, i.e.: ```kotlin -SystemOptionsApi.Factory.create("endpoint", clientBuilder) +CurrentUserApi.Factory.create("endpoint", clientBuilder) ``` ## Contribution diff --git a/build-jar.gradle b/build-jar.gradle new file mode 100644 index 0000000..e740cd1 --- /dev/null +++ b/build-jar.gradle @@ -0,0 +1,23 @@ +plugins { + id 'java' + id "org.jetbrains.kotlin.jvm" version "$kotlinVersion" +} + +jar { + archiveBaseName = 'cumulocitycorelibrary' + archiveVersion = '10.18.0-263' +} + +repositories { + mavenCentral() +} + +dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion" + implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion" + api "com.squareup.retrofit2:retrofit:$retrofitVersion" + api "com.squareup.retrofit2:converter-gson:$retrofitVersion" + api "com.squareup.retrofit2:converter-scalars:$retrofitVersion" + + testImplementation 'junit:junit:$junitVersion' +} diff --git a/build.gradle b/build.gradle index d740291..1a59ed0 100644 --- a/build.gradle +++ b/build.gradle @@ -1,15 +1,34 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' +buildscript { + repositories { + mavenCentral() + google() + } + dependencies { + classpath "com.android.tools.build:gradle:$androidVersion" + } +} -android { - compileSdkVersion 33 +plugins { + id 'org.jetbrains.kotlin.android' version "$kotlinVersion" + id 'com.android.library' version "$androidVersion" +} + +repositories { + google() + mavenCentral() +} +java.toolchain.languageVersion.set(JavaLanguageVersion.of(20)) + +android { + compileSdk 33 + namespace "com.cumulocity.client" defaultConfig { minSdkVersion 19 targetSdkVersion 33 - versionCode 214 - versionName "10.15.0" - + versionCode 263 + versionName "10.18.0" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } @@ -22,15 +41,11 @@ android { } dependencies { - implementation 'androidx.core:core-ktx:1.9.0' - implementation fileTree(dir: "libs", include: ["*.jar"]) - implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.7.10' - implementation 'org.jetbrains.kotlin:kotlin-reflect:1.7.10' - api 'com.squareup.retrofit2:retrofit:2.9.0' - api 'com.squareup.retrofit2:converter-gson:2.4.0' - api 'com.squareup.retrofit2:converter-scalars:2.4.0' - - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.1.5' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' + implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion" + implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion" + api "com.squareup.retrofit2:retrofit:$retrofitVersion" + api "com.squareup.retrofit2:converter-gson:$retrofitVersion" + api "com.squareup.retrofit2:converter-scalars:$retrofitVersion" + + testImplementation "junit:junit:$junitVersion" } diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..adb845f --- /dev/null +++ b/gradle.properties @@ -0,0 +1,4 @@ +kotlinVersion=1.9.22 +retrofitVersion=2.9.0 +androidVersion=8.2.2 +junitVersion=4.13.2 diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..b5f64a7 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,8 @@ +pluginManagement { + repositories { + maven { url "https://plugins.gradle.org/m2/" } + gradlePluginPortal() + google() + mavenCentral() + } +} diff --git a/src/main/java/com/cumulocity/client/api/AlarmsApi.kt b/src/main/java/com/cumulocity/client/api/AlarmsApi.kt index 61e42ad..ebc5234 100644 --- a/src/main/java/com/cumulocity/client/api/AlarmsApi.kt +++ b/src/main/java/com/cumulocity/client/api/AlarmsApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory @@ -87,7 +87,7 @@ interface AlarmsApi { * @param pageSize * Indicates how many entries of the collection shall be returned. The upper limit for one page is 2,000 objects. * @param resolved - * When set to `true` only alarms with status CLEARED will be fetched, whereas `false` will fetch all alarms with status ACTIVE or ACKNOWLEDGED. + * When set to `true` only alarms with status CLEARED will be fetched, whereas `false` will fetch all alarms with status ACTIVE or ACKNOWLEDGED. Takes precedence over the `status` parameter. * @param severity * The severity of the alarm to search for. * @@ -95,7 +95,7 @@ interface AlarmsApi { * @param source * The managed object ID to which the alarm is associated. * @param status - * The status of the alarm to search for. + * The status of the alarm to search for. Should not be used when `resolved` parameter is provided. * * **ⓘ Info:** If you query for multiple alarm statuses at once, comma-separate the values. * @param type @@ -167,7 +167,7 @@ interface AlarmsApi { * @param dateTo * End date or date and time of the alarm occurrence. * @param resolved - * When set to `true` only alarms with status CLEARED will be fetched, whereas `false` will fetch all alarms with status ACTIVE or ACKNOWLEDGED. + * When set to `true` only alarms with status CLEARED will be fetched, whereas `false` will fetch all alarms with status ACTIVE or ACKNOWLEDGED. Takes precedence over the `status` parameter. * @param severity * The severity of the alarm to search for. * @@ -175,7 +175,7 @@ interface AlarmsApi { * @param source * The managed object ID to which the alarm is associated. * @param status - * The status of the alarm to search for. + * The status of the alarm to search for. Should not be used when `resolved` parameter is provided. * * **ⓘ Info:** If you query for multiple alarm statuses at once, comma-separate the values. * @param withSourceAssets @@ -279,7 +279,7 @@ interface AlarmsApi { * @param dateTo * End date or date and time of the alarm occurrence. * @param resolved - * When set to `true` only alarms with status CLEARED will be fetched, whereas `false` will fetch all alarms with status ACTIVE or ACKNOWLEDGED. + * When set to `true` only alarms with status CLEARED will be fetched, whereas `false` will fetch all alarms with status ACTIVE or ACKNOWLEDGED. Takes precedence over the `status` parameter. * @param severity * The severity of the alarm to search for. * @@ -287,7 +287,7 @@ interface AlarmsApi { * @param source * The managed object ID to which the alarm is associated. * @param status - * The status of the alarm to search for. + * The status of the alarm to search for. Should not be used when `resolved` parameter is provided. * * **ⓘ Info:** If you query for multiple alarm statuses at once, comma-separate the values. * @param type @@ -402,7 +402,7 @@ interface AlarmsApi { * @param dateTo * End date or date and time of the alarm occurrence. * @param resolved - * When set to `true` only alarms with status CLEARED will be fetched, whereas `false` will fetch all alarms with status ACTIVE or ACKNOWLEDGED. + * When set to `true` only alarms with status CLEARED will be fetched, whereas `false` will fetch all alarms with status ACTIVE or ACKNOWLEDGED. Takes precedence over the `status` parameter. * @param severity * The severity of the alarm to search for. * @@ -410,7 +410,7 @@ interface AlarmsApi { * @param source * The managed object ID to which the alarm is associated. * @param status - * The status of the alarm to search for. + * The status of the alarm to search for. Should not be used when `resolved` parameter is provided. * * **ⓘ Info:** If you query for multiple alarm statuses at once, comma-separate the values. * @param type diff --git a/src/main/java/com/cumulocity/client/api/ApplicationBinariesApi.kt b/src/main/java/com/cumulocity/client/api/ApplicationBinariesApi.kt index e0db888..56a0f09 100644 --- a/src/main/java/com/cumulocity/client/api/ApplicationBinariesApi.kt +++ b/src/main/java/com/cumulocity/client/api/ApplicationBinariesApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory diff --git a/src/main/java/com/cumulocity/client/api/ApplicationVersionsApi.kt b/src/main/java/com/cumulocity/client/api/ApplicationVersionsApi.kt index f4f382d..546afd2 100644 --- a/src/main/java/com/cumulocity/client/api/ApplicationVersionsApi.kt +++ b/src/main/java/com/cumulocity/client/api/ApplicationVersionsApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory diff --git a/src/main/java/com/cumulocity/client/api/ApplicationsApi.kt b/src/main/java/com/cumulocity/client/api/ApplicationsApi.kt index 7075100..ded6090 100644 --- a/src/main/java/com/cumulocity/client/api/ApplicationsApi.kt +++ b/src/main/java/com/cumulocity/client/api/ApplicationsApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory @@ -28,7 +28,7 @@ import com.cumulocity.client.model.ApplicationCollection * * For each tenant, Cumulocity IoT manages the subscribed applications and provides a number of applications of various types.In case you want to subscribe a tenant to an application using an API, you must use the application name in the argument (as name). * - * Refer to the tables in [Administration > Managing applications](https://cumulocity.com/guides/10.7.0/users-guide/administration#managing-applications) in the User guide for the respective application name to be used. + * Refer to the tables in [Administration > Managing applications](https://cumulocity.com/guides/users-guide/administration#managing-applications) in the *User guide* for the respective application name to be used. * * > **ⓘ Info:** The Accept header should be provided in all POST/PUT requests, otherwise an empty response body will be returned. */ @@ -226,10 +226,10 @@ interface ApplicationsApi { * * @param id * Unique identifier of the application. - * @param force - * Force deletion by unsubscribing all tenants from the application first and then deleting the application itself. * @param xCumulocityProcessingMode * Used to explicitly control the processing mode of the request. See [Processing mode](#processing-mode) for more details. + * @param force + * Force deletion by unsubscribing all tenants from the application first and then deleting the application itself. */ @Headers("Accept:application/json") @DELETE("/application/applications/{id}") @@ -252,6 +252,8 @@ interface ApplicationsApi { * * If the target application is hosted and has an active version, the new application will have the active version with the same content. * + * If the original application is hosted with versions, then only one binary version is cloned. By default it is a version with the "latest" tag. You can also specify a target version directly by using exactly one of the query parameters `version` or `tag`. + * * * ##### Required roles * @@ -269,11 +271,17 @@ interface ApplicationsApi { * Unique identifier of the application. * @param xCumulocityProcessingMode * Used to explicitly control the processing mode of the request. See [Processing mode](#processing-mode) for more details. + * @param version + * The version field of the application version. + * @param tag + * The tag of the application version. */ @Headers("Accept:application/vnd.com.nsn.cumulocity.error+json, application/vnd.com.nsn.cumulocity.application+json") @POST("/application/applications/{id}/clone") fun copyApplication( @Path("id") id: String, + @Query("version") version: String? = null, + @Query("tag") tag: String? = null, @Header("X-Cumulocity-Processing-Mode") xCumulocityProcessingMode: String? = null ): Call diff --git a/src/main/java/com/cumulocity/client/api/AttachmentsApi.kt b/src/main/java/com/cumulocity/client/api/AttachmentsApi.kt index a1eae4a..af2b4ee 100644 --- a/src/main/java/com/cumulocity/client/api/AttachmentsApi.kt +++ b/src/main/java/com/cumulocity/client/api/AttachmentsApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory @@ -22,7 +22,7 @@ import com.cumulocity.client.model.BinaryInfo import com.cumulocity.client.model.EventBinary /** - * It is possible to store, retrieve and delete binaries for events. Each event can have one binary attached. + * It is possible to store, retrieve and delete binaries for events. Each event can have only one binary attached. */ interface AttachmentsApi { @@ -96,7 +96,7 @@ interface AttachmentsApi { * @param id * Unique identifier of the event. */ - @Headers(*["Content-Type:text/plain", "Accept:application/vnd.com.nsn.cumulocity.error+json, application/vnd.com.nsn.cumulocity.event+json"]) + @Headers(*["Content-Type:text/plain", "Accept:application/vnd.com.nsn.cumulocity.error+json, application/json"]) @PUT("/event/events/{id}/binaries") fun replaceEventAttachment( @Body body: UByteArray, @@ -106,10 +106,10 @@ interface AttachmentsApi { /** * Attach a file to a specific event * - * Upload a file (binary) as an attachment of a specific event by a given ID. - * The size of the attachment is configurable, and the default size is 50 MiB. The default chunk size is 5MiB. + * Upload a file (binary) as an attachment of a specific event by a given ID.The size of the attachment is configurable, and the default size is 50 MiB. The default chunk size is 5MiB. * - * After the file has been uploaded, the corresponding event will contain the fragment `c8y_IsBinary` similar to: + * > **ⓘ Info:** If there is a binary already attached to the event, the POST request results in a 409 error. + * When the file has been uploaded, the corresponding event contains the fragment `c8y_IsBinary` similar to: * * ```json * "c8y_IsBinary": { @@ -118,7 +118,7 @@ interface AttachmentsApi { * "type": "text/plain" * } * ``` - * When using `multipart/form-data` each value is sent as a block of data (body part), with a user agent-defined delimiter (`boundary`) separating each part. The keys are given in the `Content-Disposition` header of each part. + * There are two request body schemas you can use for your POST requests.`text/plain` is preselected (see below).If you set it to `multipart/form-data` each value is sent as a block of data (body part), with a user agent-defined delimiter (`boundary`) separating each part.The keys are given in the `Content-Disposition` header of each part. * * ```http * POST /event/events/{id}/binaries @@ -156,7 +156,7 @@ interface AttachmentsApi { * @param id * Unique identifier of the event. */ - @Headers(*["Content-Type:text/plain", "Accept:application/vnd.com.nsn.cumulocity.error+json, application/vnd.com.nsn.cumulocity.event+json"]) + @Headers(*["Content-Type:text/plain", "Accept:application/vnd.com.nsn.cumulocity.error+json, application/json"]) @POST("/event/events/{id}/binaries") fun uploadEventAttachment( @Body body: UByteArray, @@ -166,10 +166,10 @@ interface AttachmentsApi { /** * Attach a file to a specific event * - * Upload a file (binary) as an attachment of a specific event by a given ID. - * The size of the attachment is configurable, and the default size is 50 MiB. The default chunk size is 5MiB. + * Upload a file (binary) as an attachment of a specific event by a given ID.The size of the attachment is configurable, and the default size is 50 MiB. The default chunk size is 5MiB. * - * After the file has been uploaded, the corresponding event will contain the fragment `c8y_IsBinary` similar to: + * > **ⓘ Info:** If there is a binary already attached to the event, the POST request results in a 409 error. + * When the file has been uploaded, the corresponding event contains the fragment `c8y_IsBinary` similar to: * * ```json * "c8y_IsBinary": { @@ -178,7 +178,7 @@ interface AttachmentsApi { * "type": "text/plain" * } * ``` - * When using `multipart/form-data` each value is sent as a block of data (body part), with a user agent-defined delimiter (`boundary`) separating each part. The keys are given in the `Content-Disposition` header of each part. + * There are two request body schemas you can use for your POST requests.`text/plain` is preselected (see below).If you set it to `multipart/form-data` each value is sent as a block of data (body part), with a user agent-defined delimiter (`boundary`) separating each part.The keys are given in the `Content-Disposition` header of each part. * * ```http * POST /event/events/{id}/binaries @@ -218,7 +218,7 @@ interface AttachmentsApi { * @param id * Unique identifier of the event. */ - @Headers(*["Content-Type:multipart/form-data", "Accept:application/vnd.com.nsn.cumulocity.error+json, application/vnd.com.nsn.cumulocity.event+json"]) + @Headers(*["Content-Type:multipart/form-data", "Accept:application/vnd.com.nsn.cumulocity.error+json, application/json"]) @POST("/event/events/{id}/binaries") @Multipart fun uploadEventAttachment( diff --git a/src/main/java/com/cumulocity/client/api/AuditsApi.kt b/src/main/java/com/cumulocity/client/api/AuditsApi.kt index 32e7fbc..4f85e78 100644 --- a/src/main/java/com/cumulocity/client/api/AuditsApi.kt +++ b/src/main/java/com/cumulocity/client/api/AuditsApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory diff --git a/src/main/java/com/cumulocity/client/api/BinariesApi.kt b/src/main/java/com/cumulocity/client/api/BinariesApi.kt index 2f9587b..8035303 100644 --- a/src/main/java/com/cumulocity/client/api/BinariesApi.kt +++ b/src/main/java/com/cumulocity/client/api/BinariesApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory @@ -27,7 +27,7 @@ import com.cumulocity.client.model.Binary /** * Managed objects can perform operations to store, retrieve and delete binaries. One binary can store only one file. Together with the binary, a managed object is created which acts as a metadata information for the binary. * - * > **ⓘ Info:** The Accept header should be provided in all POST/PUT requests, otherwise an empty response body will be returned. + * > **ⓘ Info:** Supports only HTTP 1.1 clients.**ⓘ Info:** The Accept header should be provided in all POST/PUT requests, otherwise an empty response body will be returned. */ interface BinariesApi { @@ -52,9 +52,9 @@ interface BinariesApi { } /** - * Retrieve the stored files + * Search for stored files * - * Retrieve the stored files as a collections of managed objects. + * Retrieve metadata information about stored files. Search for files by query parameters. This will not download the files. * * ##### Response Codes * @@ -114,7 +114,7 @@ interface BinariesApi { * * ##### Required roles * - * ROLE_INVENTORY_ADMIN *OR* ROLE_INVENTORY_CREATE + * ROLE_INVENTORY_ADMIN *OR* ROLE_INVENTORY_CREATE *OR* ROLE_BINARY_ADMIN *OR* ROLE_BINARY_CREATE * * ##### Response Codes * @@ -140,12 +140,12 @@ interface BinariesApi { /** * Retrieve a stored file * - * Retrieve a stored file (managed object) by a given ID. + * Retrieve a stored file (managed object) by a given ID.Supports chunk download and resuming an interrupted download using the [`Range` header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range). * * * ##### Required roles * - * ROLE_INVENTORY_READ *OR* owner of the resource *OR* MANAGE_OBJECT_READ permission on the resource + * ROLE_INVENTORY_READ *OR* ROLE_BINARY_READ *OR* owner of the resource *OR* MANAGE_OBJECT_READ permission on the resource * * ##### Response Codes * @@ -171,7 +171,7 @@ interface BinariesApi { * * ##### Required roles * - * ROLE_INVENTORY_ADMIN *OR* owner of the resource *OR* MANAGE_OBJECT_ADMIN permission on the resource + * ROLE_INVENTORY_ADMIN *OR* ROLE_BINARY_ADMIN *OR* owner of the resource *OR* MANAGE_OBJECT_ADMIN permission on the resource * * ##### Response Codes * @@ -199,7 +199,7 @@ interface BinariesApi { * * ##### Required roles * - * ROLE_INVENTORY_ADMIN *OR* owner of the resource *OR* MANAGE_OBJECT_ADMIN permission on the resource + * ROLE_INVENTORY_ADMIN *OR* ROLE_BINARY_ADMIN *OR* owner of the resource *OR* MANAGE_OBJECT_ADMIN permission on the resource * * ##### Response Codes * diff --git a/src/main/java/com/cumulocity/client/api/BootstrapUserApi.kt b/src/main/java/com/cumulocity/client/api/BootstrapUserApi.kt index eb9d264..46676e6 100644 --- a/src/main/java/com/cumulocity/client/api/BootstrapUserApi.kt +++ b/src/main/java/com/cumulocity/client/api/BootstrapUserApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory diff --git a/src/main/java/com/cumulocity/client/api/BulkOperationsApi.kt b/src/main/java/com/cumulocity/client/api/BulkOperationsApi.kt index 425b94b..8784928 100644 --- a/src/main/java/com/cumulocity/client/api/BulkOperationsApi.kt +++ b/src/main/java/com/cumulocity/client/api/BulkOperationsApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory diff --git a/src/main/java/com/cumulocity/client/api/ChildOperationsApi.kt b/src/main/java/com/cumulocity/client/api/ChildOperationsApi.kt index 27051cc..b1de715 100644 --- a/src/main/java/com/cumulocity/client/api/ChildOperationsApi.kt +++ b/src/main/java/com/cumulocity/client/api/ChildOperationsApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory @@ -58,7 +58,7 @@ interface ChildOperationsApi { * * ##### Required roles * - * ROLE_INVENTORY_READ *OR* owner of the source *OR* MANAGE_OBJECT_READ permission on the source + * ROLE_INVENTORY_READ *OR* ROLE_MANAGED_OBJECT_READ *OR* owner of the source *OR* MANAGE_OBJECT_READ permission on the source * * ##### Response Codes * @@ -111,7 +111,7 @@ interface ChildOperationsApi { * * ##### Required roles * - * ROLE_INVENTORY_ADMIN *OR* ((owner of the source *OR* MANAGE_OBJECT_ADMIN permission on the source) *AND* (owner of the child *OR* MANAGE_OBJECT_ADMIN permission on the child)) + * ROLE_INVENTORY_ADMIN *OR* ROLE_MANAGED_OBJECT_ADMIN *OR* ((owner of the source *OR* MANAGE_OBJECT_ADMIN permission on the source) *AND* (owner of the child *OR* MANAGE_OBJECT_ADMIN permission on the child)) * * ##### Response Codes * @@ -147,7 +147,7 @@ interface ChildOperationsApi { * * ##### Required roles * - * ROLE_INVENTORY_ADMIN *OR* ((owner of the source *OR* MANAGE_OBJECT_ADMIN permission on the source) *AND* (owner of the child *OR* MANAGE_OBJECT_ADMIN permission on the child)) + * ROLE_INVENTORY_ADMIN *OR* ROLE_MANAGED_OBJECT_ADMIN *OR* ((owner of the source *OR* MANAGE_OBJECT_ADMIN permission on the source) *AND* (owner of the child *OR* MANAGE_OBJECT_ADMIN permission on the child)) * * ##### Response Codes * @@ -183,7 +183,7 @@ interface ChildOperationsApi { * * ##### Required roles * - * ROLE_INVENTORY_ADMIN *OR* ((owner of the source *OR* MANAGE_OBJECT_ADMIN permission on the source) *AND* (owner of the child *OR* MANAGE_OBJECT_ADMIN permission on the child)) + * ROLE_INVENTORY_ADMIN *OR* ROLE_MANAGED_OBJECT_ADMIN *OR* ((owner of the source *OR* MANAGE_OBJECT_ADMIN permission on the source) *AND* (owner of the child *OR* MANAGE_OBJECT_ADMIN permission on the child)) * * ##### Response Codes * @@ -216,7 +216,7 @@ interface ChildOperationsApi { * * ##### Required roles * - * ROLE_INVENTORY_ADMIN *OR* owner of the source (parent) *OR* owner of the child *OR* MANAGE_OBJECT_ADMIN permission on the source (parent) + * ROLE_INVENTORY_ADMIN *OR* ROLE_MANAGED_OBJECT_ADMIN *OR* owner of the source (parent) *OR* owner of the child *OR* MANAGE_OBJECT_ADMIN permission on the source (parent) * * ##### Response Codes * @@ -249,7 +249,7 @@ interface ChildOperationsApi { * * ##### Required roles * - * ROLE_INVENTORY_READ *OR* MANAGE_OBJECT_READ permission on the source (parent) + * ROLE_INVENTORY_READ *OR* ROLE_MANAGED_OBJECT_READ *OR* MANAGE_OBJECT_READ permission on the source (parent) * * ##### Response Codes * @@ -280,7 +280,7 @@ interface ChildOperationsApi { * * ##### Required roles * - * ROLE_INVENTORY_ADMIN *OR* owner of the source (parent) *OR* owner of the child *OR* MANAGE_OBJECT_ADMIN permission on the source (parent) + * ROLE_INVENTORY_ADMIN *OR* ROLE_MANAGED_OBJECT_ADMIN *OR* owner of the source (parent) *OR* owner of the child *OR* MANAGE_OBJECT_ADMIN permission on the source (parent) * * ##### Response Codes * @@ -314,7 +314,7 @@ interface ChildOperationsApi { * * ##### Required roles * - * ROLE_INVENTORY_READ *OR* owner of the source *OR* MANAGE_OBJECT_READ permission on the source + * ROLE_INVENTORY_READ *OR* ROLE_MANAGED_OBJECT_READ *OR* owner of the source *OR* MANAGE_OBJECT_READ permission on the source * * ##### Response Codes * @@ -367,7 +367,7 @@ interface ChildOperationsApi { * * ##### Required roles * - * ROLE_INVENTORY_ADMIN *OR* ((owner of the source *OR* MANAGE_OBJECT_ADMIN permission on the source) *AND* (owner of the child *OR* MANAGE_OBJECT_ADMIN permission on the child)) + * ROLE_INVENTORY_ADMIN *OR* ROLE_MANAGED_OBJECT_ADMIN *OR* ((owner of the source *OR* MANAGE_OBJECT_ADMIN permission on the source) *AND* (owner of the child *OR* MANAGE_OBJECT_ADMIN permission on the child)) * * ##### Response Codes * @@ -403,7 +403,7 @@ interface ChildOperationsApi { * * ##### Required roles * - * ROLE_INVENTORY_ADMIN *OR* ((owner of the source *OR* MANAGE_OBJECT_ADMIN permission on the source) *AND* (owner of the child *OR* MANAGE_OBJECT_ADMIN permission on the child)) + * ROLE_INVENTORY_ADMIN *OR* ROLE_MANAGED_OBJECT_ADMIN *OR* ((owner of the source *OR* MANAGE_OBJECT_ADMIN permission on the source) *AND* (owner of the child *OR* MANAGE_OBJECT_ADMIN permission on the child)) * * ##### Response Codes * @@ -439,7 +439,7 @@ interface ChildOperationsApi { * * ##### Required roles * - * ROLE_INVENTORY_ADMIN *OR* ((owner of the source *OR* MANAGE_OBJECT_ADMIN permission on the source) *AND* (owner of the child *OR* MANAGE_OBJECT_ADMIN permission on the child)) + * ROLE_INVENTORY_ADMIN *OR* ROLE_MANAGED_OBJECT_ADMIN *OR* ((owner of the source *OR* MANAGE_OBJECT_ADMIN permission on the source) *AND* (owner of the child *OR* MANAGE_OBJECT_ADMIN permission on the child)) * * ##### Response Codes * @@ -472,7 +472,7 @@ interface ChildOperationsApi { * * ##### Required roles * - * ROLE_INVENTORY_ADMIN *OR* owner of the source (parent) *OR* owner of the child *OR* MANAGE_OBJECT_ADMIN permission on the source (parent) + * ROLE_INVENTORY_ADMIN *OR* ROLE_MANAGED_OBJECT_ADMIN *OR* owner of the source (parent) *OR* owner of the child *OR* MANAGE_OBJECT_ADMIN permission on the source (parent) * * ##### Response Codes * @@ -505,7 +505,7 @@ interface ChildOperationsApi { * * ##### Required roles * - * ROLE_INVENTORY_READ *OR* MANAGE_OBJECT_READ permission on the source (parent) + * ROLE_INVENTORY_READ *OR* ROLE_MANAGED_OBJECT_READ *OR* MANAGE_OBJECT_READ permission on the source (parent) * * ##### Response Codes * @@ -536,7 +536,7 @@ interface ChildOperationsApi { * * ##### Required roles * - * ROLE_INVENTORY_ADMIN *OR* owner of the source (parent) *OR* owner of the child *OR* MANAGE_OBJECT_ADMIN permission on the source (parent) + * ROLE_INVENTORY_ADMIN *OR* ROLE_MANAGED_OBJECT_ADMIN *OR* owner of the source (parent) *OR* owner of the child *OR* MANAGE_OBJECT_ADMIN permission on the source (parent) * * ##### Response Codes * @@ -570,7 +570,7 @@ interface ChildOperationsApi { * * ##### Required roles * - * ROLE_INVENTORY_READ *OR* owner of the source *OR* MANAGE_OBJECT_READ permission on the source + * ROLE_INVENTORY_READ *OR* ROLE_MANAGED_OBJECT_READ *OR* owner of the source *OR* MANAGE_OBJECT_READ permission on the source * * ##### Response Codes * @@ -623,7 +623,7 @@ interface ChildOperationsApi { * * ##### Required roles * - * ROLE_INVENTORY_ADMIN *OR* ((owner of the source *OR* MANAGE_OBJECT_ADMIN permission on the source) *AND* (owner of the child *OR* MANAGE_OBJECT_ADMIN permission on the child)) + * ROLE_INVENTORY_ADMIN *OR* ROLE_MANAGED_OBJECT_ADMIN *OR* ((owner of the source *OR* MANAGE_OBJECT_ADMIN permission on the source) *AND* (owner of the child *OR* MANAGE_OBJECT_ADMIN permission on the child)) * * ##### Response Codes * @@ -659,7 +659,7 @@ interface ChildOperationsApi { * * ##### Required roles * - * ROLE_INVENTORY_ADMIN *OR* ((owner of the source *OR* MANAGE_OBJECT_ADMIN permission on the source) *AND* (owner of the child *OR* MANAGE_OBJECT_ADMIN permission on the child)) + * ROLE_INVENTORY_ADMIN *OR* ROLE_MANAGED_OBJECT_ADMIN *OR* ((owner of the source *OR* MANAGE_OBJECT_ADMIN permission on the source) *AND* (owner of the child *OR* MANAGE_OBJECT_ADMIN permission on the child)) * * ##### Response Codes * @@ -695,7 +695,7 @@ interface ChildOperationsApi { * * ##### Required roles * - * ROLE_INVENTORY_ADMIN *OR* ((owner of the source *OR* MANAGE_OBJECT_ADMIN permission on the source) *AND* (owner of the child *OR* MANAGE_OBJECT_ADMIN permission on the child)) + * ROLE_INVENTORY_ADMIN *OR* ROLE_MANAGED_OBJECT_ADMIN *OR* ((owner of the source *OR* MANAGE_OBJECT_ADMIN permission on the source) *AND* (owner of the child *OR* MANAGE_OBJECT_ADMIN permission on the child)) * * ##### Response Codes * @@ -728,7 +728,7 @@ interface ChildOperationsApi { * * ##### Required roles * - * ROLE_INVENTORY_ADMIN *OR* owner of the source (parent) *OR* owner of the child *OR* MANAGE_OBJECT_ADMIN permission on the source (parent) + * ROLE_INVENTORY_ADMIN *OR* ROLE_MANAGED_OBJECT_ADMIN *OR* owner of the source (parent) *OR* owner of the child *OR* MANAGE_OBJECT_ADMIN permission on the source (parent) * * ##### Response Codes * @@ -761,7 +761,7 @@ interface ChildOperationsApi { * * ##### Required roles * - * ROLE_INVENTORY_READ *OR* MANAGE_OBJECT_READ permission on the source (parent) + * ROLE_INVENTORY_READ *OR* ROLE_MANAGED_OBJECT_READ *OR* MANAGE_OBJECT_READ permission on the source (parent) * * ##### Response Codes * @@ -792,7 +792,7 @@ interface ChildOperationsApi { * * ##### Required roles * - * ROLE_INVENTORY_ADMIN *OR* owner of the source (parent) *OR* owner of the child *OR* MANAGE_OBJECT_ADMIN permission on the source (parent) + * ROLE_INVENTORY_ADMIN *OR* ROLE_MANAGED_OBJECT_ADMIN *OR* owner of the source (parent) *OR* owner of the child *OR* MANAGE_OBJECT_ADMIN permission on the source (parent) * * ##### Response Codes * diff --git a/src/main/java/com/cumulocity/client/api/CurrentApplicationApi.kt b/src/main/java/com/cumulocity/client/api/CurrentApplicationApi.kt index 6896491..84eb84e 100644 --- a/src/main/java/com/cumulocity/client/api/CurrentApplicationApi.kt +++ b/src/main/java/com/cumulocity/client/api/CurrentApplicationApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory diff --git a/src/main/java/com/cumulocity/client/api/CurrentUserApi.kt b/src/main/java/com/cumulocity/client/api/CurrentUserApi.kt index ed5b55e..2c0dec1 100644 --- a/src/main/java/com/cumulocity/client/api/CurrentUserApi.kt +++ b/src/main/java/com/cumulocity/client/api/CurrentUserApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory @@ -91,7 +91,7 @@ interface CurrentUserApi { */ @Headers(*["Content-Type:application/vnd.com.nsn.cumulocity.currentuser+json", "Accept:application/vnd.com.nsn.cumulocity.error+json, application/vnd.com.nsn.cumulocity.currentuser+json"]) @PUT("/user/currentUser") - @ReadOnlyProperties("self", "effectiveRoles", "shouldResetPassword", "id", "lastPasswordChange", "twoFactorAuthenticationEnabled", "devicePermissions") + @ReadOnlyProperties("self", "effectiveRoles", "shouldResetPassword", "id", "lastPasswordChange", "twoFactorAuthenticationEnabled") fun updateCurrentUser( @Body body: CurrentUser ): Call diff --git a/src/main/java/com/cumulocity/client/api/DeviceCredentialsApi.kt b/src/main/java/com/cumulocity/client/api/DeviceCredentialsApi.kt index 1078d79..d407bf9 100644 --- a/src/main/java/com/cumulocity/client/api/DeviceCredentialsApi.kt +++ b/src/main/java/com/cumulocity/client/api/DeviceCredentialsApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory @@ -117,13 +117,13 @@ interface DeviceCredentialsApi { * * ```csv * ID;CREDENTIALS;TYPE;NAME;ICCID;IDTYPE;PATH;SHELL - * id_101;abcd1234;type_of_device;Device 101;111111111;;csv device/subgroup0;1 - * id_102;abcd1234;type_of_device;Device 102;222222222;;csv device/subgroup0;0 - * id_111;abcd1234;type_of_device;Device 111;333333333;c8y_Imei;csv device1/subgroup1;0 - * id_112;abcd1234;type_of_device;Device 112;444444444;;csv device1/subgroup1;1 - * id_121;abcd1234;type_of_device;Device 121;555555555;;csv device1/subgroup2;1 - * id_122;abcd1234;type_of_device;Device 122;;;csv device1/subgroup2; - * id_131;abcd1234;type_of_device;Device 131;;;csv device1/subgroup3; + * id_101;AbcD1234!1234AbcD;type_of_device;Device 101;111111111;;csv device/subgroup0;1 + * id_102;AbcD1234!1234AbcD;type_of_device;Device 102;222222222;;csv device/subgroup0;0 + * id_111;AbcD1234!1234AbcD;type_of_device;Device 111;333333333;c8y_Imei;csv device1/subgroup1;0 + * id_112;AbcD1234!1234AbcD;type_of_device;Device 112;444444444;;csv device1/subgroup1;1 + * id_121;AbcD1234!1234AbcD;type_of_device;Device 121;555555555;;csv device1/subgroup2;1 + * id_122;AbcD1234!1234AbcD;type_of_device;Device 122;;;csv device1/subgroup2; + * id_131;AbcD1234!1234AbcD;type_of_device;Device 131;;;csv device1/subgroup3; * ``` * There is also a simple registration method that creates all registration requests at once, then each one needs to go through regular acceptance.This simple registration only makes use of the ID and PATH fields from the list above. * diff --git a/src/main/java/com/cumulocity/client/api/DevicePermissionsApi.kt b/src/main/java/com/cumulocity/client/api/DevicePermissionsApi.kt new file mode 100644 index 0000000..509189f --- /dev/null +++ b/src/main/java/com/cumulocity/client/api/DevicePermissionsApi.kt @@ -0,0 +1,117 @@ +// 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.api +import retrofit2.converter.scalars.ScalarsConverterFactory +import retrofit2.converter.gson.ExtendedGsonConverterFactory +import retrofit2.Retrofit +import retrofit2.Call +import retrofit2.http.GET +import retrofit2.http.PUT +import retrofit2.http.Path +import retrofit2.http.Body +import retrofit2.http.Headers +import okhttp3.OkHttpClient +import retrofit2.converter.gson.ReadOnlyProperties +import okhttp3.ResponseBody +import com.cumulocity.client.model.UpdatedDevicePermissions +import com.cumulocity.client.model.DevicePermissionOwners + +/** + * API methods to retrieve and update device permissions assignments. + * + * Device permissions enable users to access and manipulate devices. + * + * The device permission structure is **[API:fragment_name:permission]** where: + * + * * **API** is one of the following values: OPERATION, ALARM, AUDIT, EVENT, MANAGED_OBJECT, MEASUREMENT or "*" + * * **fragment_name** can be the name of any fragment, for example, "c8y_Restart" or "*" + * * **permission** is ADMIN, READ or "*" + * + * Required permission per HTTP method: + * + * * GET - READ or "*" + * * PUT - ADMIN or "*" + * + * The wildcard "*" enables you to access every API and stored object regardless of the fragments that are inside it. + * + * > **⚠️ Important:** If there is no fragment in an object, for example, to read the object, you must use the wildcard "*" for the **fragment_name** part of the device permission (see the structure above). For example: `"10200":["MEASUREMENT:*:READ"]`. + */ +interface DevicePermissionsApi { + + companion object Factory { + fun create(baseUrl: String): DevicePermissionsApi { + return create(baseUrl, null) + } + + fun create(baseUrl: String, clientBuilder: OkHttpClient.Builder?): DevicePermissionsApi { + val retrofitBuilder = retrofit().baseUrl(baseUrl) + if (clientBuilder != null) { + retrofitBuilder.client(clientBuilder.build()) + } + return retrofitBuilder.build().create(DevicePermissionsApi::class.java) + } + + fun retrofit(): Retrofit.Builder{ + return Retrofit.Builder() + .addConverterFactory(ExtendedGsonConverterFactory()) + .addConverterFactory(ScalarsConverterFactory.create()) + } + } + + /** + * Returns all device permissions assignments + * + * Returns all device permissions assignments if the current user has READ permission. + * + * + * ##### Required roles + * + * ROLE_USER_MANAGEMENT_READ *OR* ROLE_USER_MANAGEMENT_CREATE + * + * ##### Response Codes + * + * The following table gives an overview of the possible response codes and their meanings: + * + * * HTTP 200 The request has succeeded and the device permissions assignments are sent in the response. + * * HTTP 401 Authentication information is missing or invalid. + * * HTTP 403 Not authorized to perform this operation. + * + * @param id + * Unique identifier of the managed object. + */ + @Headers("Accept:application/vnd.com.nsn.cumulocity.error+json, application/json") + @GET("/user/devicePermissions/{id}") + fun getDevicePermissionAssignments( + @Path("id") id: String + ): Call + + /** + * Updates the device permissions assignments + * + * Updates the device permissions assignments if the current user has ADMIN permission or CREATE permission and also has all device permissions. + * + * + * ##### Required roles + * + * ROLE_USER_MANAGEMENT_ADMIN *OR* ROLE_USER_MANAGEMENT_CREATE + * + * ##### Response Codes + * + * The following table gives an overview of the possible response codes and their meanings: + * + * * HTTP 200 The device permissions were successfully updated. + * * HTTP 401 Authentication information is missing or invalid. + * * HTTP 403 Not authorized to perform this operation. + * + * @param body + * @param id + * Unique identifier of the managed object. + */ + @Headers(*["Content-Type:application/json", "Accept:application/json"]) + @PUT("/user/devicePermissions/{id}") + fun updateDevicePermissionAssignments( + @Body body: UpdatedDevicePermissions, + @Path("id") id: String + ): Call +} diff --git a/src/main/java/com/cumulocity/client/api/DeviceStatisticsApi.kt b/src/main/java/com/cumulocity/client/api/DeviceStatisticsApi.kt index 8480dac..f6070ae 100644 --- a/src/main/java/com/cumulocity/client/api/DeviceStatisticsApi.kt +++ b/src/main/java/com/cumulocity/client/api/DeviceStatisticsApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory diff --git a/src/main/java/com/cumulocity/client/api/EventsApi.kt b/src/main/java/com/cumulocity/client/api/EventsApi.kt index 131a565..fb3e227 100644 --- a/src/main/java/com/cumulocity/client/api/EventsApi.kt +++ b/src/main/java/com/cumulocity/client/api/EventsApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory diff --git a/src/main/java/com/cumulocity/client/api/ExternalIDsApi.kt b/src/main/java/com/cumulocity/client/api/ExternalIDsApi.kt index 304bb4c..687d37a 100644 --- a/src/main/java/com/cumulocity/client/api/ExternalIDsApi.kt +++ b/src/main/java/com/cumulocity/client/api/ExternalIDsApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory diff --git a/src/main/java/com/cumulocity/client/api/GroupsApi.kt b/src/main/java/com/cumulocity/client/api/GroupsApi.kt index cd52b6d..0ac46ea 100644 --- a/src/main/java/com/cumulocity/client/api/GroupsApi.kt +++ b/src/main/java/com/cumulocity/client/api/GroupsApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory diff --git a/src/main/java/com/cumulocity/client/api/IdentityApi.kt b/src/main/java/com/cumulocity/client/api/IdentityApi.kt index c558d88..6ef3f5e 100644 --- a/src/main/java/com/cumulocity/client/api/IdentityApi.kt +++ b/src/main/java/com/cumulocity/client/api/IdentityApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory diff --git a/src/main/java/com/cumulocity/client/api/InventoryRolesApi.kt b/src/main/java/com/cumulocity/client/api/InventoryRolesApi.kt index 642685e..71c3391 100644 --- a/src/main/java/com/cumulocity/client/api/InventoryRolesApi.kt +++ b/src/main/java/com/cumulocity/client/api/InventoryRolesApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory diff --git a/src/main/java/com/cumulocity/client/api/LoginOptionsApi.kt b/src/main/java/com/cumulocity/client/api/LoginOptionsApi.kt index 5e601bc..9b9a433 100644 --- a/src/main/java/com/cumulocity/client/api/LoginOptionsApi.kt +++ b/src/main/java/com/cumulocity/client/api/LoginOptionsApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory @@ -9,12 +9,15 @@ import retrofit2.Call import retrofit2.http.GET import retrofit2.http.POST import retrofit2.http.PUT +import retrofit2.http.DELETE import retrofit2.http.Query import retrofit2.http.Body import retrofit2.http.Path +import retrofit2.http.Header import retrofit2.http.Headers import okhttp3.OkHttpClient import retrofit2.converter.gson.ReadOnlyProperties +import okhttp3.ResponseBody import com.cumulocity.client.model.AuthConfig import com.cumulocity.client.model.AuthConfigAccess import com.cumulocity.client.model.LoginOptionCollection @@ -49,9 +52,9 @@ interface LoginOptionsApi { } /** - * Retrieve the login options + * Retrieve all login options * - * Retrieve the login options available in the tenant. + * Retrieve all login options available in the tenant. * * ##### Response Codes * @@ -97,11 +100,101 @@ interface LoginOptionsApi { */ @Headers(*["Content-Type:application/vnd.com.nsn.cumulocity.authconfig+json", "Accept:application/vnd.com.nsn.cumulocity.error+json, application/vnd.com.nsn.cumulocity.authconfig+json"]) @POST("/tenant/loginOptions") - @ReadOnlyProperties("self") + @ReadOnlyProperties("self", "id") fun createLoginOption( @Body body: AuthConfig ): Call + /** + * Retrieve a specific login option + * + * Retrieve a specific login option in the tenant by the given type or ID. + * + * + * ##### Required roles + * + * ((ROLE_TENANT_ADMIN *OR* ROLE_TENANT_MANAGEMENT_ADMIN *OR* ROLE_USER_MANAGEMENT_OWN_ADMIN *OR* ROLE_USER_MANAGEMENT_CREATE) *AND* tenant access to login option is not restricted by management tenant) + * + * ##### Response Codes + * + * The following table gives an overview of the possible response codes and their meanings: + * + * * HTTP 200 The request has succeeded and the login option is sent in the response. + * * HTTP 401 Authentication information is missing or invalid. + * * HTTP 403 Not authorized to perform this operation. + * * HTTP 404 Login option not found. + * + * @param typeOrId + * The type or ID of the login option. The type's value is case insensitive and can be `OAUTH2`, `OAUTH2_INTERNAL` or `BASIC`. + */ + @Headers("Accept:application/vnd.com.nsn.cumulocity.error+json, application/vnd.com.nsn.cumulocity.authConfig+json") + @GET("/tenant/loginOptions/{typeOrId}") + fun getLoginOption( + @Path("typeOrId") typeOrId: String + ): Call + + /** + * Update a specific login option + * + * Update a specific login option in the tenant by a given type or ID. + * + * + * ##### Required roles + * + * ((ROLE_TENANT_ADMIN *OR* ROLE_TENANT_MANAGEMENT_ADMIN) *AND* tenant access to login option is not restricted by management tenant) + * + * ##### Response Codes + * + * The following table gives an overview of the possible response codes and their meanings: + * + * * HTTP 200 A login option was updated. + * * HTTP 401 Authentication information is missing or invalid. + * * HTTP 403 Not authorized to perform this operation. + * * HTTP 404 Login option not found. + * + * @param body + * @param typeOrId + * The type or ID of the login option. The type's value is case insensitive and can be `OAUTH2`, `OAUTH2_INTERNAL` or `BASIC`. + * @param xCumulocityProcessingMode + * Used to explicitly control the processing mode of the request. See [Processing mode](#processing-mode) for more details. + */ + @Headers(*["Content-Type:application/vnd.com.nsn.cumulocity.authconfig+json", "Accept:application/vnd.com.nsn.cumulocity.error+json, application/vnd.com.nsn.cumulocity.authconfig+json"]) + @PUT("/tenant/loginOptions/{typeOrId}") + @ReadOnlyProperties("self") + fun updateLoginOption( + @Body body: AuthConfig, + @Path("typeOrId") typeOrId: String, + @Header("X-Cumulocity-Processing-Mode") xCumulocityProcessingMode: String? = null + ): Call + + /** + * Delete a specific login option + * + * Delete a specific login option in the tenant by a given type or ID. + * + * + * ##### Required roles + * + * ((ROLE_TENANT_ADMIN *OR* ROLE_TENANT_MANAGEMENT_ADMIN) *AND* tenant access to login option is not restricted by management tenant) + * + * ##### Response Codes + * + * The following table gives an overview of the possible response codes and their meanings: + * + * * HTTP 204 A login option was removed. + * * HTTP 401 Authentication information is missing or invalid. + * * HTTP 403 Not authorized to perform this operation. + * * HTTP 404 Login option not found. + * + * @param typeOrId + * The type or ID of the login option. The type's value is case insensitive and can be `OAUTH2`, `OAUTH2_INTERNAL` or `BASIC`. + */ + @Headers("Accept:application/json") + @DELETE("/tenant/loginOptions/{typeOrId}") + fun deleteLoginOption( + @Path("typeOrId") typeOrId: String + ): Call + /** * Update a tenant's access to the login option * @@ -127,10 +220,10 @@ interface LoginOptionsApi { * Unique identifier of a Cumulocity IoT tenant. */ @Headers(*["Content-Type:application/json", "Accept:application/vnd.com.nsn.cumulocity.error+json, application/vnd.com.nsn.cumulocity.authconfig+json"]) - @PUT("/tenant/loginOptions/{type_or_id}/restrict") - fun updateLoginOption( + @PUT("/tenant/loginOptions/{typeOrId}/restrict") + fun updateLoginOptionAccess( @Body body: AuthConfigAccess, - @Path("type_or_id") typeOrId: String, + @Path("typeOrId") typeOrId: String, @Query("targetTenant") targetTenant: String ): Call } diff --git a/src/main/java/com/cumulocity/client/api/LoginTokensApi.kt b/src/main/java/com/cumulocity/client/api/LoginTokensApi.kt index 047eb78..9340129 100644 --- a/src/main/java/com/cumulocity/client/api/LoginTokensApi.kt +++ b/src/main/java/com/cumulocity/client/api/LoginTokensApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory diff --git a/src/main/java/com/cumulocity/client/api/ManagedObjectsApi.kt b/src/main/java/com/cumulocity/client/api/ManagedObjectsApi.kt index 01fb405..0367833 100644 --- a/src/main/java/com/cumulocity/client/api/ManagedObjectsApi.kt +++ b/src/main/java/com/cumulocity/client/api/ManagedObjectsApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory @@ -152,7 +152,7 @@ interface ManagedObjectsApi { * * ##### Required roles * - * ROLE_INVENTORY_ADMIN *OR* ROLE_INVENTORY_CREATE + * ROLE_INVENTORY_ADMIN *OR* ROLE_INVENTORY_CREATE *OR* ROLE_MANAGED_OBJECT_ADMIN *OR* ROLE_MANAGED_OBJECT_CREATE * * ##### Response Codes * @@ -174,55 +174,6 @@ interface ManagedObjectsApi { @Header("X-Cumulocity-Processing-Mode") xCumulocityProcessingMode: String? = null ): Call - /** - * Retrieve the total number of managed objects - * - * Retrieve the total number of managed objects (for example, devices, assets, etc.) registered in your tenant, or a subset based on queries. - * - * - * ##### Required roles - * - * ROLE_INVENTORY_READ is not required, but if the current user doesn't have this role, the response will contain the number of inventory objects accessible for the user. - * - * ##### Response Codes - * - * The following table gives an overview of the possible response codes and their meanings: - * - * * HTTP 200 The request has succeeded and the number of managed objects is sent in the response. - * * HTTP 401 Authentication information is missing or invalid. - * - * @param childAdditionId - * Search for a specific child addition and list all the groups to which it belongs. - * @param childAssetId - * Search for a specific child asset and list all the groups to which it belongs. - * @param childDeviceId - * Search for a specific child device and list all the groups to which it belongs. - * @param fragmentType - * A characteristic which identifies a managed object or event, for example, geolocation, electricity sensor, relay state. - * @param ids - * The managed object IDs to search for. - * - * **ⓘ Info:** If you query for multiple IDs at once, comma-separate the values. - * @param owner - * Username of the owner of the managed objects. - * @param text - * Search for managed objects where any property value is equal to the given one. Only string values are supported. - * @param type - * The type of managed object to search for. - */ - @Headers("Accept:application/vnd.com.nsn.cumulocity.error+json, text/plain,application/json") - @GET("/inventory/managedObjects/count") - fun getNumberOfManagedObjects( - @Query("childAdditionId") childAdditionId: String? = null, - @Query("childAssetId") childAssetId: String? = null, - @Query("childDeviceId") childDeviceId: String? = null, - @Query("fragmentType") fragmentType: String? = null, - @Query("ids") ids: SeparatedQueryParameter? = null, - @Query("owner") owner: String? = null, - @Query("text") text: String? = null, - @Query("type") type: String? = null - ): Call - /** * Retrieve a specific managed object * @@ -231,7 +182,7 @@ interface ManagedObjectsApi { * * ##### Required roles * - * ROLE_INVENTORY_READ *OR* owner of the source *OR* MANAGE_OBJECT_READ permission on the source + * ROLE_INVENTORY_READ *OR* ROLE_MANAGED_OBJECT_READ *OR* owner of the source *OR* MANAGE_OBJECT_READ permission on the source * * ##### Response Codes * @@ -274,7 +225,7 @@ interface ManagedObjectsApi { * * ##### Required roles * - * ROLE_INVENTORY_ADMIN *OR* owner of the source *OR* MANAGE_OBJECT_ADMIN permission on the source + * ROLE_INVENTORY_ADMIN *OR* ROLE_MANAGED_OBJECT_ADMIN *OR* owner of the source *OR* MANAGE_OBJECT_ADMIN permission on the source * * ##### Response Codes * @@ -305,10 +256,11 @@ interface ManagedObjectsApi { * Remove a specific managed object (for example, device) by a given ID. * * > **ⓘ Info:** Inventory DELETE requests are not synchronous. The response could be returned before the delete request has been completed. This may happen especially when the deleted managed object has a lot of associated data. After sending the request, the platform starts deleting the associated data in an asynchronous way. Finally, the requested managed object is deleted after all associated data has been deleted. + * > **ⓘ Info:** By default, the delete operation is always propagated to the subgroups, but only if the deleted object is a group. * * ##### Required roles * - * ROLE_INVENTORY_ADMIN *OR* owner of the source *OR* MANAGE_OBJECT_ADMIN permission on the source + * ROLE_INVENTORY_ADMIN *OR* ROLE_MANAGED_OBJECT_ADMIN *OR* owner of the source *OR* MANAGE_OBJECT_ADMIN permission on the source * * ##### Response Codes * @@ -348,7 +300,7 @@ interface ManagedObjectsApi { * * ##### Required roles * - * ROLE_INVENTORY_READ + * ROLE_INVENTORY_READ *OR* ROLE_MANAGED_OBJECT_READ * * ##### Response Codes * @@ -375,7 +327,7 @@ interface ManagedObjectsApi { * * ##### Required roles * - * ROLE_INVENTORY_READ *OR* owner of the source *OR* MANAGE_OBJECT_READ permission on the source + * ROLE_INVENTORY_READ *OR* ROLE_MANAGED_OBJECT_READ *OR* owner of the source *OR* MANAGE_OBJECT_READ permission on the source * * ##### Response Codes * @@ -402,7 +354,7 @@ interface ManagedObjectsApi { * * ##### Required roles * - * ROLE_INVENTORY_READ *OR* owner of the source *OR* MANAGE_OBJECT_READ permission on the source + * ROLE_INVENTORY_READ *OR* ROLE_MANAGED_OBJECT_READ *OR* owner of the source *OR* MANAGE_OBJECT_READ permission on the source * * ##### Response Codes * @@ -429,7 +381,7 @@ interface ManagedObjectsApi { * * ##### Required roles * - * ROLE_INVENTORY_READ *OR* owner of the source *OR* MANAGE_OBJECT_READ permission on the source + * ROLE_INVENTORY_READ *OR* ROLE_MANAGED_OBJECT_READ *OR* owner of the source *OR* MANAGE_OBJECT_READ permission on the source * * ##### Response Codes * @@ -456,7 +408,7 @@ interface ManagedObjectsApi { * * ##### Required roles * - * ROLE_INVENTORY_ADMIN *OR* owner of the source *OR* MANAGE_OBJECT_ADMIN permission on the source + * ROLE_INVENTORY_ADMIN *OR* ROLE_MANAGED_OBJECT_ADMIN *OR* owner of the source *OR* MANAGE_OBJECT_ADMIN permission on the source * * ##### Response Codes * diff --git a/src/main/java/com/cumulocity/client/api/MeasurementsApi.kt b/src/main/java/com/cumulocity/client/api/MeasurementsApi.kt index 91e5353..c88bd36 100644 --- a/src/main/java/com/cumulocity/client/api/MeasurementsApi.kt +++ b/src/main/java/com/cumulocity/client/api/MeasurementsApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory @@ -211,6 +211,27 @@ interface MeasurementsApi { * DELETE requests are not synchronous. The response could be returned before the delete request has been completed. This may happen especially when there are a lot of measurements to be deleted. * * > **⚠️ Important:** Note that it is possible to call this endpoint without providing any parameter - it may result in deleting all measurements and it is not recommended. + * In case of enhanced time series measurements, both `dateFrom` and `dateTo` parameters must be truncated to full hours (for example, 2022-08-19T14:00:00.000Z), otherwise an error will be returned.The `fragmentType` parameter allows to delete measurements only by a measurement fragment when enhanced time series measurements are used.It's not possible to delete by a custom (non-measurement) fragment. + * + * Example for a valid measurement value fragment: + * + * ``` + * "c8y_TemperatureMeasurement": { + * "T": { + * "value": 28, + * "unit": "C" + * } + * } + * ``` + * In the example above `c8y_TemperatureMeasurement` is called fragment and `T` is called series. + * + * Example for a non-measurement fragment: + * + * ``` + * "c8y_TemperatureMeasurement": 28 + * ``` + * Enhanced Time series measurements will not allow to delete by fragment specific like above. + * * * ##### Required roles * @@ -223,6 +244,7 @@ interface MeasurementsApi { * * HTTP 204 A collection of measurements was removed. * * HTTP 401 Authentication information is missing or invalid. * * HTTP 403 Not authorized to perform this operation. + * * HTTP 422 Unprocessable Entity – invalid payload. * * @param xCumulocityProcessingMode * Used to explicitly control the processing mode of the request. See [Processing mode](#processing-mode) for more details. @@ -251,7 +273,7 @@ interface MeasurementsApi { /** * Retrieve a specific measurement * - * Retrieve a specific measurement by a given ID. + * Retrieve a specific measurement by a given ID.Note that you cannot retrieve time series measurements by ID.Instead you can search for such measurements via query parameters.No behavior changes for tenants which do not have time series enabled. * * * ##### Required roles @@ -278,7 +300,7 @@ interface MeasurementsApi { /** * Remove a specific measurement * - * Remove a specific measurement by a given ID. + * Remove a specific measurement by a given ID.Note that you cannot delete time series measurements by ID.Instead, you can delete by query or use the retention rules to remove expired measurements data from the Operational Store.No behavior changes for tenants which do not have time series enabled. * * * ##### Required roles diff --git a/src/main/java/com/cumulocity/client/api/NewDeviceRequestsApi.kt b/src/main/java/com/cumulocity/client/api/NewDeviceRequestsApi.kt index 59217d0..40fe2a7 100644 --- a/src/main/java/com/cumulocity/client/api/NewDeviceRequestsApi.kt +++ b/src/main/java/com/cumulocity/client/api/NewDeviceRequestsApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory diff --git a/src/main/java/com/cumulocity/client/api/OperationsApi.kt b/src/main/java/com/cumulocity/client/api/OperationsApi.kt index 0c5732e..1ff2de1 100644 --- a/src/main/java/com/cumulocity/client/api/OperationsApi.kt +++ b/src/main/java/com/cumulocity/client/api/OperationsApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory @@ -243,7 +243,7 @@ interface OperationsApi { */ @Headers(*["Content-Type:application/vnd.com.nsn.cumulocity.operation+json", "Accept:application/vnd.com.nsn.cumulocity.error+json, application/vnd.com.nsn.cumulocity.operation+json"]) @PUT("/devicecontrol/operations/{id}") - @ReadOnlyProperties("creationTime", "self", "bulkOperationId", "failureReason", "self", "id", "deviceId") + @ReadOnlyProperties("creationTime", "self", "bulkOperationId", "self", "id", "deviceId") fun updateOperation( @Body body: Operation, @Path("id") id: String, diff --git a/src/main/java/com/cumulocity/client/api/OptionsApi.kt b/src/main/java/com/cumulocity/client/api/OptionsApi.kt index a03f027..ae452dc 100644 --- a/src/main/java/com/cumulocity/client/api/OptionsApi.kt +++ b/src/main/java/com/cumulocity/client/api/OptionsApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory diff --git a/src/main/java/com/cumulocity/client/api/RealtimeNotificationApi.kt b/src/main/java/com/cumulocity/client/api/RealtimeNotificationApi.kt index 95d8813..e4cd2ba 100644 --- a/src/main/java/com/cumulocity/client/api/RealtimeNotificationApi.kt +++ b/src/main/java/com/cumulocity/client/api/RealtimeNotificationApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory diff --git a/src/main/java/com/cumulocity/client/api/RetentionRulesApi.kt b/src/main/java/com/cumulocity/client/api/RetentionRulesApi.kt index 9f76784..04a470f 100644 --- a/src/main/java/com/cumulocity/client/api/RetentionRulesApi.kt +++ b/src/main/java/com/cumulocity/client/api/RetentionRulesApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory diff --git a/src/main/java/com/cumulocity/client/api/RolesApi.kt b/src/main/java/com/cumulocity/client/api/RolesApi.kt index a34c0e8..bf034c1 100644 --- a/src/main/java/com/cumulocity/client/api/RolesApi.kt +++ b/src/main/java/com/cumulocity/client/api/RolesApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory diff --git a/src/main/java/com/cumulocity/client/api/SubscriptionsApi.kt b/src/main/java/com/cumulocity/client/api/SubscriptionsApi.kt index 2856d96..25a54e2 100644 --- a/src/main/java/com/cumulocity/client/api/SubscriptionsApi.kt +++ b/src/main/java/com/cumulocity/client/api/SubscriptionsApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory @@ -71,6 +71,14 @@ interface SubscriptionsApi { * Indicates how many entries of the collection shall be returned. The upper limit for one page is 2,000 objects. * @param source * The managed object ID to which the subscription is associated. + * @param subscription + * The subscription name by which filtering will be done. + * @param typeFilter + * The type used to filter subscriptions. This will check the subscription's `subscriptionFilter.typeFilter` field. + * + * **ⓘ Info:** Filtering by `typeFilter` may affect paging. Additional post filtering may be performed if OData-like expressions are used in the subscriptions. + * @param withTotalElements + * When set to `true`, the returned result will contain in the statistics object the total number of elements. Only applicable on [range queries](https://en.wikipedia.org/wiki/Range_query_(database)). * @param withTotalPages * When set to `true`, the returned result will contain in the statistics object the total number of pages. Only applicable on [range queries](https://en.wikipedia.org/wiki/Range_query_(database)). */ @@ -81,6 +89,9 @@ interface SubscriptionsApi { @Query("currentPage") currentPage: Int? = null, @Query("pageSize") pageSize: Int? = null, @Query("source") source: String? = null, + @Query("subscription") subscription: String? = null, + @Query("typeFilter") typeFilter: String? = null, + @Query("withTotalElements") withTotalElements: Boolean? = null, @Query("withTotalPages") withTotalPages: Boolean? = null ): Call @@ -96,6 +107,7 @@ interface SubscriptionsApi { * * The name of the subscription. * * The applicable filter criteria. * * The option to only include specific custom fragments in the forwarded data. + * * The option to use persistent or non-persistent message storage. * * * ##### Required roles diff --git a/src/main/java/com/cumulocity/client/api/SystemOptionsApi.kt b/src/main/java/com/cumulocity/client/api/SystemOptionsApi.kt index cf18f79..edc4314 100644 --- a/src/main/java/com/cumulocity/client/api/SystemOptionsApi.kt +++ b/src/main/java/com/cumulocity/client/api/SystemOptionsApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory diff --git a/src/main/java/com/cumulocity/client/api/TenantApplicationsApi.kt b/src/main/java/com/cumulocity/client/api/TenantApplicationsApi.kt index 53296e9..68b235d 100644 --- a/src/main/java/com/cumulocity/client/api/TenantApplicationsApi.kt +++ b/src/main/java/com/cumulocity/client/api/TenantApplicationsApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory diff --git a/src/main/java/com/cumulocity/client/api/TenantsApi.kt b/src/main/java/com/cumulocity/client/api/TenantsApi.kt index f220a55..240b9a9 100644 --- a/src/main/java/com/cumulocity/client/api/TenantsApi.kt +++ b/src/main/java/com/cumulocity/client/api/TenantsApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory @@ -97,6 +97,12 @@ interface TenantsApi { * When set to `true`, the returned result will contain in the statistics object the total number of elements. Only applicable on [range queries](https://en.wikipedia.org/wiki/Range_query_(database)). * @param withTotalPages * When set to `true`, the returned result will contain in the statistics object the total number of pages. Only applicable on [range queries](https://en.wikipedia.org/wiki/Range_query_(database)). + * @param company + * Company name associated with the Cumulocity IoT tenant. + * @param domain + * Domain name of the Cumulocity IoT tenant. + * @param parent + * Identifier of the Cumulocity IoT tenant's parent. */ @Headers("Accept:application/vnd.com.nsn.cumulocity.error+json, application/vnd.com.nsn.cumulocity.tenantcollection+json") @GET("/tenant/tenants") @@ -104,7 +110,10 @@ interface TenantsApi { @Query("currentPage") currentPage: Int? = null, @Query("pageSize") pageSize: Int? = null, @Query("withTotalElements") withTotalElements: Boolean? = null, - @Query("withTotalPages") withTotalPages: Boolean? = null + @Query("withTotalPages") withTotalPages: Boolean? = null, + @Query("company") company: String? = null, + @Query("domain") domain: String? = null, + @Query("parent") parent: String? = null ): Call /** @@ -170,7 +179,7 @@ interface TenantsApi { * * ##### Required roles * - * ROLE_TENANT_MANAGEMENT_READ *AND* the current tenant is its parent *OR* is the management tenant + * ROLE_TENANT_MANAGEMENT_READ *AND* (the current tenant is its parent *OR* is the management tenant) * * ##### Response Codes * @@ -198,7 +207,8 @@ interface TenantsApi { * * ##### Required roles * - * (ROLE_TENANT_MANAGEMENT_ADMIN *OR* ROLE_TENANT_MANAGEMENT_UPDATE) *AND* (the current tenant is its parent *AND* the current tenant is allowed to create subtenants) *OR* is the management tenant + * (ROLE_TENANT_MANAGEMENT_ADMIN *OR* ROLE_TENANT_MANAGEMENT_UPDATE) *AND* + * ((the current tenant is its parent *AND* the current tenant is allowed to create subtenants) *OR* is the management tenant) * * ##### Response Codes * diff --git a/src/main/java/com/cumulocity/client/api/TokensApi.kt b/src/main/java/com/cumulocity/client/api/TokensApi.kt index 26e3999..de2b35e 100644 --- a/src/main/java/com/cumulocity/client/api/TokensApi.kt +++ b/src/main/java/com/cumulocity/client/api/TokensApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory @@ -52,6 +52,10 @@ interface TokensApi { * * The subscriber name which the client wishes to be identified with. * * The subscription name. This value must be associated with a subscription that's already been created and in essence, the obtained token will give the ability to read notifications for the subscription that is specified here. * * The token expiration duration. + * * The option to disable signing of the token by the Cumulocity IoT platform. + * * The subscription type that the token should be associated with. + * * The option to use the token to create shared consumers of the subscription. + * * The option to select the non-persistent variant of the subscription, if one exists. * * * ##### Required roles diff --git a/src/main/java/com/cumulocity/client/api/TrustedCertificatesApi.kt b/src/main/java/com/cumulocity/client/api/TrustedCertificatesApi.kt index 9523303..0228f8b 100644 --- a/src/main/java/com/cumulocity/client/api/TrustedCertificatesApi.kt +++ b/src/main/java/com/cumulocity/client/api/TrustedCertificatesApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory @@ -13,13 +13,19 @@ import retrofit2.http.DELETE import retrofit2.http.Path import retrofit2.http.Query import retrofit2.http.Body +import retrofit2.http.Header +import retrofit2.http.Multipart +import retrofit2.http.Part import retrofit2.http.Headers import okhttp3.OkHttpClient import retrofit2.converter.gson.ReadOnlyProperties import okhttp3.ResponseBody +import com.cumulocity.client.model.UploadedTrustedCertificate +import com.cumulocity.client.model.UploadedTrustedCertificateCollection import com.cumulocity.client.model.TrustedCertificate -import com.cumulocity.client.model.TrustedCertificateCollection import com.cumulocity.client.model.UploadedTrustedCertSignedVerificationCode +import com.cumulocity.client.model.TrustedCertificateCollection +import com.cumulocity.client.model.VerifyCertificateChain /** * API methods for managing trusted certificates used to establish device connections via MQTT. @@ -113,13 +119,20 @@ interface TrustedCertificatesApi { * @param body * @param tenantId * Unique identifier of a Cumulocity IoT tenant. + * @param xCumulocityProcessingMode + * Used to explicitly control the processing mode of the request. See [Processing mode](#processing-mode) for more details. + * @param addToTrustStore + * If set to `true` the certificate is added to the truststore. + * + * The truststore contains all trusted certificates. A connection to a device is only established if it connects to Cumulocity IoT with a certificate in the truststore. */ @Headers(*["Content-Type:application/json", "Accept:application/vnd.com.nsn.cumulocity.error+json, application/json"]) @POST("/tenant/tenants/{tenantId}/trusted-certificates") - @ReadOnlyProperties("notAfter", "serialNumber", "subject", "fingerprint", "self", "algorithmName", "version", "issuer", "notBefore") fun addTrustedCertificate( - @Body body: TrustedCertificate, - @Path("tenantId") tenantId: String + @Body body: UploadedTrustedCertificate, + @Path("tenantId") tenantId: String, + @Header("X-Cumulocity-Processing-Mode") xCumulocityProcessingMode: String? = null, + @Query("addToTrustStore") addToTrustStore: Boolean? = null ): Call /** @@ -145,13 +158,18 @@ interface TrustedCertificatesApi { * @param body * @param tenantId * Unique identifier of a Cumulocity IoT tenant. + * @param addToTrustStore + * If set to `true` the certificate is added to the truststore. + * + * The truststore contains all trusted certificates. A connection to a device is only established if it connects to Cumulocity IoT with a certificate in the truststore. */ @Headers(*["Content-Type:application/json", "Accept:application/vnd.com.nsn.cumulocity.error+json, application/json"]) @POST("/tenant/tenants/{tenantId}/trusted-certificates/bulk") @ReadOnlyProperties("next", "prev", "self", "statistics") fun addTrustedCertificates( - @Body body: TrustedCertificateCollection, - @Path("tenantId") tenantId: String + @Body body: UploadedTrustedCertificateCollection, + @Path("tenantId") tenantId: String, + @Query("addToTrustStore") addToTrustStore: Boolean? = null ): Call /** @@ -210,7 +228,7 @@ interface TrustedCertificatesApi { */ @Headers(*["Content-Type:application/json", "Accept:application/vnd.com.nsn.cumulocity.error+json, application/json"]) @PUT("/tenant/tenants/{tenantId}/trusted-certificates/{fingerprint}") - @ReadOnlyProperties("notAfter", "serialNumber", "subject", "fingerprint", "self", "certInPemFormat", "algorithmName", "version", "issuer", "notBefore") + @ReadOnlyProperties("proofOfPossessionValid", "notAfter", "serialNumber", "proofOfPossessionVerificationCodeUsableUntil", "subject", "algorithmName", "version", "issuer", "notBefore", "proofOfPossessionUnsignedVerificationCode", "fingerprint", "self", "certInPemFormat") fun updateTrustedCertificate( @Body body: TrustedCertificate, @Path("tenantId") tenantId: String, @@ -220,7 +238,7 @@ interface TrustedCertificatesApi { /** * Remove a stored certificate * - * Remove a stored trusted certificate (by a given fingerprint) from a specific tenant (by a given ID). + * Remove a stored trusted certificate (by a given fingerprint) from a specific tenant (by a given ID).When a trusted certificate is deleted, the established MQTT connection to all devices that are using the corresponding certificate are closed. * * * ##### Required roles @@ -341,4 +359,66 @@ interface TrustedCertificatesApi { @Path("tenantId") tenantId: String, @Path("fingerprint") fingerprint: String ): Call + + /** + * Verify a certificate chain via file upload + * + * Verify a device certificate chain against a specific tenant. Max chain length support is 10.The tenant ID is `optional` and this api will be further enhanced to resolve the tenant from the chain in future release. + * + * + * ##### Required roles + * + * (ROLE_TENANT_MANAGEMENT_ADMIN) *AND* (is the current tenant *OR* is current management tenant) + * + * ##### Response Codes + * + * The following table gives an overview of the possible response codes and their meanings: + * + * * HTTP 200 The request has succeeded and the validation result is sent in the response. + * * HTTP 400 Unable to parse certificate chain. + * * HTTP 403 Not enough permissions/roles to perform this operation. + * * HTTP 404 The tenant ID does not exist. + * + * @param tenantId + * @param file + * File to be uploaded. + */ + @Headers(*["Content-Type:multipart/form-data", "Accept:application/vnd.com.nsn.cumulocity.error+json, application/json"]) + @POST("/tenant/tenants/verify-cert-chain/fileUpload") + @Multipart + fun validateChainByFileUpload( + @Part("tenantId") tenantId: String, + @Part("file") file: UByteArray + ): Call + + /** + * Verify a certificate chain via HTTP header + * + * Verify a device certificate chain against a specific tenant. Max chain length support is 6.The tenant ID is `optional` and this api will be further enhanced to resolve the tenant from the chain in future release. + * + * + * ##### Required roles + * + * (ROLE_TENANT_MANAGEMENT_ADMIN) *AND* (is the current tenant *OR* is current management tenant) + * + * ##### Response Codes + * + * The following table gives an overview of the possible response codes and their meanings: + * + * * HTTP 200 The request has succeeded and the validation result is sent in the response. + * * HTTP 400 Unable to parse certificate chain. + * * HTTP 403 Not enough permissions/roles to perform this operation. + * * HTTP 404 The tenant ID does not exist. + * + * @param xCumulocityTenantId + * Used to send a tenant ID. + * @param xCumulocityClientCertChain + * Used to send a certificate chain in the header. Separate the chain with `,` and also each 64 bit block with ` ` (a space character). + */ + @Headers("Accept:application/vnd.com.nsn.cumulocity.error+json, application/json") + @POST("/tenant/tenants/verify-cert-chain") + fun validateChainByHeader( + @Header("X-Cumulocity-TenantId") xCumulocityTenantId: String? = null, + @Header("X-Cumulocity-Client-Cert-Chain") xCumulocityClientCertChain: String + ): Call } diff --git a/src/main/java/com/cumulocity/client/api/UsageStatisticsApi.kt b/src/main/java/com/cumulocity/client/api/UsageStatisticsApi.kt index fa82eab..3493c95 100644 --- a/src/main/java/com/cumulocity/client/api/UsageStatisticsApi.kt +++ b/src/main/java/com/cumulocity/client/api/UsageStatisticsApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory @@ -68,6 +68,42 @@ import com.cumulocity.client.model.StatisticsFile * The microservice usage statistics gathers information on the resource usage for tenants for each subscribed application which are collected on a daily base. * * The microservice usage's information is stored in the `resources` object. + * + * ### Frequently asked questions + * + * #### Which requests are counted as general "requestCount"? + * + * All requests which the platform receives are counted, including,for example, UI requests, microservices requests, device requests and agents requests. Only a few internal endpoints are not counted: + * + * * `/health` (and all endpoints including this URI fragment, like `/tenant/health`) + * * `/application/currentApplication` (and all subresources, like `/application/currentApplication/subscriptions`) + * * `/tenant/limit` + * * `/devicecontrol/deviceCredentials` + * * `/inventory/templates` (and all subresources) + * + * #### My devices are not sending any data, but "requestCount" is increasing, and the total number is really big. Why is this happening? + * + * Not only device requests are counted. Every user interaction with UI applications generates some requests to the backend API. Additionally you may have subscribed standard or custom microservices, which also regularly send requests to the platform. + * + * Example: If you have four microservices and each microservice sends five requests per minute, this setup creates `4 * 5 * 60 * 24 = 28800` requests per day. Similar numbers arise if there are multiple users working with the given tenant UI concurrently. + * + * #### Which requests are counted as "deviceRequestCount"? + * + * All requests from "requestCount" except the following: + * + * * Tenant API requests + * * Application API requests + * * User API requests + * * Requests with the proper HTTP header `X-Cumulocity-Application-Key`, matching the application key of one of the applications used by a particular tenant + * + * The exclusion of the APIs in the list above means that requests to endpoints which start with the mentioned API prefixes are not counted. For example, for the Tenant API the following endpoints are not counted (the list is incomplete): + * + * * `/tenant/tenants` + * * `/tenant/currentTenant` + * * `/tenant/statistics` + * * `/tenant/options` + * + * > **ⓘ Info:** Each microservice and web application must include the `X-Cumulocity-Application-Key` header in all requests.Otherwise such requests are counted as device requests which incorrectly affects the "deviceRequestCount" usage metric. */ interface UsageStatisticsApi { @@ -140,8 +176,7 @@ interface UsageStatisticsApi { * * ##### Required roles * - * ROLE_TENANT_STATISTICS_READ *OR* ROLE_INVENTORY_READ - * If the `tenant` request parameter is specified, then the current tenant must be the management tenant *OR* the parent of the requested `tenant`. + * ROLE_TENANT_STATISTICS_READ *OR* ROLE_INVENTORY_READ *OR* ROLE_MANAGED_OBJECT_READ If the `tenant` request parameter is specified, then the current tenant must be the management tenant *OR* the parent of the requested `tenant`. * * ##### Response Codes * @@ -201,6 +236,7 @@ interface UsageStatisticsApi { * * Retrieve usage statistics summary files report metadata. * + * > **ⓘ Info:** This is only accessible by the Management tenant. * * ##### Required roles * @@ -244,6 +280,7 @@ interface UsageStatisticsApi { * * REAL - generated by the system on the first day of the month and including statistics from the previous month. * * TEST - generated by the user with a time range specified in the query parameters (`dateFrom`, `dateTo`). * + * > **ⓘ Info:** This is only accessible by the Management tenant. * * ##### Required roles * @@ -270,6 +307,7 @@ interface UsageStatisticsApi { * * Retrieve a specific usage statistics file (by a given ID). * + * > **ⓘ Info:** This is only accessible by the Management tenant. * * ##### Required roles * @@ -302,6 +340,7 @@ interface UsageStatisticsApi { * * REAL - generated by the system on the first day of the month and includes statistics for the previous month. * * TEST - generated by the user with a time range specified in the query parameters (`dateFrom`, `dateTo`). * + * > **ⓘ Info:** This is only accessible by the Management tenant. * * ##### Required roles * diff --git a/src/main/java/com/cumulocity/client/api/UsersApi.kt b/src/main/java/com/cumulocity/client/api/UsersApi.kt index f2ffe16..57d3442 100644 --- a/src/main/java/com/cumulocity/client/api/UsersApi.kt +++ b/src/main/java/com/cumulocity/client/api/UsersApi.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import retrofit2.converter.scalars.ScalarsConverterFactory @@ -482,4 +482,33 @@ interface UsersApi { @Header("Cookie") cookie: String? = null, @Header("X-XSRF-TOKEN") xXSRFTOKEN: String? = null ): Call + + /** + * Terminate all tenant users' sessions and invalidate tokens + * + * The user with the role ROLE_USER_MANAGEMENT_ADMIN is authorized to log out all tenant users with a toked based access. + * + * The request is responsible for terminating all tenant users' toked based sessions and invalidating internal platform access tokens. + * + * + * ##### Required roles + * + * ROLE_USER_MANAGEMENT_ADMIN *AND* is the current tenant + * + * ##### Response Codes + * + * The following table gives an overview of the possible response codes and their meanings: + * + * * HTTP 200 The request has succeeded and the users (with a token based access) are logged out. + * * HTTP 401 Authentication information is missing or invalid. + * * HTTP 403 Not enough permissions/roles to perform this operation. + * + * @param tenantId + * Unique identifier of a Cumulocity IoT tenant. + */ + @Headers("Accept:application/json") + @POST("/user/logout/{tenantId}/allUsers") + fun logoutAllUsers( + @Path("tenantId") tenantId: String + ): Call } diff --git a/src/main/java/com/cumulocity/client/model/AccessToken.kt b/src/main/java/com/cumulocity/client/model/AccessToken.kt index fa262c6..d11519c 100644 --- a/src/main/java/com/cumulocity/client/model/AccessToken.kt +++ b/src/main/java/com/cumulocity/client/model/AccessToken.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/Alarm.kt b/src/main/java/com/cumulocity/client/model/Alarm.kt index abcb6a6..6a1848a 100644 --- a/src/main/java/com/cumulocity/client/model/Alarm.kt +++ b/src/main/java/com/cumulocity/client/model/Alarm.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/AlarmCollection.kt b/src/main/java/com/cumulocity/client/model/AlarmCollection.kt index b2748bb..c89c9b6 100644 --- a/src/main/java/com/cumulocity/client/model/AlarmCollection.kt +++ b/src/main/java/com/cumulocity/client/model/AlarmCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/AlarmsApiResource.kt b/src/main/java/com/cumulocity/client/model/AlarmsApiResource.kt index 10489a5..8fb3616 100644 --- a/src/main/java/com/cumulocity/client/model/AlarmsApiResource.kt +++ b/src/main/java/com/cumulocity/client/model/AlarmsApiResource.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/Application.kt b/src/main/java/com/cumulocity/client/model/Application.kt index 4aa43f0..83c9b5e 100644 --- a/src/main/java/com/cumulocity/client/model/Application.kt +++ b/src/main/java/com/cumulocity/client/model/Application.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/ApplicationApiResource.kt b/src/main/java/com/cumulocity/client/model/ApplicationApiResource.kt index 4edd3db..55f979f 100644 --- a/src/main/java/com/cumulocity/client/model/ApplicationApiResource.kt +++ b/src/main/java/com/cumulocity/client/model/ApplicationApiResource.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/ApplicationBinaries.kt b/src/main/java/com/cumulocity/client/model/ApplicationBinaries.kt index c9f9936..dcb6205 100644 --- a/src/main/java/com/cumulocity/client/model/ApplicationBinaries.kt +++ b/src/main/java/com/cumulocity/client/model/ApplicationBinaries.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/ApplicationCollection.kt b/src/main/java/com/cumulocity/client/model/ApplicationCollection.kt index be81ec4..5abcb51 100644 --- a/src/main/java/com/cumulocity/client/model/ApplicationCollection.kt +++ b/src/main/java/com/cumulocity/client/model/ApplicationCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/ApplicationManifestProbe.kt b/src/main/java/com/cumulocity/client/model/ApplicationManifestProbe.kt index a2b5142..ffc8bcd 100644 --- a/src/main/java/com/cumulocity/client/model/ApplicationManifestProbe.kt +++ b/src/main/java/com/cumulocity/client/model/ApplicationManifestProbe.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/ApplicationOwner.kt b/src/main/java/com/cumulocity/client/model/ApplicationOwner.kt index c800b7f..9926978 100644 --- a/src/main/java/com/cumulocity/client/model/ApplicationOwner.kt +++ b/src/main/java/com/cumulocity/client/model/ApplicationOwner.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/ApplicationReference.kt b/src/main/java/com/cumulocity/client/model/ApplicationReference.kt index e53eace..629f701 100644 --- a/src/main/java/com/cumulocity/client/model/ApplicationReference.kt +++ b/src/main/java/com/cumulocity/client/model/ApplicationReference.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/ApplicationReferenceCollection.kt b/src/main/java/com/cumulocity/client/model/ApplicationReferenceCollection.kt index cfe7a04..156f51c 100644 --- a/src/main/java/com/cumulocity/client/model/ApplicationReferenceCollection.kt +++ b/src/main/java/com/cumulocity/client/model/ApplicationReferenceCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/ApplicationSettings.kt b/src/main/java/com/cumulocity/client/model/ApplicationSettings.kt index 84f7c11..f724eff 100644 --- a/src/main/java/com/cumulocity/client/model/ApplicationSettings.kt +++ b/src/main/java/com/cumulocity/client/model/ApplicationSettings.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/ApplicationUserCollection.kt b/src/main/java/com/cumulocity/client/model/ApplicationUserCollection.kt index 173fc7a..17e9b0d 100644 --- a/src/main/java/com/cumulocity/client/model/ApplicationUserCollection.kt +++ b/src/main/java/com/cumulocity/client/model/ApplicationUserCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/ApplicationVersion.kt b/src/main/java/com/cumulocity/client/model/ApplicationVersion.kt index 6956ede..1447916 100644 --- a/src/main/java/com/cumulocity/client/model/ApplicationVersion.kt +++ b/src/main/java/com/cumulocity/client/model/ApplicationVersion.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/ApplicationVersionCollection.kt b/src/main/java/com/cumulocity/client/model/ApplicationVersionCollection.kt index 115d912..fdc314a 100644 --- a/src/main/java/com/cumulocity/client/model/ApplicationVersionCollection.kt +++ b/src/main/java/com/cumulocity/client/model/ApplicationVersionCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/ApplicationVersionTag.kt b/src/main/java/com/cumulocity/client/model/ApplicationVersionTag.kt index 16df80a..1c87939 100644 --- a/src/main/java/com/cumulocity/client/model/ApplicationVersionTag.kt +++ b/src/main/java/com/cumulocity/client/model/ApplicationVersionTag.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/AuditApiResource.kt b/src/main/java/com/cumulocity/client/model/AuditApiResource.kt index 651cdd5..ebf9e43 100644 --- a/src/main/java/com/cumulocity/client/model/AuditApiResource.kt +++ b/src/main/java/com/cumulocity/client/model/AuditApiResource.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/AuditRecord.kt b/src/main/java/com/cumulocity/client/model/AuditRecord.kt index 6fe069e..3bfec95 100644 --- a/src/main/java/com/cumulocity/client/model/AuditRecord.kt +++ b/src/main/java/com/cumulocity/client/model/AuditRecord.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/AuditRecordCollection.kt b/src/main/java/com/cumulocity/client/model/AuditRecordCollection.kt index b65b513..9771aaa 100644 --- a/src/main/java/com/cumulocity/client/model/AuditRecordCollection.kt +++ b/src/main/java/com/cumulocity/client/model/AuditRecordCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/AuthConfig.kt b/src/main/java/com/cumulocity/client/model/AuthConfig.kt index 6a1db98..d2e802d 100644 --- a/src/main/java/com/cumulocity/client/model/AuthConfig.kt +++ b/src/main/java/com/cumulocity/client/model/AuthConfig.kt @@ -1,5 +1,5 @@ // 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. +// 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 @@ -109,6 +109,11 @@ data class AuthConfig(var providerName: String?, var type: Type?) { */ var visibleOnLoginPage: Boolean? = null + /** + * A configuration for authentication with an access token from the authorization server. + */ + var externalTokenConfig: ExternalTokenConfig? = null + /** * The authentication configuration grant type identifier. */ @@ -197,6 +202,11 @@ data class AuthConfig(var providerName: String?, var type: Type?) { */ var mappings: Array? = null + /** + * Represents rules used to assign inventory roles. + */ + var inventoryMappings: Array? = null + /** * Configuration of the mapping. */ @@ -207,6 +217,11 @@ data class AuthConfig(var providerName: String?, var type: Type?) { */ var mapRolesOnlyForNewUser: Boolean? = null + /** + * If set to `true`, dynamic access mapping is only managed for global roles, applications and inventory roles which are listed in the configuration. Others remain unchanged. + */ + var manageRolesOnlyFromAccessMapping: Boolean? = null + override fun toString(): String { return Gson().toJson(this).toString() } @@ -218,7 +233,7 @@ data class AuthConfig(var providerName: String?, var type: Type?) { class Mappings { /** - * Represents a predicate for verification. It acts as a condition which is necessary to assign a user to the given groups and permit access to the specified applications. + * Represents a predicate for verification. It acts as a condition which is necessary to assign a user to the given groups, permit access to the specified applications or to assign specific inventory roles to device groups. */ @SerializedName(value = "when") var pWhen: JSONPredicateRepresentation? = null @@ -238,6 +253,47 @@ data class AuthConfig(var providerName: String?, var type: Type?) { } } + /** + * Represents information of mapping access to inventory roles. + */ + class InventoryMappings { + + /** + * Represents a predicate for verification. It acts as a condition which is necessary to assign a user to the given groups, permit access to the specified applications or to assign specific inventory roles to device groups. + */ + @SerializedName(value = "when") + var pWhen: JSONPredicateRepresentation? = null + + /** + * List of the OAuth inventory assignments. + */ + var thenInventoryRoles: Array? = null + + /** + * Represents inventory roles for a specific device group. + */ + class ThenInventoryRoles { + + /** + * A unique identifier for the managed object for which the roles are assigned. + */ + var managedObject: String? = null + + /** + * List of the inventory roles' identifiers. + */ + var roleIds: Array? = null + + override fun toString(): String { + return Gson().toJson(this).toString() + } + } + + override fun toString(): String { + return Gson().toJson(this).toString() + } + } + override fun toString(): String { return Gson().toJson(this).toString() } @@ -416,6 +472,79 @@ data class AuthConfig(var providerName: String?, var type: Type?) { } + /** + * A configuration for authentication with an access token from the authorization server. + */ + class ExternalTokenConfig { + + /** + * Indicates whether authentication is enabled or disabled. + */ + var enabled: Boolean? = null + + /** + * Points to the claim of the access token from the authorization server that must be used as the username in the Cumulocity IoT platform. + */ + var userOrAppIdConfig: UserOrAppIdConfig? = null + + /** + * If set to `true`, the access token is validated against the authorization server by way of introspection or user info request. + */ + var validationRequired: Boolean? = null + + /** + * The method of validation of the access token. + */ + var validationMethod: ValidationMethod? = null + + var tokenValidationRequest: RequestRepresentation? = null + + /** + * The frequency (in Minutes) in which Cumulocity sends a validation request to authorization server. The recommended frequency is 1 minute. + */ + var accessTokenValidityCheckIntervalInMinutes: Int? = null + + /** + * The method of validation of the access token. + */ + enum class ValidationMethod(val value: String) { + @SerializedName(value = "INTROSPECTION") + INTROSPECTION("INTROSPECTION"), + @SerializedName(value = "USERINFO") + USERINFO("USERINFO") + } + + /** + * Points to the claim of the access token from the authorization server that must be used as the username in the Cumulocity IoT platform. + */ + class UserOrAppIdConfig { + + /** + * Used only if `useConstantValue` is set to `true`. + */ + var constantValue: String? = null + + /** + * The name of the field containing the JWT. + */ + var jwtField: String? = null + + /** + * Not recommended. If set to `true`, all users share a single account in the Cumulocity IoT platform. + */ + var useConstantValue: Boolean? = null + + override fun toString(): String { + return Gson().toJson(this).toString() + } + } + + + override fun toString(): String { + return Gson().toJson(this).toString() + } + } + override fun toString(): String { return Gson().toJson(this).toString() } diff --git a/src/main/java/com/cumulocity/client/model/AuthConfigAccess.kt b/src/main/java/com/cumulocity/client/model/AuthConfigAccess.kt index 6d0adf8..422240f 100644 --- a/src/main/java/com/cumulocity/client/model/AuthConfigAccess.kt +++ b/src/main/java/com/cumulocity/client/model/AuthConfigAccess.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/BasicAuthenticationRestrictions.kt b/src/main/java/com/cumulocity/client/model/BasicAuthenticationRestrictions.kt index 7537c15..1b490dc 100644 --- a/src/main/java/com/cumulocity/client/model/BasicAuthenticationRestrictions.kt +++ b/src/main/java/com/cumulocity/client/model/BasicAuthenticationRestrictions.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/Binary.kt b/src/main/java/com/cumulocity/client/model/Binary.kt index a63b1a0..c3906c7 100644 --- a/src/main/java/com/cumulocity/client/model/Binary.kt +++ b/src/main/java/com/cumulocity/client/model/Binary.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/BinaryCollection.kt b/src/main/java/com/cumulocity/client/model/BinaryCollection.kt index cceb2cc..9598608 100644 --- a/src/main/java/com/cumulocity/client/model/BinaryCollection.kt +++ b/src/main/java/com/cumulocity/client/model/BinaryCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/BinaryInfo.kt b/src/main/java/com/cumulocity/client/model/BinaryInfo.kt index eca4cf5..dca3fb5 100644 --- a/src/main/java/com/cumulocity/client/model/BinaryInfo.kt +++ b/src/main/java/com/cumulocity/client/model/BinaryInfo.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/BootstrapUser.kt b/src/main/java/com/cumulocity/client/model/BootstrapUser.kt index 402d4dd..805d97a 100644 --- a/src/main/java/com/cumulocity/client/model/BootstrapUser.kt +++ b/src/main/java/com/cumulocity/client/model/BootstrapUser.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/BulkNewDeviceRequest.kt b/src/main/java/com/cumulocity/client/model/BulkNewDeviceRequest.kt index 670e824..0d335d1 100644 --- a/src/main/java/com/cumulocity/client/model/BulkNewDeviceRequest.kt +++ b/src/main/java/com/cumulocity/client/model/BulkNewDeviceRequest.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/BulkOperation.kt b/src/main/java/com/cumulocity/client/model/BulkOperation.kt index 539f39c..b98e864 100644 --- a/src/main/java/com/cumulocity/client/model/BulkOperation.kt +++ b/src/main/java/com/cumulocity/client/model/BulkOperation.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/BulkOperationCollection.kt b/src/main/java/com/cumulocity/client/model/BulkOperationCollection.kt index cd31936..11ad038 100644 --- a/src/main/java/com/cumulocity/client/model/BulkOperationCollection.kt +++ b/src/main/java/com/cumulocity/client/model/BulkOperationCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yAccelerationMeasurement.kt b/src/main/java/com/cumulocity/client/model/C8yAccelerationMeasurement.kt index c68ae85..2ea5e99 100644 --- a/src/main/java/com/cumulocity/client/model/C8yAccelerationMeasurement.kt +++ b/src/main/java/com/cumulocity/client/model/C8yAccelerationMeasurement.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yAccelerationSensor.kt b/src/main/java/com/cumulocity/client/model/C8yAccelerationSensor.kt index f7dc5eb..70e20ca 100644 --- a/src/main/java/com/cumulocity/client/model/C8yAccelerationSensor.kt +++ b/src/main/java/com/cumulocity/client/model/C8yAccelerationSensor.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yActiveAlarmsStatus.kt b/src/main/java/com/cumulocity/client/model/C8yActiveAlarmsStatus.kt index 8849371..d14dae8 100644 --- a/src/main/java/com/cumulocity/client/model/C8yActiveAlarmsStatus.kt +++ b/src/main/java/com/cumulocity/client/model/C8yActiveAlarmsStatus.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yAgent.kt b/src/main/java/com/cumulocity/client/model/C8yAgent.kt index b974764..d86b212 100644 --- a/src/main/java/com/cumulocity/client/model/C8yAgent.kt +++ b/src/main/java/com/cumulocity/client/model/C8yAgent.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yAvailability.kt b/src/main/java/com/cumulocity/client/model/C8yAvailability.kt index 432ccd5..9b4802d 100644 --- a/src/main/java/com/cumulocity/client/model/C8yAvailability.kt +++ b/src/main/java/com/cumulocity/client/model/C8yAvailability.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yAvailabilityStatus.kt b/src/main/java/com/cumulocity/client/model/C8yAvailabilityStatus.kt index 1a08912..587257c 100644 --- a/src/main/java/com/cumulocity/client/model/C8yAvailabilityStatus.kt +++ b/src/main/java/com/cumulocity/client/model/C8yAvailabilityStatus.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yCellInfo.kt b/src/main/java/com/cumulocity/client/model/C8yCellInfo.kt index 0ebf770..075fc33 100644 --- a/src/main/java/com/cumulocity/client/model/C8yCellInfo.kt +++ b/src/main/java/com/cumulocity/client/model/C8yCellInfo.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yCellTower.kt b/src/main/java/com/cumulocity/client/model/C8yCellTower.kt index feaae66..cf88562 100644 --- a/src/main/java/com/cumulocity/client/model/C8yCellTower.kt +++ b/src/main/java/com/cumulocity/client/model/C8yCellTower.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yCommand.kt b/src/main/java/com/cumulocity/client/model/C8yCommand.kt index 9124a14..c44426e 100644 --- a/src/main/java/com/cumulocity/client/model/C8yCommand.kt +++ b/src/main/java/com/cumulocity/client/model/C8yCommand.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yCommunicationMode.kt b/src/main/java/com/cumulocity/client/model/C8yCommunicationMode.kt index 6d74cec..995ac9a 100644 --- a/src/main/java/com/cumulocity/client/model/C8yCommunicationMode.kt +++ b/src/main/java/com/cumulocity/client/model/C8yCommunicationMode.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yConfiguration.kt b/src/main/java/com/cumulocity/client/model/C8yConfiguration.kt index 79bc63d..f5c49f9 100644 --- a/src/main/java/com/cumulocity/client/model/C8yConfiguration.kt +++ b/src/main/java/com/cumulocity/client/model/C8yConfiguration.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yConnection.kt b/src/main/java/com/cumulocity/client/model/C8yConnection.kt index 090bae3..86cde5b 100644 --- a/src/main/java/com/cumulocity/client/model/C8yConnection.kt +++ b/src/main/java/com/cumulocity/client/model/C8yConnection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yCurrentMeasurement.kt b/src/main/java/com/cumulocity/client/model/C8yCurrentMeasurement.kt index 22d7f98..cea8267 100644 --- a/src/main/java/com/cumulocity/client/model/C8yCurrentMeasurement.kt +++ b/src/main/java/com/cumulocity/client/model/C8yCurrentMeasurement.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yCurrentSensor.kt b/src/main/java/com/cumulocity/client/model/C8yCurrentSensor.kt index 7a2e2fb..2690642 100644 --- a/src/main/java/com/cumulocity/client/model/C8yCurrentSensor.kt +++ b/src/main/java/com/cumulocity/client/model/C8yCurrentSensor.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yDistanceMeasurement.kt b/src/main/java/com/cumulocity/client/model/C8yDistanceMeasurement.kt index acf6780..fe5c600 100644 --- a/src/main/java/com/cumulocity/client/model/C8yDistanceMeasurement.kt +++ b/src/main/java/com/cumulocity/client/model/C8yDistanceMeasurement.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yDistanceSensor.kt b/src/main/java/com/cumulocity/client/model/C8yDistanceSensor.kt index c8e9060..7b46a1e 100644 --- a/src/main/java/com/cumulocity/client/model/C8yDistanceSensor.kt +++ b/src/main/java/com/cumulocity/client/model/C8yDistanceSensor.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yFirmware.kt b/src/main/java/com/cumulocity/client/model/C8yFirmware.kt index c3641fc..883e652 100644 --- a/src/main/java/com/cumulocity/client/model/C8yFirmware.kt +++ b/src/main/java/com/cumulocity/client/model/C8yFirmware.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yHardware.kt b/src/main/java/com/cumulocity/client/model/C8yHardware.kt index 6dd6861..f99ab46 100644 --- a/src/main/java/com/cumulocity/client/model/C8yHardware.kt +++ b/src/main/java/com/cumulocity/client/model/C8yHardware.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yHumidityMeasurement.kt b/src/main/java/com/cumulocity/client/model/C8yHumidityMeasurement.kt index 3651385..a199b3f 100644 --- a/src/main/java/com/cumulocity/client/model/C8yHumidityMeasurement.kt +++ b/src/main/java/com/cumulocity/client/model/C8yHumidityMeasurement.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yHumiditySensor.kt b/src/main/java/com/cumulocity/client/model/C8yHumiditySensor.kt index 74bfae2..10e58ee 100644 --- a/src/main/java/com/cumulocity/client/model/C8yHumiditySensor.kt +++ b/src/main/java/com/cumulocity/client/model/C8yHumiditySensor.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yLightMeasurement.kt b/src/main/java/com/cumulocity/client/model/C8yLightMeasurement.kt index a36f38d..23700ad 100644 --- a/src/main/java/com/cumulocity/client/model/C8yLightMeasurement.kt +++ b/src/main/java/com/cumulocity/client/model/C8yLightMeasurement.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yLightSensor.kt b/src/main/java/com/cumulocity/client/model/C8yLightSensor.kt index 4f9c655..9a47413 100644 --- a/src/main/java/com/cumulocity/client/model/C8yLightSensor.kt +++ b/src/main/java/com/cumulocity/client/model/C8yLightSensor.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yLogfileRequest.kt b/src/main/java/com/cumulocity/client/model/C8yLogfileRequest.kt index 0b38c3c..1273664 100644 --- a/src/main/java/com/cumulocity/client/model/C8yLogfileRequest.kt +++ b/src/main/java/com/cumulocity/client/model/C8yLogfileRequest.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yMeasurementValue.kt b/src/main/java/com/cumulocity/client/model/C8yMeasurementValue.kt index 7552d77..c5e7343 100644 --- a/src/main/java/com/cumulocity/client/model/C8yMeasurementValue.kt +++ b/src/main/java/com/cumulocity/client/model/C8yMeasurementValue.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yMobile.kt b/src/main/java/com/cumulocity/client/model/C8yMobile.kt index 9a66ccf..dd7eb1d 100644 --- a/src/main/java/com/cumulocity/client/model/C8yMobile.kt +++ b/src/main/java/com/cumulocity/client/model/C8yMobile.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yMoistureMeasurement.kt b/src/main/java/com/cumulocity/client/model/C8yMoistureMeasurement.kt index 08c41a2..62051e0 100644 --- a/src/main/java/com/cumulocity/client/model/C8yMoistureMeasurement.kt +++ b/src/main/java/com/cumulocity/client/model/C8yMoistureMeasurement.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yMoistureSensor.kt b/src/main/java/com/cumulocity/client/model/C8yMoistureSensor.kt index 05c3752..c31ce22 100644 --- a/src/main/java/com/cumulocity/client/model/C8yMoistureSensor.kt +++ b/src/main/java/com/cumulocity/client/model/C8yMoistureSensor.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yMotionMeasurement.kt b/src/main/java/com/cumulocity/client/model/C8yMotionMeasurement.kt index 1e708b4..8571a57 100644 --- a/src/main/java/com/cumulocity/client/model/C8yMotionMeasurement.kt +++ b/src/main/java/com/cumulocity/client/model/C8yMotionMeasurement.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yMotionSensor.kt b/src/main/java/com/cumulocity/client/model/C8yMotionSensor.kt index ef346d6..5d8eb76 100644 --- a/src/main/java/com/cumulocity/client/model/C8yMotionSensor.kt +++ b/src/main/java/com/cumulocity/client/model/C8yMotionSensor.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yNetwork.kt b/src/main/java/com/cumulocity/client/model/C8yNetwork.kt index 2901c65..67b43a3 100644 --- a/src/main/java/com/cumulocity/client/model/C8yNetwork.kt +++ b/src/main/java/com/cumulocity/client/model/C8yNetwork.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yPosition.kt b/src/main/java/com/cumulocity/client/model/C8yPosition.kt index 0091b4e..5157b98 100644 --- a/src/main/java/com/cumulocity/client/model/C8yPosition.kt +++ b/src/main/java/com/cumulocity/client/model/C8yPosition.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yProfile.kt b/src/main/java/com/cumulocity/client/model/C8yProfile.kt index eae440c..c642d2c 100644 --- a/src/main/java/com/cumulocity/client/model/C8yProfile.kt +++ b/src/main/java/com/cumulocity/client/model/C8yProfile.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yRequiredAvailability.kt b/src/main/java/com/cumulocity/client/model/C8yRequiredAvailability.kt index b045012..3a385f8 100644 --- a/src/main/java/com/cumulocity/client/model/C8yRequiredAvailability.kt +++ b/src/main/java/com/cumulocity/client/model/C8yRequiredAvailability.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8ySinglePhaseElectricitySensor.kt b/src/main/java/com/cumulocity/client/model/C8ySinglePhaseElectricitySensor.kt index 61328d1..b3adf21 100644 --- a/src/main/java/com/cumulocity/client/model/C8ySinglePhaseElectricitySensor.kt +++ b/src/main/java/com/cumulocity/client/model/C8ySinglePhaseElectricitySensor.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8ySinglePhaseEnergyMeasurement.kt b/src/main/java/com/cumulocity/client/model/C8ySinglePhaseEnergyMeasurement.kt index 1d7cb06..e07fd72 100644 --- a/src/main/java/com/cumulocity/client/model/C8ySinglePhaseEnergyMeasurement.kt +++ b/src/main/java/com/cumulocity/client/model/C8ySinglePhaseEnergyMeasurement.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8ySoftwareList.kt b/src/main/java/com/cumulocity/client/model/C8ySoftwareList.kt index 0d813b7..38940ae 100644 --- a/src/main/java/com/cumulocity/client/model/C8ySoftwareList.kt +++ b/src/main/java/com/cumulocity/client/model/C8ySoftwareList.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8ySteam.kt b/src/main/java/com/cumulocity/client/model/C8ySteam.kt index ac51a28..1f6c0be 100644 --- a/src/main/java/com/cumulocity/client/model/C8ySteam.kt +++ b/src/main/java/com/cumulocity/client/model/C8ySteam.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yTemperatureMeasurement.kt b/src/main/java/com/cumulocity/client/model/C8yTemperatureMeasurement.kt index 3194ef3..91f47c1 100644 --- a/src/main/java/com/cumulocity/client/model/C8yTemperatureMeasurement.kt +++ b/src/main/java/com/cumulocity/client/model/C8yTemperatureMeasurement.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yTemperatureSensor.kt b/src/main/java/com/cumulocity/client/model/C8yTemperatureSensor.kt index 8175b46..e5c9a73 100644 --- a/src/main/java/com/cumulocity/client/model/C8yTemperatureSensor.kt +++ b/src/main/java/com/cumulocity/client/model/C8yTemperatureSensor.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yThreePhaseElectricitySensor.kt b/src/main/java/com/cumulocity/client/model/C8yThreePhaseElectricitySensor.kt index 7fcb05b..16e2aa5 100644 --- a/src/main/java/com/cumulocity/client/model/C8yThreePhaseElectricitySensor.kt +++ b/src/main/java/com/cumulocity/client/model/C8yThreePhaseElectricitySensor.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yThreePhaseEnergyMeasurement.kt b/src/main/java/com/cumulocity/client/model/C8yThreePhaseEnergyMeasurement.kt index d78f916..5579f69 100644 --- a/src/main/java/com/cumulocity/client/model/C8yThreePhaseEnergyMeasurement.kt +++ b/src/main/java/com/cumulocity/client/model/C8yThreePhaseEnergyMeasurement.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/C8yVoltageMeasurement.kt b/src/main/java/com/cumulocity/client/model/C8yVoltageMeasurement.kt index 52c66fb..33ea0cc 100644 --- a/src/main/java/com/cumulocity/client/model/C8yVoltageMeasurement.kt +++ b/src/main/java/com/cumulocity/client/model/C8yVoltageMeasurement.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/CategoryKeyOption.kt b/src/main/java/com/cumulocity/client/model/CategoryKeyOption.kt index 6c1f238..ac2567a 100644 --- a/src/main/java/com/cumulocity/client/model/CategoryKeyOption.kt +++ b/src/main/java/com/cumulocity/client/model/CategoryKeyOption.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/CategoryOptions.kt b/src/main/java/com/cumulocity/client/model/CategoryOptions.kt index e36f4db..c127b39 100644 --- a/src/main/java/com/cumulocity/client/model/CategoryOptions.kt +++ b/src/main/java/com/cumulocity/client/model/CategoryOptions.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/ChildOperationsAddMultiple.kt b/src/main/java/com/cumulocity/client/model/ChildOperationsAddMultiple.kt index 9dddc3a..f1a0078 100644 --- a/src/main/java/com/cumulocity/client/model/ChildOperationsAddMultiple.kt +++ b/src/main/java/com/cumulocity/client/model/ChildOperationsAddMultiple.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/ChildOperationsAddOne.kt b/src/main/java/com/cumulocity/client/model/ChildOperationsAddOne.kt index 21ed833..aa2d1b3 100644 --- a/src/main/java/com/cumulocity/client/model/ChildOperationsAddOne.kt +++ b/src/main/java/com/cumulocity/client/model/ChildOperationsAddOne.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/ComCumulocityModelAgent.kt b/src/main/java/com/cumulocity/client/model/ComCumulocityModelAgent.kt index c68a241..19fae50 100644 --- a/src/main/java/com/cumulocity/client/model/ComCumulocityModelAgent.kt +++ b/src/main/java/com/cumulocity/client/model/ComCumulocityModelAgent.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/CurrentTenant.kt b/src/main/java/com/cumulocity/client/model/CurrentTenant.kt index f956d1d..65b8b9b 100644 --- a/src/main/java/com/cumulocity/client/model/CurrentTenant.kt +++ b/src/main/java/com/cumulocity/client/model/CurrentTenant.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/CurrentUser.kt b/src/main/java/com/cumulocity/client/model/CurrentUser.kt index 619f87a..0418f49 100644 --- a/src/main/java/com/cumulocity/client/model/CurrentUser.kt +++ b/src/main/java/com/cumulocity/client/model/CurrentUser.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/CurrentUserTotpCode.kt b/src/main/java/com/cumulocity/client/model/CurrentUserTotpCode.kt index 4b21e8e..79e9e21 100644 --- a/src/main/java/com/cumulocity/client/model/CurrentUserTotpCode.kt +++ b/src/main/java/com/cumulocity/client/model/CurrentUserTotpCode.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/CurrentUserTotpSecret.kt b/src/main/java/com/cumulocity/client/model/CurrentUserTotpSecret.kt index b02ff73..c4802c8 100644 --- a/src/main/java/com/cumulocity/client/model/CurrentUserTotpSecret.kt +++ b/src/main/java/com/cumulocity/client/model/CurrentUserTotpSecret.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/CurrentUserTotpSecretActivity.kt b/src/main/java/com/cumulocity/client/model/CurrentUserTotpSecretActivity.kt index 19d47e0..fc62772 100644 --- a/src/main/java/com/cumulocity/client/model/CurrentUserTotpSecretActivity.kt +++ b/src/main/java/com/cumulocity/client/model/CurrentUserTotpSecretActivity.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/CustomProperties.kt b/src/main/java/com/cumulocity/client/model/CustomProperties.kt index 5d28028..e32fdd6 100644 --- a/src/main/java/com/cumulocity/client/model/CustomProperties.kt +++ b/src/main/java/com/cumulocity/client/model/CustomProperties.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/DailyUsageStatistics.kt b/src/main/java/com/cumulocity/client/model/DailyUsageStatistics.kt index 1e9ccfe..dacbf7e 100644 --- a/src/main/java/com/cumulocity/client/model/DailyUsageStatistics.kt +++ b/src/main/java/com/cumulocity/client/model/DailyUsageStatistics.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/DeviceControlApiResource.kt b/src/main/java/com/cumulocity/client/model/DeviceControlApiResource.kt index 1856832..28bd7b7 100644 --- a/src/main/java/com/cumulocity/client/model/DeviceControlApiResource.kt +++ b/src/main/java/com/cumulocity/client/model/DeviceControlApiResource.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/DeviceCredentials.kt b/src/main/java/com/cumulocity/client/model/DeviceCredentials.kt index b1dab6b..1fb7f0f 100644 --- a/src/main/java/com/cumulocity/client/model/DeviceCredentials.kt +++ b/src/main/java/com/cumulocity/client/model/DeviceCredentials.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/DevicePermissionOwners.kt b/src/main/java/com/cumulocity/client/model/DevicePermissionOwners.kt new file mode 100644 index 0000000..624ce68 --- /dev/null +++ b/src/main/java/com/cumulocity/client/model/DevicePermissionOwners.kt @@ -0,0 +1,19 @@ +// 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 + +/** + * A list of device permissions. + */ +class DevicePermissionOwners { + + var users: Array? = null + + var groups: Array? = null + + override fun toString(): String { + return Gson().toJson(this).toString() + } +} diff --git a/src/main/java/com/cumulocity/client/model/DevicePermissions.kt b/src/main/java/com/cumulocity/client/model/DevicePermissions.kt index 1b6d761..93c7c5d 100644 --- a/src/main/java/com/cumulocity/client/model/DevicePermissions.kt +++ b/src/main/java/com/cumulocity/client/model/DevicePermissions.kt @@ -1,5 +1,5 @@ // 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. +// 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 @@ -9,6 +9,11 @@ import com.google.gson.Gson */ class DevicePermissions { + var additionalProperties: MutableMap> = hashMapOf() + + operator fun get(key: String): Array? = additionalProperties[key] + operator fun set(key: String, value: Array): Array? = additionalProperties.put(key, value) + override fun toString(): String { return Gson().toJson(this).toString() } diff --git a/src/main/java/com/cumulocity/client/model/DeviceStatistics.kt b/src/main/java/com/cumulocity/client/model/DeviceStatistics.kt index c88e900..f6e254c 100644 --- a/src/main/java/com/cumulocity/client/model/DeviceStatistics.kt +++ b/src/main/java/com/cumulocity/client/model/DeviceStatistics.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/DeviceStatisticsCollection.kt b/src/main/java/com/cumulocity/client/model/DeviceStatisticsCollection.kt index 7f57d63..fe74889 100644 --- a/src/main/java/com/cumulocity/client/model/DeviceStatisticsCollection.kt +++ b/src/main/java/com/cumulocity/client/model/DeviceStatisticsCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/Error.kt b/src/main/java/com/cumulocity/client/model/Error.kt index de3702a..84c6005 100644 --- a/src/main/java/com/cumulocity/client/model/Error.kt +++ b/src/main/java/com/cumulocity/client/model/Error.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/Event.kt b/src/main/java/com/cumulocity/client/model/Event.kt index 3c9f345..d4a26d6 100644 --- a/src/main/java/com/cumulocity/client/model/Event.kt +++ b/src/main/java/com/cumulocity/client/model/Event.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/EventBinary.kt b/src/main/java/com/cumulocity/client/model/EventBinary.kt index 0aa005f..2466904 100644 --- a/src/main/java/com/cumulocity/client/model/EventBinary.kt +++ b/src/main/java/com/cumulocity/client/model/EventBinary.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/EventCollection.kt b/src/main/java/com/cumulocity/client/model/EventCollection.kt index 637178e..95cba61 100644 --- a/src/main/java/com/cumulocity/client/model/EventCollection.kt +++ b/src/main/java/com/cumulocity/client/model/EventCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/EventsApiResource.kt b/src/main/java/com/cumulocity/client/model/EventsApiResource.kt index 2bf972e..a1b0b4b 100644 --- a/src/main/java/com/cumulocity/client/model/EventsApiResource.kt +++ b/src/main/java/com/cumulocity/client/model/EventsApiResource.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/ExternalId.kt b/src/main/java/com/cumulocity/client/model/ExternalId.kt index 1598eb6..98cf746 100644 --- a/src/main/java/com/cumulocity/client/model/ExternalId.kt +++ b/src/main/java/com/cumulocity/client/model/ExternalId.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/ExternalIds.kt b/src/main/java/com/cumulocity/client/model/ExternalIds.kt index c708e1f..49bcd4f 100644 --- a/src/main/java/com/cumulocity/client/model/ExternalIds.kt +++ b/src/main/java/com/cumulocity/client/model/ExternalIds.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/Group.kt b/src/main/java/com/cumulocity/client/model/Group.kt index d803d77..4d00371 100644 --- a/src/main/java/com/cumulocity/client/model/Group.kt +++ b/src/main/java/com/cumulocity/client/model/Group.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/GroupReference.kt b/src/main/java/com/cumulocity/client/model/GroupReference.kt index 52b0268..c2f5b17 100644 --- a/src/main/java/com/cumulocity/client/model/GroupReference.kt +++ b/src/main/java/com/cumulocity/client/model/GroupReference.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/GroupReferenceCollection.kt b/src/main/java/com/cumulocity/client/model/GroupReferenceCollection.kt index cf7794f..5bf4371 100644 --- a/src/main/java/com/cumulocity/client/model/GroupReferenceCollection.kt +++ b/src/main/java/com/cumulocity/client/model/GroupReferenceCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/IdentityApiResource.kt b/src/main/java/com/cumulocity/client/model/IdentityApiResource.kt index 4083a2a..fcec058 100644 --- a/src/main/java/com/cumulocity/client/model/IdentityApiResource.kt +++ b/src/main/java/com/cumulocity/client/model/IdentityApiResource.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/InventoryApiResource.kt b/src/main/java/com/cumulocity/client/model/InventoryApiResource.kt index 0b124e7..361fb74 100644 --- a/src/main/java/com/cumulocity/client/model/InventoryApiResource.kt +++ b/src/main/java/com/cumulocity/client/model/InventoryApiResource.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/InventoryAssignment.kt b/src/main/java/com/cumulocity/client/model/InventoryAssignment.kt index 754241b..cf95e66 100644 --- a/src/main/java/com/cumulocity/client/model/InventoryAssignment.kt +++ b/src/main/java/com/cumulocity/client/model/InventoryAssignment.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/InventoryAssignmentCollection.kt b/src/main/java/com/cumulocity/client/model/InventoryAssignmentCollection.kt index 2057504..296d3eb 100644 --- a/src/main/java/com/cumulocity/client/model/InventoryAssignmentCollection.kt +++ b/src/main/java/com/cumulocity/client/model/InventoryAssignmentCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/InventoryAssignmentReference.kt b/src/main/java/com/cumulocity/client/model/InventoryAssignmentReference.kt index 01ab940..c721ad4 100644 --- a/src/main/java/com/cumulocity/client/model/InventoryAssignmentReference.kt +++ b/src/main/java/com/cumulocity/client/model/InventoryAssignmentReference.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/InventoryRole.kt b/src/main/java/com/cumulocity/client/model/InventoryRole.kt index 65fb0f1..9f93383 100644 --- a/src/main/java/com/cumulocity/client/model/InventoryRole.kt +++ b/src/main/java/com/cumulocity/client/model/InventoryRole.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/InventoryRoleCollection.kt b/src/main/java/com/cumulocity/client/model/InventoryRoleCollection.kt index 9e969e4..b795b12 100644 --- a/src/main/java/com/cumulocity/client/model/InventoryRoleCollection.kt +++ b/src/main/java/com/cumulocity/client/model/InventoryRoleCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/InventoryRolePermission.kt b/src/main/java/com/cumulocity/client/model/InventoryRolePermission.kt index b157790..1be4205 100644 --- a/src/main/java/com/cumulocity/client/model/InventoryRolePermission.kt +++ b/src/main/java/com/cumulocity/client/model/InventoryRolePermission.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/JSONPredicateRepresentation.kt b/src/main/java/com/cumulocity/client/model/JSONPredicateRepresentation.kt index c4f4eb7..978f078 100644 --- a/src/main/java/com/cumulocity/client/model/JSONPredicateRepresentation.kt +++ b/src/main/java/com/cumulocity/client/model/JSONPredicateRepresentation.kt @@ -1,12 +1,12 @@ // 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. +// 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 import com.google.gson.annotations.SerializedName /** - * Represents a predicate for verification. It acts as a condition which is necessary to assign a user to the given groups and permit access to the specified applications. + * Represents a predicate for verification. It acts as a condition which is necessary to assign a user to the given groups, permit access to the specified applications or to assign specific inventory roles to device groups. */ class JSONPredicateRepresentation { diff --git a/src/main/java/com/cumulocity/client/model/LoginForm.kt b/src/main/java/com/cumulocity/client/model/LoginForm.kt index 2c3a911..5ce2e52 100644 --- a/src/main/java/com/cumulocity/client/model/LoginForm.kt +++ b/src/main/java/com/cumulocity/client/model/LoginForm.kt @@ -1,5 +1,5 @@ // 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. +// 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 @@ -41,9 +41,7 @@ class LoginForm { @SerializedName(value = "PASSWORD") PASSWORD("PASSWORD"), @SerializedName(value = "AUTHORIZATION_CODE") - AUTHORIZATIONCODE("AUTHORIZATION_CODE"), - @SerializedName(value = "REFRESH_TOKEN") - REFRESHTOKEN("REFRESH_TOKEN") + AUTHORIZATIONCODE("AUTHORIZATION_CODE") } diff --git a/src/main/java/com/cumulocity/client/model/LoginOption.kt b/src/main/java/com/cumulocity/client/model/LoginOption.kt index 5cc639d..a7cd272 100644 --- a/src/main/java/com/cumulocity/client/model/LoginOption.kt +++ b/src/main/java/com/cumulocity/client/model/LoginOption.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/LoginOptionCollection.kt b/src/main/java/com/cumulocity/client/model/LoginOptionCollection.kt index 0b2950f..7a2bd3b 100644 --- a/src/main/java/com/cumulocity/client/model/LoginOptionCollection.kt +++ b/src/main/java/com/cumulocity/client/model/LoginOptionCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/ManagedObject.kt b/src/main/java/com/cumulocity/client/model/ManagedObject.kt index cfb4ccc..7494444 100644 --- a/src/main/java/com/cumulocity/client/model/ManagedObject.kt +++ b/src/main/java/com/cumulocity/client/model/ManagedObject.kt @@ -1,5 +1,5 @@ // 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. +// 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 @@ -96,6 +96,12 @@ class ManagedObject { @SerializedName(value = "c8y_IsDevice") var c8yIsDevice: C8yIsDevice? = null + /** + * A fragment which identifies this managed object as a device group. + */ + @SerializedName(value = "c8y_IsDeviceGroup") + var c8yIsDeviceGroup: C8yIsDeviceGroup? = null + /** * This fragment must be added in order to publish sample commands for a subset of devices sharing the same device type. If the fragment is present, the list of sample commands for a device type will be extended with the sample commands for the `c8y_DeviceTypes`. New sample commands created from the user interface will be created in the context of the `c8y_DeviceTypes`. */ @@ -128,6 +134,16 @@ class ManagedObject { } } + /** + * A fragment which identifies this managed object as a device group. + */ + class C8yIsDeviceGroup { + + override fun toString(): String { + return Gson().toJson(this).toString() + } + } + override fun toString(): String { return Gson().toJson(this).toString() } @@ -170,6 +186,7 @@ class ManagedObject { src?.assetParents?.let { it -> jsonTree.add("assetParents", context?.serialize(it)) } src?.deviceParents?.let { it -> jsonTree.add("deviceParents", context?.serialize(it)) } src?.c8yIsDevice?.let { it -> jsonTree.add("c8y_IsDevice", context?.serialize(it)) } + src?.c8yIsDeviceGroup?.let { it -> jsonTree.add("c8y_IsDeviceGroup", context?.serialize(it)) } src?.c8yDeviceTypes?.let { it -> jsonTree.add("c8y_DeviceTypes", context?.serialize(it)) } src?.c8ySupportedOperations?.let { it -> jsonTree.add("c8y_SupportedOperations", context?.serialize(it)) } src?.customFragments?.let { it -> diff --git a/src/main/java/com/cumulocity/client/model/ManagedObjectCollection.kt b/src/main/java/com/cumulocity/client/model/ManagedObjectCollection.kt index 9080b82..53812e3 100644 --- a/src/main/java/com/cumulocity/client/model/ManagedObjectCollection.kt +++ b/src/main/java/com/cumulocity/client/model/ManagedObjectCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/ManagedObjectReference.kt b/src/main/java/com/cumulocity/client/model/ManagedObjectReference.kt index e3a9cc5..7236ed9 100644 --- a/src/main/java/com/cumulocity/client/model/ManagedObjectReference.kt +++ b/src/main/java/com/cumulocity/client/model/ManagedObjectReference.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/ManagedObjectReferenceCollection.kt b/src/main/java/com/cumulocity/client/model/ManagedObjectReferenceCollection.kt index ff6bef7..4da549e 100644 --- a/src/main/java/com/cumulocity/client/model/ManagedObjectReferenceCollection.kt +++ b/src/main/java/com/cumulocity/client/model/ManagedObjectReferenceCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/ManagedObjectReferenceTuple.kt b/src/main/java/com/cumulocity/client/model/ManagedObjectReferenceTuple.kt index 4c77d3e..a4e3f7f 100644 --- a/src/main/java/com/cumulocity/client/model/ManagedObjectReferenceTuple.kt +++ b/src/main/java/com/cumulocity/client/model/ManagedObjectReferenceTuple.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/ManagedObjectUser.kt b/src/main/java/com/cumulocity/client/model/ManagedObjectUser.kt index cd8c0b4..1443c4f 100644 --- a/src/main/java/com/cumulocity/client/model/ManagedObjectUser.kt +++ b/src/main/java/com/cumulocity/client/model/ManagedObjectUser.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/Measurement.kt b/src/main/java/com/cumulocity/client/model/Measurement.kt index 4deb45f..ff670b6 100644 --- a/src/main/java/com/cumulocity/client/model/Measurement.kt +++ b/src/main/java/com/cumulocity/client/model/Measurement.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/MeasurementApiResource.kt b/src/main/java/com/cumulocity/client/model/MeasurementApiResource.kt index 62f1349..0477e7d 100644 --- a/src/main/java/com/cumulocity/client/model/MeasurementApiResource.kt +++ b/src/main/java/com/cumulocity/client/model/MeasurementApiResource.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/MeasurementCollection.kt b/src/main/java/com/cumulocity/client/model/MeasurementCollection.kt index b224032..6d3dc46 100644 --- a/src/main/java/com/cumulocity/client/model/MeasurementCollection.kt +++ b/src/main/java/com/cumulocity/client/model/MeasurementCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/MeasurementFragmentSeries.kt b/src/main/java/com/cumulocity/client/model/MeasurementFragmentSeries.kt index 76a3530..d0f962e 100644 --- a/src/main/java/com/cumulocity/client/model/MeasurementFragmentSeries.kt +++ b/src/main/java/com/cumulocity/client/model/MeasurementFragmentSeries.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/MeasurementSeries.kt b/src/main/java/com/cumulocity/client/model/MeasurementSeries.kt index f51809c..6b6137f 100644 --- a/src/main/java/com/cumulocity/client/model/MeasurementSeries.kt +++ b/src/main/java/com/cumulocity/client/model/MeasurementSeries.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/MicroserviceApplicationManifest.kt b/src/main/java/com/cumulocity/client/model/MicroserviceApplicationManifest.kt index ee4202c..a4e2381 100644 --- a/src/main/java/com/cumulocity/client/model/MicroserviceApplicationManifest.kt +++ b/src/main/java/com/cumulocity/client/model/MicroserviceApplicationManifest.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/NewDeviceRequest.kt b/src/main/java/com/cumulocity/client/model/NewDeviceRequest.kt index 0240d1b..2f29d3f 100644 --- a/src/main/java/com/cumulocity/client/model/NewDeviceRequest.kt +++ b/src/main/java/com/cumulocity/client/model/NewDeviceRequest.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/NewDeviceRequestCollection.kt b/src/main/java/com/cumulocity/client/model/NewDeviceRequestCollection.kt index 65dca1f..50b9355 100644 --- a/src/main/java/com/cumulocity/client/model/NewDeviceRequestCollection.kt +++ b/src/main/java/com/cumulocity/client/model/NewDeviceRequestCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/NotificationApiResource.kt b/src/main/java/com/cumulocity/client/model/NotificationApiResource.kt index 6bf0f31..945ce4b 100644 --- a/src/main/java/com/cumulocity/client/model/NotificationApiResource.kt +++ b/src/main/java/com/cumulocity/client/model/NotificationApiResource.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/NotificationSubscription.kt b/src/main/java/com/cumulocity/client/model/NotificationSubscription.kt index 45cc8d3..6e0f599 100644 --- a/src/main/java/com/cumulocity/client/model/NotificationSubscription.kt +++ b/src/main/java/com/cumulocity/client/model/NotificationSubscription.kt @@ -1,5 +1,5 @@ // 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. +// 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 @@ -33,6 +33,11 @@ data class NotificationSubscription(var context: Context?, var subscription: Str */ var subscriptionFilter: SubscriptionFilter? = null + /** + * Indicates whether the messages for this subscription are persistent or non-persistent, meaning they can be lost if consumer is not connected. + */ + var nonPersistent: Boolean? = null + /** * The context within which the subscription is to be processed. * @@ -77,14 +82,23 @@ data class NotificationSubscription(var context: Context?, var subscription: Str class SubscriptionFilter { /** - * The Notifications are available for Alarms, Alarms with children, Device control, Events, Events with children, Inventory and Measurements for the `mo` context and for Alarms and Inventory for the `tenant` context. Alternatively, the wildcard `*` can be used to match all the permissible APIs within the bound context. + * For the `mo` (Managed object) context, notifications from the `alarms`, `alarmsWithChildren`, `events`, `eventsWithChildren`, `managedobjects` (Inventory), `measurements` and `operations` (Device control) APIs can be subscribed to. + * The `alarmsWithChildren` and `eventsWithChildren` APIs subscribe to alarms and events respectively from the managed object identified by the `source.id` field, and all of its descendant managed objects. * - * > **ⓘ Info:** the wildcard `*` cannot be used in conjunction with other values. + * For the `tenant` context, notifications from the `alarms`, `events` and `managedobjects` (Inventory) APIs can be subscribed to. + * + * For all contexts, the `*` (wildcard) value can be used to subscribe to notifications from all of the available APIs in that context. + * + * > **ⓘ Info:** The wildcard `*` cannot be used in conjunction with other values. + * > **ⓘ Info:** When filtering Events in the `tenant` context it is required to also specify the `typeFilter`. */ var apis: Array? = null /** - * The data needs to have the specified value in its `type` property to meet the filter criteria. + * Used to match the `type` property of the data. This must either be a string to match one specific type exactly, or be an `or` OData expression, allowing the filter to match any one of a number of types. + * + * > **ⓘ Info:** The use of a `type` attribute is assumed, for example when using only a string literal `'c8y_Temperature'` (or using `c8y_Temperature`, as quotes can be omitted when matching a single type) it is equivalent to a `type eq 'c8y_Temperature'` OData expression. + * > **ⓘ Info:** Currently only the `or` operator is allowed when using an OData expression. Example usage is `'c8y_Temperature' or 'c8y_Pressure'` which will match all the data with types `c8y_Temperature` or `c8y_Pressure`. */ var typeFilter: String? = null diff --git a/src/main/java/com/cumulocity/client/model/NotificationSubscriptionCollection.kt b/src/main/java/com/cumulocity/client/model/NotificationSubscriptionCollection.kt index b983f76..e5d220b 100644 --- a/src/main/java/com/cumulocity/client/model/NotificationSubscriptionCollection.kt +++ b/src/main/java/com/cumulocity/client/model/NotificationSubscriptionCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/NotificationSubscriptionResult.kt b/src/main/java/com/cumulocity/client/model/NotificationSubscriptionResult.kt index 06ed4e2..9aa57af 100644 --- a/src/main/java/com/cumulocity/client/model/NotificationSubscriptionResult.kt +++ b/src/main/java/com/cumulocity/client/model/NotificationSubscriptionResult.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/NotificationToken.kt b/src/main/java/com/cumulocity/client/model/NotificationToken.kt index 34b0c4d..aedb72b 100644 --- a/src/main/java/com/cumulocity/client/model/NotificationToken.kt +++ b/src/main/java/com/cumulocity/client/model/NotificationToken.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/NotificationTokenClaims.kt b/src/main/java/com/cumulocity/client/model/NotificationTokenClaims.kt index 73c56cb..0b7601a 100644 --- a/src/main/java/com/cumulocity/client/model/NotificationTokenClaims.kt +++ b/src/main/java/com/cumulocity/client/model/NotificationTokenClaims.kt @@ -1,8 +1,9 @@ // 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. +// 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 +import com.google.gson.annotations.SerializedName data class NotificationTokenClaims(var subscriber: String?, var subscription: String?) { constructor() : this(subscriber = null, subscription = null) @@ -12,6 +13,35 @@ data class NotificationTokenClaims(var subscriber: String?, var subscription: St */ var expiresInMinutes: Int? = null + /** + * The subscription type. Currently the only supported type is `notification` .Other types may be added in future. + */ + var type: Type? = null + + /** + * If `true`, the token will be securely signed by the Cumulocity IoT platform. + */ + var signed: Boolean? = null + + /** + * If `true`, indicates that the token is used to create a shared consumer on the subscription. + */ + var shared: Boolean? = null + + /** + * If `true`, indicates that the created token refers to the non-persistent variant of the named subscription. + */ + var nonPersistent: Boolean? = null + + /** + * The subscription type. Currently the only supported type is `notification` .Other types may be added in future. + */ + enum class Type(val value: String) { + @SerializedName(value = "notification") + NOTIFICATION("notification") + } + + override fun toString(): String { return Gson().toJson(this).toString() } diff --git a/src/main/java/com/cumulocity/client/model/OAuthSessionConfiguration.kt b/src/main/java/com/cumulocity/client/model/OAuthSessionConfiguration.kt index 60621ca..729ba29 100644 --- a/src/main/java/com/cumulocity/client/model/OAuthSessionConfiguration.kt +++ b/src/main/java/com/cumulocity/client/model/OAuthSessionConfiguration.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/ObjectAdditionParents.kt b/src/main/java/com/cumulocity/client/model/ObjectAdditionParents.kt index 3ded583..acbad10 100644 --- a/src/main/java/com/cumulocity/client/model/ObjectAdditionParents.kt +++ b/src/main/java/com/cumulocity/client/model/ObjectAdditionParents.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/ObjectAssetParents.kt b/src/main/java/com/cumulocity/client/model/ObjectAssetParents.kt index a542dc3..8b938c9 100644 --- a/src/main/java/com/cumulocity/client/model/ObjectAssetParents.kt +++ b/src/main/java/com/cumulocity/client/model/ObjectAssetParents.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/ObjectChildAdditions.kt b/src/main/java/com/cumulocity/client/model/ObjectChildAdditions.kt index 07c9ae2..4816b42 100644 --- a/src/main/java/com/cumulocity/client/model/ObjectChildAdditions.kt +++ b/src/main/java/com/cumulocity/client/model/ObjectChildAdditions.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/ObjectChildAssets.kt b/src/main/java/com/cumulocity/client/model/ObjectChildAssets.kt index 0c8303e..d66a9e8 100644 --- a/src/main/java/com/cumulocity/client/model/ObjectChildAssets.kt +++ b/src/main/java/com/cumulocity/client/model/ObjectChildAssets.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/ObjectChildDevices.kt b/src/main/java/com/cumulocity/client/model/ObjectChildDevices.kt index 8c11f1d..e109e0c 100644 --- a/src/main/java/com/cumulocity/client/model/ObjectChildDevices.kt +++ b/src/main/java/com/cumulocity/client/model/ObjectChildDevices.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/ObjectDeviceParents.kt b/src/main/java/com/cumulocity/client/model/ObjectDeviceParents.kt index 04c2af8..b83d6ab 100644 --- a/src/main/java/com/cumulocity/client/model/ObjectDeviceParents.kt +++ b/src/main/java/com/cumulocity/client/model/ObjectDeviceParents.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/Operation.kt b/src/main/java/com/cumulocity/client/model/Operation.kt index cc4266f..4b66d8d 100644 --- a/src/main/java/com/cumulocity/client/model/Operation.kt +++ b/src/main/java/com/cumulocity/client/model/Operation.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/OperationCollection.kt b/src/main/java/com/cumulocity/client/model/OperationCollection.kt index 6db83f3..4fad852 100644 --- a/src/main/java/com/cumulocity/client/model/OperationCollection.kt +++ b/src/main/java/com/cumulocity/client/model/OperationCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/OperationReference.kt b/src/main/java/com/cumulocity/client/model/OperationReference.kt index 7651eeb..5ad7ecd 100644 --- a/src/main/java/com/cumulocity/client/model/OperationReference.kt +++ b/src/main/java/com/cumulocity/client/model/OperationReference.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/Option.kt b/src/main/java/com/cumulocity/client/model/Option.kt index 324b9e4..b745687 100644 --- a/src/main/java/com/cumulocity/client/model/Option.kt +++ b/src/main/java/com/cumulocity/client/model/Option.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/OptionCollection.kt b/src/main/java/com/cumulocity/client/model/OptionCollection.kt index 767b234..02ac7d1 100644 --- a/src/main/java/com/cumulocity/client/model/OptionCollection.kt +++ b/src/main/java/com/cumulocity/client/model/OptionCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/PageStatistics.kt b/src/main/java/com/cumulocity/client/model/PageStatistics.kt index 048601f..9612d4f 100644 --- a/src/main/java/com/cumulocity/client/model/PageStatistics.kt +++ b/src/main/java/com/cumulocity/client/model/PageStatistics.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/PasswordChange.kt b/src/main/java/com/cumulocity/client/model/PasswordChange.kt index fe67c42..5753788 100644 --- a/src/main/java/com/cumulocity/client/model/PasswordChange.kt +++ b/src/main/java/com/cumulocity/client/model/PasswordChange.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/PlatformApiResource.kt b/src/main/java/com/cumulocity/client/model/PlatformApiResource.kt index 281375e..bc3b467 100644 --- a/src/main/java/com/cumulocity/client/model/PlatformApiResource.kt +++ b/src/main/java/com/cumulocity/client/model/PlatformApiResource.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/RangeStatisticsFile.kt b/src/main/java/com/cumulocity/client/model/RangeStatisticsFile.kt index 8b688fb..e4f63aa 100644 --- a/src/main/java/com/cumulocity/client/model/RangeStatisticsFile.kt +++ b/src/main/java/com/cumulocity/client/model/RangeStatisticsFile.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/RealtimeNotification.kt b/src/main/java/com/cumulocity/client/model/RealtimeNotification.kt index e010a96..8d6c4cb 100644 --- a/src/main/java/com/cumulocity/client/model/RealtimeNotification.kt +++ b/src/main/java/com/cumulocity/client/model/RealtimeNotification.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/RequestRepresentation.kt b/src/main/java/com/cumulocity/client/model/RequestRepresentation.kt index 8fd6419..eee404f 100644 --- a/src/main/java/com/cumulocity/client/model/RequestRepresentation.kt +++ b/src/main/java/com/cumulocity/client/model/RequestRepresentation.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/RetentionRule.kt b/src/main/java/com/cumulocity/client/model/RetentionRule.kt index 5d061ed..3f13fbf 100644 --- a/src/main/java/com/cumulocity/client/model/RetentionRule.kt +++ b/src/main/java/com/cumulocity/client/model/RetentionRule.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/RetentionRuleCollection.kt b/src/main/java/com/cumulocity/client/model/RetentionRuleCollection.kt index a562561..a7ecf17 100644 --- a/src/main/java/com/cumulocity/client/model/RetentionRuleCollection.kt +++ b/src/main/java/com/cumulocity/client/model/RetentionRuleCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/Role.kt b/src/main/java/com/cumulocity/client/model/Role.kt index 7ad0c1c..583f1ee 100644 --- a/src/main/java/com/cumulocity/client/model/Role.kt +++ b/src/main/java/com/cumulocity/client/model/Role.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/RoleReference.kt b/src/main/java/com/cumulocity/client/model/RoleReference.kt index bbe5496..408b762 100644 --- a/src/main/java/com/cumulocity/client/model/RoleReference.kt +++ b/src/main/java/com/cumulocity/client/model/RoleReference.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/RoleReferenceCollection.kt b/src/main/java/com/cumulocity/client/model/RoleReferenceCollection.kt index 289edb5..d4036d6 100644 --- a/src/main/java/com/cumulocity/client/model/RoleReferenceCollection.kt +++ b/src/main/java/com/cumulocity/client/model/RoleReferenceCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/StatisticsFile.kt b/src/main/java/com/cumulocity/client/model/StatisticsFile.kt index 6dff314..7cd6b35 100644 --- a/src/main/java/com/cumulocity/client/model/StatisticsFile.kt +++ b/src/main/java/com/cumulocity/client/model/StatisticsFile.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/SubscribedApplicationReference.kt b/src/main/java/com/cumulocity/client/model/SubscribedApplicationReference.kt index bb1b70a..6cb5c2d 100644 --- a/src/main/java/com/cumulocity/client/model/SubscribedApplicationReference.kt +++ b/src/main/java/com/cumulocity/client/model/SubscribedApplicationReference.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/SubscribedRole.kt b/src/main/java/com/cumulocity/client/model/SubscribedRole.kt index 1ba2ea5..7a0ce92 100644 --- a/src/main/java/com/cumulocity/client/model/SubscribedRole.kt +++ b/src/main/java/com/cumulocity/client/model/SubscribedRole.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/SubscribedUser.kt b/src/main/java/com/cumulocity/client/model/SubscribedUser.kt index 76dc968..fdba81a 100644 --- a/src/main/java/com/cumulocity/client/model/SubscribedUser.kt +++ b/src/main/java/com/cumulocity/client/model/SubscribedUser.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/SummaryAllTenantsUsageStatistics.kt b/src/main/java/com/cumulocity/client/model/SummaryAllTenantsUsageStatistics.kt index a4ed6c0..98897e8 100644 --- a/src/main/java/com/cumulocity/client/model/SummaryAllTenantsUsageStatistics.kt +++ b/src/main/java/com/cumulocity/client/model/SummaryAllTenantsUsageStatistics.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/SummaryTenantUsageStatistics.kt b/src/main/java/com/cumulocity/client/model/SummaryTenantUsageStatistics.kt index feb9f7b..d1cda0e 100644 --- a/src/main/java/com/cumulocity/client/model/SummaryTenantUsageStatistics.kt +++ b/src/main/java/com/cumulocity/client/model/SummaryTenantUsageStatistics.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/SupportedMeasurements.kt b/src/main/java/com/cumulocity/client/model/SupportedMeasurements.kt index 4d9f88d..66245a8 100644 --- a/src/main/java/com/cumulocity/client/model/SupportedMeasurements.kt +++ b/src/main/java/com/cumulocity/client/model/SupportedMeasurements.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/SupportedSeries.kt b/src/main/java/com/cumulocity/client/model/SupportedSeries.kt index 8f5d45b..f6143de 100644 --- a/src/main/java/com/cumulocity/client/model/SupportedSeries.kt +++ b/src/main/java/com/cumulocity/client/model/SupportedSeries.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/SystemOption.kt b/src/main/java/com/cumulocity/client/model/SystemOption.kt index e64360f..898ba1d 100644 --- a/src/main/java/com/cumulocity/client/model/SystemOption.kt +++ b/src/main/java/com/cumulocity/client/model/SystemOption.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/SystemOptionCollection.kt b/src/main/java/com/cumulocity/client/model/SystemOptionCollection.kt index 6b9055b..d749dd8 100644 --- a/src/main/java/com/cumulocity/client/model/SystemOptionCollection.kt +++ b/src/main/java/com/cumulocity/client/model/SystemOptionCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/Tenant.kt b/src/main/java/com/cumulocity/client/model/Tenant.kt index 4ebc39a..36396fd 100644 --- a/src/main/java/com/cumulocity/client/model/Tenant.kt +++ b/src/main/java/com/cumulocity/client/model/Tenant.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/TenantApiResource.kt b/src/main/java/com/cumulocity/client/model/TenantApiResource.kt index 4c555c8..6d4de3a 100644 --- a/src/main/java/com/cumulocity/client/model/TenantApiResource.kt +++ b/src/main/java/com/cumulocity/client/model/TenantApiResource.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/TenantCollection.kt b/src/main/java/com/cumulocity/client/model/TenantCollection.kt index ed2f1b1..8eb03cf 100644 --- a/src/main/java/com/cumulocity/client/model/TenantCollection.kt +++ b/src/main/java/com/cumulocity/client/model/TenantCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/TenantTfaData.kt b/src/main/java/com/cumulocity/client/model/TenantTfaData.kt index b6182ce..e0e6915 100644 --- a/src/main/java/com/cumulocity/client/model/TenantTfaData.kt +++ b/src/main/java/com/cumulocity/client/model/TenantTfaData.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/TenantUsageStatisticsCollection.kt b/src/main/java/com/cumulocity/client/model/TenantUsageStatisticsCollection.kt index 8331fba..4250448 100644 --- a/src/main/java/com/cumulocity/client/model/TenantUsageStatisticsCollection.kt +++ b/src/main/java/com/cumulocity/client/model/TenantUsageStatisticsCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/TenantUsageStatisticsFileCollection.kt b/src/main/java/com/cumulocity/client/model/TenantUsageStatisticsFileCollection.kt index 10beccc..a931429 100644 --- a/src/main/java/com/cumulocity/client/model/TenantUsageStatisticsFileCollection.kt +++ b/src/main/java/com/cumulocity/client/model/TenantUsageStatisticsFileCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/TrustedCertificate.kt b/src/main/java/com/cumulocity/client/model/TrustedCertificate.kt index 315a9e4..abcfda9 100644 --- a/src/main/java/com/cumulocity/client/model/TrustedCertificate.kt +++ b/src/main/java/com/cumulocity/client/model/TrustedCertificate.kt @@ -1,5 +1,5 @@ // 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. +// 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 @@ -47,6 +47,21 @@ class TrustedCertificate { */ var notBefore: String? = null + /** + * Indicates whether the proof of possession for the certificate was provided. + */ + var proofOfPossessionValid: Boolean? = null + + /** + * An unsigned verification code that provides proof of possession for the certificate after signing. + */ + var proofOfPossessionUnsignedVerificationCode: String? = null + + /** + * Validity of the verification code. + */ + var proofOfPossessionVerificationCodeUsableUntil: String? = null + /** * A URL linking to this resource. */ diff --git a/src/main/java/com/cumulocity/client/model/TrustedCertificateCollection.kt b/src/main/java/com/cumulocity/client/model/TrustedCertificateCollection.kt index da6176e..734b869 100644 --- a/src/main/java/com/cumulocity/client/model/TrustedCertificateCollection.kt +++ b/src/main/java/com/cumulocity/client/model/TrustedCertificateCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/UpdatedDevicePermissions.kt b/src/main/java/com/cumulocity/client/model/UpdatedDevicePermissions.kt new file mode 100644 index 0000000..063f09d --- /dev/null +++ b/src/main/java/com/cumulocity/client/model/UpdatedDevicePermissions.kt @@ -0,0 +1,49 @@ +// 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 + +/** + * A list of device permissions. + */ +class UpdatedDevicePermissions { + + var users: Array? = null + + var groups: Array? = null + + class Users { + + var userName: String? = null + + /** + * An object with a list of the user's device permissions. + */ + @Deprecated(message = "This property might be removed in future releases.") + var devicePermissions: DevicePermissions? = null + + override fun toString(): String { + return Gson().toJson(this).toString() + } + } + + class Groups { + + var id: String? = null + + /** + * An object with a list of the user's device permissions. + */ + @Deprecated(message = "This property might be removed in future releases.") + var devicePermissions: DevicePermissions? = null + + override fun toString(): String { + return Gson().toJson(this).toString() + } + } + + override fun toString(): String { + return Gson().toJson(this).toString() + } +} diff --git a/src/main/java/com/cumulocity/client/model/UploadedTrustedCertSignedVerificationCode.kt b/src/main/java/com/cumulocity/client/model/UploadedTrustedCertSignedVerificationCode.kt index 7570025..a865471 100644 --- a/src/main/java/com/cumulocity/client/model/UploadedTrustedCertSignedVerificationCode.kt +++ b/src/main/java/com/cumulocity/client/model/UploadedTrustedCertSignedVerificationCode.kt @@ -1,5 +1,5 @@ // 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. +// 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 @@ -7,12 +7,8 @@ import com.google.gson.Gson /** * The signed verification code to prove the user's possession of the certificate. */ -class UploadedTrustedCertSignedVerificationCode { - - /** - * A signed verification code that proves the right to use the certificate. - */ - var proofOfPossessionSignedVerificationCode: String? = null +data class UploadedTrustedCertSignedVerificationCode(var proofOfPossessionSignedVerificationCode: String?) { + constructor() : this(proofOfPossessionSignedVerificationCode = null) override fun toString(): String { return Gson().toJson(this).toString() diff --git a/src/main/java/com/cumulocity/client/model/UploadedTrustedCertificate.kt b/src/main/java/com/cumulocity/client/model/UploadedTrustedCertificate.kt new file mode 100644 index 0000000..2b3d54e --- /dev/null +++ b/src/main/java/com/cumulocity/client/model/UploadedTrustedCertificate.kt @@ -0,0 +1,35 @@ +// 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 +import com.google.gson.annotations.SerializedName + +data class UploadedTrustedCertificate(var certInPemFormat: String?, var status: Status?) { + constructor() : this(certInPemFormat = null, status = null) + + /** + * Indicates whether the automatic device registration is enabled or not. + */ + var autoRegistrationEnabled: Boolean? = null + + /** + * Name of the certificate. + */ + var name: String? = null + + /** + * Indicates if the certificate is active and can be used by the device to establish a connection to the Cumulocity IoT platform. + */ + enum class Status(val value: String) { + @SerializedName(value = "ENABLED") + ENABLED("ENABLED"), + @SerializedName(value = "DISABLED") + DISABLED("DISABLED") + } + + + override fun toString(): String { + return Gson().toJson(this).toString() + } +} diff --git a/src/main/java/com/cumulocity/client/model/UploadedTrustedCertificateCollection.kt b/src/main/java/com/cumulocity/client/model/UploadedTrustedCertificateCollection.kt new file mode 100644 index 0000000..93a416e --- /dev/null +++ b/src/main/java/com/cumulocity/client/model/UploadedTrustedCertificateCollection.kt @@ -0,0 +1,37 @@ +// 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 + +/** + * A collection of uploaded trusted certificates. + */ +class UploadedTrustedCertificateCollection { + + var certificates: Array? = null + + /** + * A URI reference [[RFC3986](https://tools.ietf.org/html/rfc3986)] to a potential next page of managed objects. + */ + var next: String? = null + + /** + * A URI reference [[RFC3986](https://tools.ietf.org/html/rfc3986)] to a potential previous page of managed objects. + */ + var prev: String? = null + + /** + * A URL linking to this resource. + */ + var self: String? = null + + /** + * Information about paging statistics. + */ + var statistics: PageStatistics? = null + + override fun toString(): String { + return Gson().toJson(this).toString() + } +} diff --git a/src/main/java/com/cumulocity/client/model/UsageStatisticsResources.kt b/src/main/java/com/cumulocity/client/model/UsageStatisticsResources.kt index 7165127..56d344e 100644 --- a/src/main/java/com/cumulocity/client/model/UsageStatisticsResources.kt +++ b/src/main/java/com/cumulocity/client/model/UsageStatisticsResources.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/UsageStatisticsResourcesUsedBy.kt b/src/main/java/com/cumulocity/client/model/UsageStatisticsResourcesUsedBy.kt index baa0465..2df69aa 100644 --- a/src/main/java/com/cumulocity/client/model/UsageStatisticsResourcesUsedBy.kt +++ b/src/main/java/com/cumulocity/client/model/UsageStatisticsResourcesUsedBy.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/User.kt b/src/main/java/com/cumulocity/client/model/User.kt index c1d807f..6d372a0 100644 --- a/src/main/java/com/cumulocity/client/model/User.kt +++ b/src/main/java/com/cumulocity/client/model/User.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/UserApiResource.kt b/src/main/java/com/cumulocity/client/model/UserApiResource.kt index 3dd5983..5bd033b 100644 --- a/src/main/java/com/cumulocity/client/model/UserApiResource.kt +++ b/src/main/java/com/cumulocity/client/model/UserApiResource.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/UserCollection.kt b/src/main/java/com/cumulocity/client/model/UserCollection.kt index 90c583e..8a61161 100644 --- a/src/main/java/com/cumulocity/client/model/UserCollection.kt +++ b/src/main/java/com/cumulocity/client/model/UserCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/UserGroupCollection.kt b/src/main/java/com/cumulocity/client/model/UserGroupCollection.kt index a893c31..f2bc218 100644 --- a/src/main/java/com/cumulocity/client/model/UserGroupCollection.kt +++ b/src/main/java/com/cumulocity/client/model/UserGroupCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/UserReference.kt b/src/main/java/com/cumulocity/client/model/UserReference.kt index c2a829b..30e32eb 100644 --- a/src/main/java/com/cumulocity/client/model/UserReference.kt +++ b/src/main/java/com/cumulocity/client/model/UserReference.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/UserReferenceCollection.kt b/src/main/java/com/cumulocity/client/model/UserReferenceCollection.kt index bc4a846..79c4ace 100644 --- a/src/main/java/com/cumulocity/client/model/UserReferenceCollection.kt +++ b/src/main/java/com/cumulocity/client/model/UserReferenceCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/UserRoleCollection.kt b/src/main/java/com/cumulocity/client/model/UserRoleCollection.kt index 992e202..9364f12 100644 --- a/src/main/java/com/cumulocity/client/model/UserRoleCollection.kt +++ b/src/main/java/com/cumulocity/client/model/UserRoleCollection.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/UserTfaData.kt b/src/main/java/com/cumulocity/client/model/UserTfaData.kt index add50c4..50df70a 100644 --- a/src/main/java/com/cumulocity/client/model/UserTfaData.kt +++ b/src/main/java/com/cumulocity/client/model/UserTfaData.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/model/VerifyCertificateChain.kt b/src/main/java/com/cumulocity/client/model/VerifyCertificateChain.kt new file mode 100644 index 0000000..67f0b75 --- /dev/null +++ b/src/main/java/com/cumulocity/client/model/VerifyCertificateChain.kt @@ -0,0 +1,32 @@ +// 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 VerifyCertificateChain { + + /** + * The result of validating the certificate chain. + */ + var successfullyValidated: Boolean? = null + + /** + * The tenant ID used for validation. + */ + var tenantId: String? = null + + /** + * The name of the organization which signed the certificate. + */ + var issuer: String? = null + + /** + * The name of the organization to which the certificate belongs. + */ + var subject: String? = null + + override fun toString(): String { + return Gson().toJson(this).toString() + } +} diff --git a/src/main/java/com/cumulocity/client/model/WebApplicationManifest.kt b/src/main/java/com/cumulocity/client/model/WebApplicationManifest.kt index e4ea3af..bc80f3d 100644 --- a/src/main/java/com/cumulocity/client/model/WebApplicationManifest.kt +++ b/src/main/java/com/cumulocity/client/model/WebApplicationManifest.kt @@ -1,5 +1,5 @@ // 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. +// 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 diff --git a/src/main/java/com/cumulocity/client/supplementary/SeparatedQueryParameter.kt b/src/main/java/com/cumulocity/client/supplementary/SeparatedQueryParameter.kt index 1ef49a7..96438dc 100644 --- a/src/main/java/com/cumulocity/client/supplementary/SeparatedQueryParameter.kt +++ b/src/main/java/com/cumulocity/client/supplementary/SeparatedQueryParameter.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.supplementary diff --git a/src/test/java/com/cumulocity/client/api/AlarmsApiTest.kt b/src/test/java/com/cumulocity/client/api/AlarmsApiTest.kt index 7179852..4f447c9 100644 --- a/src/test/java/com/cumulocity/client/api/AlarmsApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/AlarmsApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials @@ -43,7 +43,7 @@ class AlarmsApiTest { @Test fun testGetAlarms() { val latch = CountDownLatch(1) - val api = AlarmsApi.Factory.create("https://iotaccstage2.eu-latest.cumulocity.com/", this.clientBuilder) + val api = AlarmsApi.Factory.create("tenant", this.clientBuilder) api.getAlarms().enqueue(object : Callback { override fun onResponse(call: Call?, response: Response?) { @@ -63,7 +63,7 @@ class AlarmsApiTest { @Test fun testGetNumberOfAlarms() { val latch = CountDownLatch(1) - val api = AlarmsApi.Factory.create("https://iotaccstage2.eu-latest.cumulocity.com/", this.clientBuilder) + val api = AlarmsApi.Factory.create("tenant", this.clientBuilder) api.getNumberOfAlarms().enqueue(object : Callback { override fun onResponse(call: Call?, response: Response?) { diff --git a/src/test/java/com/cumulocity/client/api/ApplicationBinariesApiTest.kt b/src/test/java/com/cumulocity/client/api/ApplicationBinariesApiTest.kt index a63c3fb..6111a19 100644 --- a/src/test/java/com/cumulocity/client/api/ApplicationBinariesApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/ApplicationBinariesApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials diff --git a/src/test/java/com/cumulocity/client/api/ApplicationVersionsApiTest.kt b/src/test/java/com/cumulocity/client/api/ApplicationVersionsApiTest.kt index 071bc0e..c45995c 100644 --- a/src/test/java/com/cumulocity/client/api/ApplicationVersionsApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/ApplicationVersionsApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials diff --git a/src/test/java/com/cumulocity/client/api/ApplicationsApiTest.kt b/src/test/java/com/cumulocity/client/api/ApplicationsApiTest.kt index 09eb93a..99a23cd 100644 --- a/src/test/java/com/cumulocity/client/api/ApplicationsApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/ApplicationsApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials @@ -42,7 +42,7 @@ class ApplicationsApiTest { @Test fun testGetApplications() { val latch = CountDownLatch(1) - val api = ApplicationsApi.Factory.create("https://iotaccstage2.eu-latest.cumulocity.com/", this.clientBuilder) + val api = ApplicationsApi.Factory.create("tenant", this.clientBuilder) api.getApplications().enqueue(object : Callback { override fun onResponse(call: Call?, response: Response?) { diff --git a/src/test/java/com/cumulocity/client/api/AttachmentsApiTest.kt b/src/test/java/com/cumulocity/client/api/AttachmentsApiTest.kt index 302f6e1..2776ba3 100644 --- a/src/test/java/com/cumulocity/client/api/AttachmentsApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/AttachmentsApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials diff --git a/src/test/java/com/cumulocity/client/api/AuditsApiTest.kt b/src/test/java/com/cumulocity/client/api/AuditsApiTest.kt index 9e466b1..2e7f636 100644 --- a/src/test/java/com/cumulocity/client/api/AuditsApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/AuditsApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials @@ -41,7 +41,7 @@ class AuditsApiTest { @Test fun testGetAuditRecords() { val latch = CountDownLatch(1) - val api = AuditsApi.Factory.create("https://iotaccstage2.eu-latest.cumulocity.com/", this.clientBuilder) + val api = AuditsApi.Factory.create("tenant", this.clientBuilder) api.getAuditRecords().enqueue(object : Callback { override fun onResponse(call: Call?, response: Response?) { diff --git a/src/test/java/com/cumulocity/client/api/BinariesApiTest.kt b/src/test/java/com/cumulocity/client/api/BinariesApiTest.kt index e5f8267..d47e30d 100644 --- a/src/test/java/com/cumulocity/client/api/BinariesApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/BinariesApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials @@ -44,7 +44,7 @@ class BinariesApiTest { @Test fun testGetBinaries() { val latch = CountDownLatch(1) - val api = BinariesApi.Factory.create("https://iotaccstage2.eu-latest.cumulocity.com/", this.clientBuilder) + val api = BinariesApi.Factory.create("tenant", this.clientBuilder) api.getBinaries().enqueue(object : Callback { override fun onResponse(call: Call?, response: Response?) { diff --git a/src/test/java/com/cumulocity/client/api/BootstrapUserApiTest.kt b/src/test/java/com/cumulocity/client/api/BootstrapUserApiTest.kt index 46bbde5..010ab62 100644 --- a/src/test/java/com/cumulocity/client/api/BootstrapUserApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/BootstrapUserApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials diff --git a/src/test/java/com/cumulocity/client/api/BulkOperationsApiTest.kt b/src/test/java/com/cumulocity/client/api/BulkOperationsApiTest.kt index 8a1e46d..3f7bf30 100644 --- a/src/test/java/com/cumulocity/client/api/BulkOperationsApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/BulkOperationsApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials @@ -42,7 +42,7 @@ class BulkOperationsApiTest { @Test fun testGetBulkOperations() { val latch = CountDownLatch(1) - val api = BulkOperationsApi.Factory.create("https://iotaccstage2.eu-latest.cumulocity.com/", this.clientBuilder) + val api = BulkOperationsApi.Factory.create("tenant", this.clientBuilder) api.getBulkOperations().enqueue(object : Callback { override fun onResponse(call: Call?, response: Response?) { diff --git a/src/test/java/com/cumulocity/client/api/ChildOperationsApiTest.kt b/src/test/java/com/cumulocity/client/api/ChildOperationsApiTest.kt index ccd7ad6..ce60b05 100644 --- a/src/test/java/com/cumulocity/client/api/ChildOperationsApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/ChildOperationsApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials diff --git a/src/test/java/com/cumulocity/client/api/CurrentApplicationApiTest.kt b/src/test/java/com/cumulocity/client/api/CurrentApplicationApiTest.kt index c51c6be..5d3528b 100644 --- a/src/test/java/com/cumulocity/client/api/CurrentApplicationApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/CurrentApplicationApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials @@ -42,7 +42,7 @@ class CurrentApplicationApiTest { @Test fun testGetCurrentApplication() { val latch = CountDownLatch(1) - val api = CurrentApplicationApi.Factory.create("https://iotaccstage2.eu-latest.cumulocity.com/", this.clientBuilder) + val api = CurrentApplicationApi.Factory.create("tenant", this.clientBuilder) api.getCurrentApplication().enqueue(object : Callback { override fun onResponse(call: Call?, response: Response?) { @@ -62,7 +62,7 @@ class CurrentApplicationApiTest { @Test fun testGetCurrentApplicationSettings() { val latch = CountDownLatch(1) - val api = CurrentApplicationApi.Factory.create("https://iotaccstage2.eu-latest.cumulocity.com/", this.clientBuilder) + val api = CurrentApplicationApi.Factory.create("tenant", this.clientBuilder) api.getCurrentApplicationSettings().enqueue(object : Callback> { override fun onResponse(call: Call>?, response: Response>?) { @@ -82,7 +82,7 @@ class CurrentApplicationApiTest { @Test fun testGetSubscribedUsers() { val latch = CountDownLatch(1) - val api = CurrentApplicationApi.Factory.create("https://iotaccstage2.eu-latest.cumulocity.com/", this.clientBuilder) + val api = CurrentApplicationApi.Factory.create("tenant", this.clientBuilder) api.getSubscribedUsers().enqueue(object : Callback { override fun onResponse(call: Call?, response: Response?) { diff --git a/src/test/java/com/cumulocity/client/api/CurrentUserApiTest.kt b/src/test/java/com/cumulocity/client/api/CurrentUserApiTest.kt index f2fef52..74cd761 100644 --- a/src/test/java/com/cumulocity/client/api/CurrentUserApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/CurrentUserApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials @@ -45,7 +45,7 @@ class CurrentUserApiTest { @Test fun testGetCurrentUser() { val latch = CountDownLatch(1) - val api = CurrentUserApi.Factory.create("https://iotaccstage2.eu-latest.cumulocity.com/", this.clientBuilder) + val api = CurrentUserApi.Factory.create("tenant", this.clientBuilder) api.getCurrentUser().enqueue(object : Callback { override fun onResponse(call: Call?, response: Response?) { @@ -65,7 +65,7 @@ class CurrentUserApiTest { @Test fun testGetTfaState() { val latch = CountDownLatch(1) - val api = CurrentUserApi.Factory.create("https://iotaccstage2.eu-latest.cumulocity.com/", this.clientBuilder) + val api = CurrentUserApi.Factory.create("tenant", this.clientBuilder) api.getTfaState().enqueue(object : Callback { override fun onResponse(call: Call?, response: Response?) { diff --git a/src/test/java/com/cumulocity/client/api/DeviceCredentialsApiTest.kt b/src/test/java/com/cumulocity/client/api/DeviceCredentialsApiTest.kt index f193e82..8cd597b 100644 --- a/src/test/java/com/cumulocity/client/api/DeviceCredentialsApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/DeviceCredentialsApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials diff --git a/src/test/java/com/cumulocity/client/api/DevicePermissionsApiTest.kt b/src/test/java/com/cumulocity/client/api/DevicePermissionsApiTest.kt new file mode 100644 index 0000000..ff115f5 --- /dev/null +++ b/src/test/java/com/cumulocity/client/api/DevicePermissionsApiTest.kt @@ -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.api +import okhttp3.Credentials +import okhttp3.Interceptor +import okhttp3.OkHttpClient +import okhttp3.Request +import okhttp3.Headers +import org.junit.Assert +import org.junit.Test +import retrofit2.Call +import retrofit2.Callback +import retrofit2.Response +import java.util.concurrent.CountDownLatch +import okhttp3.ResponseBody +import com.cumulocity.client.model.UpdatedDevicePermissions +import com.cumulocity.client.model.DevicePermissionOwners + +// TODO parameterise servers +class DevicePermissionsApiTest { + + private var clientBuilder: OkHttpClient.Builder = OkHttpClient.Builder() + + init { + val authToken = Credentials.basic("userName", "password") + val headerAuthorizationInterceptor = Interceptor { chain -> + var request: Request = chain.request() + val headers: Headers = request.headers().newBuilder().add("Authorization", authToken).build() + request = request.newBuilder().headers(headers).build() + chain.proceed(request) + } + this.clientBuilder.addInterceptor(headerAuthorizationInterceptor) + } + + @Test + fun testFactoryCreatesObject() { + val api = DevicePermissionsApi.Factory.create("your tenant") + Assert.assertNotNull(api) + } + +} diff --git a/src/test/java/com/cumulocity/client/api/DeviceStatisticsApiTest.kt b/src/test/java/com/cumulocity/client/api/DeviceStatisticsApiTest.kt index b216f5d..7b31ed1 100644 --- a/src/test/java/com/cumulocity/client/api/DeviceStatisticsApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/DeviceStatisticsApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials diff --git a/src/test/java/com/cumulocity/client/api/EventsApiTest.kt b/src/test/java/com/cumulocity/client/api/EventsApiTest.kt index c0a240c..ed59685 100644 --- a/src/test/java/com/cumulocity/client/api/EventsApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/EventsApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials @@ -42,7 +42,7 @@ class EventsApiTest { @Test fun testGetEvents() { val latch = CountDownLatch(1) - val api = EventsApi.Factory.create("https://iotaccstage2.eu-latest.cumulocity.com/", this.clientBuilder) + val api = EventsApi.Factory.create("tenant", this.clientBuilder) api.getEvents().enqueue(object : Callback { override fun onResponse(call: Call?, response: Response?) { diff --git a/src/test/java/com/cumulocity/client/api/ExternalIDsApiTest.kt b/src/test/java/com/cumulocity/client/api/ExternalIDsApiTest.kt index c844a2d..4395b91 100644 --- a/src/test/java/com/cumulocity/client/api/ExternalIDsApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/ExternalIDsApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials diff --git a/src/test/java/com/cumulocity/client/api/GroupsApiTest.kt b/src/test/java/com/cumulocity/client/api/GroupsApiTest.kt index eedfb88..a4816ef 100644 --- a/src/test/java/com/cumulocity/client/api/GroupsApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/GroupsApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials diff --git a/src/test/java/com/cumulocity/client/api/IdentityApiTest.kt b/src/test/java/com/cumulocity/client/api/IdentityApiTest.kt index 41bd00f..1b18449 100644 --- a/src/test/java/com/cumulocity/client/api/IdentityApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/IdentityApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials @@ -40,7 +40,7 @@ class IdentityApiTest { @Test fun testGetIdentityApiResource() { val latch = CountDownLatch(1) - val api = IdentityApi.Factory.create("https://iotaccstage2.eu-latest.cumulocity.com/", this.clientBuilder) + val api = IdentityApi.Factory.create("tenant", this.clientBuilder) api.getIdentityApiResource().enqueue(object : Callback { override fun onResponse(call: Call?, response: Response?) { diff --git a/src/test/java/com/cumulocity/client/api/InventoryRolesApiTest.kt b/src/test/java/com/cumulocity/client/api/InventoryRolesApiTest.kt index 347c60d..562efb6 100644 --- a/src/test/java/com/cumulocity/client/api/InventoryRolesApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/InventoryRolesApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials @@ -45,7 +45,7 @@ class InventoryRolesApiTest { @Test fun testGetInventoryRoles() { val latch = CountDownLatch(1) - val api = InventoryRolesApi.Factory.create("https://iotaccstage2.eu-latest.cumulocity.com/", this.clientBuilder) + val api = InventoryRolesApi.Factory.create("tenant", this.clientBuilder) api.getInventoryRoles().enqueue(object : Callback { override fun onResponse(call: Call?, response: Response?) { diff --git a/src/test/java/com/cumulocity/client/api/LoginOptionsApiTest.kt b/src/test/java/com/cumulocity/client/api/LoginOptionsApiTest.kt index a177e29..bd1f0ee 100644 --- a/src/test/java/com/cumulocity/client/api/LoginOptionsApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/LoginOptionsApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials @@ -13,6 +13,7 @@ import retrofit2.Call import retrofit2.Callback import retrofit2.Response import java.util.concurrent.CountDownLatch +import okhttp3.ResponseBody import com.cumulocity.client.model.AuthConfig import com.cumulocity.client.model.AuthConfigAccess import com.cumulocity.client.model.LoginOptionCollection @@ -42,7 +43,7 @@ class LoginOptionsApiTest { @Test fun testGetLoginOptions() { val latch = CountDownLatch(1) - val api = LoginOptionsApi.Factory.create("https://iotaccstage2.eu-latest.cumulocity.com/", this.clientBuilder) + val api = LoginOptionsApi.Factory.create("tenant", this.clientBuilder) api.getLoginOptions().enqueue(object : Callback { override fun onResponse(call: Call?, response: Response?) { diff --git a/src/test/java/com/cumulocity/client/api/LoginTokensApiTest.kt b/src/test/java/com/cumulocity/client/api/LoginTokensApiTest.kt index 8350541..21a9f2e 100644 --- a/src/test/java/com/cumulocity/client/api/LoginTokensApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/LoginTokensApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials diff --git a/src/test/java/com/cumulocity/client/api/ManagedObjectsApiTest.kt b/src/test/java/com/cumulocity/client/api/ManagedObjectsApiTest.kt index a608ffc..3597de7 100644 --- a/src/test/java/com/cumulocity/client/api/ManagedObjectsApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/ManagedObjectsApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials @@ -46,7 +46,7 @@ class ManagedObjectsApiTest { @Test fun testGetManagedObjects() { val latch = CountDownLatch(1) - val api = ManagedObjectsApi.Factory.create("https://iotaccstage2.eu-latest.cumulocity.com/", this.clientBuilder) + val api = ManagedObjectsApi.Factory.create("tenant", this.clientBuilder) api.getManagedObjects().enqueue(object : Callback { override fun onResponse(call: Call?, response: Response?) { @@ -62,24 +62,4 @@ class ManagedObjectsApiTest { }) latch.await() } - - @Test - fun testGetNumberOfManagedObjects() { - val latch = CountDownLatch(1) - val api = ManagedObjectsApi.Factory.create("https://iotaccstage2.eu-latest.cumulocity.com/", this.clientBuilder) - api.getNumberOfManagedObjects().enqueue(object : Callback { - - override fun onResponse(call: Call?, response: Response?) { - println(response?.message()) - println(response?.body()) - latch.countDown() - } - - override fun onFailure(call: Call?, t: Throwable?) { - println(t) - latch.countDown() - } - }) - latch.await() - } } diff --git a/src/test/java/com/cumulocity/client/api/MeasurementsApiTest.kt b/src/test/java/com/cumulocity/client/api/MeasurementsApiTest.kt index c03ee95..b5da8fc 100644 --- a/src/test/java/com/cumulocity/client/api/MeasurementsApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/MeasurementsApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials @@ -44,7 +44,7 @@ class MeasurementsApiTest { @Test fun testGetMeasurements() { val latch = CountDownLatch(1) - val api = MeasurementsApi.Factory.create("https://iotaccstage2.eu-latest.cumulocity.com/", this.clientBuilder) + val api = MeasurementsApi.Factory.create("tenant", this.clientBuilder) api.getMeasurements().enqueue(object : Callback { override fun onResponse(call: Call?, response: Response?) { diff --git a/src/test/java/com/cumulocity/client/api/NewDeviceRequestsApiTest.kt b/src/test/java/com/cumulocity/client/api/NewDeviceRequestsApiTest.kt index 04818f3..11148e0 100644 --- a/src/test/java/com/cumulocity/client/api/NewDeviceRequestsApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/NewDeviceRequestsApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials @@ -42,7 +42,7 @@ class NewDeviceRequestsApiTest { @Test fun testGetNewDeviceRequests() { val latch = CountDownLatch(1) - val api = NewDeviceRequestsApi.Factory.create("https://iotaccstage2.eu-latest.cumulocity.com/", this.clientBuilder) + val api = NewDeviceRequestsApi.Factory.create("tenant", this.clientBuilder) api.getNewDeviceRequests().enqueue(object : Callback { override fun onResponse(call: Call?, response: Response?) { diff --git a/src/test/java/com/cumulocity/client/api/OperationsApiTest.kt b/src/test/java/com/cumulocity/client/api/OperationsApiTest.kt index 0992a8e..3e7cced 100644 --- a/src/test/java/com/cumulocity/client/api/OperationsApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/OperationsApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials @@ -42,7 +42,7 @@ class OperationsApiTest { @Test fun testGetOperations() { val latch = CountDownLatch(1) - val api = OperationsApi.Factory.create("https://iotaccstage2.eu-latest.cumulocity.com/", this.clientBuilder) + val api = OperationsApi.Factory.create("tenant", this.clientBuilder) api.getOperations().enqueue(object : Callback { override fun onResponse(call: Call?, response: Response?) { diff --git a/src/test/java/com/cumulocity/client/api/OptionsApiTest.kt b/src/test/java/com/cumulocity/client/api/OptionsApiTest.kt index cff36ae..0e1eb69 100644 --- a/src/test/java/com/cumulocity/client/api/OptionsApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/OptionsApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials @@ -44,7 +44,7 @@ class OptionsApiTest { @Test fun testGetOptions() { val latch = CountDownLatch(1) - val api = OptionsApi.Factory.create("https://iotaccstage2.eu-latest.cumulocity.com/", this.clientBuilder) + val api = OptionsApi.Factory.create("tenant", this.clientBuilder) api.getOptions().enqueue(object : Callback { override fun onResponse(call: Call?, response: Response?) { diff --git a/src/test/java/com/cumulocity/client/api/RealtimeNotificationApiTest.kt b/src/test/java/com/cumulocity/client/api/RealtimeNotificationApiTest.kt index 5851d7b..d640dc3 100644 --- a/src/test/java/com/cumulocity/client/api/RealtimeNotificationApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/RealtimeNotificationApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials diff --git a/src/test/java/com/cumulocity/client/api/RetentionRulesApiTest.kt b/src/test/java/com/cumulocity/client/api/RetentionRulesApiTest.kt index 038aad6..105787e 100644 --- a/src/test/java/com/cumulocity/client/api/RetentionRulesApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/RetentionRulesApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials @@ -42,7 +42,7 @@ class RetentionRulesApiTest { @Test fun testGetRetentionRules() { val latch = CountDownLatch(1) - val api = RetentionRulesApi.Factory.create("https://iotaccstage2.eu-latest.cumulocity.com/", this.clientBuilder) + val api = RetentionRulesApi.Factory.create("tenant", this.clientBuilder) api.getRetentionRules().enqueue(object : Callback { override fun onResponse(call: Call?, response: Response?) { diff --git a/src/test/java/com/cumulocity/client/api/RolesApiTest.kt b/src/test/java/com/cumulocity/client/api/RolesApiTest.kt index 81b6b5d..e638c22 100644 --- a/src/test/java/com/cumulocity/client/api/RolesApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/RolesApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials @@ -45,7 +45,7 @@ class RolesApiTest { @Test fun testGetUserRoles() { val latch = CountDownLatch(1) - val api = RolesApi.Factory.create("https://iotaccstage2.eu-latest.cumulocity.com/", this.clientBuilder) + val api = RolesApi.Factory.create("tenant", this.clientBuilder) api.getUserRoles().enqueue(object : Callback { override fun onResponse(call: Call?, response: Response?) { diff --git a/src/test/java/com/cumulocity/client/api/SubscriptionsApiTest.kt b/src/test/java/com/cumulocity/client/api/SubscriptionsApiTest.kt index 710157f..4ee6ae6 100644 --- a/src/test/java/com/cumulocity/client/api/SubscriptionsApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/SubscriptionsApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials @@ -42,7 +42,7 @@ class SubscriptionsApiTest { @Test fun testGetSubscriptions() { val latch = CountDownLatch(1) - val api = SubscriptionsApi.Factory.create("https://iotaccstage2.eu-latest.cumulocity.com/", this.clientBuilder) + val api = SubscriptionsApi.Factory.create("tenant", this.clientBuilder) api.getSubscriptions().enqueue(object : Callback { override fun onResponse(call: Call?, response: Response?) { diff --git a/src/test/java/com/cumulocity/client/api/SystemOptionsApiTest.kt b/src/test/java/com/cumulocity/client/api/SystemOptionsApiTest.kt index 0163fb6..c4b6b53 100644 --- a/src/test/java/com/cumulocity/client/api/SystemOptionsApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/SystemOptionsApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials @@ -41,7 +41,7 @@ class SystemOptionsApiTest { @Test fun testGetSystemOptions() { val latch = CountDownLatch(1) - val api = SystemOptionsApi.Factory.create("https://iotaccstage2.eu-latest.cumulocity.com/", this.clientBuilder) + val api = SystemOptionsApi.Factory.create("tenant", this.clientBuilder) api.getSystemOptions().enqueue(object : Callback { override fun onResponse(call: Call?, response: Response?) { diff --git a/src/test/java/com/cumulocity/client/api/TenantApplicationsApiTest.kt b/src/test/java/com/cumulocity/client/api/TenantApplicationsApiTest.kt index 4d1364e..4ab6051 100644 --- a/src/test/java/com/cumulocity/client/api/TenantApplicationsApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/TenantApplicationsApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials diff --git a/src/test/java/com/cumulocity/client/api/TenantsApiTest.kt b/src/test/java/com/cumulocity/client/api/TenantsApiTest.kt index 8c8fe4d..0fefe44 100644 --- a/src/test/java/com/cumulocity/client/api/TenantsApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/TenantsApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials @@ -44,7 +44,7 @@ class TenantsApiTest { @Test fun testGetTenants() { val latch = CountDownLatch(1) - val api = TenantsApi.Factory.create("https://iotaccstage2.eu-latest.cumulocity.com/", this.clientBuilder) + val api = TenantsApi.Factory.create("tenant", this.clientBuilder) api.getTenants().enqueue(object : Callback { override fun onResponse(call: Call?, response: Response?) { @@ -64,7 +64,7 @@ class TenantsApiTest { @Test fun testGetCurrentTenant() { val latch = CountDownLatch(1) - val api = TenantsApi.Factory.create("https://iotaccstage2.eu-latest.cumulocity.com/", this.clientBuilder) + val api = TenantsApi.Factory.create("tenant", this.clientBuilder) api.getCurrentTenant().enqueue(object : Callback { override fun onResponse(call: Call?, response: Response?) { diff --git a/src/test/java/com/cumulocity/client/api/TokensApiTest.kt b/src/test/java/com/cumulocity/client/api/TokensApiTest.kt index 01b9c91..9ff53bc 100644 --- a/src/test/java/com/cumulocity/client/api/TokensApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/TokensApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials diff --git a/src/test/java/com/cumulocity/client/api/TrustedCertificatesApiTest.kt b/src/test/java/com/cumulocity/client/api/TrustedCertificatesApiTest.kt index b147769..eef2179 100644 --- a/src/test/java/com/cumulocity/client/api/TrustedCertificatesApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/TrustedCertificatesApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials @@ -14,9 +14,12 @@ import retrofit2.Callback import retrofit2.Response import java.util.concurrent.CountDownLatch import okhttp3.ResponseBody +import com.cumulocity.client.model.UploadedTrustedCertificate +import com.cumulocity.client.model.UploadedTrustedCertificateCollection import com.cumulocity.client.model.TrustedCertificate -import com.cumulocity.client.model.TrustedCertificateCollection import com.cumulocity.client.model.UploadedTrustedCertSignedVerificationCode +import com.cumulocity.client.model.TrustedCertificateCollection +import com.cumulocity.client.model.VerifyCertificateChain // TODO parameterise servers class TrustedCertificatesApiTest { diff --git a/src/test/java/com/cumulocity/client/api/UsageStatisticsApiTest.kt b/src/test/java/com/cumulocity/client/api/UsageStatisticsApiTest.kt index 8e35112..637a683 100644 --- a/src/test/java/com/cumulocity/client/api/UsageStatisticsApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/UsageStatisticsApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials @@ -46,7 +46,7 @@ class UsageStatisticsApiTest { @Test fun testGetTenantUsageStatisticsCollectionResource() { val latch = CountDownLatch(1) - val api = UsageStatisticsApi.Factory.create("https://iotaccstage2.eu-latest.cumulocity.com/", this.clientBuilder) + val api = UsageStatisticsApi.Factory.create("tenant", this.clientBuilder) api.getTenantUsageStatisticsCollectionResource().enqueue(object : Callback { override fun onResponse(call: Call?, response: Response?) { @@ -66,7 +66,7 @@ class UsageStatisticsApiTest { @Test fun testGetTenantUsageStatistics() { val latch = CountDownLatch(1) - val api = UsageStatisticsApi.Factory.create("https://iotaccstage2.eu-latest.cumulocity.com/", this.clientBuilder) + val api = UsageStatisticsApi.Factory.create("tenant", this.clientBuilder) api.getTenantUsageStatistics().enqueue(object : Callback { override fun onResponse(call: Call?, response: Response?) { @@ -86,7 +86,7 @@ class UsageStatisticsApiTest { @Test fun testGetTenantsUsageStatistics() { val latch = CountDownLatch(1) - val api = UsageStatisticsApi.Factory.create("https://iotaccstage2.eu-latest.cumulocity.com/", this.clientBuilder) + val api = UsageStatisticsApi.Factory.create("tenant", this.clientBuilder) api.getTenantsUsageStatistics().enqueue(object : Callback> { override fun onResponse(call: Call>?, response: Response>?) { @@ -106,7 +106,7 @@ class UsageStatisticsApiTest { @Test fun testGetMetadata() { val latch = CountDownLatch(1) - val api = UsageStatisticsApi.Factory.create("https://iotaccstage2.eu-latest.cumulocity.com/", this.clientBuilder) + val api = UsageStatisticsApi.Factory.create("tenant", this.clientBuilder) api.getMetadata().enqueue(object : Callback { override fun onResponse(call: Call?, response: Response?) { diff --git a/src/test/java/com/cumulocity/client/api/UsersApiTest.kt b/src/test/java/com/cumulocity/client/api/UsersApiTest.kt index 8bfa1bc..8bbe913 100644 --- a/src/test/java/com/cumulocity/client/api/UsersApiTest.kt +++ b/src/test/java/com/cumulocity/client/api/UsersApiTest.kt @@ -1,5 +1,5 @@ // 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. +// Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG. package com.cumulocity.client.api import okhttp3.Credentials