diff --git a/administrative/README.md b/administrative/README.md index 206177717..2f66864b2 100644 --- a/administrative/README.md +++ b/administrative/README.md @@ -2,7 +2,7 @@ Administrative API -- API version: 7.0.75 +- API version: 7.0.78 Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following operations to manage your organization: diff --git a/agents/README.md b/agents/README.md index 17535dc4b..44f8a6f12 100644 --- a/agents/README.md +++ b/agents/README.md @@ -2,7 +2,7 @@ Agents API -- API version: 7.0.75 +- API version: 7.0.78 ## Overview diff --git a/alerts/README.md b/alerts/README.md index 848702c13..80d6121eb 100644 --- a/alerts/README.md +++ b/alerts/README.md @@ -2,7 +2,7 @@ Alerts API -- API version: 7.0.75 +- API version: 7.0.78 You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: diff --git a/bgp-monitors/README.md b/bgp-monitors/README.md index 34a6e83e0..61e84578f 100644 --- a/bgp-monitors/README.md +++ b/bgp-monitors/README.md @@ -2,7 +2,7 @@ BGP Monitors API -- API version: 7.0.75 +- API version: 7.0.78 Retrieve information about BGP monitors available to your ThousandEyes account. ThousandEyes ingests BGP routing data from dozens of global BGP collectors and automatically integrates that visibility as a configurable layer under service, network, and path visualization layers. diff --git a/connectors/.openapi-generator-ignore b/connectors/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/connectors/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/connectors/.openapi-generator/FILES b/connectors/.openapi-generator/FILES new file mode 100644 index 000000000..d88e50376 --- /dev/null +++ b/connectors/.openapi-generator/FILES @@ -0,0 +1,36 @@ +.openapi-generator-ignore +README.md +api/openapi.yaml +build.gradle +docs/GenericConnectorsApi.md +docs/OperationConnectorsApi.md +docs/WebhookOperationsApi.md +src/main/java/com/thousandeyes/sdk/connectors/GenericConnectorsApi.java +src/main/java/com/thousandeyes/sdk/connectors/OperationConnectorsApi.java +src/main/java/com/thousandeyes/sdk/connectors/WebhookOperationsApi.java +src/main/java/com/thousandeyes/sdk/connectors/model/Assignments.java +src/main/java/com/thousandeyes/sdk/connectors/model/AuthenticationType.java +src/main/java/com/thousandeyes/sdk/connectors/model/BasicAuthentication.java +src/main/java/com/thousandeyes/sdk/connectors/model/BearerTokenAuthentication.java +src/main/java/com/thousandeyes/sdk/connectors/model/ConnectorType.java +src/main/java/com/thousandeyes/sdk/connectors/model/Error.java +src/main/java/com/thousandeyes/sdk/connectors/model/GenericConnector.java +src/main/java/com/thousandeyes/sdk/connectors/model/GenericConnectorAuth.java +src/main/java/com/thousandeyes/sdk/connectors/model/GenericConnectors.java +src/main/java/com/thousandeyes/sdk/connectors/model/Header.java +src/main/java/com/thousandeyes/sdk/connectors/model/Link.java +src/main/java/com/thousandeyes/sdk/connectors/model/OauthClientCredentialsAuthentication.java +src/main/java/com/thousandeyes/sdk/connectors/model/OauthCodeAuthentication.java +src/main/java/com/thousandeyes/sdk/connectors/model/OperationCategory.java +src/main/java/com/thousandeyes/sdk/connectors/model/OperationStatus.java +src/main/java/com/thousandeyes/sdk/connectors/model/OperationType.java +src/main/java/com/thousandeyes/sdk/connectors/model/OtherTokenAuthentication.java +src/main/java/com/thousandeyes/sdk/connectors/model/SelfLinks.java +src/main/java/com/thousandeyes/sdk/connectors/model/UnauthorizedError.java +src/main/java/com/thousandeyes/sdk/connectors/model/ValidationError.java +src/main/java/com/thousandeyes/sdk/connectors/model/ValidationErrorItem.java +src/main/java/com/thousandeyes/sdk/connectors/model/WebhookOperation.java +src/main/java/com/thousandeyes/sdk/connectors/model/WebhookOperations.java +src/test/java/com/thousandeyes/sdk/connectors/GenericConnectorsApiTest.java +src/test/java/com/thousandeyes/sdk/connectors/OperationConnectorsApiTest.java +src/test/java/com/thousandeyes/sdk/connectors/WebhookOperationsApiTest.java diff --git a/connectors/.openapi-generator/VERSION b/connectors/.openapi-generator/VERSION new file mode 100644 index 000000000..93c8ddab9 --- /dev/null +++ b/connectors/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.6.0 diff --git a/connectors/README.md b/connectors/README.md new file mode 100644 index 000000000..54a4d072f --- /dev/null +++ b/connectors/README.md @@ -0,0 +1,176 @@ +# connectors + +Integrations API + +- API version: 7.0.78 + +Manage connectors and operations. + + +*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* + +## Requirements + +Building the API client library requires: + +1. Java 11+ +2. Maven/Gradle + +## Installation + +To install the API client library to your local Maven repository, simply execute: + +```shell +mvn clean install +``` + +To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: + +```shell +mvn clean deploy +``` + +Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information. + +### Maven users + +Add this dependency to your project's POM: + +```xml + + + com.thousandeyes.sdk + connectors + version + + + com.thousandeyes.sdk + client + version + + + + + com.thousandeyes.sdk + client-native + version + + + +``` + +### Gradle users + +Add this dependency to your project's build file: + +```groovy +implementation "com.thousandeyes.sdk:client:" +implementation "com.thousandeyes.sdk:client-native:" #Example only, you can use your own client implementation +implementation "com.thousandeyes.sdk:connectors:" +``` + +### Others + +At first generate the JAR by executing: + +```shell +mvn clean package +``` + +Then manually install the following JARs: + +- `target/connectors-version.jar` +- `target/lib/*.jar` + +## Getting Started + +Please follow the [installation](#installation) instruction and execute the following Java code: + +```java + +import com.thousandeyes.sdk.*; +import com.thousandeyes.sdk.client.*; +import com.thousandeyes.sdk.connectors.model.*; +import com.thousandeyes.sdk.connectors.GenericConnectorsApi; + +public class GenericConnectorsApiExample { + + public static void main(String[] args) { + // Configure clients using the `defaultClient` object, such as + // overriding the host and port, timeout, etc. In this example we are using the NativeApiClient + // but you can use your own client implementation + ApiClient defaultClient = NativeApiClient + .builder() + .baseUri("https://api.thousandeyes.com/v7") + .bearerToken("") + .build(); + + GenericConnectorsApi apiInstance = new GenericConnectorsApi(defaultClient); + GenericConnector genericConnector = new GenericConnector(); // GenericConnector | + String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + try { + GenericConnector result = apiInstance.createGenericConnector(genericConnector, aid); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GenericConnectorsApi#createGenericConnector"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.thousandeyes.com/v7* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*GenericConnectorsApi* | [**createGenericConnector**](docs/GenericConnectorsApi.md#createGenericConnector) | **POST** /connectors/generic | Create connector +*GenericConnectorsApi* | [**createGenericConnectorWithHttpInfo**](docs/GenericConnectorsApi.md#createGenericConnectorWithHttpInfo) | **POST** /connectors/generic | Create connector +*GenericConnectorsApi* | [**deleteGenericConnector**](docs/GenericConnectorsApi.md#deleteGenericConnector) | **DELETE** /connectors/generic/{id} | Delete connector +*GenericConnectorsApi* | [**deleteGenericConnectorWithHttpInfo**](docs/GenericConnectorsApi.md#deleteGenericConnectorWithHttpInfo) | **DELETE** /connectors/generic/{id} | Delete connector +*GenericConnectorsApi* | [**getGenericConnector**](docs/GenericConnectorsApi.md#getGenericConnector) | **GET** /connectors/generic/{id} | Retrieve connector +*GenericConnectorsApi* | [**getGenericConnectorWithHttpInfo**](docs/GenericConnectorsApi.md#getGenericConnectorWithHttpInfo) | **GET** /connectors/generic/{id} | Retrieve connector +*GenericConnectorsApi* | [**getGenericConnectors**](docs/GenericConnectorsApi.md#getGenericConnectors) | **GET** /connectors/generic | List connectors +*GenericConnectorsApi* | [**getGenericConnectorsWithHttpInfo**](docs/GenericConnectorsApi.md#getGenericConnectorsWithHttpInfo) | **GET** /connectors/generic | List connectors +*GenericConnectorsApi* | [**listGenericConnectorOperations**](docs/GenericConnectorsApi.md#listGenericConnectorOperations) | **GET** /connectors/generic/{id}/operations | List operation IDs assigned to a connector +*GenericConnectorsApi* | [**listGenericConnectorOperationsWithHttpInfo**](docs/GenericConnectorsApi.md#listGenericConnectorOperationsWithHttpInfo) | **GET** /connectors/generic/{id}/operations | List operation IDs assigned to a connector +*GenericConnectorsApi* | [**setGenericConnectorOperations**](docs/GenericConnectorsApi.md#setGenericConnectorOperations) | **PUT** /connectors/generic/{id}/operations | Assign operations to a connector +*GenericConnectorsApi* | [**setGenericConnectorOperationsWithHttpInfo**](docs/GenericConnectorsApi.md#setGenericConnectorOperationsWithHttpInfo) | **PUT** /connectors/generic/{id}/operations | Assign operations to a connector +*GenericConnectorsApi* | [**updateGenericConnector**](docs/GenericConnectorsApi.md#updateGenericConnector) | **PUT** /connectors/generic/{id} | Update connector +*GenericConnectorsApi* | [**updateGenericConnectorWithHttpInfo**](docs/GenericConnectorsApi.md#updateGenericConnectorWithHttpInfo) | **PUT** /connectors/generic/{id} | Update connector +*OperationConnectorsApi* | [**getOperationConnectors**](docs/OperationConnectorsApi.md#getOperationConnectors) | **GET** /operations/{type}/{id}/connectors | Retrieve connectors assigned to an operation +*OperationConnectorsApi* | [**getOperationConnectorsWithHttpInfo**](docs/OperationConnectorsApi.md#getOperationConnectorsWithHttpInfo) | **GET** /operations/{type}/{id}/connectors | Retrieve connectors assigned to an operation +*OperationConnectorsApi* | [**setOperationConnectors**](docs/OperationConnectorsApi.md#setOperationConnectors) | **PUT** /operations/{type}/{id}/connectors | Assign connectors to an operation +*OperationConnectorsApi* | [**setOperationConnectorsWithHttpInfo**](docs/OperationConnectorsApi.md#setOperationConnectorsWithHttpInfo) | **PUT** /operations/{type}/{id}/connectors | Assign connectors to an operation +*WebhookOperationsApi* | [**createWebhookOperation**](docs/WebhookOperationsApi.md#createWebhookOperation) | **POST** /operations/webhooks | Create webhook operation +*WebhookOperationsApi* | [**createWebhookOperationWithHttpInfo**](docs/WebhookOperationsApi.md#createWebhookOperationWithHttpInfo) | **POST** /operations/webhooks | Create webhook operation +*WebhookOperationsApi* | [**deleteWebhookOperation**](docs/WebhookOperationsApi.md#deleteWebhookOperation) | **DELETE** /operations/webhooks/{id} | Delete webhook operation +*WebhookOperationsApi* | [**deleteWebhookOperationWithHttpInfo**](docs/WebhookOperationsApi.md#deleteWebhookOperationWithHttpInfo) | **DELETE** /operations/webhooks/{id} | Delete webhook operation +*WebhookOperationsApi* | [**getWebhookOperation**](docs/WebhookOperationsApi.md#getWebhookOperation) | **GET** /operations/webhooks/{id} | Retrieve webhook operation +*WebhookOperationsApi* | [**getWebhookOperationWithHttpInfo**](docs/WebhookOperationsApi.md#getWebhookOperationWithHttpInfo) | **GET** /operations/webhooks/{id} | Retrieve webhook operation +*WebhookOperationsApi* | [**getWebhookOperations**](docs/WebhookOperationsApi.md#getWebhookOperations) | **GET** /operations/webhooks | List webhook operations +*WebhookOperationsApi* | [**getWebhookOperationsWithHttpInfo**](docs/WebhookOperationsApi.md#getWebhookOperationsWithHttpInfo) | **GET** /operations/webhooks | List webhook operations +*WebhookOperationsApi* | [**updateWebhookOperation**](docs/WebhookOperationsApi.md#updateWebhookOperation) | **PUT** /operations/webhooks/{id} | Update webhook operation +*WebhookOperationsApi* | [**updateWebhookOperationWithHttpInfo**](docs/WebhookOperationsApi.md#updateWebhookOperationWithHttpInfo) | **PUT** /operations/webhooks/{id} | Update webhook operation + + + +## Documentation for Authorization + +Endpoints do not require authorization. + + +## Recommendation + +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. +However, the instances of the api clients created from the `ApiClient` are thread-safe and can be re-used. + +## Author + + + diff --git a/connectors/api/openapi.yaml b/connectors/api/openapi.yaml new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/connectors/api/openapi.yaml @@ -0,0 +1 @@ + diff --git a/connectors/build.gradle b/connectors/build.gradle new file mode 100644 index 000000000..418842bd3 --- /dev/null +++ b/connectors/build.gradle @@ -0,0 +1,41 @@ +ext { + jakartaAnnotationVersion = "2.1.1" + wiremockVersion = "3.9.1" +} + +repositories { + mavenCentral() +} + +dependencies { + implementation project(":configuration") + implementation project(":client") + implementation "com.fasterxml.jackson.core:jackson-core:$jacksonVersion" + implementation "com.fasterxml.jackson.core:jackson-annotations:$jacksonVersion" + implementation "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion" + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonVersion" + implementation "com.google.code.findbugs:jsr305:$googleJsr305Version" + implementation "jakarta.annotation:jakarta.annotation-api:$jakartaAnnotationVersion" + implementation "org.openapitools:jackson-databind-nullable:$jacksonDatabindNullableVersion" + implementation "org.apache.commons:commons-lang3:$apacheCommonsLang3" + + testImplementation "org.junit.jupiter:junit-jupiter:$junitVersion" + testImplementation "org.wiremock:wiremock:$wiremockVersion" + testImplementation project(":client-native") + + testRuntimeOnly "org.junit.platform:junit-platform-launcher" +} + +test { + // Enable JUnit 5 (Gradle 4.6+). + useJUnitPlatform() + + // Always run tests, even when nothing changed. + dependsOn 'cleanTest' + + // Show test results. + testLogging { + events "passed", "skipped", "failed" + } + +} diff --git a/connectors/docs/GenericConnectorsApi.md b/connectors/docs/GenericConnectorsApi.md new file mode 100644 index 000000000..8ab008686 --- /dev/null +++ b/connectors/docs/GenericConnectorsApi.md @@ -0,0 +1,1060 @@ +# GenericConnectorsApi + +All URIs are relative to *https://api.thousandeyes.com/v7* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createGenericConnector**](GenericConnectorsApi.md#createGenericConnector) | **POST** /connectors/generic | Create connector | +| [**createGenericConnectorWithHttpInfo**](GenericConnectorsApi.md#createGenericConnectorWithHttpInfo) | **POST** /connectors/generic | Create connector | +| [**deleteGenericConnector**](GenericConnectorsApi.md#deleteGenericConnector) | **DELETE** /connectors/generic/{id} | Delete connector | +| [**deleteGenericConnectorWithHttpInfo**](GenericConnectorsApi.md#deleteGenericConnectorWithHttpInfo) | **DELETE** /connectors/generic/{id} | Delete connector | +| [**getGenericConnector**](GenericConnectorsApi.md#getGenericConnector) | **GET** /connectors/generic/{id} | Retrieve connector | +| [**getGenericConnectorWithHttpInfo**](GenericConnectorsApi.md#getGenericConnectorWithHttpInfo) | **GET** /connectors/generic/{id} | Retrieve connector | +| [**getGenericConnectors**](GenericConnectorsApi.md#getGenericConnectors) | **GET** /connectors/generic | List connectors | +| [**getGenericConnectorsWithHttpInfo**](GenericConnectorsApi.md#getGenericConnectorsWithHttpInfo) | **GET** /connectors/generic | List connectors | +| [**listGenericConnectorOperations**](GenericConnectorsApi.md#listGenericConnectorOperations) | **GET** /connectors/generic/{id}/operations | List operation IDs assigned to a connector | +| [**listGenericConnectorOperationsWithHttpInfo**](GenericConnectorsApi.md#listGenericConnectorOperationsWithHttpInfo) | **GET** /connectors/generic/{id}/operations | List operation IDs assigned to a connector | +| [**setGenericConnectorOperations**](GenericConnectorsApi.md#setGenericConnectorOperations) | **PUT** /connectors/generic/{id}/operations | Assign operations to a connector | +| [**setGenericConnectorOperationsWithHttpInfo**](GenericConnectorsApi.md#setGenericConnectorOperationsWithHttpInfo) | **PUT** /connectors/generic/{id}/operations | Assign operations to a connector | +| [**updateGenericConnector**](GenericConnectorsApi.md#updateGenericConnector) | **PUT** /connectors/generic/{id} | Update connector | +| [**updateGenericConnectorWithHttpInfo**](GenericConnectorsApi.md#updateGenericConnectorWithHttpInfo) | **PUT** /connectors/generic/{id} | Update connector | + + + +## createGenericConnector + +> GenericConnector createGenericConnector(genericConnector, aid) + +Create connector + +Creates a new connector. + +### Example + +```java +// Import classes: +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.common.ApiException; +import com.thousandeyes.sdk.Configuration; +import com.thousandeyes.sdk.models.*; +import com.thousandeyes.sdk.connectors.GenericConnectorsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.thousandeyes.com/v7"); + + GenericConnectorsApi apiInstance = new GenericConnectorsApi(defaultClient); + GenericConnector genericConnector = new GenericConnector(); // GenericConnector | + String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + try { + GenericConnector result = apiInstance.createGenericConnector(genericConnector, aid); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GenericConnectorsApi#createGenericConnector"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **genericConnector** | [**GenericConnector**](GenericConnector.md)| | | +| **aid** | **String**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] | + +### Return type + +[**GenericConnector**](GenericConnector.md) + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | The created connector. | - | +| **400** | Bad Request | - | +| **401** | Unauthorized | - | +| **403** | Insufficient permissions to query endpoint | - | +| **404** | Not found | - | +| **500** | Internal server error | - | + +## createGenericConnectorWithHttpInfo + +> ApiResponse createGenericConnector createGenericConnectorWithHttpInfo(genericConnector, aid) + +Create connector + +Creates a new connector. + +### Example + +```java +// Import classes: +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.common.ApiException; +import com.thousandeyes.sdk.common.ApiResponse; +import com.thousandeyes.sdk.Configuration; +import com.thousandeyes.sdk.models.*; +import com.thousandeyes.sdk.connectors.GenericConnectorsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.thousandeyes.com/v7"); + + GenericConnectorsApi apiInstance = new GenericConnectorsApi(defaultClient); + GenericConnector genericConnector = new GenericConnector(); // GenericConnector | + String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + try { + ApiResponse response = apiInstance.createGenericConnectorWithHttpInfo(genericConnector, aid); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling GenericConnectorsApi#createGenericConnector"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **genericConnector** | [**GenericConnector**](GenericConnector.md)| | | +| **aid** | **String**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] | + +### Return type + +ApiResponse<[**GenericConnector**](GenericConnector.md)> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | The created connector. | - | +| **400** | Bad Request | - | +| **401** | Unauthorized | - | +| **403** | Insufficient permissions to query endpoint | - | +| **404** | Not found | - | +| **500** | Internal server error | - | + + +## deleteGenericConnector + +> void deleteGenericConnector(id, aid) + +Delete connector + +Deletes the connector specified by ID. + +### Example + +```java +// Import classes: +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.common.ApiException; +import com.thousandeyes.sdk.Configuration; +import com.thousandeyes.sdk.models.*; +import com.thousandeyes.sdk.connectors.GenericConnectorsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.thousandeyes.com/v7"); + + GenericConnectorsApi apiInstance = new GenericConnectorsApi(defaultClient); + String id = "cb1b8033-ea2d-4e9b-a920-fe87850693cf"; // String | The connector ID. + String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + try { + apiInstance.deleteGenericConnector(id, aid); + } catch (ApiException e) { + System.err.println("Exception when calling GenericConnectorsApi#deleteGenericConnector"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The connector ID. | | +| **aid** | **String**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] | + +### Return type + + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/problem+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | +| **400** | Bad Request | - | +| **401** | Unauthorized | - | +| **403** | Insufficient permissions to query endpoint | - | +| **404** | Not found | - | +| **500** | Internal server error | - | + +## deleteGenericConnectorWithHttpInfo + +> ApiResponse deleteGenericConnector deleteGenericConnectorWithHttpInfo(id, aid) + +Delete connector + +Deletes the connector specified by ID. + +### Example + +```java +// Import classes: +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.common.ApiException; +import com.thousandeyes.sdk.common.ApiResponse; +import com.thousandeyes.sdk.Configuration; +import com.thousandeyes.sdk.models.*; +import com.thousandeyes.sdk.connectors.GenericConnectorsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.thousandeyes.com/v7"); + + GenericConnectorsApi apiInstance = new GenericConnectorsApi(defaultClient); + String id = "cb1b8033-ea2d-4e9b-a920-fe87850693cf"; // String | The connector ID. + String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + try { + ApiResponse response = apiInstance.deleteGenericConnectorWithHttpInfo(id, aid); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + } catch (ApiException e) { + System.err.println("Exception when calling GenericConnectorsApi#deleteGenericConnector"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The connector ID. | | +| **aid** | **String**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] | + +### Return type + + +ApiResponse + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/problem+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | +| **400** | Bad Request | - | +| **401** | Unauthorized | - | +| **403** | Insufficient permissions to query endpoint | - | +| **404** | Not found | - | +| **500** | Internal server error | - | + + +## getGenericConnector + +> GenericConnector getGenericConnector(id, aid) + +Retrieve connector + +Retrieves details of a connector by its ID. + +### Example + +```java +// Import classes: +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.common.ApiException; +import com.thousandeyes.sdk.Configuration; +import com.thousandeyes.sdk.models.*; +import com.thousandeyes.sdk.connectors.GenericConnectorsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.thousandeyes.com/v7"); + + GenericConnectorsApi apiInstance = new GenericConnectorsApi(defaultClient); + String id = "cb1b8033-ea2d-4e9b-a920-fe87850693cf"; // String | The connector ID. + String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + try { + GenericConnector result = apiInstance.getGenericConnector(id, aid); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GenericConnectorsApi#getGenericConnector"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The connector ID. | | +| **aid** | **String**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] | + +### Return type + +[**GenericConnector**](GenericConnector.md) + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Connector details. | - | +| **400** | Bad Request | - | +| **401** | Unauthorized | - | +| **403** | Insufficient permissions to query endpoint | - | +| **404** | Not found | - | +| **500** | Internal server error | - | + +## getGenericConnectorWithHttpInfo + +> ApiResponse getGenericConnector getGenericConnectorWithHttpInfo(id, aid) + +Retrieve connector + +Retrieves details of a connector by its ID. + +### Example + +```java +// Import classes: +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.common.ApiException; +import com.thousandeyes.sdk.common.ApiResponse; +import com.thousandeyes.sdk.Configuration; +import com.thousandeyes.sdk.models.*; +import com.thousandeyes.sdk.connectors.GenericConnectorsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.thousandeyes.com/v7"); + + GenericConnectorsApi apiInstance = new GenericConnectorsApi(defaultClient); + String id = "cb1b8033-ea2d-4e9b-a920-fe87850693cf"; // String | The connector ID. + String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + try { + ApiResponse response = apiInstance.getGenericConnectorWithHttpInfo(id, aid); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling GenericConnectorsApi#getGenericConnector"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The connector ID. | | +| **aid** | **String**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] | + +### Return type + +ApiResponse<[**GenericConnector**](GenericConnector.md)> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Connector details. | - | +| **400** | Bad Request | - | +| **401** | Unauthorized | - | +| **403** | Insufficient permissions to query endpoint | - | +| **404** | Not found | - | +| **500** | Internal server error | - | + + +## getGenericConnectors + +> GenericConnectors getGenericConnectors(aid) + +List connectors + +Returns a list of connectors in the specified account group. If no account group is specified, the user’s default account group is used. + +### Example + +```java +// Import classes: +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.common.ApiException; +import com.thousandeyes.sdk.Configuration; +import com.thousandeyes.sdk.models.*; +import com.thousandeyes.sdk.connectors.GenericConnectorsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.thousandeyes.com/v7"); + + GenericConnectorsApi apiInstance = new GenericConnectorsApi(defaultClient); + String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + try { + GenericConnectors result = apiInstance.getGenericConnectors(aid); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GenericConnectorsApi#getGenericConnectors"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **aid** | **String**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] | + +### Return type + +[**GenericConnectors**](GenericConnectors.md) + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | A list of connectors. | - | +| **400** | Bad Request | - | +| **401** | Unauthorized | - | +| **403** | Insufficient permissions to query endpoint | - | +| **404** | Not found | - | +| **500** | Internal server error | - | + +## getGenericConnectorsWithHttpInfo + +> ApiResponse getGenericConnectors getGenericConnectorsWithHttpInfo(aid) + +List connectors + +Returns a list of connectors in the specified account group. If no account group is specified, the user’s default account group is used. + +### Example + +```java +// Import classes: +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.common.ApiException; +import com.thousandeyes.sdk.common.ApiResponse; +import com.thousandeyes.sdk.Configuration; +import com.thousandeyes.sdk.models.*; +import com.thousandeyes.sdk.connectors.GenericConnectorsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.thousandeyes.com/v7"); + + GenericConnectorsApi apiInstance = new GenericConnectorsApi(defaultClient); + String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + try { + ApiResponse response = apiInstance.getGenericConnectorsWithHttpInfo(aid); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling GenericConnectorsApi#getGenericConnectors"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **aid** | **String**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] | + +### Return type + +ApiResponse<[**GenericConnectors**](GenericConnectors.md)> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | A list of connectors. | - | +| **400** | Bad Request | - | +| **401** | Unauthorized | - | +| **403** | Insufficient permissions to query endpoint | - | +| **404** | Not found | - | +| **500** | Internal server error | - | + + +## listGenericConnectorOperations + +> Assignments listGenericConnectorOperations(id, aid) + +List operation IDs assigned to a connector + +Returns a list of operation IDs assigned to a connector. + +### Example + +```java +// Import classes: +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.common.ApiException; +import com.thousandeyes.sdk.Configuration; +import com.thousandeyes.sdk.models.*; +import com.thousandeyes.sdk.connectors.GenericConnectorsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.thousandeyes.com/v7"); + + GenericConnectorsApi apiInstance = new GenericConnectorsApi(defaultClient); + String id = "cb1b8033-ea2d-4e9b-a920-fe87850693cf"; // String | The connector ID. + String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + try { + Assignments result = apiInstance.listGenericConnectorOperations(id, aid); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GenericConnectorsApi#listGenericConnectorOperations"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The connector ID. | | +| **aid** | **String**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] | + +### Return type + +[**Assignments**](Assignments.md) + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | A list of assigned operation IDs. | - | +| **400** | Bad Request | - | +| **401** | Unauthorized | - | +| **403** | Insufficient permissions to query endpoint | - | +| **404** | Not found | - | +| **500** | Internal server error | - | + +## listGenericConnectorOperationsWithHttpInfo + +> ApiResponse listGenericConnectorOperations listGenericConnectorOperationsWithHttpInfo(id, aid) + +List operation IDs assigned to a connector + +Returns a list of operation IDs assigned to a connector. + +### Example + +```java +// Import classes: +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.common.ApiException; +import com.thousandeyes.sdk.common.ApiResponse; +import com.thousandeyes.sdk.Configuration; +import com.thousandeyes.sdk.models.*; +import com.thousandeyes.sdk.connectors.GenericConnectorsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.thousandeyes.com/v7"); + + GenericConnectorsApi apiInstance = new GenericConnectorsApi(defaultClient); + String id = "cb1b8033-ea2d-4e9b-a920-fe87850693cf"; // String | The connector ID. + String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + try { + ApiResponse response = apiInstance.listGenericConnectorOperationsWithHttpInfo(id, aid); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling GenericConnectorsApi#listGenericConnectorOperations"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The connector ID. | | +| **aid** | **String**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] | + +### Return type + +ApiResponse<[**Assignments**](Assignments.md)> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | A list of assigned operation IDs. | - | +| **400** | Bad Request | - | +| **401** | Unauthorized | - | +| **403** | Insufficient permissions to query endpoint | - | +| **404** | Not found | - | +| **500** | Internal server error | - | + + +## setGenericConnectorOperations + +> Assignments setGenericConnectorOperations(id, requestBody, aid) + +Assign operations to a connector + +Assigns operations to a connector. This replaces any existing assignments. + +### Example + +```java +// Import classes: +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.common.ApiException; +import com.thousandeyes.sdk.Configuration; +import com.thousandeyes.sdk.models.*; +import com.thousandeyes.sdk.connectors.GenericConnectorsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.thousandeyes.com/v7"); + + GenericConnectorsApi apiInstance = new GenericConnectorsApi(defaultClient); + String id = "cb1b8033-ea2d-4e9b-a920-fe87850693cf"; // String | The connector ID. + List requestBody = ["ca39314d-eb4f-496f-9435-b5d20b1bfbff","a32cfbab-32f6-41d8-9027-7127cba965dd"]; // List | List of operation IDs to assign to the connector. + String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + try { + Assignments result = apiInstance.setGenericConnectorOperations(id, requestBody, aid); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GenericConnectorsApi#setGenericConnectorOperations"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The connector ID. | | +| **requestBody** | [**List<String>**](String.md)| List of operation IDs to assign to the connector. | | +| **aid** | **String**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] | + +### Return type + +[**Assignments**](Assignments.md) + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Operations assigned successfully. | - | +| **400** | Bad Request | - | +| **401** | Unauthorized | - | +| **403** | Insufficient permissions to query endpoint | - | +| **404** | Not found | - | +| **500** | Internal server error | - | + +## setGenericConnectorOperationsWithHttpInfo + +> ApiResponse setGenericConnectorOperations setGenericConnectorOperationsWithHttpInfo(id, requestBody, aid) + +Assign operations to a connector + +Assigns operations to a connector. This replaces any existing assignments. + +### Example + +```java +// Import classes: +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.common.ApiException; +import com.thousandeyes.sdk.common.ApiResponse; +import com.thousandeyes.sdk.Configuration; +import com.thousandeyes.sdk.models.*; +import com.thousandeyes.sdk.connectors.GenericConnectorsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.thousandeyes.com/v7"); + + GenericConnectorsApi apiInstance = new GenericConnectorsApi(defaultClient); + String id = "cb1b8033-ea2d-4e9b-a920-fe87850693cf"; // String | The connector ID. + List requestBody = ["ca39314d-eb4f-496f-9435-b5d20b1bfbff","a32cfbab-32f6-41d8-9027-7127cba965dd"]; // List | List of operation IDs to assign to the connector. + String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + try { + ApiResponse response = apiInstance.setGenericConnectorOperationsWithHttpInfo(id, requestBody, aid); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling GenericConnectorsApi#setGenericConnectorOperations"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The connector ID. | | +| **requestBody** | [**List<String>**](String.md)| List of operation IDs to assign to the connector. | | +| **aid** | **String**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] | + +### Return type + +ApiResponse<[**Assignments**](Assignments.md)> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Operations assigned successfully. | - | +| **400** | Bad Request | - | +| **401** | Unauthorized | - | +| **403** | Insufficient permissions to query endpoint | - | +| **404** | Not found | - | +| **500** | Internal server error | - | + + +## updateGenericConnector + +> GenericConnector updateGenericConnector(id, genericConnector, aid) + +Update connector + +Updates the connector specified by ID. + +### Example + +```java +// Import classes: +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.common.ApiException; +import com.thousandeyes.sdk.Configuration; +import com.thousandeyes.sdk.models.*; +import com.thousandeyes.sdk.connectors.GenericConnectorsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.thousandeyes.com/v7"); + + GenericConnectorsApi apiInstance = new GenericConnectorsApi(defaultClient); + String id = "cb1b8033-ea2d-4e9b-a920-fe87850693cf"; // String | The connector ID. + GenericConnector genericConnector = new GenericConnector(); // GenericConnector | + String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + try { + GenericConnector result = apiInstance.updateGenericConnector(id, genericConnector, aid); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling GenericConnectorsApi#updateGenericConnector"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The connector ID. | | +| **genericConnector** | [**GenericConnector**](GenericConnector.md)| | | +| **aid** | **String**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] | + +### Return type + +[**GenericConnector**](GenericConnector.md) + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The updated connector. | - | +| **400** | Bad Request | - | +| **401** | Unauthorized | - | +| **403** | Insufficient permissions to query endpoint | - | +| **404** | Not found | - | +| **500** | Internal server error | - | + +## updateGenericConnectorWithHttpInfo + +> ApiResponse updateGenericConnector updateGenericConnectorWithHttpInfo(id, genericConnector, aid) + +Update connector + +Updates the connector specified by ID. + +### Example + +```java +// Import classes: +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.common.ApiException; +import com.thousandeyes.sdk.common.ApiResponse; +import com.thousandeyes.sdk.Configuration; +import com.thousandeyes.sdk.models.*; +import com.thousandeyes.sdk.connectors.GenericConnectorsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.thousandeyes.com/v7"); + + GenericConnectorsApi apiInstance = new GenericConnectorsApi(defaultClient); + String id = "cb1b8033-ea2d-4e9b-a920-fe87850693cf"; // String | The connector ID. + GenericConnector genericConnector = new GenericConnector(); // GenericConnector | + String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + try { + ApiResponse response = apiInstance.updateGenericConnectorWithHttpInfo(id, genericConnector, aid); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling GenericConnectorsApi#updateGenericConnector"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The connector ID. | | +| **genericConnector** | [**GenericConnector**](GenericConnector.md)| | | +| **aid** | **String**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] | + +### Return type + +ApiResponse<[**GenericConnector**](GenericConnector.md)> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The updated connector. | - | +| **400** | Bad Request | - | +| **401** | Unauthorized | - | +| **403** | Insufficient permissions to query endpoint | - | +| **404** | Not found | - | +| **500** | Internal server error | - | + diff --git a/connectors/docs/OperationConnectorsApi.md b/connectors/docs/OperationConnectorsApi.md new file mode 100644 index 000000000..8fc66d4ec --- /dev/null +++ b/connectors/docs/OperationConnectorsApi.md @@ -0,0 +1,320 @@ +# OperationConnectorsApi + +All URIs are relative to *https://api.thousandeyes.com/v7* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getOperationConnectors**](OperationConnectorsApi.md#getOperationConnectors) | **GET** /operations/{type}/{id}/connectors | Retrieve connectors assigned to an operation | +| [**getOperationConnectorsWithHttpInfo**](OperationConnectorsApi.md#getOperationConnectorsWithHttpInfo) | **GET** /operations/{type}/{id}/connectors | Retrieve connectors assigned to an operation | +| [**setOperationConnectors**](OperationConnectorsApi.md#setOperationConnectors) | **PUT** /operations/{type}/{id}/connectors | Assign connectors to an operation | +| [**setOperationConnectorsWithHttpInfo**](OperationConnectorsApi.md#setOperationConnectorsWithHttpInfo) | **PUT** /operations/{type}/{id}/connectors | Assign connectors to an operation | + + + +## getOperationConnectors + +> Assignments getOperationConnectors(type, id, aid) + +Retrieve connectors assigned to an operation + +Returns a list of connectors assigned to a specific operation. + +### Example + +```java +// Import classes: +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.common.ApiException; +import com.thousandeyes.sdk.Configuration; +import com.thousandeyes.sdk.models.*; +import com.thousandeyes.sdk.connectors.OperationConnectorsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.thousandeyes.com/v7"); + + OperationConnectorsApi apiInstance = new OperationConnectorsApi(defaultClient); + String type = "webhooks"; // String | The operation type. + String id = "cb1b8033-ea2d-4e9b-a920-fe87850693cf"; // String | The operation ID. + String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + try { + Assignments result = apiInstance.getOperationConnectors(type, id, aid); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OperationConnectorsApi#getOperationConnectors"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **type** | **String**| The operation type. | | +| **id** | **String**| The operation ID. | | +| **aid** | **String**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] | + +### Return type + +[**Assignments**](Assignments.md) + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/problem+json, application/hal+json, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **404** | Not found | - | +| **200** | A list of assigned connectors. | - | +| **400** | Bad Request | - | +| **401** | Unauthorized | - | +| **403** | Insufficient permissions to query endpoint | - | +| **500** | Internal server error | - | + +## getOperationConnectorsWithHttpInfo + +> ApiResponse getOperationConnectors getOperationConnectorsWithHttpInfo(type, id, aid) + +Retrieve connectors assigned to an operation + +Returns a list of connectors assigned to a specific operation. + +### Example + +```java +// Import classes: +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.common.ApiException; +import com.thousandeyes.sdk.common.ApiResponse; +import com.thousandeyes.sdk.Configuration; +import com.thousandeyes.sdk.models.*; +import com.thousandeyes.sdk.connectors.OperationConnectorsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.thousandeyes.com/v7"); + + OperationConnectorsApi apiInstance = new OperationConnectorsApi(defaultClient); + String type = "webhooks"; // String | The operation type. + String id = "cb1b8033-ea2d-4e9b-a920-fe87850693cf"; // String | The operation ID. + String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + try { + ApiResponse response = apiInstance.getOperationConnectorsWithHttpInfo(type, id, aid); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling OperationConnectorsApi#getOperationConnectors"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **type** | **String**| The operation type. | | +| **id** | **String**| The operation ID. | | +| **aid** | **String**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] | + +### Return type + +ApiResponse<[**Assignments**](Assignments.md)> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/problem+json, application/hal+json, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **404** | Not found | - | +| **200** | A list of assigned connectors. | - | +| **400** | Bad Request | - | +| **401** | Unauthorized | - | +| **403** | Insufficient permissions to query endpoint | - | +| **500** | Internal server error | - | + + +## setOperationConnectors + +> Assignments setOperationConnectors(type, id, requestBody, aid) + +Assign connectors to an operation + +Assigns one or more connectors to an operation. This replaces any existing assignments. + +### Example + +```java +// Import classes: +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.common.ApiException; +import com.thousandeyes.sdk.Configuration; +import com.thousandeyes.sdk.models.*; +import com.thousandeyes.sdk.connectors.OperationConnectorsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.thousandeyes.com/v7"); + + OperationConnectorsApi apiInstance = new OperationConnectorsApi(defaultClient); + String type = "webhooks"; // String | The operation type. + String id = "cb1b8033-ea2d-4e9b-a920-fe87850693cf"; // String | The operation ID. + List requestBody = ["ca39314d-eb4f-496f-9435-b5d20b1bfbff"]; // List | List of connector IDs to assign to the operation. + String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + try { + Assignments result = apiInstance.setOperationConnectors(type, id, requestBody, aid); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OperationConnectorsApi#setOperationConnectors"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **type** | **String**| The operation type. | | +| **id** | **String**| The operation ID. | | +| **requestBody** | [**List<String>**](String.md)| List of connector IDs to assign to the operation. | | +| **aid** | **String**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] | + +### Return type + +[**Assignments**](Assignments.md) + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/problem+json, application/hal+json, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **404** | Not found | - | +| **200** | Operation Connectors updated successfully. | - | +| **400** | Bad Request | - | +| **401** | Unauthorized | - | +| **403** | Insufficient permissions to query endpoint | - | +| **500** | Internal server error | - | + +## setOperationConnectorsWithHttpInfo + +> ApiResponse setOperationConnectors setOperationConnectorsWithHttpInfo(type, id, requestBody, aid) + +Assign connectors to an operation + +Assigns one or more connectors to an operation. This replaces any existing assignments. + +### Example + +```java +// Import classes: +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.common.ApiException; +import com.thousandeyes.sdk.common.ApiResponse; +import com.thousandeyes.sdk.Configuration; +import com.thousandeyes.sdk.models.*; +import com.thousandeyes.sdk.connectors.OperationConnectorsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.thousandeyes.com/v7"); + + OperationConnectorsApi apiInstance = new OperationConnectorsApi(defaultClient); + String type = "webhooks"; // String | The operation type. + String id = "cb1b8033-ea2d-4e9b-a920-fe87850693cf"; // String | The operation ID. + List requestBody = ["ca39314d-eb4f-496f-9435-b5d20b1bfbff"]; // List | List of connector IDs to assign to the operation. + String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + try { + ApiResponse response = apiInstance.setOperationConnectorsWithHttpInfo(type, id, requestBody, aid); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling OperationConnectorsApi#setOperationConnectors"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **type** | **String**| The operation type. | | +| **id** | **String**| The operation ID. | | +| **requestBody** | [**List<String>**](String.md)| List of connector IDs to assign to the operation. | | +| **aid** | **String**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] | + +### Return type + +ApiResponse<[**Assignments**](Assignments.md)> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/problem+json, application/hal+json, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **404** | Not found | - | +| **200** | Operation Connectors updated successfully. | - | +| **400** | Bad Request | - | +| **401** | Unauthorized | - | +| **403** | Insufficient permissions to query endpoint | - | +| **500** | Internal server error | - | + diff --git a/connectors/docs/WebhookOperationsApi.md b/connectors/docs/WebhookOperationsApi.md new file mode 100644 index 000000000..760536d58 --- /dev/null +++ b/connectors/docs/WebhookOperationsApi.md @@ -0,0 +1,756 @@ +# WebhookOperationsApi + +All URIs are relative to *https://api.thousandeyes.com/v7* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createWebhookOperation**](WebhookOperationsApi.md#createWebhookOperation) | **POST** /operations/webhooks | Create webhook operation | +| [**createWebhookOperationWithHttpInfo**](WebhookOperationsApi.md#createWebhookOperationWithHttpInfo) | **POST** /operations/webhooks | Create webhook operation | +| [**deleteWebhookOperation**](WebhookOperationsApi.md#deleteWebhookOperation) | **DELETE** /operations/webhooks/{id} | Delete webhook operation | +| [**deleteWebhookOperationWithHttpInfo**](WebhookOperationsApi.md#deleteWebhookOperationWithHttpInfo) | **DELETE** /operations/webhooks/{id} | Delete webhook operation | +| [**getWebhookOperation**](WebhookOperationsApi.md#getWebhookOperation) | **GET** /operations/webhooks/{id} | Retrieve webhook operation | +| [**getWebhookOperationWithHttpInfo**](WebhookOperationsApi.md#getWebhookOperationWithHttpInfo) | **GET** /operations/webhooks/{id} | Retrieve webhook operation | +| [**getWebhookOperations**](WebhookOperationsApi.md#getWebhookOperations) | **GET** /operations/webhooks | List webhook operations | +| [**getWebhookOperationsWithHttpInfo**](WebhookOperationsApi.md#getWebhookOperationsWithHttpInfo) | **GET** /operations/webhooks | List webhook operations | +| [**updateWebhookOperation**](WebhookOperationsApi.md#updateWebhookOperation) | **PUT** /operations/webhooks/{id} | Update webhook operation | +| [**updateWebhookOperationWithHttpInfo**](WebhookOperationsApi.md#updateWebhookOperationWithHttpInfo) | **PUT** /operations/webhooks/{id} | Update webhook operation | + + + +## createWebhookOperation + +> WebhookOperation createWebhookOperation(webhookOperation, aid) + +Create webhook operation + +Creates a new webhook operation. + +### Example + +```java +// Import classes: +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.common.ApiException; +import com.thousandeyes.sdk.Configuration; +import com.thousandeyes.sdk.models.*; +import com.thousandeyes.sdk.connectors.WebhookOperationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.thousandeyes.com/v7"); + + WebhookOperationsApi apiInstance = new WebhookOperationsApi(defaultClient); + WebhookOperation webhookOperation = new WebhookOperation(); // WebhookOperation | + String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + try { + WebhookOperation result = apiInstance.createWebhookOperation(webhookOperation, aid); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling WebhookOperationsApi#createWebhookOperation"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **webhookOperation** | [**WebhookOperation**](WebhookOperation.md)| | | +| **aid** | **String**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] | + +### Return type + +[**WebhookOperation**](WebhookOperation.md) + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | The created webhook operation. | - | +| **400** | Bad Request | - | +| **401** | Unauthorized | - | +| **403** | Insufficient permissions to query endpoint | - | +| **404** | Not found | - | +| **500** | Internal server error | - | + +## createWebhookOperationWithHttpInfo + +> ApiResponse createWebhookOperation createWebhookOperationWithHttpInfo(webhookOperation, aid) + +Create webhook operation + +Creates a new webhook operation. + +### Example + +```java +// Import classes: +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.common.ApiException; +import com.thousandeyes.sdk.common.ApiResponse; +import com.thousandeyes.sdk.Configuration; +import com.thousandeyes.sdk.models.*; +import com.thousandeyes.sdk.connectors.WebhookOperationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.thousandeyes.com/v7"); + + WebhookOperationsApi apiInstance = new WebhookOperationsApi(defaultClient); + WebhookOperation webhookOperation = new WebhookOperation(); // WebhookOperation | + String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + try { + ApiResponse response = apiInstance.createWebhookOperationWithHttpInfo(webhookOperation, aid); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling WebhookOperationsApi#createWebhookOperation"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **webhookOperation** | [**WebhookOperation**](WebhookOperation.md)| | | +| **aid** | **String**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] | + +### Return type + +ApiResponse<[**WebhookOperation**](WebhookOperation.md)> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | The created webhook operation. | - | +| **400** | Bad Request | - | +| **401** | Unauthorized | - | +| **403** | Insufficient permissions to query endpoint | - | +| **404** | Not found | - | +| **500** | Internal server error | - | + + +## deleteWebhookOperation + +> void deleteWebhookOperation(id, aid) + +Delete webhook operation + +Deletes the webhook operation specified by ID. + +### Example + +```java +// Import classes: +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.common.ApiException; +import com.thousandeyes.sdk.Configuration; +import com.thousandeyes.sdk.models.*; +import com.thousandeyes.sdk.connectors.WebhookOperationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.thousandeyes.com/v7"); + + WebhookOperationsApi apiInstance = new WebhookOperationsApi(defaultClient); + String id = "cb1b8033-ea2d-4e9b-a920-fe87850693cf"; // String | The operation ID. + String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + try { + apiInstance.deleteWebhookOperation(id, aid); + } catch (ApiException e) { + System.err.println("Exception when calling WebhookOperationsApi#deleteWebhookOperation"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The operation ID. | | +| **aid** | **String**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] | + +### Return type + + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/problem+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | +| **400** | Bad Request | - | +| **401** | Unauthorized | - | +| **403** | Insufficient permissions to query endpoint | - | +| **404** | Not found | - | +| **500** | Internal server error | - | + +## deleteWebhookOperationWithHttpInfo + +> ApiResponse deleteWebhookOperation deleteWebhookOperationWithHttpInfo(id, aid) + +Delete webhook operation + +Deletes the webhook operation specified by ID. + +### Example + +```java +// Import classes: +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.common.ApiException; +import com.thousandeyes.sdk.common.ApiResponse; +import com.thousandeyes.sdk.Configuration; +import com.thousandeyes.sdk.models.*; +import com.thousandeyes.sdk.connectors.WebhookOperationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.thousandeyes.com/v7"); + + WebhookOperationsApi apiInstance = new WebhookOperationsApi(defaultClient); + String id = "cb1b8033-ea2d-4e9b-a920-fe87850693cf"; // String | The operation ID. + String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + try { + ApiResponse response = apiInstance.deleteWebhookOperationWithHttpInfo(id, aid); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + } catch (ApiException e) { + System.err.println("Exception when calling WebhookOperationsApi#deleteWebhookOperation"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The operation ID. | | +| **aid** | **String**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] | + +### Return type + + +ApiResponse + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/problem+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | +| **400** | Bad Request | - | +| **401** | Unauthorized | - | +| **403** | Insufficient permissions to query endpoint | - | +| **404** | Not found | - | +| **500** | Internal server error | - | + + +## getWebhookOperation + +> WebhookOperation getWebhookOperation(id, aid) + +Retrieve webhook operation + +Retrieves details of a webhook operation by its ID. + +### Example + +```java +// Import classes: +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.common.ApiException; +import com.thousandeyes.sdk.Configuration; +import com.thousandeyes.sdk.models.*; +import com.thousandeyes.sdk.connectors.WebhookOperationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.thousandeyes.com/v7"); + + WebhookOperationsApi apiInstance = new WebhookOperationsApi(defaultClient); + String id = "cb1b8033-ea2d-4e9b-a920-fe87850693cf"; // String | The operation ID. + String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + try { + WebhookOperation result = apiInstance.getWebhookOperation(id, aid); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling WebhookOperationsApi#getWebhookOperation"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The operation ID. | | +| **aid** | **String**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] | + +### Return type + +[**WebhookOperation**](WebhookOperation.md) + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Webhook operation with the given id. | - | +| **400** | Bad Request | - | +| **401** | Unauthorized | - | +| **403** | Insufficient permissions to query endpoint | - | +| **404** | Not found | - | +| **500** | Internal server error | - | + +## getWebhookOperationWithHttpInfo + +> ApiResponse getWebhookOperation getWebhookOperationWithHttpInfo(id, aid) + +Retrieve webhook operation + +Retrieves details of a webhook operation by its ID. + +### Example + +```java +// Import classes: +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.common.ApiException; +import com.thousandeyes.sdk.common.ApiResponse; +import com.thousandeyes.sdk.Configuration; +import com.thousandeyes.sdk.models.*; +import com.thousandeyes.sdk.connectors.WebhookOperationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.thousandeyes.com/v7"); + + WebhookOperationsApi apiInstance = new WebhookOperationsApi(defaultClient); + String id = "cb1b8033-ea2d-4e9b-a920-fe87850693cf"; // String | The operation ID. + String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + try { + ApiResponse response = apiInstance.getWebhookOperationWithHttpInfo(id, aid); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling WebhookOperationsApi#getWebhookOperation"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The operation ID. | | +| **aid** | **String**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] | + +### Return type + +ApiResponse<[**WebhookOperation**](WebhookOperation.md)> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Webhook operation with the given id. | - | +| **400** | Bad Request | - | +| **401** | Unauthorized | - | +| **403** | Insufficient permissions to query endpoint | - | +| **404** | Not found | - | +| **500** | Internal server error | - | + + +## getWebhookOperations + +> WebhookOperations getWebhookOperations(aid) + +List webhook operations + +Returns a list of webhook operations in the specified account group. If no account group is specified, the user’s default account group is used. + +### Example + +```java +// Import classes: +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.common.ApiException; +import com.thousandeyes.sdk.Configuration; +import com.thousandeyes.sdk.models.*; +import com.thousandeyes.sdk.connectors.WebhookOperationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.thousandeyes.com/v7"); + + WebhookOperationsApi apiInstance = new WebhookOperationsApi(defaultClient); + String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + try { + WebhookOperations result = apiInstance.getWebhookOperations(aid); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling WebhookOperationsApi#getWebhookOperations"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **aid** | **String**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] | + +### Return type + +[**WebhookOperations**](WebhookOperations.md) + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | A list of webhook operations. | - | +| **400** | Bad Request | - | +| **401** | Unauthorized | - | +| **403** | Insufficient permissions to query endpoint | - | +| **404** | Not found | - | +| **500** | Internal server error | - | + +## getWebhookOperationsWithHttpInfo + +> ApiResponse getWebhookOperations getWebhookOperationsWithHttpInfo(aid) + +List webhook operations + +Returns a list of webhook operations in the specified account group. If no account group is specified, the user’s default account group is used. + +### Example + +```java +// Import classes: +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.common.ApiException; +import com.thousandeyes.sdk.common.ApiResponse; +import com.thousandeyes.sdk.Configuration; +import com.thousandeyes.sdk.models.*; +import com.thousandeyes.sdk.connectors.WebhookOperationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.thousandeyes.com/v7"); + + WebhookOperationsApi apiInstance = new WebhookOperationsApi(defaultClient); + String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + try { + ApiResponse response = apiInstance.getWebhookOperationsWithHttpInfo(aid); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling WebhookOperationsApi#getWebhookOperations"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **aid** | **String**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] | + +### Return type + +ApiResponse<[**WebhookOperations**](WebhookOperations.md)> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | A list of webhook operations. | - | +| **400** | Bad Request | - | +| **401** | Unauthorized | - | +| **403** | Insufficient permissions to query endpoint | - | +| **404** | Not found | - | +| **500** | Internal server error | - | + + +## updateWebhookOperation + +> WebhookOperation updateWebhookOperation(id, webhookOperation, aid) + +Update webhook operation + +Updates the webhook operation specified by ID. + +### Example + +```java +// Import classes: +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.common.ApiException; +import com.thousandeyes.sdk.Configuration; +import com.thousandeyes.sdk.models.*; +import com.thousandeyes.sdk.connectors.WebhookOperationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.thousandeyes.com/v7"); + + WebhookOperationsApi apiInstance = new WebhookOperationsApi(defaultClient); + String id = "cb1b8033-ea2d-4e9b-a920-fe87850693cf"; // String | The operation ID. + WebhookOperation webhookOperation = new WebhookOperation(); // WebhookOperation | + String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + try { + WebhookOperation result = apiInstance.updateWebhookOperation(id, webhookOperation, aid); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling WebhookOperationsApi#updateWebhookOperation"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The operation ID. | | +| **webhookOperation** | [**WebhookOperation**](WebhookOperation.md)| | | +| **aid** | **String**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] | + +### Return type + +[**WebhookOperation**](WebhookOperation.md) + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The updated webhook operation. | - | +| **400** | Bad Request | - | +| **401** | Unauthorized | - | +| **403** | Insufficient permissions to query endpoint | - | +| **404** | Not found | - | +| **500** | Internal server error | - | + +## updateWebhookOperationWithHttpInfo + +> ApiResponse updateWebhookOperation updateWebhookOperationWithHttpInfo(id, webhookOperation, aid) + +Update webhook operation + +Updates the webhook operation specified by ID. + +### Example + +```java +// Import classes: +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.common.ApiException; +import com.thousandeyes.sdk.common.ApiResponse; +import com.thousandeyes.sdk.Configuration; +import com.thousandeyes.sdk.models.*; +import com.thousandeyes.sdk.connectors.WebhookOperationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.thousandeyes.com/v7"); + + WebhookOperationsApi apiInstance = new WebhookOperationsApi(defaultClient); + String id = "cb1b8033-ea2d-4e9b-a920-fe87850693cf"; // String | The operation ID. + WebhookOperation webhookOperation = new WebhookOperation(); // WebhookOperation | + String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + try { + ApiResponse response = apiInstance.updateWebhookOperationWithHttpInfo(id, webhookOperation, aid); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling WebhookOperationsApi#updateWebhookOperation"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The operation ID. | | +| **webhookOperation** | [**WebhookOperation**](WebhookOperation.md)| | | +| **aid** | **String**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] | + +### Return type + +ApiResponse<[**WebhookOperation**](WebhookOperation.md)> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The updated webhook operation. | - | +| **400** | Bad Request | - | +| **401** | Unauthorized | - | +| **403** | Insufficient permissions to query endpoint | - | +| **404** | Not found | - | +| **500** | Internal server error | - | + diff --git a/connectors/src/main/java/com/thousandeyes/sdk/connectors/GenericConnectorsApi.java b/connectors/src/main/java/com/thousandeyes/sdk/connectors/GenericConnectorsApi.java new file mode 100644 index 000000000..981df3e75 --- /dev/null +++ b/connectors/src/main/java/com/thousandeyes/sdk/connectors/GenericConnectorsApi.java @@ -0,0 +1,457 @@ +/* + * Integrations API + * Manage connectors and operations. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.thousandeyes.sdk.connectors; + +import static com.thousandeyes.sdk.client.RequestUtil.parameterToPairs; +import static com.thousandeyes.sdk.client.RequestUtil.urlEncode; + +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.client.ApiException; +import com.thousandeyes.sdk.client.ApiResponse; +import com.thousandeyes.sdk.client.ApiRequest; +import com.thousandeyes.sdk.utils.Config; +import org.apache.commons.lang3.tuple.Pair; +import org.apache.commons.lang3.reflect.TypeUtils; +import com.thousandeyes.sdk.connectors.model.Assignments; +import com.thousandeyes.sdk.connectors.model.Error; +import com.thousandeyes.sdk.connectors.model.GenericConnector; +import com.thousandeyes.sdk.connectors.model.GenericConnectors; +import com.thousandeyes.sdk.connectors.model.UnauthorizedError; +import com.thousandeyes.sdk.connectors.model.ValidationError; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "com.thousandeyes.api.codegen.ThousandeyesJavaGenerator") +public class GenericConnectorsApi { + private final ApiClient apiClient; + + public GenericConnectorsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Create connector + * Creates a new connector. + * @param genericConnector (required) + * @param aid A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) + * @return GenericConnector + * @throws ApiException if fails to make API call + */ + public GenericConnector createGenericConnector(GenericConnector genericConnector, String aid) throws ApiException { + ApiResponse response = createGenericConnectorWithHttpInfo(genericConnector, aid); + return response.getData(); + } + + /** + * Create connector + * Creates a new connector. + * @param genericConnector (required) + * @param aid A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) + * @return ApiResponse<GenericConnector> + * @throws ApiException if fails to make API call + */ + public ApiResponse createGenericConnectorWithHttpInfo(GenericConnector genericConnector, String aid) throws ApiException { + createGenericConnectorValidateRequest(genericConnector); + + var requestBuilder = createGenericConnectorRequestBuilder(genericConnector, aid); + + return apiClient.send(requestBuilder.build(), GenericConnector.class); + } + + private void createGenericConnectorValidateRequest(GenericConnector genericConnector) throws ApiException { + // verify the required parameter 'genericConnector' is set + if (genericConnector == null) { + throw new ApiException(400, "Missing the required parameter 'genericConnector' when calling createGenericConnector"); + } + } + + private ApiRequest.ApiRequestBuilder createGenericConnectorRequestBuilder(GenericConnector genericConnector, String aid) throws ApiException { + ApiRequest.ApiRequestBuilder requestBuilder = ApiRequest.builder() + .method("POST"); + + String path = "/connectors/generic"; + requestBuilder.path(path); + + List> localVarQueryParams = new ArrayList<>(); + localVarQueryParams.addAll(parameterToPairs("aid", aid)); + + if (!localVarQueryParams.isEmpty()) { + requestBuilder.queryParams(localVarQueryParams); + } + + requestBuilder.header("Content-Type", List.of("application/json")); + requestBuilder.header("Accept", List.of("application/hal+json, application/json, application/problem+json")); + requestBuilder.header("User-Agent", List.of(Config.USER_AGENT)); + requestBuilder.requestBody(genericConnector); + return requestBuilder; + } + /** + * Delete connector + * Deletes the connector specified by ID. + * @param id The connector ID. (required) + * @param aid A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) + * @throws ApiException if fails to make API call + */ + public void deleteGenericConnector(String id, String aid) throws ApiException { + deleteGenericConnectorWithHttpInfo(id, aid); + } + + /** + * Delete connector + * Deletes the connector specified by ID. + * @param id The connector ID. (required) + * @param aid A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse deleteGenericConnectorWithHttpInfo(String id, String aid) throws ApiException { + deleteGenericConnectorValidateRequest(id); + + var requestBuilder = deleteGenericConnectorRequestBuilder(id, aid); + + return apiClient.send(requestBuilder.build(), Void.class); + } + + private void deleteGenericConnectorValidateRequest(String id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling deleteGenericConnector"); + } + } + + private ApiRequest.ApiRequestBuilder deleteGenericConnectorRequestBuilder(String id, String aid) throws ApiException { + ApiRequest.ApiRequestBuilder requestBuilder = ApiRequest.builder() + .method("DELETE"); + + String path = "/connectors/generic/{id}" + .replace("{id}", urlEncode(id.toString())); + requestBuilder.path(path); + + List> localVarQueryParams = new ArrayList<>(); + localVarQueryParams.addAll(parameterToPairs("aid", aid)); + + if (!localVarQueryParams.isEmpty()) { + requestBuilder.queryParams(localVarQueryParams); + } + + requestBuilder.header("Accept", List.of("application/json, application/problem+json")); + requestBuilder.header("User-Agent", List.of(Config.USER_AGENT)); + return requestBuilder; + } + /** + * Retrieve connector + * Retrieves details of a connector by its ID. + * @param id The connector ID. (required) + * @param aid A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) + * @return GenericConnector + * @throws ApiException if fails to make API call + */ + public GenericConnector getGenericConnector(String id, String aid) throws ApiException { + ApiResponse response = getGenericConnectorWithHttpInfo(id, aid); + return response.getData(); + } + + /** + * Retrieve connector + * Retrieves details of a connector by its ID. + * @param id The connector ID. (required) + * @param aid A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) + * @return ApiResponse<GenericConnector> + * @throws ApiException if fails to make API call + */ + public ApiResponse getGenericConnectorWithHttpInfo(String id, String aid) throws ApiException { + getGenericConnectorValidateRequest(id); + + var requestBuilder = getGenericConnectorRequestBuilder(id, aid); + + return apiClient.send(requestBuilder.build(), GenericConnector.class); + } + + private void getGenericConnectorValidateRequest(String id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling getGenericConnector"); + } + } + + private ApiRequest.ApiRequestBuilder getGenericConnectorRequestBuilder(String id, String aid) throws ApiException { + ApiRequest.ApiRequestBuilder requestBuilder = ApiRequest.builder() + .method("GET"); + + String path = "/connectors/generic/{id}" + .replace("{id}", urlEncode(id.toString())); + requestBuilder.path(path); + + List> localVarQueryParams = new ArrayList<>(); + localVarQueryParams.addAll(parameterToPairs("aid", aid)); + + if (!localVarQueryParams.isEmpty()) { + requestBuilder.queryParams(localVarQueryParams); + } + + requestBuilder.header("Accept", List.of("application/hal+json, application/json, application/problem+json")); + requestBuilder.header("User-Agent", List.of(Config.USER_AGENT)); + return requestBuilder; + } + /** + * List connectors + * Returns a list of connectors in the specified account group. If no account group is specified, the user’s default account group is used. + * @param aid A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) + * @return GenericConnectors + * @throws ApiException if fails to make API call + */ + public GenericConnectors getGenericConnectors(String aid) throws ApiException { + ApiResponse response = getGenericConnectorsWithHttpInfo(aid); + return response.getData(); + } + + /** + * List connectors + * Returns a list of connectors in the specified account group. If no account group is specified, the user’s default account group is used. + * @param aid A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) + * @return ApiResponse<GenericConnectors> + * @throws ApiException if fails to make API call + */ + public ApiResponse getGenericConnectorsWithHttpInfo(String aid) throws ApiException { + getGenericConnectorsValidateRequest(); + + var requestBuilder = getGenericConnectorsRequestBuilder(aid); + + return apiClient.send(requestBuilder.build(), GenericConnectors.class); + } + + private void getGenericConnectorsValidateRequest() throws ApiException { + } + + private ApiRequest.ApiRequestBuilder getGenericConnectorsRequestBuilder(String aid) throws ApiException { + ApiRequest.ApiRequestBuilder requestBuilder = ApiRequest.builder() + .method("GET"); + + String path = "/connectors/generic"; + requestBuilder.path(path); + + List> localVarQueryParams = new ArrayList<>(); + localVarQueryParams.addAll(parameterToPairs("aid", aid)); + + if (!localVarQueryParams.isEmpty()) { + requestBuilder.queryParams(localVarQueryParams); + } + + requestBuilder.header("Accept", List.of("application/hal+json, application/json, application/problem+json")); + requestBuilder.header("User-Agent", List.of(Config.USER_AGENT)); + return requestBuilder; + } + /** + * List operation IDs assigned to a connector + * Returns a list of operation IDs assigned to a connector. + * @param id The connector ID. (required) + * @param aid A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) + * @return Assignments + * @throws ApiException if fails to make API call + */ + public Assignments listGenericConnectorOperations(String id, String aid) throws ApiException { + ApiResponse response = listGenericConnectorOperationsWithHttpInfo(id, aid); + return response.getData(); + } + + /** + * List operation IDs assigned to a connector + * Returns a list of operation IDs assigned to a connector. + * @param id The connector ID. (required) + * @param aid A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) + * @return ApiResponse<Assignments> + * @throws ApiException if fails to make API call + */ + public ApiResponse listGenericConnectorOperationsWithHttpInfo(String id, String aid) throws ApiException { + listGenericConnectorOperationsValidateRequest(id); + + var requestBuilder = listGenericConnectorOperationsRequestBuilder(id, aid); + + return apiClient.send(requestBuilder.build(), Assignments.class); + } + + private void listGenericConnectorOperationsValidateRequest(String id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling listGenericConnectorOperations"); + } + } + + private ApiRequest.ApiRequestBuilder listGenericConnectorOperationsRequestBuilder(String id, String aid) throws ApiException { + ApiRequest.ApiRequestBuilder requestBuilder = ApiRequest.builder() + .method("GET"); + + String path = "/connectors/generic/{id}/operations" + .replace("{id}", urlEncode(id.toString())); + requestBuilder.path(path); + + List> localVarQueryParams = new ArrayList<>(); + localVarQueryParams.addAll(parameterToPairs("aid", aid)); + + if (!localVarQueryParams.isEmpty()) { + requestBuilder.queryParams(localVarQueryParams); + } + + requestBuilder.header("Accept", List.of("application/hal+json, application/json, application/problem+json")); + requestBuilder.header("User-Agent", List.of(Config.USER_AGENT)); + return requestBuilder; + } + /** + * Assign operations to a connector + * Assigns operations to a connector. This replaces any existing assignments. + * @param id The connector ID. (required) + * @param requestBody List of operation IDs to assign to the connector. (required) + * @param aid A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) + * @return Assignments + * @throws ApiException if fails to make API call + */ + public Assignments setGenericConnectorOperations(String id, List requestBody, String aid) throws ApiException { + ApiResponse response = setGenericConnectorOperationsWithHttpInfo(id, requestBody, aid); + return response.getData(); + } + + /** + * Assign operations to a connector + * Assigns operations to a connector. This replaces any existing assignments. + * @param id The connector ID. (required) + * @param requestBody List of operation IDs to assign to the connector. (required) + * @param aid A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) + * @return ApiResponse<Assignments> + * @throws ApiException if fails to make API call + */ + public ApiResponse setGenericConnectorOperationsWithHttpInfo(String id, List requestBody, String aid) throws ApiException { + setGenericConnectorOperationsValidateRequest(id, requestBody); + + var requestBuilder = setGenericConnectorOperationsRequestBuilder(id, requestBody, aid); + + return apiClient.send(requestBuilder.build(), Assignments.class); + } + + private void setGenericConnectorOperationsValidateRequest(String id, List requestBody) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling setGenericConnectorOperations"); + } + // verify the required parameter 'requestBody' is set + if (requestBody == null) { + throw new ApiException(400, "Missing the required parameter 'requestBody' when calling setGenericConnectorOperations"); + } + } + + private ApiRequest.ApiRequestBuilder setGenericConnectorOperationsRequestBuilder(String id, List requestBody, String aid) throws ApiException { + ApiRequest.ApiRequestBuilder requestBuilder = ApiRequest.builder() + .method("PUT"); + + String path = "/connectors/generic/{id}/operations" + .replace("{id}", urlEncode(id.toString())); + requestBuilder.path(path); + + List> localVarQueryParams = new ArrayList<>(); + localVarQueryParams.addAll(parameterToPairs("aid", aid)); + + if (!localVarQueryParams.isEmpty()) { + requestBuilder.queryParams(localVarQueryParams); + } + + requestBuilder.header("Content-Type", List.of("application/json")); + requestBuilder.header("Accept", List.of("application/hal+json, application/json, application/problem+json")); + requestBuilder.header("User-Agent", List.of(Config.USER_AGENT)); + requestBuilder.requestBody(requestBody); + return requestBuilder; + } + /** + * Update connector + * Updates the connector specified by ID. + * @param id The connector ID. (required) + * @param genericConnector (required) + * @param aid A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) + * @return GenericConnector + * @throws ApiException if fails to make API call + */ + public GenericConnector updateGenericConnector(String id, GenericConnector genericConnector, String aid) throws ApiException { + ApiResponse response = updateGenericConnectorWithHttpInfo(id, genericConnector, aid); + return response.getData(); + } + + /** + * Update connector + * Updates the connector specified by ID. + * @param id The connector ID. (required) + * @param genericConnector (required) + * @param aid A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) + * @return ApiResponse<GenericConnector> + * @throws ApiException if fails to make API call + */ + public ApiResponse updateGenericConnectorWithHttpInfo(String id, GenericConnector genericConnector, String aid) throws ApiException { + updateGenericConnectorValidateRequest(id, genericConnector); + + var requestBuilder = updateGenericConnectorRequestBuilder(id, genericConnector, aid); + + return apiClient.send(requestBuilder.build(), GenericConnector.class); + } + + private void updateGenericConnectorValidateRequest(String id, GenericConnector genericConnector) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling updateGenericConnector"); + } + // verify the required parameter 'genericConnector' is set + if (genericConnector == null) { + throw new ApiException(400, "Missing the required parameter 'genericConnector' when calling updateGenericConnector"); + } + } + + private ApiRequest.ApiRequestBuilder updateGenericConnectorRequestBuilder(String id, GenericConnector genericConnector, String aid) throws ApiException { + ApiRequest.ApiRequestBuilder requestBuilder = ApiRequest.builder() + .method("PUT"); + + String path = "/connectors/generic/{id}" + .replace("{id}", urlEncode(id.toString())); + requestBuilder.path(path); + + List> localVarQueryParams = new ArrayList<>(); + localVarQueryParams.addAll(parameterToPairs("aid", aid)); + + if (!localVarQueryParams.isEmpty()) { + requestBuilder.queryParams(localVarQueryParams); + } + + requestBuilder.header("Content-Type", List.of("application/json")); + requestBuilder.header("Accept", List.of("application/hal+json, application/json, application/problem+json")); + requestBuilder.header("User-Agent", List.of(Config.USER_AGENT)); + requestBuilder.requestBody(genericConnector); + return requestBuilder; + } +} diff --git a/connectors/src/main/java/com/thousandeyes/sdk/connectors/OperationConnectorsApi.java b/connectors/src/main/java/com/thousandeyes/sdk/connectors/OperationConnectorsApi.java new file mode 100644 index 000000000..695c97d0e --- /dev/null +++ b/connectors/src/main/java/com/thousandeyes/sdk/connectors/OperationConnectorsApi.java @@ -0,0 +1,194 @@ +/* + * Integrations API + * Manage connectors and operations. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.thousandeyes.sdk.connectors; + +import static com.thousandeyes.sdk.client.RequestUtil.parameterToPairs; +import static com.thousandeyes.sdk.client.RequestUtil.urlEncode; + +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.client.ApiException; +import com.thousandeyes.sdk.client.ApiResponse; +import com.thousandeyes.sdk.client.ApiRequest; +import com.thousandeyes.sdk.utils.Config; +import org.apache.commons.lang3.tuple.Pair; +import org.apache.commons.lang3.reflect.TypeUtils; +import com.thousandeyes.sdk.connectors.model.Assignments; +import com.thousandeyes.sdk.connectors.model.Error; +import com.thousandeyes.sdk.connectors.model.UnauthorizedError; +import com.thousandeyes.sdk.connectors.model.ValidationError; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "com.thousandeyes.api.codegen.ThousandeyesJavaGenerator") +public class OperationConnectorsApi { + private final ApiClient apiClient; + + public OperationConnectorsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Retrieve connectors assigned to an operation + * Returns a list of connectors assigned to a specific operation. + * @param type The operation type. (required) + * @param id The operation ID. (required) + * @param aid A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) + * @return Assignments + * @throws ApiException if fails to make API call + */ + public Assignments getOperationConnectors(String type, String id, String aid) throws ApiException { + ApiResponse response = getOperationConnectorsWithHttpInfo(type, id, aid); + return response.getData(); + } + + /** + * Retrieve connectors assigned to an operation + * Returns a list of connectors assigned to a specific operation. + * @param type The operation type. (required) + * @param id The operation ID. (required) + * @param aid A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) + * @return ApiResponse<Assignments> + * @throws ApiException if fails to make API call + */ + public ApiResponse getOperationConnectorsWithHttpInfo(String type, String id, String aid) throws ApiException { + getOperationConnectorsValidateRequest(type, id); + + var requestBuilder = getOperationConnectorsRequestBuilder(type, id, aid); + + return apiClient.send(requestBuilder.build(), Assignments.class); + } + + private void getOperationConnectorsValidateRequest(String type, String id) throws ApiException { + // verify the required parameter 'type' is set + if (type == null) { + throw new ApiException(400, "Missing the required parameter 'type' when calling getOperationConnectors"); + } + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling getOperationConnectors"); + } + } + + private ApiRequest.ApiRequestBuilder getOperationConnectorsRequestBuilder(String type, String id, String aid) throws ApiException { + ApiRequest.ApiRequestBuilder requestBuilder = ApiRequest.builder() + .method("GET"); + + String path = "/operations/{type}/{id}/connectors" + .replace("{type}", urlEncode(type.toString())) + .replace("{id}", urlEncode(id.toString())); + requestBuilder.path(path); + + List> localVarQueryParams = new ArrayList<>(); + localVarQueryParams.addAll(parameterToPairs("aid", aid)); + + if (!localVarQueryParams.isEmpty()) { + requestBuilder.queryParams(localVarQueryParams); + } + + requestBuilder.header("Accept", List.of("application/problem+json, application/hal+json, application/json")); + requestBuilder.header("User-Agent", List.of(Config.USER_AGENT)); + return requestBuilder; + } + /** + * Assign connectors to an operation + * Assigns one or more connectors to an operation. This replaces any existing assignments. + * @param type The operation type. (required) + * @param id The operation ID. (required) + * @param requestBody List of connector IDs to assign to the operation. (required) + * @param aid A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) + * @return Assignments + * @throws ApiException if fails to make API call + */ + public Assignments setOperationConnectors(String type, String id, List requestBody, String aid) throws ApiException { + ApiResponse response = setOperationConnectorsWithHttpInfo(type, id, requestBody, aid); + return response.getData(); + } + + /** + * Assign connectors to an operation + * Assigns one or more connectors to an operation. This replaces any existing assignments. + * @param type The operation type. (required) + * @param id The operation ID. (required) + * @param requestBody List of connector IDs to assign to the operation. (required) + * @param aid A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) + * @return ApiResponse<Assignments> + * @throws ApiException if fails to make API call + */ + public ApiResponse setOperationConnectorsWithHttpInfo(String type, String id, List requestBody, String aid) throws ApiException { + setOperationConnectorsValidateRequest(type, id, requestBody); + + var requestBuilder = setOperationConnectorsRequestBuilder(type, id, requestBody, aid); + + return apiClient.send(requestBuilder.build(), Assignments.class); + } + + private void setOperationConnectorsValidateRequest(String type, String id, List requestBody) throws ApiException { + // verify the required parameter 'type' is set + if (type == null) { + throw new ApiException(400, "Missing the required parameter 'type' when calling setOperationConnectors"); + } + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling setOperationConnectors"); + } + // verify the required parameter 'requestBody' is set + if (requestBody == null) { + throw new ApiException(400, "Missing the required parameter 'requestBody' when calling setOperationConnectors"); + } + } + + private ApiRequest.ApiRequestBuilder setOperationConnectorsRequestBuilder(String type, String id, List requestBody, String aid) throws ApiException { + ApiRequest.ApiRequestBuilder requestBuilder = ApiRequest.builder() + .method("PUT"); + + String path = "/operations/{type}/{id}/connectors" + .replace("{type}", urlEncode(type.toString())) + .replace("{id}", urlEncode(id.toString())); + requestBuilder.path(path); + + List> localVarQueryParams = new ArrayList<>(); + localVarQueryParams.addAll(parameterToPairs("aid", aid)); + + if (!localVarQueryParams.isEmpty()) { + requestBuilder.queryParams(localVarQueryParams); + } + + requestBuilder.header("Content-Type", List.of("application/json")); + requestBuilder.header("Accept", List.of("application/problem+json, application/hal+json, application/json")); + requestBuilder.header("User-Agent", List.of(Config.USER_AGENT)); + requestBuilder.requestBody(requestBody); + return requestBuilder; + } +} diff --git a/connectors/src/main/java/com/thousandeyes/sdk/connectors/WebhookOperationsApi.java b/connectors/src/main/java/com/thousandeyes/sdk/connectors/WebhookOperationsApi.java new file mode 100644 index 000000000..14a85550b --- /dev/null +++ b/connectors/src/main/java/com/thousandeyes/sdk/connectors/WebhookOperationsApi.java @@ -0,0 +1,338 @@ +/* + * Integrations API + * Manage connectors and operations. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.thousandeyes.sdk.connectors; + +import static com.thousandeyes.sdk.client.RequestUtil.parameterToPairs; +import static com.thousandeyes.sdk.client.RequestUtil.urlEncode; + +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.client.ApiException; +import com.thousandeyes.sdk.client.ApiResponse; +import com.thousandeyes.sdk.client.ApiRequest; +import com.thousandeyes.sdk.utils.Config; +import org.apache.commons.lang3.tuple.Pair; +import org.apache.commons.lang3.reflect.TypeUtils; +import com.thousandeyes.sdk.connectors.model.Error; +import com.thousandeyes.sdk.connectors.model.UnauthorizedError; +import com.thousandeyes.sdk.connectors.model.ValidationError; +import com.thousandeyes.sdk.connectors.model.WebhookOperation; +import com.thousandeyes.sdk.connectors.model.WebhookOperations; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.http.HttpRequest; +import java.nio.channels.Channels; +import java.nio.channels.Pipe; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "com.thousandeyes.api.codegen.ThousandeyesJavaGenerator") +public class WebhookOperationsApi { + private final ApiClient apiClient; + + public WebhookOperationsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Create webhook operation + * Creates a new webhook operation. + * @param webhookOperation (required) + * @param aid A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) + * @return WebhookOperation + * @throws ApiException if fails to make API call + */ + public WebhookOperation createWebhookOperation(WebhookOperation webhookOperation, String aid) throws ApiException { + ApiResponse response = createWebhookOperationWithHttpInfo(webhookOperation, aid); + return response.getData(); + } + + /** + * Create webhook operation + * Creates a new webhook operation. + * @param webhookOperation (required) + * @param aid A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) + * @return ApiResponse<WebhookOperation> + * @throws ApiException if fails to make API call + */ + public ApiResponse createWebhookOperationWithHttpInfo(WebhookOperation webhookOperation, String aid) throws ApiException { + createWebhookOperationValidateRequest(webhookOperation); + + var requestBuilder = createWebhookOperationRequestBuilder(webhookOperation, aid); + + return apiClient.send(requestBuilder.build(), WebhookOperation.class); + } + + private void createWebhookOperationValidateRequest(WebhookOperation webhookOperation) throws ApiException { + // verify the required parameter 'webhookOperation' is set + if (webhookOperation == null) { + throw new ApiException(400, "Missing the required parameter 'webhookOperation' when calling createWebhookOperation"); + } + } + + private ApiRequest.ApiRequestBuilder createWebhookOperationRequestBuilder(WebhookOperation webhookOperation, String aid) throws ApiException { + ApiRequest.ApiRequestBuilder requestBuilder = ApiRequest.builder() + .method("POST"); + + String path = "/operations/webhooks"; + requestBuilder.path(path); + + List> localVarQueryParams = new ArrayList<>(); + localVarQueryParams.addAll(parameterToPairs("aid", aid)); + + if (!localVarQueryParams.isEmpty()) { + requestBuilder.queryParams(localVarQueryParams); + } + + requestBuilder.header("Content-Type", List.of("application/json")); + requestBuilder.header("Accept", List.of("application/hal+json, application/json, application/problem+json")); + requestBuilder.header("User-Agent", List.of(Config.USER_AGENT)); + requestBuilder.requestBody(webhookOperation); + return requestBuilder; + } + /** + * Delete webhook operation + * Deletes the webhook operation specified by ID. + * @param id The operation ID. (required) + * @param aid A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) + * @throws ApiException if fails to make API call + */ + public void deleteWebhookOperation(String id, String aid) throws ApiException { + deleteWebhookOperationWithHttpInfo(id, aid); + } + + /** + * Delete webhook operation + * Deletes the webhook operation specified by ID. + * @param id The operation ID. (required) + * @param aid A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse deleteWebhookOperationWithHttpInfo(String id, String aid) throws ApiException { + deleteWebhookOperationValidateRequest(id); + + var requestBuilder = deleteWebhookOperationRequestBuilder(id, aid); + + return apiClient.send(requestBuilder.build(), Void.class); + } + + private void deleteWebhookOperationValidateRequest(String id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling deleteWebhookOperation"); + } + } + + private ApiRequest.ApiRequestBuilder deleteWebhookOperationRequestBuilder(String id, String aid) throws ApiException { + ApiRequest.ApiRequestBuilder requestBuilder = ApiRequest.builder() + .method("DELETE"); + + String path = "/operations/webhooks/{id}" + .replace("{id}", urlEncode(id.toString())); + requestBuilder.path(path); + + List> localVarQueryParams = new ArrayList<>(); + localVarQueryParams.addAll(parameterToPairs("aid", aid)); + + if (!localVarQueryParams.isEmpty()) { + requestBuilder.queryParams(localVarQueryParams); + } + + requestBuilder.header("Accept", List.of("application/json, application/problem+json")); + requestBuilder.header("User-Agent", List.of(Config.USER_AGENT)); + return requestBuilder; + } + /** + * Retrieve webhook operation + * Retrieves details of a webhook operation by its ID. + * @param id The operation ID. (required) + * @param aid A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) + * @return WebhookOperation + * @throws ApiException if fails to make API call + */ + public WebhookOperation getWebhookOperation(String id, String aid) throws ApiException { + ApiResponse response = getWebhookOperationWithHttpInfo(id, aid); + return response.getData(); + } + + /** + * Retrieve webhook operation + * Retrieves details of a webhook operation by its ID. + * @param id The operation ID. (required) + * @param aid A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) + * @return ApiResponse<WebhookOperation> + * @throws ApiException if fails to make API call + */ + public ApiResponse getWebhookOperationWithHttpInfo(String id, String aid) throws ApiException { + getWebhookOperationValidateRequest(id); + + var requestBuilder = getWebhookOperationRequestBuilder(id, aid); + + return apiClient.send(requestBuilder.build(), WebhookOperation.class); + } + + private void getWebhookOperationValidateRequest(String id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling getWebhookOperation"); + } + } + + private ApiRequest.ApiRequestBuilder getWebhookOperationRequestBuilder(String id, String aid) throws ApiException { + ApiRequest.ApiRequestBuilder requestBuilder = ApiRequest.builder() + .method("GET"); + + String path = "/operations/webhooks/{id}" + .replace("{id}", urlEncode(id.toString())); + requestBuilder.path(path); + + List> localVarQueryParams = new ArrayList<>(); + localVarQueryParams.addAll(parameterToPairs("aid", aid)); + + if (!localVarQueryParams.isEmpty()) { + requestBuilder.queryParams(localVarQueryParams); + } + + requestBuilder.header("Accept", List.of("application/hal+json, application/json, application/problem+json")); + requestBuilder.header("User-Agent", List.of(Config.USER_AGENT)); + return requestBuilder; + } + /** + * List webhook operations + * Returns a list of webhook operations in the specified account group. If no account group is specified, the user’s default account group is used. + * @param aid A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) + * @return WebhookOperations + * @throws ApiException if fails to make API call + */ + public WebhookOperations getWebhookOperations(String aid) throws ApiException { + ApiResponse response = getWebhookOperationsWithHttpInfo(aid); + return response.getData(); + } + + /** + * List webhook operations + * Returns a list of webhook operations in the specified account group. If no account group is specified, the user’s default account group is used. + * @param aid A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) + * @return ApiResponse<WebhookOperations> + * @throws ApiException if fails to make API call + */ + public ApiResponse getWebhookOperationsWithHttpInfo(String aid) throws ApiException { + getWebhookOperationsValidateRequest(); + + var requestBuilder = getWebhookOperationsRequestBuilder(aid); + + return apiClient.send(requestBuilder.build(), WebhookOperations.class); + } + + private void getWebhookOperationsValidateRequest() throws ApiException { + } + + private ApiRequest.ApiRequestBuilder getWebhookOperationsRequestBuilder(String aid) throws ApiException { + ApiRequest.ApiRequestBuilder requestBuilder = ApiRequest.builder() + .method("GET"); + + String path = "/operations/webhooks"; + requestBuilder.path(path); + + List> localVarQueryParams = new ArrayList<>(); + localVarQueryParams.addAll(parameterToPairs("aid", aid)); + + if (!localVarQueryParams.isEmpty()) { + requestBuilder.queryParams(localVarQueryParams); + } + + requestBuilder.header("Accept", List.of("application/hal+json, application/json, application/problem+json")); + requestBuilder.header("User-Agent", List.of(Config.USER_AGENT)); + return requestBuilder; + } + /** + * Update webhook operation + * Updates the webhook operation specified by ID. + * @param id The operation ID. (required) + * @param webhookOperation (required) + * @param aid A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) + * @return WebhookOperation + * @throws ApiException if fails to make API call + */ + public WebhookOperation updateWebhookOperation(String id, WebhookOperation webhookOperation, String aid) throws ApiException { + ApiResponse response = updateWebhookOperationWithHttpInfo(id, webhookOperation, aid); + return response.getData(); + } + + /** + * Update webhook operation + * Updates the webhook operation specified by ID. + * @param id The operation ID. (required) + * @param webhookOperation (required) + * @param aid A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) + * @return ApiResponse<WebhookOperation> + * @throws ApiException if fails to make API call + */ + public ApiResponse updateWebhookOperationWithHttpInfo(String id, WebhookOperation webhookOperation, String aid) throws ApiException { + updateWebhookOperationValidateRequest(id, webhookOperation); + + var requestBuilder = updateWebhookOperationRequestBuilder(id, webhookOperation, aid); + + return apiClient.send(requestBuilder.build(), WebhookOperation.class); + } + + private void updateWebhookOperationValidateRequest(String id, WebhookOperation webhookOperation) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling updateWebhookOperation"); + } + // verify the required parameter 'webhookOperation' is set + if (webhookOperation == null) { + throw new ApiException(400, "Missing the required parameter 'webhookOperation' when calling updateWebhookOperation"); + } + } + + private ApiRequest.ApiRequestBuilder updateWebhookOperationRequestBuilder(String id, WebhookOperation webhookOperation, String aid) throws ApiException { + ApiRequest.ApiRequestBuilder requestBuilder = ApiRequest.builder() + .method("PUT"); + + String path = "/operations/webhooks/{id}" + .replace("{id}", urlEncode(id.toString())); + requestBuilder.path(path); + + List> localVarQueryParams = new ArrayList<>(); + localVarQueryParams.addAll(parameterToPairs("aid", aid)); + + if (!localVarQueryParams.isEmpty()) { + requestBuilder.queryParams(localVarQueryParams); + } + + requestBuilder.header("Content-Type", List.of("application/json")); + requestBuilder.header("Accept", List.of("application/hal+json, application/json, application/problem+json")); + requestBuilder.header("User-Agent", List.of(Config.USER_AGENT)); + requestBuilder.requestBody(webhookOperation); + return requestBuilder; + } +} diff --git a/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/Assignments.java b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/Assignments.java new file mode 100644 index 000000000..cafc636d2 --- /dev/null +++ b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/Assignments.java @@ -0,0 +1,148 @@ +/* + * Integrations API + * Manage connectors and operations. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.connectors.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.thousandeyes.sdk.connectors.model.SelfLinks; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * A list of assigned items. + */ +@JsonPropertyOrder({ + Assignments.JSON_PROPERTY_ITEMS, + Assignments.JSON_PROPERTY_LINKS +}) +@jakarta.annotation.Generated(value = "com.thousandeyes.api.codegen.ThousandeyesJavaGenerator") +public class Assignments { + public static final String JSON_PROPERTY_ITEMS = "items"; + private List items = new ArrayList<>(); + + public static final String JSON_PROPERTY_LINKS = "_links"; + private SelfLinks links; + + public Assignments() { + } + + public Assignments items(List items) { + this.items = items; + return this; + } + + public Assignments addItemsItem(String itemsItem) { + if (this.items == null) { + this.items = new ArrayList<>(); + } + this.items.add(itemsItem); + return this; + } + + /** + * Get items + * @return items + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ITEMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getItems() { + return items; + } + + + @JsonProperty(JSON_PROPERTY_ITEMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setItems(List items) { + this.items = items; + } + + + public Assignments links(SelfLinks links) { + this.links = links; + return this; + } + + /** + * Get links + * @return links + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SelfLinks getLinks() { + return links; + } + + + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLinks(SelfLinks links) { + this.links = links; + } + + + /** + * Return true if this Assignments object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Assignments assignments = (Assignments) o; + return Objects.equals(this.items, assignments.items) && + Objects.equals(this.links, assignments.links); + } + + @Override + public int hashCode() { + return Objects.hash(items, links); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Assignments {\n"); + sb.append(" items: ").append(toIndentedString(items)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/AuthenticationType.java b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/AuthenticationType.java new file mode 100644 index 000000000..80063a532 --- /dev/null +++ b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/AuthenticationType.java @@ -0,0 +1,70 @@ +/* + * Integrations API + * Manage connectors and operations. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.connectors.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets AuthenticationType + */ +public enum AuthenticationType { + + BASIC("basic"), + + BEARER_TOKEN("bearer-token"), + + OAUTH_AUTH_CODE("oauth-auth-code"), + + OAUTH_CLIENT_CREDENTIALS("oauth-client-credentials"), + + OTHER_TOKEN("other-token"), + + CONJUR_HOST("conjur-host"), + + UNKNOWN("unknown"); + + private String value; + + AuthenticationType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AuthenticationType fromValue(String value) { + for (AuthenticationType b : AuthenticationType.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN; + } + +} + diff --git a/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/BasicAuthentication.java b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/BasicAuthentication.java new file mode 100644 index 000000000..93249f1c4 --- /dev/null +++ b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/BasicAuthentication.java @@ -0,0 +1,168 @@ +/* + * Integrations API + * Manage connectors and operations. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.connectors.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.thousandeyes.sdk.connectors.model.AuthenticationType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * BasicAuthentication + */ +@JsonPropertyOrder({ + BasicAuthentication.JSON_PROPERTY_USERNAME, + BasicAuthentication.JSON_PROPERTY_PASSWORD, + BasicAuthentication.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "com.thousandeyes.api.codegen.ThousandeyesJavaGenerator") +public class BasicAuthentication { + public static final String JSON_PROPERTY_USERNAME = "username"; + private String username; + + public static final String JSON_PROPERTY_PASSWORD = "password"; + private String password; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AuthenticationType type; + + public BasicAuthentication() { + } + + public BasicAuthentication username(String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getUsername() { + return username; + } + + + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUsername(String username) { + this.username = username; + } + + + public BasicAuthentication password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PASSWORD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getPassword() { + return password; + } + + + @JsonProperty(JSON_PROPERTY_PASSWORD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPassword(String password) { + this.password = password; + } + + + public BasicAuthentication type(AuthenticationType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AuthenticationType getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(AuthenticationType type) { + this.type = type; + } + + + /** + * Return true if this BasicAuthentication object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BasicAuthentication basicAuthentication = (BasicAuthentication) o; + return Objects.equals(this.username, basicAuthentication.username) && + Objects.equals(this.password, basicAuthentication.password) && + Objects.equals(this.type, basicAuthentication.type); + } + + @Override + public int hashCode() { + return Objects.hash(username, password, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BasicAuthentication {\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/BearerTokenAuthentication.java b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/BearerTokenAuthentication.java new file mode 100644 index 000000000..eb79dafdd --- /dev/null +++ b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/BearerTokenAuthentication.java @@ -0,0 +1,137 @@ +/* + * Integrations API + * Manage connectors and operations. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.connectors.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.thousandeyes.sdk.connectors.model.AuthenticationType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * BearerTokenAuthentication + */ +@JsonPropertyOrder({ + BearerTokenAuthentication.JSON_PROPERTY_TOKEN, + BearerTokenAuthentication.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "com.thousandeyes.api.codegen.ThousandeyesJavaGenerator") +public class BearerTokenAuthentication { + public static final String JSON_PROPERTY_TOKEN = "token"; + private String token; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AuthenticationType type; + + public BearerTokenAuthentication() { + } + + public BearerTokenAuthentication token(String token) { + this.token = token; + return this; + } + + /** + * Get token + * @return token + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOKEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getToken() { + return token; + } + + + @JsonProperty(JSON_PROPERTY_TOKEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setToken(String token) { + this.token = token; + } + + + public BearerTokenAuthentication type(AuthenticationType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AuthenticationType getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(AuthenticationType type) { + this.type = type; + } + + + /** + * Return true if this BearerTokenAuthentication object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BearerTokenAuthentication bearerTokenAuthentication = (BearerTokenAuthentication) o; + return Objects.equals(this.token, bearerTokenAuthentication.token) && + Objects.equals(this.type, bearerTokenAuthentication.type); + } + + @Override + public int hashCode() { + return Objects.hash(token, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BearerTokenAuthentication {\n"); + sb.append(" token: ").append(toIndentedString(token)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/ConnectorType.java b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/ConnectorType.java new file mode 100644 index 000000000..f430d81b7 --- /dev/null +++ b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/ConnectorType.java @@ -0,0 +1,60 @@ +/* + * Integrations API + * Manage connectors and operations. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.connectors.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets ConnectorType + */ +public enum ConnectorType { + + GENERIC("generic"), + + UNKNOWN("unknown"); + + private String value; + + ConnectorType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ConnectorType fromValue(String value) { + for (ConnectorType b : ConnectorType.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN; + } + +} + diff --git a/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/Error.java b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/Error.java new file mode 100644 index 000000000..046dbc027 --- /dev/null +++ b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/Error.java @@ -0,0 +1,229 @@ +/* + * Integrations API + * Manage connectors and operations. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.connectors.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Error + */ +@JsonPropertyOrder({ + Error.JSON_PROPERTY_TYPE, + Error.JSON_PROPERTY_TITLE, + Error.JSON_PROPERTY_STATUS, + Error.JSON_PROPERTY_DETAIL, + Error.JSON_PROPERTY_INSTANCE +}) +@jakarta.annotation.Generated(value = "com.thousandeyes.api.codegen.ThousandeyesJavaGenerator") +public class Error { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_TITLE = "title"; + private String title; + + public static final String JSON_PROPERTY_STATUS = "status"; + private Integer status; + + public static final String JSON_PROPERTY_DETAIL = "detail"; + private String detail; + + public static final String JSON_PROPERTY_INSTANCE = "instance"; + private String instance; + + public Error() { + } + + public Error type(String type) { + this.type = type; + return this; + } + + /** + * A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\". + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public Error title(String title) { + this.title = title; + return this; + } + + /** + * A short, human-readable summary of the problem type. + * @return title + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getTitle() { + return title; + } + + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTitle(String title) { + this.title = title; + } + + + public Error status(Integer status) { + this.status = status; + return this; + } + + /** + * The HTTP status code generated by the origin server for this occurrence of the problem. + * @return status + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(Integer status) { + this.status = status; + } + + + public Error detail(String detail) { + this.detail = detail; + return this; + } + + /** + * A human-readable explanation specific to this occurrence of the problem. + * @return detail + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDetail() { + return detail; + } + + + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDetail(String detail) { + this.detail = detail; + } + + + public Error instance(String instance) { + this.instance = instance; + return this; + } + + /** + * A URI reference that identifies the specific occurrence of the problem. + * @return instance + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INSTANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getInstance() { + return instance; + } + + + @JsonProperty(JSON_PROPERTY_INSTANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInstance(String instance) { + this.instance = instance; + } + + + /** + * Return true if this Error object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Error error = (Error) o; + return Objects.equals(this.type, error.type) && + Objects.equals(this.title, error.title) && + Objects.equals(this.status, error.status) && + Objects.equals(this.detail, error.detail) && + Objects.equals(this.instance, error.instance); + } + + @Override + public int hashCode() { + return Objects.hash(type, title, status, detail, instance); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Error {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); + sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/GenericConnector.java b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/GenericConnector.java new file mode 100644 index 000000000..4a0799379 --- /dev/null +++ b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/GenericConnector.java @@ -0,0 +1,295 @@ +/* + * Integrations API + * Manage connectors and operations. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.connectors.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.thousandeyes.sdk.connectors.model.ConnectorType; +import com.thousandeyes.sdk.connectors.model.GenericConnectorAuth; +import com.thousandeyes.sdk.connectors.model.Header; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * GenericConnector + */ +@JsonPropertyOrder({ + GenericConnector.JSON_PROPERTY_ID, + GenericConnector.JSON_PROPERTY_TYPE, + GenericConnector.JSON_PROPERTY_NAME, + GenericConnector.JSON_PROPERTY_TARGET, + GenericConnector.JSON_PROPERTY_AUTHENTICATION, + GenericConnector.JSON_PROPERTY_LAST_MODIFIED_DATE, + GenericConnector.JSON_PROPERTY_HEADERS +}) +@jakarta.annotation.Generated(value = "com.thousandeyes.api.codegen.ThousandeyesJavaGenerator") +public class GenericConnector { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ConnectorType type; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_TARGET = "target"; + private String target; + + public static final String JSON_PROPERTY_AUTHENTICATION = "authentication"; + private GenericConnectorAuth authentication; + + public static final String JSON_PROPERTY_LAST_MODIFIED_DATE = "lastModifiedDate"; + private Long lastModifiedDate; + + public static final String JSON_PROPERTY_HEADERS = "headers"; + private List
headers = new ArrayList<>(); + + public GenericConnector() { + } + + @JsonCreator + public GenericConnector( + @JsonProperty(JSON_PROPERTY_ID) String id, + @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_DATE) Long lastModifiedDate + ) { + this(); + this.id = id; + this.lastModifiedDate = lastModifiedDate; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + + + public GenericConnector type(ConnectorType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public ConnectorType getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(ConnectorType type) { + this.type = type; + } + + + public GenericConnector name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + + public GenericConnector target(String target) { + this.target = target; + return this; + } + + /** + * Get target + * @return target + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TARGET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getTarget() { + return target; + } + + + @JsonProperty(JSON_PROPERTY_TARGET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTarget(String target) { + this.target = target; + } + + + public GenericConnector authentication(GenericConnectorAuth authentication) { + this.authentication = authentication; + return this; + } + + /** + * Get authentication + * @return authentication + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public GenericConnectorAuth getAuthentication() { + return authentication; + } + + + @JsonProperty(JSON_PROPERTY_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAuthentication(GenericConnectorAuth authentication) { + this.authentication = authentication; + } + + + /** + * The date when the connector was last modified (Unix timestamp in milliseconds). + * @return lastModifiedDate + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getLastModifiedDate() { + return lastModifiedDate; + } + + + + + public GenericConnector headers(List
headers) { + this.headers = headers; + return this; + } + + public GenericConnector addHeadersItem(Header headersItem) { + if (this.headers == null) { + this.headers = new ArrayList<>(); + } + this.headers.add(headersItem); + return this; + } + + /** + * Get headers + * @return headers + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HEADERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List
getHeaders() { + return headers; + } + + + @JsonProperty(JSON_PROPERTY_HEADERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHeaders(List
headers) { + this.headers = headers; + } + + + /** + * Return true if this GenericConnector object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GenericConnector genericConnector = (GenericConnector) o; + return Objects.equals(this.id, genericConnector.id) && + Objects.equals(this.type, genericConnector.type) && + Objects.equals(this.name, genericConnector.name) && + Objects.equals(this.target, genericConnector.target) && + Objects.equals(this.authentication, genericConnector.authentication) && + Objects.equals(this.lastModifiedDate, genericConnector.lastModifiedDate) && + Objects.equals(this.headers, genericConnector.headers); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, name, target, authentication, lastModifiedDate, headers); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GenericConnector {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" target: ").append(toIndentedString(target)).append("\n"); + sb.append(" authentication: ").append(toIndentedString(authentication)).append("\n"); + sb.append(" lastModifiedDate: ").append(toIndentedString(lastModifiedDate)).append("\n"); + sb.append(" headers: ").append(toIndentedString(headers)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/GenericConnectorAuth.java b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/GenericConnectorAuth.java new file mode 100644 index 000000000..8685dd738 --- /dev/null +++ b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/GenericConnectorAuth.java @@ -0,0 +1,433 @@ +/* + * Integrations API + * Manage connectors and operations. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.connectors.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.thousandeyes.sdk.connectors.model.AuthenticationType; +import com.thousandeyes.sdk.connectors.model.BasicAuthentication; +import com.thousandeyes.sdk.connectors.model.BearerTokenAuthentication; +import com.thousandeyes.sdk.connectors.model.OauthClientCredentialsAuthentication; +import com.thousandeyes.sdk.connectors.model.OauthCodeAuthentication; +import com.thousandeyes.sdk.connectors.model.OtherTokenAuthentication; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +import com.fasterxml.jackson.core.type.TypeReference; + +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import com.thousandeyes.sdk.serialization.JSON; +import com.thousandeyes.sdk.serialization.AbstractOpenApiSchema; + +@jakarta.annotation.Generated(value = "com.thousandeyes.api.codegen.ThousandeyesJavaGenerator") +@JsonDeserialize(using = GenericConnectorAuth.GenericConnectorAuthDeserializer.class) +@JsonSerialize(using = GenericConnectorAuth.GenericConnectorAuthSerializer.class) +public class GenericConnectorAuth extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(GenericConnectorAuth.class.getName()); + + public static class GenericConnectorAuthSerializer extends StdSerializer { + public GenericConnectorAuthSerializer(Class t) { + super(t); + } + + public GenericConnectorAuthSerializer() { + this(null); + } + + @Override + public void serialize(GenericConnectorAuth value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class GenericConnectorAuthDeserializer extends StdDeserializer { + public GenericConnectorAuthDeserializer() { + this(GenericConnectorAuth.class); + } + + public GenericConnectorAuthDeserializer(Class vc) { + super(vc); + } + + @Override + public GenericConnectorAuth deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + GenericConnectorAuth newGenericConnectorAuth = new GenericConnectorAuth(); + Map result2 = tree.traverse(jp.getCodec()).readValueAs(new TypeReference>() {}); + String discriminatorValue = (String)result2.get("type"); + switch (discriminatorValue) { + case "basic": + deserialized = tree.traverse(jp.getCodec()).readValueAs(BasicAuthentication.class); + newGenericConnectorAuth.setActualInstance(deserialized); + return newGenericConnectorAuth; + case "bearer-token": + deserialized = tree.traverse(jp.getCodec()).readValueAs(BearerTokenAuthentication.class); + newGenericConnectorAuth.setActualInstance(deserialized); + return newGenericConnectorAuth; + case "oauth-auth-code": + deserialized = tree.traverse(jp.getCodec()).readValueAs(OauthCodeAuthentication.class); + newGenericConnectorAuth.setActualInstance(deserialized); + return newGenericConnectorAuth; + case "oauth-client-credentials": + deserialized = tree.traverse(jp.getCodec()).readValueAs(OauthClientCredentialsAuthentication.class); + newGenericConnectorAuth.setActualInstance(deserialized); + return newGenericConnectorAuth; + case "other-token": + deserialized = tree.traverse(jp.getCodec()).readValueAs(OtherTokenAuthentication.class); + newGenericConnectorAuth.setActualInstance(deserialized); + return newGenericConnectorAuth; + default: + log.log(Level.WARNING, String.format("Failed to lookup discriminator value `%s` for GenericConnectorAuth. Possible values: basic bearer-token oauth-auth-code oauth-client-credentials other-token", discriminatorValue)); + } + + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize BasicAuthentication + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (BasicAuthentication.class.equals(Integer.class) || BasicAuthentication.class.equals(Long.class) || BasicAuthentication.class.equals(Float.class) || BasicAuthentication.class.equals(Double.class) || BasicAuthentication.class.equals(Boolean.class) || BasicAuthentication.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((BasicAuthentication.class.equals(Integer.class) || BasicAuthentication.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((BasicAuthentication.class.equals(Float.class) || BasicAuthentication.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (BasicAuthentication.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (BasicAuthentication.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(BasicAuthentication.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'BasicAuthentication'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'BasicAuthentication'", e); + } + + // deserialize BearerTokenAuthentication + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (BearerTokenAuthentication.class.equals(Integer.class) || BearerTokenAuthentication.class.equals(Long.class) || BearerTokenAuthentication.class.equals(Float.class) || BearerTokenAuthentication.class.equals(Double.class) || BearerTokenAuthentication.class.equals(Boolean.class) || BearerTokenAuthentication.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((BearerTokenAuthentication.class.equals(Integer.class) || BearerTokenAuthentication.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((BearerTokenAuthentication.class.equals(Float.class) || BearerTokenAuthentication.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (BearerTokenAuthentication.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (BearerTokenAuthentication.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(BearerTokenAuthentication.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'BearerTokenAuthentication'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'BearerTokenAuthentication'", e); + } + + // deserialize OauthClientCredentialsAuthentication + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (OauthClientCredentialsAuthentication.class.equals(Integer.class) || OauthClientCredentialsAuthentication.class.equals(Long.class) || OauthClientCredentialsAuthentication.class.equals(Float.class) || OauthClientCredentialsAuthentication.class.equals(Double.class) || OauthClientCredentialsAuthentication.class.equals(Boolean.class) || OauthClientCredentialsAuthentication.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((OauthClientCredentialsAuthentication.class.equals(Integer.class) || OauthClientCredentialsAuthentication.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((OauthClientCredentialsAuthentication.class.equals(Float.class) || OauthClientCredentialsAuthentication.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (OauthClientCredentialsAuthentication.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (OauthClientCredentialsAuthentication.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(OauthClientCredentialsAuthentication.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'OauthClientCredentialsAuthentication'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'OauthClientCredentialsAuthentication'", e); + } + + // deserialize OauthCodeAuthentication + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (OauthCodeAuthentication.class.equals(Integer.class) || OauthCodeAuthentication.class.equals(Long.class) || OauthCodeAuthentication.class.equals(Float.class) || OauthCodeAuthentication.class.equals(Double.class) || OauthCodeAuthentication.class.equals(Boolean.class) || OauthCodeAuthentication.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((OauthCodeAuthentication.class.equals(Integer.class) || OauthCodeAuthentication.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((OauthCodeAuthentication.class.equals(Float.class) || OauthCodeAuthentication.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (OauthCodeAuthentication.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (OauthCodeAuthentication.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(OauthCodeAuthentication.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'OauthCodeAuthentication'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'OauthCodeAuthentication'", e); + } + + // deserialize OtherTokenAuthentication + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (OtherTokenAuthentication.class.equals(Integer.class) || OtherTokenAuthentication.class.equals(Long.class) || OtherTokenAuthentication.class.equals(Float.class) || OtherTokenAuthentication.class.equals(Double.class) || OtherTokenAuthentication.class.equals(Boolean.class) || OtherTokenAuthentication.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((OtherTokenAuthentication.class.equals(Integer.class) || OtherTokenAuthentication.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((OtherTokenAuthentication.class.equals(Float.class) || OtherTokenAuthentication.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (OtherTokenAuthentication.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (OtherTokenAuthentication.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(OtherTokenAuthentication.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'OtherTokenAuthentication'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'OtherTokenAuthentication'", e); + } + + if (match == 1) { + GenericConnectorAuth ret = new GenericConnectorAuth(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for GenericConnectorAuth: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public GenericConnectorAuth getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "GenericConnectorAuth cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public GenericConnectorAuth() { + super("oneOf", Boolean.FALSE); + } + + public GenericConnectorAuth(BasicAuthentication o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public GenericConnectorAuth(BearerTokenAuthentication o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public GenericConnectorAuth(OauthClientCredentialsAuthentication o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public GenericConnectorAuth(OauthCodeAuthentication o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public GenericConnectorAuth(OtherTokenAuthentication o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("BasicAuthentication", BasicAuthentication.class); + schemas.put("BearerTokenAuthentication", BearerTokenAuthentication.class); + schemas.put("OauthClientCredentialsAuthentication", OauthClientCredentialsAuthentication.class); + schemas.put("OauthCodeAuthentication", OauthCodeAuthentication.class); + schemas.put("OtherTokenAuthentication", OtherTokenAuthentication.class); + JSON.registerDescendants(GenericConnectorAuth.class, Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("basic", BasicAuthentication.class); + mappings.put("bearer-token", BearerTokenAuthentication.class); + mappings.put("oauth-auth-code", OauthCodeAuthentication.class); + mappings.put("oauth-client-credentials", OauthClientCredentialsAuthentication.class); + mappings.put("other-token", OtherTokenAuthentication.class); + mappings.put("GenericConnectorAuth", GenericConnectorAuth.class); + JSON.registerDiscriminator(GenericConnectorAuth.class, "type", mappings); + } + + @Override + public Map> getSchemas() { + return GenericConnectorAuth.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * BasicAuthentication, BearerTokenAuthentication, OauthClientCredentialsAuthentication, OauthCodeAuthentication, OtherTokenAuthentication + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(BasicAuthentication.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(BearerTokenAuthentication.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(OauthClientCredentialsAuthentication.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(OauthCodeAuthentication.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(OtherTokenAuthentication.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be BasicAuthentication, BearerTokenAuthentication, OauthClientCredentialsAuthentication, OauthCodeAuthentication, OtherTokenAuthentication"); + } + + /** + * Get the actual instance, which can be the following: + * BasicAuthentication, BearerTokenAuthentication, OauthClientCredentialsAuthentication, OauthCodeAuthentication, OtherTokenAuthentication + * + * @return The actual instance (BasicAuthentication, BearerTokenAuthentication, OauthClientCredentialsAuthentication, OauthCodeAuthentication, OtherTokenAuthentication) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `BasicAuthentication`. If the actual instance is not `BasicAuthentication`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `BasicAuthentication` + * @throws ClassCastException if the instance is not `BasicAuthentication` + */ + public BasicAuthentication getBasicAuthentication() throws ClassCastException { + return (BasicAuthentication)super.getActualInstance(); + } + + /** + * Get the actual instance of `BearerTokenAuthentication`. If the actual instance is not `BearerTokenAuthentication`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `BearerTokenAuthentication` + * @throws ClassCastException if the instance is not `BearerTokenAuthentication` + */ + public BearerTokenAuthentication getBearerTokenAuthentication() throws ClassCastException { + return (BearerTokenAuthentication)super.getActualInstance(); + } + + /** + * Get the actual instance of `OauthClientCredentialsAuthentication`. If the actual instance is not `OauthClientCredentialsAuthentication`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `OauthClientCredentialsAuthentication` + * @throws ClassCastException if the instance is not `OauthClientCredentialsAuthentication` + */ + public OauthClientCredentialsAuthentication getOauthClientCredentialsAuthentication() throws ClassCastException { + return (OauthClientCredentialsAuthentication)super.getActualInstance(); + } + + /** + * Get the actual instance of `OauthCodeAuthentication`. If the actual instance is not `OauthCodeAuthentication`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `OauthCodeAuthentication` + * @throws ClassCastException if the instance is not `OauthCodeAuthentication` + */ + public OauthCodeAuthentication getOauthCodeAuthentication() throws ClassCastException { + return (OauthCodeAuthentication)super.getActualInstance(); + } + + /** + * Get the actual instance of `OtherTokenAuthentication`. If the actual instance is not `OtherTokenAuthentication`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `OtherTokenAuthentication` + * @throws ClassCastException if the instance is not `OtherTokenAuthentication` + */ + public OtherTokenAuthentication getOtherTokenAuthentication() throws ClassCastException { + return (OtherTokenAuthentication)super.getActualInstance(); + } + + + +} + diff --git a/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/GenericConnectors.java b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/GenericConnectors.java new file mode 100644 index 000000000..3fbc37547 --- /dev/null +++ b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/GenericConnectors.java @@ -0,0 +1,149 @@ +/* + * Integrations API + * Manage connectors and operations. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.connectors.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.thousandeyes.sdk.connectors.model.GenericConnector; +import com.thousandeyes.sdk.connectors.model.SelfLinks; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * GenericConnectors + */ +@JsonPropertyOrder({ + GenericConnectors.JSON_PROPERTY_ITEMS, + GenericConnectors.JSON_PROPERTY_LINKS +}) +@jakarta.annotation.Generated(value = "com.thousandeyes.api.codegen.ThousandeyesJavaGenerator") +public class GenericConnectors { + public static final String JSON_PROPERTY_ITEMS = "items"; + private List items = new ArrayList<>(); + + public static final String JSON_PROPERTY_LINKS = "_links"; + private SelfLinks links; + + public GenericConnectors() { + } + + public GenericConnectors items(List items) { + this.items = items; + return this; + } + + public GenericConnectors addItemsItem(GenericConnector itemsItem) { + if (this.items == null) { + this.items = new ArrayList<>(); + } + this.items.add(itemsItem); + return this; + } + + /** + * Get items + * @return items + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ITEMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getItems() { + return items; + } + + + @JsonProperty(JSON_PROPERTY_ITEMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setItems(List items) { + this.items = items; + } + + + public GenericConnectors links(SelfLinks links) { + this.links = links; + return this; + } + + /** + * Get links + * @return links + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SelfLinks getLinks() { + return links; + } + + + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLinks(SelfLinks links) { + this.links = links; + } + + + /** + * Return true if this GenericConnectors object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GenericConnectors genericConnectors = (GenericConnectors) o; + return Objects.equals(this.items, genericConnectors.items) && + Objects.equals(this.links, genericConnectors.links); + } + + @Override + public int hashCode() { + return Objects.hash(items, links); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GenericConnectors {\n"); + sb.append(" items: ").append(toIndentedString(items)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/Header.java b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/Header.java new file mode 100644 index 000000000..d5d13351e --- /dev/null +++ b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/Header.java @@ -0,0 +1,136 @@ +/* + * Integrations API + * Manage connectors and operations. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.connectors.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Header + */ +@JsonPropertyOrder({ + Header.JSON_PROPERTY_NAME, + Header.JSON_PROPERTY_VALUE +}) +@jakarta.annotation.Generated(value = "com.thousandeyes.api.codegen.ThousandeyesJavaGenerator") +public class Header { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_VALUE = "value"; + private String value; + + public Header() { + } + + public Header name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + + public Header value(String value) { + this.value = value; + return this; + } + + /** + * The value of the header. Note that this value is obfuscated in the response, even when overwritten. + * @return value + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(String value) { + this.value = value; + } + + + /** + * Return true if this Header object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Header header = (Header) o; + return Objects.equals(this.name, header.name) && + Objects.equals(this.value, header.value); + } + + @Override + public int hashCode() { + return Objects.hash(name, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Header {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/Link.java b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/Link.java new file mode 100644 index 000000000..04dd18aa0 --- /dev/null +++ b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/Link.java @@ -0,0 +1,322 @@ +/* + * Integrations API + * Manage connectors and operations. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.connectors.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * A hyperlink from the containing resource to a URI. + */ +@JsonPropertyOrder({ + Link.JSON_PROPERTY_HREF, + Link.JSON_PROPERTY_TEMPLATED, + Link.JSON_PROPERTY_TYPE, + Link.JSON_PROPERTY_DEPRECATION, + Link.JSON_PROPERTY_NAME, + Link.JSON_PROPERTY_PROFILE, + Link.JSON_PROPERTY_TITLE, + Link.JSON_PROPERTY_HREFLANG +}) +@jakarta.annotation.Generated(value = "com.thousandeyes.api.codegen.ThousandeyesJavaGenerator") +public class Link { + public static final String JSON_PROPERTY_HREF = "href"; + private String href; + + public static final String JSON_PROPERTY_TEMPLATED = "templated"; + private Boolean templated; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_DEPRECATION = "deprecation"; + private String deprecation; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_PROFILE = "profile"; + private String profile; + + public static final String JSON_PROPERTY_TITLE = "title"; + private String title; + + public static final String JSON_PROPERTY_HREFLANG = "hreflang"; + private String hreflang; + + public Link() { + } + + public Link href(String href) { + this.href = href; + return this; + } + + /** + * Its value is either a URI [RFC3986] or a URI template [RFC6570]. + * @return href + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_HREF) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getHref() { + return href; + } + + + @JsonProperty(JSON_PROPERTY_HREF) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setHref(String href) { + this.href = href; + } + + + public Link templated(Boolean templated) { + this.templated = templated; + return this; + } + + /** + * Should be true when the link object's \"href\" property is a URI template. + * @return templated + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEMPLATED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getTemplated() { + return templated; + } + + + @JsonProperty(JSON_PROPERTY_TEMPLATED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTemplated(Boolean templated) { + this.templated = templated; + } + + + public Link type(String type) { + this.type = type; + return this; + } + + /** + * Used as a hint to indicate the media type expected when dereferencing the target resource. + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public Link deprecation(String deprecation) { + this.deprecation = deprecation; + return this; + } + + /** + * Its presence indicates that the link is to be deprecated at a future date. Its value is a URL that should provide further information about the deprecation. + * @return deprecation + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEPRECATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDeprecation() { + return deprecation; + } + + + @JsonProperty(JSON_PROPERTY_DEPRECATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeprecation(String deprecation) { + this.deprecation = deprecation; + } + + + public Link name(String name) { + this.name = name; + return this; + } + + /** + * Its value may be used as a secondary key for selecting link objects that share the same relation type. + * @return name + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + + public Link profile(String profile) { + this.profile = profile; + return this; + } + + /** + * A URI that hints about the profile of the target resource. + * @return profile + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getProfile() { + return profile; + } + + + @JsonProperty(JSON_PROPERTY_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProfile(String profile) { + this.profile = profile; + } + + + public Link title(String title) { + this.title = title; + return this; + } + + /** + * Intended for labelling the link with a human-readable identifier + * @return title + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getTitle() { + return title; + } + + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTitle(String title) { + this.title = title; + } + + + public Link hreflang(String hreflang) { + this.hreflang = hreflang; + return this; + } + + /** + * Indicates the language of the target resource + * @return hreflang + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HREFLANG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getHreflang() { + return hreflang; + } + + + @JsonProperty(JSON_PROPERTY_HREFLANG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHreflang(String hreflang) { + this.hreflang = hreflang; + } + + + /** + * Return true if this Link object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Link link = (Link) o; + return Objects.equals(this.href, link.href) && + Objects.equals(this.templated, link.templated) && + Objects.equals(this.type, link.type) && + Objects.equals(this.deprecation, link.deprecation) && + Objects.equals(this.name, link.name) && + Objects.equals(this.profile, link.profile) && + Objects.equals(this.title, link.title) && + Objects.equals(this.hreflang, link.hreflang); + } + + @Override + public int hashCode() { + return Objects.hash(href, templated, type, deprecation, name, profile, title, hreflang); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Link {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" templated: ").append(toIndentedString(templated)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" deprecation: ").append(toIndentedString(deprecation)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" profile: ").append(toIndentedString(profile)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" hreflang: ").append(toIndentedString(hreflang)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/OauthClientCredentialsAuthentication.java b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/OauthClientCredentialsAuthentication.java new file mode 100644 index 000000000..e59cccefb --- /dev/null +++ b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/OauthClientCredentialsAuthentication.java @@ -0,0 +1,230 @@ +/* + * Integrations API + * Manage connectors and operations. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.connectors.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.thousandeyes.sdk.connectors.model.AuthenticationType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * OauthClientCredentialsAuthentication + */ +@JsonPropertyOrder({ + OauthClientCredentialsAuthentication.JSON_PROPERTY_TOKEN, + OauthClientCredentialsAuthentication.JSON_PROPERTY_OAUTH_CLIENT_ID, + OauthClientCredentialsAuthentication.JSON_PROPERTY_OAUTH_TOKEN_URL, + OauthClientCredentialsAuthentication.JSON_PROPERTY_OAUTH_CLIENT_SECRET, + OauthClientCredentialsAuthentication.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "com.thousandeyes.api.codegen.ThousandeyesJavaGenerator") +public class OauthClientCredentialsAuthentication { + public static final String JSON_PROPERTY_TOKEN = "token"; + private String token; + + public static final String JSON_PROPERTY_OAUTH_CLIENT_ID = "oauthClientId"; + private String oauthClientId; + + public static final String JSON_PROPERTY_OAUTH_TOKEN_URL = "oauthTokenUrl"; + private String oauthTokenUrl; + + public static final String JSON_PROPERTY_OAUTH_CLIENT_SECRET = "oauthClientSecret"; + private String oauthClientSecret; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AuthenticationType type; + + public OauthClientCredentialsAuthentication() { + } + + public OauthClientCredentialsAuthentication token(String token) { + this.token = token; + return this; + } + + /** + * Get token + * @return token + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOKEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getToken() { + return token; + } + + + @JsonProperty(JSON_PROPERTY_TOKEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setToken(String token) { + this.token = token; + } + + + public OauthClientCredentialsAuthentication oauthClientId(String oauthClientId) { + this.oauthClientId = oauthClientId; + return this; + } + + /** + * Get oauthClientId + * @return oauthClientId + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OAUTH_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getOauthClientId() { + return oauthClientId; + } + + + @JsonProperty(JSON_PROPERTY_OAUTH_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOauthClientId(String oauthClientId) { + this.oauthClientId = oauthClientId; + } + + + public OauthClientCredentialsAuthentication oauthTokenUrl(String oauthTokenUrl) { + this.oauthTokenUrl = oauthTokenUrl; + return this; + } + + /** + * Get oauthTokenUrl + * @return oauthTokenUrl + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OAUTH_TOKEN_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getOauthTokenUrl() { + return oauthTokenUrl; + } + + + @JsonProperty(JSON_PROPERTY_OAUTH_TOKEN_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOauthTokenUrl(String oauthTokenUrl) { + this.oauthTokenUrl = oauthTokenUrl; + } + + + public OauthClientCredentialsAuthentication oauthClientSecret(String oauthClientSecret) { + this.oauthClientSecret = oauthClientSecret; + return this; + } + + /** + * Get oauthClientSecret + * @return oauthClientSecret + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OAUTH_CLIENT_SECRET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getOauthClientSecret() { + return oauthClientSecret; + } + + + @JsonProperty(JSON_PROPERTY_OAUTH_CLIENT_SECRET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOauthClientSecret(String oauthClientSecret) { + this.oauthClientSecret = oauthClientSecret; + } + + + public OauthClientCredentialsAuthentication type(AuthenticationType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AuthenticationType getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(AuthenticationType type) { + this.type = type; + } + + + /** + * Return true if this OauthClientCredentialsAuthentication object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OauthClientCredentialsAuthentication oauthClientCredentialsAuthentication = (OauthClientCredentialsAuthentication) o; + return Objects.equals(this.token, oauthClientCredentialsAuthentication.token) && + Objects.equals(this.oauthClientId, oauthClientCredentialsAuthentication.oauthClientId) && + Objects.equals(this.oauthTokenUrl, oauthClientCredentialsAuthentication.oauthTokenUrl) && + Objects.equals(this.oauthClientSecret, oauthClientCredentialsAuthentication.oauthClientSecret) && + Objects.equals(this.type, oauthClientCredentialsAuthentication.type); + } + + @Override + public int hashCode() { + return Objects.hash(token, oauthClientId, oauthTokenUrl, oauthClientSecret, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OauthClientCredentialsAuthentication {\n"); + sb.append(" token: ").append(toIndentedString(token)).append("\n"); + sb.append(" oauthClientId: ").append(toIndentedString(oauthClientId)).append("\n"); + sb.append(" oauthTokenUrl: ").append(toIndentedString(oauthTokenUrl)).append("\n"); + sb.append(" oauthClientSecret: ").append(toIndentedString(oauthClientSecret)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/OauthCodeAuthentication.java b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/OauthCodeAuthentication.java new file mode 100644 index 000000000..ce5a01eda --- /dev/null +++ b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/OauthCodeAuthentication.java @@ -0,0 +1,354 @@ +/* + * Integrations API + * Manage connectors and operations. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.connectors.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.thousandeyes.sdk.connectors.model.AuthenticationType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * OauthCodeAuthentication + */ +@JsonPropertyOrder({ + OauthCodeAuthentication.JSON_PROPERTY_TOKEN, + OauthCodeAuthentication.JSON_PROPERTY_REFRESH_TOKEN, + OauthCodeAuthentication.JSON_PROPERTY_OAUTH_CLIENT_ID, + OauthCodeAuthentication.JSON_PROPERTY_OAUTH_AUTH_URL, + OauthCodeAuthentication.JSON_PROPERTY_OAUTH_TOKEN_URL, + OauthCodeAuthentication.JSON_PROPERTY_OAUTH_CLIENT_SECRET, + OauthCodeAuthentication.JSON_PROPERTY_CODE, + OauthCodeAuthentication.JSON_PROPERTY_REDIRECT_URI, + OauthCodeAuthentication.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "com.thousandeyes.api.codegen.ThousandeyesJavaGenerator") +public class OauthCodeAuthentication { + public static final String JSON_PROPERTY_TOKEN = "token"; + private String token; + + public static final String JSON_PROPERTY_REFRESH_TOKEN = "refreshToken"; + private String refreshToken; + + public static final String JSON_PROPERTY_OAUTH_CLIENT_ID = "oauthClientId"; + private String oauthClientId; + + public static final String JSON_PROPERTY_OAUTH_AUTH_URL = "oauthAuthUrl"; + private String oauthAuthUrl; + + public static final String JSON_PROPERTY_OAUTH_TOKEN_URL = "oauthTokenUrl"; + private String oauthTokenUrl; + + public static final String JSON_PROPERTY_OAUTH_CLIENT_SECRET = "oauthClientSecret"; + private String oauthClientSecret; + + public static final String JSON_PROPERTY_CODE = "code"; + private String code; + + public static final String JSON_PROPERTY_REDIRECT_URI = "redirectUri"; + private String redirectUri; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AuthenticationType type; + + public OauthCodeAuthentication() { + } + + public OauthCodeAuthentication token(String token) { + this.token = token; + return this; + } + + /** + * Get token + * @return token + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOKEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getToken() { + return token; + } + + + @JsonProperty(JSON_PROPERTY_TOKEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setToken(String token) { + this.token = token; + } + + + public OauthCodeAuthentication refreshToken(String refreshToken) { + this.refreshToken = refreshToken; + return this; + } + + /** + * Get refreshToken + * @return refreshToken + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REFRESH_TOKEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRefreshToken() { + return refreshToken; + } + + + @JsonProperty(JSON_PROPERTY_REFRESH_TOKEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRefreshToken(String refreshToken) { + this.refreshToken = refreshToken; + } + + + public OauthCodeAuthentication oauthClientId(String oauthClientId) { + this.oauthClientId = oauthClientId; + return this; + } + + /** + * Get oauthClientId + * @return oauthClientId + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OAUTH_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getOauthClientId() { + return oauthClientId; + } + + + @JsonProperty(JSON_PROPERTY_OAUTH_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOauthClientId(String oauthClientId) { + this.oauthClientId = oauthClientId; + } + + + public OauthCodeAuthentication oauthAuthUrl(String oauthAuthUrl) { + this.oauthAuthUrl = oauthAuthUrl; + return this; + } + + /** + * Get oauthAuthUrl + * @return oauthAuthUrl + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OAUTH_AUTH_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getOauthAuthUrl() { + return oauthAuthUrl; + } + + + @JsonProperty(JSON_PROPERTY_OAUTH_AUTH_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOauthAuthUrl(String oauthAuthUrl) { + this.oauthAuthUrl = oauthAuthUrl; + } + + + public OauthCodeAuthentication oauthTokenUrl(String oauthTokenUrl) { + this.oauthTokenUrl = oauthTokenUrl; + return this; + } + + /** + * Get oauthTokenUrl + * @return oauthTokenUrl + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OAUTH_TOKEN_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getOauthTokenUrl() { + return oauthTokenUrl; + } + + + @JsonProperty(JSON_PROPERTY_OAUTH_TOKEN_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOauthTokenUrl(String oauthTokenUrl) { + this.oauthTokenUrl = oauthTokenUrl; + } + + + public OauthCodeAuthentication oauthClientSecret(String oauthClientSecret) { + this.oauthClientSecret = oauthClientSecret; + return this; + } + + /** + * Get oauthClientSecret + * @return oauthClientSecret + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OAUTH_CLIENT_SECRET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getOauthClientSecret() { + return oauthClientSecret; + } + + + @JsonProperty(JSON_PROPERTY_OAUTH_CLIENT_SECRET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOauthClientSecret(String oauthClientSecret) { + this.oauthClientSecret = oauthClientSecret; + } + + + public OauthCodeAuthentication code(String code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getCode() { + return code; + } + + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCode(String code) { + this.code = code; + } + + + public OauthCodeAuthentication redirectUri(String redirectUri) { + this.redirectUri = redirectUri; + return this; + } + + /** + * Get redirectUri + * @return redirectUri + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REDIRECT_URI) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getRedirectUri() { + return redirectUri; + } + + + @JsonProperty(JSON_PROPERTY_REDIRECT_URI) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRedirectUri(String redirectUri) { + this.redirectUri = redirectUri; + } + + + public OauthCodeAuthentication type(AuthenticationType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AuthenticationType getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(AuthenticationType type) { + this.type = type; + } + + + /** + * Return true if this OauthCodeAuthentication object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OauthCodeAuthentication oauthCodeAuthentication = (OauthCodeAuthentication) o; + return Objects.equals(this.token, oauthCodeAuthentication.token) && + Objects.equals(this.refreshToken, oauthCodeAuthentication.refreshToken) && + Objects.equals(this.oauthClientId, oauthCodeAuthentication.oauthClientId) && + Objects.equals(this.oauthAuthUrl, oauthCodeAuthentication.oauthAuthUrl) && + Objects.equals(this.oauthTokenUrl, oauthCodeAuthentication.oauthTokenUrl) && + Objects.equals(this.oauthClientSecret, oauthCodeAuthentication.oauthClientSecret) && + Objects.equals(this.code, oauthCodeAuthentication.code) && + Objects.equals(this.redirectUri, oauthCodeAuthentication.redirectUri) && + Objects.equals(this.type, oauthCodeAuthentication.type); + } + + @Override + public int hashCode() { + return Objects.hash(token, refreshToken, oauthClientId, oauthAuthUrl, oauthTokenUrl, oauthClientSecret, code, redirectUri, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OauthCodeAuthentication {\n"); + sb.append(" token: ").append(toIndentedString(token)).append("\n"); + sb.append(" refreshToken: ").append(toIndentedString(refreshToken)).append("\n"); + sb.append(" oauthClientId: ").append(toIndentedString(oauthClientId)).append("\n"); + sb.append(" oauthAuthUrl: ").append(toIndentedString(oauthAuthUrl)).append("\n"); + sb.append(" oauthTokenUrl: ").append(toIndentedString(oauthTokenUrl)).append("\n"); + sb.append(" oauthClientSecret: ").append(toIndentedString(oauthClientSecret)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" redirectUri: ").append(toIndentedString(redirectUri)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/OperationCategory.java b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/OperationCategory.java new file mode 100644 index 000000000..48debfa45 --- /dev/null +++ b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/OperationCategory.java @@ -0,0 +1,64 @@ +/* + * Integrations API + * Manage connectors and operations. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.connectors.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OperationCategory + */ +public enum OperationCategory { + + ALERTS("alerts"), + + RECOMMENDATIONS("recommendations"), + + TRAFFIC_MONITORING("traffic-monitoring"), + + UNKNOWN("unknown"); + + private String value; + + OperationCategory(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OperationCategory fromValue(String value) { + for (OperationCategory b : OperationCategory.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN; + } + +} + diff --git a/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/OperationStatus.java b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/OperationStatus.java new file mode 100644 index 000000000..de723ec72 --- /dev/null +++ b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/OperationStatus.java @@ -0,0 +1,66 @@ +/* + * Integrations API + * Manage connectors and operations. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.connectors.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The connectivity status of the operation to its target endpoint. Indicates whether the operation can successfully connect and communicate with the target URL. Values: 'pending' (initial state, not yet tested), 'connected' (successfully connected), 'failing' (connection or execution issues), 'unverified' (not yet verified/tested). + */ +public enum OperationStatus { + + PENDING("pending"), + + CONNECTED("connected"), + + FAILING("failing"), + + UNVERIFIED("unverified"), + + UNKNOWN("unknown"); + + private String value; + + OperationStatus(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OperationStatus fromValue(String value) { + for (OperationStatus b : OperationStatus.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN; + } + +} + diff --git a/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/OperationType.java b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/OperationType.java new file mode 100644 index 000000000..f611c72a2 --- /dev/null +++ b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/OperationType.java @@ -0,0 +1,60 @@ +/* + * Integrations API + * Manage connectors and operations. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.connectors.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OperationType + */ +public enum OperationType { + + WEBHOOK("webhook"), + + UNKNOWN("unknown"); + + private String value; + + OperationType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OperationType fromValue(String value) { + for (OperationType b : OperationType.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN; + } + +} + diff --git a/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/OtherTokenAuthentication.java b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/OtherTokenAuthentication.java new file mode 100644 index 000000000..9ee540261 --- /dev/null +++ b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/OtherTokenAuthentication.java @@ -0,0 +1,137 @@ +/* + * Integrations API + * Manage connectors and operations. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.connectors.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.thousandeyes.sdk.connectors.model.AuthenticationType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * OtherTokenAuthentication + */ +@JsonPropertyOrder({ + OtherTokenAuthentication.JSON_PROPERTY_TOKEN, + OtherTokenAuthentication.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "com.thousandeyes.api.codegen.ThousandeyesJavaGenerator") +public class OtherTokenAuthentication { + public static final String JSON_PROPERTY_TOKEN = "token"; + private String token; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AuthenticationType type; + + public OtherTokenAuthentication() { + } + + public OtherTokenAuthentication token(String token) { + this.token = token; + return this; + } + + /** + * Get token + * @return token + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOKEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getToken() { + return token; + } + + + @JsonProperty(JSON_PROPERTY_TOKEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setToken(String token) { + this.token = token; + } + + + public OtherTokenAuthentication type(AuthenticationType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public AuthenticationType getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(AuthenticationType type) { + this.type = type; + } + + + /** + * Return true if this OtherTokenAuthentication object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OtherTokenAuthentication otherTokenAuthentication = (OtherTokenAuthentication) o; + return Objects.equals(this.token, otherTokenAuthentication.token) && + Objects.equals(this.type, otherTokenAuthentication.type); + } + + @Override + public int hashCode() { + return Objects.hash(token, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OtherTokenAuthentication {\n"); + sb.append(" token: ").append(toIndentedString(token)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/SelfLinks.java b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/SelfLinks.java new file mode 100644 index 000000000..30f640465 --- /dev/null +++ b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/SelfLinks.java @@ -0,0 +1,106 @@ +/* + * Integrations API + * Manage connectors and operations. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.connectors.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.thousandeyes.sdk.connectors.model.Link; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * A links object containing the self link. + */ +@JsonPropertyOrder({ + SelfLinks.JSON_PROPERTY_SELF +}) +@jakarta.annotation.Generated(value = "com.thousandeyes.api.codegen.ThousandeyesJavaGenerator") +public class SelfLinks { + public static final String JSON_PROPERTY_SELF = "self"; + private Link self; + + public SelfLinks() { + } + + public SelfLinks self(Link self) { + this.self = self; + return this; + } + + /** + * Get self + * @return self + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SELF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Link getSelf() { + return self; + } + + + @JsonProperty(JSON_PROPERTY_SELF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSelf(Link self) { + this.self = self; + } + + + /** + * Return true if this SelfLinks object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SelfLinks selfLinks = (SelfLinks) o; + return Objects.equals(this.self, selfLinks.self); + } + + @Override + public int hashCode() { + return Objects.hash(self); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SelfLinks {\n"); + sb.append(" self: ").append(toIndentedString(self)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/UnauthorizedError.java b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/UnauthorizedError.java new file mode 100644 index 000000000..17c101966 --- /dev/null +++ b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/UnauthorizedError.java @@ -0,0 +1,136 @@ +/* + * Integrations API + * Manage connectors and operations. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.connectors.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * UnauthorizedError + */ +@JsonPropertyOrder({ + UnauthorizedError.JSON_PROPERTY_ERROR, + UnauthorizedError.JSON_PROPERTY_ERROR_DESCRIPTION +}) +@jakarta.annotation.Generated(value = "com.thousandeyes.api.codegen.ThousandeyesJavaGenerator") +public class UnauthorizedError { + public static final String JSON_PROPERTY_ERROR = "error"; + private String error; + + public static final String JSON_PROPERTY_ERROR_DESCRIPTION = "error_description"; + private String errorDescription; + + public UnauthorizedError() { + } + + public UnauthorizedError error(String error) { + this.error = error; + return this; + } + + /** + * Get error + * @return error + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getError() { + return error; + } + + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setError(String error) { + this.error = error; + } + + + public UnauthorizedError errorDescription(String errorDescription) { + this.errorDescription = errorDescription; + return this; + } + + /** + * Get errorDescription + * @return errorDescription + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getErrorDescription() { + return errorDescription; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorDescription(String errorDescription) { + this.errorDescription = errorDescription; + } + + + /** + * Return true if this UnauthorizedError object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnauthorizedError unauthorizedError = (UnauthorizedError) o; + return Objects.equals(this.error, unauthorizedError.error) && + Objects.equals(this.errorDescription, unauthorizedError.errorDescription); + } + + @Override + public int hashCode() { + return Objects.hash(error, errorDescription); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnauthorizedError {\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" errorDescription: ").append(toIndentedString(errorDescription)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/ValidationError.java b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/ValidationError.java new file mode 100644 index 000000000..88c5f6a09 --- /dev/null +++ b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/ValidationError.java @@ -0,0 +1,272 @@ +/* + * Integrations API + * Manage connectors and operations. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.connectors.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.thousandeyes.sdk.connectors.model.ValidationErrorItem; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ValidationError + */ +@JsonPropertyOrder({ + ValidationError.JSON_PROPERTY_TYPE, + ValidationError.JSON_PROPERTY_TITLE, + ValidationError.JSON_PROPERTY_STATUS, + ValidationError.JSON_PROPERTY_DETAIL, + ValidationError.JSON_PROPERTY_INSTANCE, + ValidationError.JSON_PROPERTY_ERRORS +}) +@jakarta.annotation.Generated(value = "com.thousandeyes.api.codegen.ThousandeyesJavaGenerator") +public class ValidationError { + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_TITLE = "title"; + private String title; + + public static final String JSON_PROPERTY_STATUS = "status"; + private Integer status; + + public static final String JSON_PROPERTY_DETAIL = "detail"; + private String detail; + + public static final String JSON_PROPERTY_INSTANCE = "instance"; + private String instance; + + public static final String JSON_PROPERTY_ERRORS = "errors"; + private List errors; + + public ValidationError() { + } + + public ValidationError type(String type) { + this.type = type; + return this; + } + + /** + * A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\". + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + + public ValidationError title(String title) { + this.title = title; + return this; + } + + /** + * A short, human-readable summary of the problem type. + * @return title + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getTitle() { + return title; + } + + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTitle(String title) { + this.title = title; + } + + + public ValidationError status(Integer status) { + this.status = status; + return this; + } + + /** + * The HTTP status code generated by the origin server for this occurrence of the problem. + * @return status + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(Integer status) { + this.status = status; + } + + + public ValidationError detail(String detail) { + this.detail = detail; + return this; + } + + /** + * A human-readable explanation specific to this occurrence of the problem. + * @return detail + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDetail() { + return detail; + } + + + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDetail(String detail) { + this.detail = detail; + } + + + public ValidationError instance(String instance) { + this.instance = instance; + return this; + } + + /** + * A URI reference that identifies the specific occurrence of the problem. + * @return instance + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INSTANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getInstance() { + return instance; + } + + + @JsonProperty(JSON_PROPERTY_INSTANCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInstance(String instance) { + this.instance = instance; + } + + + public ValidationError errors(List errors) { + this.errors = errors; + return this; + } + + public ValidationError addErrorsItem(ValidationErrorItem errorsItem) { + if (this.errors == null) { + this.errors = new ArrayList<>(); + } + this.errors.add(errorsItem); + return this; + } + + /** + * (Optional) When multiple errors occur, the details for each error are listed. + * @return errors + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getErrors() { + return errors; + } + + + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrors(List errors) { + this.errors = errors; + } + + + /** + * Return true if this ValidationError object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ValidationError validationError = (ValidationError) o; + return Objects.equals(this.type, validationError.type) && + Objects.equals(this.title, validationError.title) && + Objects.equals(this.status, validationError.status) && + Objects.equals(this.detail, validationError.detail) && + Objects.equals(this.instance, validationError.instance) && + Objects.equals(this.errors, validationError.errors); + } + + @Override + public int hashCode() { + return Objects.hash(type, title, status, detail, instance, errors); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ValidationError {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); + sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/ValidationErrorItem.java b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/ValidationErrorItem.java new file mode 100644 index 000000000..e241d6e1b --- /dev/null +++ b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/ValidationErrorItem.java @@ -0,0 +1,167 @@ +/* + * Integrations API + * Manage connectors and operations. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.connectors.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ValidationErrorItem + */ +@JsonPropertyOrder({ + ValidationErrorItem.JSON_PROPERTY_CODE, + ValidationErrorItem.JSON_PROPERTY_FIELD, + ValidationErrorItem.JSON_PROPERTY_MESSAGE +}) +@jakarta.annotation.Generated(value = "com.thousandeyes.api.codegen.ThousandeyesJavaGenerator") +public class ValidationErrorItem { + public static final String JSON_PROPERTY_CODE = "code"; + private String code; + + public static final String JSON_PROPERTY_FIELD = "field"; + private String field; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public ValidationErrorItem() { + } + + public ValidationErrorItem code(String code) { + this.code = code; + return this; + } + + /** + * (Optional) A unique error type/code that can be referenced in the documentation for further details. + * @return code + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCode() { + return code; + } + + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCode(String code) { + this.code = code; + } + + + public ValidationErrorItem field(String field) { + this.field = field; + return this; + } + + /** + * Identifies the field that triggered this particular error. + * @return field + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIELD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getField() { + return field; + } + + + @JsonProperty(JSON_PROPERTY_FIELD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setField(String field) { + this.field = field; + } + + + public ValidationErrorItem message(String message) { + this.message = message; + return this; + } + + /** + * A short, human-readable summary of the error. + * @return message + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(String message) { + this.message = message; + } + + + /** + * Return true if this ValidationErrorItem object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ValidationErrorItem validationErrorItem = (ValidationErrorItem) o; + return Objects.equals(this.code, validationErrorItem.code) && + Objects.equals(this.field, validationErrorItem.field) && + Objects.equals(this.message, validationErrorItem.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, field, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ValidationErrorItem {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" field: ").append(toIndentedString(field)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/WebhookOperation.java b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/WebhookOperation.java new file mode 100644 index 000000000..17f7d69db --- /dev/null +++ b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/WebhookOperation.java @@ -0,0 +1,429 @@ +/* + * Integrations API + * Manage connectors and operations. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.connectors.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.thousandeyes.sdk.connectors.model.Header; +import com.thousandeyes.sdk.connectors.model.OperationCategory; +import com.thousandeyes.sdk.connectors.model.OperationStatus; +import com.thousandeyes.sdk.connectors.model.OperationType; +import com.thousandeyes.sdk.connectors.model.SelfLinks; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * WebhookOperation + */ +@JsonPropertyOrder({ + WebhookOperation.JSON_PROPERTY_ID, + WebhookOperation.JSON_PROPERTY_NAME, + WebhookOperation.JSON_PROPERTY_ENABLED, + WebhookOperation.JSON_PROPERTY_CATEGORY, + WebhookOperation.JSON_PROPERTY_STATUS, + WebhookOperation.JSON_PROPERTY_PATH, + WebhookOperation.JSON_PROPERTY_PAYLOAD, + WebhookOperation.JSON_PROPERTY_HEADERS, + WebhookOperation.JSON_PROPERTY_QUERY_PARAMS, + WebhookOperation.JSON_PROPERTY_TYPE, + WebhookOperation.JSON_PROPERTY_LINKS +}) +@jakarta.annotation.Generated(value = "com.thousandeyes.api.codegen.ThousandeyesJavaGenerator") +public class WebhookOperation { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_CATEGORY = "category"; + private OperationCategory category; + + public static final String JSON_PROPERTY_STATUS = "status"; + private OperationStatus status; + + public static final String JSON_PROPERTY_PATH = "path"; + private String path; + + public static final String JSON_PROPERTY_PAYLOAD = "payload"; + private String payload; + + public static final String JSON_PROPERTY_HEADERS = "headers"; + private List
headers = new ArrayList<>(); + + public static final String JSON_PROPERTY_QUERY_PARAMS = "queryParams"; + private String queryParams; + + public static final String JSON_PROPERTY_TYPE = "type"; + private OperationType type; + + public static final String JSON_PROPERTY_LINKS = "_links"; + private SelfLinks links; + + public WebhookOperation() { + } + + @JsonCreator + public WebhookOperation( + @JsonProperty(JSON_PROPERTY_ID) String id + ) { + this(); + this.id = id; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + + + public WebhookOperation name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + + public WebhookOperation enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get enabled + * @return enabled + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getEnabled() { + return enabled; + } + + + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + + public WebhookOperation category(OperationCategory category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CATEGORY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OperationCategory getCategory() { + return category; + } + + + @JsonProperty(JSON_PROPERTY_CATEGORY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCategory(OperationCategory category) { + this.category = category; + } + + + public WebhookOperation status(OperationStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OperationStatus getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(OperationStatus status) { + this.status = status; + } + + + public WebhookOperation path(String path) { + this.path = path; + return this; + } + + /** + * Get path + * @return path + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PATH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPath() { + return path; + } + + + @JsonProperty(JSON_PROPERTY_PATH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPath(String path) { + this.path = path; + } + + + public WebhookOperation payload(String payload) { + this.payload = payload; + return this; + } + + /** + * Handlebars template for the payload. + * @return payload + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAYLOAD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPayload() { + return payload; + } + + + @JsonProperty(JSON_PROPERTY_PAYLOAD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayload(String payload) { + this.payload = payload; + } + + + public WebhookOperation headers(List
headers) { + this.headers = headers; + return this; + } + + public WebhookOperation addHeadersItem(Header headersItem) { + if (this.headers == null) { + this.headers = new ArrayList<>(); + } + this.headers.add(headersItem); + return this; + } + + /** + * Get headers + * @return headers + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HEADERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List
getHeaders() { + return headers; + } + + + @JsonProperty(JSON_PROPERTY_HEADERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHeaders(List
headers) { + this.headers = headers; + } + + + public WebhookOperation queryParams(String queryParams) { + this.queryParams = queryParams; + return this; + } + + /** + * Handlebars template for the query params. Most compile into a proper JSON object where each object property will define the query param name and the object property value define the corresponding query param value. + * @return queryParams + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getQueryParams() { + return queryParams; + } + + + @JsonProperty(JSON_PROPERTY_QUERY_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setQueryParams(String queryParams) { + this.queryParams = queryParams; + } + + + public WebhookOperation type(OperationType type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OperationType getType() { + return type; + } + + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(OperationType type) { + this.type = type; + } + + + public WebhookOperation links(SelfLinks links) { + this.links = links; + return this; + } + + /** + * Get links + * @return links + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SelfLinks getLinks() { + return links; + } + + + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLinks(SelfLinks links) { + this.links = links; + } + + + /** + * Return true if this WebhookOperation object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebhookOperation webhookOperation = (WebhookOperation) o; + return Objects.equals(this.id, webhookOperation.id) && + Objects.equals(this.name, webhookOperation.name) && + Objects.equals(this.enabled, webhookOperation.enabled) && + Objects.equals(this.category, webhookOperation.category) && + Objects.equals(this.status, webhookOperation.status) && + Objects.equals(this.path, webhookOperation.path) && + Objects.equals(this.payload, webhookOperation.payload) && + Objects.equals(this.headers, webhookOperation.headers) && + Objects.equals(this.queryParams, webhookOperation.queryParams) && + Objects.equals(this.type, webhookOperation.type) && + Objects.equals(this.links, webhookOperation.links); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, enabled, category, status, path, payload, headers, queryParams, type, links); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookOperation {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" path: ").append(toIndentedString(path)).append("\n"); + sb.append(" payload: ").append(toIndentedString(payload)).append("\n"); + sb.append(" headers: ").append(toIndentedString(headers)).append("\n"); + sb.append(" queryParams: ").append(toIndentedString(queryParams)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/WebhookOperations.java b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/WebhookOperations.java new file mode 100644 index 000000000..0ad724d1d --- /dev/null +++ b/connectors/src/main/java/com/thousandeyes/sdk/connectors/model/WebhookOperations.java @@ -0,0 +1,149 @@ +/* + * Integrations API + * Manage connectors and operations. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.connectors.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.thousandeyes.sdk.connectors.model.SelfLinks; +import com.thousandeyes.sdk.connectors.model.WebhookOperation; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * WebhookOperations + */ +@JsonPropertyOrder({ + WebhookOperations.JSON_PROPERTY_ITEMS, + WebhookOperations.JSON_PROPERTY_LINKS +}) +@jakarta.annotation.Generated(value = "com.thousandeyes.api.codegen.ThousandeyesJavaGenerator") +public class WebhookOperations { + public static final String JSON_PROPERTY_ITEMS = "items"; + private List items = new ArrayList<>(); + + public static final String JSON_PROPERTY_LINKS = "_links"; + private SelfLinks links; + + public WebhookOperations() { + } + + public WebhookOperations items(List items) { + this.items = items; + return this; + } + + public WebhookOperations addItemsItem(WebhookOperation itemsItem) { + if (this.items == null) { + this.items = new ArrayList<>(); + } + this.items.add(itemsItem); + return this; + } + + /** + * Get items + * @return items + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ITEMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getItems() { + return items; + } + + + @JsonProperty(JSON_PROPERTY_ITEMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setItems(List items) { + this.items = items; + } + + + public WebhookOperations links(SelfLinks links) { + this.links = links; + return this; + } + + /** + * Get links + * @return links + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SelfLinks getLinks() { + return links; + } + + + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLinks(SelfLinks links) { + this.links = links; + } + + + /** + * Return true if this WebhookOperations object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebhookOperations webhookOperations = (WebhookOperations) o; + return Objects.equals(this.items, webhookOperations.items) && + Objects.equals(this.links, webhookOperations.links); + } + + @Override + public int hashCode() { + return Objects.hash(items, links); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookOperations {\n"); + sb.append(" items: ").append(toIndentedString(items)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/connectors/src/test/java/com/thousandeyes/sdk/connectors/GenericConnectorsApiTest.java b/connectors/src/test/java/com/thousandeyes/sdk/connectors/GenericConnectorsApiTest.java new file mode 100644 index 000000000..cdd59cb38 --- /dev/null +++ b/connectors/src/test/java/com/thousandeyes/sdk/connectors/GenericConnectorsApiTest.java @@ -0,0 +1,505 @@ +/* + * Integrations API + * Manage connectors and operations. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.connectors; + +import com.thousandeyes.sdk.connectors.model.Assignments; +import com.thousandeyes.sdk.connectors.model.Error; +import com.thousandeyes.sdk.connectors.model.GenericConnector; +import com.thousandeyes.sdk.connectors.model.GenericConnectors; +import com.thousandeyes.sdk.connectors.model.UnauthorizedError; +import com.thousandeyes.sdk.connectors.model.ValidationError; +import static com.github.tomakehurst.wiremock.client.WireMock.*; +import static com.github.tomakehurst.wiremock.common.ContentTypes.AUTHORIZATION; +import static com.github.tomakehurst.wiremock.common.ContentTypes.CONTENT_TYPE; +import static com.thousandeyes.sdk.serialization.JSON.getDefault; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; + +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +import com.fasterxml.jackson.core.JsonProcessingException; + +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.github.tomakehurst.wiremock.junit5.WireMockRuntimeInfo; +import com.github.tomakehurst.wiremock.junit5.WireMockTest; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.client.ApiException; +import com.thousandeyes.sdk.client.NativeApiClient; + + +/** + * Request and Response model deserialization tests for GenericConnectorsApi + */ +@WireMockTest +public class GenericConnectorsApiTest { + private static final String TOKEN = "valid-token"; + private static final String BEARER_TOKEN = "Bearer %s".formatted(TOKEN); + private static GenericConnectorsApi api; + private final ObjectMapper mapper = getDefault() + .getMapper() + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true); + + @BeforeAll + public static void setup(WireMockRuntimeInfo wireMockRuntimeInfo) { + ApiClient client = NativeApiClient.builder() + .baseUri(wireMockRuntimeInfo.getHttpBaseUrl()) + .bearerToken(TOKEN) + .build(); + api = new GenericConnectorsApi(client); + } + + /** + * Create connector + *

+ * Creates a new connector. + * + * @throws JsonProcessingException if the deserialization fails + */ + @Test + public void createGenericConnectorRequestAndResponseDeserializationTest() + throws JsonProcessingException, ApiException + { + + var requestBodyJson = """ + { + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + }, { + "name" : "Content-Type", + "value" : "application/json" + } ], + "lastModifiedDate" : 1770293655756, + "name" : "Cisco Slack", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "type" : "generic", + "target" : "https://hooks.slack.com/services/abc/xyz", + "authentication" : { + "password" : "abc123", + "type" : "basic", + "username" : "user1" + } + } + """; + var requestBodyContentType = "application/json"; + GenericConnector mappedRequest = + mapper.readValue(requestBodyJson, GenericConnector.class); + assertNotNull(mappedRequest); + + var responseBodyJson = """ + { + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + }, { + "name" : "Content-Type", + "value" : "application/json" + } ], + "lastModifiedDate" : 1770293655756, + "name" : "Cisco Slack", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "type" : "generic", + "target" : "https://hooks.slack.com/services/abc/xyz", + "authentication" : { + "password" : "abc123", + "type" : "basic", + "username" : "user1" + } + } + """; + var statusCode = 201; + var responseContentType = "application/json"; + GenericConnector mappedResponse = + mapper.readValue(responseBodyJson, GenericConnector.class); + assertNotNull(mappedResponse); + + var path = "/connectors/generic"; + stubFor(post(urlPathTemplate(path)) + .withHeader(AUTHORIZATION, equalTo(BEARER_TOKEN)) + .withHeader(CONTENT_TYPE, equalTo(requestBodyContentType)) + .withRequestBody(equalToJson(requestBodyJson)) + .willReturn(aResponse() + .withHeader(CONTENT_TYPE, responseContentType) + .withBody(responseBodyJson) + .withStatus(statusCode))); + + var apiResponse = api.createGenericConnector(mappedRequest, null); + assertEquals(mappedResponse, apiResponse); + } + + /** + * Delete connector + *

+ * Deletes the connector specified by ID. + * + * @throws JsonProcessingException if the deserialization fails + */ + @Test + public void deleteGenericConnectorRequestAndResponseDeserializationTest() + throws JsonProcessingException, ApiException + { + String id = "cb1b8033-ea2d-4e9b-a920-fe87850693cf"; + + + var statusCode = 204; + + var path = "/connectors/generic/{id}"; + stubFor(delete(urlPathTemplate(path)) + .withPathParam("id", equalTo(URLEncoder.encode(id, StandardCharsets.UTF_8))) + .withHeader(AUTHORIZATION, equalTo(BEARER_TOKEN)) + .willReturn(aResponse() + .withStatus(statusCode))); + + var apiResponse = api.deleteGenericConnectorWithHttpInfo(id, null); + assertEquals(statusCode, apiResponse.getStatusCode()); + } + + /** + * Retrieve connector + *

+ * Retrieves details of a connector by its ID. + * + * @throws JsonProcessingException if the deserialization fails + */ + @Test + public void getGenericConnectorRequestAndResponseDeserializationTest() + throws JsonProcessingException, ApiException + { + String id = "cb1b8033-ea2d-4e9b-a920-fe87850693cf"; + + + var responseBodyJson = """ + { + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + }, { + "name" : "Content-Type", + "value" : "application/json" + } ], + "lastModifiedDate" : 1770293655756, + "name" : "Cisco Slack", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "type" : "generic", + "target" : "https://hooks.slack.com/services/abc/xyz", + "authentication" : { + "password" : "abc123", + "type" : "basic", + "username" : "user1" + } + } + """; + var statusCode = 200; + var responseContentType = "application/json"; + GenericConnector mappedResponse = + mapper.readValue(responseBodyJson, GenericConnector.class); + assertNotNull(mappedResponse); + + var path = "/connectors/generic/{id}"; + stubFor(get(urlPathTemplate(path)) + .withPathParam("id", equalTo(URLEncoder.encode(id, StandardCharsets.UTF_8))) + .withHeader(AUTHORIZATION, equalTo(BEARER_TOKEN)) + .willReturn(aResponse() + .withHeader(CONTENT_TYPE, responseContentType) + .withBody(responseBodyJson) + .withStatus(statusCode))); + + var apiResponse = api.getGenericConnector(id, null); + assertEquals(mappedResponse, apiResponse); + } + + /** + * List connectors + *

+ * Returns a list of connectors in the specified account group. If no account group is specified, the user’s default account group is used. + * + * @throws JsonProcessingException if the deserialization fails + */ + @Test + public void getGenericConnectorsRequestAndResponseDeserializationTest() + throws JsonProcessingException, ApiException + { + + + var responseBodyJson = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "items" : [ { + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + }, { + "name" : "Content-Type", + "value" : "application/json" + } ], + "lastModifiedDate" : 1770293655756, + "name" : "Cisco Slack", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "type" : "generic", + "target" : "https://hooks.slack.com/services/abc/xyz", + "authentication" : { + "password" : "abc123", + "type" : "basic", + "username" : "user1" + } + }, { + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + }, { + "name" : "Content-Type", + "value" : "application/json" + } ], + "lastModifiedDate" : 1770293655756, + "name" : "Cisco Slack", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "type" : "generic", + "target" : "https://hooks.slack.com/services/abc/xyz", + "authentication" : { + "password" : "abc123", + "type" : "basic", + "username" : "user1" + } + } ] + } + """; + var statusCode = 200; + var responseContentType = "application/json"; + GenericConnectors mappedResponse = + mapper.readValue(responseBodyJson, GenericConnectors.class); + assertNotNull(mappedResponse); + + var path = "/connectors/generic"; + stubFor(get(urlPathTemplate(path)) + .withHeader(AUTHORIZATION, equalTo(BEARER_TOKEN)) + .willReturn(aResponse() + .withHeader(CONTENT_TYPE, responseContentType) + .withBody(responseBodyJson) + .withStatus(statusCode))); + + var apiResponse = api.getGenericConnectors(null); + assertEquals(mappedResponse, apiResponse); + } + + /** + * List operation IDs assigned to a connector + *

+ * Returns a list of operation IDs assigned to a connector. + * + * @throws JsonProcessingException if the deserialization fails + */ + @Test + public void listGenericConnectorOperationsRequestAndResponseDeserializationTest() + throws JsonProcessingException, ApiException + { + String id = "cb1b8033-ea2d-4e9b-a920-fe87850693cf"; + + + var responseBodyJson = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "items" : [ "ca39314d-eb4f-496f-9435-b5d20b1bfbff", "ca39314d-eb4f-496f-9435-b5d20b1bfbff" ] + } + """; + var statusCode = 200; + var responseContentType = "application/json"; + Assignments mappedResponse = + mapper.readValue(responseBodyJson, Assignments.class); + assertNotNull(mappedResponse); + + var path = "/connectors/generic/{id}/operations"; + stubFor(get(urlPathTemplate(path)) + .withPathParam("id", equalTo(URLEncoder.encode(id, StandardCharsets.UTF_8))) + .withHeader(AUTHORIZATION, equalTo(BEARER_TOKEN)) + .willReturn(aResponse() + .withHeader(CONTENT_TYPE, responseContentType) + .withBody(responseBodyJson) + .withStatus(statusCode))); + + var apiResponse = api.listGenericConnectorOperations(id, null); + assertEquals(mappedResponse, apiResponse); + } + + /** + * Assign operations to a connector + *

+ * Assigns operations to a connector. This replaces any existing assignments. + * + * @throws JsonProcessingException if the deserialization fails + */ + @Test + public void setGenericConnectorOperationsRequestAndResponseDeserializationTest() + throws JsonProcessingException, ApiException + { + String id = "cb1b8033-ea2d-4e9b-a920-fe87850693cf"; + + var requestBodyJson = """ + """; + List<String> mappedRequest = + mapper.readValue(requestBodyJson, List<String>.class); + assertNotNull(mappedRequest); + + var responseBodyJson = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "items" : [ "ca39314d-eb4f-496f-9435-b5d20b1bfbff", "ca39314d-eb4f-496f-9435-b5d20b1bfbff" ] + } + """; + var statusCode = 200; + var responseContentType = "application/json"; + Assignments mappedResponse = + mapper.readValue(responseBodyJson, Assignments.class); + assertNotNull(mappedResponse); + + var path = "/connectors/generic/{id}/operations"; + stubFor(put(urlPathTemplate(path)) + .withPathParam("id", equalTo(URLEncoder.encode(id, StandardCharsets.UTF_8))) + .withHeader(AUTHORIZATION, equalTo(BEARER_TOKEN)) + .withHeader(CONTENT_TYPE, equalTo(requestBodyContentType)) + .withRequestBody(equalToJson(requestBodyJson)) + .willReturn(aResponse() + .withHeader(CONTENT_TYPE, responseContentType) + .withBody(responseBodyJson) + .withStatus(statusCode))); + + var apiResponse = api.setGenericConnectorOperations(id, mappedRequest, null); + assertEquals(mappedResponse, apiResponse); + } + + /** + * Update connector + *

+ * Updates the connector specified by ID. + * + * @throws JsonProcessingException if the deserialization fails + */ + @Test + public void updateGenericConnectorRequestAndResponseDeserializationTest() + throws JsonProcessingException, ApiException + { + String id = "cb1b8033-ea2d-4e9b-a920-fe87850693cf"; + + var requestBodyJson = """ + { + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + }, { + "name" : "Content-Type", + "value" : "application/json" + } ], + "lastModifiedDate" : 1770293655756, + "name" : "Cisco Slack", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "type" : "generic", + "target" : "https://hooks.slack.com/services/abc/xyz", + "authentication" : { + "password" : "abc123", + "type" : "basic", + "username" : "user1" + } + } + """; + var requestBodyContentType = "application/json"; + GenericConnector mappedRequest = + mapper.readValue(requestBodyJson, GenericConnector.class); + assertNotNull(mappedRequest); + + var responseBodyJson = """ + { + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + }, { + "name" : "Content-Type", + "value" : "application/json" + } ], + "lastModifiedDate" : 1770293655756, + "name" : "Cisco Slack", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "type" : "generic", + "target" : "https://hooks.slack.com/services/abc/xyz", + "authentication" : { + "password" : "abc123", + "type" : "basic", + "username" : "user1" + } + } + """; + var statusCode = 200; + var responseContentType = "application/json"; + GenericConnector mappedResponse = + mapper.readValue(responseBodyJson, GenericConnector.class); + assertNotNull(mappedResponse); + + var path = "/connectors/generic/{id}"; + stubFor(put(urlPathTemplate(path)) + .withPathParam("id", equalTo(URLEncoder.encode(id, StandardCharsets.UTF_8))) + .withHeader(AUTHORIZATION, equalTo(BEARER_TOKEN)) + .withHeader(CONTENT_TYPE, equalTo(requestBodyContentType)) + .withRequestBody(equalToJson(requestBodyJson)) + .willReturn(aResponse() + .withHeader(CONTENT_TYPE, responseContentType) + .withBody(responseBodyJson) + .withStatus(statusCode))); + + var apiResponse = api.updateGenericConnector(id, mappedRequest, null); + assertEquals(mappedResponse, apiResponse); + } + +} diff --git a/connectors/src/test/java/com/thousandeyes/sdk/connectors/OperationConnectorsApiTest.java b/connectors/src/test/java/com/thousandeyes/sdk/connectors/OperationConnectorsApiTest.java new file mode 100644 index 000000000..4901e4fb6 --- /dev/null +++ b/connectors/src/test/java/com/thousandeyes/sdk/connectors/OperationConnectorsApiTest.java @@ -0,0 +1,182 @@ +/* + * Integrations API + * Manage connectors and operations. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.connectors; + +import com.thousandeyes.sdk.connectors.model.Assignments; +import com.thousandeyes.sdk.connectors.model.Error; +import com.thousandeyes.sdk.connectors.model.UnauthorizedError; +import com.thousandeyes.sdk.connectors.model.ValidationError; +import static com.github.tomakehurst.wiremock.client.WireMock.*; +import static com.github.tomakehurst.wiremock.common.ContentTypes.AUTHORIZATION; +import static com.github.tomakehurst.wiremock.common.ContentTypes.CONTENT_TYPE; +import static com.thousandeyes.sdk.serialization.JSON.getDefault; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; + +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +import com.fasterxml.jackson.core.JsonProcessingException; + +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.github.tomakehurst.wiremock.junit5.WireMockRuntimeInfo; +import com.github.tomakehurst.wiremock.junit5.WireMockTest; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.client.ApiException; +import com.thousandeyes.sdk.client.NativeApiClient; + + +/** + * Request and Response model deserialization tests for OperationConnectorsApi + */ +@WireMockTest +public class OperationConnectorsApiTest { + private static final String TOKEN = "valid-token"; + private static final String BEARER_TOKEN = "Bearer %s".formatted(TOKEN); + private static OperationConnectorsApi api; + private final ObjectMapper mapper = getDefault() + .getMapper() + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true); + + @BeforeAll + public static void setup(WireMockRuntimeInfo wireMockRuntimeInfo) { + ApiClient client = NativeApiClient.builder() + .baseUri(wireMockRuntimeInfo.getHttpBaseUrl()) + .bearerToken(TOKEN) + .build(); + api = new OperationConnectorsApi(client); + } + + /** + * Retrieve connectors assigned to an operation + *

+ * Returns a list of connectors assigned to a specific operation. + * + * @throws JsonProcessingException if the deserialization fails + */ + @Test + public void getOperationConnectorsRequestAndResponseDeserializationTest() + throws JsonProcessingException, ApiException + { + String type = "webhooks"; + String id = "cb1b8033-ea2d-4e9b-a920-fe87850693cf"; + + + var responseBodyJson = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "items" : [ "ca39314d-eb4f-496f-9435-b5d20b1bfbff", "ca39314d-eb4f-496f-9435-b5d20b1bfbff" ] + } + """; + var statusCode = 200; + var responseContentType = "application/json"; + Assignments mappedResponse = + mapper.readValue(responseBodyJson, Assignments.class); + assertNotNull(mappedResponse); + + var path = "/operations/{type}/{id}/connectors"; + stubFor(get(urlPathTemplate(path)) + .withPathParam("type", equalTo(URLEncoder.encode(type, StandardCharsets.UTF_8))) + .withPathParam("id", equalTo(URLEncoder.encode(id, StandardCharsets.UTF_8))) + .withHeader(AUTHORIZATION, equalTo(BEARER_TOKEN)) + .willReturn(aResponse() + .withHeader(CONTENT_TYPE, responseContentType) + .withBody(responseBodyJson) + .withStatus(statusCode))); + + var apiResponse = api.getOperationConnectors(type, id, null); + assertEquals(mappedResponse, apiResponse); + } + + /** + * Assign connectors to an operation + *

+ * Assigns one or more connectors to an operation. This replaces any existing assignments. + * + * @throws JsonProcessingException if the deserialization fails + */ + @Test + public void setOperationConnectorsRequestAndResponseDeserializationTest() + throws JsonProcessingException, ApiException + { + String type = "webhooks"; + String id = "cb1b8033-ea2d-4e9b-a920-fe87850693cf"; + + var requestBodyJson = """ + """; + List<String> mappedRequest = + mapper.readValue(requestBodyJson, List<String>.class); + assertNotNull(mappedRequest); + + var responseBodyJson = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "items" : [ "ca39314d-eb4f-496f-9435-b5d20b1bfbff", "ca39314d-eb4f-496f-9435-b5d20b1bfbff" ] + } + """; + var statusCode = 200; + var responseContentType = "application/json"; + Assignments mappedResponse = + mapper.readValue(responseBodyJson, Assignments.class); + assertNotNull(mappedResponse); + + var path = "/operations/{type}/{id}/connectors"; + stubFor(put(urlPathTemplate(path)) + .withPathParam("type", equalTo(URLEncoder.encode(type, StandardCharsets.UTF_8))) + .withPathParam("id", equalTo(URLEncoder.encode(id, StandardCharsets.UTF_8))) + .withHeader(AUTHORIZATION, equalTo(BEARER_TOKEN)) + .withHeader(CONTENT_TYPE, equalTo(requestBodyContentType)) + .withRequestBody(equalToJson(requestBodyJson)) + .willReturn(aResponse() + .withHeader(CONTENT_TYPE, responseContentType) + .withBody(responseBodyJson) + .withStatus(statusCode))); + + var apiResponse = api.setOperationConnectors(type, id, mappedRequest, null); + assertEquals(mappedResponse, apiResponse); + } + +} diff --git a/connectors/src/test/java/com/thousandeyes/sdk/connectors/WebhookOperationsApiTest.java b/connectors/src/test/java/com/thousandeyes/sdk/connectors/WebhookOperationsApiTest.java new file mode 100644 index 000000000..53fbd41b2 --- /dev/null +++ b/connectors/src/test/java/com/thousandeyes/sdk/connectors/WebhookOperationsApiTest.java @@ -0,0 +1,453 @@ +/* + * Integrations API + * Manage connectors and operations. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.connectors; + +import com.thousandeyes.sdk.connectors.model.Error; +import com.thousandeyes.sdk.connectors.model.UnauthorizedError; +import com.thousandeyes.sdk.connectors.model.ValidationError; +import com.thousandeyes.sdk.connectors.model.WebhookOperation; +import com.thousandeyes.sdk.connectors.model.WebhookOperations; +import static com.github.tomakehurst.wiremock.client.WireMock.*; +import static com.github.tomakehurst.wiremock.common.ContentTypes.AUTHORIZATION; +import static com.github.tomakehurst.wiremock.common.ContentTypes.CONTENT_TYPE; +import static com.thousandeyes.sdk.serialization.JSON.getDefault; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; + +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +import com.fasterxml.jackson.core.JsonProcessingException; + +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.github.tomakehurst.wiremock.junit5.WireMockRuntimeInfo; +import com.github.tomakehurst.wiremock.junit5.WireMockTest; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.thousandeyes.sdk.client.ApiClient; +import com.thousandeyes.sdk.client.ApiException; +import com.thousandeyes.sdk.client.NativeApiClient; + + +/** + * Request and Response model deserialization tests for WebhookOperationsApi + */ +@WireMockTest +public class WebhookOperationsApiTest { + private static final String TOKEN = "valid-token"; + private static final String BEARER_TOKEN = "Bearer %s".formatted(TOKEN); + private static WebhookOperationsApi api; + private final ObjectMapper mapper = getDefault() + .getMapper() + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true); + + @BeforeAll + public static void setup(WireMockRuntimeInfo wireMockRuntimeInfo) { + ApiClient client = NativeApiClient.builder() + .baseUri(wireMockRuntimeInfo.getHttpBaseUrl()) + .bearerToken(TOKEN) + .build(); + api = new WebhookOperationsApi(client); + } + + /** + * Create webhook operation + *

+ * Creates a new webhook operation. + * + * @throws JsonProcessingException if the deserialization fails + */ + @Test + public void createWebhookOperationRequestAndResponseDeserializationTest() + throws JsonProcessingException, ApiException + { + + var requestBodyJson = """ + { + "path" : "/custom/path", + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + } ], + "payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}", + "queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}", + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "name" : "My operation", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "category" : "alerts", + "type" : "webhook", + "enabled" : true, + "status" : "pending" + } + """; + var requestBodyContentType = "application/json"; + WebhookOperation mappedRequest = + mapper.readValue(requestBodyJson, WebhookOperation.class); + assertNotNull(mappedRequest); + + var responseBodyJson = """ + { + "path" : "/custom/path", + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + } ], + "payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}", + "queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}", + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "name" : "My operation", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "category" : "alerts", + "type" : "webhook", + "enabled" : true, + "status" : "pending" + } + """; + var statusCode = 201; + var responseContentType = "application/json"; + WebhookOperation mappedResponse = + mapper.readValue(responseBodyJson, WebhookOperation.class); + assertNotNull(mappedResponse); + + var path = "/operations/webhooks"; + stubFor(post(urlPathTemplate(path)) + .withHeader(AUTHORIZATION, equalTo(BEARER_TOKEN)) + .withHeader(CONTENT_TYPE, equalTo(requestBodyContentType)) + .withRequestBody(equalToJson(requestBodyJson)) + .willReturn(aResponse() + .withHeader(CONTENT_TYPE, responseContentType) + .withBody(responseBodyJson) + .withStatus(statusCode))); + + var apiResponse = api.createWebhookOperation(mappedRequest, null); + assertEquals(mappedResponse, apiResponse); + } + + /** + * Delete webhook operation + *

+ * Deletes the webhook operation specified by ID. + * + * @throws JsonProcessingException if the deserialization fails + */ + @Test + public void deleteWebhookOperationRequestAndResponseDeserializationTest() + throws JsonProcessingException, ApiException + { + String id = "cb1b8033-ea2d-4e9b-a920-fe87850693cf"; + + + var statusCode = 204; + + var path = "/operations/webhooks/{id}"; + stubFor(delete(urlPathTemplate(path)) + .withPathParam("id", equalTo(URLEncoder.encode(id, StandardCharsets.UTF_8))) + .withHeader(AUTHORIZATION, equalTo(BEARER_TOKEN)) + .willReturn(aResponse() + .withStatus(statusCode))); + + var apiResponse = api.deleteWebhookOperationWithHttpInfo(id, null); + assertEquals(statusCode, apiResponse.getStatusCode()); + } + + /** + * Retrieve webhook operation + *

+ * Retrieves details of a webhook operation by its ID. + * + * @throws JsonProcessingException if the deserialization fails + */ + @Test + public void getWebhookOperationRequestAndResponseDeserializationTest() + throws JsonProcessingException, ApiException + { + String id = "cb1b8033-ea2d-4e9b-a920-fe87850693cf"; + + + var responseBodyJson = """ + { + "path" : "/custom/path", + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + } ], + "payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}", + "queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}", + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "name" : "My operation", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "category" : "alerts", + "type" : "webhook", + "enabled" : true, + "status" : "pending" + } + """; + var statusCode = 200; + var responseContentType = "application/json"; + WebhookOperation mappedResponse = + mapper.readValue(responseBodyJson, WebhookOperation.class); + assertNotNull(mappedResponse); + + var path = "/operations/webhooks/{id}"; + stubFor(get(urlPathTemplate(path)) + .withPathParam("id", equalTo(URLEncoder.encode(id, StandardCharsets.UTF_8))) + .withHeader(AUTHORIZATION, equalTo(BEARER_TOKEN)) + .willReturn(aResponse() + .withHeader(CONTENT_TYPE, responseContentType) + .withBody(responseBodyJson) + .withStatus(statusCode))); + + var apiResponse = api.getWebhookOperation(id, null); + assertEquals(mappedResponse, apiResponse); + } + + /** + * List webhook operations + *

+ * Returns a list of webhook operations in the specified account group. If no account group is specified, the user’s default account group is used. + * + * @throws JsonProcessingException if the deserialization fails + */ + @Test + public void getWebhookOperationsRequestAndResponseDeserializationTest() + throws JsonProcessingException, ApiException + { + + + var responseBodyJson = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "items" : [ { + "path" : "/custom/path", + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + } ], + "payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}", + "queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}", + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "name" : "My operation", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "category" : "alerts", + "type" : "webhook", + "enabled" : true, + "status" : "pending" + }, { + "path" : "/custom/path", + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + } ], + "payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}", + "queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}", + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "name" : "My operation", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "category" : "alerts", + "type" : "webhook", + "enabled" : true, + "status" : "pending" + } ] + } + """; + var statusCode = 200; + var responseContentType = "application/json"; + WebhookOperations mappedResponse = + mapper.readValue(responseBodyJson, WebhookOperations.class); + assertNotNull(mappedResponse); + + var path = "/operations/webhooks"; + stubFor(get(urlPathTemplate(path)) + .withHeader(AUTHORIZATION, equalTo(BEARER_TOKEN)) + .willReturn(aResponse() + .withHeader(CONTENT_TYPE, responseContentType) + .withBody(responseBodyJson) + .withStatus(statusCode))); + + var apiResponse = api.getWebhookOperations(null); + assertEquals(mappedResponse, apiResponse); + } + + /** + * Update webhook operation + *

+ * Updates the webhook operation specified by ID. + * + * @throws JsonProcessingException if the deserialization fails + */ + @Test + public void updateWebhookOperationRequestAndResponseDeserializationTest() + throws JsonProcessingException, ApiException + { + String id = "cb1b8033-ea2d-4e9b-a920-fe87850693cf"; + + var requestBodyJson = """ + { + "path" : "/custom/path", + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + } ], + "payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}", + "queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}", + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "name" : "My operation", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "category" : "alerts", + "type" : "webhook", + "enabled" : true, + "status" : "pending" + } + """; + var requestBodyContentType = "application/json"; + WebhookOperation mappedRequest = + mapper.readValue(requestBodyJson, WebhookOperation.class); + assertNotNull(mappedRequest); + + var responseBodyJson = """ + { + "path" : "/custom/path", + "headers" : [ { + "name" : "Content-Type", + "value" : "application/json" + } ], + "payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}", + "queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}", + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "name" : "My operation", + "id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf", + "category" : "alerts", + "type" : "webhook", + "enabled" : true, + "status" : "pending" + } + """; + var statusCode = 200; + var responseContentType = "application/json"; + WebhookOperation mappedResponse = + mapper.readValue(responseBodyJson, WebhookOperation.class); + assertNotNull(mappedResponse); + + var path = "/operations/webhooks/{id}"; + stubFor(put(urlPathTemplate(path)) + .withPathParam("id", equalTo(URLEncoder.encode(id, StandardCharsets.UTF_8))) + .withHeader(AUTHORIZATION, equalTo(BEARER_TOKEN)) + .withHeader(CONTENT_TYPE, equalTo(requestBodyContentType)) + .withRequestBody(equalToJson(requestBodyJson)) + .willReturn(aResponse() + .withHeader(CONTENT_TYPE, responseContentType) + .withBody(responseBodyJson) + .withStatus(statusCode))); + + var apiResponse = api.updateWebhookOperation(id, mappedRequest, null); + assertEquals(mappedResponse, apiResponse); + } + +} diff --git a/credentials/README.md b/credentials/README.md index 3512ef734..9e21c7a4f 100644 --- a/credentials/README.md +++ b/credentials/README.md @@ -2,7 +2,7 @@ Credentials API -- API version: 7.0.75 +- API version: 7.0.78 Manage credentials for transaction tests using the Credentials API. diff --git a/dashboards/README.md b/dashboards/README.md index e0abc0af9..07841dd89 100644 --- a/dashboards/README.md +++ b/dashboards/README.md @@ -2,7 +2,7 @@ Dashboards API -- API version: 7.0.75 +- API version: 7.0.78 Manage ThousandEyes Dashboards. diff --git a/emulation/README.md b/emulation/README.md index 2f8a5ba0a..7e66bc363 100644 --- a/emulation/README.md +++ b/emulation/README.md @@ -2,7 +2,7 @@ Emulation API -- API version: 7.0.75 +- API version: 7.0.78 The Emulation API facilitates the retrieval of user-agent strings for HTTP, pageload, and transaction tests. It also enables the retrieval and addition of emulated devices for pageload and transaction tests. diff --git a/endpoint-agents/.openapi-generator/FILES b/endpoint-agents/.openapi-generator/FILES index f97ab026a..cbbfc65b7 100644 --- a/endpoint-agents/.openapi-generator/FILES +++ b/endpoint-agents/.openapi-generator/FILES @@ -18,9 +18,12 @@ src/main/java/com/thousandeyes/sdk/endpoint/agents/model/AgentThresholdFilters.j src/main/java/com/thousandeyes/sdk/endpoint/agents/model/AgentTransfer.java src/main/java/com/thousandeyes/sdk/endpoint/agents/model/AgentTransferRequest.java src/main/java/com/thousandeyes/sdk/endpoint/agents/model/AgentTransferStatus.java +src/main/java/com/thousandeyes/sdk/endpoint/agents/model/BatteryLevel.java +src/main/java/com/thousandeyes/sdk/endpoint/agents/model/BatteryMetrics.java src/main/java/com/thousandeyes/sdk/endpoint/agents/model/BrowserType.java src/main/java/com/thousandeyes/sdk/endpoint/agents/model/BulkAgentTransferRequest.java src/main/java/com/thousandeyes/sdk/endpoint/agents/model/BulkAgentTransferResponse.java +src/main/java/com/thousandeyes/sdk/endpoint/agents/model/CellularProfile.java src/main/java/com/thousandeyes/sdk/endpoint/agents/model/ConditionalOperator.java src/main/java/com/thousandeyes/sdk/endpoint/agents/model/ConnectionString.java src/main/java/com/thousandeyes/sdk/endpoint/agents/model/EndpointAgent.java diff --git a/endpoint-agents/README.md b/endpoint-agents/README.md index 518b157c7..d7bd9b35c 100644 --- a/endpoint-agents/README.md +++ b/endpoint-agents/README.md @@ -2,7 +2,7 @@ Endpoint Agents API -- API version: 7.0.75 +- API version: 7.0.78 Manage ThousandEyes Endpoint Agents using this API. diff --git a/endpoint-agents/src/main/java/com/thousandeyes/sdk/endpoint/agents/model/BatteryLevel.java b/endpoint-agents/src/main/java/com/thousandeyes/sdk/endpoint/agents/model/BatteryLevel.java new file mode 100644 index 000000000..495915ad4 --- /dev/null +++ b/endpoint-agents/src/main/java/com/thousandeyes/sdk/endpoint/agents/model/BatteryLevel.java @@ -0,0 +1,64 @@ +/* + * Endpoint Agents API + * Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.endpoint.agents.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Battery level indicator. + */ +public enum BatteryLevel { + + HIGH("high"), + + MEDIUM("medium"), + + LOW("low"), + + UNKNOWN("unknown"); + + private String value; + + BatteryLevel(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static BatteryLevel fromValue(String value) { + for (BatteryLevel b : BatteryLevel.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN; + } + +} + diff --git a/endpoint-agents/src/main/java/com/thousandeyes/sdk/endpoint/agents/model/BatteryMetrics.java b/endpoint-agents/src/main/java/com/thousandeyes/sdk/endpoint/agents/model/BatteryMetrics.java new file mode 100644 index 000000000..b61e6bfc3 --- /dev/null +++ b/endpoint-agents/src/main/java/com/thousandeyes/sdk/endpoint/agents/model/BatteryMetrics.java @@ -0,0 +1,139 @@ +/* + * Endpoint Agents API + * Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.endpoint.agents.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.thousandeyes.sdk.endpoint.agents.model.BatteryLevel; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Battery metrics for the endpoint agent. + */ +@JsonPropertyOrder({ + BatteryMetrics.JSON_PROPERTY_BATTERY_LEVEL, + BatteryMetrics.JSON_PROPERTY_BATTERY_LEVEL_NORMALIZED_PERCENT +}) +@jakarta.annotation.Generated(value = "com.thousandeyes.api.codegen.ThousandeyesJavaGenerator") +public class BatteryMetrics { + public static final String JSON_PROPERTY_BATTERY_LEVEL = "batteryLevel"; + private BatteryLevel batteryLevel; + + public static final String JSON_PROPERTY_BATTERY_LEVEL_NORMALIZED_PERCENT = "batteryLevelNormalizedPercent"; + private Double batteryLevelNormalizedPercent; + + public BatteryMetrics() { + } + + public BatteryMetrics batteryLevel(BatteryLevel batteryLevel) { + this.batteryLevel = batteryLevel; + return this; + } + + /** + * Get batteryLevel + * @return batteryLevel + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BATTERY_LEVEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BatteryLevel getBatteryLevel() { + return batteryLevel; + } + + + @JsonProperty(JSON_PROPERTY_BATTERY_LEVEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBatteryLevel(BatteryLevel batteryLevel) { + this.batteryLevel = batteryLevel; + } + + + public BatteryMetrics batteryLevelNormalizedPercent(Double batteryLevelNormalizedPercent) { + this.batteryLevelNormalizedPercent = batteryLevelNormalizedPercent; + return this; + } + + /** + * Battery level as a normalized percentage (0-1). + * minimum: 0 + * maximum: 1 + * @return batteryLevelNormalizedPercent + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BATTERY_LEVEL_NORMALIZED_PERCENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Double getBatteryLevelNormalizedPercent() { + return batteryLevelNormalizedPercent; + } + + + @JsonProperty(JSON_PROPERTY_BATTERY_LEVEL_NORMALIZED_PERCENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBatteryLevelNormalizedPercent(Double batteryLevelNormalizedPercent) { + this.batteryLevelNormalizedPercent = batteryLevelNormalizedPercent; + } + + + /** + * Return true if this BatteryMetrics object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BatteryMetrics batteryMetrics = (BatteryMetrics) o; + return Objects.equals(this.batteryLevel, batteryMetrics.batteryLevel) && + Objects.equals(this.batteryLevelNormalizedPercent, batteryMetrics.batteryLevelNormalizedPercent); + } + + @Override + public int hashCode() { + return Objects.hash(batteryLevel, batteryLevelNormalizedPercent); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BatteryMetrics {\n"); + sb.append(" batteryLevel: ").append(toIndentedString(batteryLevel)).append("\n"); + sb.append(" batteryLevelNormalizedPercent: ").append(toIndentedString(batteryLevelNormalizedPercent)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/endpoint-agents/src/main/java/com/thousandeyes/sdk/endpoint/agents/model/CellularProfile.java b/endpoint-agents/src/main/java/com/thousandeyes/sdk/endpoint/agents/model/CellularProfile.java new file mode 100644 index 000000000..df47e7e83 --- /dev/null +++ b/endpoint-agents/src/main/java/com/thousandeyes/sdk/endpoint/agents/model/CellularProfile.java @@ -0,0 +1,384 @@ +/* + * Endpoint Agents API + * Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.endpoint.agents.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Cellular network profile information for a mobile endpoint agent. + */ +@JsonPropertyOrder({ + CellularProfile.JSON_PROPERTY_CARRIER_NAME, + CellularProfile.JSON_PROPERTY_NETWORK_GEN, + CellularProfile.JSON_PROPERTY_NETWORK_SUBTYPE, + CellularProfile.JSON_PROPERTY_ADVERTISED_NETWORK_GEN, + CellularProfile.JSON_PROPERTY_ADVERTISED_NETWORK_SUBTYPE, + CellularProfile.JSON_PROPERTY_RSSI, + CellularProfile.JSON_PROPERTY_RSRP, + CellularProfile.JSON_PROPERTY_RSCP, + CellularProfile.JSON_PROPERTY_RSRQ, + CellularProfile.JSON_PROPERTY_SINR +}) +@jakarta.annotation.Generated(value = "com.thousandeyes.api.codegen.ThousandeyesJavaGenerator") +public class CellularProfile { + public static final String JSON_PROPERTY_CARRIER_NAME = "carrierName"; + private String carrierName; + + public static final String JSON_PROPERTY_NETWORK_GEN = "networkGen"; + private String networkGen; + + public static final String JSON_PROPERTY_NETWORK_SUBTYPE = "networkSubtype"; + private String networkSubtype; + + public static final String JSON_PROPERTY_ADVERTISED_NETWORK_GEN = "advertisedNetworkGen"; + private String advertisedNetworkGen; + + public static final String JSON_PROPERTY_ADVERTISED_NETWORK_SUBTYPE = "advertisedNetworkSubtype"; + private String advertisedNetworkSubtype; + + public static final String JSON_PROPERTY_RSSI = "rssi"; + private Double rssi; + + public static final String JSON_PROPERTY_RSRP = "rsrp"; + private Double rsrp; + + public static final String JSON_PROPERTY_RSCP = "rscp"; + private Double rscp; + + public static final String JSON_PROPERTY_RSRQ = "rsrq"; + private Double rsrq; + + public static final String JSON_PROPERTY_SINR = "sinr"; + private Double sinr; + + public CellularProfile() { + } + + public CellularProfile carrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } + + /** + * Carrier name + * @return carrierName + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CARRIER_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCarrierName() { + return carrierName; + } + + + @JsonProperty(JSON_PROPERTY_CARRIER_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCarrierName(String carrierName) { + this.carrierName = carrierName; + } + + + public CellularProfile networkGen(String networkGen) { + this.networkGen = networkGen; + return this; + } + + /** + * Cellular network generation. + * @return networkGen + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NETWORK_GEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNetworkGen() { + return networkGen; + } + + + @JsonProperty(JSON_PROPERTY_NETWORK_GEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNetworkGen(String networkGen) { + this.networkGen = networkGen; + } + + + public CellularProfile networkSubtype(String networkSubtype) { + this.networkSubtype = networkSubtype; + return this; + } + + /** + * A real network subtype. It may be different from an advertised network type. + * @return networkSubtype + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NETWORK_SUBTYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNetworkSubtype() { + return networkSubtype; + } + + + @JsonProperty(JSON_PROPERTY_NETWORK_SUBTYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNetworkSubtype(String networkSubtype) { + this.networkSubtype = networkSubtype; + } + + + public CellularProfile advertisedNetworkGen(String advertisedNetworkGen) { + this.advertisedNetworkGen = advertisedNetworkGen; + return this; + } + + /** + * Cellular network generation. + * @return advertisedNetworkGen + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADVERTISED_NETWORK_GEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAdvertisedNetworkGen() { + return advertisedNetworkGen; + } + + + @JsonProperty(JSON_PROPERTY_ADVERTISED_NETWORK_GEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAdvertisedNetworkGen(String advertisedNetworkGen) { + this.advertisedNetworkGen = advertisedNetworkGen; + } + + + public CellularProfile advertisedNetworkSubtype(String advertisedNetworkSubtype) { + this.advertisedNetworkSubtype = advertisedNetworkSubtype; + return this; + } + + /** + * Advertised Network subtype + * @return advertisedNetworkSubtype + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADVERTISED_NETWORK_SUBTYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAdvertisedNetworkSubtype() { + return advertisedNetworkSubtype; + } + + + @JsonProperty(JSON_PROPERTY_ADVERTISED_NETWORK_SUBTYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAdvertisedNetworkSubtype(String advertisedNetworkSubtype) { + this.advertisedNetworkSubtype = advertisedNetworkSubtype; + } + + + public CellularProfile rssi(Double rssi) { + this.rssi = rssi; + return this; + } + + /** + * Received Signal Strength Indicator in dBm. Values are always negative. + * @return rssi + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RSSI) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Double getRssi() { + return rssi; + } + + + @JsonProperty(JSON_PROPERTY_RSSI) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRssi(Double rssi) { + this.rssi = rssi; + } + + + public CellularProfile rsrp(Double rsrp) { + this.rsrp = rsrp; + return this; + } + + /** + * Reference Signal Received Power in dBm. Values are always negative. + * @return rsrp + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RSRP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Double getRsrp() { + return rsrp; + } + + + @JsonProperty(JSON_PROPERTY_RSRP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRsrp(Double rsrp) { + this.rsrp = rsrp; + } + + + public CellularProfile rscp(Double rscp) { + this.rscp = rscp; + return this; + } + + /** + * Received Signal Code Power in dBm. Values are always negative or zero. + * @return rscp + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RSCP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Double getRscp() { + return rscp; + } + + + @JsonProperty(JSON_PROPERTY_RSCP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRscp(Double rscp) { + this.rscp = rscp; + } + + + public CellularProfile rsrq(Double rsrq) { + this.rsrq = rsrq; + return this; + } + + /** + * Reference Signal Received Quality in dBm. Values are always negative. + * @return rsrq + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RSRQ) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Double getRsrq() { + return rsrq; + } + + + @JsonProperty(JSON_PROPERTY_RSRQ) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRsrq(Double rsrq) { + this.rsrq = rsrq; + } + + + public CellularProfile sinr(Double sinr) { + this.sinr = sinr; + return this; + } + + /** + * Signal to Interference and Noise Ratio in dBm. It can be negative or positive. + * @return sinr + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SINR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Double getSinr() { + return sinr; + } + + + @JsonProperty(JSON_PROPERTY_SINR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSinr(Double sinr) { + this.sinr = sinr; + } + + + /** + * Return true if this CellularProfile object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CellularProfile cellularProfile = (CellularProfile) o; + return Objects.equals(this.carrierName, cellularProfile.carrierName) && + Objects.equals(this.networkGen, cellularProfile.networkGen) && + Objects.equals(this.networkSubtype, cellularProfile.networkSubtype) && + Objects.equals(this.advertisedNetworkGen, cellularProfile.advertisedNetworkGen) && + Objects.equals(this.advertisedNetworkSubtype, cellularProfile.advertisedNetworkSubtype) && + Objects.equals(this.rssi, cellularProfile.rssi) && + Objects.equals(this.rsrp, cellularProfile.rsrp) && + Objects.equals(this.rscp, cellularProfile.rscp) && + Objects.equals(this.rsrq, cellularProfile.rsrq) && + Objects.equals(this.sinr, cellularProfile.sinr); + } + + @Override + public int hashCode() { + return Objects.hash(carrierName, networkGen, networkSubtype, advertisedNetworkGen, advertisedNetworkSubtype, rssi, rsrp, rscp, rsrq, sinr); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CellularProfile {\n"); + sb.append(" carrierName: ").append(toIndentedString(carrierName)).append("\n"); + sb.append(" networkGen: ").append(toIndentedString(networkGen)).append("\n"); + sb.append(" networkSubtype: ").append(toIndentedString(networkSubtype)).append("\n"); + sb.append(" advertisedNetworkGen: ").append(toIndentedString(advertisedNetworkGen)).append("\n"); + sb.append(" advertisedNetworkSubtype: ").append(toIndentedString(advertisedNetworkSubtype)).append("\n"); + sb.append(" rssi: ").append(toIndentedString(rssi)).append("\n"); + sb.append(" rsrp: ").append(toIndentedString(rsrp)).append("\n"); + sb.append(" rscp: ").append(toIndentedString(rscp)).append("\n"); + sb.append(" rsrq: ").append(toIndentedString(rsrq)).append("\n"); + sb.append(" sinr: ").append(toIndentedString(sinr)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/endpoint-agents/src/main/java/com/thousandeyes/sdk/endpoint/agents/model/EndpointAgent.java b/endpoint-agents/src/main/java/com/thousandeyes/sdk/endpoint/agents/model/EndpointAgent.java index b654ae26b..b49481334 100644 --- a/endpoint-agents/src/main/java/com/thousandeyes/sdk/endpoint/agents/model/EndpointAgent.java +++ b/endpoint-agents/src/main/java/com/thousandeyes/sdk/endpoint/agents/model/EndpointAgent.java @@ -21,6 +21,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import com.thousandeyes.sdk.endpoint.agents.model.AgentLicenseType; +import com.thousandeyes.sdk.endpoint.agents.model.BatteryMetrics; +import com.thousandeyes.sdk.endpoint.agents.model.CellularProfile; import com.thousandeyes.sdk.endpoint.agents.model.EndpointAgentLocation; import com.thousandeyes.sdk.endpoint.agents.model.EndpointAsnDetails; import com.thousandeyes.sdk.endpoint.agents.model.EndpointClient; @@ -71,6 +73,8 @@ EndpointAgent.JSON_PROPERTY_LICENSE_TYPE, EndpointAgent.JSON_PROPERTY_TCP_DRIVER_AVAILABLE, EndpointAgent.JSON_PROPERTY_NPCAP_VERSION, + EndpointAgent.JSON_PROPERTY_BATTERY_METRICS, + EndpointAgent.JSON_PROPERTY_CELLULAR_PROFILE, EndpointAgent.JSON_PROPERTY_LINKS }) @jakarta.annotation.Generated(value = "com.thousandeyes.api.codegen.ThousandeyesJavaGenerator") @@ -162,6 +166,12 @@ public class EndpointAgent { public static final String JSON_PROPERTY_NPCAP_VERSION = "npcapVersion"; private String npcapVersion; + public static final String JSON_PROPERTY_BATTERY_METRICS = "batteryMetrics"; + private BatteryMetrics batteryMetrics; + + public static final String JSON_PROPERTY_CELLULAR_PROFILE = "cellularProfile"; + private CellularProfile cellularProfile; + public static final String JSON_PROPERTY_LINKS = "_links"; private SelfLinks links; @@ -739,6 +749,56 @@ public String getNpcapVersion() { + public EndpointAgent batteryMetrics(BatteryMetrics batteryMetrics) { + this.batteryMetrics = batteryMetrics; + return this; + } + + /** + * Get batteryMetrics + * @return batteryMetrics + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BATTERY_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BatteryMetrics getBatteryMetrics() { + return batteryMetrics; + } + + + @JsonProperty(JSON_PROPERTY_BATTERY_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBatteryMetrics(BatteryMetrics batteryMetrics) { + this.batteryMetrics = batteryMetrics; + } + + + public EndpointAgent cellularProfile(CellularProfile cellularProfile) { + this.cellularProfile = cellularProfile; + return this; + } + + /** + * Get cellularProfile + * @return cellularProfile + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CELLULAR_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CellularProfile getCellularProfile() { + return cellularProfile; + } + + + @JsonProperty(JSON_PROPERTY_CELLULAR_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCellularProfile(CellularProfile cellularProfile) { + this.cellularProfile = cellularProfile; + } + + public EndpointAgent links(SelfLinks links) { this.links = links; return this; @@ -805,12 +865,14 @@ public boolean equals(Object o) { Objects.equals(this.licenseType, endpointAgent.licenseType) && Objects.equals(this.tcpDriverAvailable, endpointAgent.tcpDriverAvailable) && Objects.equals(this.npcapVersion, endpointAgent.npcapVersion) && + Objects.equals(this.batteryMetrics, endpointAgent.batteryMetrics) && + Objects.equals(this.cellularProfile, endpointAgent.cellularProfile) && Objects.equals(this.links, endpointAgent.links); } @Override public int hashCode() { - return Objects.hash(id, aid, name, computerName, osVersion, platform, kernelVersion, manufacturer, model, serialNumber, lastSeen, status, deleted, version, targetVersion, createdAt, numberOfClients, publicIP, location, clients, totalMemory, agentType, vpnProfiles, externalMetadata, networkInterfaceProfiles, asnDetails, licenseType, tcpDriverAvailable, npcapVersion, links); + return Objects.hash(id, aid, name, computerName, osVersion, platform, kernelVersion, manufacturer, model, serialNumber, lastSeen, status, deleted, version, targetVersion, createdAt, numberOfClients, publicIP, location, clients, totalMemory, agentType, vpnProfiles, externalMetadata, networkInterfaceProfiles, asnDetails, licenseType, tcpDriverAvailable, npcapVersion, batteryMetrics, cellularProfile, links); } @Override @@ -846,6 +908,8 @@ public String toString() { sb.append(" licenseType: ").append(toIndentedString(licenseType)).append("\n"); sb.append(" tcpDriverAvailable: ").append(toIndentedString(tcpDriverAvailable)).append("\n"); sb.append(" npcapVersion: ").append(toIndentedString(npcapVersion)).append("\n"); + sb.append(" batteryMetrics: ").append(toIndentedString(batteryMetrics)).append("\n"); + sb.append(" cellularProfile: ").append(toIndentedString(cellularProfile)).append("\n"); sb.append(" links: ").append(toIndentedString(links)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/endpoint-agents/src/test/java/com/thousandeyes/sdk/endpoint/agents/EndpointAgentsApiTest.java b/endpoint-agents/src/test/java/com/thousandeyes/sdk/endpoint/agents/EndpointAgentsApiTest.java index e536b9c27..933c1e97f 100644 --- a/endpoint-agents/src/test/java/com/thousandeyes/sdk/endpoint/agents/EndpointAgentsApiTest.java +++ b/endpoint-agents/src/test/java/com/thousandeyes/sdk/endpoint/agents/EndpointAgentsApiTest.java @@ -181,11 +181,27 @@ public void disableEndpointAgentRequestAndResponseDeserializationTest() "title" : "title" } }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "publicIP" : "88.45.2.123", "tcpDriverAvailable" : true, "platform" : "mac", "manufacturer" : "Apple, Inc.", "targetVersion" : "0.123.4", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "createdAt" : "2022-05-26T23:37:16Z", "numberOfClients" : 3, "licenseType" : "essentials", @@ -376,11 +392,27 @@ public void enableEndpointAgentRequestAndResponseDeserializationTest() "title" : "title" } }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "publicIP" : "88.45.2.123", "tcpDriverAvailable" : true, "platform" : "mac", "manufacturer" : "Apple, Inc.", "targetVersion" : "0.123.4", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "createdAt" : "2022-05-26T23:37:16Z", "numberOfClients" : 3, "licenseType" : "essentials", @@ -626,11 +658,27 @@ public void filterEndpointAgentsRequestAndResponseDeserializationTest() "title" : "title" } }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "publicIP" : "88.45.2.123", "tcpDriverAvailable" : true, "platform" : "mac", "manufacturer" : "Apple, Inc.", "targetVersion" : "0.123.4", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "createdAt" : "2022-05-26T23:37:16Z", "numberOfClients" : 3, "licenseType" : "essentials", @@ -785,11 +833,27 @@ public void filterEndpointAgentsRequestAndResponseDeserializationTest() "title" : "title" } }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "publicIP" : "88.45.2.123", "tcpDriverAvailable" : true, "platform" : "mac", "manufacturer" : "Apple, Inc.", "targetVersion" : "0.123.4", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "createdAt" : "2022-05-26T23:37:16Z", "numberOfClients" : 3, "licenseType" : "essentials", @@ -982,11 +1046,27 @@ public void getEndpointAgentRequestAndResponseDeserializationTest() "title" : "title" } }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "publicIP" : "88.45.2.123", "tcpDriverAvailable" : true, "platform" : "mac", "manufacturer" : "Apple, Inc.", "targetVersion" : "0.123.4", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "createdAt" : "2022-05-26T23:37:16Z", "numberOfClients" : 3, "licenseType" : "essentials", @@ -1200,11 +1280,27 @@ public void getEndpointAgentsRequestAndResponseDeserializationTest() "title" : "title" } }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "publicIP" : "88.45.2.123", "tcpDriverAvailable" : true, "platform" : "mac", "manufacturer" : "Apple, Inc.", "targetVersion" : "0.123.4", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "createdAt" : "2022-05-26T23:37:16Z", "numberOfClients" : 3, "licenseType" : "essentials", @@ -1359,11 +1455,27 @@ public void getEndpointAgentsRequestAndResponseDeserializationTest() "title" : "title" } }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "publicIP" : "88.45.2.123", "tcpDriverAvailable" : true, "platform" : "mac", "manufacturer" : "Apple, Inc.", "targetVersion" : "0.123.4", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "createdAt" : "2022-05-26T23:37:16Z", "numberOfClients" : 3, "licenseType" : "essentials", @@ -1612,11 +1724,27 @@ public void updateEndpointAgentRequestAndResponseDeserializationTest() "title" : "title" } }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "publicIP" : "88.45.2.123", "tcpDriverAvailable" : true, "platform" : "mac", "manufacturer" : "Apple, Inc.", "targetVersion" : "0.123.4", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "createdAt" : "2022-05-26T23:37:16Z", "numberOfClients" : 3, "licenseType" : "essentials", diff --git a/endpoint-instant-tests/README.md b/endpoint-instant-tests/README.md index db9ed8cfc..87026aef9 100644 --- a/endpoint-instant-tests/README.md +++ b/endpoint-instant-tests/README.md @@ -2,7 +2,7 @@ Endpoint Instant Scheduled Tests API -- API version: 7.0.75 +- API version: 7.0.78 You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. diff --git a/endpoint-labels/README.md b/endpoint-labels/README.md index 8a2a35448..4e76ceef9 100644 --- a/endpoint-labels/README.md +++ b/endpoint-labels/README.md @@ -2,7 +2,7 @@ Endpoint Agent Labels API -- API version: 7.0.75 +- API version: 7.0.78 Manage labels applied to endpoint agents using this API. diff --git a/endpoint-test-results/.openapi-generator/FILES b/endpoint-test-results/.openapi-generator/FILES index 5466957aa..988aed59b 100644 --- a/endpoint-test-results/.openapi-generator/FILES +++ b/endpoint-test-results/.openapi-generator/FILES @@ -15,6 +15,9 @@ src/main/java/com/thousandeyes/sdk/endpoint/tests/results/RealUserEndpointTestRe src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/ApplicationMetrics.java src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/ApplicationScoreQuality.java src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/AsnDetails.java +src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/BatteryLevel.java +src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/BatteryMetrics.java +src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/CellularProfile.java src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/ConditionalOperator.java src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/CpuUtilization.java src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/DynamicBaseEndpointTestResult.java diff --git a/endpoint-test-results/README.md b/endpoint-test-results/README.md index 6e2ed9c77..cecac2a27 100644 --- a/endpoint-test-results/README.md +++ b/endpoint-test-results/README.md @@ -2,7 +2,7 @@ Endpoint Test Results API -- API version: 7.0.75 +- API version: 7.0.78 Retrieve results for scheduled and dynamic tests on endpoint agents. diff --git a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/BatteryLevel.java b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/BatteryLevel.java new file mode 100644 index 000000000..eba3bab13 --- /dev/null +++ b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/BatteryLevel.java @@ -0,0 +1,64 @@ +/* + * Endpoint Test Results API + * Retrieve results for scheduled and dynamic tests on endpoint agents. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.endpoint.tests.results.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Battery level indicator. + */ +public enum BatteryLevel { + + HIGH("high"), + + MEDIUM("medium"), + + LOW("low"), + + UNKNOWN("unknown"); + + private String value; + + BatteryLevel(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static BatteryLevel fromValue(String value) { + for (BatteryLevel b : BatteryLevel.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN; + } + +} + diff --git a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/BatteryMetrics.java b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/BatteryMetrics.java new file mode 100644 index 000000000..37bb29401 --- /dev/null +++ b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/BatteryMetrics.java @@ -0,0 +1,139 @@ +/* + * Endpoint Test Results API + * Retrieve results for scheduled and dynamic tests on endpoint agents. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.endpoint.tests.results.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.thousandeyes.sdk.endpoint.tests.results.model.BatteryLevel; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Battery metrics for the endpoint agent. + */ +@JsonPropertyOrder({ + BatteryMetrics.JSON_PROPERTY_BATTERY_LEVEL, + BatteryMetrics.JSON_PROPERTY_BATTERY_LEVEL_NORMALIZED_PERCENT +}) +@jakarta.annotation.Generated(value = "com.thousandeyes.api.codegen.ThousandeyesJavaGenerator") +public class BatteryMetrics { + public static final String JSON_PROPERTY_BATTERY_LEVEL = "batteryLevel"; + private BatteryLevel batteryLevel; + + public static final String JSON_PROPERTY_BATTERY_LEVEL_NORMALIZED_PERCENT = "batteryLevelNormalizedPercent"; + private Double batteryLevelNormalizedPercent; + + public BatteryMetrics() { + } + + public BatteryMetrics batteryLevel(BatteryLevel batteryLevel) { + this.batteryLevel = batteryLevel; + return this; + } + + /** + * Get batteryLevel + * @return batteryLevel + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BATTERY_LEVEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public BatteryLevel getBatteryLevel() { + return batteryLevel; + } + + + @JsonProperty(JSON_PROPERTY_BATTERY_LEVEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBatteryLevel(BatteryLevel batteryLevel) { + this.batteryLevel = batteryLevel; + } + + + public BatteryMetrics batteryLevelNormalizedPercent(Double batteryLevelNormalizedPercent) { + this.batteryLevelNormalizedPercent = batteryLevelNormalizedPercent; + return this; + } + + /** + * Battery level as a normalized percentage (0-1). + * minimum: 0 + * maximum: 1 + * @return batteryLevelNormalizedPercent + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BATTERY_LEVEL_NORMALIZED_PERCENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Double getBatteryLevelNormalizedPercent() { + return batteryLevelNormalizedPercent; + } + + + @JsonProperty(JSON_PROPERTY_BATTERY_LEVEL_NORMALIZED_PERCENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBatteryLevelNormalizedPercent(Double batteryLevelNormalizedPercent) { + this.batteryLevelNormalizedPercent = batteryLevelNormalizedPercent; + } + + + /** + * Return true if this BatteryMetrics object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BatteryMetrics batteryMetrics = (BatteryMetrics) o; + return Objects.equals(this.batteryLevel, batteryMetrics.batteryLevel) && + Objects.equals(this.batteryLevelNormalizedPercent, batteryMetrics.batteryLevelNormalizedPercent); + } + + @Override + public int hashCode() { + return Objects.hash(batteryLevel, batteryLevelNormalizedPercent); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BatteryMetrics {\n"); + sb.append(" batteryLevel: ").append(toIndentedString(batteryLevel)).append("\n"); + sb.append(" batteryLevelNormalizedPercent: ").append(toIndentedString(batteryLevelNormalizedPercent)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/CellularProfile.java b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/CellularProfile.java new file mode 100644 index 000000000..759508ee6 --- /dev/null +++ b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/CellularProfile.java @@ -0,0 +1,384 @@ +/* + * Endpoint Test Results API + * Retrieve results for scheduled and dynamic tests on endpoint agents. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.thousandeyes.sdk.endpoint.tests.results.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Cellular network profile information for a mobile endpoint agent. + */ +@JsonPropertyOrder({ + CellularProfile.JSON_PROPERTY_CARRIER_NAME, + CellularProfile.JSON_PROPERTY_NETWORK_GEN, + CellularProfile.JSON_PROPERTY_NETWORK_SUBTYPE, + CellularProfile.JSON_PROPERTY_ADVERTISED_NETWORK_GEN, + CellularProfile.JSON_PROPERTY_ADVERTISED_NETWORK_SUBTYPE, + CellularProfile.JSON_PROPERTY_RSSI, + CellularProfile.JSON_PROPERTY_RSRP, + CellularProfile.JSON_PROPERTY_RSCP, + CellularProfile.JSON_PROPERTY_RSRQ, + CellularProfile.JSON_PROPERTY_SINR +}) +@jakarta.annotation.Generated(value = "com.thousandeyes.api.codegen.ThousandeyesJavaGenerator") +public class CellularProfile { + public static final String JSON_PROPERTY_CARRIER_NAME = "carrierName"; + private String carrierName; + + public static final String JSON_PROPERTY_NETWORK_GEN = "networkGen"; + private String networkGen; + + public static final String JSON_PROPERTY_NETWORK_SUBTYPE = "networkSubtype"; + private String networkSubtype; + + public static final String JSON_PROPERTY_ADVERTISED_NETWORK_GEN = "advertisedNetworkGen"; + private String advertisedNetworkGen; + + public static final String JSON_PROPERTY_ADVERTISED_NETWORK_SUBTYPE = "advertisedNetworkSubtype"; + private String advertisedNetworkSubtype; + + public static final String JSON_PROPERTY_RSSI = "rssi"; + private Double rssi; + + public static final String JSON_PROPERTY_RSRP = "rsrp"; + private Double rsrp; + + public static final String JSON_PROPERTY_RSCP = "rscp"; + private Double rscp; + + public static final String JSON_PROPERTY_RSRQ = "rsrq"; + private Double rsrq; + + public static final String JSON_PROPERTY_SINR = "sinr"; + private Double sinr; + + public CellularProfile() { + } + + public CellularProfile carrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } + + /** + * Carrier name + * @return carrierName + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CARRIER_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCarrierName() { + return carrierName; + } + + + @JsonProperty(JSON_PROPERTY_CARRIER_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCarrierName(String carrierName) { + this.carrierName = carrierName; + } + + + public CellularProfile networkGen(String networkGen) { + this.networkGen = networkGen; + return this; + } + + /** + * Cellular network generation. + * @return networkGen + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NETWORK_GEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNetworkGen() { + return networkGen; + } + + + @JsonProperty(JSON_PROPERTY_NETWORK_GEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNetworkGen(String networkGen) { + this.networkGen = networkGen; + } + + + public CellularProfile networkSubtype(String networkSubtype) { + this.networkSubtype = networkSubtype; + return this; + } + + /** + * A real network subtype. It may be different from an advertised network type. + * @return networkSubtype + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NETWORK_SUBTYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNetworkSubtype() { + return networkSubtype; + } + + + @JsonProperty(JSON_PROPERTY_NETWORK_SUBTYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNetworkSubtype(String networkSubtype) { + this.networkSubtype = networkSubtype; + } + + + public CellularProfile advertisedNetworkGen(String advertisedNetworkGen) { + this.advertisedNetworkGen = advertisedNetworkGen; + return this; + } + + /** + * Cellular network generation. + * @return advertisedNetworkGen + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADVERTISED_NETWORK_GEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAdvertisedNetworkGen() { + return advertisedNetworkGen; + } + + + @JsonProperty(JSON_PROPERTY_ADVERTISED_NETWORK_GEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAdvertisedNetworkGen(String advertisedNetworkGen) { + this.advertisedNetworkGen = advertisedNetworkGen; + } + + + public CellularProfile advertisedNetworkSubtype(String advertisedNetworkSubtype) { + this.advertisedNetworkSubtype = advertisedNetworkSubtype; + return this; + } + + /** + * Advertised Network subtype + * @return advertisedNetworkSubtype + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADVERTISED_NETWORK_SUBTYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAdvertisedNetworkSubtype() { + return advertisedNetworkSubtype; + } + + + @JsonProperty(JSON_PROPERTY_ADVERTISED_NETWORK_SUBTYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAdvertisedNetworkSubtype(String advertisedNetworkSubtype) { + this.advertisedNetworkSubtype = advertisedNetworkSubtype; + } + + + public CellularProfile rssi(Double rssi) { + this.rssi = rssi; + return this; + } + + /** + * Received Signal Strength Indicator in dBm. Values are always negative. + * @return rssi + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RSSI) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Double getRssi() { + return rssi; + } + + + @JsonProperty(JSON_PROPERTY_RSSI) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRssi(Double rssi) { + this.rssi = rssi; + } + + + public CellularProfile rsrp(Double rsrp) { + this.rsrp = rsrp; + return this; + } + + /** + * Reference Signal Received Power in dBm. Values are always negative. + * @return rsrp + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RSRP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Double getRsrp() { + return rsrp; + } + + + @JsonProperty(JSON_PROPERTY_RSRP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRsrp(Double rsrp) { + this.rsrp = rsrp; + } + + + public CellularProfile rscp(Double rscp) { + this.rscp = rscp; + return this; + } + + /** + * Received Signal Code Power in dBm. Values are always negative or zero. + * @return rscp + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RSCP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Double getRscp() { + return rscp; + } + + + @JsonProperty(JSON_PROPERTY_RSCP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRscp(Double rscp) { + this.rscp = rscp; + } + + + public CellularProfile rsrq(Double rsrq) { + this.rsrq = rsrq; + return this; + } + + /** + * Reference Signal Received Quality in dBm. Values are always negative. + * @return rsrq + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RSRQ) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Double getRsrq() { + return rsrq; + } + + + @JsonProperty(JSON_PROPERTY_RSRQ) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRsrq(Double rsrq) { + this.rsrq = rsrq; + } + + + public CellularProfile sinr(Double sinr) { + this.sinr = sinr; + return this; + } + + /** + * Signal to Interference and Noise Ratio in dBm. It can be negative or positive. + * @return sinr + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SINR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Double getSinr() { + return sinr; + } + + + @JsonProperty(JSON_PROPERTY_SINR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSinr(Double sinr) { + this.sinr = sinr; + } + + + /** + * Return true if this CellularProfile object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CellularProfile cellularProfile = (CellularProfile) o; + return Objects.equals(this.carrierName, cellularProfile.carrierName) && + Objects.equals(this.networkGen, cellularProfile.networkGen) && + Objects.equals(this.networkSubtype, cellularProfile.networkSubtype) && + Objects.equals(this.advertisedNetworkGen, cellularProfile.advertisedNetworkGen) && + Objects.equals(this.advertisedNetworkSubtype, cellularProfile.advertisedNetworkSubtype) && + Objects.equals(this.rssi, cellularProfile.rssi) && + Objects.equals(this.rsrp, cellularProfile.rsrp) && + Objects.equals(this.rscp, cellularProfile.rscp) && + Objects.equals(this.rsrq, cellularProfile.rsrq) && + Objects.equals(this.sinr, cellularProfile.sinr); + } + + @Override + public int hashCode() { + return Objects.hash(carrierName, networkGen, networkSubtype, advertisedNetworkGen, advertisedNetworkSubtype, rssi, rsrp, rscp, rsrq, sinr); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CellularProfile {\n"); + sb.append(" carrierName: ").append(toIndentedString(carrierName)).append("\n"); + sb.append(" networkGen: ").append(toIndentedString(networkGen)).append("\n"); + sb.append(" networkSubtype: ").append(toIndentedString(networkSubtype)).append("\n"); + sb.append(" advertisedNetworkGen: ").append(toIndentedString(advertisedNetworkGen)).append("\n"); + sb.append(" advertisedNetworkSubtype: ").append(toIndentedString(advertisedNetworkSubtype)).append("\n"); + sb.append(" rssi: ").append(toIndentedString(rssi)).append("\n"); + sb.append(" rsrp: ").append(toIndentedString(rsrp)).append("\n"); + sb.append(" rscp: ").append(toIndentedString(rscp)).append("\n"); + sb.append(" rsrq: ").append(toIndentedString(rsrq)).append("\n"); + sb.append(" sinr: ").append(toIndentedString(sinr)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/EndpointTestResult.java b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/EndpointTestResult.java index 877f17898..9d75369d0 100644 --- a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/EndpointTestResult.java +++ b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/EndpointTestResult.java @@ -20,7 +20,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; +import com.thousandeyes.sdk.endpoint.tests.results.model.BatteryMetrics; +import com.thousandeyes.sdk.endpoint.tests.results.model.CellularProfile; import com.thousandeyes.sdk.endpoint.tests.results.model.NetworkProfile; +import com.thousandeyes.sdk.endpoint.tests.results.model.Platform; import com.thousandeyes.sdk.endpoint.tests.results.model.SystemMetrics; import com.thousandeyes.sdk.endpoint.tests.results.model.TargetProfile; import com.thousandeyes.sdk.endpoint.tests.results.model.UserProfile; @@ -42,7 +45,10 @@ EndpointTestResult.JSON_PROPERTY_SYSTEM_METRICS, EndpointTestResult.JSON_PROPERTY_ORIGINAL_TARGET_PROFILE, EndpointTestResult.JSON_PROPERTY_USER_PROFILE, - EndpointTestResult.JSON_PROPERTY_VPN_PROFILE + EndpointTestResult.JSON_PROPERTY_VPN_PROFILE, + EndpointTestResult.JSON_PROPERTY_BATTERY_METRICS, + EndpointTestResult.JSON_PROPERTY_CELLULAR_PROFILE, + EndpointTestResult.JSON_PROPERTY_PLATFORM }) @jakarta.annotation.Generated(value = "com.thousandeyes.api.codegen.ThousandeyesJavaGenerator") public class EndpointTestResult { @@ -76,6 +82,15 @@ public class EndpointTestResult { public static final String JSON_PROPERTY_VPN_PROFILE = "vpnProfile"; private VpnProfile vpnProfile; + public static final String JSON_PROPERTY_BATTERY_METRICS = "batteryMetrics"; + private BatteryMetrics batteryMetrics; + + public static final String JSON_PROPERTY_CELLULAR_PROFILE = "cellularProfile"; + private CellularProfile cellularProfile; + + public static final String JSON_PROPERTY_PLATFORM = "platform"; + private Platform platform; + public EndpointTestResult() { } @@ -303,6 +318,81 @@ public void setVpnProfile(VpnProfile vpnProfile) { } + public EndpointTestResult batteryMetrics(BatteryMetrics batteryMetrics) { + this.batteryMetrics = batteryMetrics; + return this; + } + + /** + * Get batteryMetrics + * @return batteryMetrics + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BATTERY_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BatteryMetrics getBatteryMetrics() { + return batteryMetrics; + } + + + @JsonProperty(JSON_PROPERTY_BATTERY_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBatteryMetrics(BatteryMetrics batteryMetrics) { + this.batteryMetrics = batteryMetrics; + } + + + public EndpointTestResult cellularProfile(CellularProfile cellularProfile) { + this.cellularProfile = cellularProfile; + return this; + } + + /** + * Get cellularProfile + * @return cellularProfile + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CELLULAR_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CellularProfile getCellularProfile() { + return cellularProfile; + } + + + @JsonProperty(JSON_PROPERTY_CELLULAR_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCellularProfile(CellularProfile cellularProfile) { + this.cellularProfile = cellularProfile; + } + + + public EndpointTestResult platform(Platform platform) { + this.platform = platform; + return this; + } + + /** + * Get platform + * @return platform + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PLATFORM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Platform getPlatform() { + return platform; + } + + + @JsonProperty(JSON_PROPERTY_PLATFORM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPlatform(Platform platform) { + this.platform = platform; + } + + /** * Return true if this EndpointTestResult object is equal to o. */ @@ -324,12 +414,15 @@ public boolean equals(Object o) { Objects.equals(this.systemMetrics, endpointTestResult.systemMetrics) && Objects.equals(this.originalTargetProfile, endpointTestResult.originalTargetProfile) && Objects.equals(this.userProfile, endpointTestResult.userProfile) && - Objects.equals(this.vpnProfile, endpointTestResult.vpnProfile); + Objects.equals(this.vpnProfile, endpointTestResult.vpnProfile) && + Objects.equals(this.batteryMetrics, endpointTestResult.batteryMetrics) && + Objects.equals(this.cellularProfile, endpointTestResult.cellularProfile) && + Objects.equals(this.platform, endpointTestResult.platform); } @Override public int hashCode() { - return Objects.hash(aid, testId, agentId, roundId, serverIp, networkProfile, systemMetrics, originalTargetProfile, userProfile, vpnProfile); + return Objects.hash(aid, testId, agentId, roundId, serverIp, networkProfile, systemMetrics, originalTargetProfile, userProfile, vpnProfile, batteryMetrics, cellularProfile, platform); } @Override @@ -346,6 +439,9 @@ public String toString() { sb.append(" originalTargetProfile: ").append(toIndentedString(originalTargetProfile)).append("\n"); sb.append(" userProfile: ").append(toIndentedString(userProfile)).append("\n"); sb.append(" vpnProfile: ").append(toIndentedString(vpnProfile)).append("\n"); + sb.append(" batteryMetrics: ").append(toIndentedString(batteryMetrics)).append("\n"); + sb.append(" cellularProfile: ").append(toIndentedString(cellularProfile)).append("\n"); + sb.append(" platform: ").append(toIndentedString(platform)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/HttpEndpointTestResult.java b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/HttpEndpointTestResult.java index 745ba94f6..f5056af57 100644 --- a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/HttpEndpointTestResult.java +++ b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/HttpEndpointTestResult.java @@ -20,10 +20,13 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; +import com.thousandeyes.sdk.endpoint.tests.results.model.BatteryMetrics; +import com.thousandeyes.sdk.endpoint.tests.results.model.CellularProfile; import com.thousandeyes.sdk.endpoint.tests.results.model.EndpointHttpDataPointScore; import com.thousandeyes.sdk.endpoint.tests.results.model.HttpEndpointTestResultHeaders; import com.thousandeyes.sdk.endpoint.tests.results.model.HttpErrorType; import com.thousandeyes.sdk.endpoint.tests.results.model.NetworkProfile; +import com.thousandeyes.sdk.endpoint.tests.results.model.Platform; import com.thousandeyes.sdk.endpoint.tests.results.model.SystemMetrics; import com.thousandeyes.sdk.endpoint.tests.results.model.TargetProfile; import com.thousandeyes.sdk.endpoint.tests.results.model.UserProfile; @@ -46,6 +49,9 @@ HttpEndpointTestResult.JSON_PROPERTY_ORIGINAL_TARGET_PROFILE, HttpEndpointTestResult.JSON_PROPERTY_USER_PROFILE, HttpEndpointTestResult.JSON_PROPERTY_VPN_PROFILE, + HttpEndpointTestResult.JSON_PROPERTY_BATTERY_METRICS, + HttpEndpointTestResult.JSON_PROPERTY_CELLULAR_PROFILE, + HttpEndpointTestResult.JSON_PROPERTY_PLATFORM, HttpEndpointTestResult.JSON_PROPERTY_SCORE, HttpEndpointTestResult.JSON_PROPERTY_CONNECT_TIME, HttpEndpointTestResult.JSON_PROPERTY_DNS_TIME, @@ -95,6 +101,15 @@ public class HttpEndpointTestResult { public static final String JSON_PROPERTY_VPN_PROFILE = "vpnProfile"; private VpnProfile vpnProfile; + public static final String JSON_PROPERTY_BATTERY_METRICS = "batteryMetrics"; + private BatteryMetrics batteryMetrics; + + public static final String JSON_PROPERTY_CELLULAR_PROFILE = "cellularProfile"; + private CellularProfile cellularProfile; + + public static final String JSON_PROPERTY_PLATFORM = "platform"; + private Platform platform; + public static final String JSON_PROPERTY_SCORE = "score"; private EndpointHttpDataPointScore score; @@ -396,6 +411,81 @@ public void setVpnProfile(VpnProfile vpnProfile) { } + public HttpEndpointTestResult batteryMetrics(BatteryMetrics batteryMetrics) { + this.batteryMetrics = batteryMetrics; + return this; + } + + /** + * Get batteryMetrics + * @return batteryMetrics + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BATTERY_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BatteryMetrics getBatteryMetrics() { + return batteryMetrics; + } + + + @JsonProperty(JSON_PROPERTY_BATTERY_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBatteryMetrics(BatteryMetrics batteryMetrics) { + this.batteryMetrics = batteryMetrics; + } + + + public HttpEndpointTestResult cellularProfile(CellularProfile cellularProfile) { + this.cellularProfile = cellularProfile; + return this; + } + + /** + * Get cellularProfile + * @return cellularProfile + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CELLULAR_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CellularProfile getCellularProfile() { + return cellularProfile; + } + + + @JsonProperty(JSON_PROPERTY_CELLULAR_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCellularProfile(CellularProfile cellularProfile) { + this.cellularProfile = cellularProfile; + } + + + public HttpEndpointTestResult platform(Platform platform) { + this.platform = platform; + return this; + } + + /** + * Get platform + * @return platform + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PLATFORM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Platform getPlatform() { + return platform; + } + + + @JsonProperty(JSON_PROPERTY_PLATFORM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPlatform(Platform platform) { + this.platform = platform; + } + + public HttpEndpointTestResult score(EndpointHttpDataPointScore score) { this.score = score; return this; @@ -688,6 +778,9 @@ public boolean equals(Object o) { Objects.equals(this.originalTargetProfile, httpEndpointTestResult.originalTargetProfile) && Objects.equals(this.userProfile, httpEndpointTestResult.userProfile) && Objects.equals(this.vpnProfile, httpEndpointTestResult.vpnProfile) && + Objects.equals(this.batteryMetrics, httpEndpointTestResult.batteryMetrics) && + Objects.equals(this.cellularProfile, httpEndpointTestResult.cellularProfile) && + Objects.equals(this.platform, httpEndpointTestResult.platform) && Objects.equals(this.score, httpEndpointTestResult.score) && Objects.equals(this.connectTime, httpEndpointTestResult.connectTime) && Objects.equals(this.dnsTime, httpEndpointTestResult.dnsTime) && @@ -708,7 +801,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(aid, testId, agentId, roundId, serverIp, networkProfile, systemMetrics, originalTargetProfile, userProfile, vpnProfile, score, connectTime, dnsTime, errorType, errorDetails, headers, numRedirects, receiveTime, redirectTime, responseCode, responseTime, sslTime, totalTime, waitTime, wireSize, throughput); + return Objects.hash(aid, testId, agentId, roundId, serverIp, networkProfile, systemMetrics, originalTargetProfile, userProfile, vpnProfile, batteryMetrics, cellularProfile, platform, score, connectTime, dnsTime, errorType, errorDetails, headers, numRedirects, receiveTime, redirectTime, responseCode, responseTime, sslTime, totalTime, waitTime, wireSize, throughput); } @Override @@ -725,6 +818,9 @@ public String toString() { sb.append(" originalTargetProfile: ").append(toIndentedString(originalTargetProfile)).append("\n"); sb.append(" userProfile: ").append(toIndentedString(userProfile)).append("\n"); sb.append(" vpnProfile: ").append(toIndentedString(vpnProfile)).append("\n"); + sb.append(" batteryMetrics: ").append(toIndentedString(batteryMetrics)).append("\n"); + sb.append(" cellularProfile: ").append(toIndentedString(cellularProfile)).append("\n"); + sb.append(" platform: ").append(toIndentedString(platform)).append("\n"); sb.append(" score: ").append(toIndentedString(score)).append("\n"); sb.append(" connectTime: ").append(toIndentedString(connectTime)).append("\n"); sb.append(" dnsTime: ").append(toIndentedString(dnsTime)).append("\n"); diff --git a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/LocalNetworkTopologyResult.java b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/LocalNetworkTopologyResult.java index b75f54d05..12d787c9f 100644 --- a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/LocalNetworkTopologyResult.java +++ b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/LocalNetworkTopologyResult.java @@ -20,6 +20,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; +import com.thousandeyes.sdk.endpoint.tests.results.model.BatteryMetrics; +import com.thousandeyes.sdk.endpoint.tests.results.model.CellularProfile; import com.thousandeyes.sdk.endpoint.tests.results.model.EndpointProbeAgentScore; import com.thousandeyes.sdk.endpoint.tests.results.model.EndpointProbeConnectionScore; import com.thousandeyes.sdk.endpoint.tests.results.model.EndpointProbeGatewayScore; @@ -28,6 +30,7 @@ import com.thousandeyes.sdk.endpoint.tests.results.model.NetworkPing; import com.thousandeyes.sdk.endpoint.tests.results.model.NetworkProfile; import com.thousandeyes.sdk.endpoint.tests.results.model.NetworkTopologyType; +import com.thousandeyes.sdk.endpoint.tests.results.model.Platform; import com.thousandeyes.sdk.endpoint.tests.results.model.RealUserEndpointTestCoordinates; import com.thousandeyes.sdk.endpoint.tests.results.model.SystemMetricDetails; import com.thousandeyes.sdk.endpoint.tests.results.model.SystemMetrics; @@ -62,6 +65,9 @@ LocalNetworkTopologyResult.JSON_PROPERTY_PROXY_SCORE, LocalNetworkTopologyResult.JSON_PROPERTY_CONNECTION_SCORE, LocalNetworkTopologyResult.JSON_PROPERTY_AGENT_SCORE, + LocalNetworkTopologyResult.JSON_PROPERTY_BATTERY_METRICS, + LocalNetworkTopologyResult.JSON_PROPERTY_CELLULAR_PROFILE, + LocalNetworkTopologyResult.JSON_PROPERTY_PLATFORM, LocalNetworkTopologyResult.JSON_PROPERTY_COORDINATES, LocalNetworkTopologyResult.JSON_PROPERTY_NETWORK_PROFILE, LocalNetworkTopologyResult.JSON_PROPERTY_ICMP_TRACEROUTE, @@ -120,6 +126,15 @@ public class LocalNetworkTopologyResult { public static final String JSON_PROPERTY_AGENT_SCORE = "agentScore"; private EndpointProbeAgentScore agentScore; + public static final String JSON_PROPERTY_BATTERY_METRICS = "batteryMetrics"; + private BatteryMetrics batteryMetrics; + + public static final String JSON_PROPERTY_CELLULAR_PROFILE = "cellularProfile"; + private CellularProfile cellularProfile; + + public static final String JSON_PROPERTY_PLATFORM = "platform"; + private Platform platform; + public static final String JSON_PROPERTY_COORDINATES = "coordinates"; private RealUserEndpointTestCoordinates coordinates; @@ -510,6 +525,81 @@ public void setAgentScore(EndpointProbeAgentScore agentScore) { } + public LocalNetworkTopologyResult batteryMetrics(BatteryMetrics batteryMetrics) { + this.batteryMetrics = batteryMetrics; + return this; + } + + /** + * Get batteryMetrics + * @return batteryMetrics + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BATTERY_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BatteryMetrics getBatteryMetrics() { + return batteryMetrics; + } + + + @JsonProperty(JSON_PROPERTY_BATTERY_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBatteryMetrics(BatteryMetrics batteryMetrics) { + this.batteryMetrics = batteryMetrics; + } + + + public LocalNetworkTopologyResult cellularProfile(CellularProfile cellularProfile) { + this.cellularProfile = cellularProfile; + return this; + } + + /** + * Get cellularProfile + * @return cellularProfile + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CELLULAR_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CellularProfile getCellularProfile() { + return cellularProfile; + } + + + @JsonProperty(JSON_PROPERTY_CELLULAR_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCellularProfile(CellularProfile cellularProfile) { + this.cellularProfile = cellularProfile; + } + + + public LocalNetworkTopologyResult platform(Platform platform) { + this.platform = platform; + return this; + } + + /** + * Get platform + * @return platform + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PLATFORM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Platform getPlatform() { + return platform; + } + + + @JsonProperty(JSON_PROPERTY_PLATFORM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPlatform(Platform platform) { + this.platform = platform; + } + + public LocalNetworkTopologyResult coordinates(RealUserEndpointTestCoordinates coordinates) { this.coordinates = coordinates; return this; @@ -647,6 +737,9 @@ public boolean equals(Object o) { Objects.equals(this.proxyScore, localNetworkTopologyResult.proxyScore) && Objects.equals(this.connectionScore, localNetworkTopologyResult.connectionScore) && Objects.equals(this.agentScore, localNetworkTopologyResult.agentScore) && + Objects.equals(this.batteryMetrics, localNetworkTopologyResult.batteryMetrics) && + Objects.equals(this.cellularProfile, localNetworkTopologyResult.cellularProfile) && + Objects.equals(this.platform, localNetworkTopologyResult.platform) && Objects.equals(this.coordinates, localNetworkTopologyResult.coordinates) && Objects.equals(this.networkProfile, localNetworkTopologyResult.networkProfile) && Objects.equals(this.icmpTraceroute, localNetworkTopologyResult.icmpTraceroute) && @@ -655,7 +748,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(agentId, date, networkTopologyId, roundId, target, targetPort, type, icmpPing, isIcmpBlocked, tcpConnect, systemMetrics, systemMetricDetails, vpnScore, gatewayScore, proxyScore, connectionScore, agentScore, coordinates, networkProfile, icmpTraceroute, icmpTraceroutes); + return Objects.hash(agentId, date, networkTopologyId, roundId, target, targetPort, type, icmpPing, isIcmpBlocked, tcpConnect, systemMetrics, systemMetricDetails, vpnScore, gatewayScore, proxyScore, connectionScore, agentScore, batteryMetrics, cellularProfile, platform, coordinates, networkProfile, icmpTraceroute, icmpTraceroutes); } @Override @@ -679,6 +772,9 @@ public String toString() { sb.append(" proxyScore: ").append(toIndentedString(proxyScore)).append("\n"); sb.append(" connectionScore: ").append(toIndentedString(connectionScore)).append("\n"); sb.append(" agentScore: ").append(toIndentedString(agentScore)).append("\n"); + sb.append(" batteryMetrics: ").append(toIndentedString(batteryMetrics)).append("\n"); + sb.append(" cellularProfile: ").append(toIndentedString(cellularProfile)).append("\n"); + sb.append(" platform: ").append(toIndentedString(platform)).append("\n"); sb.append(" coordinates: ").append(toIndentedString(coordinates)).append("\n"); sb.append(" networkProfile: ").append(toIndentedString(networkProfile)).append("\n"); sb.append(" icmpTraceroute: ").append(toIndentedString(icmpTraceroute)).append("\n"); diff --git a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/LocalNetworkTopologyResultBase.java b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/LocalNetworkTopologyResultBase.java index 91406bd7d..5bb9fddbc 100644 --- a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/LocalNetworkTopologyResultBase.java +++ b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/LocalNetworkTopologyResultBase.java @@ -20,6 +20,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; +import com.thousandeyes.sdk.endpoint.tests.results.model.BatteryMetrics; +import com.thousandeyes.sdk.endpoint.tests.results.model.CellularProfile; import com.thousandeyes.sdk.endpoint.tests.results.model.EndpointProbeAgentScore; import com.thousandeyes.sdk.endpoint.tests.results.model.EndpointProbeConnectionScore; import com.thousandeyes.sdk.endpoint.tests.results.model.EndpointProbeGatewayScore; @@ -27,6 +29,7 @@ import com.thousandeyes.sdk.endpoint.tests.results.model.EndpointProbeVpnScore; import com.thousandeyes.sdk.endpoint.tests.results.model.NetworkPing; import com.thousandeyes.sdk.endpoint.tests.results.model.NetworkTopologyType; +import com.thousandeyes.sdk.endpoint.tests.results.model.Platform; import com.thousandeyes.sdk.endpoint.tests.results.model.SystemMetricDetails; import com.thousandeyes.sdk.endpoint.tests.results.model.SystemMetrics; import com.thousandeyes.sdk.endpoint.tests.results.model.TcpConnect; @@ -55,7 +58,10 @@ LocalNetworkTopologyResultBase.JSON_PROPERTY_GATEWAY_SCORE, LocalNetworkTopologyResultBase.JSON_PROPERTY_PROXY_SCORE, LocalNetworkTopologyResultBase.JSON_PROPERTY_CONNECTION_SCORE, - LocalNetworkTopologyResultBase.JSON_PROPERTY_AGENT_SCORE + LocalNetworkTopologyResultBase.JSON_PROPERTY_AGENT_SCORE, + LocalNetworkTopologyResultBase.JSON_PROPERTY_BATTERY_METRICS, + LocalNetworkTopologyResultBase.JSON_PROPERTY_CELLULAR_PROFILE, + LocalNetworkTopologyResultBase.JSON_PROPERTY_PLATFORM }) @jakarta.annotation.Generated(value = "com.thousandeyes.api.codegen.ThousandeyesJavaGenerator") public class LocalNetworkTopologyResultBase { @@ -110,6 +116,15 @@ public class LocalNetworkTopologyResultBase { public static final String JSON_PROPERTY_AGENT_SCORE = "agentScore"; private EndpointProbeAgentScore agentScore; + public static final String JSON_PROPERTY_BATTERY_METRICS = "batteryMetrics"; + private BatteryMetrics batteryMetrics; + + public static final String JSON_PROPERTY_CELLULAR_PROFILE = "cellularProfile"; + private CellularProfile cellularProfile; + + public static final String JSON_PROPERTY_PLATFORM = "platform"; + private Platform platform; + public LocalNetworkTopologyResultBase() { } @@ -488,6 +503,81 @@ public void setAgentScore(EndpointProbeAgentScore agentScore) { } + public LocalNetworkTopologyResultBase batteryMetrics(BatteryMetrics batteryMetrics) { + this.batteryMetrics = batteryMetrics; + return this; + } + + /** + * Get batteryMetrics + * @return batteryMetrics + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BATTERY_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BatteryMetrics getBatteryMetrics() { + return batteryMetrics; + } + + + @JsonProperty(JSON_PROPERTY_BATTERY_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBatteryMetrics(BatteryMetrics batteryMetrics) { + this.batteryMetrics = batteryMetrics; + } + + + public LocalNetworkTopologyResultBase cellularProfile(CellularProfile cellularProfile) { + this.cellularProfile = cellularProfile; + return this; + } + + /** + * Get cellularProfile + * @return cellularProfile + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CELLULAR_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CellularProfile getCellularProfile() { + return cellularProfile; + } + + + @JsonProperty(JSON_PROPERTY_CELLULAR_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCellularProfile(CellularProfile cellularProfile) { + this.cellularProfile = cellularProfile; + } + + + public LocalNetworkTopologyResultBase platform(Platform platform) { + this.platform = platform; + return this; + } + + /** + * Get platform + * @return platform + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PLATFORM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Platform getPlatform() { + return platform; + } + + + @JsonProperty(JSON_PROPERTY_PLATFORM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPlatform(Platform platform) { + this.platform = platform; + } + + /** * Return true if this LocalNetworkTopologyResultBase object is equal to o. */ @@ -516,12 +606,15 @@ public boolean equals(Object o) { Objects.equals(this.gatewayScore, localNetworkTopologyResultBase.gatewayScore) && Objects.equals(this.proxyScore, localNetworkTopologyResultBase.proxyScore) && Objects.equals(this.connectionScore, localNetworkTopologyResultBase.connectionScore) && - Objects.equals(this.agentScore, localNetworkTopologyResultBase.agentScore); + Objects.equals(this.agentScore, localNetworkTopologyResultBase.agentScore) && + Objects.equals(this.batteryMetrics, localNetworkTopologyResultBase.batteryMetrics) && + Objects.equals(this.cellularProfile, localNetworkTopologyResultBase.cellularProfile) && + Objects.equals(this.platform, localNetworkTopologyResultBase.platform); } @Override public int hashCode() { - return Objects.hash(agentId, date, networkTopologyId, roundId, target, targetPort, type, icmpPing, isIcmpBlocked, tcpConnect, systemMetrics, systemMetricDetails, vpnScore, gatewayScore, proxyScore, connectionScore, agentScore); + return Objects.hash(agentId, date, networkTopologyId, roundId, target, targetPort, type, icmpPing, isIcmpBlocked, tcpConnect, systemMetrics, systemMetricDetails, vpnScore, gatewayScore, proxyScore, connectionScore, agentScore, batteryMetrics, cellularProfile, platform); } @Override @@ -545,6 +638,9 @@ public String toString() { sb.append(" proxyScore: ").append(toIndentedString(proxyScore)).append("\n"); sb.append(" connectionScore: ").append(toIndentedString(connectionScore)).append("\n"); sb.append(" agentScore: ").append(toIndentedString(agentScore)).append("\n"); + sb.append(" batteryMetrics: ").append(toIndentedString(batteryMetrics)).append("\n"); + sb.append(" cellularProfile: ").append(toIndentedString(cellularProfile)).append("\n"); + sb.append(" platform: ").append(toIndentedString(platform)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/NetworkDynamicEndpointTestResult.java b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/NetworkDynamicEndpointTestResult.java index 5ce4850af..c5a494fa9 100644 --- a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/NetworkDynamicEndpointTestResult.java +++ b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/NetworkDynamicEndpointTestResult.java @@ -20,11 +20,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; +import com.thousandeyes.sdk.endpoint.tests.results.model.BatteryMetrics; +import com.thousandeyes.sdk.endpoint.tests.results.model.CellularProfile; import com.thousandeyes.sdk.endpoint.tests.results.model.DynamicEndpointTestWebex; import com.thousandeyes.sdk.endpoint.tests.results.model.EndpointPingDataPointScore; import com.thousandeyes.sdk.endpoint.tests.results.model.EndpointTestResultProtocol; import com.thousandeyes.sdk.endpoint.tests.results.model.EndpointZtaMetrics; import com.thousandeyes.sdk.endpoint.tests.results.model.NetworkProfile; +import com.thousandeyes.sdk.endpoint.tests.results.model.Platform; import com.thousandeyes.sdk.endpoint.tests.results.model.SystemMetrics; import com.thousandeyes.sdk.endpoint.tests.results.model.TargetProfile; import com.thousandeyes.sdk.endpoint.tests.results.model.TestProbeModeResponse; @@ -52,6 +55,9 @@ NetworkDynamicEndpointTestResult.JSON_PROPERTY_ORIGINAL_TARGET_PROFILE, NetworkDynamicEndpointTestResult.JSON_PROPERTY_USER_PROFILE, NetworkDynamicEndpointTestResult.JSON_PROPERTY_VPN_PROFILE, + NetworkDynamicEndpointTestResult.JSON_PROPERTY_BATTERY_METRICS, + NetworkDynamicEndpointTestResult.JSON_PROPERTY_CELLULAR_PROFILE, + NetworkDynamicEndpointTestResult.JSON_PROPERTY_PLATFORM, NetworkDynamicEndpointTestResult.JSON_PROPERTY_AVG_LATENCY, NetworkDynamicEndpointTestResult.JSON_PROPERTY_ERROR_DETAILS, NetworkDynamicEndpointTestResult.JSON_PROPERTY_JITTER, @@ -99,6 +105,15 @@ public class NetworkDynamicEndpointTestResult { public static final String JSON_PROPERTY_VPN_PROFILE = "vpnProfile"; private VpnProfile vpnProfile; + public static final String JSON_PROPERTY_BATTERY_METRICS = "batteryMetrics"; + private BatteryMetrics batteryMetrics; + + public static final String JSON_PROPERTY_CELLULAR_PROFILE = "cellularProfile"; + private CellularProfile cellularProfile; + + public static final String JSON_PROPERTY_PLATFORM = "platform"; + private Platform platform; + public static final String JSON_PROPERTY_AVG_LATENCY = "avgLatency"; private Double avgLatency; @@ -382,6 +397,81 @@ public void setVpnProfile(VpnProfile vpnProfile) { } + public NetworkDynamicEndpointTestResult batteryMetrics(BatteryMetrics batteryMetrics) { + this.batteryMetrics = batteryMetrics; + return this; + } + + /** + * Get batteryMetrics + * @return batteryMetrics + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BATTERY_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BatteryMetrics getBatteryMetrics() { + return batteryMetrics; + } + + + @JsonProperty(JSON_PROPERTY_BATTERY_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBatteryMetrics(BatteryMetrics batteryMetrics) { + this.batteryMetrics = batteryMetrics; + } + + + public NetworkDynamicEndpointTestResult cellularProfile(CellularProfile cellularProfile) { + this.cellularProfile = cellularProfile; + return this; + } + + /** + * Get cellularProfile + * @return cellularProfile + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CELLULAR_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CellularProfile getCellularProfile() { + return cellularProfile; + } + + + @JsonProperty(JSON_PROPERTY_CELLULAR_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCellularProfile(CellularProfile cellularProfile) { + this.cellularProfile = cellularProfile; + } + + + public NetworkDynamicEndpointTestResult platform(Platform platform) { + this.platform = platform; + return this; + } + + /** + * Get platform + * @return platform + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PLATFORM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Platform getPlatform() { + return platform; + } + + + @JsonProperty(JSON_PROPERTY_PLATFORM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPlatform(Platform platform) { + this.platform = platform; + } + + /** * Average RTT for packets sent to destination. * @return avgLatency @@ -692,6 +782,9 @@ public boolean equals(Object o) { Objects.equals(this.originalTargetProfile, networkDynamicEndpointTestResult.originalTargetProfile) && Objects.equals(this.userProfile, networkDynamicEndpointTestResult.userProfile) && Objects.equals(this.vpnProfile, networkDynamicEndpointTestResult.vpnProfile) && + Objects.equals(this.batteryMetrics, networkDynamicEndpointTestResult.batteryMetrics) && + Objects.equals(this.cellularProfile, networkDynamicEndpointTestResult.cellularProfile) && + Objects.equals(this.platform, networkDynamicEndpointTestResult.platform) && Objects.equals(this.avgLatency, networkDynamicEndpointTestResult.avgLatency) && Objects.equals(this.errorDetails, networkDynamicEndpointTestResult.errorDetails) && Objects.equals(this.jitter, networkDynamicEndpointTestResult.jitter) && @@ -710,7 +803,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(aid, testId, agentId, roundId, serverIp, networkProfile, systemMetrics, originalTargetProfile, userProfile, vpnProfile, avgLatency, errorDetails, jitter, score, ztaMetrics, isIcmpBlocked, loss, maxLatency, minLatency, application, protocol, tcpProbeMode, udpProbeMode, webex); + return Objects.hash(aid, testId, agentId, roundId, serverIp, networkProfile, systemMetrics, originalTargetProfile, userProfile, vpnProfile, batteryMetrics, cellularProfile, platform, avgLatency, errorDetails, jitter, score, ztaMetrics, isIcmpBlocked, loss, maxLatency, minLatency, application, protocol, tcpProbeMode, udpProbeMode, webex); } @Override @@ -727,6 +820,9 @@ public String toString() { sb.append(" originalTargetProfile: ").append(toIndentedString(originalTargetProfile)).append("\n"); sb.append(" userProfile: ").append(toIndentedString(userProfile)).append("\n"); sb.append(" vpnProfile: ").append(toIndentedString(vpnProfile)).append("\n"); + sb.append(" batteryMetrics: ").append(toIndentedString(batteryMetrics)).append("\n"); + sb.append(" cellularProfile: ").append(toIndentedString(cellularProfile)).append("\n"); + sb.append(" platform: ").append(toIndentedString(platform)).append("\n"); sb.append(" avgLatency: ").append(toIndentedString(avgLatency)).append("\n"); sb.append(" errorDetails: ").append(toIndentedString(errorDetails)).append("\n"); sb.append(" jitter: ").append(toIndentedString(jitter)).append("\n"); diff --git a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/NetworkEndpointTestResult.java b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/NetworkEndpointTestResult.java index 7ecac0075..eb4722e23 100644 --- a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/NetworkEndpointTestResult.java +++ b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/NetworkEndpointTestResult.java @@ -20,9 +20,12 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; +import com.thousandeyes.sdk.endpoint.tests.results.model.BatteryMetrics; +import com.thousandeyes.sdk.endpoint.tests.results.model.CellularProfile; import com.thousandeyes.sdk.endpoint.tests.results.model.EndpointPingDataPointScore; import com.thousandeyes.sdk.endpoint.tests.results.model.EndpointZtaMetrics; import com.thousandeyes.sdk.endpoint.tests.results.model.NetworkProfile; +import com.thousandeyes.sdk.endpoint.tests.results.model.Platform; import com.thousandeyes.sdk.endpoint.tests.results.model.SystemMetrics; import com.thousandeyes.sdk.endpoint.tests.results.model.TargetProfile; import com.thousandeyes.sdk.endpoint.tests.results.model.UserProfile; @@ -48,6 +51,9 @@ NetworkEndpointTestResult.JSON_PROPERTY_ORIGINAL_TARGET_PROFILE, NetworkEndpointTestResult.JSON_PROPERTY_USER_PROFILE, NetworkEndpointTestResult.JSON_PROPERTY_VPN_PROFILE, + NetworkEndpointTestResult.JSON_PROPERTY_BATTERY_METRICS, + NetworkEndpointTestResult.JSON_PROPERTY_CELLULAR_PROFILE, + NetworkEndpointTestResult.JSON_PROPERTY_PLATFORM, NetworkEndpointTestResult.JSON_PROPERTY_AVG_LATENCY, NetworkEndpointTestResult.JSON_PROPERTY_ERROR_DETAILS, NetworkEndpointTestResult.JSON_PROPERTY_JITTER, @@ -90,6 +96,15 @@ public class NetworkEndpointTestResult { public static final String JSON_PROPERTY_VPN_PROFILE = "vpnProfile"; private VpnProfile vpnProfile; + public static final String JSON_PROPERTY_BATTERY_METRICS = "batteryMetrics"; + private BatteryMetrics batteryMetrics; + + public static final String JSON_PROPERTY_CELLULAR_PROFILE = "cellularProfile"; + private CellularProfile cellularProfile; + + public static final String JSON_PROPERTY_PLATFORM = "platform"; + private Platform platform; + public static final String JSON_PROPERTY_AVG_LATENCY = "avgLatency"; private Double avgLatency; @@ -358,6 +373,81 @@ public void setVpnProfile(VpnProfile vpnProfile) { } + public NetworkEndpointTestResult batteryMetrics(BatteryMetrics batteryMetrics) { + this.batteryMetrics = batteryMetrics; + return this; + } + + /** + * Get batteryMetrics + * @return batteryMetrics + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BATTERY_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BatteryMetrics getBatteryMetrics() { + return batteryMetrics; + } + + + @JsonProperty(JSON_PROPERTY_BATTERY_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBatteryMetrics(BatteryMetrics batteryMetrics) { + this.batteryMetrics = batteryMetrics; + } + + + public NetworkEndpointTestResult cellularProfile(CellularProfile cellularProfile) { + this.cellularProfile = cellularProfile; + return this; + } + + /** + * Get cellularProfile + * @return cellularProfile + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CELLULAR_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CellularProfile getCellularProfile() { + return cellularProfile; + } + + + @JsonProperty(JSON_PROPERTY_CELLULAR_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCellularProfile(CellularProfile cellularProfile) { + this.cellularProfile = cellularProfile; + } + + + public NetworkEndpointTestResult platform(Platform platform) { + this.platform = platform; + return this; + } + + /** + * Get platform + * @return platform + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PLATFORM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Platform getPlatform() { + return platform; + } + + + @JsonProperty(JSON_PROPERTY_PLATFORM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPlatform(Platform platform) { + this.platform = platform; + } + + /** * Average RTT for packets sent to destination. * @return avgLatency @@ -543,6 +633,9 @@ public boolean equals(Object o) { Objects.equals(this.originalTargetProfile, networkEndpointTestResult.originalTargetProfile) && Objects.equals(this.userProfile, networkEndpointTestResult.userProfile) && Objects.equals(this.vpnProfile, networkEndpointTestResult.vpnProfile) && + Objects.equals(this.batteryMetrics, networkEndpointTestResult.batteryMetrics) && + Objects.equals(this.cellularProfile, networkEndpointTestResult.cellularProfile) && + Objects.equals(this.platform, networkEndpointTestResult.platform) && Objects.equals(this.avgLatency, networkEndpointTestResult.avgLatency) && Objects.equals(this.errorDetails, networkEndpointTestResult.errorDetails) && Objects.equals(this.jitter, networkEndpointTestResult.jitter) && @@ -556,7 +649,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(aid, testId, agentId, roundId, serverIp, networkProfile, systemMetrics, originalTargetProfile, userProfile, vpnProfile, avgLatency, errorDetails, jitter, score, ztaMetrics, isIcmpBlocked, loss, maxLatency, minLatency); + return Objects.hash(aid, testId, agentId, roundId, serverIp, networkProfile, systemMetrics, originalTargetProfile, userProfile, vpnProfile, batteryMetrics, cellularProfile, platform, avgLatency, errorDetails, jitter, score, ztaMetrics, isIcmpBlocked, loss, maxLatency, minLatency); } @Override @@ -573,6 +666,9 @@ public String toString() { sb.append(" originalTargetProfile: ").append(toIndentedString(originalTargetProfile)).append("\n"); sb.append(" userProfile: ").append(toIndentedString(userProfile)).append("\n"); sb.append(" vpnProfile: ").append(toIndentedString(vpnProfile)).append("\n"); + sb.append(" batteryMetrics: ").append(toIndentedString(batteryMetrics)).append("\n"); + sb.append(" cellularProfile: ").append(toIndentedString(cellularProfile)).append("\n"); + sb.append(" platform: ").append(toIndentedString(platform)).append("\n"); sb.append(" avgLatency: ").append(toIndentedString(avgLatency)).append("\n"); sb.append(" errorDetails: ").append(toIndentedString(errorDetails)).append("\n"); sb.append(" jitter: ").append(toIndentedString(jitter)).append("\n"); diff --git a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/PathVisBaseEndpointTestResult.java b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/PathVisBaseEndpointTestResult.java index 6ce9efcf5..531213d57 100644 --- a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/PathVisBaseEndpointTestResult.java +++ b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/PathVisBaseEndpointTestResult.java @@ -21,7 +21,10 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import com.thousandeyes.sdk.endpoint.tests.results.model.AsnDetails; +import com.thousandeyes.sdk.endpoint.tests.results.model.BatteryMetrics; +import com.thousandeyes.sdk.endpoint.tests.results.model.CellularProfile; import com.thousandeyes.sdk.endpoint.tests.results.model.NetworkProfile; +import com.thousandeyes.sdk.endpoint.tests.results.model.Platform; import com.thousandeyes.sdk.endpoint.tests.results.model.SystemMetrics; import com.thousandeyes.sdk.endpoint.tests.results.model.TargetProfile; import com.thousandeyes.sdk.endpoint.tests.results.model.UserProfile; @@ -44,6 +47,9 @@ PathVisBaseEndpointTestResult.JSON_PROPERTY_ORIGINAL_TARGET_PROFILE, PathVisBaseEndpointTestResult.JSON_PROPERTY_USER_PROFILE, PathVisBaseEndpointTestResult.JSON_PROPERTY_VPN_PROFILE, + PathVisBaseEndpointTestResult.JSON_PROPERTY_BATTERY_METRICS, + PathVisBaseEndpointTestResult.JSON_PROPERTY_CELLULAR_PROFILE, + PathVisBaseEndpointTestResult.JSON_PROPERTY_PLATFORM, PathVisBaseEndpointTestResult.JSON_PROPERTY_ASN_DETAILS, PathVisBaseEndpointTestResult.JSON_PROPERTY_SERVER, PathVisBaseEndpointTestResult.JSON_PROPERTY_SOURCE_IP, @@ -81,6 +87,15 @@ public class PathVisBaseEndpointTestResult { public static final String JSON_PROPERTY_VPN_PROFILE = "vpnProfile"; private VpnProfile vpnProfile; + public static final String JSON_PROPERTY_BATTERY_METRICS = "batteryMetrics"; + private BatteryMetrics batteryMetrics; + + public static final String JSON_PROPERTY_CELLULAR_PROFILE = "cellularProfile"; + private CellularProfile cellularProfile; + + public static final String JSON_PROPERTY_PLATFORM = "platform"; + private Platform platform; + public static final String JSON_PROPERTY_ASN_DETAILS = "asnDetails"; private AsnDetails asnDetails; @@ -326,6 +341,81 @@ public void setVpnProfile(VpnProfile vpnProfile) { } + public PathVisBaseEndpointTestResult batteryMetrics(BatteryMetrics batteryMetrics) { + this.batteryMetrics = batteryMetrics; + return this; + } + + /** + * Get batteryMetrics + * @return batteryMetrics + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BATTERY_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BatteryMetrics getBatteryMetrics() { + return batteryMetrics; + } + + + @JsonProperty(JSON_PROPERTY_BATTERY_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBatteryMetrics(BatteryMetrics batteryMetrics) { + this.batteryMetrics = batteryMetrics; + } + + + public PathVisBaseEndpointTestResult cellularProfile(CellularProfile cellularProfile) { + this.cellularProfile = cellularProfile; + return this; + } + + /** + * Get cellularProfile + * @return cellularProfile + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CELLULAR_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CellularProfile getCellularProfile() { + return cellularProfile; + } + + + @JsonProperty(JSON_PROPERTY_CELLULAR_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCellularProfile(CellularProfile cellularProfile) { + this.cellularProfile = cellularProfile; + } + + + public PathVisBaseEndpointTestResult platform(Platform platform) { + this.platform = platform; + return this; + } + + /** + * Get platform + * @return platform + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PLATFORM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Platform getPlatform() { + return platform; + } + + + @JsonProperty(JSON_PROPERTY_PLATFORM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPlatform(Platform platform) { + this.platform = platform; + } + + public PathVisBaseEndpointTestResult asnDetails(AsnDetails asnDetails) { this.asnDetails = asnDetails; return this; @@ -418,6 +508,9 @@ public boolean equals(Object o) { Objects.equals(this.originalTargetProfile, pathVisBaseEndpointTestResult.originalTargetProfile) && Objects.equals(this.userProfile, pathVisBaseEndpointTestResult.userProfile) && Objects.equals(this.vpnProfile, pathVisBaseEndpointTestResult.vpnProfile) && + Objects.equals(this.batteryMetrics, pathVisBaseEndpointTestResult.batteryMetrics) && + Objects.equals(this.cellularProfile, pathVisBaseEndpointTestResult.cellularProfile) && + Objects.equals(this.platform, pathVisBaseEndpointTestResult.platform) && Objects.equals(this.asnDetails, pathVisBaseEndpointTestResult.asnDetails) && Objects.equals(this.server, pathVisBaseEndpointTestResult.server) && Objects.equals(this.sourceIp, pathVisBaseEndpointTestResult.sourceIp) && @@ -426,7 +519,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(aid, testId, agentId, roundId, serverIp, networkProfile, systemMetrics, originalTargetProfile, userProfile, vpnProfile, asnDetails, server, sourceIp, sourcePrefix); + return Objects.hash(aid, testId, agentId, roundId, serverIp, networkProfile, systemMetrics, originalTargetProfile, userProfile, vpnProfile, batteryMetrics, cellularProfile, platform, asnDetails, server, sourceIp, sourcePrefix); } @Override @@ -443,6 +536,9 @@ public String toString() { sb.append(" originalTargetProfile: ").append(toIndentedString(originalTargetProfile)).append("\n"); sb.append(" userProfile: ").append(toIndentedString(userProfile)).append("\n"); sb.append(" vpnProfile: ").append(toIndentedString(vpnProfile)).append("\n"); + sb.append(" batteryMetrics: ").append(toIndentedString(batteryMetrics)).append("\n"); + sb.append(" cellularProfile: ").append(toIndentedString(cellularProfile)).append("\n"); + sb.append(" platform: ").append(toIndentedString(platform)).append("\n"); sb.append(" asnDetails: ").append(toIndentedString(asnDetails)).append("\n"); sb.append(" server: ").append(toIndentedString(server)).append("\n"); sb.append(" sourceIp: ").append(toIndentedString(sourceIp)).append("\n"); diff --git a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/PathVisDetailDynamicEndpointTestResult.java b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/PathVisDetailDynamicEndpointTestResult.java index d16daa703..0289d536c 100644 --- a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/PathVisDetailDynamicEndpointTestResult.java +++ b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/PathVisDetailDynamicEndpointTestResult.java @@ -21,10 +21,13 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import com.thousandeyes.sdk.endpoint.tests.results.model.AsnDetails; +import com.thousandeyes.sdk.endpoint.tests.results.model.BatteryMetrics; +import com.thousandeyes.sdk.endpoint.tests.results.model.CellularProfile; import com.thousandeyes.sdk.endpoint.tests.results.model.DynamicEndpointTestWebex; import com.thousandeyes.sdk.endpoint.tests.results.model.EndpointPathVisRoute; import com.thousandeyes.sdk.endpoint.tests.results.model.EndpointTestResultProtocol; import com.thousandeyes.sdk.endpoint.tests.results.model.NetworkProfile; +import com.thousandeyes.sdk.endpoint.tests.results.model.Platform; import com.thousandeyes.sdk.endpoint.tests.results.model.SystemMetrics; import com.thousandeyes.sdk.endpoint.tests.results.model.TargetProfile; import com.thousandeyes.sdk.endpoint.tests.results.model.TestProbeModeResponse; @@ -52,6 +55,9 @@ PathVisDetailDynamicEndpointTestResult.JSON_PROPERTY_ORIGINAL_TARGET_PROFILE, PathVisDetailDynamicEndpointTestResult.JSON_PROPERTY_USER_PROFILE, PathVisDetailDynamicEndpointTestResult.JSON_PROPERTY_VPN_PROFILE, + PathVisDetailDynamicEndpointTestResult.JSON_PROPERTY_BATTERY_METRICS, + PathVisDetailDynamicEndpointTestResult.JSON_PROPERTY_CELLULAR_PROFILE, + PathVisDetailDynamicEndpointTestResult.JSON_PROPERTY_PLATFORM, PathVisDetailDynamicEndpointTestResult.JSON_PROPERTY_ASN_DETAILS, PathVisDetailDynamicEndpointTestResult.JSON_PROPERTY_SERVER, PathVisDetailDynamicEndpointTestResult.JSON_PROPERTY_SOURCE_IP, @@ -96,6 +102,15 @@ public class PathVisDetailDynamicEndpointTestResult { public static final String JSON_PROPERTY_VPN_PROFILE = "vpnProfile"; private VpnProfile vpnProfile; + public static final String JSON_PROPERTY_BATTERY_METRICS = "batteryMetrics"; + private BatteryMetrics batteryMetrics; + + public static final String JSON_PROPERTY_CELLULAR_PROFILE = "cellularProfile"; + private CellularProfile cellularProfile; + + public static final String JSON_PROPERTY_PLATFORM = "platform"; + private Platform platform; + public static final String JSON_PROPERTY_ASN_DETAILS = "asnDetails"; private AsnDetails asnDetails; @@ -362,6 +377,81 @@ public void setVpnProfile(VpnProfile vpnProfile) { } + public PathVisDetailDynamicEndpointTestResult batteryMetrics(BatteryMetrics batteryMetrics) { + this.batteryMetrics = batteryMetrics; + return this; + } + + /** + * Get batteryMetrics + * @return batteryMetrics + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BATTERY_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BatteryMetrics getBatteryMetrics() { + return batteryMetrics; + } + + + @JsonProperty(JSON_PROPERTY_BATTERY_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBatteryMetrics(BatteryMetrics batteryMetrics) { + this.batteryMetrics = batteryMetrics; + } + + + public PathVisDetailDynamicEndpointTestResult cellularProfile(CellularProfile cellularProfile) { + this.cellularProfile = cellularProfile; + return this; + } + + /** + * Get cellularProfile + * @return cellularProfile + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CELLULAR_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CellularProfile getCellularProfile() { + return cellularProfile; + } + + + @JsonProperty(JSON_PROPERTY_CELLULAR_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCellularProfile(CellularProfile cellularProfile) { + this.cellularProfile = cellularProfile; + } + + + public PathVisDetailDynamicEndpointTestResult platform(Platform platform) { + this.platform = platform; + return this; + } + + /** + * Get platform + * @return platform + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PLATFORM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Platform getPlatform() { + return platform; + } + + + @JsonProperty(JSON_PROPERTY_PLATFORM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPlatform(Platform platform) { + this.platform = platform; + } + + public PathVisDetailDynamicEndpointTestResult asnDetails(AsnDetails asnDetails) { this.asnDetails = asnDetails; return this; @@ -645,6 +735,9 @@ public boolean equals(Object o) { Objects.equals(this.originalTargetProfile, pathVisDetailDynamicEndpointTestResult.originalTargetProfile) && Objects.equals(this.userProfile, pathVisDetailDynamicEndpointTestResult.userProfile) && Objects.equals(this.vpnProfile, pathVisDetailDynamicEndpointTestResult.vpnProfile) && + Objects.equals(this.batteryMetrics, pathVisDetailDynamicEndpointTestResult.batteryMetrics) && + Objects.equals(this.cellularProfile, pathVisDetailDynamicEndpointTestResult.cellularProfile) && + Objects.equals(this.platform, pathVisDetailDynamicEndpointTestResult.platform) && Objects.equals(this.asnDetails, pathVisDetailDynamicEndpointTestResult.asnDetails) && Objects.equals(this.server, pathVisDetailDynamicEndpointTestResult.server) && Objects.equals(this.sourceIp, pathVisDetailDynamicEndpointTestResult.sourceIp) && @@ -660,7 +753,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(aid, testId, agentId, roundId, serverIp, networkProfile, systemMetrics, originalTargetProfile, userProfile, vpnProfile, asnDetails, server, sourceIp, sourcePrefix, pathTraces, vpnPathTraces, application, protocol, tcpProbeMode, udpProbeMode, webex); + return Objects.hash(aid, testId, agentId, roundId, serverIp, networkProfile, systemMetrics, originalTargetProfile, userProfile, vpnProfile, batteryMetrics, cellularProfile, platform, asnDetails, server, sourceIp, sourcePrefix, pathTraces, vpnPathTraces, application, protocol, tcpProbeMode, udpProbeMode, webex); } @Override @@ -677,6 +770,9 @@ public String toString() { sb.append(" originalTargetProfile: ").append(toIndentedString(originalTargetProfile)).append("\n"); sb.append(" userProfile: ").append(toIndentedString(userProfile)).append("\n"); sb.append(" vpnProfile: ").append(toIndentedString(vpnProfile)).append("\n"); + sb.append(" batteryMetrics: ").append(toIndentedString(batteryMetrics)).append("\n"); + sb.append(" cellularProfile: ").append(toIndentedString(cellularProfile)).append("\n"); + sb.append(" platform: ").append(toIndentedString(platform)).append("\n"); sb.append(" asnDetails: ").append(toIndentedString(asnDetails)).append("\n"); sb.append(" server: ").append(toIndentedString(server)).append("\n"); sb.append(" sourceIp: ").append(toIndentedString(sourceIp)).append("\n"); diff --git a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/PathVisDetailEndpointTestResult.java b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/PathVisDetailEndpointTestResult.java index 6f63d65ca..611f41b5c 100644 --- a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/PathVisDetailEndpointTestResult.java +++ b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/PathVisDetailEndpointTestResult.java @@ -21,8 +21,11 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import com.thousandeyes.sdk.endpoint.tests.results.model.AsnDetails; +import com.thousandeyes.sdk.endpoint.tests.results.model.BatteryMetrics; +import com.thousandeyes.sdk.endpoint.tests.results.model.CellularProfile; import com.thousandeyes.sdk.endpoint.tests.results.model.EndpointPathVisRoute; import com.thousandeyes.sdk.endpoint.tests.results.model.NetworkProfile; +import com.thousandeyes.sdk.endpoint.tests.results.model.Platform; import com.thousandeyes.sdk.endpoint.tests.results.model.SystemMetrics; import com.thousandeyes.sdk.endpoint.tests.results.model.TargetProfile; import com.thousandeyes.sdk.endpoint.tests.results.model.UserProfile; @@ -48,6 +51,9 @@ PathVisDetailEndpointTestResult.JSON_PROPERTY_ORIGINAL_TARGET_PROFILE, PathVisDetailEndpointTestResult.JSON_PROPERTY_USER_PROFILE, PathVisDetailEndpointTestResult.JSON_PROPERTY_VPN_PROFILE, + PathVisDetailEndpointTestResult.JSON_PROPERTY_BATTERY_METRICS, + PathVisDetailEndpointTestResult.JSON_PROPERTY_CELLULAR_PROFILE, + PathVisDetailEndpointTestResult.JSON_PROPERTY_PLATFORM, PathVisDetailEndpointTestResult.JSON_PROPERTY_ASN_DETAILS, PathVisDetailEndpointTestResult.JSON_PROPERTY_SERVER, PathVisDetailEndpointTestResult.JSON_PROPERTY_SOURCE_IP, @@ -87,6 +93,15 @@ public class PathVisDetailEndpointTestResult { public static final String JSON_PROPERTY_VPN_PROFILE = "vpnProfile"; private VpnProfile vpnProfile; + public static final String JSON_PROPERTY_BATTERY_METRICS = "batteryMetrics"; + private BatteryMetrics batteryMetrics; + + public static final String JSON_PROPERTY_CELLULAR_PROFILE = "cellularProfile"; + private CellularProfile cellularProfile; + + public static final String JSON_PROPERTY_PLATFORM = "platform"; + private Platform platform; + public static final String JSON_PROPERTY_ASN_DETAILS = "asnDetails"; private AsnDetails asnDetails; @@ -338,6 +353,81 @@ public void setVpnProfile(VpnProfile vpnProfile) { } + public PathVisDetailEndpointTestResult batteryMetrics(BatteryMetrics batteryMetrics) { + this.batteryMetrics = batteryMetrics; + return this; + } + + /** + * Get batteryMetrics + * @return batteryMetrics + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BATTERY_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BatteryMetrics getBatteryMetrics() { + return batteryMetrics; + } + + + @JsonProperty(JSON_PROPERTY_BATTERY_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBatteryMetrics(BatteryMetrics batteryMetrics) { + this.batteryMetrics = batteryMetrics; + } + + + public PathVisDetailEndpointTestResult cellularProfile(CellularProfile cellularProfile) { + this.cellularProfile = cellularProfile; + return this; + } + + /** + * Get cellularProfile + * @return cellularProfile + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CELLULAR_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CellularProfile getCellularProfile() { + return cellularProfile; + } + + + @JsonProperty(JSON_PROPERTY_CELLULAR_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCellularProfile(CellularProfile cellularProfile) { + this.cellularProfile = cellularProfile; + } + + + public PathVisDetailEndpointTestResult platform(Platform platform) { + this.platform = platform; + return this; + } + + /** + * Get platform + * @return platform + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PLATFORM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Platform getPlatform() { + return platform; + } + + + @JsonProperty(JSON_PROPERTY_PLATFORM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPlatform(Platform platform) { + this.platform = platform; + } + + public PathVisDetailEndpointTestResult asnDetails(AsnDetails asnDetails) { this.asnDetails = asnDetails; return this; @@ -496,6 +586,9 @@ public boolean equals(Object o) { Objects.equals(this.originalTargetProfile, pathVisDetailEndpointTestResult.originalTargetProfile) && Objects.equals(this.userProfile, pathVisDetailEndpointTestResult.userProfile) && Objects.equals(this.vpnProfile, pathVisDetailEndpointTestResult.vpnProfile) && + Objects.equals(this.batteryMetrics, pathVisDetailEndpointTestResult.batteryMetrics) && + Objects.equals(this.cellularProfile, pathVisDetailEndpointTestResult.cellularProfile) && + Objects.equals(this.platform, pathVisDetailEndpointTestResult.platform) && Objects.equals(this.asnDetails, pathVisDetailEndpointTestResult.asnDetails) && Objects.equals(this.server, pathVisDetailEndpointTestResult.server) && Objects.equals(this.sourceIp, pathVisDetailEndpointTestResult.sourceIp) && @@ -506,7 +599,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(aid, testId, agentId, roundId, serverIp, networkProfile, systemMetrics, originalTargetProfile, userProfile, vpnProfile, asnDetails, server, sourceIp, sourcePrefix, pathTraces, vpnPathTraces); + return Objects.hash(aid, testId, agentId, roundId, serverIp, networkProfile, systemMetrics, originalTargetProfile, userProfile, vpnProfile, batteryMetrics, cellularProfile, platform, asnDetails, server, sourceIp, sourcePrefix, pathTraces, vpnPathTraces); } @Override @@ -523,6 +616,9 @@ public String toString() { sb.append(" originalTargetProfile: ").append(toIndentedString(originalTargetProfile)).append("\n"); sb.append(" userProfile: ").append(toIndentedString(userProfile)).append("\n"); sb.append(" vpnProfile: ").append(toIndentedString(vpnProfile)).append("\n"); + sb.append(" batteryMetrics: ").append(toIndentedString(batteryMetrics)).append("\n"); + sb.append(" cellularProfile: ").append(toIndentedString(cellularProfile)).append("\n"); + sb.append(" platform: ").append(toIndentedString(platform)).append("\n"); sb.append(" asnDetails: ").append(toIndentedString(asnDetails)).append("\n"); sb.append(" server: ").append(toIndentedString(server)).append("\n"); sb.append(" sourceIp: ").append(toIndentedString(sourceIp)).append("\n"); diff --git a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/PathVisDynamicEndpointTestResult.java b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/PathVisDynamicEndpointTestResult.java index a36d0df25..721f22905 100644 --- a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/PathVisDynamicEndpointTestResult.java +++ b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/PathVisDynamicEndpointTestResult.java @@ -21,10 +21,13 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import com.thousandeyes.sdk.endpoint.tests.results.model.AsnDetails; +import com.thousandeyes.sdk.endpoint.tests.results.model.BatteryMetrics; +import com.thousandeyes.sdk.endpoint.tests.results.model.CellularProfile; import com.thousandeyes.sdk.endpoint.tests.results.model.DynamicEndpointTestWebex; import com.thousandeyes.sdk.endpoint.tests.results.model.EndpointPathTrace; import com.thousandeyes.sdk.endpoint.tests.results.model.EndpointTestResultProtocol; import com.thousandeyes.sdk.endpoint.tests.results.model.NetworkProfile; +import com.thousandeyes.sdk.endpoint.tests.results.model.Platform; import com.thousandeyes.sdk.endpoint.tests.results.model.SystemMetrics; import com.thousandeyes.sdk.endpoint.tests.results.model.TargetProfile; import com.thousandeyes.sdk.endpoint.tests.results.model.TestProbeModeResponse; @@ -52,6 +55,9 @@ PathVisDynamicEndpointTestResult.JSON_PROPERTY_ORIGINAL_TARGET_PROFILE, PathVisDynamicEndpointTestResult.JSON_PROPERTY_USER_PROFILE, PathVisDynamicEndpointTestResult.JSON_PROPERTY_VPN_PROFILE, + PathVisDynamicEndpointTestResult.JSON_PROPERTY_BATTERY_METRICS, + PathVisDynamicEndpointTestResult.JSON_PROPERTY_CELLULAR_PROFILE, + PathVisDynamicEndpointTestResult.JSON_PROPERTY_PLATFORM, PathVisDynamicEndpointTestResult.JSON_PROPERTY_ASN_DETAILS, PathVisDynamicEndpointTestResult.JSON_PROPERTY_SERVER, PathVisDynamicEndpointTestResult.JSON_PROPERTY_SOURCE_IP, @@ -96,6 +102,15 @@ public class PathVisDynamicEndpointTestResult { public static final String JSON_PROPERTY_VPN_PROFILE = "vpnProfile"; private VpnProfile vpnProfile; + public static final String JSON_PROPERTY_BATTERY_METRICS = "batteryMetrics"; + private BatteryMetrics batteryMetrics; + + public static final String JSON_PROPERTY_CELLULAR_PROFILE = "cellularProfile"; + private CellularProfile cellularProfile; + + public static final String JSON_PROPERTY_PLATFORM = "platform"; + private Platform platform; + public static final String JSON_PROPERTY_ASN_DETAILS = "asnDetails"; private AsnDetails asnDetails; @@ -364,6 +379,81 @@ public void setVpnProfile(VpnProfile vpnProfile) { } + public PathVisDynamicEndpointTestResult batteryMetrics(BatteryMetrics batteryMetrics) { + this.batteryMetrics = batteryMetrics; + return this; + } + + /** + * Get batteryMetrics + * @return batteryMetrics + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BATTERY_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BatteryMetrics getBatteryMetrics() { + return batteryMetrics; + } + + + @JsonProperty(JSON_PROPERTY_BATTERY_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBatteryMetrics(BatteryMetrics batteryMetrics) { + this.batteryMetrics = batteryMetrics; + } + + + public PathVisDynamicEndpointTestResult cellularProfile(CellularProfile cellularProfile) { + this.cellularProfile = cellularProfile; + return this; + } + + /** + * Get cellularProfile + * @return cellularProfile + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CELLULAR_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CellularProfile getCellularProfile() { + return cellularProfile; + } + + + @JsonProperty(JSON_PROPERTY_CELLULAR_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCellularProfile(CellularProfile cellularProfile) { + this.cellularProfile = cellularProfile; + } + + + public PathVisDynamicEndpointTestResult platform(Platform platform) { + this.platform = platform; + return this; + } + + /** + * Get platform + * @return platform + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PLATFORM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Platform getPlatform() { + return platform; + } + + + @JsonProperty(JSON_PROPERTY_PLATFORM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPlatform(Platform platform) { + this.platform = platform; + } + + public PathVisDynamicEndpointTestResult asnDetails(AsnDetails asnDetails) { this.asnDetails = asnDetails; return this; @@ -629,6 +719,9 @@ public boolean equals(Object o) { Objects.equals(this.originalTargetProfile, pathVisDynamicEndpointTestResult.originalTargetProfile) && Objects.equals(this.userProfile, pathVisDynamicEndpointTestResult.userProfile) && Objects.equals(this.vpnProfile, pathVisDynamicEndpointTestResult.vpnProfile) && + Objects.equals(this.batteryMetrics, pathVisDynamicEndpointTestResult.batteryMetrics) && + Objects.equals(this.cellularProfile, pathVisDynamicEndpointTestResult.cellularProfile) && + Objects.equals(this.platform, pathVisDynamicEndpointTestResult.platform) && Objects.equals(this.asnDetails, pathVisDynamicEndpointTestResult.asnDetails) && Objects.equals(this.server, pathVisDynamicEndpointTestResult.server) && Objects.equals(this.sourceIp, pathVisDynamicEndpointTestResult.sourceIp) && @@ -644,7 +737,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(aid, testId, agentId, roundId, serverIp, networkProfile, systemMetrics, originalTargetProfile, userProfile, vpnProfile, asnDetails, server, sourceIp, sourcePrefix, application, protocol, tcpProbeMode, udpProbeMode, webex, location, pathTraces); + return Objects.hash(aid, testId, agentId, roundId, serverIp, networkProfile, systemMetrics, originalTargetProfile, userProfile, vpnProfile, batteryMetrics, cellularProfile, platform, asnDetails, server, sourceIp, sourcePrefix, application, protocol, tcpProbeMode, udpProbeMode, webex, location, pathTraces); } @Override @@ -661,6 +754,9 @@ public String toString() { sb.append(" originalTargetProfile: ").append(toIndentedString(originalTargetProfile)).append("\n"); sb.append(" userProfile: ").append(toIndentedString(userProfile)).append("\n"); sb.append(" vpnProfile: ").append(toIndentedString(vpnProfile)).append("\n"); + sb.append(" batteryMetrics: ").append(toIndentedString(batteryMetrics)).append("\n"); + sb.append(" cellularProfile: ").append(toIndentedString(cellularProfile)).append("\n"); + sb.append(" platform: ").append(toIndentedString(platform)).append("\n"); sb.append(" asnDetails: ").append(toIndentedString(asnDetails)).append("\n"); sb.append(" server: ").append(toIndentedString(server)).append("\n"); sb.append(" sourceIp: ").append(toIndentedString(sourceIp)).append("\n"); diff --git a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/PathVisEndpointTestResult.java b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/PathVisEndpointTestResult.java index 44c81908b..944bcd5af 100644 --- a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/PathVisEndpointTestResult.java +++ b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/model/PathVisEndpointTestResult.java @@ -21,8 +21,11 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import com.thousandeyes.sdk.endpoint.tests.results.model.AsnDetails; +import com.thousandeyes.sdk.endpoint.tests.results.model.BatteryMetrics; +import com.thousandeyes.sdk.endpoint.tests.results.model.CellularProfile; import com.thousandeyes.sdk.endpoint.tests.results.model.EndpointPathTrace; import com.thousandeyes.sdk.endpoint.tests.results.model.NetworkProfile; +import com.thousandeyes.sdk.endpoint.tests.results.model.Platform; import com.thousandeyes.sdk.endpoint.tests.results.model.SystemMetrics; import com.thousandeyes.sdk.endpoint.tests.results.model.TargetProfile; import com.thousandeyes.sdk.endpoint.tests.results.model.UserProfile; @@ -48,6 +51,9 @@ PathVisEndpointTestResult.JSON_PROPERTY_ORIGINAL_TARGET_PROFILE, PathVisEndpointTestResult.JSON_PROPERTY_USER_PROFILE, PathVisEndpointTestResult.JSON_PROPERTY_VPN_PROFILE, + PathVisEndpointTestResult.JSON_PROPERTY_BATTERY_METRICS, + PathVisEndpointTestResult.JSON_PROPERTY_CELLULAR_PROFILE, + PathVisEndpointTestResult.JSON_PROPERTY_PLATFORM, PathVisEndpointTestResult.JSON_PROPERTY_ASN_DETAILS, PathVisEndpointTestResult.JSON_PROPERTY_SERVER, PathVisEndpointTestResult.JSON_PROPERTY_SOURCE_IP, @@ -87,6 +93,15 @@ public class PathVisEndpointTestResult { public static final String JSON_PROPERTY_VPN_PROFILE = "vpnProfile"; private VpnProfile vpnProfile; + public static final String JSON_PROPERTY_BATTERY_METRICS = "batteryMetrics"; + private BatteryMetrics batteryMetrics; + + public static final String JSON_PROPERTY_CELLULAR_PROFILE = "cellularProfile"; + private CellularProfile cellularProfile; + + public static final String JSON_PROPERTY_PLATFORM = "platform"; + private Platform platform; + public static final String JSON_PROPERTY_ASN_DETAILS = "asnDetails"; private AsnDetails asnDetails; @@ -340,6 +355,81 @@ public void setVpnProfile(VpnProfile vpnProfile) { } + public PathVisEndpointTestResult batteryMetrics(BatteryMetrics batteryMetrics) { + this.batteryMetrics = batteryMetrics; + return this; + } + + /** + * Get batteryMetrics + * @return batteryMetrics + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BATTERY_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BatteryMetrics getBatteryMetrics() { + return batteryMetrics; + } + + + @JsonProperty(JSON_PROPERTY_BATTERY_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBatteryMetrics(BatteryMetrics batteryMetrics) { + this.batteryMetrics = batteryMetrics; + } + + + public PathVisEndpointTestResult cellularProfile(CellularProfile cellularProfile) { + this.cellularProfile = cellularProfile; + return this; + } + + /** + * Get cellularProfile + * @return cellularProfile + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CELLULAR_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public CellularProfile getCellularProfile() { + return cellularProfile; + } + + + @JsonProperty(JSON_PROPERTY_CELLULAR_PROFILE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCellularProfile(CellularProfile cellularProfile) { + this.cellularProfile = cellularProfile; + } + + + public PathVisEndpointTestResult platform(Platform platform) { + this.platform = platform; + return this; + } + + /** + * Get platform + * @return platform + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PLATFORM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Platform getPlatform() { + return platform; + } + + + @JsonProperty(JSON_PROPERTY_PLATFORM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPlatform(Platform platform) { + this.platform = platform; + } + + public PathVisEndpointTestResult asnDetails(AsnDetails asnDetails) { this.asnDetails = asnDetails; return this; @@ -480,6 +570,9 @@ public boolean equals(Object o) { Objects.equals(this.originalTargetProfile, pathVisEndpointTestResult.originalTargetProfile) && Objects.equals(this.userProfile, pathVisEndpointTestResult.userProfile) && Objects.equals(this.vpnProfile, pathVisEndpointTestResult.vpnProfile) && + Objects.equals(this.batteryMetrics, pathVisEndpointTestResult.batteryMetrics) && + Objects.equals(this.cellularProfile, pathVisEndpointTestResult.cellularProfile) && + Objects.equals(this.platform, pathVisEndpointTestResult.platform) && Objects.equals(this.asnDetails, pathVisEndpointTestResult.asnDetails) && Objects.equals(this.server, pathVisEndpointTestResult.server) && Objects.equals(this.sourceIp, pathVisEndpointTestResult.sourceIp) && @@ -490,7 +583,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(aid, testId, agentId, roundId, serverIp, networkProfile, systemMetrics, originalTargetProfile, userProfile, vpnProfile, asnDetails, server, sourceIp, sourcePrefix, location, pathTraces); + return Objects.hash(aid, testId, agentId, roundId, serverIp, networkProfile, systemMetrics, originalTargetProfile, userProfile, vpnProfile, batteryMetrics, cellularProfile, platform, asnDetails, server, sourceIp, sourcePrefix, location, pathTraces); } @Override @@ -507,6 +600,9 @@ public String toString() { sb.append(" originalTargetProfile: ").append(toIndentedString(originalTargetProfile)).append("\n"); sb.append(" userProfile: ").append(toIndentedString(userProfile)).append("\n"); sb.append(" vpnProfile: ").append(toIndentedString(vpnProfile)).append("\n"); + sb.append(" batteryMetrics: ").append(toIndentedString(batteryMetrics)).append("\n"); + sb.append(" cellularProfile: ").append(toIndentedString(cellularProfile)).append("\n"); + sb.append(" platform: ").append(toIndentedString(platform)).append("\n"); sb.append(" asnDetails: ").append(toIndentedString(asnDetails)).append("\n"); sb.append(" server: ").append(toIndentedString(server)).append("\n"); sb.append(" sourceIp: ").append(toIndentedString(sourceIp)).append("\n"); diff --git a/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/HttpServerEndpointScheduledTestResultsApiTest.java b/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/HttpServerEndpointScheduledTestResultsApiTest.java index dca5650c3..2237c2993 100644 --- a/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/HttpServerEndpointScheduledTestResultsApiTest.java +++ b/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/HttpServerEndpointScheduledTestResultsApiTest.java @@ -192,11 +192,28 @@ public void getHttpServerScheduledTestResultsRequestAndResponseDeserializationTe "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, "errorType" : "connect", + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", "responseCode" : 200, + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "score" : { "applicationScore" : 100.0, "quality" : "great" @@ -302,11 +319,28 @@ public void getHttpServerScheduledTestResultsRequestAndResponseDeserializationTe "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, "errorType" : "connect", + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", "responseCode" : 200, + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "score" : { "applicationScore" : 100.0, "quality" : "great" @@ -506,11 +540,28 @@ public void getMultiTestFilteredHttpServerScheduledTestResultsRequestAndResponse "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, "errorType" : "connect", + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", "responseCode" : 200, + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "score" : { "applicationScore" : 100.0, "quality" : "great" @@ -616,11 +667,28 @@ public void getMultiTestFilteredHttpServerScheduledTestResultsRequestAndResponse "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, "errorType" : "connect", + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", "responseCode" : 200, + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "score" : { "applicationScore" : 100.0, "quality" : "great" @@ -822,11 +890,28 @@ public void getSingleTestFilteredHttpServerScheduledTestResultsRequestAndRespons "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, "errorType" : "connect", + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", "responseCode" : 200, + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "score" : { "applicationScore" : 100.0, "quality" : "great" @@ -932,11 +1017,28 @@ public void getSingleTestFilteredHttpServerScheduledTestResultsRequestAndRespons "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, "errorType" : "connect", + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", "responseCode" : 200, + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "score" : { "applicationScore" : 100.0, "quality" : "great" diff --git a/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/LocalNetworkEndpointTestResultsApiTest.java b/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/LocalNetworkEndpointTestResultsApiTest.java index 49528bf04..66e734e24 100644 --- a/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/LocalNetworkEndpointTestResultsApiTest.java +++ b/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/LocalNetworkEndpointTestResultsApiTest.java @@ -158,9 +158,26 @@ public void filterLocalNetworksTestResultsTopologiesRequestAndResponseDeserializ "score" : 100.0, "quality" : "great" }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "type" : "vpn", "targetPort" : 80, + "platform" : "mac", "target" : "10.0.2.2", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "systemMetrics" : { "cpuUtilization" : { "min" : 0.22, @@ -301,9 +318,26 @@ public void filterLocalNetworksTestResultsTopologiesRequestAndResponseDeserializ "score" : 100.0, "quality" : "great" }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "type" : "vpn", "targetPort" : 80, + "platform" : "mac", "target" : "10.0.2.2", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "systemMetrics" : { "cpuUtilization" : { "min" : 0.22, @@ -559,6 +593,10 @@ public void getLocalNetworksTestResultsTopologyRequestAndResponseDeserialization "location" : "Slovenia", "longitude" : 14.5144444 }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "icmpTraceroutes" : [ { "destination" : "13.32.22.232", "hops" : [ { @@ -606,7 +644,20 @@ public void getLocalNetworksTestResultsTopologyRequestAndResponseDeserialization } ], "type" : "vpn", "targetPort" : 80, + "platform" : "mac", "target" : "10.0.2.2", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "systemMetrics" : { "cpuUtilization" : { "min" : 0.22, @@ -821,6 +872,10 @@ public void getLocalNetworksTestResultsTopologyRequestAndResponseDeserialization "location" : "Slovenia", "longitude" : 14.5144444 }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "icmpTraceroutes" : [ { "destination" : "13.32.22.232", "hops" : [ { @@ -868,7 +923,20 @@ public void getLocalNetworksTestResultsTopologyRequestAndResponseDeserialization } ], "type" : "vpn", "targetPort" : 80, + "platform" : "mac", "target" : "10.0.2.2", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "systemMetrics" : { "cpuUtilization" : { "min" : 0.22, diff --git a/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/NetworkDynamicEndpointTestResultsApiTest.java b/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/NetworkDynamicEndpointTestResultsApiTest.java index dc1733ead..639243fb7 100644 --- a/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/NetworkDynamicEndpointTestResultsApiTest.java +++ b/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/NetworkDynamicEndpointTestResultsApiTest.java @@ -193,10 +193,7 @@ public void filterDynamicTestNetworkResultsRequestAndResponseDeserializationTest "remotePort" : 80, "remoteIpAddress" : "120.98.134.7" }, - "udpProbeMode" : "unknown", "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", - "isIcmpBlocked" : true, - "avgLatency" : 167.04, "minLatency" : 167.0, "vpnProfile" : { "vpnClientNetworkRange" : [ "9.88.37.27", "9.88.37.27" ], @@ -205,41 +202,33 @@ public void filterDynamicTestNetworkResultsRequestAndResponseDeserializationTest "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, "maxLatency" : 168.0, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, - "tcpProbeMode" : "auto", + "platform" : "mac", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "score" : { "applicationScore" : 100.0, "quality" : "great" }, "loss" : 0.0, "protocol" : "tcp", - "systemMetrics" : { - "cpuUtilization" : { - "min" : 0.22, - "median" : 0.61, - "max" : 0.75, - "mean" : 0.55, - "count" : 150, - "stdDev" : 0.01 - }, - "physicalMemoryTotalBytes" : 1024, - "startTimeMs" : 1581508857327, - "physicalMemoryUsedBytes" : { - "min" : 1.2, - "median" : 1.85, - "max" : 2.5, - "mean" : 1.77, - "count" : 155, - "stdDev" : 0.25 - }, - "endTimeMs" : 1581508867333 - }, - "jitter" : 0.076808, - "application" : "webex", - "serverIp" : "185.199.108.153", "networkProfile" : { "previousInterface" : { "publicIpAddress" : "84.255.241.1", @@ -299,6 +288,35 @@ public void filterDynamicTestNetworkResultsRequestAndResponseDeserializationTest "errorMessage" : "ERR_NAME_NOT_RESOLVED", "type" : "zta_service" } ], + "roundId" : 1384309800, + "udpProbeMode" : "unknown", + "isIcmpBlocked" : true, + "avgLatency" : 167.04, + "tcpProbeMode" : "auto", + "systemMetrics" : { + "cpuUtilization" : { + "min" : 0.22, + "median" : 0.61, + "max" : 0.75, + "mean" : 0.55, + "count" : 150, + "stdDev" : 0.01 + }, + "physicalMemoryTotalBytes" : 1024, + "startTimeMs" : 1581508857327, + "physicalMemoryUsedBytes" : { + "min" : 1.2, + "median" : 1.85, + "max" : 2.5, + "mean" : 1.77, + "count" : 155, + "stdDev" : 0.25 + }, + "endTimeMs" : 1581508867333 + }, + "jitter" : 0.076808, + "application" : "webex", + "serverIp" : "185.199.108.153", "testId" : "584739201", "webex" : { "remoteSipSessionId" : "22581707460321454", @@ -307,7 +325,6 @@ public void filterDynamicTestNetworkResultsRequestAndResponseDeserializationTest "correlationId" : "22581707460321454" }, "aid" : "1234", - "roundId" : 1384309800, "errorDetails" : "Error" }, { "originalTargetProfile" : { @@ -315,10 +332,7 @@ public void filterDynamicTestNetworkResultsRequestAndResponseDeserializationTest "remotePort" : 80, "remoteIpAddress" : "120.98.134.7" }, - "udpProbeMode" : "unknown", "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", - "isIcmpBlocked" : true, - "avgLatency" : 167.04, "minLatency" : 167.0, "vpnProfile" : { "vpnClientNetworkRange" : [ "9.88.37.27", "9.88.37.27" ], @@ -327,41 +341,33 @@ public void filterDynamicTestNetworkResultsRequestAndResponseDeserializationTest "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, "maxLatency" : 168.0, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, - "tcpProbeMode" : "auto", + "platform" : "mac", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "score" : { "applicationScore" : 100.0, "quality" : "great" }, "loss" : 0.0, "protocol" : "tcp", - "systemMetrics" : { - "cpuUtilization" : { - "min" : 0.22, - "median" : 0.61, - "max" : 0.75, - "mean" : 0.55, - "count" : 150, - "stdDev" : 0.01 - }, - "physicalMemoryTotalBytes" : 1024, - "startTimeMs" : 1581508857327, - "physicalMemoryUsedBytes" : { - "min" : 1.2, - "median" : 1.85, - "max" : 2.5, - "mean" : 1.77, - "count" : 155, - "stdDev" : 0.25 - }, - "endTimeMs" : 1581508867333 - }, - "jitter" : 0.076808, - "application" : "webex", - "serverIp" : "185.199.108.153", "networkProfile" : { "previousInterface" : { "publicIpAddress" : "84.255.241.1", @@ -421,6 +427,35 @@ public void filterDynamicTestNetworkResultsRequestAndResponseDeserializationTest "errorMessage" : "ERR_NAME_NOT_RESOLVED", "type" : "zta_service" } ], + "roundId" : 1384309800, + "udpProbeMode" : "unknown", + "isIcmpBlocked" : true, + "avgLatency" : 167.04, + "tcpProbeMode" : "auto", + "systemMetrics" : { + "cpuUtilization" : { + "min" : 0.22, + "median" : 0.61, + "max" : 0.75, + "mean" : 0.55, + "count" : 150, + "stdDev" : 0.01 + }, + "physicalMemoryTotalBytes" : 1024, + "startTimeMs" : 1581508857327, + "physicalMemoryUsedBytes" : { + "min" : 1.2, + "median" : 1.85, + "max" : 2.5, + "mean" : 1.77, + "count" : 155, + "stdDev" : 0.25 + }, + "endTimeMs" : 1581508867333 + }, + "jitter" : 0.076808, + "application" : "webex", + "serverIp" : "185.199.108.153", "testId" : "584739201", "webex" : { "remoteSipSessionId" : "22581707460321454", @@ -429,7 +464,6 @@ public void filterDynamicTestNetworkResultsRequestAndResponseDeserializationTest "correlationId" : "22581707460321454" }, "aid" : "1234", - "roundId" : 1384309800, "errorDetails" : "Error" } ], "startDate" : "2022-07-17T22:00:54Z" @@ -553,12 +587,29 @@ public void getDynamicTestPathVisAgentRoundResultsRequestAndResponseDeserializat "vpnType" : "cisco-anyconnect", "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "sourcePrefix" : "196.40.96.0/20", "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", "tcpProbeMode" : "auto", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "protocol" : "tcp", "systemMetrics" : { "cpuUtilization" : { @@ -748,12 +799,29 @@ public void getDynamicTestPathVisAgentRoundResultsRequestAndResponseDeserializat "vpnType" : "cisco-anyconnect", "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "sourcePrefix" : "196.40.96.0/20", "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", "tcpProbeMode" : "auto", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "protocol" : "tcp", "systemMetrics" : { "cpuUtilization" : { @@ -1055,12 +1123,29 @@ public void getDynamicTestPathVisResultsRequestAndResponseDeserializationTest() "vpnType" : "cisco-anyconnect", "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "sourcePrefix" : "196.40.96.0/20", "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", "tcpProbeMode" : "auto", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "protocol" : "tcp", "systemMetrics" : { "cpuUtilization" : { @@ -1178,12 +1263,29 @@ public void getDynamicTestPathVisResultsRequestAndResponseDeserializationTest() "vpnType" : "cisco-anyconnect", "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "sourcePrefix" : "196.40.96.0/20", "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", "tcpProbeMode" : "auto", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "protocol" : "tcp", "systemMetrics" : { "cpuUtilization" : { diff --git a/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/NetworkEndpointScheduledTestResultsApiTest.java b/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/NetworkEndpointScheduledTestResultsApiTest.java index 9bd772de3..a221c3a56 100644 --- a/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/NetworkEndpointScheduledTestResultsApiTest.java +++ b/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/NetworkEndpointScheduledTestResultsApiTest.java @@ -207,10 +207,27 @@ public void filterScheduledTestNetworkResultsRequestAndResponseDeserializationTe "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, "maxLatency" : 168.0, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "score" : { "applicationScore" : 100.0, "quality" : "great" @@ -319,10 +336,27 @@ public void filterScheduledTestNetworkResultsRequestAndResponseDeserializationTe "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, "maxLatency" : 168.0, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "score" : { "applicationScore" : 100.0, "quality" : "great" @@ -516,10 +550,27 @@ public void filterScheduledTestsNetworkResultsRequestAndResponseDeserializationT "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, "maxLatency" : 168.0, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "score" : { "applicationScore" : 100.0, "quality" : "great" @@ -628,10 +679,27 @@ public void filterScheduledTestsNetworkResultsRequestAndResponseDeserializationT "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, "maxLatency" : 168.0, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "score" : { "applicationScore" : 100.0, "quality" : "great" @@ -844,11 +912,28 @@ public void getScheduledTestPathVisAgentRoundResultsRequestAndResponseDeserializ "vpnType" : "cisco-anyconnect", "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "sourcePrefix" : "196.40.96.0/20", "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "systemMetrics" : { "cpuUtilization" : { "min" : 0.22, @@ -1029,11 +1114,28 @@ public void getScheduledTestPathVisAgentRoundResultsRequestAndResponseDeserializ "vpnType" : "cisco-anyconnect", "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "sourcePrefix" : "196.40.96.0/20", "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "systemMetrics" : { "cpuUtilization" : { "min" : 0.22, @@ -1326,11 +1428,28 @@ public void getScheduledTestPathVisResultsRequestAndResponseDeserializationTest( "vpnType" : "cisco-anyconnect", "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "sourcePrefix" : "196.40.96.0/20", "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "systemMetrics" : { "cpuUtilization" : { "min" : 0.22, @@ -1439,11 +1558,28 @@ public void getScheduledTestPathVisResultsRequestAndResponseDeserializationTest( "vpnType" : "cisco-anyconnect", "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] }, + "batteryMetrics" : { + "batteryLevel" : "medium", + "batteryLevelNormalizedPercent" : 0.3 + }, "sourcePrefix" : "196.40.96.0/20", "userProfile" : { "userName" : "joeblogs32", "userPrincipalName" : "joeblogs32@c.com" }, + "platform" : "mac", + "cellularProfile" : { + "rssi" : -10, + "advertisedNetworkSubtype" : "LTE/HSPA", + "carrierName" : "T-Mobile", + "rsrq" : -30, + "rsrp" : -30, + "advertisedNetworkGen" : "2g, 3g, 4g, 5g", + "rscp" : -30, + "networkGen" : "2g, 3g, 4g, 5g", + "networkSubtype" : "LTE/HSPA", + "sinr" : 20 + }, "systemMetrics" : { "cpuUtilization" : { "min" : 0.22, diff --git a/endpoint-tests/README.md b/endpoint-tests/README.md index acba20455..ed7710d8e 100644 --- a/endpoint-tests/README.md +++ b/endpoint-tests/README.md @@ -2,7 +2,7 @@ Endpoint Tests API -- API version: 7.0.75 +- API version: 7.0.78 Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. diff --git a/event-detection/README.md b/event-detection/README.md index 17c4932d6..59c10abda 100644 --- a/event-detection/README.md +++ b/event-detection/README.md @@ -2,7 +2,7 @@ Event Detection API -- API version: 7.0.75 +- API version: 7.0.78 Event detection occurs when ThousandEyes identifies that error signals related to a component (proxy, network node, AS, server etc) have deviated from the baselines established by events. diff --git a/instant-tests/README.md b/instant-tests/README.md index 2b40a58db..56c7753c7 100644 --- a/instant-tests/README.md +++ b/instant-tests/README.md @@ -2,7 +2,7 @@ Instant Tests API -- API version: 7.0.75 +- API version: 7.0.78 The Instant Tests API operations lets you create and run new instant tests. You will need to be an Account Admin. diff --git a/internet-insights/README.md b/internet-insights/README.md index bcdf1c160..c6ff0eb5b 100644 --- a/internet-insights/README.md +++ b/internet-insights/README.md @@ -2,7 +2,7 @@ Internet Insights API -- API version: 7.0.75 +- API version: 7.0.78 We are happy to announce the release of the Internet Insights API set. This limited release includes endpoints that: diff --git a/snapshots/README.md b/snapshots/README.md index 74ade13de..4eeba5554 100644 --- a/snapshots/README.md +++ b/snapshots/README.md @@ -2,7 +2,7 @@ Test Snapshots API -- API version: 7.0.75 +- API version: 7.0.78 Creates a new test snapshot in ThousandEyes. diff --git a/streaming/README.md b/streaming/README.md index 3c9f99902..f8ab5d3dc 100644 --- a/streaming/README.md +++ b/streaming/README.md @@ -2,7 +2,7 @@ ThousandEyes for OpenTelemetry API -- API version: 7.0.75 +- API version: 7.0.78 ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry. diff --git a/tags/README.md b/tags/README.md index 3f34553cb..42d86d26c 100644 --- a/tags/README.md +++ b/tags/README.md @@ -2,7 +2,7 @@ Tags API -- API version: 7.0.75 +- API version: 7.0.78 The ThousandEyes Tags API provides a tagging system with key/value pairs. It allows you to tag assets within the ThousandEyes platform (such as agents, tests, or dashboards) with meaningful metadata. For example: `branch:sfo`, `branch:nyc`, and `team:netops`. diff --git a/test-results/README.md b/test-results/README.md index 985531bd6..1340e51aa 100644 --- a/test-results/README.md +++ b/test-results/README.md @@ -2,7 +2,7 @@ Test Results API -- API version: 7.0.75 +- API version: 7.0.78 Get test result metrics for Network and Application Synthetics tests. diff --git a/tests/README.md b/tests/README.md index 86b09b2de..ffc332363 100644 --- a/tests/README.md +++ b/tests/README.md @@ -2,7 +2,7 @@ Tests API -- API version: 7.0.75 +- API version: 7.0.78 This API allows you to list, create, edit, and delete Network and Application Synthetics tests. diff --git a/usage/README.md b/usage/README.md index 4c15bf412..15d5c4459 100644 --- a/usage/README.md +++ b/usage/README.md @@ -2,7 +2,7 @@ Usage API -- API version: 7.0.75 +- API version: 7.0.78 These usage endpoints define the following operations: